[Pkg-wmaker-commits] [wmcube] 55/67: debian/patches: Remove directory; patches applied upstream.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Tue Aug 25 03:22:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmcube.
commit f42b3b92bb41c9d09a038a27868fa6c139a90cbc
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Thu Feb 19 20:01:48 2015 -0600
debian/patches: Remove directory; patches applied upstream.
---
debian/patches/30_bts-386850_fix_smp.patch | 39 ---------
debian/patches/40_bts-357072_long_uptime_fix.patch | 29 -------
debian/patches/fix_-Wunused-result.patch | 86 --------------------
debian/patches/fix_cppcheck_warnings.patch | 22 ------
debian/patches/fix_grammar.patch | 24 ------
debian/patches/freebsd_sysctl.patch | 92 ----------------------
debian/patches/series | 7 --
debian/patches/update_makefile.patch | 69 ----------------
8 files changed, 368 deletions(-)
diff --git a/debian/patches/30_bts-386850_fix_smp.patch b/debian/patches/30_bts-386850_fix_smp.patch
deleted file mode 100644
index ab7aed0..0000000
--- a/debian/patches/30_bts-386850_fix_smp.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Description: Fix smp support, reading all the fields in /proc/stat.
-Author: Sandro Tosi <matrixhasu at gmail.com>
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=386850
-Last-Update: 2015-01-12
-
---- a/wmcube/wmcube.c
-+++ b/wmcube/wmcube.c
-@@ -1118,6 +1118,7 @@
- int i;
- char cpuid[6];
- char check_cpu[6];
-+ char tmp[32];
-
- sprintf(check_cpu, "cpu%d", which_cpu);
-
-@@ -1130,7 +1131,7 @@
- return 0;
-
- for (i = -2; i < which_cpu; i++) {
-- fscanf(fp, "%s", cpuid);
-+ fscanf(fp, "%5s %31s %31s %31s %31s %31s %31s %31s %31s", cpuid, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp);
- }
-
- if (strcmp(check_cpu,cpuid) != 0) {
-@@ -1146,12 +1147,13 @@
- static int previous_total = 0, previous_used = 0;
- char cpuid[6];
- int cpu,nice,system,idle;
-+ char tmp[32];
- FILE *fp;
-
- fp = fopen("/proc/stat","rt");
-
- for (i = -2; i < which_cpu; i++) {
-- fscanf(fp,"%s %d %d %d %d",cpuid,&cpu,&nice,&system,&idle);
-+ fscanf(fp,"%5s %d %d %d %d %31s %31s %31s %31s", cpuid, &cpu, &nice, &system, &idle, tmp, tmp, tmp, tmp);
- }
-
- fclose(fp);
diff --git a/debian/patches/40_bts-357072_long_uptime_fix.patch b/debian/patches/40_bts-357072_long_uptime_fix.patch
deleted file mode 100644
index 6c5168a..0000000
--- a/debian/patches/40_bts-357072_long_uptime_fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Description: Fix execution on machine with long uptime.
-Author: Sandro Tosi <matrixhasu at gmail.com>
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357072
-Last-Update: 2015-01-12
-
---- a/wmcube/wmcube.c
-+++ b/wmcube/wmcube.c
-@@ -1143,17 +1143,18 @@
- }
-
- int calc_cpu_total() {
-- int total, used, t=0, i;
-+ unsigned int total, used;
-+ int t=0, i;
- static int previous_total = 0, previous_used = 0;
- char cpuid[6];
-- int cpu,nice,system,idle;
-+ unsigned int cpu,nice,system,idle;
- char tmp[32];
- FILE *fp;
-
- fp = fopen("/proc/stat","rt");
-
- for (i = -2; i < which_cpu; i++) {
-- fscanf(fp,"%5s %d %d %d %d %31s %31s %31s %31s", cpuid, &cpu, &nice, &system, &idle, tmp, tmp, tmp, tmp);
-+ fscanf(fp,"%5s %u %u %u %u %31s %31s %31s %31s", cpuid, &cpu, &nice, &system, &idle, tmp, tmp, tmp, tmp);
- }
-
- fclose(fp);
diff --git a/debian/patches/fix_-Wunused-result.patch b/debian/patches/fix_-Wunused-result.patch
deleted file mode 100644
index 5dde6e6..0000000
--- a/debian/patches/fix_-Wunused-result.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-Description: Fix -Wunused-result compiler warnings.
- Also add a space at the end of the format reading line and plane coordinates.
- Otherwise, we get a false positive in object files ending in a newline.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2015-01-13
-
---- a/wmcube/wmcube.c
-+++ b/wmcube/wmcube.c
-@@ -992,7 +992,8 @@
- exit(0);
- }
-
-- fscanf(fp,"%s",tmp);
-+ if (fscanf(fp,"%s",tmp) < 1)
-+ printf("WARNING: Could not read first line of object-file (%s).\n",filename);
-
- if (strcmp(tmp,"WMCUBE_COORDINATES") != 0) {
- printf("\nError in objectfile: it must start with WMCUBE_COORDINATES\n\n");
-@@ -1000,13 +1001,15 @@
- exit(0);
- }
-
-- fscanf(fp,"%s",tmp);
-+ if (fscanf(fp,"%s",tmp) < 1)
-+ printf("WARNING: Could not read second line of object-file (%s).\n",filename);
-
- while ((strcmp(tmp,"WMCUBE_LINES") != 0) && (strcmp(tmp,"WMCUBE_PLANES") != 0)) {
-
- matrix = (float **)realloc(matrix,(i+1)*sizeof(float *)); mem_alloc_error(matrix);
- matrix[i] = (float *)malloc(3*sizeof(float)); mem_alloc_error(matrix[i]);
-- fscanf(fp,"%f %f %f",&matrix[i][0],&matrix[i][1],&matrix[i][2]);
-+ if (fscanf(fp,"%f %f %f",&matrix[i][0],&matrix[i][1],&matrix[i][2]) < 3 )
-+ printf("WARNING: Could not read coordinates in object-file (%s).\n",filename);
- //printf("\n%d: %f %f %f",atoi(tmp), matrix[i][0],matrix[i][1],matrix[i][2]);
-
- if (atoi(tmp) != (++i)) {
-@@ -1016,7 +1019,8 @@
- fclose(fp);
- exit(0);
- }
-- fscanf(fp,"%s",tmp);
-+ if (fscanf(fp,"%s",tmp) < 1)
-+ printf("WARNING: Could not read next line of object-file (%s).\n",filename);
-
- if (feof(fp)) {
- printf("\nError in objectfile: you must have a section WMCUBE_LINES or WMCUBE_PLANES\n\n");
-@@ -1034,7 +1038,8 @@
- while (1) {
-
- cline = (int *)realloc(cline,(i+2)*sizeof(int)); mem_alloc_error(cline);
-- fscanf(fp,"%d %d",&cline[i],&cline[i+1]);
-+ if (fscanf(fp,"%d %d ",&cline[i],&cline[i+1]) < 2)
-+ printf("WARNING: Could not read line coordinates in object-file (%s).\n",filename);
- i += 2;
- //printf("\n%d %d",cline[i-2],cline[i-1]);
- if (feof(fp)) break;
-@@ -1054,7 +1059,8 @@
- while (1) {
- planes = (int **)realloc(planes,(i+1)*sizeof(int *)); mem_alloc_error(planes);
- planes[i] = (int *)malloc(3*sizeof(int)); mem_alloc_error(planes[i]);
-- fscanf(fp,"%d %d %d",&planes[i][0],&planes[i][1],&planes[i][2]);
-+ if (fscanf(fp,"%d %d %d ",&planes[i][0],&planes[i][1],&planes[i][2]) < 3)
-+ printf("WARNING: Could not read plane coordinates in object-file (%s).\n",filename);
- //printf("\n%d: %d %d %d",i,planes[i][0],planes[i][1],planes[i][2]);
-
- planes[i][0]--; planes[i][1]--; planes[i][2]--;
-@@ -1131,7 +1137,8 @@
- return 0;
-
- for (i = -2; i < which_cpu; i++) {
-- fscanf(fp, "%5s %31s %31s %31s %31s %31s %31s %31s %31s", cpuid, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp);
-+ if (fscanf(fp, "%5s %31s %31s %31s %31s %31s %31s %31s %31s", cpuid, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp) < 1)
-+ fprintf(stderr, "WARNING: could not read cpuid from /proc/stat\n");
- }
-
- if (strcmp(check_cpu,cpuid) != 0) {
-@@ -1154,7 +1161,8 @@
- fp = fopen("/proc/stat","rt");
-
- for (i = -2; i < which_cpu; i++) {
-- fscanf(fp,"%5s %u %u %u %u %31s %31s %31s %31s", cpuid, &cpu, &nice, &system, &idle, tmp, tmp, tmp, tmp);
-+ if (fscanf(fp,"%5s %u %u %u %u %31s %31s %31s %31s", cpuid, &cpu, &nice, &system, &idle, tmp, tmp, tmp, tmp) < 5)
-+ fprintf(stderr, "WARNING: could not read statistics from /proc/stat\n");
- }
-
- fclose(fp);
diff --git a/debian/patches/fix_cppcheck_warnings.patch b/debian/patches/fix_cppcheck_warnings.patch
deleted file mode 100644
index 339b2d3..0000000
--- a/debian/patches/fix_cppcheck_warnings.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Description: Fix warnings found by cppcheck.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2015-01-14
-
---- a/wmcube/wmcube.c
-+++ b/wmcube/wmcube.c
-@@ -434,6 +434,7 @@
- usleep(9000);
- }
-
-+ free(tmp);
- zoff = 3600;
- }
-
-@@ -1143,6 +1144,7 @@
- "sure you have an SMP system?\n",check_cpu);
- return -1;
- }
-+ fclose(fp);
- return (0);
- }
-
diff --git a/debian/patches/fix_grammar.patch b/debian/patches/fix_grammar.patch
deleted file mode 100644
index 3be3585..0000000
--- a/debian/patches/fix_grammar.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Description: Fix grammar in error message.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2015-01-14
-
---- a/wmcube/wmcube.c
-+++ b/wmcube/wmcube.c
-@@ -1043,7 +1043,7 @@
-
- if (cline[i-2] > nofcoords || cline[i-1] > nofcoords) {
- printf("\nError in objectfile (WMCUBE_LINES section):\n"
-- "coordinates %d or/and %d doesnt exist\n\n",cline[i-2],cline[i-1]);
-+ "coordinates %d and/or %d don't exist\n\n",cline[i-2],cline[i-1]);
- fclose(fp);
- exit(0);
- }
-@@ -1067,7 +1067,7 @@
-
- if (planes[i][0] > nofcoords || planes[i][1] > nofcoords || planes[i][2] > nofcoords) {
- printf("\nError in objectfile (WMCUBE_PLANES section):\n"
-- "coordinates %d or/and %d or/and %d doesnt exist\n\n",planes[i][0],planes[i][1],planes[i][2]);
-+ "coordinates %d and/or %d and/or %d don't exist\n\n",planes[i][0],planes[i][1],planes[i][2]);
- fclose(fp);
- exit(0);
- }
diff --git a/debian/patches/freebsd_sysctl.patch b/debian/patches/freebsd_sysctl.patch
deleted file mode 100644
index 084ee48..0000000
--- a/debian/patches/freebsd_sysctl.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-Description: Use sysctl instead of kvm to get cpu stats on kfreebsd.
- This lets avoids avoid a setgid binary and a dependency on libkvm. Based on
- similar patches for wmbubble [1,2].
- .
- [1] https://github.com/rnjacobs/wmbubble/commit/19794d2
- [2] https://github.com/rnjacobs/wmbubble/commit/3e74615
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2015-01-14
-
---- a/wmcube/wmcube.c
-+++ b/wmcube/wmcube.c
-@@ -58,7 +58,9 @@
- #include <X11/extensions/shape.h>
-
- #ifdef FREEBSD
--#include <kvm.h>
-+#include <sys/resource.h>
-+#include <sys/sysctl.h>
-+#include <errno.h>
- #endif
-
- #include "../wmgeneral/wmgeneral.h"
-@@ -143,11 +145,6 @@
-
- float lum_vector[3] = { 0, 0, 100 }; // Lightsource vector
-
--#ifdef FREEBSD
--static kvm_t *kd;
--static struct nlist nlst[] = { {"_cp_time"}, {0} };
--#endif
--
- char obj_filename[256];
- char *plugin = {""};
-
-@@ -1311,26 +1308,28 @@
- }
-
- #elif defined FREEBSD
--#include <nlist.h>
--#include <fcntl.h>
--#include <sys/dkstat.h>
-
- int init_calc_cpu()
- {
-+ return 0;
-+}
-
-- if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) == NULL)
-- {
-- printf("\nError: unable to open kvm\n\n");
-- exit(0);
-- }
-- kvm_nlist(kd, nlst);
-- if (nlst[0].n_type == 0)
-- {
-- printf("\nError: unable to get nlist\n\n");
-- exit(1);
-- }
-+#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
-
-- return 0;
-+static void getsysctl(const char *name, void *ptr, size_t len)
-+{
-+ size_t nlen = len;
-+
-+ if (sysctlbyname(name, ptr, &nlen, NULL, 0) == -1) {
-+ fprintf(stderr, "sysctl(%s...) failed: %s\n", name,
-+ strerror(errno));
-+ exit(1);
-+ }
-+ if (nlen != len) {
-+ fprintf(stderr, "sysctl(%s...) expected %lu, got %lu\n",
-+ name, (unsigned long)len, (unsigned long)nlen);
-+ exit(1);
-+ }
- }
-
- int calc_cpu_total() {
-@@ -1339,12 +1338,7 @@
- int cpu,nice,system,idle;
- unsigned long int cpu_time[CPUSTATES];
-
-- if (kvm_read(kd, nlst[0].n_value, &cpu_time, sizeof(cpu_time))
-- != sizeof(cpu_time))
-- {
-- printf("\nError reading kvm\n\n");
-- exit(0);
-- }
-+ GETSYSCTL("kern.cp_time", cpu_time);
-
- cpu = cpu_time[CP_USER];
- nice = cpu_time[CP_NICE];
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index effee9a..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,7 +0,0 @@
-30_bts-386850_fix_smp.patch
-40_bts-357072_long_uptime_fix.patch
-update_makefile.patch
-fix_-Wunused-result.patch
-freebsd_sysctl.patch
-fix_grammar.patch
-fix_cppcheck_warnings.patch
diff --git a/debian/patches/update_makefile.patch b/debian/patches/update_makefile.patch
deleted file mode 100644
index 6bb086f..0000000
--- a/debian/patches/update_makefile.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Description: Update Makefile.
- In particular,
- - Change doc installation directory to avoid FSSTND-dir-in-usr Lintian error.
- - Separate OS from CFLAGS so user doesn't accidentally forget about it.
- - Honor CPPFLAGS and LDFLAGS build flags.
- - Honor DESTDIR variable.
- - Create binary installation directory.
- - Install *.wmc only in /usr/share/wmcube. (Previously they were also
- installed in /usr/share/doc/wmcube/3D-objects.)
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2015-01-14
-
---- a/wmcube/Makefile
-+++ b/wmcube/Makefile
-@@ -7,14 +7,14 @@
-
- PREFIX = /usr
- BINDIR = $(PREFIX)/bin
--DOCDIR = $(PREFIX)/doc/wmcube-1.0.0
-+DOCDIR = $(PREFIX)/share/doc/wmcube
- OBJDIR = $(PREFIX)/share/wmcube
-
- # Edit OSLIBS as appropriate to include OS specific libraries.
-
- OSLIBS =
- LIBS = -lXpm -lXext -lX11 -lm $(OSLIBS)
--CFLAGS = -Wall -O2 $(OS)
-+CFLAGS = -Wall -O2
-
- OBJS = wmcube.o \
- ../wmgeneral/wmgeneral.o \
-@@ -22,10 +22,10 @@
- ../wmgeneral/list.o
-
- .c.o:
-- $(CC) $(CFLAGS) $(INCDIR) -c $< -o $*.o
-+ $(CC) $(OS) $(CPPFLAGS) $(CFLAGS) $(INCDIR) -c $< -o $*.o
-
- wmcube: $(OBJS)
-- $(CC) -o wmcube $^ -lXext $(LIBDIR) $(LIBS)
-+ $(CC) $(LDFLAGS) -o wmcube $^ -lXext $(LIBDIR) $(LIBS)
-
- all:: wmcube
-
-@@ -37,14 +37,16 @@
- rm -f *~
-
- install:: wmcube
-- cp -f wmcube $(BINDIR)
-- chmod 755 $(BINDIR)/wmcube
-- chown root:root $(BINDIR)/wmcube
-- mkdir -p $(DOCDIR)
-- cp -p ../CHANGES ../COPYING ../INSTALL ../README $(DOCDIR)
-- cp -pr ../3D-objects $(DOCDIR)
-- mkdir -p $(OBJDIR)
-- cp -p ../3D-objects/* $(OBJDIR)
-+ mkdir -p $(DESTDIR)$(BINDIR)
-+ cp -f wmcube $(DESTDIR)$(BINDIR)
-+ chmod 755 $(DESTDIR)$(BINDIR)/wmcube
-+ chown root:root $(DESTDIR)$(BINDIR)/wmcube
-+ mkdir -p $(DESTDIR)$(DOCDIR)
-+ cp -p ../CHANGES ../COPYING ../INSTALL ../README $(DESTDIR)$(DOCDIR)
-+ mkdir -p $(DESTDIR)$(DOCDIR)/3D-objects
-+ cp -pr ../3D-objects/README ../3D-objects/CONTRIBUTE $(DESTDIR)$(DOCDIR)/3D-objects
-+ mkdir -p $(DESTDIR)$(OBJDIR)
-+ cp -p ../3D-objects/* $(DESTDIR)$(OBJDIR)
- @echo "wmcube installation finished..."
-
- uninstall::
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmcube.git
More information about the Pkg-wmaker-commits
mailing list