From 605fb58bacc804f2e2605a0f7af0d5f12afef2b3 Mon Sep 17 00:00:00 2001 From: Andy Postnikov Date: Fri, 20 Aug 2021 05:24:42 +0300 Subject: community/php7: optimize build time - build phpdbg-webhelper sapi with embed separate from apache2 - polish build arguments - remove -static package (100MB) --- community/php7/APKBUILD | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD index 5d4e040c676..d692e3726e3 100644 --- a/community/php7/APKBUILD +++ b/community/php7/APKBUILD @@ -26,7 +26,7 @@ pkgname=php7 _pkgreal=php pkgver=7.4.22 -pkgrel=0 +pkgrel=1 _apiver=20190902 _suffix=${pkgname#php} # Is this package the default (latest) PHP version? @@ -84,7 +84,7 @@ makedepends=" " provides="$pkgname-cli php-cli php" # for backward compatibility provider_priority=100 -subpackages="$pkgname-static $pkgname-dev $pkgname-dbg $pkgname-doc +subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-phpdbg $pkgname-apache2 $pkgname-embed $pkgname-cgi $pkgname-fpm $pkgname-pear::noarch @@ -297,7 +297,6 @@ _build() { --localstatedir=/var \ --with-layout=GNU \ --with-pic \ - --with-pear=/usr/share/$pkgname \ --with-config-file-path=/etc/$pkgname \ --with-config-file-scan-dir=$_extension_confd \ --disable-short-tags \ @@ -330,7 +329,6 @@ _build() { --with-imap-ssl \ --enable-intl=shared \ --enable-json=shared \ - --with-kerberos \ --with-ldap=shared \ --with-ldap-sasl \ --with-libedit \ @@ -341,6 +339,7 @@ _build() { --enable-mysqlnd=shared \ --enable-opcache=shared \ --with-openssl=shared \ + --with-kerberos \ --with-system-ciphers \ --with-password-argon2 \ --enable-pcntl=shared \ @@ -383,21 +382,16 @@ _build() { } build() { - # phpdbg - _build --enable-phpdbg \ - --enable-phpdbg-webhelper \ - --disable-cgi \ - --disable-cli - - # apache2 module + # apache2 SAPIs because not fixed https://bugs.php.net/bug.php?id=52419 _build --disable-phpdbg \ --disable-cgi \ - --disable-cli \ --with-apxs2 mv libs/libphp$_suffix.so sapi/apache2handler/mod_php$_suffix.so - # cgi, cli, fpm, embed, litespeed - _build --disable-phpdbg \ + # cgi, cli, fpm, embed, pear + _build --enable-phpdbg \ + --enable-phpdbg-webhelper \ + --with-pear=/usr/share/$pkgname \ --enable-fpm \ --enable-embed } @@ -451,7 +445,6 @@ package() { dev() { default_dev replaces="php-dev" - depends="$depends $pkgname-static" cd "$pkgdir" @@ -494,8 +487,7 @@ phpdbg() { pkgdesc="Interactive PHP$_suffix debugger" provides="php-phpdbg" - install -Dm755 "$builddir"/sapi/phpdbg/phpdbg \ - "$subpkgdir"/usr/bin/phpdbg$_suffix + amove usr/bin/phpdbg$_suffix if [ "$_default_php" = yes ]; then ln -s phpdbg$_suffix "$subpkgdir"/usr/bin/phpdbg -- cgit v1.2.3