aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php8-pdlib/APKBUILD
blob: 6e5c246877db3bef2108111c860632717b53dec6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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"