From 3fa98621b22c28f99392878d8e82e1cee7ae1a9d Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Thu, 3 Dec 2020 20:22:08 +0100 Subject: [PATCH 1/3] php: update to 8.0.7 - Removes php-pear which is replaced by the package pear - Removes noop configure flags that only worked if we used a vendor gd (--with-freetype-dir, --with-png-dir, --with-jpeg-dir) - Removes the legacy --with-pcre-regex and replaces it with --with-external-pcre - Removes --with-icu-dir which is now fetched from pkg-config - Removes --with-libzip which is now used as default --- srcpkgs/php-pear | 1 - srcpkgs/php/patches/php-cross-config.patch | 4 +- srcpkgs/php/patches/php-opcache-cross.patch | 14 +++++++ srcpkgs/php/template | 42 +++++---------------- 4 files changed, 26 insertions(+), 35 deletions(-) delete mode 120000 srcpkgs/php-pear create mode 100644 srcpkgs/php/patches/php-opcache-cross.patch diff --git a/srcpkgs/php-pear b/srcpkgs/php-pear deleted file mode 120000 index fa557ad95d0a..000000000000 --- a/srcpkgs/php-pear +++ /dev/null @@ -1 +0,0 @@ -php \ No newline at end of file diff --git a/srcpkgs/php/patches/php-cross-config.patch b/srcpkgs/php/patches/php-cross-config.patch index d6af2c58cb25..24de8c58cbdd 100644 --- a/srcpkgs/php/patches/php-cross-config.patch +++ b/srcpkgs/php/patches/php-cross-config.patch @@ -10,7 +10,7 @@ INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -S PREFIX='$APXS_PREFIX' \ - -i -n php7" + -i -n php" else APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` @@ -6385,6 +6387,7 @@ IFS="- /. @@ -18,7 +18,7 @@ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -S SYSCONFDIR='$APXS_SYSCONFDIR' \ + -S PREFIX='$APXS_PREFIX' \ - -i -a -n php7" + -i -a -n php" fi @@ -57170,7 +57173,7 @@ $as_echo_n "checking for pg_config... " diff --git a/srcpkgs/php/patches/php-opcache-cross.patch b/srcpkgs/php/patches/php-opcache-cross.patch new file mode 100644 index 000000000000..5d8a8c5ceed5 --- /dev/null +++ b/srcpkgs/php/patches/php-opcache-cross.patch @@ -0,0 +1,14 @@ +diff --git a/configure b/configure.new +index 1159224b4c..29f763aa05 100755 +--- a/configure ++++ b/configure.new +@@ -51689,7 +51689,8 @@ $as_echo "$have_shm_ipc" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mmap() using MAP_ANON shared memory support" >&5 + $as_echo_n "checking for mmap() using MAP_ANON shared memory support... " >&6; } + if test "$cross_compiling" = yes; then : +- have_shm_mmap_anon=no ++$as_echo "#define HAVE_SHM_MMAP_ANON 1" >>confdefs.h ++ have_shm_mmap_anon=yes + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ diff --git a/srcpkgs/php/template b/srcpkgs/php/template index bdc35ee2d846..6afe151760f4 100644 --- a/srcpkgs/php/template +++ b/srcpkgs/php/template @@ -1,9 +1,9 @@ # Template file for 'php' pkgname=php -version=7.4.14 -revision=3 +version=8.0.7 +revision=1 hostmakedepends="bison pkg-config apache-devel" -makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel +makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel libsodium-devel libtidy5-devel libxslt-devel libzip-devel net-snmp-devel postgresql-libs-devel readline-devel sqlite-devel unixodbc-devel pcre2-devel @@ -13,7 +13,7 @@ maintainer="Steve Prybylski " license="PHP-3.01" homepage="https://www.php.net" distfiles="http://www.php.net/distributions/php-${version}.tar.xz" -checksum=f9f3c37969fcd9006c1dbb1dd76ab53f28c698a1646fa2dde8547c3f45e02886 +checksum=d5fc2e4fc780a32404d88c360e3e0009bc725d936459668e9c2ac992f2d83654 conf_files="/etc/php/php.ini" @@ -38,7 +38,6 @@ do_build() { --with-config-file-scan-dir=/etc/php/conf.d \ --disable-rpath \ --mandir=/usr/share/man \ - --with-pear=/usr/share/pear \ " local _phpextensions="--enable-bcmath=shared \ @@ -60,40 +59,36 @@ do_build() { --enable-mysqlnd \ --enable-gd=shared \ --with-external-gd \ - --with-zip=shared \ --with-ffi=shared \ --with-bz2=shared,$XBPS_CROSS_BASE/usr/ \ --with-curl=shared \ --with-db4=$XBPS_CROSS_BASE/usr \ --with-enchant=shared,$XBPS_CROSS_BASE/usr \ - --with-freetype-dir=$XBPS_CROSS_BASE/usr \ --with-gdbm=$XBPS_CROSS_BASE/usr \ --with-gettext=shared \ --with-gmp=shared \ --with-iconv=shared \ - --with-icu-dir=$XBPS_CROSS_BASE/usr \ - --with-jpeg-dir=$XBPS_CROSS_BASE/usr \ --with-ldap=shared,$XBPS_CROSS_BASE/usr \ --with-ldap-sasl \ - --with-libzip \ --with-sodium=shared \ --with-mhash \ --with-mysql-sock=/run/mysqld/mysqld.sock \ --with-mysqli=shared,mysqlnd \ --with-openssl=shared \ - --with-pcre-regex=$XBPS_CROSS_BASE/usr \ + --with-external-pcre \ + --without-pear \ --with-pdo-mysql=shared,mysqlnd \ --with-pdo-odbc=shared,unixODBC,$XBPS_CROSS_BASE/usr \ --with-pdo-pgsql=shared,$XBPS_CROSS_BASE/usr \ --with-pdo-sqlite=shared,$XBPS_CROSS_BASE/usr \ --with-pgsql=shared,$XBPS_CROSS_BASE/usr \ - --with-png-dir=$XBPS_CROSS_BASE/usr \ --with-readline=$XBPS_CROSS_BASE/usr \ --with-snmp=shared,$XBPS_CROSS_BASE/usr \ --with-sqlite3=shared,$XBPS_CROSS_BASE/usr \ --with-unixODBC=shared,$XBPS_CROSS_BASE/usr \ --with-xsl=shared,$XBPS_CROSS_BASE/usr \ --with-tidy=shared,$XBPS_CROSS_BASE/usr \ + --with-zip=shared \ --with-zlib \ ${configure_args} \ " @@ -180,10 +175,10 @@ php-cgi_package() { php-apache_package() { short_desc+=' - Apache SAPI' depends="php-${version}_${revision}" - conf_files="/etc/apache/extra/php7_module.conf" + conf_files="/etc/apache/extra/php8_module.conf" pkg_install() { - vinstall ${wrksrc}/build-apache/libs/libphp7.so 755 usr/libexec/httpd/modules - vinstall ${FILESDIR}/apache.conf 644 etc/apache/extra php7_module.conf + vinstall ${wrksrc}/build-apache/libs/libphp.so 755 usr/libexec/httpd/modules + vinstall ${FILESDIR}/apache.conf 644 etc/apache/extra php8_module.conf } } @@ -208,23 +203,6 @@ php-embed_package() { } } -php-pear_package() { - lib32disabled=yes - depends="php-${version}_${revision}" - short_desc+=' - PHP Extension and Application Repository' - conf_files="/etc/php/pear.conf" - pkg_install() { - cd ${wrksrc}/build - local _env="INSTALL_ROOT=${PKGDESTDIR}" - if [ -n "$CROSS_BUILD" ]; then - _env+=" PEAR_PHP=/usr/bin/php" - fi - make install-pear ${_env} - rm -rf ${PKGDESTDIR}/.{channels,depdb,depdblock,filemap,lock,registry} - rm -rf ${PKGDESTDIR}/usr/share/pear/.{channels,depdb,depdblock,filemap,lock,registry} - } -} - php-enchant_package() { lib32disabled=yes depends="php-${version}_${revision}" From ed08a335602c489a81ca5fc274395f01a38da5fb Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Thu, 3 Dec 2020 21:25:18 +0100 Subject: [PATCH 2/3] xdebug: update to 3.0.4 --- srcpkgs/xdebug/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/xdebug/template b/srcpkgs/xdebug/template index c9b33a8fb79b..9e1e2b897132 100644 --- a/srcpkgs/xdebug/template +++ b/srcpkgs/xdebug/template @@ -1,6 +1,6 @@ # Template file for 'xdebug' pkgname=xdebug -version=2.9.3 +version=3.0.4 revision=1 build_style=gnu-configure hostmakedepends="autoconf" @@ -10,7 +10,7 @@ maintainer="Alexander Mamay " license="PHP-3.0" homepage="http://xdebug.org" distfiles="http://xdebug.org/files/${pkgname}-${version,,}.tgz" -checksum=a63f567f2238d75a2244c2a4bd6f5abee817280b3567f9006c99481488dc977c +checksum=b27290491f4634b0cd3badfc3a2be98fb1e3c0c3710a706724d8b195baad72af if [ "$CROSS_BUILD" ]; then hostmakedepends+=" php-devel" From 649d9f9fea4058d550603a8e4fa7aca799f7c6bb Mon Sep 17 00:00:00 2001 From: eater <=@eater.me> Date: Sun, 27 Jun 2021 00:34:08 +0200 Subject: [PATCH 3/3] New package: pear-1.10.12 --- srcpkgs/pear/template | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 srcpkgs/pear/template diff --git a/srcpkgs/pear/template b/srcpkgs/pear/template new file mode 100644 index 000000000000..224e08ad3445 --- /dev/null +++ b/srcpkgs/pear/template @@ -0,0 +1,81 @@ +# Template file for 'pear' +pkgname=pear +version=1.10.12 +revision=1 +_version_xml_util=1.4.5 +_version_console_getopt=1.4.3 +_version_archive_tar=1.4.13 +_version_structures_graph=1.1.1 +_version_php_archive=0.14.0 +wrksrc="pear-core-${version}" +hostmakedepends="php tar" +depends="php" +conf_files="/etc/php/pear.conf" +short_desc="PEAR - PHP Extension and Application Repository" +maintainer="eater <=@eater.me>" +license="BSD-2-Clause" +homepage="https://pear.php.net/" +distfiles=" + https://github.com/pear/pear-core/archive/refs/tags/v${version}.tar.gz + http://download.pear.php.net/package/PEAR-${version}.tgz + http://download.pear.php.net/package/XML_Util-${_version_xml_util}.tgz + http://download.pear.php.net/package/Console_Getopt-${_version_console_getopt}.tgz + http://download.pear.php.net/package/Archive_Tar-${_version_archive_tar}.tgz + http://download.pear.php.net/package/Structures_Graph-${_version_structures_graph}.tgz + http://download.pear.php.net/package/PHP_Archive-${_version_php_archive}.tgz" +checksum="775e04b3897531852454638aa24c2a38627241c97884faf10ad9bf7ca9faf65a + df363c5e6091334c43f560eec2f220be2f8044eb5d422204a715adc4663ba923 + e0f8736cb47ce9dd32814de45425ff03ad55a72ba8bb757e42c456f861feedf6 + 54bdfb7c2c958cbd7e1e8f1b964b95c3bfbf3b2779052523011b4ee49d7dfacd + 2752e19121573a9e17be9514f855785df9d56768ebdeade85588913e502e829e + 3b19abac379883f095c11fe2e5550cb61691b868f3d96573f6ed564be82fa08e + 59fd3aead80bdd9fec6c232710754b92516a36c2845e0745b96c4aea9d2d5768" +skip_extraction="PEAR-${version}.tgz + XML_Util-${_version_xml_util}.tgz + Console_Getopt-${_version_console_getopt}.tgz + Archive_Tar-${_version_archive_tar}.tgz + Structures_Graph-${_version_structures_graph}.tgz + PHP_Archive-${_version_php_archive}.tgz" +replaces="php-pear>=0" + +post_extract() { + mkdir -p go-pear-tarballs/src; + for pear in ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.tgz; do + # PHP_Archive is only needed for creation + if grep -q 'PHP_Archive' <<< "$pear"; then + tar -C go-pear-tarballs/src -xf $pear + continue + else + tar --strip-components=1 -C go-pear-tarballs/src -xf $pear + fi + + pearname="$(basename "${pear}")" + + cp "${pear}" go-pear-tarballs/${pearname//tgz/tar.gz} + # the phar needs naked tar's + gunzip go-pear-tarballs/${pearname//tgz/tar.gz} + done + + # PHP_Archive classes are expected to be at PHP/Archive but it is not + mv go-pear-tarballs/src/PHP_Archive-${_version_php_archive} go-pear-tarballs/src/PHP +} + +post_patch() { + # PEAR would normally replace these, but we're pearless at this point + vsed -i 's:\(.\)@data_dir@/PHP_Archive/:__DIR__ . \1/../:;s:@API-VER@:1.1.0:' go-pear-tarballs/src/PHP/Archive/Creator.php +} + +do_build() { + php -d include_path=".:${wrksrc}/go-pear-tarballs/src" make-installpear-nozlib-phar.php +} + +do_install() { + mkdir -p ${DESTDIR}/usr/share/pear + INSTALL_ROOT="${DESTDIR}" php -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 -ddetect_unicode=0 -dextension=phar install-pear-nozlib.phar -d /usr/share/pear -b /usr/bin + + # clean up created database files + rm -rf ${DESTDIR}/.{channels,depdb,depdblock,filemap,lock,registry} + rm -rf ${DESTDIR}/usr/share/pear/.{channels,depdb,depdblock,filemap,lock,registry} + + vlicense LICENSE +}