From de2dde16dcd337d9af055860914170321ee089f1 Mon Sep 17 00:00:00 2001 From: Steve Prybylski Date: Sun, 28 Feb 2016 16:37:13 -0500 Subject: [PATCH] php: update to 7.0.3. --- srcpkgs/php-phpdbg | 1 + srcpkgs/php/patches/fix-crypt-sha.patch | 20 ----- srcpkgs/php/patches/fix-crypt.patch | 41 --------- srcpkgs/php/patches/php-fpm.patch | 13 +++ srcpkgs/php/patches/php.ini.patch | 30 +++---- srcpkgs/php/template | 108 ++++++++---------------- 6 files changed, 62 insertions(+), 151 deletions(-) create mode 120000 srcpkgs/php-phpdbg delete mode 100644 srcpkgs/php/patches/fix-crypt-sha.patch delete mode 100644 srcpkgs/php/patches/fix-crypt.patch create mode 100644 srcpkgs/php/patches/php-fpm.patch diff --git a/srcpkgs/php-phpdbg b/srcpkgs/php-phpdbg new file mode 120000 index 00000000000..fa557ad95d0 --- /dev/null +++ b/srcpkgs/php-phpdbg @@ -0,0 +1 @@ +php \ No newline at end of file diff --git a/srcpkgs/php/patches/fix-crypt-sha.patch b/srcpkgs/php/patches/fix-crypt-sha.patch deleted file mode 100644 index f02e5bfbd5a..00000000000 --- a/srcpkgs/php/patches/fix-crypt-sha.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ext/standard/config.m4.orig -+++ ext/standard/config.m4 -@@ -314,7 +314,7 @@ - fi - AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, $ac_result, [Whether the system supports MD5 salt]) - -- if test "$ac_cv_crypt_sha512" = "yes"; then -+ if test "$ac_cv_crypt_SHA512" = "yes"; then - ac_result=1 - ac_crypt_sha512=1 - else -@@ -323,7 +323,7 @@ - fi - AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt]) - -- if test "$ac_cv_crypt_sha256" = "yes"; then -+ if test "$ac_cv_crypt_SHA256" = "yes"; then - ac_result=1 - ac_crypt_sha256=1 - else diff --git a/srcpkgs/php/patches/fix-crypt.patch b/srcpkgs/php/patches/fix-crypt.patch deleted file mode 100644 index 03e1376ce7d..00000000000 --- a/srcpkgs/php/patches/fix-crypt.patch +++ /dev/null @@ -1,41 +0,0 @@ -Reported upstream: -https://bugs.php.net/bug.php?id=67512 - ---- ext/standard/crypt.c.orig 2014-06-25 13:10:38.930010191 -0300 -+++ ext/standard/crypt.c 2014-06-25 13:45:09.762124864 -0300 -@@ -228,18 +228,20 @@ - } - } - #else -- --# if defined(HAVE_CRYPT_R) && (defined(_REENTRANT) || defined(_THREAD_SAFE)) - { --# if defined(CRYPT_R_STRUCT_CRYPT_DATA) -+# if defined(HAVE_CRYPT_R) -+# if defined(CRYPT_R_STRUCT_CRYPT_DATA) - struct crypt_data buffer; - memset(&buffer, 0, sizeof(buffer)); --# elif defined(CRYPT_R_CRYPTD) -+# elif defined(CRYPT_R_CRYPTD) - CRYPTD buffer; --# else --# error Data struct used by crypt_r() is unknown. Please report. --# endif -+# else -+# error Data struct used by crypt_r() is unknown. Please report. -+# endif - crypt_res = crypt_r(password, salt, &buffer); -+# else -+ crypt_res = crypt(passwrd, salt); -+#endif - if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { - return FAILURE; - } else { -@@ -247,7 +249,6 @@ - return SUCCESS; - } - } --# endif - #endif - } - /* }}} */ diff --git a/srcpkgs/php/patches/php-fpm.patch b/srcpkgs/php/patches/php-fpm.patch new file mode 100644 index 00000000000..b477fd52183 --- /dev/null +++ b/srcpkgs/php/patches/php-fpm.patch @@ -0,0 +1,13 @@ +--- ./sapi/fpm/Makefile.frag.orig 2016-02-28 18:32:56.357946535 -0500 ++++ ./sapi/fpm/Makefile.frag 2016-02-28 18:33:05.809945555 -0500 +@@ -12,8 +12,8 @@ + + @echo "Installing PHP FPM config: $(INSTALL_ROOT)$(sysconfdir)/" && \ + $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d || : +- @$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default || : +- @$(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf.default || : ++ @$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf || : ++ @$(INSTALL_DATA) sapi/fpm/www.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.d/www.conf || : + + @echo "Installing PHP FPM man page: $(INSTALL_ROOT)$(mandir)/man8/" + @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8 diff --git a/srcpkgs/php/patches/php.ini.patch b/srcpkgs/php/patches/php.ini.patch index 87bbb95b3d2..8d09b9f2355 100644 --- a/srcpkgs/php/patches/php.ini.patch +++ b/srcpkgs/php/patches/php.ini.patch @@ -1,15 +1,15 @@ ---- php.ini-production.orig 2014-08-27 15:31:35.000000000 +0200 -+++ php.ini-production 2014-09-30 17:56:35.704994951 +0200 -@@ -296,7 +296,7 @@ serialize_precision = 17 - ; or per-virtualhost web server configuration file. This directive is - ; *NOT* affected by whether Safe Mode is turned On or Off. +--- ./php.ini-production.orig 2016-02-28 18:09:04.154094933 -0500 ++++ ./php.ini-production 2016-02-28 18:09:09.932094334 -0500 +@@ -291,7 +291,7 @@ + ; and below. This directive makes most sense if used in a per-directory + ; or per-virtualhost web server configuration file. ; http://php.net/open-basedir -;open_basedir = +open_basedir = /srv/http/:/srv/httpd/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/ ; This directive allows you to disable certain functions for security reasons. - ; It receives a comma-delimited list of function names. This directive is -@@ -709,7 +709,7 @@ default_charset = "UTF-8" + ; It receives a comma-delimited list of function names. +@@ -696,7 +696,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" @@ -18,7 +18,7 @@ ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" -@@ -732,7 +732,7 @@ user_dir = +@@ -719,7 +719,7 @@ ; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir @@ -27,14 +27,14 @@ ; On windows: ; extension_dir = "ext" -@@ -870,48 +870,48 @@ default_socket_timeout = 60 +@@ -857,46 +857,46 @@ ; If you only provide the name of the extension, PHP will look for it in its ; default extension directory. ; -; Windows Extensions -; Note that ODBC support is built in, so no dll is needed for it. --; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5) --; extension folders as well as the separate PECL DLL download (PHP 5). +-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+) +-; extension folders as well as the separate PECL DLL download (PHP 5+). -; Be sure to appropriately set the extension_dir directive. -; -;extension=php_bz2.dll @@ -49,7 +49,6 @@ -;extension=php_ldap.dll -;extension=php_mbstring.dll -;extension=php_exif.dll ; Must be after mbstring as it depends on it --;extension=php_mysql.dll -;extension=php_mysqli.dll -;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client -;extension=php_openssl.dll @@ -62,14 +61,13 @@ -;extension=php_pgsql.dll -;extension=php_shmop.dll - --; The MIBS data available in the PHP distribution must be installed. --; See http://www.php.net/manual/en/snmp.installation.php +-; The MIBS data available in the PHP distribution must be installed. +-; See http://www.php.net/manual/en/snmp.installation.php -;extension=php_snmp.dll - -;extension=php_soap.dll -;extension=php_sockets.dll -;extension=php_sqlite3.dll --;extension=php_sybase_ct.dll -;extension=php_tidy.dll -;extension=php_xmlrpc.dll -;extension=php_xsl.dll @@ -89,9 +87,7 @@ +;extension=intl.so +;extension=ldap.so +;extension=mcrypt.so -+;extension=mssql.so +;extension=mysqli.so -+;extension=mysql.so +;extension=odbc.so +;zend_extension=opcache.so +;extension=openssl.so diff --git a/srcpkgs/php/template b/srcpkgs/php/template index 90450501a68..2ba8f611416 100644 --- a/srcpkgs/php/template +++ b/srcpkgs/php/template @@ -1,6 +1,6 @@ # Template build file for 'php' pkgname=php -version=5.6.18 +version=7.0.3 revision=1 short_desc="An HTML-embedded scripting language" license="PHP" @@ -13,8 +13,8 @@ makedepends="postgresql-libs-devel libldap-devel libvpx-devel sqlite-devel gmp-devel gdbm-devel freetype-devel apache-devel tidy-devel readline-devel libmysqlclient-devel" conf_files="/etc/php/php.ini" -distfiles="http://de1.php.net/distributions/php-${version}.tar.xz" -checksum=54dd9106c3469bc7028644d72ac140af00655420bbaaf4a742a64e9ed02ec1b0 +distfiles="http://www.php.net/distributions/php-${version}.tar.gz" +checksum=5521df8db153aba35c90cf1a1829106b6bbdac32425216d440f9cc29f00a7c08 # Package build options nocross=yes @@ -32,7 +32,7 @@ do_build() { --with-config-file-scan-dir=/etc/php/conf.d \ --disable-rpath \ --mandir=/usr/share/man \ - --without-pear \ + --with-pear=/usr/share/pear \ " local _phpextensions="--enable-bcmath=shared \ @@ -43,6 +43,7 @@ do_build() { --enable-intl=shared \ --enable-mbstring \ --enable-opcache \ + --enable-pcntl \ --enable-phar=shared \ --enable-posix=shared \ --enable-shmop=shared \ @@ -69,7 +70,6 @@ do_build() { --with-ldap-sasl \ --with-mcrypt=shared \ --with-mhash \ - --with-mssql=shared,/usr \ --with-mysql-sock=/run/mysqld/mysqld.sock \ --with-mysql=shared,mysqlnd \ --with-mysqli=shared,mysqlnd \ @@ -81,6 +81,7 @@ do_build() { --with-pdo-sqlite=shared,/usr \ --with-pgsql=shared \ --with-png-dir=/usr \ + --with-readline \ --with-snmp=shared \ --with-sqlite3=shared,/usr \ --with-unixODBC=shared,/usr \ @@ -96,71 +97,32 @@ do_build() { PEAR_INSTALLDIR=/usr/share/pear export PEAR_INSTALLDIR - # php - mkdir -p build-php - cd build-php + # cgi,cli,embed,fcgi,fpm + mkdir -p build + cd build ln -s ${wrksrc}/configure ./configure ${_phpconfig} \ - --disable-cgi \ - --with-readline \ - --enable-pcntl \ - ${_phpextensions} - make ${makejobs} - - # cgi and fcgi - # reuse the previous run; this will save us a lot of time - cp -a ${wrksrc}/build-php ${wrksrc}/build-cgi - cd ${wrksrc}/build-cgi - ./configure ${_phpconfig} \ - --disable-cli \ --enable-cgi \ - ${_phpextensions} - make ${makejobs} - - # apache - cp -a ${wrksrc}/build-php ${wrksrc}/build-apache - cd ${wrksrc}/build-apache - ./configure ${_phpconfig} \ - --disable-cli \ - --with-apxs2 \ - ${_phpextensions} - make ${makejobs} - - # fpm - cp -a ${wrksrc}/build-php ${wrksrc}/build-fpm - cd ${wrksrc}/build-fpm - ./configure ${_phpconfig} \ - --disable-cli \ --enable-fpm \ --with-fpm-user=http \ --with-fpm-group=http \ - ${_phpextensions} - make ${makejobs} - - # embed - cp -a ${wrksrc}/build-php ${wrksrc}/build-embed - cd ${wrksrc}/build-embed - ./configure ${_phpconfig} \ - --disable-cli \ --enable-embed=shared \ ${_phpextensions} make ${makejobs} - # pear - cp -a ${wrksrc}/build-php ${wrksrc}/build-pear - cd ${wrksrc}/build-pear + # apache + # reuse the previous run; this will save us a lot of time + cp -a ${wrksrc}/build ${wrksrc}/build-apache + cd ${wrksrc}/build-apache ./configure ${_phpconfig} \ - --disable-cgi \ - --with-readline \ - --enable-pcntl \ - --with-pear \ + --with-apxs2 \ ${_phpextensions} make ${makejobs} } do_install() { - cd ${wrksrc}/build-php - make INSTALL_ROOT=${DESTDIR} install + cd ${wrksrc}/build + make INSTALL_ROOT=${DESTDIR} install-{modules,cli,build,headers,programs,pharcmd} # install php.ini vinstall ${wrksrc}/php.ini-production 644 etc/php php.ini @@ -180,21 +142,31 @@ php-devel_package() { } } +php-phpdbg_package() { + short_desc+=" - interactive debugger" + depends="php-${version}_${revision}" + pkg_install() { + cd ${wrksrc}/build + make INSTALL_ROOT=${PKGDESTDIR} install-phpdbg + } +} + php-cgi_package() { short_desc+=' - CGI and FCGI SAPI' depends="php-${version}_${revision}" pkg_install() { - vbin ${wrksrc}/build-cgi/sapi/cgi/php-cgi + cd ${wrksrc}/build + make INSTALL_ROOT=${PKGDESTDIR} install-cgi } } php-apache_package() { short_desc+=' - Apache SAPI' depends="php-${version}_${revision}" - conf_files="/etc/httpd/extra/php5_module.conf" + conf_files="/etc/httpd/extra/php7_module.conf" pkg_install() { - vinstall ${wrksrc}/build-apache/libs/libphp5.so 755 usr/libexec/httpd/modules - vinstall ${FILESDIR}/apache.conf 644 etc/httpd/extra php5_module.conf + vinstall ${wrksrc}/build-apache/libs/libphp7.so 755 usr/libexec/httpd/modules + vinstall ${FILESDIR}/apache.conf 644 etc/httpd/extra php7_module.conf } } @@ -204,9 +176,8 @@ php-fpm_package() { conf_files="/etc/php/php-fpm.conf" make_dirs="/etc/php/fpm.d 0755 root root" pkg_install() { - vbin ${wrksrc}/build-fpm/sapi/fpm/php-fpm - vman ${wrksrc}/build-fpm/sapi/fpm/php-fpm.8 - vinstall ${wrksrc}/build-fpm/sapi/fpm/php-fpm.conf 644 etc/php + cd ${wrksrc}/build + make INSTALL_ROOT=${PKGDESTDIR} install-fpm vsv php-fpm } } @@ -216,8 +187,8 @@ php-embed_package() { depends="php-${version}_${revision}" short_desc+=' - Embed SAPI' pkg_install() { - vinstall ${wrksrc}/build-embed/libs/libphp5.so 755 usr/lib - vinstall ${wrksrc}/sapi/embed/php_embed.h 644 usr/include/php/sapi/embed + cd ${wrksrc}/build + make INSTALL_ROOT=${PKGDESTDIR} PHP_SAPI=embed install-sapi } } @@ -227,7 +198,7 @@ php-pear_package() { short_desc+=' - PHP Extension and Application Repository' conf_files="/etc/php/pear.conf" pkg_install() { - cd ${wrksrc}/build-pear + cd ${wrksrc}/build make install-pear INSTALL_ROOT=${PKGDESTDIR} rm -rf ${PKGDESTDIR}/.{channels,depdb,depdblock,filemap,lock,registry} rm -rf ${PKGDESTDIR}/usr/share/pear/.{channels,depdb,depdblock,filemap,lock,registry} @@ -279,15 +250,6 @@ php-mcrypt_package() { } } -php-mssql_package() { - lib32disabled=yes - depends="php-${version}_${revision}" - short_desc+=' - FreeTDS (MSSQL) module' - pkg_install() { - vmove "usr/lib/php/modules/*mssql*.so" - } -} - php-mysql_package() { lib32disabled=yes depends="php-${version}_${revision}"