diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2020-05-31 18:38:25 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2020-05-31 18:38:25 +0200 |
commit | 8533f5a486fd51226777769761a87fa97e75de70 (patch) | |
tree | 01c40ccb20b8a8cc420d088659538c5fec9304ab | |
parent | d97e2e8d8c0b4a39c5242b18555d8102ca1192e4 (diff) | |
download | alpine_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/APKBUILD | 33 | ||||
-rw-r--r-- | testing/phpspy/fix-install.patch | 14 | ||||
-rw-r--r-- | testing/phpspy/remove-termbox-check.patch | 16 |
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 | |||
3 | pkgname=phpspy | 3 | pkgname=phpspy |
4 | pkgver=0.5.0 | 4 | pkgver=0.5.0 |
5 | _termbox_ver=1.1.2 | 5 | pkgrel=1 |
6 | pkgrel=0 | ||
7 | pkgdesc="Low-overhead sampling profiler for PHP 7 " | 6 | pkgdesc="Low-overhead sampling profiler for PHP 7 " |
8 | url="https://github.com/adsr/phpspy" | 7 | url="https://github.com/adsr/phpspy" |
9 | arch="all" | 8 | arch="all" |
10 | license="MIT" | 9 | license="MIT" |
11 | depends="perl" | 10 | depends="perl" |
12 | makedepends="linux-headers python2" | 11 | makedepends="linux-headers termbox-dev" |
13 | checkdepends="ncurses bash grep php7 procps" | 12 | checkdepends="ncurses bash grep php7 procps" |
14 | options="!check" # require ptrace capability and checkroot is not enough | 13 | options="!check" # require ptrace capability and checkroot is not enough |
15 | source="$pkgname-$pkgver.tar.gz::https://github.com/adsr/phpspy/archive/v$pkgver.tar.gz | 14 | source="$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 | ||
20 | prepare() { | ||
21 | default_prepare | ||
22 | rm -fr "$builddir/vendor/termbox" | ||
23 | ln -sf "$srcdir/termbox-$_termbox_ver" "$builddir/vendor/termbox" | ||
24 | } | ||
25 | |||
26 | build() { | 20 | build() { |
27 | make | 21 | make phpspy_dynamic |
28 | } | ||
29 | |||
30 | check() { | ||
31 | make TERM=xterm test | ||
32 | } | 22 | } |
33 | 23 | ||
34 | package() { | 24 | package() { |
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 | ||
40 | sha512sums="7163a9f0a44a7dc94e9b722b403218154a27992ba4bfcdae936bdc197b8bc732f70f506318540f356467acdbfec1b0ebc868409010d367a51c056790ab81be1f phpspy-0.5.0.tar.gz | 32 | sha512sums="7163a9f0a44a7dc94e9b722b403218154a27992ba4bfcdae936bdc197b8bc732f70f506318540f356467acdbfec1b0ebc868409010d367a51c056790ab81be1f phpspy-0.5.0.tar.gz |
41 | fcb240e9aa480a0cc738f0d01e60c39ef0f333f434c0d1f2d276d3d75edd351e694fd800e0b8dbadd12be686a4261551d10d475933197ef539cdb4dd70c153cb phpspy-termbox-1.1.2.tar.gz | 33 | e3a6a0d3943c588570406e13155671fc9e16141e202aada9178681ea2afdc98698f54120a499aab85b82f5de1d25a30afe5cea1209fc2cc7f3da6cf4486dd3b5 libpthread.patch |
42 | e3a6a0d3943c588570406e13155671fc9e16141e202aada9178681ea2afdc98698f54120a499aab85b82f5de1d25a30afe5cea1209fc2cc7f3da6cf4486dd3b5 libpthread.patch" | 34 | c07a0e9df74dc16fc51445ddc9321314d131049ac0acc3ab7aab76907f05ab78cd3e8fd55e5db14a43e66568ca19f7006369d3f9bf8c09e122a57a58513d071c remove-termbox-check.patch |
35 | 0d7a53a77fc6b8d191eb873af29771e520b8119357ceda0a81ad710a6d365812be3d4e87c3863d34ee14059a355626ba5dce507607ec7434aed4198bafb33ac3 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 @@ | |||
1 | We don't want a static binary, make sure the install target respects that. | ||
2 | |||
3 | diff -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 @@ | |||
1 | Check fails with: | ||
2 | |||
3 | ld: unrecognized option '-Wl,--as-needed' | ||
4 | ld: use the --help option for usage information | ||
5 | |||
6 | diff -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 | ||