diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-plugins/wmtop |
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-plugins/wmtop')
-rw-r--r-- | x11-plugins/wmtop/Manifest | 9 | ||||
-rw-r--r-- | x11-plugins/wmtop/files/wmtop-0.9.0-list.patch | 127 | ||||
-rw-r--r-- | x11-plugins/wmtop/files/wmtop-0.9.0-meminfo.patch | 189 | ||||
-rw-r--r-- | x11-plugins/wmtop/metadata.xml | 16 | ||||
-rw-r--r-- | x11-plugins/wmtop/wmtop-0.85.ebuild | 27 | ||||
-rw-r--r-- | x11-plugins/wmtop/wmtop-0.9.0-r1.ebuild | 39 |
6 files changed, 407 insertions, 0 deletions
diff --git a/x11-plugins/wmtop/Manifest b/x11-plugins/wmtop/Manifest new file mode 100644 index 000000000000..cf07cee31beb --- /dev/null +++ b/x11-plugins/wmtop/Manifest @@ -0,0 +1,9 @@ +AUX wmtop-0.9.0-list.patch 2945 SHA256 a74f1243e39915ad3fb10fb10e2c2110729d0c3f24f01f0a69eea89c3212ab77 SHA512 b04a41dce3999c556273b44921fb931d228e91d696be95cfbd508fd4228b1eca513c5f88b4a1ff314fb4636bf76628bfa4cf7380d01dd137a5cbac9f76218687 WHIRLPOOL 0707b7f7affebba23e4af13589780afc74a3bf3a6d1f1e7e81d49dfa3d0a2ce64a01774807f9b47207d637f4ec6617ff645de0984b480a8a07edd028b45f57f2 +AUX wmtop-0.9.0-meminfo.patch 5780 SHA256 c80d2c15d8d5572b56789e670f4572d5293d7b60f21e567e51ef9c5668a0ff59 SHA512 d08a9081aa2df6bb346e68a1457049b7152091974a7aa400170b98778b59d48f2f886fc937e37bf950cf6d6e8be317c12cea78dde96f10ce038f856eba30771a WHIRLPOOL dd5cf48898d34512ca7d309880773f8bc88fc86e36ad3780eb6b426e51cda644601335791a69a6fe63b2250e47171ce5a6182c732de35716a0716b89091d2059 +DIST wmtop-0.85.tar.gz 21554 SHA256 4d2de9fc4a372751a45f16bb487d8625d383550a08252fcdcd8f927b291626d0 SHA512 fd41bcb6799d2c24a43ab906f70138984781c1184e83aca68dcaee9af2bd5e49c50c6dbe2775852152c7d459bc30c074ba3d67f499e033da1646e207d6a02830 WHIRLPOOL c1a1cd22edd660b74ffee97859f2b71a96a7b75f9d22f0ff42a1cdca2b58d75b8c75441ba6476a1916c5ecf66e20e438a92c6edc91ae044bac22e993c0e65475 +DIST wmtop-0.9.0.tar.gz 25833 SHA256 b141e608b32c1d58c03c31c18b420d25a490bfe49a63a56cef5b8f86935752de SHA512 f0308b10e94350c51b6782c1399e6583e493b74a261834fd3c8ec75d7c8bbf643a7df5663a8c2645a9167e6718f141ee163039b1f559cbe6c0c154bc1ab1d2d8 WHIRLPOOL 1e2c2b3890c56c3a8afc6de06446bdee9daa48a77b24626550c3a1db2e2c246d830d36083bf3586ba16d4570a409c46e2302ac04ed04b5e7c4ad6367f8bb4988 +EBUILD wmtop-0.85.ebuild 556 SHA256 52027224504d6c2296c3fe501d2100120b5d156baafae201632aaf0e11e65948 SHA512 c0b01a76bf40aa3e67a41e1c2027d390e4ce6d6d9e0948873ff064ae8f3d689bb2beb7128d63dd36a7b600d366d23d3cf594fbde44d2e969a9a192d3e77d15f5 WHIRLPOOL 8b75e1bd4a39ae6d69fac66b0e42166ec64e8f337ba4bfe2a269df42168912edba7051b0ed357362fb124799217141469fa242db4dda29c6c543b1a74fad90ce +EBUILD wmtop-0.9.0-r1.ebuild 931 SHA256 36d05ebce4532aeeccf5dcf3e6550d39979332103dc59842dbf7a26e45d61db4 SHA512 e9385b438f66356134065024d48b62c623131bb169e2d48029806c1409b49158c1461b664e57026a9244f209669db23e847b79458a192e3ba539a43bcfda1025 WHIRLPOOL 46b7deaaaf50d8dee8104352ea16a8b1e1a793a2a3b2a549d2bedea4d8f88a90d47cf43a0bdf0ef7155fc91e3631e2392abe8293c92c307c6c264a84097de807 +MISC ChangeLog 3983 SHA256 44af569b80596994c958c676cc09e5eab6abcb21219c2eb82a4a02913c58d64a SHA512 629cfe2219de5993409adda322043eb517ed7b2b9cb03885c18556c6bc02fbda59c648f465286e9071da9e795b1bea89d32a00b3e49a5396a7ffd1a817fd117b WHIRLPOOL cd6f69fd6c068ee1e49278ea86ee7861b69635ffa588d86c7cfdac7d87f955bb0853113a24fe4d1caf57abc3e47ffffb892881e46485a1b82fd67bea96cbcd27 +MISC ChangeLog-2015 2531 SHA256 3d3e8e75c8a989c23857ae6c30b01c1580385ee640406937912f8c17640e3bb2 SHA512 58764170a8c7fe4454c1f88a586f140563d78f0f65ff67b6bec1f849f67e269a6d14b229d2fb2500650faeae2d91f2cae9869bde90adade255c27593cb957c59 WHIRLPOOL 1179e74cec158e5dcde107acfe7c624cd478d4c0c3c34a90c3fd5cc68cba095cd6932044591a49fe8b1149f71ec344be7b2b747c8b801d62d5237133e12006ff +MISC metadata.xml 639 SHA256 3adc9f602138457d6b58e8f3c1bcd06380fb6e4851f57571b2d7c435216b31cb SHA512 d902e2cbd1b3809ff8b89b896acbe611191f6c6ae2e7299c4b41b0e60364fc7c4de4f548b30f1091f163cfab4178af1c716387ffe12a2392002dbfa4bfd20154 WHIRLPOOL 5ca3e7c1d5111a26aa2cf8885f1f7dfe1ebe95f44c74f6691fd49c925a7e852cdbb35c70339d5935f4beb8d0f917e8bafd7f9aabeb8e068821d2a685d8d194ee diff --git a/x11-plugins/wmtop/files/wmtop-0.9.0-list.patch b/x11-plugins/wmtop/files/wmtop-0.9.0-list.patch new file mode 100644 index 000000000000..e6a77a3faf60 --- /dev/null +++ b/x11-plugins/wmtop/files/wmtop-0.9.0-list.patch @@ -0,0 +1,127 @@ +diff -Naur wmgeneral.orig/list.c wmgeneral/list.c +--- wmgeneral.orig/list.c 2016-01-04 13:25:53.717286654 +0100 ++++ wmgeneral/list.c 2016-01-04 13:26:06.948290980 +0100 +@@ -38,7 +38,7 @@ + + /* Return a cons cell produced from (head . tail) */ + +-INLINE LinkedList* ++LinkedList* + list_cons(void* head, LinkedList* tail) + { + LinkedList* cell; +@@ -51,7 +51,7 @@ + + /* Return the length of a list, list_length(NULL) returns zero */ + +-INLINE int ++int + list_length(LinkedList* list) + { + int i = 0; +@@ -66,7 +66,7 @@ + /* Return the Nth element of LIST, where N count from zero. If N + larger than the list length, NULL is returned */ + +-INLINE void* ++void* + list_nth(int index, LinkedList* list) + { + while(index-- != 0) +@@ -81,7 +81,7 @@ + + /* Remove the element at the head by replacing it by its successor */ + +-INLINE void ++void + list_remove_head(LinkedList** list) + { + if (!*list) return; +@@ -101,7 +101,7 @@ + + /* Remove the element with `car' set to ELEMENT */ + /* +-INLINE void ++void + list_remove_elem(LinkedList** list, void* elem) + { + while (*list) +@@ -112,7 +112,7 @@ + } + }*/ + +-INLINE LinkedList * ++LinkedList * + list_remove_elem(LinkedList* list, void* elem) + { + LinkedList *tmp; +@@ -132,7 +132,7 @@ + + /* Return element that has ELEM as car */ + +-INLINE LinkedList* ++LinkedList* + list_find(LinkedList* list, void* elem) + { + while(list) +@@ -146,7 +146,7 @@ + + /* Free list (backwards recursive) */ + +-INLINE void ++void + list_free(LinkedList* list) + { + if(list) +@@ -158,7 +158,7 @@ + + /* Map FUNCTION over all elements in LIST */ + +-INLINE void ++void + list_mapcar(LinkedList* list, void(*function)(void*)) + { + while(list) +diff -Naur wmgeneral.orig/list.h wmgeneral/list.h +--- wmgeneral.orig/list.h 2016-01-04 13:25:53.717286654 +0100 ++++ wmgeneral/list.h 2016-01-04 13:25:56.934287706 +0100 +@@ -29,31 +29,25 @@ + #ifndef __LIST_H_ + #define __LIST_H_ + +-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +-# define INLINE inline +-#else +-# define INLINE +-#endif +- + typedef struct LinkedList { + void *head; + struct LinkedList *tail; + } LinkedList; + +-INLINE LinkedList* list_cons(void* head, LinkedList* tail); ++LinkedList* list_cons(void* head, LinkedList* tail); + +-INLINE int list_length(LinkedList* list); ++int list_length(LinkedList* list); + +-INLINE void* list_nth(int index, LinkedList* list); ++void* list_nth(int index, LinkedList* list); + +-INLINE void list_remove_head(LinkedList** list); ++void list_remove_head(LinkedList** list); + +-INLINE LinkedList *list_remove_elem(LinkedList* list, void* elem); ++LinkedList *list_remove_elem(LinkedList* list, void* elem); + +-INLINE void list_mapcar(LinkedList* list, void(*function)(void*)); ++void list_mapcar(LinkedList* list, void(*function)(void*)); + +-INLINE LinkedList*list_find(LinkedList* list, void* elem); ++LinkedList*list_find(LinkedList* list, void* elem); + +-INLINE void list_free(LinkedList* list); ++void list_free(LinkedList* list); + + #endif diff --git a/x11-plugins/wmtop/files/wmtop-0.9.0-meminfo.patch b/x11-plugins/wmtop/files/wmtop-0.9.0-meminfo.patch new file mode 100644 index 000000000000..541ab6a1d697 --- /dev/null +++ b/x11-plugins/wmtop/files/wmtop-0.9.0-meminfo.patch @@ -0,0 +1,189 @@ +--- wmtop.c.orig 2001-01-19 15:41:20.000000000 -0600 ++++ wmtop.c 2012-03-29 22:36:49.906684353 -0500 +@@ -182,12 +182,12 @@ + pid_t pid; + char *name; + float amount; +- int user_time; +- int kernel_time; +- int previous_user_time; +- int previous_kernel_time; +- int vsize; +- int rss; ++ unsigned long user_time; ++ unsigned long kernel_time; ++ unsigned long previous_user_time; ++ unsigned long previous_kernel_time; ++ unsigned long vsize; ++ long rss; + int time_stamp; + int counted; + }; +@@ -236,8 +236,8 @@ + + process->pid = p; + process->time_stamp = 0; +- process->previous_user_time = INT_MAX; +- process->previous_kernel_time = INT_MAX; ++ process->previous_user_time = ULONG_MAX; ++ process->previous_kernel_time = ULONG_MAX; + process->counted = 1; + + /* process_find_name(process);*/ +@@ -256,11 +256,11 @@ + void process_cleanup(void); + void delete_process(struct process *); + inline void draw_processes(void); +-int calc_cpu_total(void); +-void calc_cpu_each(int); ++unsigned long calc_cpu_total(void); ++void calc_cpu_each(unsigned long total); + #if defined(LINUX) +-int calc_mem_total(void); +-void calc_mem_each(int); ++unsigned long calc_mem_total(void); ++void calc_mem_each(unsigned long total); + #endif + int process_find_top_three(struct process **); + void draw_bar(int, int, int, int, float, int, int); +@@ -457,13 +457,15 @@ + char line[WMTOP_BUFLENGTH],filename[WMTOP_BUFLENGTH],procname[WMTOP_BUFLENGTH]; + int ps; + struct stat sbuf; +- int user_time,kernel_time; ++ unsigned long user_time,kernel_time; + int rc; + #if defined(LINUX) + char *r,*q; + char deparenthesised_name[WMTOP_BUFLENGTH]; + #endif /* defined(LINUX) */ + #if defined(FREEBSD) ++ /* TODO: needs analysis. Probably needs same data type fix as LINUX (use ++ * long types). Need to check FreeBSD docs and test. -wbk */ + int us,um,ks,km; + #endif /* defined(FREEBSD) */ + +@@ -501,9 +503,10 @@ + + #if defined(LINUX) + /* +- * Extract cpu times from data in /proc filesystem ++ * Extract cpu times from data in /proc filesystem. ++ * For conversion types see man proc(5). + */ +- rc = sscanf(line,"%*s %s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d %d %*s %*s %*s %*s %*s %*s %*s %d %d", ++ rc = sscanf(line,"%*s %s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %lu %lu %*s %*s %*s %*s %*s %*s %*s %lu %ld", + procname, + &process->user_time,&process->kernel_time, + &process->vsize,&process->rss); +@@ -527,6 +530,9 @@ + /* + * Extract cpu times from data in /proc/<pid>/stat + * XXX: Process name extractor for FreeBSD is untested right now. ++ * ++ * [TODO: FREEBSD code probably needs similar data type changes to ++ * those made for LINUX above. Need to check docs. -wbk] + */ + rc = sscanf(line,"%s %*s %*s %*s %*s %*s %*s %*s %d,%d %d,%d", + procname, +@@ -540,11 +546,14 @@ + process->kernel_time = ks*1000+km/1000; + #endif /* defined(FREEBSD) */ + ++ /* not portable (especially unsuitable for redistributable executables. ++ * On some systems, getpagesize() is a preprocessor macro). ++ */ + process->rss *= getpagesize(); + +- if (process->previous_user_time==INT_MAX) ++ if (process->previous_user_time==ULONG_MAX) + process->previous_user_time = process->user_time; +- if (process->previous_kernel_time==INT_MAX) ++ if (process->previous_kernel_time==ULONG_MAX) + process->previous_kernel_time = process->kernel_time; + + user_time = process->user_time-process->previous_user_time; +@@ -686,7 +695,7 @@ + void draw_processes() { + int i,n; + struct process *best[3] = { 0, 0, 0 }; +- int total; ++ unsigned long total; + + /* + * Invalidate time stamps +@@ -743,21 +752,21 @@ + /* Calculate cpu total */ + /******************************************/ + +-int calc_cpu_total() { +- int total,t; +- static int previous_total = INT_MAX; ++unsigned long calc_cpu_total() { ++ unsigned long total,t; ++ static unsigned long previous_total = ULONG_MAX; + #if defined(LINUX) + int rc; + int ps; + char line[WMTOP_BUFLENGTH]; +- int cpu,nice,system,idle; ++ unsigned long cpu,nice,system,idle; + + ps = open("/proc/stat",O_RDONLY); + rc = read(ps,line,sizeof(line)); + close(ps); + if (rc<0) + return 0; +- sscanf(line,"%*s %d %d %d %d",&cpu,&nice,&system,&idle); ++ sscanf(line,"%*s %lu %lu %lu %lu",&cpu,&nice,&system,&idle); + total = cpu+nice+system+idle; + #endif /* defined(LINUX) */ + +@@ -780,7 +789,7 @@ + /* Calculate each processes cpu */ + /******************************************/ + +-void calc_cpu_each(int total) { ++void calc_cpu_each(unsigned long total) { + struct process *p = first_process; + while (p) { + +@@ -798,7 +807,8 @@ + /******************************************/ + + #if defined(LINUX) +-int calc_mem_total() { ++/* INT_MAX won't always hold total system RAM, especially on a 64 bit system. */ ++unsigned long calc_mem_total() { + int ps; + char line[512]; + char *ptr; +@@ -810,11 +820,12 @@ + if (rc<0) + return 0; + +- if ((ptr = strstr(line, "Mem:")) == NULL) { ++ if ((ptr = strstr(line, "MemTotal:")) == NULL) { + return 0; + } else { +- ptr += 4; +- return atoi(ptr); ++ ptr += 9; /* move into whitespace */ ++ /* wbk - old Mem: Total was bytes. MemTotal: is KB */ ++ return (unsigned long)atoi(ptr) * 1024; + } + + } +@@ -825,10 +836,10 @@ + /******************************************/ + + #if defined(LINUX) +-void calc_mem_each(int total) { ++void calc_mem_each(unsigned long total) { + struct process *p = first_process; + while (p) { +- p->amount = 100*(float)p->rss/total; ++ p->amount = 100*(double)p->rss/total; + p = p->next; + } + } diff --git a/x11-plugins/wmtop/metadata.xml b/x11-plugins/wmtop/metadata.xml new file mode 100644 index 000000000000..afe75c47888f --- /dev/null +++ b/x11-plugins/wmtop/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>voyageur@gentoo.org</email> + <name>Bernard Cafarelli</name> +</maintainer> + +<longdescription> +wmtop is a WindowMaker dock app that displays the top 3 CPU-consuming processes +in graphical form - like 'top' but pretty and using less real estate on the +screen. It functions with just about any Linux distribution with a /proc +filesystem and FreeBSD. Under Linux, there is a switch to allow display of +physical memory usage rather than CPU usage. +</longdescription> +</pkgmetadata> diff --git a/x11-plugins/wmtop/wmtop-0.85.ebuild b/x11-plugins/wmtop/wmtop-0.85.ebuild new file mode 100644 index 000000000000..8a3119963afa --- /dev/null +++ b/x11-plugins/wmtop/wmtop-0.85.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools + +DESCRIPTION="dockapp for monitoring the top three processes using cpu or memory" +HOMEPAGE="http://www.dockapps.net/wmtop" +SRC_URI="https://dev.gentoo.org/~voyageur/distfiles/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="" + +RDEPEND=">=x11-libs/libdockapp-0.7:= + x11-libs/libX11 + x11-libs/libXpm + x11-libs/libXext" +DEPEND="${RDEPEND} + x11-proto/xproto" + +src_prepare() { + eapply_user + + eautoreconf +} diff --git a/x11-plugins/wmtop/wmtop-0.9.0-r1.ebuild b/x11-plugins/wmtop/wmtop-0.9.0-r1.ebuild new file mode 100644 index 000000000000..58122706d4df --- /dev/null +++ b/x11-plugins/wmtop/wmtop-0.9.0-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 +inherit eutils multilib toolchain-funcs + +DESCRIPTION="dockapp for monitoring the top three processes using cpu or memory" +HOMEPAGE="http://www.swanson.ukfsn.org/#wmtop" +SRC_URI="http://www.swanson.ukfsn.org/wmdock/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" + +RDEPEND="x11-libs/libX11 + x11-libs/libXpm + x11-libs/libXext" +DEPEND="${RDEPEND} + x11-proto/xproto + x11-proto/xextproto" + +src_prepare() { + sed -ie "s/\$(FLAGS) -o wmtop/\$(DEBUG) \$(LDFLAGS) -D\$(OS) -o wmtop/" Makefile || die "sed failed" + epatch "${FILESDIR}"/${P}-meminfo.patch + epatch "${FILESDIR}"/${P}-list.patch +} + +src_compile() { + emake CC="$(tc-getCC)" OPTS="${CFLAGS}" \ + LIBDIR="-L/usr/$(get_libdir)" \ + INCS="-I/usr/include/X11" linux +} + +src_install() { + dobin ${PN} + doman ${PN}.1 + dodoc BUGS CHANGES README TODO +} |