freebsd-ports/sysutils/gkrellm2/files/patch-src:Makefile
2009-12-22 12:34:58 +00:00

78 lines
2.2 KiB
Text

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)
CONFIGURE_ARGS += --without-ntlm
endif
-DUMMY_VAR := $(shell ./configure $(CONFIGURE_ARGS))
+DUMMY_VAR := $(shell env OPENSSLINC=$(OPENSSLINC) OPENSSLLIB=$(OPENSSLLIB) \
+ GNUTLSINC=$(GNUTLSINC) GNUTLSLIB=$(GNUTLSLIB) \
+ ./configure $(CONFIGURE_ARGS))
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 @@
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
+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 @@
$(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -lmd" gkrellm
endif
-freebsd3 freebsd:
+freebsd3 freebsd4:
ifeq ($(HAVE_SSL),1)
$(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -ldevstat" gkrellm
else
$(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -ldevstat -lmd" gkrellm
endif
+freebsd5 freebsd6 freebsd7 freebsd8 freebsd9 freebsd:
+ifeq ($(HAVE_SSL),1)
+ $(MAKE) EXTRAOBJS= SYS_LIBS="-ldevstat" gkrellm
+else
+ $(MAKE) EXTRAOBJS= SYS_LIBS="-ldevstat -lmd" gkrellm
+endif
+
darwin:
ifeq ($(HAVE_SSL),1)
$(MAKE) GTK_CONFIG=gtk-config STRIP= \