aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2019-12-13 23:18:54 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-12-15 16:45:23 +0100
commite99205542ca084a8a2b7789bf06e8e91239ff8b7 (patch)
tree5197350e09eb68698b628a69c3bd5bfa2740fbaa
parent76c059a66c8db3c548941831208ca7de579af2da (diff)
downloadaports-e99205542ca084a8a2b7789bf06e8e91239ff8b7.tar.bz2
aports-e99205542ca084a8a2b7789bf06e8e91239ff8b7.tar.xz
testing/phpspy: new aport
-rw-r--r--testing/phpspy/APKBUILD42
-rw-r--r--testing/phpspy/libpthread.patch11
2 files changed, 53 insertions, 0 deletions
diff --git a/testing/phpspy/APKBUILD b/testing/phpspy/APKBUILD
new file mode 100644
index 0000000000..d34b99215c
--- /dev/null
+++ b/testing/phpspy/APKBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Andy Postnikov <apostnikov@gmail.com>
+
+pkgname=phpspy
+pkgver=0.5.0
+_termbox_ver=1.1.2
+pkgrel=0
+pkgdesc="Low-overhead sampling profiler for PHP 7 "
+url="https://github.com/adsr/phpspy"
+arch="all"
+license="MIT"
+depends="perl"
+makedepends="linux-headers python2"
+checkdepends="ncurses bash grep php7 procps"
+options="!check" # require ptrace capability and checkroot is not enough
+source="$pkgname-$pkgver.tar.gz::https://github.com/adsr/phpspy/archive/v$pkgver.tar.gz
+ $pkgname-termbox-$_termbox_ver.tar.gz::https://github.com/nsf/termbox/archive/v$_termbox_ver.tar.gz
+ libpthread.patch
+ "
+
+prepare() {
+ default_prepare
+ rm -fr "$builddir/vendor/termbox"
+ ln -sf "$srcdir/termbox-$_termbox_ver" "$builddir/vendor/termbox"
+}
+
+build() {
+ make
+}
+
+check() {
+ make TERM=xterm test
+}
+
+package() {
+ make prefix="/usr" DESTDIR="$pkgdir" install
+ install -D -v -m 755 stackcollapse-phpspy.pl "$pkgdir"/usr/bin/stackcollapse-phpspy
+ install -D -v -m 755 vendor/flamegraph.pl "$pkgdir"/usr/bin/flamegraph-phpspy
+}
+
+sha512sums="7163a9f0a44a7dc94e9b722b403218154a27992ba4bfcdae936bdc197b8bc732f70f506318540f356467acdbfec1b0ebc868409010d367a51c056790ab81be1f phpspy-0.5.0.tar.gz
+fcb240e9aa480a0cc738f0d01e60c39ef0f333f434c0d1f2d276d3d75edd351e694fd800e0b8dbadd12be686a4261551d10d475933197ef539cdb4dd70c153cb phpspy-termbox-1.1.2.tar.gz
+e3a6a0d3943c588570406e13155671fc9e16141e202aada9178681ea2afdc98698f54120a499aab85b82f5de1d25a30afe5cea1209fc2cc7f3da6cf4486dd3b5 libpthread.patch"
diff --git a/testing/phpspy/libpthread.patch b/testing/phpspy/libpthread.patch
new file mode 100644
index 0000000000..35366646d1
--- /dev/null
+++ b/testing/phpspy/libpthread.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.bak
++++ b/Makefile
+@@ -19,7 +19,7 @@
+ has_termbox := $(shell $(LD) $(phpspy_ldflags) -ltermbox -o/dev/null >/dev/null 2>&1 && echo :)
+ has_phpconf := $(shell command -v php-config >/dev/null 2>&1 && echo :)
+
+-$(or $(has_pthread), $(error Need libpthread))
++#$(or $(has_pthread), $(error Need libpthread))
+
+ ifdef USE_ZEND
+ $(or $(has_phpconf), $(error Need php-config))