[packages/php/dev-7.4] drop libtool patch; support just libtool 2

glen glen at pld-linux.org
Thu Jun 20 01:17:18 CEST 2019


commit feb14aa201b8e448a6e306e8eb181132cd1e3165
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu Jun 20 01:14:07 2019 +0300

    drop libtool patch; support just libtool 2
    
    and don't symlink m4 files, rebuild php if needed to update

 php-libtool.patch | 31 -------------------------------
 php.spec          | 33 ++-------------------------------
 2 files changed, 2 insertions(+), 62 deletions(-)
---
diff --git a/php.spec b/php.spec
index d2405e0..65e9394 100644
--- a/php.spec
+++ b/php.spec
@@ -180,7 +180,6 @@ Patch1:		%{orgname}-pldlogo.patch
 Patch2:		%{orgname}-mail.patch
 Patch3:		%{orgname}-link-libs.patch
 Patch4:		intl-stdc++.patch
-
 Patch7:		%{orgname}-sapi-ini-file.patch
 Patch8:		milter.patch
 Patch9:		libtool-tag.patch
@@ -197,7 +196,6 @@ Patch25:	%{orgname}-stupidapache_version.patch
 Patch27:	%{orgname}-config-dir.patch
 Patch29:	%{orgname}-fcgi-graceful.patch
 Patch31:	%{orgname}-fcgi-error_log-no-newlines.patch
-Patch34:	%{orgname}-libtool.patch
 Patch39:	%{orgname}-use-prog_sendmail.patch
 Patch41:	%{orgname}-fpm-config.patch
 Patch42:	%{orgname}-fpm-shared.patch
@@ -249,11 +247,7 @@ BuildRequires:	libltdl-devel >= 1.4
 BuildRequires:	libpng-devel >= 1.0.8
 %{?with_intl:BuildRequires:	libstdc++-devel}
 %{?with_webp:BuildRequires:	libwebp-devel}
-%if "%{pld_release}" != "ac"
 BuildRequires:	libtool >= 2:2.4.6
-%else
-BuildRequires:	libtool >= 1.4.3
-%endif
 BuildRequires:	libxml2-devel >= 1:2.7.6-4
 %{?with_xsl:BuildRequires:	libxslt-devel >= 1.1.0}
 %{?with_zip:BuildRequires:	libzip-devel >= 1.3.1}
@@ -622,13 +616,9 @@ Summary(ru.UTF-8):	Пакет разработки для построения 
 Summary(uk.UTF-8):	Пакет розробки для побудови розширень PHP
 Group:		Development/Languages/PHP
 Requires:	%{name}-common = %{epoch}:%{version}-%{release}
-Requires:	autoconf >= 2.13
-Requires:	automake
-%if "%{pld_release}" != "ac"
+Requires:	autoconf >= 2.59
+Requires:	automake >= 1.4d
 Requires:	libtool >= 2:2.4.6
-%else
-Requires:	libtool
-%endif
 Requires:	pcre2-8-devel >= 10.30
 Requires:	shtool
 Provides:	php-devel = %{epoch}:%{version}-%{release}
@@ -1908,9 +1898,6 @@ cp -p php.ini-production php.ini
 %patch27 -p1
 %patch29 -p1
 %patch31 -p1
-%if "%{pld_release}" != "ac"
-%patch34 -p1
-%endif
 %patch39 -p1
 %patch41 -p1
 %patch42 -p1
@@ -2598,20 +2585,6 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi-fcgi,cli,apache,apache2handler}.d
 # for CLI SAPI only
 %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/readline.ini,cli.d}
 
-# use system automake and {lib,sh}tool
-ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/%{name}/build
-ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/%{name}/build
-for fn in libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4; do
-	f=%{_aclocaldir}/$fn
-	test -f $f || continue
-	ln -snf $f $RPM_BUILD_ROOT%{_libdir}/%{name}/build
-done
-for fn in ltmain.sh config/ltmain.sh build-aux/ltmain.sh; do
-	f=/usr/share/libtool/$fn
-	test -f $f || continue
-	ln -snf $f $RPM_BUILD_ROOT%{_libdir}/%{name}/build
-	break
-done
 sed -i -e '/^phpdir/ s,/php/build,/%{name}/build,' $RPM_BUILD_ROOT%{_bindir}/phpize
 
 # for php-pecl-mailparse
@@ -2625,8 +2598,6 @@ cp -a tests/* $RPM_BUILD_ROOT%{php_data_dir}/tests/php
 
 # fix install paths, avoid evil rpaths
 sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common.la
-# better solution?
-sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4
 
 install -p ext/ext_skel.php $RPM_BUILD_ROOT%{_bindir}
 
diff --git a/php-libtool.patch b/php-libtool.patch
deleted file mode 100644
index 247a4d4..0000000
--- a/php-libtool.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- php-7.3.0alpha3/scripts/phpize.in~	2018-07-10 10:30:28.000000000 +0300
-+++ php-7.3.0alpha3/scripts/phpize.in	2018-07-10 10:34:24.853997769 +0300
-@@ -6,10 +6,16 @@
- exec_prefix="`eval echo @exec_prefix@`"
- phpdir="`eval echo @libdir@`/php/build"
- includedir="`eval echo @includedir@`/php"
-+aclocaldir="$prefix/share/aclocal"
- builddir="`pwd`"
- SED="@SED@"
- 
--FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attribute.m4"
-+FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool ax_check_compile_flag.m4 ax_gcc_func_attribute.m4"
-+if [ -f "$aclocaldir/ltsugar.m4" ]; then
-+    LIBTOOL_FILES="libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4"
-+else
-+    LIBTOOL_FILES="libtool.m4"
-+fi
- FILES="acinclude.m4 Makefile.global config.sub config.guess ltmain.sh run-tests*.php"
- CLEAN_FILES="$FILES *.o *.lo *.la .deps .libs/ build/ modules/ install-sh \
- 	mkinstalldirs missing config.nice config.sub config.guess configure configure.ac \
-@@ -145,8 +151,9 @@ phpize_copy_files()
-   test -d build || mkdir build
-  
-   (cd "$phpdir" && cp $FILES_BUILD "$builddir"/build)
-+  (cd "$aclocaldir" && cp $LIBTOOL_FILES "$builddir"/build)
-   (cd "$phpdir" && cp $FILES "$builddir")
--  (cd "$builddir" && cat acinclude.m4 ./build/libtool.m4 > aclocal.m4)
-+  (cd "$builddir/build" && cat ../acinclude.m4 $LIBTOOL_FILES > ../aclocal.m4)
- }
- 
- phpize_replace_prefix()
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/dc749f05f4e6b8ecc255d77e12a1599af9aea8a7



More information about the pld-cvs-commit mailing list