pkgsrc/time/wmitime/patches/patch-aa
khorben 88b19a623c Add support for CFLAGS
No functional change intended.
2015-08-06 21:41:43 +00:00

40 lines
1.1 KiB
Text

$NetBSD: patch-aa,v 1.2 2015/08/06 21:41:43 khorben Exp $
- implements PKG_DESTDIR_SUPPORT
- adds support for CFLAGS
- removes duplicate library while linking
--- Makefile.orig 1999-03-29 03:51:39.000000000 +0000
+++ Makefile
@@ -1,7 +1,7 @@
-#LANG = fr
-LIBDIR = -L/usr/X11R6/lib
+LANG = en
+LIBDIR = ${LDFLAGS}
LIBS = -lXpm -lXext -lX11 -lm
-FLAGS = -O2
+FLAGS = ${BUILDLINK_CPPFLAGS} ${CFLAGS}
OBJS = wmitime.o \
../wmgeneral/wmgeneral.o \
../wmgeneral/misc.o \
@@ -12,7 +12,7 @@ OBJS = wmitime.o \
cc -I/usr/X11R6/share/include $(FLAGS) -D$(LANG) -c -Wall $< -o $*.o
wmtime: $(OBJS)
- cc $(FLAGS) -D$(LANG) -o wmitime $^ -lXext $(LIBDIR) $(LIBS)
+ cc $(FLAGS) -D$(LANG) -o wmitime $^ $(LIBDIR) $(LIBS)
all:: wmtime
@@ -24,9 +24,8 @@ clean::
rm -f *~
install:: wmitime
- cp -f wmitime /usr/local/bin/
- chmod 755 /usr/local/bin/wmitime
- chown root:root /usr/local/bin/wmitime
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ install -m 755 wmitime $(DESTDIR)$(PREFIX)/bin/wmitime
# cp wminetrc $(HOME)/.wminetrc
# chmod 600 $(HOME)/.wminetrc
# cp wminetrc /etc/wminetrc