freebsd-ports/sysutils/gkrellm2/files/patch-server::Makefile
Hajimu UMEMOTO b58bb7c83b - Update to 2.3.2
- OPTIONS'fy
2008-10-04 15:00:55 +00:00

113 lines
3.4 KiB
Text

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
@@ -26,6 +26,7 @@
MANMODE ?= 644
MANDIRMODE ?= 755
INSTALL ?= install
+PKGCONFIGDIR ?= $(INSTALLROOT)/lib/pkgconfig
LINK_FLAGS ?= -Wl,-E
EXTRAOBJS =
@@ -56,18 +57,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`
-GLIB12_INCLUDE = `glib-config --cflags`
-GLIB12_LIB = `glib-config --libs glib gmodule`
+GLIB12_INCLUDE = `$(GLIB_CONFIG) --cflags`
+GLIB12_LIB = `$(GLIB_CONFIG) --libs glib gmodule`
-FLAGS = -O2 $(PKG_INCLUDE)
+FLAGS = $(PKG_INCLUDE)
ifeq ($(glib12),1)
- FLAGS = -O2 $(GLIB12_INCLUDE)
+ FLAGS = $(GLIB12_INCLUDE)
endif
ifeq ($(glib12),yes)
- FLAGS = -O2 $(GLIB12_INCLUDE)
+ FLAGS = $(GLIB12_INCLUDE)
endif
-FLAGS += $(GTOP_INCLUDE) $(PTHREAD_INC) -I.. -I$(SHARED_PATH) -DGKRELLM_SERVER
+FLAGS += $(GTOP_INCLUDE) $(PTHREAD_INC) -I.. -I$(SHARED_PATH) -I$(LOCALBASE)/include -DGKRELLM_SERVER
LIBS = $(PKG_LIB)
ifeq ($(glib12),1)
@@ -116,21 +117,33 @@
all: gkrellmd
-gkrellmd: $(OBJS) $(EXTRAOBJS)
+gkrellmd: gkrellmd.pc $(OBJS) $(EXTRAOBJS)
$(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd $(LIBS) $(LINK_FLAGS)
-static: $(OBJS) $(EXTRAOBJS)
+static: gkrellmd.pc $(OBJS) $(EXTRAOBJS)
$(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd.static -static \
$(LIBS) $(LINK_FLAGS)
+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
+
freebsd2:
$(MAKE) GTK_CONFIG=gtk12-config \
EXTRAOBJS= SYS_LIBS="-lkvm -lmd" gkrellmd
-freebsd3 freebsd:
+freebsd3 freebsd4:
$(MAKE) GTK_CONFIG=gtk12-config \
EXTRAOBJS= SYS_LIBS="-lkvm -ldevstat -lmd" gkrellmd
+freebsd5 freebsd6 freebsd7 freebsd8 freebsd:
+ $(MAKE) GTK_CONFIG=gtk12-config \
+ EXTRAOBJS= SYS_LIBS="-ldevstat -lmd" gkrellmd
+
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" \
gkrellmd
-install: install_bin install_inc install_man
+install: install_bin install_inc install_man install_gkrellmd.pc
install_bin:
$(INSTALL) -d -m $(INSTALLDIRMODE) $(SINSTALLDIR)
@@ -187,15 +200,20 @@
install_man:
$(INSTALL) -d -m $(MANDIRMODE) $(SMANDIR)
- $(INSTALL) -c -m $(MANMODE) ../gkrellmd.1 $(SMANDIR)/$(PACKAGE_D).1
+ $(INSTALL) -c -m $(MANMODE) ../gkrellmd.1 $(SMANDIR)/$(PACKAGE_D).8
install_cfg:
$(INSTALL) -d -m $(CFGDIRMODE) $(CFGDIR)
$(INSTALL) -c -m $(CFGMODE) gkrellmd.conf $(CFGDIR)/gkrellmd.conf
+install_gkrellmd.pc:
+ $(INSTALL) -d $(PKGCONFIGDIR)
+ $(INSTALL) -c -m $(INCLUDEMODE) gkrellmd.pc $(PKGCONFIGDIR)
+
uninstall:
rm -f $(SINSTALLDIR)/$(PACKAGE_D)
rm -f $(SMANDIR)/$(PACKAGE_D).1
+ rm -f $(PKGCONFIGDIR)/gkrellmd.pc
install_darwin install_darwin9 install_macosx:
$(MAKE) install STRIP=
@@ -226,6 +244,7 @@
clean:
$(RM) *.o *~ *.bak configure.h configure.log gkrellmd gkrellmd.exe \
libgkrellmd.a core
+ $(RM) gkrellmd.pc
SYSDEPS = ../src/sysdeps/bsd-common.c ../src/sysdeps/bsd-net-open.c \
../src/sysdeps/darwin.c \