]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
Rename --enable-libxml to --with-libxml to meet naming guidelines
[packages/php.git] / php.spec
index c3cb54eb3d0b2bd4e463774550751aa3f8b0afe3..cc74c0ab07377dbb3f2821f40cbf30c161229743 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -1,5 +1,7 @@
 # NOTES
 # - mysqlnd driver doesn't support reconnect: https://bugs.php.net/bug.php?id=52561
+# TODO 7.4:
+# - follow upstream: drop spl, pcre, hash subpackages (tired of maintaining them)
 # TODO 7.3:
 # - branch php-7.2 and merge dev-7.3 into head once official announcement ready
 # TODO 7.2:
@@ -15,7 +17,6 @@
 #   - 2.3M fileinfo.so php-fileinfo-5.3.16-1.x86_64
 #   -  13K fileinfo.so php-pecl-fileinfo-1.0.4-8.amd64
 # - ttyname_r() misdetected http://bugs.php.net/bug.php?id=48820
-# - wddx: restore session support (not compiled in due DL extension check)
 # - modularize standard (output from pure php -m)?
 # - some mods should be shared:
 #$ php -m
 %bcond_without sqlite2         # without SQLite extension module
 %bcond_without sqlite3         # without SQLite3 extension module
 %bcond_without tidy            # without Tidy extension module
-%bcond_without wddx            # without WDDX extension module
 %bcond_without xmlrpc          # without XML-RPC extension module
-%bcond_without xsl             # without xsl extension module
+%bcond_without xsl                     # without xsl extension module
+%bcond_without zip                     # without zip extension module
 # extensions options
 %bcond_without argon2          # argon2 password hashing
 %bcond_without instantclient   # build Oracle oci8 extension module against oracle-instantclient package
 %bcond_with    interbase_inst  # use InterBase install., not Firebird  (BR: proprietary libs)
 %bcond_with    mm              # without mm support for session storage
 %bcond_without system_gd       # system gd
-%bcond_without system_libzip   # system libzip
 %bcond_without webp            # Without WebP support in GD extension (imagecreatefromwebp)
 
 %define apxs1          /usr/sbin/apxs1
 %undefine      with_filter
 %endif
 
-%define                subver %{nil}
+%define                subver alpha1
 %define                orgname php
-%define                ver_suffix 73
+%define                ver_suffix 74
 %define                php_suffix %{!?with_default_php:%{ver_suffix}}
 Summary:       PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):     Le langage de script embarque-HTML PHP
@@ -156,17 +156,17 @@ 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.3.0
-Release:       2
+Version:       7.4.0
+Release:       0.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://downloads.php.net/~cmb/php-%{version}%{subver}.tar.xz
-Source0:       https://php.net/distributions/%{orgname}-%{version}.tar.xz
-# Source0-md5: 6b58a59106b0da4fdcba3bcf12cc3ca5
+#Source0:      https://php.net/distributions/%{orgname}-%{version}.tar.xz
+Source0:       https://downloads.php.net/~derick/php-%{version}%{subver}.tar.xz
+# Source0-md5: 29592e9a73c0ae615c4b7e2b4761184f
 Source1:       opcache.ini
 Source2:       %{orgname}-mod_php.conf
 Source3:       %{orgname}-cgi-fcgi.ini
@@ -182,7 +182,6 @@ Patch1:             %{orgname}-pldlogo.patch
 Patch2:                %{orgname}-mail.patch
 Patch3:                %{orgname}-link-libs.patch
 Patch4:                intl-stdc++.patch
-Patch5:                %{orgname}-filter-shared.patch
 
 Patch7:                %{orgname}-sapi-ini-file.patch
 Patch8:                milter.patch
@@ -228,9 +227,9 @@ URL:                http://php.net/
 %{?with_pspell:BuildRequires:  aspell-devel >= 2:0.50.0}
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake >= 1.4d
-BuildRequires: bison
+BuildRequires: bison >= 3.0.0
 BuildRequires: bzip2-devel >= 1.0.0
-%{?with_curl:BuildRequires:    curl-devel >= 7.12.0}
+%{?with_curl:BuildRequires:    curl-devel >= 7.15.5}
 BuildRequires: cyrus-sasl-devel >= 2
 BuildRequires: db-devel >= 4.0
 BuildRequires: elfutils-devel
@@ -263,7 +262,7 @@ BuildRequires:      libtool >= 1.4.3
 %endif
 BuildRequires: libxml2-devel >= 1:2.7.6-4
 %{?with_xsl:BuildRequires:     libxslt-devel >= 1.1.0}
-%{?with_system_libzip:BuildRequires:   libzip-devel >= 1.3.1}
+%{?with_zip:BuildRequires:     libzip-devel >= 1.3.1}
 %{?with_snmp:%{?with_tests:BuildRequires:      mibs-net-snmp}}
 %{?with_mm:BuildRequires:      mm-devel >= 1.3.0}
 %{!?with_mysqli:BuildRequires: mysql-devel >= 4.1.13}
@@ -308,9 +307,9 @@ 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         20180731
-%define                zend_module_api         20180731
-%define                zend_extension_api      320180731
+%define                php_api_version         20190529
+%define                zend_module_api         %{php_api_version}
+%define                zend_extension_api      3%{zend_module_api}
 %define                php_pdo_api_version     20170320
 
 # Extension versions
@@ -323,7 +322,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                pharver         %{version}
 %define                sqlite3ver      %{version}
 %define                zipver          1.15.4
-%define                phpdbgver       0.5.0
+%define                phpdbgver       %{version}
 %define                sodiumver       %{version}
 
 %define                _zend_zts               %{!?with_zts:0}%{?with_zts:1}
@@ -1823,27 +1822,6 @@ support.
 %description tokenizer -l pl.UTF-8
 Moduł PHP dodający obsługę tokenizera do PHP.
 
-%package wddx
-Summary:       wddx extension module for PHP
-Summary(pl.UTF-8):     Moduł wddx dla PHP
-Group:         Libraries
-URL:           http://php.net/manual/en/book.wddx.php
-Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-# - wddx doesn't require session as it's disabled at compile time:
-#   if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
-#   see also php.spec#rev1.120.2.22
-#Requires:     %{name}-session = %{epoch}:%{version}-%{release}
-Requires:      %{name}-xml = %{epoch}:%{version}-%{release}
-Provides:      php(wddx)
-Obsoletes:     php-wddx < 4:5.3.28-7
-
-%description wddx
-This is a dynamic shared object (DSO) for PHP that will add wddx
-support.
-
-%description wddx -l pl.UTF-8
-Moduł PHP umożliwiający korzystanie z wddx.
-
 %package xml
 Summary:       XML extension module for PHP
 Summary(pl.UTF-8):     Moduł XML dla PHP
@@ -1947,7 +1925,7 @@ Summary(pl.UTF-8):        Zarządzanie archiwami zip
 Group:         Libraries
 URL:           http://php.net/manual/en/book.zip.php
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
-%{?with_system_libzip:Requires:        libzip >= 1.3.1}
+Requires:      libzip >= 1.3.1
 Provides:      php(zip) = %{zipver}
 Obsoletes:     php-pecl-zip < %{zipver}
 Obsoletes:     php-zip < 4:5.3.28-7
@@ -1983,7 +1961,6 @@ cp -p php.ini-production php.ini
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
 
 %patch7 -p1
 %{?with_milter:%patch8 -p1}
@@ -2040,7 +2017,6 @@ find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 %{__rm} ext/recode/config9.m4
 
 # remove all bundled libraries not to link with them accidentally
-%{__rm} -r ext/sqlite3/libsqlite
 #%{__rm} -r ext/bcmath/libbcmath
 #%{__rm} -r ext/date/lib
 #%{__rm} -r ext/fileinfo/libmagic
@@ -2049,7 +2025,6 @@ 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/mbstring/oniguruma
 %{__rm} -r ext/pcre/pcre2lib
 #%{__rm} -r ext/soap/interop
 %{__rm} -r ext/xmlrpc/libxmlrpc
@@ -2194,8 +2169,8 @@ if test "$ver" != "%{jsonver}"; then
        : Update the jsonver macro and rebuild.
        exit 1
 fi
-ver=$(sed -n '/#define PHPDBG_VERSION /{s/.* "//;s/".*$//;p}' sapi/phpdbg/phpdbg.h)
-if test "$ver" != "%{phpdbgver}"; then
+ver=$(get_version PHPDBG_VERSION sapi/phpdbg/phpdbg.h)
+if test "$ver" != "PHP_VERSION"; then
        : Error: Upstream phpdbg version is now ${ver}, expecting %{phpdbgver}.
        : Update the phpdbgver macro and rebuild.
        exit 1
@@ -2228,8 +2203,13 @@ export EXTENSION_DIR="%{php_extensiondir}"
 if [ ! -f _built-conf ]; then
        # now remove Makefile copies
        rm -f Makefile.{cgi-fcgi,fpm,cli,apxs1,apxs2,litespeed,phpdbg,milter}
+
+       # Force use of system libtool:
+       mv build/libtool.m4 build/libtool.m4.saved
+       cat %{_aclocaldir}/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 > build/libtool.m4
        %{__libtoolize}
        %{__aclocal}
+
        cp -f /usr/share/automake/config.* .
        ./buildconf --force
        touch _built-conf
@@ -2333,7 +2313,7 @@ for sapi in $sapis; do
        %{__enable_disable fileinfo fileinfo shared} \
        %{__enable_disable ftp ftp shared} \
        %{?with_intl:--enable-intl=shared} \
-       --enable-libxml \
+       --with-libxml \
        %{__enable_disable mbstring mbstring shared,all} \
        --with-onig=/usr \
        --enable-mbregex \
@@ -2373,7 +2353,6 @@ for sapi in $sapis; do
        --enable-sockets=shared \
        %{__with_without sodium sodium shared} \
        --enable-tokenizer=shared \
-       %{?with_wddx:--enable-wddx=shared} \
        --enable-xml=shared \
        --enable-xmlreader=shared \
        %{__with_without bz2 bz2 shared} \
@@ -2416,8 +2395,7 @@ for sapi in $sapis; do
        %{?with_xsl:--with-xsl=shared} \
        --with-zlib=shared \
        --with-zlib-dir=shared,/usr \
-       %{?with_system_libzip:--with-libzip} \
-       --enable-zip=shared,/usr \
+       %{?with_zip:--enable-zip=shared,/usr --with-libzip} \
 
        # save for debug
        cp -f Makefile Makefile.$sapi
@@ -2491,8 +2469,6 @@ generate_inifiles() {
                # opcache.so is zend extension
                nm $so | grep -q zend_extension_entry && ext=zend_extension
                conf="$mod.ini"
-               # xml needs to be loaded before wddx
-               [ "$mod" = "wddx" ] && conf="xml_$mod.ini"
                # pre needs to be loaded before SPL
                [ "$mod" = "pcre" ] && conf="PCRE.ini"
                # spl needs to be loaded before mysqli
@@ -2727,6 +2703,8 @@ sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_c
 # 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}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -2901,7 +2879,6 @@ fi \
 %extension_scripts sysvshm
 %extension_scripts tidy
 %extension_scripts tokenizer
-%extension_scripts wddx
 %extension_scripts xml
 %extension_scripts xmlreader
 %extension_scripts xmlrpc
@@ -3015,8 +2992,9 @@ fi
 %files devel
 %defattr(644,root,root,755)
 %doc CODING_STANDARDS README.{EXT_SKEL,PARAMETER_PARSING_API,SELF-CONTAINED-EXTENSIONS,STREAMS,SUBMITTING_PATCH,TESTING,UNIX-BUILD-SYSTEM,input_filter}
-%attr(755,root,root) %{_bindir}/phpize
+%attr(755,root,root) %{_bindir}/ext_skel.php
 %attr(755,root,root) %{_bindir}/php-config
+%attr(755,root,root) %{_bindir}/phpize
 %attr(755,root,root) %{_libdir}/libphp_common.so
 %{_libdir}/libphp_common.la
 %{_includedir}/php
@@ -3503,14 +3481,6 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/tokenizer.ini
 %attr(755,root,root) %{php_extensiondir}/tokenizer.so
 
-%if %{with wddx}
-%files wddx
-%defattr(644,root,root,755)
-%doc ext/wddx/CREDITS
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*wddx.ini
-%attr(755,root,root) %{php_extensiondir}/wddx.so
-%endif
-
 %files xml
 %defattr(644,root,root,755)
 %doc ext/xml/CREDITS
@@ -3545,12 +3515,14 @@ fi
 %attr(755,root,root) %{php_extensiondir}/xsl.so
 %endif
 
+%if %{with zip}
 %files zip
 %defattr(644,root,root,755)
 %doc ext/zip/CREDITS
 %doc ext/zip/examples
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/zip.ini
 %attr(755,root,root) %{php_extensiondir}/zip.so
+%endif
 
 %files zlib
 %defattr(644,root,root,755)
This page took 0.058838 seconds and 4 git commands to generate.