SPECS: php4.spec - build cleanups, use permanent config.cache if c...

glen glen at pld-linux.org
Wed Apr 5 18:14:16 CEST 2006


Author: glen                         Date: Wed Apr  5 16:14:16 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- build cleanups, use permanent config.cache if configured

---- Files affected:
SPECS:
   php4.spec (1.535 -> 1.536) 

---- Diffs:

================================================================
Index: SPECS/php4.spec
diff -u SPECS/php4.spec:1.535 SPECS/php4.spec:1.536
--- SPECS/php4.spec:1.535	Wed Apr  5 11:05:30 2006
+++ SPECS/php4.spec	Wed Apr  5 18:14:11 2006
@@ -71,7 +71,7 @@
 %undefine	with_msession
 %endif
 
-%define	_rel 9.6
+%define	_rel 9.19
 Summary:	PHP: Hypertext Preprocessor
 Summary(fr):	Le langage de script embarque-HTML PHP
 Summary(pl):	Język skryptowy PHP
@@ -137,6 +137,7 @@
 Patch39:	%{name}-bug-36017-and-session-chars.patch
 Patch40:	%{name}-openssl-huge-hack.patch
 Patch41:	%{name}-versioning.patch
+Patch42:	%{name}-linkflags-clean.patch
 URL:		http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:	Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:	aspell-devel >= 2:0.50.0}
@@ -1630,6 +1631,7 @@
 
 %prep
 %setup -q -n php-%{version}
+%patch42 -p1
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -1683,10 +1685,6 @@
 zcat %{SOURCE8} | patch -p1
 %endif
 
-# new apr
-sed -i -e 's#apr-config#apr-1-config#g' sapi/apache*/*.m4
-sed -i -e 's#apu-config#apu-1-config#g' sapi/apache*/*.m4
-
 %build
 if API=$(awk '/#define PHP_API_VERSION/{print $3}' main/php.h) && [ $API != %{php_api_version} ]; then
 	echo "Set %%define php_api_version to $API and rerun."
@@ -1703,6 +1701,12 @@
 	exit 1
 fi
 
+%if 0%{?configure_cache:1}
+	if [ -f %{configure_cache_file:-$RPM_BUILD_ROOT.configure.cache} ]; then
+		cp -f %{configure_cache_file:-$RPM_BUILD_ROOT.configure.cache} config.cache
+	fi
+%endif
+
 EXTENSION_DIR="%{extensionsdir}"; export EXTENSION_DIR
 if [ ! -f _built-conf ]; then # configure once (for faster debugging purposes)
 	./buildconf --force
@@ -1853,28 +1857,23 @@
 	cp -f main/php_config.h php_config.h.$sapi
 done
 
-# for now session_mm doesn't work with shared session module...
-# --enable-session=shared
-# %{!?with_mm:--with-mm=shared,no}%{?with_mm:--with-mm=shared}
-
-%{__make} build-modules
+%if 0%{?configure_cache:1}
+	cp config.cache %{configure_cache_file:-$RPM_BUILD_ROOT.configure.cache}
+%endif
 
+# must make this first, so modules can link against it.
 %{__make} libphp_common.la
-# fix install paths, avoid evil rpaths
-sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" libphp_common.la
+# FIXME: needed for linking modules with libphp_common.la
+#libtool --mode=install cp libphp_common.la `pwd`/libs
+
+%{__make} build-modules
 
 %if %{with apache1}
 %{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp4.la -f Makefile.apxs1
-sed -i -e "
-s|^libdir=.*|libdir='%{_libdir}/apache1'|;
-s|^(relink_command=.* -rpath )[^ ]*/libs |$1%{_libdir}/apache1 |" sapi/apache/libphp4.la
 %endif
 
 %if %{with apache2}
 %{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache2handler/libphp4.la -f Makefile.apxs2
-sed -i -e "
-s|^libdir=.*|libdir='%{_libdir}/apache'|;
-s|^(relink_command=.* -rpath )[^ ]*/libs |$1%{_libdir}/apache |" sapi/apache2handler/libphp4.la
 %endif
 
 # FCGI
@@ -1903,17 +1902,23 @@
 
 # install apache1 DSO module
 %if %{with apache1}
-# TODO: use libtool here
-install sapi/apache/.libs/libphp4.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp4.so
+sed -i -e "s|^libdir=.*|libdir='%{_libdir}/apache1'|" sapi/apache/libphp4.la
+sed -i -e 's|^\(relink_command=.* -rpath \)[^ ]*/libs |\1%{_libdir}/apache1 |' sapi/apache/libphp4.la
+libtool --silent --mode=install install sapi/apache/libphp4.la $RPM_BUILD_ROOT%{_libdir}/apache1
+rm $RPM_BUILD_ROOT%{_libdir}/apache1/libphp4.la
 %endif
 
 # install apache2 DSO module
 %if %{with apache2}
-# TODO: use libtool here
-install sapi/apache2handler/.libs/libphp4.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp4.so
+sed -i -e "s|^libdir=.*|libdir='%{_libdir}/apache'|" sapi/apache2handler/libphp4.la
+sed -i -e 's|^\(relink_command=.* -rpath \)[^ ]*/libs |\1%{_libdir}/apache |' sapi/apache2handler/libphp4.la
+libtool --silent --mode=install install sapi/apache2handler/libphp4.la $RPM_BUILD_ROOT%{_libdir}/apache
+rm $RPM_BUILD_ROOT%{_libdir}/apache/libphp4.la
 %endif
 
 libtool --silent --mode=install install libphp_common.la $RPM_BUILD_ROOT%{_libdir}
+# fix install paths, avoid evil rpaths
+sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common.la
 
 # install the apache modules' files
 %{__make} install-headers install-build install-modules install-programs \
@@ -3220,6 +3225,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.536  2006/04/05 16:14:11  glen
+- build cleanups, use permanent config.cache if configured
+
 Revision 1.535  2006/04/05 09:05:30  glen
 - CFLAGS mungling unneccessary, all goes via apxs
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php4.spec?r1=1.535&r2=1.536&f=u



More information about the pld-cvs-commit mailing list