aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2020-05-31 18:38:25 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2020-05-31 18:38:25 +0200
commit8533f5a486fd51226777769761a87fa97e75de70 (patch)
tree01c40ccb20b8a8cc420d088659538c5fec9304ab
parentd97e2e8d8c0b4a39c5242b18555d8102ca1192e4 (diff)
downloadalpine_aports-8533f5a486fd51226777769761a87fa97e75de70.tar.bz2
alpine_aports-8533f5a486fd51226777769761a87fa97e75de70.tar.xz
alpine_aports-8533f5a486fd51226777769761a87fa97e75de70.zip
testing/phpspy: don't vendor termbox
Instead use our termbox package. This allows us to remove the python2 compile-time dependency from this package. See #11577
-rw-r--r--testing/phpspy/APKBUILD33
-rw-r--r--testing/phpspy/fix-install.patch14
-rw-r--r--testing/phpspy/remove-termbox-check.patch16
3 files changed, 43 insertions, 20 deletions
diff --git a/testing/phpspy/APKBUILD b/testing/phpspy/APKBUILD
index d34b99215c..3761c4b1a1 100644
--- a/testing/phpspy/APKBUILD
+++ b/testing/phpspy/APKBUILD
@@ -1,42 +1,35 @@
1# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
1# Maintainer: Andy Postnikov <apostnikov@gmail.com> 2# Maintainer: Andy Postnikov <apostnikov@gmail.com>
2
3pkgname=phpspy 3pkgname=phpspy
4pkgver=0.5.0 4pkgver=0.5.0
5_termbox_ver=1.1.2 5pkgrel=1
6pkgrel=0
7pkgdesc="Low-overhead sampling profiler for PHP 7 " 6pkgdesc="Low-overhead sampling profiler for PHP 7 "
8url="https://github.com/adsr/phpspy" 7url="https://github.com/adsr/phpspy"
9arch="all" 8arch="all"
10license="MIT" 9license="MIT"
11depends="perl" 10depends="perl"
12makedepends="linux-headers python2" 11makedepends="linux-headers termbox-dev"
13checkdepends="ncurses bash grep php7 procps" 12checkdepends="ncurses bash grep php7 procps"
14options="!check" # require ptrace capability and checkroot is not enough 13options="!check" # require ptrace capability and checkroot is not enough
15source="$pkgname-$pkgver.tar.gz::https://github.com/adsr/phpspy/archive/v$pkgver.tar.gz 14source="$pkgname-$pkgver.tar.gz::https://github.com/adsr/phpspy/archive/v$pkgver.tar.gz
16 $pkgname-termbox-$_termbox_ver.tar.gz::https://github.com/nsf/termbox/archive/v$_termbox_ver.tar.gz
17 libpthread.patch 15 libpthread.patch
16 remove-termbox-check.patch
17 fix-install.patch
18 " 18 "
19 19
20prepare() {
21 default_prepare
22 rm -fr "$builddir/vendor/termbox"
23 ln -sf "$srcdir/termbox-$_termbox_ver" "$builddir/vendor/termbox"
24}
25
26build() { 20build() {
27 make 21 make phpspy_dynamic
28}
29
30check() {
31 make TERM=xterm test
32} 22}
33 23
34package() { 24package() {
35 make prefix="/usr" DESTDIR="$pkgdir" install 25 make prefix="/usr" DESTDIR="$pkgdir" install
36 install -D -v -m 755 stackcollapse-phpspy.pl "$pkgdir"/usr/bin/stackcollapse-phpspy 26 install -D -v -m 755 stackcollapse-phpspy.pl \
37 install -D -v -m 755 vendor/flamegraph.pl "$pkgdir"/usr/bin/flamegraph-phpspy 27 "$pkgdir"/usr/bin/stackcollapse-phpspy
28 install -D -v -m 755 vendor/flamegraph.pl \
29 "$pkgdir"/usr/bin/flamegraph-phpspy
38} 30}
39 31
40sha512sums="7163a9f0a44a7dc94e9b722b403218154a27992ba4bfcdae936bdc197b8bc732f70f506318540f356467acdbfec1b0ebc868409010d367a51c056790ab81be1f phpspy-0.5.0.tar.gz 32sha512sums="7163a9f0a44a7dc94e9b722b403218154a27992ba4bfcdae936bdc197b8bc732f70f506318540f356467acdbfec1b0ebc868409010d367a51c056790ab81be1f phpspy-0.5.0.tar.gz
41fcb240e9aa480a0cc738f0d01e60c39ef0f333f434c0d1f2d276d3d75edd351e694fd800e0b8dbadd12be686a4261551d10d475933197ef539cdb4dd70c153cb phpspy-termbox-1.1.2.tar.gz 33e3a6a0d3943c588570406e13155671fc9e16141e202aada9178681ea2afdc98698f54120a499aab85b82f5de1d25a30afe5cea1209fc2cc7f3da6cf4486dd3b5 libpthread.patch
42e3a6a0d3943c588570406e13155671fc9e16141e202aada9178681ea2afdc98698f54120a499aab85b82f5de1d25a30afe5cea1209fc2cc7f3da6cf4486dd3b5 libpthread.patch" 34c07a0e9df74dc16fc51445ddc9321314d131049ac0acc3ab7aab76907f05ab78cd3e8fd55e5db14a43e66568ca19f7006369d3f9bf8c09e122a57a58513d071c remove-termbox-check.patch
350d7a53a77fc6b8d191eb873af29771e520b8119357ceda0a81ad710a6d365812be3d4e87c3863d34ee14059a355626ba5dce507607ec7434aed4198bafb33ac3 fix-install.patch"
diff --git a/testing/phpspy/fix-install.patch b/testing/phpspy/fix-install.patch
new file mode 100644
index 0000000000..f559b83958
--- /dev/null
+++ b/testing/phpspy/fix-install.patch
@@ -0,0 +1,14 @@
1We don't want a static binary, make sure the install target respects that.
2
3diff -upr phpspy-0.5.0.orig/Makefile phpspy-0.5.0/Makefile
4--- phpspy-0.5.0.orig/Makefile 2020-05-31 18:37:11.787907276 +0200
5+++ phpspy-0.5.0/Makefile 2020-05-31 18:37:18.961241194 +0200
6@@ -55,7 +55,7 @@ test: phpspy_static $(phpspy_tests)
7 printf "Passed %d out of %d tests\n" $$pass $$total ; \
8 [ $$pass -eq $$total ] || exit 1
9
10-install: phpspy_static
11+install: phpspy_dynamic
12 install -D -v -m 755 phpspy $(DESTDIR)$(prefix)/bin/phpspy
13
14 clean:
diff --git a/testing/phpspy/remove-termbox-check.patch b/testing/phpspy/remove-termbox-check.patch
new file mode 100644
index 0000000000..c94fb32dae
--- /dev/null
+++ b/testing/phpspy/remove-termbox-check.patch
@@ -0,0 +1,16 @@
1Check fails with:
2
3 ld: unrecognized option '-Wl,--as-needed'
4 ld: use the --help option for usage information
5
6diff -upr phpspy-0.5.0.orig/Makefile phpspy-0.5.0/Makefile
7--- phpspy-0.5.0.orig/Makefile 2020-05-31 18:34:19.931393581 +0200
8+++ phpspy-0.5.0/Makefile 2020-05-31 18:34:23.341389992 +0200
9@@ -33,7 +33,6 @@ phpspy_static: $(wildcard *.c *.h) vendo
10 $(CC) $(phpspy_cflags) $(phpspy_includes) $(termbox_inlcudes) $(phpspy_defines) $(phpspy_sources) -o phpspy $(phpspy_ldflags) $(phpspy_libs) $(termbox_libs)
11
12 phpspy_dynamic: $(wildcard *.c *.h)
13- @$(or $(has_termbox), $(error Need libtermbox. Hint: try `make phpspy_static`))
14 $(CC) $(phpspy_cflags) $(phpspy_includes) $(phpspy_defines) $(phpspy_sources) -o phpspy $(phpspy_ldflags) $(phpspy_libs) -ltermbox
15
16 vendor/termbox/build/src/libtermbox.a: vendor/termbox/waf