freebsd-ports/x11/gtk-theme-switch/files/patch-Makefile

31 lines
889 B
Text

--- Makefile.orig 2003-06-11 14:02:59.000000000 +0800
+++ Makefile 2014-01-10 14:11:54.000000000 +0800
@@ -1,7 +1,8 @@
-GCC = cc
-PREFIX=/usr/local
-CFLAGS = -O2 -Wall $(shell gtk-config --cflags)
-LIBS = $(shell gtk-config --libs)
+GCC = ${CC}
+PREFIX?=/usr/local
+GTK_CONFIG?=gtk-config
+CFLAGS += -Wall $(shell $(GTK_CONFIG) --cflags)
+LIBS = $(shell $(GTK_CONFIG) --libs)
VERSION = 1.0.1
all: switch
@@ -12,11 +13,10 @@ clean:
-rm -f switch *~
install: all
- strip switch
- mkdir -p ${PREFIX}/bin
- mkdir -p ${PREFIX}/man
- install -c switch ${PREFIX}/bin
- install -c switch.1 ${PREFIX}/man
+ mkdir -p $(DESTDIR)${PREFIX}/bin
+ mkdir -p $(DESTDIR)${PREFIX}/man/man1
+ $(BSD_INSTALL_PROGRAM) switch $(DESTDIR)${PREFIX}/bin/gtk-theme-switch
+ $(BSD_INSTALL_MAN) switch.1 $(DESTDIR)${PREFIX}/man/man1/gtk-theme-switch.1
dist: clean
rm -rf /tmp/gtk-theme-switch-$(VERSION)