]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
upstream dropped ext-recode
[packages/php.git] / php.spec
index d2405e0b6968a715ad16d0b486f7341f19ff5528..7e333e3dfb8edff3910896e13f51309013d1f3dc 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -2,9 +2,6 @@
 # - mysqlnd driver doesn't support reconnect: https://bugs.php.net/bug.php?id=52561
 # TODO 5.6:
 # - enable --with-fpm-systemd, but ensure it checks for sd_booted()
-# TODO 5.4:
-# - update imap annotations patch (needs api porting)
-# - update imap myrights patch (needs api porting)
 # TODO:
 # - fileinfo extension bundles magic db in library: data_file.c (dump of magic.mgc) is 14M
 #   - 2.3M fileinfo.so php54-fileinfo-5.4.6-0.15.x86_64
@@ -41,6 +38,7 @@
 %bcond_without dom             # without DOM extension module
 %bcond_without enchant         # without Enchant extension module
 %bcond_without exif            # without EXIF extension module
+%bcond_without ffi             # without FFI extension module
 %bcond_without fileinfo        # without fileinfo extension module
 %bcond_without filter          # without filter extension module
 %bcond_without ftp             # without FTP extension module
@@ -61,6 +59,7 @@
 %bcond_without opcache         # without Enable Zend OPcache extension support
 %bcond_without openssl         # without OpenSSL support and OpenSSL extension (module)
 %bcond_without pcntl           # without pcntl extension module
+%bcond_without pcre_jit        # PCRE JIT
 %bcond_without pdo             # without PDO extension module
 %bcond_without pdo_dblib       # without PDO dblib extension module
 %bcond_without pdo_firebird    # without PDO Firebird extension module
@@ -74,7 +73,6 @@
 %bcond_without posix           # without POSIX extension module
 %bcond_without pspell          # without pspell extension module
 %bcond_without readline        # without readline extension module
-%bcond_without recode          # without recode extension module
 %bcond_without session         # without session extension module
 %bcond_without snmp            # without SNMP extension module
 %bcond_without sodium          # without sodium extension module
 %define apxs1          /usr/sbin/apxs1
 %define        apxs2           /usr/sbin/apxs
 
+# segfaults on x32
+%ifarch x32
+%undefine      with_pcre_jit
+%endif
+
 # disable all sapis
 %if %{with gcov}
 %undefine      with_apache2
 %undefine      with_pdo_sqlite
 %endif
 
-%define                subver alpha1
+%define                subver beta1
+%define                rel     1
 %define                orgname php
 %define                ver_suffix 74
 %define                php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -155,7 +159,7 @@ Summary(ru.UTF-8):  PHP Версии 7 - язык препроцессирова
 Summary(uk.UTF-8):     PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:          %{orgname}%{php_suffix}
 Version:       7.4.0
-Release:       0.1
+Release:       1.%{subver}.%{rel}
 Epoch:         4
 # All files licensed under PHP version 3.01, except
 # Zend is licensed under Zend
@@ -164,7 +168,7 @@ License:    PHP 3.01 and Zend and BSD
 Group:         Libraries
 #Source0:      https://php.net/distributions/%{orgname}-%{version}.tar.xz
 Source0:       https://downloads.php.net/~derick/php-%{version}%{subver}.tar.xz
-# Source0-md5: 29592e9a73c0ae615c4b7e2b4761184f
+# Source0-md5: fa3501cf158adce37359667383ddb672
 Source1:       opcache.ini
 Source2:       %{orgname}-mod_php.conf
 Source3:       %{orgname}-cgi-fcgi.ini
@@ -180,7 +184,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,14 +200,11 @@ 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
 Patch43:       %{orgname}-silent-session-cleanup.patch
 Patch44:       %{orgname}-include_path.patch
-Patch45:       %{orgname}-imap-annotations.patch
-Patch46:       %{orgname}-imap-myrights.patch
 Patch50:       extension-shared-optional-dep.patch
 Patch53:       fix-test-run.patch
 Patch55:       bug-52078-fileinode.patch
@@ -214,10 +214,9 @@ Patch66:   php-db.patch
 Patch67:       mysql-lib-ver-mismatch.patch
 # https://bugs.php.net/bug.php?id=68344
 Patch68:       php-mysql-ssl-context.patch
-Patch70:       mysqlnd-ssl.patch
 Patch71:       libdb-info.patch
 URL:           http://php.net/
-%{?with_pdo_firebase:%{!?with_interbase_inst:BuildRequires:    Firebird-devel >= 1.0.2.908-2}}
+%{?with_pdo_firebird:%{!?with_interbase_inst:BuildRequires:    Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:  aspell-devel >= 2:0.50.0}
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake >= 1.4d
@@ -230,6 +229,7 @@ BuildRequires:      elfutils-devel
 %{?with_enchant:BuildRequires: enchant-devel >= 1.1.3}
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
 %{?with_argon2:BuildRequires:  libargon2-devel >= 20161029}
+%{?with_ffi:BuildRequires:     libffi-devel}
 %{?with_sodium:BuildRequires:  libsodium-devel >= 1.0.8}
 %if %{with pdo_dblib}
 BuildRequires: freetds-devel >= 0.82
@@ -248,12 +248,8 @@ BuildRequires:     libjpeg-devel
 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
+%{?with_webp:BuildRequires:    libwebp-devel}
 BuildRequires: libxml2-devel >= 1:2.7.6-4
 %{?with_xsl:BuildRequires:     libxslt-devel >= 1.1.0}
 %{?with_zip:BuildRequires:     libzip-devel >= 1.3.1}
@@ -273,13 +269,12 @@ BuildRequires:    pcre2-8-devel >= 10.30
 BuildRequires: pkgconfig
 %{?with_pgsql:BuildRequires:   postgresql-devel}
 BuildRequires: readline-devel
-%{?with_recode:BuildRequires:  recode-devel >= 3.5d-3}
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpm-build >= 4.4.0
 BuildRequires: rpmbuild(macros) >= 1.566
 BuildRequires: sed >= 4.0
 %if %{with sqlite3} || %{with pdo_sqlite}
-BuildRequires: sqlite3-devel >= 3.3.9
+BuildRequires: sqlite3-devel >= 3.7.4
 %endif
 %{?with_systemtap:BuildRequires:       systemtap-sdt-devel}
 BuildRequires: tar >= 1:1.22
@@ -565,8 +560,8 @@ Provides:   %{name}-core
 Provides:      %{name}-date
 Provides:      %{name}-hash = %{epoch}:%{version}-%{release}
 Provides:      %{name}-pcre = %{epoch}:%{version}-%{release}
-Provides:      %{name}-spl = %{epoch}:%{version}-%{release}
 Provides:      %{name}-reflection
+Provides:      %{name}-spl = %{epoch}:%{version}-%{release}
 Provides:      %{name}-standard
 Provides:      php(core) = %{version}
 Provides:      php(date)
@@ -622,13 +617,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}
@@ -849,6 +840,17 @@ support in image files.
 %description exif -l pl.UTF-8
 Moduł PHP dodający obsługę znaczników EXIF w plikach obrazków.
 
+%package ffi
+Summary:       %{modname} - Foreign Function Interface
+Group:         Libraries
+URL:           https://www.php.net/manual/en/book.ffi.php
+Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Provides:      php(ffi) = %{version}
+
+%description ffi
+FFI is a multi-platform extension for PHP that allows you to bind to
+functions from arbitrary shared libraries and call them.
+
 %package fileinfo
 Summary:       libmagic bindings
 Summary(pl.UTF-8):     Wiązania do libmagic
@@ -1498,24 +1500,6 @@ cgi SAPIs).
 %description readline -l pl.UTF-8
 Moduł PHP dodający obsługę funkcji readline (tylko do SAPI cli i cgi).
 
-%package recode
-Summary:       recode extension module for PHP
-Summary(pl.UTF-8):     Moduł recode dla PHP
-Group:         Libraries
-URL:           http://php.net/manual/en/book.recode.php
-Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-Requires:      recode >= 3.5d-3
-Provides:      php(recode)
-Obsoletes:     php-recode < 4:5.3.28-7
-
-%description recode
-This is a dynamic shared object (DSO) for PHP that will add recode
-support.
-
-%description recode -l pl.UTF-8
-Moduł PHP dodający możliwość konwersji kodowania plików (poprzez
-bibliotekę recode).
-
 %package session
 Summary:       session extension module for PHP
 Summary(pl.UTF-8):     Moduł session dla PHP
@@ -1908,16 +1892,11 @@ 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
 %patch43 -p1
 %patch44 -p1
-#%patch45 -p1 # imap annotations. fixme
-#%patch46 -p1 # imap myrights. fixme
 %patch50 -p1
 
 %patch53 -p1
@@ -1930,7 +1909,6 @@ cp -p php.ini-production php.ini
 %patch66 -p1
 %patch67 -p1
 #%patch68 -p1 DROP or update to 7.0 APIs
-%patch70 -p1
 %patch71 -p1
 
 %{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
@@ -1941,9 +1919,6 @@ find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 # com_dotnet is Win32-only
 %{__rm} -r ext/com_dotnet
 
-# conflict seems to be resolved by recode patches
-%{__rm} ext/recode/config9.m4
-
 # remove all bundled libraries not to link with them accidentally
 #%{__rm} -r ext/bcmath/libbcmath
 #%{__rm} -r ext/date/lib
@@ -1953,7 +1928,7 @@ find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 #%{__rm} -r ext/dba/libinifile
 #%{__rm} -r ext/gd/libgd
 #%{__rm} -r ext/mbstring/libmbfl
-%{__rm} -r ext/pcre/pcre2lib
+#%{__rm} -r ext/pcre/pcre2lib
 #%{__rm} -r ext/soap/interop
 %{__rm} -r ext/xmlrpc/libxmlrpc
 #%{__rm} -r ext/zip/lib
@@ -2261,7 +2236,7 @@ for sapi in $sapis; do
        --with-pdo-dblib=shared \
 %endif
 %if %{with pdo_firebird}
-       --with-pdo-firebird=shared,/usr \
+       --with-pdo-firebird=shared \
 %endif
        %{?with_mhash:--with-mhash=yes} \
        --with-mysql-sock=/var/lib/mysql/mysql.sock \
@@ -2269,9 +2244,8 @@ for sapi in $sapis; do
        %{?with_pdo_oci:--with-pdo-oci=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
        %{?with_pdo_odbc:--with-pdo-odbc=shared,unixODBC,/usr} \
        %{?with_pdo_pgsql:--with-pdo-pgsql=shared} \
-       %{?with_pdo_sqlite:--with-pdo-sqlite=shared,/usr} \
-       %{?with_webp:--with-webp-dir=/usr --with-webp} \
-       --without-libexpat-dir \
+       %{?with_pdo_sqlite:--with-pdo-sqlite=shared} \
+       %{?with_webp:--with-webp} \
        %{__enable_disable posix posix shared} \
        --enable-shared \
        %{__enable_disable session session shared} \
@@ -2290,15 +2264,16 @@ for sapi in $sapis; do
        %{__with_without curl curl shared} \
        --with-db4 \
        %{__with_without iconv iconv shared} \
-       %{?with_enchant:--with-enchant=shared,/usr} \
-       --with-freetype-dir=shared \
+       %{?with_enchant:--with-enchant=shared} \
+       --with-freetype \
        %{__with_without gettext gettext shared} \
-       %{__enable_disable gd gd shared%{?with_system_gd:,/usr}} \
+       %{__enable_disable gd gd shared} \
        %{?with_system_gd:--with-external-gd} \
        --with-gdbm \
        %{__with_without gmp gmp shared} \
+       %{__with_without ffi ffi shared} \
        %{?with_imap:--with-imap=shared --with-imap-ssl} \
-       --with-jpeg-dir=/usr \
+       --with-jpeg \
        %{?with_ldap:--with-ldap=shared --with-ldap-sasl} \
        %{?with_mm:--with-mm} \
        %{?with_mysqlnd:--enable-mysqlnd=shared} \
@@ -2308,25 +2283,22 @@ for sapi in $sapis; do
        %{?with_openssl:--with-openssl=shared} \
        %{?with_kerberos5:--with-kerberos} \
        --with-tcadb=/usr \
-       %{__with_without pcre pcre-regex /usr} \
-       %{?with_pcre:--with-external-pcre} \
+       --with-external-pcre \
+       %{__with_without pcre_jit pcre-jit} \
        %{__enable_disable filter filter shared} \
-       %{__with_without pgsql pgsql shared,/usr} \
+       %{__with_without pgsql pgsql shared} \
        %{__enable_disable phar phar shared} \
-       --with-png-dir=/usr \
        %{?with_pspell:--with-pspell=shared} \
        %{__with_without readline readline shared} \
-       %{?with_recode:--with-recode=shared} \
        %{?with_snmp:--with-snmp=shared} \
        %{!?with_pdo_sqlite:--without-pdo-sqlite} \
-       %{__with_without sqlite3 sqlite3 shared,/usr} \
+       %{__with_without sqlite3 sqlite3 shared} \
        %{?with_tidy:--with-tidy=shared} \
-       %{?with_odbc:--with-unixODBC=shared,/usr} \
+       %{?with_odbc:--with-unixODBC=shared} \
        %{__with_without xmlrpc xmlrpc shared,/usr} \
        %{?with_xsl:--with-xsl=shared} \
        --with-zlib=shared \
-       --with-zlib-dir=shared,/usr \
-       %{?with_zip:--with-zip=shared,/usr} \
+       %{?with_zip:--with-zip=shared} \
 
        # save for debug
        cp -f Makefile Makefile.$sapi
@@ -2598,20 +2570,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 +2583,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}
 
@@ -2756,6 +2712,7 @@ fi \
 %extension_scripts dom
 %extension_scripts enchant
 %extension_scripts exif
+%extension_scripts ffi
 %extension_scripts fileinfo
 %extension_scripts filter
 %extension_scripts ftp
@@ -2774,19 +2731,18 @@ fi \
 %extension_scripts odbc
 %extension_scripts opcache
 %extension_scripts openssl
+%extension_scripts pcntl
 %extension_scripts pdo
 %extension_scripts pdo-dblib
 %extension_scripts pdo-firebird
-%extension_scripts pdo-oci
 %extension_scripts pdo-mysql
+%extension_scripts pdo-oci
 %extension_scripts pdo-odbc
 %extension_scripts pdo-pgsql
 %extension_scripts pdo-sqlite
 %extension_scripts pgsql
-%extension_scripts pcntl
 %extension_scripts posix
 %extension_scripts pspell
-%extension_scripts recode
 %extension_scripts session
 %extension_scripts shmop
 %extension_scripts simplexml
@@ -2994,6 +2950,14 @@ fi
 %attr(755,root,root) %{php_extensiondir}/exif.so
 %endif
 
+%if %{with ffi}
+%files ffi
+%defattr(644,root,root,755)
+%doc ext/ffi/CREDITS
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/ffi.ini
+%attr(755,root,root) %{php_extensiondir}/ffi.so
+%endif
+
 %if %{with fileinfo}
 %files fileinfo
 %defattr(644,root,root,755)
@@ -3257,14 +3221,6 @@ fi
 %attr(755,root,root) %{php_extensiondir}/readline.so
 %endif
 
-%if %{with recode}
-%files recode
-%defattr(644,root,root,755)
-%doc ext/recode/CREDITS
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/recode.ini
-%attr(755,root,root) %{php_extensiondir}/recode.so
-%endif
-
 %if %{with session}
 %files session
 %defattr(644,root,root,755)
This page took 0.585007 seconds and 4 git commands to generate.