aports/testing/php81-pecl-xdebug/APKBUILD
2025-03-09 19:27:27 +01:00

54 lines
1.7 KiB
Text

# 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=php81-pecl-xdebug
_extname=xdebug
pkgver=3.4.2
_pkgver=${pkgver/_/}
pkgrel=0
pkgdesc="PHP 8.1 extension that provides functions for function traces and profiling - PECL"
url="https://pecl.php.net/package/xdebug"
arch="all"
license="PHP-3.0"
_phpv=81
_php=php$_phpv
depends="$_php-common"
makedepends="$_php-dev linux-headers"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir/$_extname-$pkgver"
provides="$_php-xdebug=$pkgver-r$pkgrel" # for backward compatibility
replaces="$_php-xdebug" # for backward compatibility
install_if="php-$_extname php$_phpv"
build() {
phpize$_phpv
./configure --prefix=/usr --with-php-config=php-config$_phpv
make
}
check() {
# PECL package has no test suite.
$_php -d zend_extension="$builddir"/modules/xdebug.so -r 'xdebug_info();'
}
package() {
make INSTALL_ROOT="$pkgdir" install
local _confdir="$pkgdir"/etc/$_php/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/$_php/xdebug/ contrib/tracefile-analyser.php
install -D -m644 -t "$pkgdir"/usr/share/vim/vimfiles/syntax/ contrib/xt.vim
}
sha512sums="
323192363d82e5a3fd64e4366ccaf6187662991030b29646ebf2ddea91402231d878c0e915d8b1e6d32a90d0e040d5fa82a23315f13976c862c2dae3a2d92f71 php-pecl-xdebug-3.4.2.tgz
"