]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
- icu 67 rebuild
[packages/php.git] / php.spec
index fe0d2e956d0da03cf657ce73fdecf185ea220302..a60a6c18622cb3c7cbb85f1f59d6e3732709817f 100644 (file)
--- a/php.spec
+++ b/php.spec
 %bcond_without cgi             # disable CGI/FCGI SAPI
 %bcond_without fpm             # disable FPM SAPI
 %bcond_without litespeed       # build litespeed SAPI
-%bcond_with    milter          # disable Milter SAPI
 %bcond_without phpdbg          # disable phpdbg SAPI
 # - Extensions
 %bcond_without bcmath          # without bcmath extension module
-%bcond_without bz2             # without bz2 extension module
+%bcond_without bzip2           # without bz2 extension module
 %bcond_without calendar        # without calendar extension module
 %bcond_without ctype           # without ctype extension module
 %bcond_without curl            # without CURL extension module
@@ -90,7 +89,6 @@
 %bcond_without system_gd       # system gd
 %bcond_without webp            # Without WebP support in GD extension (imagecreatefromwebp)
 
-%define apxs1          /usr/sbin/apxs1
 %define        apxs2           /usr/sbin/apxs
 
 # segfaults on x32
 %undefine      with_mm
 %endif
 
-# milter requires ZTS
-%if %{with milter} && %{without zts}
-%undefine      with_milter
-%endif
-
 %if %{without odbc}
 %undefine      with_pdo_odbc
 %endif
 %undefine      with_pdo_sqlite
 %endif
 
-%define                subver beta1
-%define                rel     1
+%define                rel     3
 %define                orgname php
 %define                ver_suffix 74
 %define                php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -158,22 +150,22 @@ Summary(pt_BR.UTF-8):     A linguagem de script PHP
 Summary(ru.UTF-8):     PHP Версии 7 - язык препроцессирования HTML-файлов, выполняемый на сервере
 Summary(uk.UTF-8):     PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:          %{orgname}%{php_suffix}
-Version:       7.4.0
-Release:       1.%{subver}.%{rel}
+Version:       7.4.6
+Release:       1
 Epoch:         4
 # All files licensed under PHP version 3.01, except
 # Zend is licensed under Zend
 # TSRM is licensed under BSD
 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: fa3501cf158adce37359667383ddb672
+Source0:       https://php.net/distributions/%{orgname}-%{version}.tar.xz
+# Source0-md5: 523b7d61e5fa8ea15375f6d1f7e2876a
 Source1:       opcache.ini
 Source2:       %{orgname}-mod_php.conf
 Source3:       %{orgname}-cgi-fcgi.ini
 Source4:       %{orgname}-apache.ini
 Source5:       %{orgname}-cli.ini
+Source6:       timezone.ini
 Source10:      %{orgname}-fpm.init
 Source11:      %{orgname}-fpm.logrotate
 Source12:      %{orgname}-branch.sh
@@ -185,7 +177,6 @@ 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
 Patch10:       %{orgname}-ini.patch
 Patch11:       embed.patch
@@ -202,7 +193,6 @@ Patch29:    %{orgname}-fcgi-graceful.patch
 Patch31:       %{orgname}-fcgi-error_log-no-newlines.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
 Patch50:       extension-shared-optional-dep.patch
@@ -227,10 +217,6 @@ BuildRequires:     cyrus-sasl-devel >= 2
 BuildRequires: db-devel >= 4.0
 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
 %endif
@@ -240,13 +226,17 @@ BuildRequires:    gd-devel >= 2.1
 %endif
 BuildRequires: gdbm-devel
 BuildRequires: gmp-devel >= 4.2
+%{?with_kerberos5:BuildRequires:       heimdal-devel}
 %{?with_imap:BuildRequires:    imap-devel >= 1:2007e-2}
 %{?with_gcov:BuildRequires:    lcov}
 %{?with_fpm:BuildRequires:     libapparmor-devel}
+%{?with_argon2:BuildRequires:  libargon2-devel >= 20161029}
+%{?with_ffi:BuildRequires:     libffi-devel}
 %{?with_intl:BuildRequires:    libicu-devel >= 50.1}
 BuildRequires: libjpeg-devel
 BuildRequires: libltdl-devel >= 1.4
 BuildRequires: libpng-devel >= 1.0.8
+%{?with_sodium:BuildRequires:  libsodium-devel >= 1.0.8}
 %{?with_intl:BuildRequires:    libstdc++-devel}
 BuildRequires: libtool >= 2:2.4.6
 %{?with_webp:BuildRequires:    libwebp-devel}
@@ -296,7 +286,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _sysconfdir                     %{php_sysconfdir}
 
 # must be in sync with source. extra check ensuring that it is so is done in %%build
-%define                php_api_version         20190529
+%define                php_api_version         20190902
 %define                zend_module_api         %{php_api_version}
 %define                zend_extension_api      3%{zend_module_api}
 %define                php_pdo_api_version     20170320
@@ -307,10 +297,10 @@ BuildRoot:        %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                fileinfover     %{version}
 %define                hashver         %{version}
 %define                intlver         %{version}
-%define                jsonver         1.7.0
+%define                jsonver         %{version}
 %define                pharver         %{version}
 %define                sqlite3ver      %{version}
-%define                zipver          1.15.4
+%define                zipver          1.15.6
 %define                phpdbgver       %{version}
 %define                sodiumver       %{version}
 
@@ -841,7 +831,8 @@ support in image files.
 Moduł PHP dodający obsługę znaczników EXIF w plikach obrazków.
 
 %package ffi
-Summary:       %{modname} - Foreign Function Interface
+Summary:       Foreign Function Interface module for PHP
+Summary(pl.UTF-8):     Moduł Foreign Function Interface (interfejsu do obcych języków) dla PHP
 Group:         Libraries
 URL:           https://www.php.net/manual/en/book.ffi.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
@@ -851,6 +842,10 @@ Provides:  php(ffi) = %{version}
 FFI is a multi-platform extension for PHP that allows you to bind to
 functions from arbitrary shared libraries and call them.
 
+%description ffi -l pl.UTF-8
+FFI to wieloplatformowe rozszerzenie dla PHP pozwalające dowiązywać
+funkcje z dowolnych bibliotek współdzielonych i wywoływać je.
+
 %package fileinfo
 Summary:       libmagic bindings
 Summary(pl.UTF-8):     Wiązania do libmagic
@@ -1603,6 +1598,7 @@ Moduł PHP dodający obsługę gniazdek.
 
 %package sodium
 Summary:       Wrapper for the Sodium cryptographic library
+Summary(pl.UTF-8):     Interfejs do biblioteki kryptograficznej Sodium
 Group:         Libraries
 URL:           https://paragonie.com/book/pecl-libsodium
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
@@ -1611,6 +1607,9 @@ Provides: php(sodium) = %{sodiumver}
 %description sodium
 A simple, low-level PHP extension for libsodium.
 
+%description sodium -l pl.UTF-8
+Proste, niskopoziomowe rozszerzenie PHP wykorzystując libsodium.
+
 %package sqlite3
 Summary:       SQLite3 extension module for PHP
 Summary(pl.UTF-8):     Moduł SQLite3 dla PHP
@@ -1869,7 +1868,7 @@ compression support to PHP.
 Moduł PHP umożliwiający używanie kompresji zlib.
 
 %prep
-%setup -q -n %{orgname}-%{version}%{?subver}
+%setup -q -n %{orgname}-%{version}
 cp -p php.ini-production php.ini
 %patch0 -p1
 %patch1 -p1
@@ -1878,7 +1877,6 @@ cp -p php.ini-production php.ini
 %patch4 -p1
 
 %patch7 -p1
-%{?with_milter:%patch8 -p1}
 %patch9 -p1
 %patch10 -p1
 %patch14 -p1
@@ -1894,7 +1892,6 @@ cp -p php.ini-production php.ini
 %patch31 -p1
 %patch39 -p1
 %patch41 -p1
-%patch42 -p1
 %patch43 -p1
 %patch44 -p1
 %patch50 -p1
@@ -1911,6 +1908,10 @@ cp -p php.ini-production php.ini
 #%patch68 -p1 DROP or update to 7.0 APIs
 %patch71 -p1
 
+sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \
+      ext/ext_skel.php \
+      run-tests.php
+
 %{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
 
 # cleanup backups after patching
@@ -2066,8 +2067,8 @@ if test "$ver" != "%{zipver}"; then
        : Update the zipver macro and rebuild.
        exit 1
 fi
-ver=$(sed -n '/#define PHP_JSON_VERSION /{s/.* "//;s/".*$//;p}' ext/json/php_json.h)
-if test "$ver" != "%{jsonver}"; then
+ver=$(get_version PHP_JSON_VERSION ext/json/php_json.h)
+if test "$ver" != "PHP_VERSION"; then
        : Error: Upstream JSON version is now ${ver}, expecting %{jsonver}.
        : Update the jsonver macro and rebuild.
        exit 1
@@ -2110,7 +2111,7 @@ export PEAR_INSTALLDIR=%{php_pear_dir}
 # configure once (for faster debugging purposes)
 if [ ! -f _built-conf ]; then
        # now remove Makefile copies
-       rm -f Makefile.{cgi-fcgi,fpm,cli,apxs1,apxs2,litespeed,phpdbg,milter}
+       rm -f Makefile.{cgi-fcgi,fpm,cli,apxs2,litespeed,phpdbg}
 
        # Force use of system libtool:
        mv build/libtool.m4 build/libtool.m4.saved
@@ -2156,9 +2157,6 @@ apxs2
 %if %{with phpdbg}
 phpdbg
 %endif
-%if %{with milter}
-milter
-%endif
 "
 for sapi in $sapis; do
        : SAPI $sapi
@@ -2189,9 +2187,6 @@ for sapi in $sapis; do
        phpdbg)
                sapi_args='--enable-phpdbg %{?debug:--enable-phpdbg-debug}'
        ;;
-       milter)
-               sapi_args='--with-milter'
-       ;;
        esac
 
        %configure \
@@ -2211,6 +2206,7 @@ for sapi in $sapis; do
        --%{!?with_debug:dis}%{?with_debug:en}able-debug \
        %{?with_zts:--enable-maintainer-zts} \
        --enable-inline-optimization \
+       --enable-option-checking=fatal \
        %{__enable_disable bcmath bcmath shared} \
        %{__enable_disable calendar calendar shared} \
        %{__enable_disable ctype ctype shared} \
@@ -2260,7 +2256,7 @@ for sapi in $sapis; do
        --enable-tokenizer=shared \
        --enable-xml=shared \
        --enable-xmlreader=shared \
-       %{__with_without bz2 bz2 shared} \
+       %{__with_without bzip2 bz2 shared} \
        %{__with_without curl curl shared} \
        --with-db4 \
        %{__with_without iconv iconv shared} \
@@ -2336,10 +2332,6 @@ cp -af Makefile.cli Makefile
        PHPDBG_EXTRA_LIBS=-lreadline
 %endif
 
-%if %{with milter}
-%{__make} -f Makefile.milter milter
-%endif
-
 # CGI/FCGI
 %if %{with cgi}
 cp -pf php_config.h.cgi-fcgi main/php_config.h
@@ -2416,9 +2408,11 @@ exit $rc
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cgi}} \
+install -d \
+       $RPM_BUILD_ROOT%{_libdir}/{php,apache} \
+       $RPM_BUILD_ROOT%{_sysconfdir}/{conf,cgi-fcgi,cli,apache2handler}.d \
        $RPM_BUILD_ROOT{%{_sbindir},%{_bindir}} \
-       $RPM_BUILD_ROOT/etc/{apache/conf.d,httpd/conf.d} \
+       $RPM_BUILD_ROOT/etc/httpd/conf.d \
        $RPM_BUILD_ROOT%{_mandir}/man{1,8} \
 
 cp -pf php_config.h.cli main/php_config.h
@@ -2466,11 +2460,6 @@ libtool --mode=install install -p sapi/litespeed/php $RPM_BUILD_ROOT%{_sbindir}/
 %endif
 %endif
 
-%if %{with milter}
-%{__make} -f Makefile.milter install-milter \
-       INSTALL_ROOT=$RPM_BUILD_ROOT
-%endif
-
 libtool --mode=install install -p libphp_common.la $RPM_BUILD_ROOT%{_libdir}
 
 # install CGI/FCGI
@@ -2478,7 +2467,7 @@ libtool --mode=install install -p libphp_common.la $RPM_BUILD_ROOT%{_libdir}
 # install-cgi
 libtool --mode=install install -p sapi/cgi/php-cgi $RPM_BUILD_ROOT%{_bindir}/%{name}.cgi
 ln -sf %{name}.cgi $RPM_BUILD_ROOT%{_bindir}/%{name}.fcgi
-cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi-fcgi.ini
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/cgi-fcgi.d/php.ini
 %endif
 
 # install FCGI PM
@@ -2525,11 +2514,12 @@ echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
 ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php
 
 cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
-cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
+cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/timezone.ini
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/cli.d/php.ini
 
 %if %{with apache2}
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd/conf.d/70_mod_php.conf
-cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache2handler.ini
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache2handler.d/php.ini
 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp7.la
 %endif
 
@@ -2544,9 +2534,6 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
 cp -p conf.d/*.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
 cp -p %{_sourcedir}/opcache.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
 
-# per SAPI ini directories
-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}
 
@@ -2612,7 +2599,7 @@ if ! grep -q '^date.timezone[[:space:]]*=' %{_sysconfdir}/php.ini && [ -f /etc/s
        TIMEZONE=
        . /etc/sysconfig/timezone
        if [ "$TIMEZONE" ]; then
-               %{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/php.ini
+               %{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/conf.d/timezone.ini
        fi
 fi
 
@@ -2626,7 +2613,6 @@ fi
 # common package are very important for all this to work.
 
 # restart webserver at the end of transaction
-[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
 [ ! -f /etc/httpd/conf.d/??_mod_php.conf ] || %service -q httpd restart
 
 %triggerpostun common -- php-common < 4:5.3.28-7
@@ -2769,7 +2755,7 @@ fi
 %files -n apache-mod_%{name}-core
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/apache2handler.d
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache2handler.d/php.ini
 %attr(755,root,root) %{_libdir}/apache/libphp7-*.*.so
 %endif
 
@@ -2783,7 +2769,7 @@ fi
 %files cgi
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/cgi-fcgi.d
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cgi-fcgi.ini
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cgi-fcgi.d/php.ini
 %attr(755,root,root) %{_bindir}/%{name}.cgi
 %attr(755,root,root) %{_bindir}/%{name}.fcgi
 %endif
@@ -2797,7 +2783,7 @@ fi
 %files cli
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/cli.d
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cli.ini
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cli.d/php.ini
 %attr(755,root,root) %{_bindir}/php%{ver_suffix}
 %{_mandir}/man1/php%{ver_suffix}.1*
 
@@ -2829,18 +2815,13 @@ fi
 %{_mandir}/man1/phpdbg%{php_suffix}.1*
 %endif
 
-%if %{with milter}
-%files milter
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/php-milter
-%endif
-
 %files common
 %defattr(644,root,root,755)
 %doc EXTENSIONS LICENSE NEWS UPGRADING* Zend/{LICENSE.Zend,README*} php.ini-* .gdbinit
 %dir %{_sysconfdir}
 %dir %{_sysconfdir}/conf.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/timezone.ini
 %attr(755,root,root) %{_libdir}/libphp_common-*.so
 %dir %{php_extensiondir}
 
@@ -2866,7 +2847,7 @@ fi
 %attr(755,root,root) %{php_extensiondir}/bcmath.so
 %endif
 
-%if %{with bz2}
+%if %{with bzip2}
 %files bz2
 %defattr(644,root,root,755)
 %doc ext/bz2/CREDITS
This page took 0.040891 seconds and 4 git commands to generate.