aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2021-01-21 15:21:32 +0200
committerAndy Postnikov <apostnikov@gmail.com>2021-01-22 21:02:24 +0000
commita466296ad4ed7462a679ddab45f2cd6893bcab9a (patch)
tree2708749ab806d49029c9024ab8ffda96104f8359
parente21eb19a86d81ffe81a86e2e6dbf60ac23aa9207 (diff)
downloadaports-a466296ad4ed7462a679ddab45f2cd6893bcab9a.tar.gz
aports-a466296ad4ed7462a679ddab45f2cd6893bcab9a.tar.bz2
aports-a466296ad4ed7462a679ddab45f2cd6893bcab9a.tar.xz
testing/php8-pdlib: new aport
-rw-r--r--testing/php8-pdlib/APKBUILD42
1 files changed, 42 insertions, 0 deletions
diff --git a/testing/php8-pdlib/APKBUILD b/testing/php8-pdlib/APKBUILD
new file mode 100644
index 0000000000..6e5c246877
--- /dev/null
+++ b/testing/php8-pdlib/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: goodspb <goodspb.luo@gmail.com>
+# Maintainer: Adriaan Groenenboom <agboom@pm.me>
+pkgname=php8-pdlib
+_extname=pdlib
+pkgver=1.0.2
+pkgrel=0
+pkgdesc="PHP 8 extension for Dlib"
+url="https://github.com/goodspb/pdlib"
+arch="all !ppc64le !mips !mips64" # build fails https://github.com/goodspb/pdlib/issues/19
+license="MIT"
+depends="php8-common dlib"
+makedepends="php8-dev php8-bz2"
+source="php-$_extname-$pkgver.tar.gz::https://github.com/goodspb/$_extname/archive/v$pkgver.tar.gz
+ https://github.com/goodspb/pdlib/commit/a31d3bc709321b784ecd93c983b476a0a298bfa0.patch"
+builddir="$srcdir/$_extname-$pkgver"
+
+build() {
+ phpize8
+ ./configure --prefix=/usr --with-php-config=php-config8
+ make
+}
+
+check() {
+ # Tests require bz2 extension which is not bundled
+ local _modules=/usr/lib/php8/modules
+ make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test \
+ TESTS=--show-diff SKIP_ONLINE_TESTS=1 \
+ PHP_TEST_SHARED_EXTENSIONS=" \
+ -d extension=$_modules/bz2.so \
+ -d extension=modules/$_extname.so"
+ php8 -dextension=modules/$_extname.so --ri $_extname
+}
+
+package() {
+ make INSTALL_ROOT="$pkgdir" install
+ local _confdir="$pkgdir"/etc/php8/conf.d
+ install -d $_confdir
+ echo "extension=$_extname" > $_confdir/$_extname.ini
+}
+
+sha512sums="7222eeaedad8bfe8d0deb327c4d1deaea172994cfb2f2d43fb10f6b862ccc56e05bb459e0d2c94ed79f222eed8eb7c1974c15f862549bf563b132b531acf1cd3 php-pdlib-1.0.2.tar.gz
+5a910e9fbdd79da1f46f008cacc32494f781ae46c857ea1ef06b98fcc81537e12e773b0948fbd8b7fb15c2cbd2fadd13bcc752344fdcba412fa6f8351162f5b4 a31d3bc709321b784ecd93c983b476a0a298bfa0.patch"