2022-12-14 15:36:26 +01:00

60 lines
1.9 KiB
Plaintext

# Contributor: Andy Postnikov <apostnikov@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php82-pecl-xhprof
_extname=xhprof
pkgver=2.3.9
pkgrel=0
pkgdesc="A Hierarchical Profiler for PHP 8.2 - PECL"
url="https://pecl.php.net/package/xhprof"
arch="all"
license="Apache-2.0"
depends="php82-common"
makedepends="php82-dev"
_assetsdepends="php82-ctype graphviz ghostscript-fonts"
subpackages="$pkgname-assets::noarch"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir/$_extname-$pkgver/extension"
provides="php82-xhprof=$pkgver-r$pkgrel" # for backward compatibility
replaces="php82-xhprof" # for backward compatibility
build() {
phpize82
./configure --with-php-config=php-config82
make
}
check() {
[ $CARCH = s390x ] && rm -fr tests/xhprof_005.phpt # sleeping longer in CI
# needs fix https://github.com/longxinH/xhprof/issues/68
rm -fr tests/xhprof_001.phpt tests/xhprof_002.phpt tests/xhprof_003.phpt tests/xhprof_004.phpt tests/xhprof_007.phpt tests/xhprof_008.phpt
make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 TESTS=--show-diff test
}
package() {
make INSTALL_ROOT="$pkgdir" install
local _confdir="$pkgdir"/etc/php82/conf.d
install -d $_confdir
cat > $_confdir/$_extname.ini <<-EOF
extension=$_extname
xhprof.output_dir=/tmp
EOF
}
assets() {
pkgdesc="A Hierarchical Profiler for PHP (UI assets)"
depends="$_assetsdepends"
provides="php82-xhprof-assets=$pkgver-r$pkgrel" # for backward compatibility
replaces="php82-xhprof-assets" # for backward compatibility
local _assetsdir="$subpkgdir"/usr/share/php82/xhprof
install -d $_assetsdir
cp -R "$builddir"/../xhprof_lib $_assetsdir
cp -R "$builddir"/../xhprof_html $_assetsdir
cp -R "$builddir"/../examples $_assetsdir
}
sha512sums="
38a2609d961d908c6a4b5d1ff2085ffdad4a5f7d277705c826ae19e215660802528d606c5ee052f2e65255a7a85b2a9cb9038f4785c730ec468fc76dc7bcf5de php-pecl-xhprof-2.3.9.tgz
"