projects/aports·blob master · refs

61 lines · 1.9 KiB

1# Maintainer: Andy Postnikov <[email protected]>
2pkgname=php86-pecl-xhprof
3_extname=xhprof
4pkgver=2.3.10
5pkgrel=2
6pkgdesc="A Hierarchical Profiler for PHP 8.6 - PECL"
7url="https://pecl.php.net/package/xhprof"
8arch="all"
9license="Apache-2.0"
10_phpv=86
11_php=php$_phpv
12depends="$_php-common"
13makedepends="$_php-dev"
14_assetsdepends="$_php-ctype graphviz ghostscript-fonts"
15subpackages="$pkgname-assets::noarch"
16#source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
17source="php-$_extname-$pkgver.tgz::https://github.com/longxinH/xhprof/archive/refs/tags/v$pkgver.tar.gz"
18builddir="$srcdir/$_extname-$pkgver/extension"
19provides="$_php-xhprof=$pkgver-r$pkgrel" # for backward compatibility
20replaces="$_php-xhprof" # for backward compatibility
21
22install_if="php-$_extname php$_phpv"
23
24build() {
25 phpize$_phpv
26 ./configure --with-php-config=php-config$_phpv
27 make
28}
29
30check() {
31 [ $CARCH = s390x ] && rm -fr tests/xhprof_005.phpt # sleeping longer in CI
32 make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 TESTS=--show-diff test
33 $_php -d extension=modules/$_extname.so --ri $_extname
34}
35
36package() {
37 make INSTALL_ROOT="$pkgdir" install
38 local _confdir="$pkgdir"/etc/$_php/conf.d
39 install -d $_confdir
40 cat > $_confdir/$_extname.ini <<-EOF
41 extension=$_extname
42 xhprof.output_dir=/tmp
43 EOF
44}
45
46assets() {
47 pkgdesc="A Hierarchical Profiler for PHP (UI assets)"
48 depends="$_assetsdepends"
49 provides="$_php-xhprof-assets=$pkgver-r$pkgrel" # for backward compatibility
50 replaces="$_php-xhprof-assets" # for backward compatibility
51
52 local _assetsdir="$subpkgdir"/usr/share/$_php/xhprof
53 install -d $_assetsdir
54 cp -R "$builddir"/../xhprof_lib $_assetsdir
55 cp -R "$builddir"/../xhprof_html $_assetsdir
56 cp -R "$builddir"/../examples $_assetsdir
57}
58
59sha512sums="
60e12d3b3771e62f1e31171ded5cddada2c3827f0837aaa76fb1ea7cb74f0031a51f62290a0bfc36dd78f64066d94b25513ef354a6528d1d35f170dbc9d586f5fb php-xhprof-2.3.10.tgz
61"