aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-pdlib
diff options
context:
space:
mode:
authorAdriaan Groenenboom <agboom@pm.me>2019-11-28 13:38:30 +0000
committerAndy Postnikov <apostnikov@gmail.com>2019-11-30 23:52:24 +0200
commit2b686951058b3c3cceb9196e824225792f03e8c5 (patch)
treefcdc22af549cd23ece59a484c7104039b943bf60 /testing/php7-pdlib
parenta24194d3e281a0504ec14c58ad39c20529648143 (diff)
downloadaports-2b686951058b3c3cceb9196e824225792f03e8c5.tar.bz2
aports-2b686951058b3c3cceb9196e824225792f03e8c5.tar.xz
testing/php7-pdlib: new aport
Diffstat (limited to 'testing/php7-pdlib')
-rw-r--r--testing/php7-pdlib/APKBUILD42
1 files changed, 42 insertions, 0 deletions
diff --git a/testing/php7-pdlib/APKBUILD b/testing/php7-pdlib/APKBUILD
new file mode 100644
index 0000000000..03d6e87bfa
--- /dev/null
+++ b/testing/php7-pdlib/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: goodspb <goodspb.luo@gmail.com>
+# Maintainer: Adriaan Groenenboom <agboom@pm.me>
+pkgname=php7-pdlib
+_pkgreal=pdlib
+pkgver=1.0
+pkgrel=0
+pkgdesc="PHP extension for Dlib"
+url="https://github.com/goodspb/pdlib"
+arch="all"
+license="MIT"
+depends="php7-common dlib"
+makedepends="php7-dev pkgconf php7-bz2"
+source="$pkgname-$pkgver.tar.gz::https://github.com/goodspb/$_pkgreal/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgreal-$pkgver"
+
+build() {
+ phpize7
+ ./configure --prefix=/usr --with-php-config=php-config7
+ make
+}
+
+check() {
+ # Remove broken tests https://github.com/goodspb/pdlib/issues/14
+ rm \
+ tests/chinese_whispers_wrong_arg_type_error.phpt \
+ tests/cnn_face_detection_ctor_error.phpt \
+ tests/face_landmark_detection_ctor_error.phpt \
+ tests/face_recognition_ctor_error.phpt \
+ tests/integration_face_recognition.phpt # Downloads huge images
+
+ # Tests require bz2 extension which is not bundled
+ sed -i 's#PHP_TEST_SHARED_EXTENSIONS = `#PHP_TEST_SHARED_EXTENSIONS = -d extension=/usr/lib/php7/modules/bz2.so `#' Makefile
+ make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test
+}
+
+package() {
+ make INSTALL_ROOT="$pkgdir" install
+ install -d "$pkgdir"/etc/php7/conf.d
+ echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/$_pkgreal.ini
+}
+
+sha512sums="1ff8c3b55d69321e1b1bcec6f8f41240138adfe0298269f857f5ee9655d783324f16a371f61b8eb97638d7014a724faa4c80e81b67b51c34e6203a309abeacae php7-pdlib-1.0.tar.gz"