Update to 2.3.5.
This commit is contained in:
parent
342bec04df
commit
373c339e8f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=262614
6 changed files with 68 additions and 166 deletions
|
@ -6,8 +6,8 @@
|
|||
#
|
||||
|
||||
PORTNAME= gkrellm
|
||||
PORTVERSION= 2.3.4
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 2.3.5
|
||||
#PORTREVISION= 0
|
||||
CATEGORIES= sysutils ipv6
|
||||
MASTER_SITES= http://members.dslextreme.com/users/billw/gkrellm/ \
|
||||
${MASTER_SITE_LOCAL}
|
||||
|
@ -22,7 +22,8 @@ USE_RC_SUBR= gkrellmd.sh
|
|||
WANT_GNOME= yes
|
||||
USE_OPENSSL= yes # cannot set after bsd.port.pre.mk
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME:C/[a-z]$//}
|
||||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
OPTIONS= GKRELLM_CLIENT "Enable GKrellM Client" on \
|
||||
GNUTLS "Use GnuTLS" off \
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (gkrellm-2.3.4.tar.bz2) = 270917784da6bf1292aba0c82af726d6
|
||||
SHA256 (gkrellm-2.3.4.tar.bz2) = 3447b169134d220f30a42cef2e2f9c8a0141d4ddfdf7dd4c3bbae278fb154f56
|
||||
SIZE (gkrellm-2.3.4.tar.bz2) = 757875
|
||||
MD5 (gkrellm-2.3.5.tar.bz2) = e43a9416a6975e3be63d591bdeb33b04
|
||||
SHA256 (gkrellm-2.3.5.tar.bz2) = 702b5b0e9c040eb3af8e157453f38dd6f53e1dcd8b1272d20266cda3d4372c8b
|
||||
SIZE (gkrellm-2.3.5.tar.bz2) = 765011
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Index: server/Makefile
|
||||
diff -u server/Makefile.orig server/Makefile
|
||||
--- server/Makefile.orig 2008-10-04 06:52:48.000000000 +0900
|
||||
+++ server/Makefile 2008-10-04 19:48:15.000000000 +0900
|
||||
--- server/Makefile.orig 2010-10-03 01:21:01.000000000 +0900
|
||||
+++ server/Makefile 2010-10-06 17:37:18.470213785 +0900
|
||||
@@ -26,6 +26,7 @@
|
||||
MANMODE ?= 644
|
||||
MANDIRMODE ?= 755
|
||||
|
@ -10,7 +10,7 @@ diff -u server/Makefile.orig server/Makefile
|
|||
LINK_FLAGS ?= -Wl,-E
|
||||
EXTRAOBJS =
|
||||
|
||||
@@ -56,18 +57,18 @@
|
||||
@@ -57,18 +58,18 @@
|
||||
PKG_INCLUDE = `$(PKG_CONFIG) --cflags glib-2.0 gthread-2.0`
|
||||
PKG_LIB = `$(PKG_CONFIG) --libs glib-2.0 gmodule-2.0 gthread-2.0`
|
||||
|
||||
|
@ -35,18 +35,19 @@ diff -u server/Makefile.orig server/Makefile
|
|||
|
||||
LIBS = $(PKG_LIB)
|
||||
ifeq ($(glib12),1)
|
||||
@@ -116,21 +117,33 @@
|
||||
@@ -115,20 +116,31 @@
|
||||
|
||||
all: gkrellmd
|
||||
|
||||
-gkrellmd: $(OBJS) $(EXTRAOBJS)
|
||||
+gkrellmd: gkrellmd.pc $(OBJS) $(EXTRAOBJS)
|
||||
$(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd $(LIBS) $(LINK_FLAGS)
|
||||
$(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd \
|
||||
$(LDFLAGS) $(LIBS) $(LINK_FLAGS)
|
||||
|
||||
-static: $(OBJS) $(EXTRAOBJS)
|
||||
+static: gkrellmd.pc $(OBJS) $(EXTRAOBJS)
|
||||
$(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd.static -static \
|
||||
$(LIBS) $(LINK_FLAGS)
|
||||
$(LDFLAGS) $(LIBS) $(LINK_FLAGS)
|
||||
|
||||
+gkrellmd.pc: Makefile
|
||||
+ echo "prefix=$(INSTALLROOT)" > gkrellmd.pc
|
||||
|
@ -57,23 +58,20 @@ diff -u server/Makefile.orig server/Makefile
|
|||
+ echo "Cflags: -I$(INCLUDEDIR)" >> gkrellmd.pc
|
||||
+
|
||||
freebsd2:
|
||||
$(MAKE) GTK_CONFIG=gtk12-config \
|
||||
EXTRAOBJS= SYS_LIBS="-lkvm -lmd" gkrellmd
|
||||
$(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -lmd" gkrellmd
|
||||
|
||||
-freebsd3 freebsd:
|
||||
+freebsd3 freebsd4:
|
||||
$(MAKE) GTK_CONFIG=gtk12-config \
|
||||
EXTRAOBJS= SYS_LIBS="-lkvm -ldevstat -lmd" gkrellmd
|
||||
$(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -ldevstat -lmd" gkrellmd
|
||||
|
||||
+freebsd5 freebsd6 freebsd7 freebsd8 freebsd:
|
||||
+ $(MAKE) GTK_CONFIG=gtk12-config \
|
||||
+ EXTRAOBJS= SYS_LIBS="-ldevstat -lmd" gkrellmd
|
||||
+ $(MAKE) EXTRAOBJS= SYS_LIBS="-ldevstat -lmd" gkrellmd
|
||||
+
|
||||
# Darwin target for systems that still have libkvm
|
||||
darwin:
|
||||
$(MAKE) GTK_CONFIG=gtk-config STRIP= \
|
||||
EXTRAOBJS= SYS_LIBS="-lkvm -lmd5" \
|
||||
@@ -175,7 +188,7 @@
|
||||
SYS_LIBS=" -llargeint -lws2_32 -lpdh -lnetapi32 -liphlpapi -lntdll -lintl" \
|
||||
$(MAKE) STRIP= HAVE_GETADDRINFO=1 \
|
||||
@@ -176,7 +188,7 @@
|
||||
SYS_LIBS="-lws2_32 -lwtsapi32 -lpdh -lnetapi32 -liphlpapi -lintl" \
|
||||
gkrellmd
|
||||
|
||||
-install: install_bin install_inc install_man
|
||||
|
@ -81,7 +79,7 @@ diff -u server/Makefile.orig server/Makefile
|
|||
|
||||
install_bin:
|
||||
$(INSTALL) -d -m $(INSTALLDIRMODE) $(SINSTALLDIR)
|
||||
@@ -187,15 +200,20 @@
|
||||
@@ -188,15 +200,20 @@
|
||||
|
||||
install_man:
|
||||
$(INSTALL) -d -m $(MANDIRMODE) $(SMANDIR)
|
||||
|
@ -103,7 +101,7 @@ diff -u server/Makefile.orig server/Makefile
|
|||
|
||||
install_darwin install_darwin9 install_macosx:
|
||||
$(MAKE) install STRIP=
|
||||
@@ -226,6 +244,7 @@
|
||||
@@ -227,6 +244,7 @@
|
||||
clean:
|
||||
$(RM) *.o *~ *.bak configure.h configure.log gkrellmd gkrellmd.exe \
|
||||
libgkrellmd.a core
|
||||
|
|
|
@ -1,44 +1,51 @@
|
|||
Index: src/configure
|
||||
diff -u src/configure.orig src/configure
|
||||
--- src/configure.orig 2009-12-21 10:47:44.000000000 +0900
|
||||
+++ src/configure 2009-12-22 10:45:51.692711734 +0900
|
||||
@@ -60,8 +60,8 @@
|
||||
}
|
||||
EOF
|
||||
--- src/configure.orig 2010-09-14 23:40:38.000000000 +0900
|
||||
+++ src/configure 2010-10-06 17:48:28.286565914 +0900
|
||||
@@ -46,8 +46,8 @@
|
||||
echo -n "Checking for OpenSSL... "
|
||||
echo "Checking for OpenSSL... " 1>& 5
|
||||
|
||||
-$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5
|
||||
-$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lssl -lcrypto 2>& 5
|
||||
+$CC ${PKG_INCLUDE} -I${OPENSSLINC} -c test.c -o test.o 2>& 5
|
||||
+$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -L${OPENSSLLIB} -lssl -lcrypto 2>& 5
|
||||
|
||||
if [ -x ./test ] && ./test
|
||||
-OPENSSL_INCLUDE="$(pkg-config openssl --cflags 2>& 5 || true)"
|
||||
-OPENSSL_LIBS="$(pkg-config openssl --libs 2>& 5 || true)"
|
||||
+OPENSSL_INCLUDE="-I${OPENSSLINC}"
|
||||
+OPENSSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto"
|
||||
if [ -z "$OPENSSL_LIBS" ]
|
||||
then
|
||||
@@ -106,8 +106,8 @@
|
||||
echo "OpenSSL not found via pkg-config, using hardcoded library names" 1>& 5
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
EOF
|
||||
|
||||
-$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5
|
||||
-$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lgnutls-openssl 2>& 5
|
||||
+$CC ${PKG_INCLUDE} -I${GNUTLSINC} -c test.c -o test.o 2>& 5
|
||||
+$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -L${GNUTLSLIB} -lgnutls-openssl 2>& 5
|
||||
-$CC ${CFLAGS} ${GTK_INCLUDE} ${OPENSSL_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||
+$CC ${GTK_INCLUDE} ${OPENSSL_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||
$CC test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${OPENSSL_LIBS} 2>& 5 || true
|
||||
|
||||
if [ -x ./test ] && ./test
|
||||
then
|
||||
@@ -145,7 +145,7 @@
|
||||
@@ -117,7 +117,7 @@
|
||||
}
|
||||
EOF
|
||||
|
||||
-$CC ${CFLAGS} ${PKG_INCLUDE} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5
|
||||
+$CC ${PKG_INCLUDE} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5
|
||||
$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} ${PKG_NTLM_LIBS} -lntlm 2>& 5
|
||||
-${CC} ${CFLAGS} ${GTK_INCLUDE} ${GNUTLS_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||
+${CC} ${GTK_INCLUDE} ${GNUTLS_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||
${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${GNUTLS_LIBS} 2>& 5 || true
|
||||
|
||||
if [ -x ./test ] && ./test
|
||||
@@ -191,7 +191,7 @@
|
||||
@@ -159,7 +159,7 @@
|
||||
}
|
||||
EOF
|
||||
|
||||
-$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5
|
||||
+$CC ${PKG_INCLUDE} -c test.c -o test.o 2>& 5
|
||||
$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lsensors 2>& 5
|
||||
-${CC} ${CFLAGS} ${GTK_INCLUDE} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||
+${CC} ${GTK_INCLUDE} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||
${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${PKG_NTLM_LIBS} 2>& 5 || true
|
||||
|
||||
if [ -x ./test ] && ./test
|
||||
@@ -209,7 +209,7 @@
|
||||
}
|
||||
EOF
|
||||
|
||||
-${CC} ${CFLAGS} ${GTK_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||
+${CC} ${GTK_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||
${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} -lsensors 2>& 5 || true
|
||||
|
||||
if [ -x ./test ] && ./test
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
Index: src/sysdeps/freebsd.c
|
||||
diff -u -p src/sysdeps/freebsd.c.orig src/sysdeps/freebsd.c
|
||||
--- src/sysdeps/freebsd.c.orig 2010-01-05 08:12:21.000000000 +0900
|
||||
+++ src/sysdeps/freebsd.c 2010-01-19 20:13:55.380695497 +0900
|
||||
@@ -255,7 +255,11 @@ pcpu_probe_done:
|
||||
|
||||
#include <limits.h>
|
||||
#include <paths.h>
|
||||
+#if __FreeBSD_version < 900007
|
||||
#include <utmp.h>
|
||||
+#else
|
||||
+#include <utmpx.h>
|
||||
+#endif
|
||||
|
||||
static int oid_v_forks[CTL_MAXNAME + 2];
|
||||
static int oid_v_vforks[CTL_MAXNAME + 2];
|
||||
@@ -364,12 +368,20 @@ gkrellm_sys_proc_read_users(void)
|
||||
gint n_users;
|
||||
struct stat sb, s;
|
||||
gchar ttybuf[MAXPATHLEN];
|
||||
+#ifdef _PATH_UTMP
|
||||
FILE *ut;
|
||||
struct utmp utmp;
|
||||
+#define UTMP_FILE _PATH_UTMP
|
||||
+#else
|
||||
+ struct utmpx *utmp;
|
||||
+#define UTMP_FILE "/var/run/utx.active"
|
||||
+#endif
|
||||
static time_t utmp_mtime;
|
||||
|
||||
- if (stat(_PATH_UTMP, &s) != 0 || s.st_mtime == utmp_mtime)
|
||||
+ if (stat(UTMP_FILE, &s) != 0 || s.st_mtime == utmp_mtime)
|
||||
return;
|
||||
+
|
||||
+#ifdef _PATH_UTMP
|
||||
if ((ut = fopen(_PATH_UTMP, "r")) != NULL)
|
||||
{
|
||||
n_users = 0;
|
||||
@@ -379,14 +391,30 @@ gkrellm_sys_proc_read_users(void)
|
||||
continue;
|
||||
(void)snprintf(ttybuf, sizeof(ttybuf), "%s/%s",
|
||||
_PATH_DEV, utmp.ut_line);
|
||||
- /* corrupted record */
|
||||
if (stat(ttybuf, &sb))
|
||||
- continue;
|
||||
+ continue; /* corrupted record */
|
||||
++n_users;
|
||||
}
|
||||
(void)fclose(ut);
|
||||
gkrellm_proc_assign_users(n_users);
|
||||
}
|
||||
+#else
|
||||
+ setutxent();
|
||||
+ n_users = 0;
|
||||
+ while ((utmp = getutxent()) != NULL)
|
||||
+ {
|
||||
+ if (utmp->ut_type != USER_PROCESS)
|
||||
+ continue;
|
||||
+ (void)snprintf(ttybuf, sizeof(ttybuf), "%s/%s",
|
||||
+ _PATH_DEV, utmp->ut_line);
|
||||
+ if (stat(ttybuf, &sb))
|
||||
+ continue; /* corrupted record */
|
||||
+ ++n_users;
|
||||
+ }
|
||||
+ endutxent();
|
||||
+ gkrellm_proc_assign_users(n_users);
|
||||
+#endif
|
||||
+
|
||||
utmp_mtime = s.st_mtime;
|
||||
}
|
||||
|
|
@ -1,60 +1,27 @@
|
|||
Index: src/Makefile
|
||||
diff -u src/Makefile.orig src/Makefile
|
||||
--- src/Makefile.orig 2008-10-15 07:06:30.000000000 +0900
|
||||
+++ src/Makefile 2009-12-22 10:55:44.127838425 +0900
|
||||
@@ -51,7 +51,9 @@
|
||||
ifeq ($(without-ntlm),1)
|
||||
--- src/Makefile.orig 2010-10-03 01:21:01.000000000 +0900
|
||||
+++ src/Makefile 2010-10-06 17:59:25.769707368 +0900
|
||||
@@ -53,7 +53,8 @@
|
||||
CONFIGURE_ARGS += --without-ntlm
|
||||
endif
|
||||
# run configure shell script
|
||||
-DUMMY_VAR := $(shell ./configure $(CONFIGURE_ARGS))
|
||||
+DUMMY_VAR := $(shell env OPENSSLINC=$(OPENSSLINC) OPENSSLLIB=$(OPENSSLLIB) \
|
||||
+ GNUTLSINC=$(GNUTLSINC) GNUTLSLIB=$(GNUTLSLIB) \
|
||||
+ ./configure $(CONFIGURE_ARGS))
|
||||
# pull in variables set by configure script
|
||||
include configure.mk
|
||||
|
||||
HAVE_GNUTLS = $(shell grep -c HAVE_GNUTLS configure.h)
|
||||
HAVE_SSL = $(shell grep -c HAVE_SSL configure.h)
|
||||
@@ -59,10 +61,10 @@
|
||||
HAVE_LIBSENSORS = $(shell grep -c HAVE_LIBSENSORS configure.h)
|
||||
|
||||
ifeq ($(HAVE_GNUTLS),1)
|
||||
- SSL_LIBS ?= -lgnutls-openssl
|
||||
+ SSL_LIBS ?= -L$(GNUTLSLIB) -lgnutls-openssl
|
||||
else
|
||||
ifeq ($(HAVE_SSL),1)
|
||||
- SSL_LIBS ?= -lssl -lcrypto
|
||||
+ SSL_LIBS ?= -L$(OPENSSLLIB) -lssl -lcrypto
|
||||
else
|
||||
EXTRAOBJS ?= md5c.o
|
||||
endif
|
||||
@@ -85,9 +87,17 @@
|
||||
@@ -71,7 +72,7 @@
|
||||
PKG_INCLUDE = `$(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0`
|
||||
PKG_LIB = `$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0`
|
||||
|
||||
-FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC) \
|
||||
+FLAGS = -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC) \
|
||||
${NTLM_INCLUDES} -DGKRELLM_CLIENT
|
||||
-FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\
|
||||
+FLAGS = -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\
|
||||
${SSL_INCLUDE} ${NTLM_INCLUDE} -DGKRELLM_CLIENT
|
||||
|
||||
+ifeq ($(HAVE_GNUTLS),1)
|
||||
+ FLAGS+= -I$(GNUTLSINC)
|
||||
+else
|
||||
+ifeq ($(HAVE_SSL),1)
|
||||
+ FLAGS+= -I$(OPENSSLINC)
|
||||
+endif
|
||||
+endif
|
||||
+
|
||||
LIBS = $(PKG_LIB) $(GTOP_LIBS) $(SMC_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS) \
|
||||
$(NTLM_LIBS)
|
||||
|
||||
@@ -121,7 +131,7 @@
|
||||
endif
|
||||
|
||||
|
||||
-override CC += -Wall $(FLAGS)
|
||||
+CFLAGS += -Wall $(FLAGS)
|
||||
|
||||
OBJS = main.o alerts.o battery.o base64.o clock.o cpu.o disk.o fs.o \
|
||||
hostname.o inet.o mail.o mem.o net.o proc.o sensors.o uptime.o \
|
||||
@@ -146,13 +156,20 @@
|
||||
LIBS = $(PKG_LIB) $(GTOP_LIBS) $(X11_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS)\
|
||||
@@ -131,13 +132,20 @@
|
||||
$(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -lmd" gkrellm
|
||||
endif
|
||||
|
||||
|
@ -73,6 +40,6 @@ diff -u src/Makefile.orig src/Makefile
|
|||
+ $(MAKE) EXTRAOBJS= SYS_LIBS="-ldevstat -lmd" gkrellm
|
||||
+endif
|
||||
+
|
||||
# Darwin target for systems that still have libkvm
|
||||
darwin:
|
||||
ifeq ($(HAVE_SSL),1)
|
||||
$(MAKE) GTK_CONFIG=gtk-config STRIP= \
|
||||
|
|
Loading…
Reference in a new issue