aboutsummaryrefslogtreecommitdiffstats
path: root/community/php-xdebug
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2016-10-06 06:07:10 +0300
committerJakub Jirutka <jakub@jirutka.cz>2016-11-19 13:04:20 +0100
commitd516c1691802f84fdb28cf7a275c218d2cb5a971 (patch)
tree5f8c8c49e2eba3719643c9e7d21d31d4cc0712dc /community/php-xdebug
parent4698ffd181d5244dbfa1011c3f34e71349cda9c5 (diff)
downloadaports-d516c1691802f84fdb28cf7a275c218d2cb5a971.tar.bz2
aports-d516c1691802f84fdb28cf7a275c218d2cb5a971.tar.xz
community/php-xdebug: merge php5/php7-xdebug into single abuild
Diffstat (limited to 'community/php-xdebug')
-rw-r--r--community/php-xdebug/APKBUILD66
1 files changed, 66 insertions, 0 deletions
diff --git a/community/php-xdebug/APKBUILD b/community/php-xdebug/APKBUILD
new file mode 100644
index 0000000000..d1ede025ff
--- /dev/null
+++ b/community/php-xdebug/APKBUILD
@@ -0,0 +1,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.4.1
+pkgrel=0
+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="03f52af10108450942c9c0ac3b72637f xdebug-2.4.1.tgz"
+sha256sums="23c8786e0f5aae67b1e5035972bfff282710fb84c483887cebceb8ef5bbdf8ef xdebug-2.4.1.tgz"
+sha512sums="64b345b4809fb0f020eb8fe7a0826056a64728ec9565bbb2d0e717ac7b3ca8aa0856b91c2ba47a7435b7500c5efa643682f245d6cd9d0a537f8bb9ab0d5cea3a xdebug-2.4.1.tgz"