Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-8.1/8.1.30 package update #459

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions php-8.1.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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 \
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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}}"
Expand All @@ -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
Expand Down Expand Up @@ -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));"
Expand Down