aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-11-05 03:20:01 +0800
committerume <ume@FreeBSD.org>2005-11-05 03:20:01 +0800
commit441298ce80e69c8145b176b41016064e332b5a58 (patch)
tree72c7f9c42e523c40bdb2d48b4dd4da249f2409ac /sysutils
parent5183c40cd098cc7eb0a04daddc577390136fbfd5 (diff)
downloadfreebsd-ports-gnome-441298ce80e69c8145b176b41016064e332b5a58.tar.gz
freebsd-ports-gnome-441298ce80e69c8145b176b41016064e332b5a58.tar.zst
freebsd-ports-gnome-441298ce80e69c8145b176b41016064e332b5a58.zip
make the plugin ports be able to depend on ${GKRELLM_SERVER_ONLY}
to install server-only plugins: - install all gkrellmd-related files to ${PREFIX} instead of ${X11BASE}. - generates a gkrellmd.pc file for use with ports that install server-only plugins. - glib20 is chosen over glib12 for server-only build. PR: ports/82197 Submitted by: Jonathan Noack <noackjr__at__alumni.rice.edu>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/gkrellm2/Makefile21
-rw-r--r--sysutils/gkrellm2/files/patch-gkrellmd.12
-rw-r--r--sysutils/gkrellm2/files/patch-server::Makefile63
-rw-r--r--sysutils/gkrellm2/pkg-plist6
4 files changed, 76 insertions, 16 deletions
diff --git a/sysutils/gkrellm2/Makefile b/sysutils/gkrellm2/Makefile
index 4b4e55de8fb4..c56675aa3898 100644
--- a/sysutils/gkrellm2/Makefile
+++ b/sysutils/gkrellm2/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gkrellm
PORTVERSION= 2.2.7
-#PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= sysutils ipv6
MASTER_SITES= http://members.dslextreme.com/users/billw/gkrellm/ \
${MASTER_SITE_LOCAL}
@@ -37,7 +37,7 @@ WITH_GNUTLS= yes
.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 @@ MAKE_ENV+= without-gnutls=1 without-ssl=1
USE_BZIP2= yes
USE_GMAKE= yes
+USE_REINPLACE= yes
PLIST_SUB= PREFIX=${PREFIX}
.if defined(GKRELLM_SERVER_ONLY)
@@ -90,12 +91,12 @@ ALL_TARGET= freebsd
.endif
INSTALL_TARGET= install_freebsd
-MAKE_ENV+= INSTALLROOT=${X11BASE} SINSTALLDIR=${PREFIX}/sbin \
+MAKE_ENV+= INSTALLROOT=${X11BASE} INSTALLDIR=${X11BASE}/bin \
PKGCONFIGDIR=${X11BASE}/libdata/pkgconfig \
- MANDIR=${MAN1PREFIX}/man/man1 SMANDIR=${MANPREFIX}/man/man8
-.if defined(GKRELLM_SERVER_ONLY)
-MAKE_ENV+= glib12=1
-.endif
+ SINSTALLROOT=${PREFIX} SINSTALLDIR=${PREFIX}/sbin \
+ 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 +110,12 @@ pre-everything::
@${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
diff --git a/sysutils/gkrellm2/files/patch-gkrellmd.1 b/sysutils/gkrellm2/files/patch-gkrellmd.1
index 88a710cad591..13896c7e4ea8 100644
--- a/sysutils/gkrellm2/files/patch-gkrellmd.1
+++ b/sysutils/gkrellm2/files/patch-gkrellmd.1
@@ -4,7 +4,7 @@ diff -u gkrellmd.1.orig gkrellmd.1
+++ 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
diff --git a/sysutils/gkrellm2/files/patch-server::Makefile b/sysutils/gkrellm2/files/patch-server::Makefile
index cf4d5b4dead6..91706c2b4273 100644
--- a/sysutils/gkrellm2/files/patch-server::Makefile
+++ b/sysutils/gkrellm2/files/patch-server::Makefile
@@ -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 @@ diff -u server/Makefile.orig server/Makefile
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 @@ diff -u server/Makefile.orig server/Makefile
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 \
diff --git a/sysutils/gkrellm2/pkg-plist b/sysutils/gkrellm2/pkg-plist
index af2c3563eb44..2960740ab608 100644
--- a/sysutils/gkrellm2/pkg-plist
+++ b/sysutils/gkrellm2/pkg-plist
@@ -1,3 +1,6 @@
+include/gkrellm2/gkrellmd.h
+@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 @@ sbin/gkrellmd
@cwd %%X11BASE%%
%%CLIENT%%include/gkrellm2/gkrellm.h
%%CLIENT%%include/gkrellm2/gkrellm-public-proto.h
-include/gkrellm2/gkrellmd.h
-@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