diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-04-07 15:02:16 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-04-07 15:03:46 +0000 |
commit | 3c80ffcde355ba9c2b4629b4bdf3efef1278811a (patch) | |
tree | e294e4998e5dcbe0fb50d751ddf2325b13d6398f /community/psmisc | |
parent | 865fdb4dd3ee82b4930af7707486229aa4ee8283 (diff) | |
download | aports-3c80ffcde355ba9c2b4629b4bdf3efef1278811a.tar.bz2 aports-3c80ffcde355ba9c2b4629b4bdf3efef1278811a.tar.xz |
community/psmisc: fix build for ppc64le
https://github.com/leitao/aports/commit/9f4395581c9d594d2ffed51f2354c991e2c88c1a
Diffstat (limited to 'community/psmisc')
-rw-r--r-- | community/psmisc/APKBUILD | 29 | ||||
-rw-r--r-- | community/psmisc/include_limits.patch | 45 | ||||
-rw-r--r-- | community/psmisc/peekfd_lintl.patch | 30 |
3 files changed, 96 insertions, 8 deletions
diff --git a/community/psmisc/APKBUILD b/community/psmisc/APKBUILD index 3022d64b34..2bd302c7df 100644 --- a/community/psmisc/APKBUILD +++ b/community/psmisc/APKBUILD @@ -1,17 +1,25 @@ # Maintainer: Stuart Cardall <developer@it-offshore.co.uk> pkgname=psmisc pkgver=22.21 -pkgrel=1 +pkgrel=2 pkgdesc="A set of some small useful utilities that use the proc filesystem" url="http://psmisc.sourceforge.net/" -arch="all !ppc64le" #does not build yet for ppc64le +arch="all" license="BSD GPL" depends="" -makedepends="ncurses-dev" -subpackages="$pkgname-doc" -source="http://downloads.sourceforge.net/psmisc/$pkgname-$pkgver.tar.gz" +makedepends="gettext-dev libintl ncurses-dev" +subpackages="$pkgname-doc $pkgname-lang" +source="http://downloads.sourceforge.net/psmisc/$pkgname-$pkgver.tar.gz + include_limits.patch + peekfd_lintl.patch + " builddir="$srcdir/$pkgname-$pkgver" +prepare() { + cd "$builddir" + default_prepare +} + build() { cd "$builddir" ./configure --prefix=/usr \ @@ -27,6 +35,11 @@ package() { make DESTDIR="$pkgdir" install || return 1 } -md5sums="935c0fd6eb208288262b385fa656f1bf psmisc-22.21.tar.gz" -sha256sums="97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a psmisc-22.21.tar.gz" -sha512sums="766aeb45687090b88b17176c5117a603e83fe92a13c013aea72c8ee80048adf02e18c7daa52ddfb8b2135f7c9a1bcae38896cdfb8d0158728d85a446c5e0d5ae psmisc-22.21.tar.gz" +check() { + cd "$builddir" + make check +} + +sha512sums="766aeb45687090b88b17176c5117a603e83fe92a13c013aea72c8ee80048adf02e18c7daa52ddfb8b2135f7c9a1bcae38896cdfb8d0158728d85a446c5e0d5ae psmisc-22.21.tar.gz +63dea6a65c4cabcfa06d225950bc78fd6ac42f7445b8d10bde5e86dd8d96eb89823e486d7635b78562da058642f87289356c416225563a8e1ccfc2e32d81e884 include_limits.patch +ec84b84a02e48aed9f47a9efdd7ee4a4d409373751e9872e32c06912b506d9102a0526f244dcaff172598cd77e61344d38449a60181c2bbb010a674662e8f439 peekfd_lintl.patch" diff --git a/community/psmisc/include_limits.patch b/community/psmisc/include_limits.patch new file mode 100644 index 0000000000..1b474bc8f6 --- /dev/null +++ b/community/psmisc/include_limits.patch @@ -0,0 +1,45 @@ +Author: Breno Leitao <brenohl@br.ibm.com> +Date: Thu Apr 6 13:59:57 2017 -0300 + + peekfd: Include headers for ppc64 + + Currently peekfd fails to build on ppc64le architecture with musl + because it does not find reference for __WORDSIZE. + + This patch just includes reference for this macro if it was not + previously defined. + +Index: psmisc-22.21/src/peekfd.c +=================================================================== +--- psmisc-22.21.orig/src/peekfd.c ++++ psmisc-22.21/src/peekfd.c +@@ -37,6 +37,14 @@ + + #include "i18n.h" + ++#if !defined(PATH_MAX) ++#include <limits.h> ++#endif ++ ++#if !defined(__WORDSIZE) ++#include <bits/reg.h> ++#endif ++ + #ifdef I386 + #define REG_ORIG_ACCUM orig_eax + #define REG_ACCUM eax +Index: psmisc-22.21/src/pstree.c +=================================================================== +--- psmisc-22.21.orig/src/pstree.c ++++ psmisc-22.21/src/pstree.c +@@ -45,6 +45,10 @@ + #include "i18n.h" + #include "comm.h" + ++#if !defined(PATH_MAX) ++#include <limits.h> ++#endif ++ + #ifdef WITH_SELINUX + #include <selinux/selinux.h> + #else diff --git a/community/psmisc/peekfd_lintl.patch b/community/psmisc/peekfd_lintl.patch new file mode 100644 index 0000000000..6d7ba1c227 --- /dev/null +++ b/community/psmisc/peekfd_lintl.patch @@ -0,0 +1,30 @@ +Author: Breno Leitao <brenohl@br.ibm.com> +Date: Thu Apr 6 14:03:00 2017 -0300 + + pstree: Linking with libintl. + + Curently pstree does built, at least on ppc64le, because it does + not have a explicit link against gettext, causing the following error: + + peekfd.o: In function `print_version': + peekfd.c:(.text+0x160): undefined reference to `libintl_gettext' + peekfd.c:(.text+0x18c): undefined reference to `libintl_gettext' + peekfd.c:(.text+0x1ac): undefined reference to `libintl_gettext' + + peekfd depends on libint because of the following macro: + + #define _(String) gettext (String) + +Index: psmisc-22.21/src/Makefile.in +=================================================================== +--- psmisc-22.21.orig/src/Makefile.in ++++ psmisc-22.21/src/Makefile.in +@@ -131,7 +131,7 @@ killall_OBJECTS = $(am_killall_OBJECTS) + killall_DEPENDENCIES = + am_peekfd_OBJECTS = peekfd.$(OBJEXT) + peekfd_OBJECTS = $(am_peekfd_OBJECTS) +-peekfd_LDADD = $(LDADD) ++peekfd_LDADD = $(LDADD) -lintl + am_prtstat_OBJECTS = prtstat.$(OBJEXT) + prtstat_OBJECTS = $(am_prtstat_OBJECTS) + prtstat_DEPENDENCIES = |