|
|
|
|
@ -22,16 +22,19 @@
|
|
|
|
|
## SUCH DAMAGE. |
|
|
|
|
## |
|
|
|
|
|
|
|
|
|
# package version |
|
|
|
|
%define V_opkg 2.1.0 |
|
|
|
|
%define V_dist 2_1_0 |
|
|
|
|
|
|
|
|
|
# package options |
|
|
|
|
%ifndef with_pth |
|
|
|
|
%define with_pth no |
|
|
|
|
%endif |
|
|
|
|
%ifndef with_threads |
|
|
|
|
%define with_threads no |
|
|
|
|
%endif |
|
|
|
|
%option with_pth no |
|
|
|
|
%option with_threads no |
|
|
|
|
|
|
|
|
|
%define V_xerces 2.1.0 |
|
|
|
|
%define Vs_xerces 2_1_0 |
|
|
|
|
# package option dependencies |
|
|
|
|
%if "%{with_pth}" == "yes" |
|
|
|
|
%undefine with_threads |
|
|
|
|
%define with_threads yes |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# package information |
|
|
|
|
Name: xerces-c |
|
|
|
|
@ -42,23 +45,19 @@ Packager: The OpenPKG Project
|
|
|
|
|
Distribution: OpenPKG [EVAL] |
|
|
|
|
Group: Web |
|
|
|
|
License: Apache Software License 1.1 |
|
|
|
|
Version: %{V_xerces} |
|
|
|
|
Release: 20021227 |
|
|
|
|
Version: %{V_opkg} |
|
|
|
|
Release: 20021230 |
|
|
|
|
|
|
|
|
|
# list of sources |
|
|
|
|
Source0: http://xml.apache.org/dist/xerces-c/stable/xerces-c-src%{Vs_xerces}.tar.gz |
|
|
|
|
Source0: http://xml.apache.org/dist/xerces-c/stable/xerces-c-src%{V_dist}.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} |
|
|
|
|
BuildRoot: %{l_buildroot} |
|
|
|
|
BuildPreReq: OpenPKG, gcc, make, autoconf, libtool |
|
|
|
|
PreReq: OpenPKG |
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20021230, gcc, make, autoconf, libtool |
|
|
|
|
PreReq: OpenPKG, openpkg >= 20021230 |
|
|
|
|
%if "%{with_pth}" == "yes" |
|
|
|
|
BuildPreReq: pth |
|
|
|
|
PreReq: pth |
|
|
|
|
@ -69,12 +68,10 @@ AutoReqProv: no
|
|
|
|
|
%description |
|
|
|
|
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}' |
|
|
|
|
%options -p12 |
|
|
|
|
|
|
|
|
|
%prep |
|
|
|
|
%setup -q -n xerces-c-src%{Vs_xerces} |
|
|
|
|
%setup -q -n xerces-c-src%{V_dist} |
|
|
|
|
%patch0 -p0 |
|
|
|
|
%if "%{with_pth}" == "yes" |
|
|
|
|
%patch1 -p0 |
|
|
|
|
@ -82,32 +79,32 @@ AutoReqProv: no
|
|
|
|
|
|
|
|
|
|
%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 ; |
|
|
|
|
cd $XERCESCROOT/src/xercesc |
|
|
|
|
%{l_prefix}/bin/autoconf |
|
|
|
|
%if "%{with_threads}" == "yes" |
|
|
|
|
os="freebsd" ; |
|
|
|
|
pt="pthread" ; |
|
|
|
|
os="freebsd" |
|
|
|
|
pt="pthread" |
|
|
|
|
case "%{l_target}" in |
|
|
|
|
%if "%{with_pth}" == "yes" |
|
|
|
|
*-freebsd*) os=freebsd ; pt=pth ;; |
|
|
|
|
*-freebsd*) os=freebsd; pt=pth ;; |
|
|
|
|
%else |
|
|
|
|
*-freebsd*) os=freebsd ; pt=pthread ;; |
|
|
|
|
*-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 ; |
|
|
|
|
*-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" ; |
|
|
|
|
os="freebsd" |
|
|
|
|
pt="none" |
|
|
|
|
case "%{l_target}" in |
|
|
|
|
*-freebsd*) os=freebsd ;; |
|
|
|
|
*-linux*) os=linux ;; |
|
|
|
|
@ -134,9 +131,9 @@ AutoReqProv: no
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
%install |
|
|
|
|
( XERCESCROOT=`pwd` ; |
|
|
|
|
export XERCESCROOT ; |
|
|
|
|
cd $XERCESCROOT/src/xercesc ; |
|
|
|
|
( 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} |
|
|
|
|
|