Gentoo Archives: gentoo-commits

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-plugins/wmload/files/
Date: Mon, 01 Jan 2018 21:04:12
Message-Id: 1514840486.d26214d02b1ee9ee5a6782ff0dbe010ba332e806.voyageur@gentoo
1 commit: d26214d02b1ee9ee5a6782ff0dbe010ba332e806
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Thu Dec 28 07:46:52 2017 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 1 21:01:26 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d26214d0
7
8 x11-plugins/wmload: remove unused patches
9
10 x11-plugins/wmload/files/wmload-0.9.2-prefix.patch | 11 --
11 .../files/wmload-ComplexProgramTargetNoMan.patch | 8 --
12 x11-plugins/wmload/files/wmload.solaris.patch | 141 ---------------------
13 3 files changed, 160 deletions(-)
14
15 diff --git a/x11-plugins/wmload/files/wmload-0.9.2-prefix.patch b/x11-plugins/wmload/files/wmload-0.9.2-prefix.patch
16 deleted file mode 100644
17 index 3ec43c570df..00000000000
18 --- a/x11-plugins/wmload/files/wmload-0.9.2-prefix.patch
19 +++ /dev/null
20 @@ -1,11 +0,0 @@
21 ---- Imakefile
22 -+++ Imakefile
23 -@@ -2,7 +2,7 @@
24 - DESTDIR = /usr/local
25 - BINDIR = /bin
26 -
27 --XPMLIB = -L/usr/lib/X11 -lXpm -lm
28 -+XPMLIB = `pkg-config xpm --libs` -lm
29 - DEPLIBS = $(DEPXLIB)
30 -
31 - LOCAL_LIBRARIES = $(XPMLIB) $(XLIB)
32
33 diff --git a/x11-plugins/wmload/files/wmload-ComplexProgramTargetNoMan.patch b/x11-plugins/wmload/files/wmload-ComplexProgramTargetNoMan.patch
34 deleted file mode 100644
35 index 8d3d25d6fa3..00000000000
36 --- a/x11-plugins/wmload/files/wmload-ComplexProgramTargetNoMan.patch
37 +++ /dev/null
38 @@ -1,8 +0,0 @@
39 ---- wmload-0.9.2/Imakefile~ Sat Dec 1 21:53:52 2001
40 -+++ wmload-0.9.2/Imakefile Sat Dec 1 21:53:52 2001
41 -@@ -14,4 +14,4 @@
42 - SRCS = wmload.c
43 - OBJS = wmload.o
44 -
45 --ComplexProgramTarget(wmload)
46 -+ComplexProgramTargetNoMan(wmload)
47
48 diff --git a/x11-plugins/wmload/files/wmload.solaris.patch b/x11-plugins/wmload/files/wmload.solaris.patch
49 deleted file mode 100644
50 index 788d4190aba..00000000000
51 --- a/x11-plugins/wmload/files/wmload.solaris.patch
52 +++ /dev/null
53 @@ -1,141 +0,0 @@
54 -* original: http://www.rampant.org/~dp/software/wmload.solaris.patch
55 -
56 ---- wmload.c
57 -+++ wmload.c
58 -@@ -6,6 +6,11 @@
59 - #include <math.h>
60 - #include <fcntl.h>
61 - #include <X11/Xatom.h>
62 -+#ifdef sun
63 -+#include <sys/types.h>
64 -+#include <sys/sysinfo.h>
65 -+#include <kstat.h>
66 -+#endif
67 -
68 - #include "back.xpm"
69 - #include "mask2.xbm"
70 -@@ -214,7 +219,7 @@
71 - NormalGC = XCreateGC(dpy, Root, gcm, &gcv);
72 -
73 - if (ONLYSHAPE) { /* try to make shaped window here */
74 -- pixmask = XCreateBitmapFromData(dpy, win, mask2_bits, mask2_width,
75 -+ pixmask = XCreateBitmapFromData(dpy, win, (char *)mask2_bits, mask2_width,
76 - mask2_height);
77 - XShapeCombineMask(dpy, win, ShapeBounding, 0, 0, pixmask, ShapeSet);
78 - XShapeCombineMask(dpy, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet);
79 -@@ -410,6 +415,107 @@
80 - return (char *)p;
81 - }
82 -
83 -+#ifdef sun
84 -+
85 -+static kstat_ctl_t *kc;
86 -+static kstat_t **cpu_ksp_list;
87 -+static int ncpus;
88 -+
89 -+void
90 -+cpu_stats_init()
91 -+{
92 -+ int i = 0;
93 -+ kstat_t *ksp;
94 -+ static int kstats_ready = 0;
95 -+
96 -+ if (!kstats_ready) {
97 -+ if ((kc = kstat_open()) == NULL) {
98 -+ fprintf(stderr,"wmload: can't open /dev/kstat\n");
99 -+ exit (1);
100 -+ }
101 -+ kstats_ready = 1;
102 -+ }
103 -+
104 -+ for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) {
105 -+ if (strcmp(ksp->ks_module, "cpu_stat") == 0)
106 -+ i++;
107 -+ }
108 -+
109 -+ if (cpu_ksp_list) {
110 -+ free(cpu_ksp_list);
111 -+ }
112 -+ cpu_ksp_list = (kstat_t **) calloc(i * sizeof (kstat_t *), 1);
113 -+ ncpus = i;
114 -+
115 -+ /*
116 -+ * stash the ksp for each CPU.
117 -+ */
118 -+ i = 0;
119 -+ for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) {
120 -+ if (strcmp(ksp->ks_module, "cpu_stat") == 0) {
121 -+ cpu_ksp_list[i] = ksp;
122 -+ i++;
123 -+ }
124 -+ }
125 -+}
126 -+
127 -+int
128 -+get_cpu_stats()
129 -+{
130 -+ int i;
131 -+ cpu_stat_t stat;
132 -+ static int firsttime = 1;
133 -+
134 -+ if (firsttime) {
135 -+ firsttime = 0;
136 -+ return (1); /* force code to go initialize kstat stuff */
137 -+ }
138 -+
139 -+ /*
140 -+ * Read each cpu's data. If the chain has changed (a state change
141 -+ * has happened, maybe a new cpu was added to the system), then
142 -+ * return 1. This will cause the code to reinitialize the cpu_ksp_list
143 -+ * array. word.
144 -+ */
145 -+ cp_time[0] = cp_time[1] = cp_time[2] = cp_time[3] = 0;
146 -+ for (i = 0; i < ncpus; i++) {
147 -+ if (kstat_read(kc, cpu_ksp_list[i], (void *) &stat) == -1)
148 -+ return (1);
149 -+ cp_time[0] += stat.cpu_sysinfo.cpu[CPU_USER]; /* user */
150 -+ cp_time[1] += stat.cpu_sysinfo.cpu[CPU_WAIT]; /* "nice" */
151 -+ cp_time[2] += stat.cpu_sysinfo.cpu[CPU_KERNEL]; /* sys */
152 -+ cp_time[3] += stat.cpu_sysinfo.cpu[CPU_IDLE]; /* idle ("free")*/
153 -+ }
154 -+ return (0);
155 -+}
156 -+
157 -+void GetLoad(int Maximum, int *usr, int *nice, int *sys, int *free)
158 -+{
159 -+ int total;
160 -+
161 -+ while (get_cpu_stats() != 0) {
162 -+ cpu_stats_init();
163 -+ }
164 -+
165 -+ *usr = cp_time[0] - last[0];
166 -+ *nice = cp_time[1] - last[1];
167 -+ *sys = cp_time[2] - last[2];
168 -+ *free = cp_time[3] - last[3];
169 -+
170 -+ /* printf("[%d %d %d %d]\n", *usr, *nice, *sys, *free); */
171 -+
172 -+ total = *usr + *nice + *sys + *free;
173 -+ last[0] = cp_time[0];
174 -+ last[1] = cp_time[1];
175 -+ last[2] = cp_time[2];
176 -+ last[3] = cp_time[3];
177 -+
178 -+ *usr = rint(Maximum * (float)(*usr) /total);
179 -+ *nice =rint(Maximum * (float)(*nice) /total);
180 -+ *sys = rint(Maximum * (float)(*sys) /total);
181 -+ *free = rint(Maximum * (float)(*free) /total);
182 -+}
183 -+#else /* sun */
184 - void GetLoad(int Maximum, int *usr, int *nice, int *sys, int *free)
185 - {
186 - char buffer[100];/*[4096+1];*/
187 -@@ -445,6 +551,7 @@
188 - *sys = rint(Maximum * (float)(*sys) /total);
189 - *free = rint(Maximum * (float)(*free) /total);
190 - }
191 -+#endif
192 -
193 - void InsertLoad()
194 - {