Parcourir la source

does not link with apr-1.0.0, so include old version

Thorsten Hohmeier il y a 21 ans
Parent
commit
08c65260c3
1 fichiers modifiés avec 26 ajouts et 5 suppressions
  1. 26 5
      tomcat4-adapter/tomcat4-adapter.spec

+ 26 - 5
tomcat4-adapter/tomcat4-adapter.spec

@@ -23,6 +23,8 @@
 ##  SUCH DAMAGE.
 ##
 
+%define       V_apr               0.9.4
+
 #   package information
 Name:         tomcat4-adapter
 Summary:      Apache Jakarta Tomcat Webserver Adapter
@@ -43,6 +45,7 @@ Release:      20040908
 #   list of sources
 Source0:      http://www.apache.org/dist/jakarta/tomcat-4/v%{version}/src/jakarta-tomcat-connectors-%{version}-src.tar.gz
 Source1:      tomcat4-adapter.conf
+Source2:      http://www.apache.org/dist/apr/apr-%{V_apr}.tar.gz
 Patch0:       tomcat4-adapter.patch
 
 #   build information
@@ -55,8 +58,6 @@ BuildPreReq:  autoconf, libtool
 %if "%{with_mod_jk}" == "yes"
 BuildPreReq:  automake
 %endif
-BuildPreReq:  apr
-PreReq:       apr
 AutoReq:      no
 AutoReqProv:  no
 
@@ -76,21 +77,41 @@ AutoReqProv:  no
 
 %prep
     %setup -q -n jakarta-tomcat-connectors-%{version}-src
+    %setup -q -T -D -a 2 -n jakarta-tomcat-connectors-%{version}-src
     %patch -p0
 
 %build
+    tempdir=`pwd`/tmp
+    #   first build apr
+    ( cd apr-%{V_apr}
+      CC="%{l_cc}" \
+      CFLAGS="%{l_cflags -O}" \
+      ./configure \
+          --prefix=%{l_prefix} \
+          --includedir=%{l_prefix}/include/apr \
+          --enable-layout=GNU \
+          --disable-threads \
+          --disable-shared
+      %{l_make} %{l_mflags -O}
+    ) || exit $?
+    #   install apr temporaryly
+    ( cd apr-%{V_apr}
+      rm -rf $tempdir/*
+      %{l_make} %{l_mflags} install DESTDIR=$tempdir
+    ) || exit $?
+    #   now ready to build the connector
     #   optionally build mod_webapp connector
 %if "%{with_mod_webapp}" == "yes"
     ( cd webapp
       %{l_shtool} subst \
-          -e 's;\-l\$(APR_LIB);`%{l_prefix}/bin/apr\-1\-config  --link-ld --libs`;g' \
+          -e "s;-l\\\$(APR_LIB);`$tempdir%{l_prefix}/bin/apr-config  --link-ld --libs`;g" \
           apache-1.3/Makefile.in
       ./support/buildconf.sh
       ./configure \
           --prefix=%{l_prefix} \
           --disable-java \
           --without-ant \
-          --with-apr=%{l_prefix}
+          --with-apr=$tempdir%{l_prefix}
       %{l_make} %{l_mflags}
     ) || exit $?
 %endif
@@ -104,7 +125,7 @@ AutoReqProv:  no
       autoconf
       ./configure \
           --prefix=%{l_prefix} \
-          --with-apr=%{l_prefix} \
+          --with-apr=$tempdir%{l_prefix} \
           --with-apxs=%{l_prefix}/sbin/apxs \
           --enable-EAPI
       %{l_make} %{l_mflags} LIBTOOL=$PWD/libtool