X-Git-Url: https://git.tld-linux.org/?p=packages%2Fphp.git;a=blobdiff_plain;f=php.spec;h=e3598f9f896e942bcfadec70012e78c9e823f8f9;hp=7654d329bac0e6b489cdd9eff65c2d869769dce2;hb=e59f178bd07ce379ba67394098da351eb0f2737a;hpb=dc65169f5126a29ab28123c88061240406355f84 diff --git a/php.spec b/php.spec index 7654d32..e3598f9 100644 --- a/php.spec +++ b/php.spec @@ -1,3 +1,6 @@ +# TODO 5.5: +# - enable --with-fpm-systemd, but ensure it checks for sd_booted() +# - build with system libgd 2.1, see 73c5128 # TODO 5.4: # - do not remove PatchX: definitions until merged to HEAD, needed for tracking their state # - check php-sapi-ini-file.patch for safe mode removal @@ -61,6 +64,7 @@ %bcond_with mysqlnd # with mysqlnd support in mysql related extensions %bcond_without mysqli # without mysqli support (Requires mysql > 4.1) %bcond_without odbc # without ODBC extension module +%bcond_without opcache # without Enable Zend OPcache extension support %bcond_without openssl # without OpenSSL support and OpenSSL extension (module) %bcond_without pcre # without PCRE extension module %bcond_without pdo_sqlite # without PDO SQLite extension module @@ -124,9 +128,9 @@ ERROR: You need to select at least one Apache SAPI to build shared modules. %undefine with_filter %endif -%define rel 1 +%define rel 0.1 %define orgname php -%define ver_suffix 54 +%define ver_suffix 55 %define php_suffix %{!?with_default_php:%{ver_suffix}} Summary: PHP: Hypertext Preprocessor Summary(fr.UTF-8): Le langage de script embarque-HTML PHP @@ -135,13 +139,13 @@ Summary(pt_BR.UTF-8): A linguagem de script PHP Summary(ru.UTF-8): PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере Summary(uk.UTF-8): PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері Name: %{orgname}%{php_suffix} -Version: 5.4.17 +Version: 5.5.1 Release: %{rel}%{?with_type_hints:.th}%{?with_oci8:.oci} Epoch: 4 License: PHP Group: Libraries Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.bz2 -# Source0-md5: 1e027e99e2a874310fd518e87e3947af +# Source0-md5: e6520ba8f86e03451f1e9226ca2be681 Source2: %{orgname}-mod_%{orgname}.conf Source3: %{orgname}-cgi-fcgi.ini Source4: %{orgname}-apache.ini @@ -236,13 +240,12 @@ BuildRequires: freetds-devel >= 0.82 %endif BuildRequires: freetype-devel >= 2.0 %if %{with system_gd} -BuildRequires: gd-devel >= 2.0.28-4 -BuildRequires: gd-devel(imagerotate) = 5.2.0 +BuildRequires: gd-devel >= 2.1 %endif BuildRequires: gdbm-devel BuildRequires: gmp-devel %{?with_imap:BuildRequires: imap-devel >= 1:2007e-2} -%{?with_intl:BuildRequires: libicu-devel} +%{?with_intl:BuildRequires: libicu-devel >= 4.4} BuildRequires: libjpeg-devel BuildRequires: libltdl-devel >= 1.4 BuildRequires: libmcrypt-devel >= 2.4.4 @@ -273,6 +276,8 @@ BuildRequires: readline-devel BuildRequires: rpm >= 4.4.9-56 BuildRequires: rpm-build >= 4.4.0 BuildRequires: rpmbuild(macros) >= 1.566 +BuildRequires: tar >= 1:1.22 +BuildRequires: xz %if %{with sqlite3} || %{with pdo_sqlite} BuildRequires: sqlite3-devel >= 3.3.9 %endif @@ -299,19 +304,20 @@ 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 20100412 -%define zend_module_api 20100525 -%define zend_extension_api 220100525 +%define php_api_version 20121113 +%define zend_module_api 20121212 +%define zend_extension_api 220121212 # Extension versions %define bz2ver 1.0 %define enchantver 1.1.0 -%define fileinfover 1.0.5 +%define fileinfover 1.0.5-dev %define hashver 1.0 %define intlver 1.1.0 %define jsonver 1.2.1 +%define opcachever 7.0.2-dev %define pharver 2.0.1 -%define sqlite3ver 0.7 +%define sqlite3ver 0.7-dev %define zipver 1.11.0 %define zend_zts %{!?with_zts:0}%{?with_zts:1} @@ -1160,6 +1166,21 @@ Moduł PHP ze wsparciem dla ODBC. %description odbc -l pt_BR.UTF-8 Um módulo para aplicações PHP que usam ODBC. +%package opcache +Summary: Zend Optimizer+ - PHP code optimizer +Group: Libraries +URL: https://wiki.php.net/rfc/optimizerplus +Requires: %{name}-common = %{epoch}:%{version}-%{release} +Provides: php(opcache) = %{opcachever} + +%description opcache +The Zend OPcache provides faster PHP execution through opcode caching +and optimization. It improves PHP performance by storing precompiled +script bytecode in the shared memory. This eliminates the stages of +reading code from the disk and compiling it on future access. In +addition, it applies a few bytecode optimization patterns that make +code execution faster. + %package openssl Summary: OpenSSL extension module for PHP Summary(pl.UTF-8): Moduł OpenSSL dla PHP @@ -2032,6 +2053,12 @@ if test "$ver" != "%{jsonver}"; then : Update the jsonver macro and rebuild. exit 1 fi +ver=$(sed -n '/#define ACCELERATOR_VERSION /{s/.* "//;s/".*$//;p}' ext/opcache/ZendAccelerator.h) +if test "$ver" != "%{opcachever}"; then + : Error: Upstream Zend Opcachge version is now ${ver}, expecting %{opcachever}. + : Update the opcachever macro and rebuild. + exit 1 +fi ver=$(sed -rne 's,.*(.+),\1,p' ext/bz2/package.xml) if test "$ver" != "%{bz2ver}"; then : Error: Upstream BZIP2 version is now ${ver}, expecting %{bz2ver}. @@ -2209,6 +2236,7 @@ for sapi in $sapis; do --with-mysql=shared,%{!?with_mysqlnd:/usr}%{?with_mysqlnd:mysqlnd} \ %{?with_mysqli:--with-mysqli=shared,%{!?with_mysqlnd:/usr/bin/mysql_config}%{?with_mysqlnd:mysqlnd}} \ %{?with_oci8:--with-oci8=shared%{?with_instantclient:,instantclient,%{_libdir}}} \ + %{?with_opcache:--enable-opcache=shared} \ %{?with_openssl:--with-openssl=shared} \ %{?with_kerberos5:--with-kerberos} \ --with-tcadb=/usr \ @@ -2292,6 +2320,9 @@ install -d conf.d generate_inifiles() { for so in modules/*.so; do mod=$(basename $so .so) + ext=extension + # 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" @@ -2305,8 +2336,8 @@ generate_inifiles() { [ "$mod" = "mysqlnd" ] && conf="MySQLND.ini" echo "+ $conf" cat > conf.d/$conf <<-EOF - ; Enable $mod extension module - extension=$mod.so + ; Enable $mod $ext module + $ext=$mod.so EOF done } @@ -2615,6 +2646,7 @@ fi %extension_scripts mysqlnd %extension_scripts oci8 %extension_scripts odbc +%extension_scripts opcache %extension_scripts openssl %extension_scripts pcre %extension_scripts pdo @@ -2951,6 +2983,14 @@ fi %attr(755,root,root) %{php_extensiondir}/odbc.so %endif +%if %{with opcache} +%files opcache +%defattr(644,root,root,755) +%doc ext/opcache/README +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/opcache.ini +%attr(755,root,root) %{php_extensiondir}/opcache.so +%endif + %if %{with openssl} %files openssl %defattr(644,root,root,755)