From f659a2b291203b5da3168b9965beff18a93af6c6 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Tue, 31 Oct 2023 19:11:48 -0400 Subject: [PATCH] add(php, pear) fixes https://github.com/orgs/pkgxdev/discussions/839 --- projects/php.net/package.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/projects/php.net/package.yml b/projects/php.net/package.yml index 45842ad8..6d8c12cd 100644 --- a/projects/php.net/package.yml +++ b/projects/php.net/package.yml @@ -33,6 +33,7 @@ dependencies: libpng.org: '*' google.com/webp: '*' ijg.org: '*' + gnu.org/sed: ^4 # phpize requires this darwin: sourceware.org/bzip2: '*' zlib.net: '*' @@ -46,9 +47,22 @@ build: linux: gnu.org/make: '*' - script: | - ./configure $ARGS - make --jobs {{ hw.concurrency }} install + script: + - ./configure $ARGS + - make --jobs {{ hw.concurrency }} install + - run: | + sed -i.bak \ + -e's|^prefix=.*|prefix="$(dirname "$(dirname "$0")")"|g' \ + -e's|^datarootdir=.*|datarootdir="${prefix}/share"|g' \ + -e's|^ini_path=.*|ini_path="${prefix}/etc"|g' \ + -e's|^extension_dir='\''{{prefix}}\(.*\)'\''|extension_dir="${prefix}\1"|g' \ + -e's|^SED=.*|SED="$(dirname "$(dirname "$(dirname "$(dirname "$0")")")")/gnu.org/sed/v4/bin/sed"|g' \ + -e's|#{{prefix}}#|#$(dirname "$(dirname "$0")")#|g' \ + -e's|{{pkgx.prefix}}|${prefix}/../..|g' \ + php-config \ + phpize + rm php-config.bak phpize.bak + working-directory: ${{prefix}}/bin env: ARGS: - --prefix={{prefix}} @@ -72,6 +86,7 @@ build: - --enable-sysvmsg - --enable-sysvsem - --enable-sysvshm + - --with-pear - --with-curl - --with-external-pcre - --with-ffi @@ -107,6 +122,8 @@ build: - --with-ldap-sasl provides: + - bin/pear + - bin/pecl - bin/phar - bin/php - bin/php-cgi