1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

testing/php85-pecl-xdebug: new aport

This commit is contained in:
Andy Postnikov 2025-07-02 20:00:26 +02:00
parent 8da1d87316
commit 96e562b357
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,55 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php85-pecl-xdebug
_extname=xdebug
pkgver=3.4.4
_pkgver=${pkgver/_/}
pkgrel=0
pkgdesc="PHP 8.5 extension that provides functions for function traces and profiling - PECL"
url="https://pecl.php.net/package/xdebug"
arch="all"
license="PHP-3.0"
_phpv=85
_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
php85-pecl-xdebug-fix.patch"
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="
59cbd2c6b80d0fffcc7073e531dc34afd47786817e8af9c7c46d0fb701abf333f35ace7bf08e857844f531f3f5be424e87ccab2400e3e96b233cb9c9c4d4de47 php-pecl-xdebug-3.4.4.tgz
33ecbd251ebd85226836d7f92ca7ebfdcf4d4731a212fd28f2906bce784e55fd7eb38c05e0d699bfa6eb6ca21853bf88cfd13cbd05a42e5d2a6d977c3ee9d7ba php85-pecl-xdebug-fix.patch
"

View file

@ -0,0 +1,11 @@
--- a/config.m4
+++ b/config.m4
@@ -19,7 +19,7 @@
if test "$PHP_XDEBUG_FOUND_VERNUM" -lt "80000"; then
AC_MSG_ERROR([not supported. Need a PHP version >= 8.0.0 and < 8.5.0 (found $PHP_XDEBUG_FOUND_VERSION)])
else
- if test "$PHP_XDEBUG_FOUND_VERNUM" -ge "80500"; then
+ if test "$PHP_XDEBUG_FOUND_VERNUM" -ge "80600"; then
AC_MSG_ERROR([not supported. Need a PHP version >= 8.0.0 and < 8.5.0 (found $PHP_XDEBUG_FOUND_VERSION)])
else
AC_MSG_RESULT([supported ($PHP_XDEBUG_FOUND_VERSION)])