aboutsummaryrefslogtreecommitdiffstats
path: root/community/php8-pecl-xdebug/APKBUILD
blob: 143cdf2f638ad6efcc7133b6671af0ccf301fe41 (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
43
44
45
46
47
48
49
# Contributor: Andy Postnikov <apostnikov@gmail.com>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php8-pecl-xdebug
_extname=xdebug
pkgver=3.1.2
pkgrel=0
pkgdesc="PHP 8 extension that provides functions for function traces and profiling - PECL"
url="https://pecl.php.net/package/xdebug"
arch="all"
license="PHP-3.0"
depends="php8-common"
makedepends="php8-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir/$_extname-$pkgver"
provides="php8-xdebug=$pkgver-r$pkgrel" # for backward compatibility
replaces="php8-xdebug" # for backward compatibility

build() {
	phpize8
	./configure --prefix=/usr --with-php-config=php-config8
	make
}

check() {
	# PECL package has no test suite.
	php8 -d zend_extension="$builddir"/modules/xdebug.so -r 'xdebug_info();'
}

package() {
	make INSTALL_ROOT="$pkgdir" install

	local _confdir="$pkgdir"/etc/php8/conf.d
	mkdir -p $_confdir
	# should go after opcache
	cat > $_confdir/50_$_extname.ini <<-EOF
		; Uncomment and configure mode https://xdebug.org/docs/all_settings#xdebug.mode
		;zend_extension=$_extname.so
		;xdebug.mode=off
	EOF

	install -D -m644 -t "$pkgdir"/usr/share/php8/xdebug/ contrib/tracefile-analyser.php
	install -D -m644 -t "$pkgdir"/usr/share/vim/vimfiles/syntax/ contrib/xt.vim
}

sha512sums="
63554545a1c1b94d8503a32d23d70ca16fc82866f9b4191e6f3d026e89e4efdc10974d97f8199c2aa3c0dc0b1f27def9906302e96867cad4e3514b0cc1c5de98  php-pecl-xdebug-3.1.2.tgz
"