diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-01-14 10:08:19 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-01-14 10:08:19 +0000 |
commit | e70325e83d97d6cef9bd38f6c5e4e0a7af5dd6fc (patch) | |
tree | 4df05ec7d211d0ea00d087e5ef7e17f1eb56248f /user/htop | |
parent | cd33dc8f0ee48b00991e1b0f8833b8e65a8770d8 (diff) | |
download | packages-e70325e83d97d6cef9bd38f6c5e4e0a7af5dd6fc.tar.gz packages-e70325e83d97d6cef9bd38f6c5e4e0a7af5dd6fc.tar.bz2 packages-e70325e83d97d6cef9bd38f6c5e4e0a7af5dd6fc.tar.xz packages-e70325e83d97d6cef9bd38f6c5e4e0a7af5dd6fc.zip |
user/*: Modernise / fix syntax / deps / code / tests
Diffstat (limited to 'user/htop')
-rw-r--r-- | user/htop/APKBUILD | 9 | ||||
-rw-r--r-- | user/htop/correctness.patch | 78 |
2 files changed, 83 insertions, 4 deletions
diff --git a/user/htop/APKBUILD b/user/htop/APKBUILD index 2dc87cfa7..25b992f1a 100644 --- a/user/htop/APKBUILD +++ b/user/htop/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=htop pkgver=2.2.0 -pkgrel=0 +pkgrel=1 pkgdesc="Interactive process viewer" url="http://hisham.hm/htop" arch="all" @@ -12,10 +12,11 @@ depends="" makedepends="ncurses-dev python3" subpackages="$pkgname-doc" source="http://hisham.hm/htop/releases/$pkgver/$pkgname-$pkgver.tar.gz - fix-python-path.patch" + correctness.patch + fix-python-path.patch + " build() { - cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -29,9 +30,9 @@ build() { } package() { - cd "$builddir" make DESTDIR="$pkgdir" install } sha512sums="ec1335bf0e3e0387e5e50acbc508d0effad19c4bc1ac312419dc97b82901f4819600d6f87a91668f39d429536d17304d4b14634426a06bec2ecd09df24adc62e htop-2.2.0.tar.gz +010ca1d42caeea133ba3d0383373a8eca849c73c95bb98fe3222c458c44320d1e2a3aee9431213721f1ccfcbd5af54eb1e54fafd6e0e5ca3b87499ee6d04b49a correctness.patch 16358bcd6d83181cc04dd8a7971f7cc0804dc49995208bad2042bcca7962f562bbd008c2185f24aa6186c58896e94e4ec02e2053dc46ed14789889d64836b679 fix-python-path.patch" diff --git a/user/htop/correctness.patch b/user/htop/correctness.patch new file mode 100644 index 000000000..51a9848d2 --- /dev/null +++ b/user/htop/correctness.patch @@ -0,0 +1,78 @@ +From: Jonathan Currier <dullfire@yahoo.com> + +diff --git a/MainPanel.h b/MainPanel.h +index 8849659..471870b 100644 +--- a/MainPanel.h ++++ b/MainPanel.h +@@ -12,6 +12,7 @@ in the source distribution for its full text. + #include "Panel.h" + #include "Action.h" + #include "Settings.h" ++#include "union-arg.h" + + typedef struct MainPanel_ { + Panel super; +@@ -21,11 +22,6 @@ typedef struct MainPanel_ { + pid_t pidSearch; + } MainPanel; + +-typedef union { +- int i; +- void* v; +-} Arg; +- + typedef bool(*MainPanel_ForeachProcessFn)(Process*, Arg); + + #define MainPanel_getFunctionBar(this_) (((Panel*)(this_))->defaultBar) +diff --git a/Process.c b/Process.c +index 471f529..ae617a6 100644 +--- a/Process.c ++++ b/Process.c +@@ -548,7 +548,9 @@ bool Process_changePriorityBy(Process* this, int delta) { + return Process_setPriority(this, this->nice + delta); + } + +-void Process_sendSignal(Process* this, int sgn) { ++ ++void Process_sendSignal(Process* this, Arg arg) { ++ int sgn = arg.i; + CRT_dropPrivileges(); + kill(this->pid, (int) sgn); + CRT_restorePrivileges(); +diff --git a/Process.h b/Process.h +index f702ca0..3011845 100644 +--- a/Process.h ++++ b/Process.h +@@ -29,6 +29,7 @@ in the source distribution for its full text. + #include "Object.h" + + #include <sys/types.h> ++#include "union-arg.h" + + #define PROCESS_FLAG_IO 0x0001 + +@@ -199,7 +200,7 @@ bool Process_setPriority(Process* this, int priority); + + bool Process_changePriorityBy(Process* this, int delta); + +-void Process_sendSignal(Process* this, int sgn); ++void Process_sendSignal(Process* this, Arg arg); + + long Process_pidCompare(const void* v1, const void* v2); + +diff --git a/union-arg.h b/union-arg.h +new file mode 100644 +index 0000000..5c8a094 +--- /dev/null ++++ b/union-arg.h +@@ -0,0 +1,9 @@ ++#ifndef UNION_ARG_HEADER ++#define UNION_ARG_HEADER ++ ++typedef union { ++ int i; ++ void* v; ++} Arg; ++ ++#endif + |