diff --git a/php-8.1.yaml b/php-8.1.yaml index 7effca0..7c95c25 100644 --- a/php-8.1.yaml +++ b/php-8.1.yaml @@ -1,6 +1,6 @@ package: name: php-8.1 - version: 8.1.29 + version: 8.1.30 epoch: 0 description: "the PHP programming language" copyright: @@ -15,12 +15,15 @@ package: environment: contents: packages: + - aom-dev + - autoconf - bison - build-base - busybox - bzip2-dev - ca-certificates-bundle - curl-dev + - dav1d-dev - file - freetds - freetds-dev @@ -41,28 +44,33 @@ environment: - libzip - oniguruma-dev - openldap-dev + - openssf-compiler-options - openssl-dev - patch - postgresql-dev + - re2c - readline-dev - sqlite-dev - unixodbc-dev + - wget + environment: + CFLAGS: -Wno-incompatible-pointer-types pipeline: - - uses: fetch + - uses: git-checkout with: - uri: https://www.php.net/distributions/php-${{package.version}}.tar.gz - expected-sha256: 8b2609bf1d3173aa38269a9af21532c65f730aadd3051f9aae011eea9e246de5 - extract: false + repository: https://github.com/php/php-src + tag: php-${{package.version}} + expected-commit: 773c0eda4ac8181c59a6510a39c37710679277a4 - - name: Prepare Build Folder + - name: Patch to use C++17 (default) runs: | - mv php-${{package.version}}.tar.gz $HOME - tar zxf $HOME/php-${{package.version}}.tar.gz + # patching PHP_CXX_COMPILE_STDCXX to 17 + sed -i 's|PHP_CXX_COMPILE_STDCXX(11|PHP_CXX_COMPILE_STDCXX(17|' ext/intl/config.m4 - name: Configure runs: | - cd $HOME/php-${{package.version}} + ./buildconf --force EXTENSION_DIR=/usr/lib/php/modules ./configure \ --prefix=/usr \ --libdir=/usr/lib/php \ @@ -134,12 +142,9 @@ pipeline: --with-ffi=shared - uses: autoconf/make - with: - dir: $HOME/php-${{package.version}} - name: Make Install runs: | - cd $HOME/php-${{package.version}} INSTALL_ROOT=${{targets.destdir}} DESTDIR=${{targets.destdir}} make install mkdir -p "${{targets.destdir}}/bin" && ln -s /usr/bin/php "${{targets.destdir}}/bin/php" @@ -202,7 +207,7 @@ subpackages: pipeline: - runs: | mkdir -p "${{targets.subpkgdir}}/etc/php/conf.d" - mv $HOME/php-${{package.version}}/php.ini-production ${{targets.subpkgdir}}/etc/php/php.ini + mv $HOME/php.ini-production ${{targets.subpkgdir}}/etc/php/php.ini - range: extensions name: "${{package.name}}-${{range.key}}" @@ -229,9 +234,18 @@ subpackages: - runs: | export CONF_DIR="${{targets.subpkgdir}}/etc/php/conf.d" mkdir -p $CONF_DIR + order=10 prefix= [ "${{range.key}}" != "opcache" ] || prefix="zend_" - echo "${prefix}extension=${{range.key}}.so" > $CONF_DIR/"${{range.key}}.ini" + # Determine load order based on number of dependencies found in config.w32 + [ -f "ext/${{range.key}}/config.w32" ] && \ + deps=`sed -En "s/.*ADD_EXTENSION_DEP\('${{range.key}}', ([^)]+)\).*/\1/p" "ext/${{range.key}}/config.w32" \ + | tr -d "'," | tr ' ' '\n' \ + | sort -u \ + | while read -r dep; do + [ "$dep" = "true" ] || echo $dep + done | wc -w` + echo "${prefix}extension=${{range.key}}.so" > $CONF_DIR/"$((order+order*deps))-${{range.key}}.ini" - name: ${{package.name}}-dev description: PHP 8.1 development headers @@ -341,6 +355,7 @@ test: sudo -u $PGUSER pg_ctl -D /tmp/test_db -l /tmp/logfile start sudo -u $PGUSER createdb testdb psql -lqt | cut -d \| -f 1 | grep -qw testdb + php --help - name: "Test basic read/write operations" runs: | sudo -u $PGUSER psql -d testdb -c "CREATE TABLE test_table (id SERIAL PRIMARY KEY, test_value VARCHAR(50));"