|
|
@@ -26,6 +26,9 @@
|
|
|
%ifndef with_pth
|
|
|
%define with_pth no
|
|
|
%endif
|
|
|
+%ifndef with_threads
|
|
|
+%define with_threads no
|
|
|
+%endif
|
|
|
|
|
|
%define V_xerces 2.1.0
|
|
|
%define Vs_xerces 2_1_0
|
|
|
@@ -40,11 +43,16 @@ Distribution: OpenPKG [EVAL]
|
|
|
Group: Web
|
|
|
License: Apache Software License 1.1
|
|
|
Version: %{V_xerces}
|
|
|
-Release: 20021209
|
|
|
+Release: 20021227
|
|
|
|
|
|
# list of sources
|
|
|
Source0: http://xml.apache.org/dist/xerces-c/stable/xerces-c-src%{Vs_xerces}.tar.gz
|
|
|
Patch0: xerces-c.patch
|
|
|
+Patch1: xerces-c-pth.patch
|
|
|
+
|
|
|
+%if "%{with_pth}" == "yes"
|
|
|
+%define with_threads yes
|
|
|
+%endif
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
@@ -62,32 +70,54 @@ AutoReqProv: no
|
|
|
Xerces-C++ is a validating XML parser written in a portable subset of C++.
|
|
|
|
|
|
Options:
|
|
|
+ --define 'with_threads' %{with_threads}'
|
|
|
--define 'with_pth %{with_pth}'
|
|
|
|
|
|
%prep
|
|
|
%setup -q -n xerces-c-src%{Vs_xerces}
|
|
|
%patch0 -p0
|
|
|
+%if "%{with_pth}" == "yes"
|
|
|
+ %patch1 -p0
|
|
|
+%endif
|
|
|
|
|
|
%build
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
- ( XERCESCROOT=`pwd` ; \
|
|
|
- export XERCESCROOT ; \
|
|
|
+ ( XERCESCROOT=`pwd` ;
|
|
|
+ export XERCESCROOT ;
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;@l_ar@;%{l_libtool} --mode=link c++ -static -o;' \
|
|
|
obj/Makefile.in
|
|
|
- cd $XERCESCROOT/src/xercesc ; \
|
|
|
- autoconf ; \
|
|
|
- os="freebsd" ; \
|
|
|
- pt="pthread" ; \
|
|
|
- case "%{l_target}" in \
|
|
|
- *-freebsd*) os=freebsd ; pt=pthread ;; \
|
|
|
- *-linux*) os=linux ; pt=pthread ;; \
|
|
|
- *-solaris*) os=solaris ; pt=pthread ;; \
|
|
|
- *-irix*) os=irix ; pt=sproc ;; \
|
|
|
- *-hpux-10.*) os=hp-10 ; pt=none ;; \
|
|
|
- *-hpux-11.*) os=hp-11 ; pt=none ;; \
|
|
|
- *-aix*) os=aix ; pt=pthread ;; \
|
|
|
- esac ; \
|
|
|
+ cd $XERCESCROOT/src/xercesc ;
|
|
|
+ autoconf ;
|
|
|
+%if "%{with_threads}" == "yes"
|
|
|
+ os="freebsd" ;
|
|
|
+ pt="pthread" ;
|
|
|
+ case "%{l_target}" in
|
|
|
+%if "%{with_pth}" == "yes"
|
|
|
+ *-freebsd*) os=freebsd ; pt=pth ;;
|
|
|
+%else
|
|
|
+ *-freebsd*) os=freebsd ; pt=pthread ;;
|
|
|
+%endif
|
|
|
+ *-linux*) os=linux ; pt=pthread ;;
|
|
|
+ *-solaris*) os=solaris ; pt=pthread ;;
|
|
|
+ *-irix*) os=irix ; pt=sproc ;;
|
|
|
+ *-hpux-10.*) os=hp-10 ; pt=none ;;
|
|
|
+ *-hpux-11.*) os=hp-11 ; pt=none ;;
|
|
|
+ *-aix*) os=aix ; pt=pthread ;;
|
|
|
+ esac ;
|
|
|
+%else
|
|
|
+ os="freebsd" ;
|
|
|
+ pt="none" ;
|
|
|
+ case "%{l_target}" in
|
|
|
+ *-freebsd*) os=freebsd ;;
|
|
|
+ *-linux*) os=linux ;;
|
|
|
+ *-solaris*) os=solaris ;;
|
|
|
+ *-irix*) os=irix ;;
|
|
|
+ *-hpux-10.*) os=hp-10 ;;
|
|
|
+ *-hpux-11.*) os=hp-11 ;;
|
|
|
+ *-aix*) os=aix ;;
|
|
|
+ esac ;
|
|
|
+%endif
|
|
|
CC="%{l_cc}" \
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
LDFLAGS="%{l_ldflags}" \
|
|
|
@@ -99,15 +129,15 @@ AutoReqProv: no
|
|
|
-minmem \
|
|
|
-nsocket \
|
|
|
-tnative \
|
|
|
- -r$pt ; \
|
|
|
- %{l_make} %{l_mflags} \
|
|
|
+ -r$pt
|
|
|
+ %{l_make} %{l_mflags}
|
|
|
)
|
|
|
|
|
|
%install
|
|
|
- ( XERCESCROOT=`pwd` ; \
|
|
|
- export XERCESCROOT ; \
|
|
|
- cd $XERCESCROOT/src/xercesc ; \
|
|
|
- %{l_make} %{l_mflags} install "PREFIX=$RPM_BUILD_ROOT%{l_prefix}" ; \
|
|
|
+ ( XERCESCROOT=`pwd` ;
|
|
|
+ export XERCESCROOT ;
|
|
|
+ cd $XERCESCROOT/src/xercesc ;
|
|
|
+ %{l_make} %{l_mflags} install "PREFIX=$RPM_BUILD_ROOT%{l_prefix}"
|
|
|
)
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|