From af5c72ccd0319187bda6fd117b1a3c87e4e03394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Tue, 22 Sep 2020 11:56:27 +0000 Subject: [PATCH] Fix build with -fno-common While here add a license (extracted from the README file). Redistribution is only allowed free of charge. --- sysutils/xsysstats/Makefile | 7 ++++++- sysutils/xsysstats/files/LICENSE | 15 +++++++++++++++ sysutils/xsysstats/files/patch-Makefile.in | 6 +++--- sysutils/xsysstats/files/patch-porting.c | 12 ++++++++++++ sysutils/xsysstats/files/patch-xsysstats.c | 12 ++++++++++-- sysutils/xsysstats/files/patch-xsysstats.h | 18 +++++++++++++++--- 6 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 sysutils/xsysstats/files/LICENSE create mode 100644 sysutils/xsysstats/files/patch-porting.c diff --git a/sysutils/xsysstats/Makefile b/sysutils/xsysstats/Makefile index 6e57193ad041..bc0dd423f229 100644 --- a/sysutils/xsysstats/Makefile +++ b/sysutils/xsysstats/Makefile @@ -2,7 +2,7 @@ PORTNAME= xsysstats PORTVERSION= 1.51 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= sysutils MASTER_SITES= XCONTRIB/utilities DISTNAME= ${PORTNAME}${PORTVERSION} @@ -10,6 +10,11 @@ DISTNAME= ${PORTNAME}${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= System information display tool +LICENSE= MWEDEL +LICENSE_NAME= Marc Wedel non-commercial open source license +LICENSE_FILE= ${PATCHDIR}/LICENSE +LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept + GNU_CONFIGURE= yes USES= gmake xorg USE_XORG= x11 diff --git a/sysutils/xsysstats/files/LICENSE b/sysutils/xsysstats/files/LICENSE new file mode 100644 index 000000000000..e2692aa4d260 --- /dev/null +++ b/sysutils/xsysstats/files/LICENSE @@ -0,0 +1,15 @@ +LICENSE: + +XSysStats is Copyright (C) 1993, 1994, 1995, 1997, 2000 by Mark Wedel +(mwedel@scruz.net) + +XSysStats can be redistributed provided it is done free of charge. +XSysStats can also be modified, but original credit must be given to +Mark Wedel. + +XSysStats is provided as is. I take no responsibility for damage +or problems caused by the use of XSysStats. + +XSysStats was developed as a personal project on my home system. This is +not a product of my employer, Pyramid Technology, and they take no +responsibility of its use. diff --git a/sysutils/xsysstats/files/patch-Makefile.in b/sysutils/xsysstats/files/patch-Makefile.in index 2f28b5ad8033..ea91ffd4dd24 100644 --- a/sysutils/xsysstats/files/patch-Makefile.in +++ b/sysutils/xsysstats/files/patch-Makefile.in @@ -1,5 +1,5 @@ ---- Makefile.in.orig 2000-05-30 14:07:38.000000000 +0800 -+++ Makefile.in 2013-11-16 23:47:26.000000000 +0800 +--- Makefile.in.orig 2000-05-30 06:07:38 UTC ++++ Makefile.in @@ -1,6 +1,6 @@ -CC = @CC@ -CFLAGS = @CFLAGS@ @@ -10,7 +10,7 @@ LIBS = @LIBS@ LDFLAGS = @LDFLAGS@ -@@ -31,10 +31,8 @@ xysstats.o: xsysstats.c xsysstats.h conf +@@ -31,10 +31,8 @@ xysstats.o: xsysstats.c xsysstats.h config.h headers.h porting.o: xsysstats.c xsysstats.h config.h headers.h install: diff --git a/sysutils/xsysstats/files/patch-porting.c b/sysutils/xsysstats/files/patch-porting.c new file mode 100644 index 000000000000..12270da36a72 --- /dev/null +++ b/sysutils/xsysstats/files/patch-porting.c @@ -0,0 +1,12 @@ +--- porting.c.orig 2000-05-30 06:50:24 UTC ++++ porting.c +@@ -26,6 +26,9 @@ int rstat(char *host, struct statstime *stats) + + #ifdef USE_NEW_RSTAT + #include ++ ++int open_host(struct Host_Info *host); ++ + int + rstat_local(struct Host_Info *host, struct statstime *statval) + { diff --git a/sysutils/xsysstats/files/patch-xsysstats.c b/sysutils/xsysstats/files/patch-xsysstats.c index 7150d1f88d0d..adb8f2e4799f 100644 --- a/sysutils/xsysstats/files/patch-xsysstats.c +++ b/sysutils/xsysstats/files/patch-xsysstats.c @@ -1,8 +1,16 @@ ---- xsysstats.c.orig Sat Nov 9 08:44:11 2002 -+++ xsysstats.c Sat Nov 9 08:44:45 2002 +--- xsysstats.c.orig 2000-05-30 06:39:48 UTC ++++ xsysstats.c @@ -1,5 +1,4 @@ #include "xsysstats.h" -#include "headers.h" #include "patchlevel.h" struct base_types { +@@ -48,6 +47,7 @@ struct base_types types[NUM_TYPES] = { + {"icpu", "icpu", 100}, + }; + ++struct graph_info *graphs; + + /* Various notes: + * we store the values in the 'points' variable. They are stored in the diff --git a/sysutils/xsysstats/files/patch-xsysstats.h b/sysutils/xsysstats/files/patch-xsysstats.h index a7893e2917aa..290232f4a1fd 100644 --- a/sysutils/xsysstats/files/patch-xsysstats.h +++ b/sysutils/xsysstats/files/patch-xsysstats.h @@ -1,5 +1,5 @@ ---- xsysstats.h.orig Tue May 30 08:46:20 2000 -+++ xsysstats.h Sat Nov 9 08:43:29 2002 +--- xsysstats.h.orig 2000-05-30 06:46:20 UTC ++++ xsysstats.h @@ -15,12 +15,9 @@ #include #include @@ -13,7 +13,19 @@ #include #include -@@ -138,7 +135,7 @@ +@@ -115,8 +112,10 @@ struct graph_info { + short host_offset; + short window; /* What window to put this graph in */ + int max_val; /* maximum value this graph ever reached */ +-} *graphs; ++}; + ++extern struct graph_info *graphs; ++ + struct Xss_Window { + short x, y; /* Upper left corner of window */ + short width,height; /* width and height of the window. height +@@ -138,7 +137,7 @@ struct Host_Info { char *name; /*Name of the host */ #ifdef USE_NEW_RSTAT CLIENT *client; /* client connection for rstat */