blob: cec83da4a07b362e3cd7edf134a7811ec6b62360 (
plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# 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=php-xdebug
_pkgname=xdebug
pkgver=2.5.0
pkgrel=1
pkgdesc="PHP extension provides functions for function traces and profiling"
url="http://pecl.php.net/package/$_pkgname"
arch="all"
license="PHP"
depends=""
makedepends="autoconf"
source="http://pecl.php.net/get/$_pkgname-$pkgver.tgz"
builddir="$srcdir/$_pkgname-$pkgver"
_phpversions="5 7"
for _v in $_phpversions; do
makedepends="$makedepends php$_v-dev"
subpackages="$subpackages php$_v-${pkgname#php-}:_subpackage"
done
prepare() {
default_prepare || return 1
local ver; for ver in $_phpversions; do
cp -ar "$builddir" "$builddir-$ver"
done
}
build() {
local ver; for ver in $_phpversions; do
cd "$builddir-$ver"
phpize$ver || return 1
./configure --prefix=/usr \
--with-php-config=/usr/bin/php-config$ver || return 1
make || return 1
make test || return 1
done
}
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local ver="${subpkgname:3:1}"
pkgdesc="$pkgdesc (for PHP $ver)"
depends="$depends php$ver"
install_if="$pkgname=$pkgver-r$pkgrel php$ver"
[ "$ver" = 5 ] && replaces="$pkgname"
make -C "$builddir-$ver" INSTALL_ROOT="$subpkgdir" install || return 1
install -d "$subpkgdir"/etc/php$ver/conf.d || return 1
cat > "$subpkgdir"/etc/php$ver/conf.d/$_pkgname.ini <<-EOF
; Uncomment to enable this extension.
;zend_extension=$_pkgname.so
EOF
}
md5sums="5306da5948e195c2e4585c9abd7741f9 xdebug-2.5.0.tgz"
sha256sums="8bd6ad1e64948308e3e3a7437292f154b11e25acaf31b0d59d83bda18af0890d xdebug-2.5.0.tgz"
sha512sums="75b1dbf32059eebb6ea3fb6ebb50ab26d73f8ce2964be1fec41ecfd9ae3d8bd55b6997daf03727b28b91ba06d08734865158bed6f038a46f00a1da5424ce5fe6 xdebug-2.5.0.tgz"
|