rpms/xqilla/F-8 mapm_mt.c, NONE, 1.1 xqilla-xercesc-libdir.patch, NONE, 1.1 xqilla.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Milan Zazrivec (mzazrive) fedora-extras-commits at redhat.com
Thu Jan 10 17:38:13 UTC 2008


Author: mzazrive

Update of /cvs/pkgs/rpms/xqilla/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29240/F-8

Modified Files:
	.cvsignore sources 
Added Files:
	mapm_mt.c xqilla-xercesc-libdir.patch xqilla.spec 
Log Message:
Initial import of xqilla ver. 2.0.0-1 into Fedora-8



--- NEW FILE mapm_mt.c ---

/* 
 *  M_APM  -  mapm_mt.c
 *
 *  Copyright (C) 2002 - 2007   
 *  Martin Pfingstl (Martin.Pfingstl at epost.de)
 *  Michael C. Ring
 *
 *  Permission to use, copy, and distribute this software and its
 *  documentation for any purpose with or without fee is hereby granted, 
 *  provided that the above copyright notice appear in all copies and 
 *  that both that copyright notice and this permission notice appear 
 *  in supporting documentation.
 *
 *  Permission to modify the software is granted. Permission to distribute
 *  the modified code is granted. Modifications are to be distributed by
 *  using the file 'license.txt' as a template to modify the file header.
 *  'license.txt' is available in the official MAPM distribution.
 *
 *  This software is provided "as is" without express or implied warranty.
 *
 *  THIS FILE HAS BEEN MODIFIED FROM THE OFFICIAL MAPM DISTRIBUTION BY
 *  Milan Zazrivec on 2008/10/01
 *  THIS FILE IS ORIGINALLY FROM MAPM VERSION 4.9.5
 *
 *  Changes made by Milan Zazrivec:
 *  - imported changes from XQilla project into mapm_mt.c (needed to make it
 *    work with xqilla version 2.0.0)
 */

/*
 *      $Id: mapm_mt.c,v 1.4 2007/12/03 02:24:27 mike Exp $
 *
 *      This file contains all wrapper functions for the library 
 *	using semaphores
 *
 *      $Log: mapm_mt.c,v $
 *      Revision 1.4  2007/12/03 02:24:27  mike
 *      update license
 *
 *      Revision 1.3  2003/05/07 22:52:22  mike
 *      add 2 new version functions
 *
 *      Revision 1.2  2002/11/10 22:42:44  mike
 *      add new integer_pow_nr function
 *
 *      Revision 1.1  2002/06/13 20:39:09  mike
 *      Initial revision
 */


#include <xqilla/mapm/m_apm.h>

extern   void    m_apm_enter(void);
extern   void    m_apm_leave(void);

#include <xercesc/util/Mutexes.hpp>
#include <xercesc/util/PlatformUtils.hpp>

extern "C"
{

static XERCES_CPP_NAMESPACE_QUALIFIER XMLMutex* m_apm_semaphore=0;

void m_apm_mt_initialize(void)
{
  if(m_apm_semaphore == 0) {
    m_apm_semaphore = new XERCES_CPP_NAMESPACE_QUALIFIER XMLMutex;
  }
}

void m_apm_mt_terminate(void)
{
  delete m_apm_semaphore;
  m_apm_semaphore = 0;
}

void    m_apm_enter(void)
{
        m_apm_semaphore->lock();
}

void    m_apm_leave(void)
{
        m_apm_semaphore->unlock();
}

/****************************************************************************/

M_APM 	m_apm_init_mt(void)
{
M_APM 	t;

/*	m_apm_enter(); */
	t=m_apm_init();
/*	m_apm_leave(); */
	return(t);
}

/****************************************************************************/

void	m_apm_free_mt(M_APM t)
{
/*	m_apm_enter(); */
	m_apm_free(t);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_free_all_mem_mt(void)
{
	m_apm_enter();
	m_apm_free_all_mem();
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_trim_mem_usage_mt(void)
{
	m_apm_enter();
	m_apm_trim_mem_usage();
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_set_string_mt(M_APM ctmp, char *s_in)
{
/*	m_apm_enter(); */
	m_apm_set_string(ctmp,s_in);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_set_double_mt(M_APM atmp,double dd)
{
/*	m_apm_enter(); */
	m_apm_set_double(atmp,dd);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_set_long_mt(M_APM atmp, long mm)
{
/*	m_apm_enter(); */
	m_apm_set_long(atmp,mm);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_to_string_mt(char *s, int places, M_APM mtmp)
{
/*	m_apm_enter(); */
	m_apm_to_string(s,places,mtmp);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_add_mt(M_APM r, M_APM a, M_APM b)
{
/*	m_apm_enter(); */
	m_apm_add(r,a,b);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_subtract_mt(M_APM r, M_APM a, M_APM b)
{
/*	m_apm_enter(); */
	m_apm_subtract(r,a,b);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_absolute_value_mt(M_APM d, M_APM s)
{
/*	m_apm_enter(); */
	m_apm_absolute_value(d,s);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_negate_mt(M_APM d, M_APM s)
{
/*	m_apm_enter(); */
	m_apm_negate(d,s);
/*	m_apm_leave(); */
}

/****************************************************************************/

int	m_apm_compare_mt(M_APM ltmp, M_APM rtmp)
{
int 	ret;

/*	m_apm_enter(); */
	ret=m_apm_compare(ltmp,rtmp);
/*	m_apm_leave(); */
	return(ret);
}


/****************************************************************************/

void	m_apm_multiply_mt(M_APM r, M_APM a, M_APM b)
{
	m_apm_enter();
	m_apm_multiply(r,a,b);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_divide_mt(M_APM rr, int places, M_APM aa, M_APM bb)
{
	m_apm_enter();
	m_apm_divide(rr,places,aa,bb);
	m_apm_leave();
}

/****************************************************************************/

void m_apm_cpp_precision_mt(int digits)
{
	m_apm_enter();
	m_apm_cpp_precision(digits);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_to_fixpt_string_mt(char *ss, int dplaces, M_APM mtmp)
{
	m_apm_enter();
	m_apm_to_fixpt_string(ss,dplaces,mtmp);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_round_mt(M_APM btmp, int places, M_APM atmp)
{
/*	m_apm_enter(); */
	m_apm_round(btmp,places,atmp);
/*	m_apm_leave(); */
}

/****************************************************************************/

void	m_apm_sqrt_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_sqrt(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_sin_mt(M_APM r, int places, M_APM a)
{
	m_apm_enter();
	m_apm_sin(r,places,a);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_arccos_mt(M_APM r, int places, M_APM x)
{
	m_apm_enter();
	m_apm_arccos(r,places,x);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_arctan2_mt(M_APM rr, int places, M_APM yy, M_APM xx)
{
	m_apm_enter();
	m_apm_arctan2(rr,places,yy,xx);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_copy_mt(M_APM dest, M_APM src)
{
/*	m_apm_enter(); */
	m_apm_copy(dest,src);
/*	m_apm_leave(); */
}


/****************************************************************************/

void	m_apm_reciprocal_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_reciprocal(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_to_fixpt_stringex_mt(char *s, int dplaces, M_APM atmp,
			char ch_radix, char ch_sep, int count_sep)
{
	m_apm_enter();
	m_apm_to_fixpt_stringex(s,dplaces,atmp,ch_radix,ch_sep,count_sep);
	m_apm_leave();
}

/****************************************************************************/

char	*m_apm_to_fixpt_stringexp_mt(int dplaces, M_APM atmp, char ch_radx, 
				char ch_sep, int ct_sep)
{
char 	*s;

	m_apm_enter();
	s=m_apm_to_fixpt_stringexp(dplaces,atmp,ch_radx,ch_sep,ct_sep);
	m_apm_leave();
	return(s);
}

/****************************************************************************/

void m_apm_to_integer_string_mt(char *s, M_APM mtmp)
{
	m_apm_enter();
	m_apm_to_integer_string(s,mtmp);
	m_apm_leave();
}

/****************************************************************************/

int	m_apm_sign_mt(M_APM m)
{
int 	i;

/*	m_apm_enter(); */
	i=m_apm_sign(m);
/*	m_apm_leave(); */
	return(i);
}

/****************************************************************************/

int	m_apm_exponent_mt(M_APM m)
{
int 	i;

/*	m_apm_enter(); */
	i=m_apm_exponent(m);
/*	m_apm_leave(); */
	return(i);
}

/****************************************************************************/

int	m_apm_significant_digits_mt(M_APM m)
{
int 	i;

/*	m_apm_enter(); */
	i=m_apm_significant_digits(m);
/*	m_apm_leave(); */
	return(i);
}

/****************************************************************************/

int	m_apm_is_integer_mt(M_APM m)
{
int 	i;

/*	m_apm_enter(); */
	i=m_apm_is_integer(m);
/*	m_apm_leave(); */
	return(i);
}

/****************************************************************************/

int	m_apm_is_even_mt(M_APM m)
{
int 	i;

/*	m_apm_enter(); */
	i=m_apm_is_even(m);
/*	m_apm_leave(); */
	return(i);
}

/****************************************************************************/

int	m_apm_is_odd_mt(M_APM m)
{
int 	i;

/*	m_apm_enter(); */
	i=m_apm_is_odd(m);
/*	m_apm_leave(); */
	return(i);
}

/****************************************************************************/

void	m_apm_gcd_mt(M_APM r, M_APM u, M_APM v)
{
	m_apm_enter();
	m_apm_gcd(r,u,v);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_lcm_mt(M_APM r, M_APM u, M_APM v)
{
	m_apm_enter();
	m_apm_lcm(r,u,v);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_integer_divide_mt(M_APM rr, M_APM aa, M_APM bb)
{
	m_apm_enter();
	m_apm_integer_divide(rr,aa,bb);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_integer_div_rem_mt(M_APM qq, M_APM rr, M_APM aa, M_APM bb)
{
	m_apm_enter();
	m_apm_integer_div_rem(qq,rr,aa,bb);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_factorial_mt(M_APM moutput, M_APM  minput)
{
	m_apm_enter();
	m_apm_factorial(moutput,minput);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_floor_mt(M_APM bb, M_APM aa)
{
	m_apm_enter();
	m_apm_floor(bb,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_ceil_mt(M_APM bb, M_APM aa)
{
	m_apm_enter();
	m_apm_ceil(bb,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_get_random_mt(M_APM m)
{
	m_apm_enter();
	m_apm_get_random(m);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_set_random_seed_mt(char *s)
{
	m_apm_enter();
	m_apm_set_random_seed(s);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_cbrt_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_cbrt(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_log_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_log(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_log10_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_log10(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_exp_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_exp(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_pow_mt(M_APM rr, int places, M_APM xx, M_APM yy)
{
	m_apm_enter();
	m_apm_pow(rr,places,xx,yy);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_integer_pow_mt(M_APM rr, int places, M_APM aa, int mexp)
{
	m_apm_enter();
	m_apm_integer_pow(rr,places,aa,mexp);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_integer_pow_nr_mt(M_APM rr, M_APM aa, int mexp)
{
	m_apm_enter();
	m_apm_integer_pow_nr(rr,aa,mexp);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_sin_cos_mt(M_APM sinv, M_APM cosv, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_sin_cos(sinv,cosv,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_cos_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_cos(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_tan_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_tan(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_arcsin_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_arcsin(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void	m_apm_arctan_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_arctan(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void    m_apm_sinh_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_sinh(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void    m_apm_cosh_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_cosh(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void    m_apm_tanh_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_tanh(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void    m_apm_arcsinh_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_arcsinh(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void    m_apm_arccosh_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_arccosh(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

void    m_apm_arctanh_mt(M_APM rr, int places, M_APM aa)
{
	m_apm_enter();
	m_apm_arctanh(rr,places,aa);
	m_apm_leave();
}

/****************************************************************************/

}

xqilla-xercesc-libdir.patch:

--- NEW FILE xqilla-xercesc-libdir.patch ---
--- configure.in	2007-12-13 02:06:15.000000000 +0100
+++ configure.in	2008-01-08 15:26:41.000000000 +0100
@@ -69,18 +69,18 @@
 if test "$with_xerces" = "no"; then
         with_xerces="/usr/local"
 fi
-if test `ls $with_xerces/lib/libxerces-c.*2[[6-8]].* 2>/dev/null | wc -l` -gt 0 ; then
+if test `ls $libdir/libxerces-c.*2[[6-8]].* 2>/dev/null | wc -l` -gt 0 ; then
         AC_MSG_CHECKING([for Xerces C++ version from source tree])
-        xerces_version=`ls "$with_xerces"/lib/libxerces-c.*[[0-9]][[0-9]].* | tail -1 | sed 's/.*xerces-c.*\([[0-9]]\)\([[0-9]]\).*/\1.\2/'`
+        xerces_version=`ls "$libdir"/libxerces-c.*[[0-9]][[0-9]].* | tail -1 | sed 's/.*xerces-c.*\([[0-9]]\)\([[0-9]]\).*/\1.\2/'`
         AC_MSG_RESULT([$xerces_version])
-        xerces_lib="$with_xerces/lib"
+        xerces_lib="$libdir"
         xerces_include="$with_xerces/src"
         xerces_library="xerces-c"
-elif test `ls $with_xerces/lib/libxerces-c*2[[6-8]].* 2>/dev/null | wc -l` -gt 0 ; then
+elif test `ls $libdir/libxerces-c*2[[6-8]].* 2>/dev/null | wc -l` -gt 0 ; then
         AC_MSG_CHECKING([for Xerces C++ version from source tree])
-        xerces_version=`ls "$with_xerces"/lib/libxerces-c*[[0-9]][[0-9]].* | tail -1 | sed 's/.*xerces-c*\([[0-9]]\)\([[0-9]]\).*/\1.\2/'`
+        xerces_version=`ls "$libdir"/libxerces-c*[[0-9]][[0-9]].* | tail -1 | sed 's/.*xerces-c*\([[0-9]]\)\([[0-9]]\).*/\1.\2/'`
         AC_MSG_RESULT([$xerces_version])
-        xerces_lib="$with_xerces/lib"
+        xerces_lib="$libdir"
         xerces_include="$with_xerces/src"
         xerces_library="xerces-c"
 else
@@ -162,9 +162,7 @@
 fi
 
 # Checks for libraries.
-AC_CHECK_LIB(pthread,pthread_create)
 AC_CHECK_LIB(socket,connect)
-AC_CHECK_LIB(nsl,gethostbyname)
 
 # Checks for header files.
 AC_FUNC_ALLOCA


--- NEW FILE xqilla.spec ---
%define _unpackaged_files_terminate_build  1
%define _missing_doc_files_terminate_build 1

%define xercesc_dir xerces-c-src_2_7_0

Name: xqilla
Summary: XQilla is an XQuery and XPath 2.0 library, built on top of Xerces-C
Group: System Environment/Libraries
Version: 2.0.0
Release: 1%{?dist}
License: ASL 2.0
URL: http://xqilla.sourceforge.net/HomePage
# Original upstream source:
# Source0: http://downloads.sourceforge.net/xqilla/XQilla-%{version}.tar.gz
# 
# Original tarball with src/mapm/mapm_mt.cpp removed (licensing problems)
Source0: XQilla-%{version}.tar.gz
Source1: http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_7_0/source/xerces-c-src_2_7_0.tar.gz
# mapm_mt.c is wrapper for mapm library to be used in multithreaded apps.
# It was taken from MAPM library ver. 4.9.5 and modified to work with
# XQilla ver. 2.0.0. It's purpose is to replace the removed mapm_mt.cpp.
Source2: mapm_mt.c
Requires: libstdc++ >= 4.1.1 xerces-c >= 2.7.0

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
BuildRequires: xerces-c-devel >= 2.7.0 
BuildRequires: autoconf automake libtool

Patch0: xqilla-xercesc-libdir.patch

%define xercesc_build_root %{_builddir}/%{xercesc_dir}

%description
XQilla is an XQuery and XPath 2.0 implementation written in C++ and based
on Xerces-C. It implements the DOM 3 XPath API, as well as having it's own
more powerful API. It conforms to the W3C proposed recomendation of XQuery
and XPath 2.0.

%package devel
Group: Development/Libraries
Summary: XQilla is an XQuery and XPath 2.0 library, built on top of Xerces-C
Requires: %{name} = %{version}-%{release} xerces-c-devel = 2.7.0

%description devel
XQilla is an XQuery and XPath 2.0 implementation written in C++ and based
on Xerces-C. It implements the DOM 3 XPath API, as well as having it's own
more powerful API. It conforms to the W3C proposed recomendation of XQuery
and XPath 2.0.

%prep
%setup -q -b 1 -n XQilla-2.0.0
cp -p %{SOURCE2} src/mapm
ln -s mapm_mt.c src/mapm/mapm_mt.cpp
%patch0

%build
rm -f aclocal.m4
aclocal
libtoolize --force --copy
automake --add-missing --copy --force
autoconf
%configure \
	--disable-static \
	--disable-rpath \
	--with-xerces=%{xercesc_build_root}
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
export CPPROG="cp -p"
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f '{}' ';'
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}
cp -pr ChangeLog LICENSE %{buildroot}%{_defaultdocdir}/%{name}-%{version}

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_bindir}/xqilla
%{_libdir}/libxqilla.so.*
%{_defaultdocdir}/%{name}-%{version}

%files devel
%defattr(-,root,root,-)
%{_libdir}/libxqilla.so
%{_includedir}/xqilla

%changelog
* Thu Jan 10 2008 Milan Zazrivec <mzazrivec at redhat.com> 2.0.0-1
- Removed src/mapm/mapm_mt.cpp
- Added modified mapm_mt.c, taken from MAPM library ver. 4.9.5
- Added parallel make

* Tue Jan 08 2008 Milan Zazrivec <mzazrivec at redhat.com> 2.0.0-0
- Initial packaging of version 2.0.0


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xqilla/F-8/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	10 Jan 2008 16:45:20 -0000	1.1
+++ .cvsignore	10 Jan 2008 17:37:37 -0000	1.2
@@ -0,0 +1,2 @@
+XQilla-2.0.0.tar.gz
+xerces-c-src_2_7_0.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xqilla/F-8/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	10 Jan 2008 16:45:20 -0000	1.1
+++ sources	10 Jan 2008 17:37:37 -0000	1.2
@@ -0,0 +1,2 @@
+d7aa51c18a164af2fb54282bb271f0e2  XQilla-2.0.0.tar.gz
+04169609449a8846bc1e6891c04cadf4  xerces-c-src_2_7_0.tar.gz




More information about the fedora-extras-commits mailing list