ports/82197: [PATCH] sysutils/gkrellm: gkrellmd enhancements
Jonathan Noack
noackjr at alumni.rice.edu
Mon Jun 13 14:00:36 UTC 2005
>Number: 82197
>Category: ports
>Synopsis: [PATCH] sysutils/gkrellm: gkrellmd enhancements
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 13 14:00:35 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Noack
>Release: FreeBSD 5.4-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD optimator.noacks.org 5.4-RELEASE-p2 FreeBSD 5.4-RELEASE-p2 #13: Wed Jun 8 22:55:47 CDT
>Description:
This change installs all gkrellmd-related files to PREFIX instead of
X11BASE. It also generates a gkrellmd.pc file for use with ports that
install server-only plugins. Finally, glib20 is chosen over glib12.
The net result is that plugin ports can depend on GKRELLM_SERVER_ONLY
to install server-only plugins. A PR for gkrelltop will be filed
immediately after this one that depends on this work.
Port maintainer (ume at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
--- gkrellm-2.2.7.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/gkrellm2/Makefile,v
retrieving revision 1.112
diff -u -r1.112 Makefile
--- Makefile 25 May 2005 16:38:44 -0000 1.112
+++ Makefile 13 Jun 2005 13:42:45 -0000
@@ -37,7 +37,7 @@
.if defined(GKRELLM_SERVER_ONLY)
BUILD_WRKSRC= ${WRKSRC}/server
INSTALL_WRKSRC= ${WRKSRC}/server
-USE_GNOME= glib12
+USE_GNOME= glib20
.else
USE_GNOME= gtk20
.if defined(WITHOUT_NLS)
@@ -60,6 +60,7 @@
USE_BZIP2= yes
USE_GMAKE= yes
+USE_REINPLACE= yes
PLIST_SUB= PREFIX=${PREFIX}
.if defined(GKRELLM_SERVER_ONLY)
@@ -90,12 +91,15 @@
.endif
INSTALL_TARGET= install_freebsd
-MAKE_ENV+= INSTALLROOT=${X11BASE} SINSTALLDIR=${PREFIX}/sbin \
+MAKE_ENV+= INSTALLDIR=${X11BASE}/bin \
+ SINSTALLDIR=${PREFIX}/sbin \
+ INSTALLROOT=${X11BASE} \
+ SINSTALLROOT=${PREFIX} \
PKGCONFIGDIR=${X11BASE}/libdata/pkgconfig \
- MANDIR=${MAN1PREFIX}/man/man1 SMANDIR=${MANPREFIX}/man/man8
-.if defined(GKRELLM_SERVER_ONLY)
-MAKE_ENV+= glib12=1
-.endif
+ SPKGCONFIGDIR=${PREFIX}/libdata/pkgconfig \
+ MANDIR=${MAN1PREFIX}/man/man1 \
+ SMANDIR=${MANPREFIX}/man/man8 \
+ VERSION=${PORTVERSION}
CFLAGS+= -DSYSTEM_THEMES_DIR='\"${X11BASE}/share/gkrellm2/themes\"' \
-DSYSTEM_PLUGINS_DIR='\"${X11BASE}/libexec/gkrellm2/plugins\"' \
@@ -109,6 +113,12 @@
@${ECHO_MSG} ""
.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's/INCLUDEDIR/SINCLUDEDIR/g' \
+ -e 's/INSTALLROOT/SINSTALLROOT/g' \
+ -e 's/PKGCONFIGDIR/SPKGCONFIGDIR/g' \
+ ${WRKSRC}/server/Makefile
+
post-install:
.if !defined(GKRELLM_SERVER_ONLY)
@${MKDIR} ${X11BASE}/libexec/gkrellm2/plugins
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/sysutils/gkrellm2/pkg-plist,v
retrieving revision 1.29
diff -u -r1.29 pkg-plist
--- pkg-plist 16 May 2005 12:43:09 -0000 1.29
+++ pkg-plist 13 Jun 2005 13:42:45 -0000
@@ -1,3 +1,6 @@
+include/gkrellm2/gkrellmd.h
+ at dirrm include/gkrellm2
+libdata/pkgconfig/gkrellmd.pc
sbin/gkrellmd
@exec mkdir -p %D/libexec/gkrellm2/plugins-gkrellmd
@unexec rmdir %D/libexec/gkrellm2/plugins-gkrellmd 2>/dev/null || true
@@ -9,8 +12,7 @@
@cwd %%X11BASE%%
%%CLIENT%%include/gkrellm2/gkrellm.h
%%CLIENT%%include/gkrellm2/gkrellm-public-proto.h
-include/gkrellm2/gkrellmd.h
- at dirrm include/gkrellm2
+%%CLIENT%%@dirrm include/gkrellm2
%%CLIENT%%man/man1/gkrellm.1.gz
%%CLIENT%%@unexec rm -f %D/man/cat1/gkrellm.1 %D/man/cat1/gkrellm.1.gz
%%CLIENT%%bin/gkrellm
Index: files/patch-gkrellmd.1
===================================================================
RCS file: /home/ncvs/ports/sysutils/gkrellm2/files/patch-gkrellmd.1,v
retrieving revision 1.1
diff -u -r1.1 patch-gkrellmd.1
--- files/patch-gkrellmd.1 15 May 2004 17:37:42 -0000 1.1
+++ files/patch-gkrellmd.1 13 Jun 2005 13:42:45 -0000
@@ -4,7 +4,7 @@
+++ gkrellmd.1 Tue Apr 13 17:14:02 2004
@@ -1,4 +1,4 @@
-.TH gkrellmd 1 "June 7, 2003" "GNU/Linux" "User's Manual"
-+.TH gkrellmd 1 "June 7, 2003" "FreeBSD" "User's Manual"
++.TH gkrellmd 8 "June 7, 2003" "FreeBSD" "User's Manual"
.SH "NAME"
gkrellmd \- The GNU Krell Monitors Server
Index: files/patch-server::Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/gkrellm2/files/patch-server::Makefile,v
retrieving revision 1.5
diff -u -r1.5 patch-server::Makefile
--- files/patch-server::Makefile 15 May 2004 17:37:42 -0000 1.5
+++ files/patch-server::Makefile 13 Jun 2005 13:42:45 -0000
@@ -1,8 +1,14 @@
-Index: server/Makefile
-diff -u server/Makefile.orig server/Makefile
---- server/Makefile.orig Mon Apr 12 22:30:48 2004
-+++ server/Makefile Tue Apr 13 14:15:40 2004
-@@ -27,18 +27,18 @@
+--- server/Makefile.orig Mon Apr 12 08:30:48 2004
++++ server/Makefile Mon Jun 13 07:45:44 2005
+@@ -18,6 +18,7 @@
+ MANMODE ?= 644
+ MANDIRMODE ?= 755
+ INSTALL ?= install
++PKGCONFIGDIR ?= $(INSTALLROOT)/lib/pkgconfig
+ LINK_FLAGS ?= -Wl,-E
+ CC ?= gcc
+ STRIP ?= -s
+@@ -27,18 +28,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`
@@ -27,7 +33,35 @@
LIBS = $(PKG_LIB) $(GTOP_LIBS_D) $(SYS_LIBS)
ifeq ($(glib12),1)
-@@ -133,7 +133,7 @@
+@@ -87,10 +88,18 @@
+
+ all: gkrellmd
+
+-gkrellmd: $(OBJS)
++gkrellmd.pc: Makefile
++ echo "prefix=$(INSTALLROOT)" > gkrellmd.pc
++ echo "Name: GKrellMd" >> gkrellmd.pc
++ echo "Description: Extensible GLIB system monitoring application server" >> gkrellmd.pc
++ echo "Version: $(VERSION)" >> gkrellmd.pc
++ echo "Requires: glib-2.0" >> gkrellmd.pc
++ echo "Cflags: -I$(INCLUDEDIR)" >> gkrellmd.pc
++
++gkrellmd: gkrellmd.pc $(OBJS)
+ $(CC) $(OBJS) -o gkrellmd $(LIBS) $(LINK_FLAGS)
+
+-static: $(OBJS)
++static: gkrellmd.pc $(OBJS)
+ $(CC) $(OBJS) -o gkrellmd.static -static \
+ $(LIBS) $(LINK_FLAGS)
+
+@@ -127,17 +136,22 @@
+ LINK_FLAGS="" gkrellmd
+ endif
+
+-install:
++install: install_gkrellmd.pc
+ $(INSTALL) -d -m $(INSTALLDIRMODE) $(SINSTALLDIR)
+ $(INSTALL) -c $(STRIP) -m $(BINMODE) gkrellmd $(SINSTALLDIR)/$(PACKAGE_D)
$(INSTALL) -d -m $(INCLUDEDIRMODE) $(INCLUDEDIR)/gkrellm2
$(INSTALL) -c -m $(INCLUDEMODE) $(GKRELLMD_INCLUDES) $(INCLUDEDIR)/gkrellm2
$(INSTALL) -d -m $(MANDIRMODE) $(SMANDIR)
@@ -36,3 +70,20 @@
uninstall:
rm -f $(SINSTALLDIR)/$(PACKAGE_D)
+ rm -f $(SMANDIR)/$(PACKAGE_D).1
++ rm -f $(PKGCONFIGDIR)/gkrellmd.pc
++
++install_gkrellmd.pc:
++ $(INSTALL) -d $(PKGCONFIGDIR)
++ $(INSTALL) -c -m $(INCLUDEMODE) gkrellmd.pc $(PKGCONFIGDIR)
+
+ install_darwin:
+ $(MAKE) install STRIP=
+@@ -162,6 +176,7 @@
+
+ clean:
+ rm -f *.o *~ *.bak gkrellmd core
++ rm -f gkrellmd.pc
+
+ SYSDEPS = ../src/sysdeps/bsd-common.c ../src/sysdeps/bsd-net-open.c \
+ ../src/sysdeps/freebsd.c ../src/sysdeps/gtop.c \
--- gkrellm-2.2.7.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list