| @@ -1,63 +1,66 @@ | | | @@ -1,63 +1,66 @@ |
1 | $NetBSD: patch-aa,v 1.2 2005/09/04 06:05:20 xtraeme Exp $ | | 1 | $NetBSD: patch-aa,v 1.3 2016/04/01 16:11:23 jperkin Exp $ |
2 | | | 2 | |
3 | --- Makefile.orig 2005-09-04 07:44:29.000000000 +0200 | | 3 | Use pkgsrc layout. |
4 | +++ Makefile 2005-09-04 07:47:12.000000000 +0200 | | 4 | |
5 | @@ -6,7 +6,7 @@ | | 5 | --- Makefile.orig 2005-07-18 21:50:42.000000000 +0000 |
| | | 6 | +++ Makefile |
| | | 7 | @@ -6,7 +6,7 @@ EXTRA_LIBS += -lXext |
6 | | | 8 | |
7 | # Information about the location of the menurc file | | 9 | # Information about the location of the menurc file |
8 | ifndef MENURC | | 10 | ifndef MENURC |
9 | -MENURC = /etc/X11/windowlab/windowlab.menurc | | 11 | -MENURC = /etc/X11/windowlab/windowlab.menurc |
10 | +MENURC = ${PKG_SYSCONFDIR}/windowlab.menurc | | 12 | +MENURC = ${PKG_SYSCONFDIR}/windowlab.menurc |
11 | endif | | 13 | endif |
12 | DEFINES += -DDEF_MENURC="\"$(MENURC)\"" | | 14 | DEFINES += -DDEF_MENURC="\"$(MENURC)\"" |
13 | | | 15 | |
14 | @@ -15,28 +15,28 @@ | | 16 | @@ -15,28 +15,28 @@ DEFINES += -DDEF_MENURC="\"$(MENURC)\"" |
15 | | | 17 | |
16 | # Uncomment to add freetype support (requires XFree86 4.0.2 or later) | | 18 | # Uncomment to add freetype support (requires XFree86 4.0.2 or later) |
17 | # This needs -lXext above, even if you have disabled shape support | | 19 | # This needs -lXext above, even if you have disabled shape support |
18 | -#DEFINES += -DXFT | | 20 | -#DEFINES += -DXFT |
19 | -#EXTRA_INC += `pkg-config --cflags xft` | | 21 | -#EXTRA_INC += `pkg-config --cflags xft` |
20 | -#EXTRA_LIBS += `pkg-config --libs xft` | | 22 | -#EXTRA_LIBS += `pkg-config --libs xft` |
21 | +DEFINES += -DXFT | | 23 | +DEFINES += -DXFT |
22 | +EXTRA_INC += `pkg-config --cflags xft` | | 24 | +EXTRA_INC += `pkg-config --cflags xft` |
23 | +EXTRA_LIBS += `pkg-config --libs xft` | | 25 | +EXTRA_LIBS += `pkg-config --libs xft` |
24 | | | 26 | |
25 | # Uncomment for debugging info (abandon all hope, ye who enter here) | | 27 | # Uncomment for debugging info (abandon all hope, ye who enter here) |
26 | #DEFINES += -DDEBUG | | 28 | #DEFINES += -DDEBUG |
27 | | | 29 | |
28 | # Set this to the location of the X installation you want to compile against | | 30 | # Set this to the location of the X installation you want to compile against |
29 | -XROOT = /usr/X11R6 | | 31 | -XROOT = /usr/X11R6 |
30 | +XROOT = ${PREFIX} | | 32 | +XROOT = ${PREFIX} |
31 | | | 33 | |
32 | # -------------------------------------------------------------------- | | 34 | # -------------------------------------------------------------------- |
33 | | | 35 | |
34 | -CC = gcc | | 36 | -CC = gcc |
35 | +#CC = gcc | | 37 | +#CC = gcc |
36 | ifndef CFLAGS | | 38 | ifndef CFLAGS |
37 | CFLAGS = -g -O2 -Wall -W | | 39 | CFLAGS = -g -O2 -Wall -W |
38 | endif | | 40 | endif |
39 | | | 41 | |
40 | BINDIR = $(DESTDIR)$(XROOT)/bin | | 42 | BINDIR = $(DESTDIR)$(XROOT)/bin |
41 | MANDIR = $(DESTDIR)$(XROOT)/man/man1 | | 43 | -MANDIR = $(DESTDIR)$(XROOT)/man/man1 |
42 | -CFGDIR = $(DESTDIR)/etc/X11/windowlab | | 44 | -CFGDIR = $(DESTDIR)/etc/X11/windowlab |
| | | 45 | +MANDIR = $(DESTDIR)$(XROOT)/${PKGMANDIR}/man1 |
43 | +#CFGDIR = $(DESTDIR)/etc/X11/windowlab | | 46 | +#CFGDIR = $(DESTDIR)/etc/X11/windowlab |
44 | INCLUDES = -I$(XROOT)/include $(EXTRA_INC) | | 47 | INCLUDES = -I$(XROOT)/include $(EXTRA_INC) |
45 | -LDPATH = -L$(XROOT)/lib | | 48 | -LDPATH = -L$(XROOT)/lib |
46 | +LDPATH = ${LDFLAGS} | | 49 | +LDPATH = ${LDFLAGS} |
47 | LIBS = -lX11 $(EXTRA_LIBS) | | 50 | LIBS = -lX11 $(EXTRA_LIBS) |
48 | | | 51 | |
49 | PROG = windowlab | | 52 | PROG = windowlab |
50 | @@ -53,9 +53,10 @@ | | 53 | @@ -53,9 +53,10 @@ $(OBJS): %.o: %.c $(HEADERS) |
51 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@ | | 54 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@ |
52 | | | 55 | |
53 | install: all | | 56 | install: all |
54 | - mkdir -p $(BINDIR) && install -m 755 -s $(PROG) $(BINDIR) | | 57 | - mkdir -p $(BINDIR) && install -m 755 -s $(PROG) $(BINDIR) |
55 | - mkdir -p $(MANDIR) && install -m 644 $(MANPAGE) $(MANDIR) && gzip -9vf $(MANDIR)/$(MANPAGE) | | 58 | - mkdir -p $(MANDIR) && install -m 644 $(MANPAGE) $(MANDIR) && gzip -9vf $(MANDIR)/$(MANPAGE) |
56 | - mkdir -p $(CFGDIR) && cp -i windowlab.menurc $(CFGDIR)/windowlab.menurc && chmod 644 $(CFGDIR)/windowlab.menurc | | 59 | - mkdir -p $(CFGDIR) && cp -i windowlab.menurc $(CFGDIR)/windowlab.menurc && chmod 644 $(CFGDIR)/windowlab.menurc |
57 | + ${BSD_INSTALL_PROGRAM_DIR} $(BINDIR) | | 60 | + ${BSD_INSTALL_PROGRAM_DIR} $(BINDIR) |
58 | + ${BSD_INSTALL_MAN_DIR} $(MANDIR) | | 61 | + ${BSD_INSTALL_MAN_DIR} $(MANDIR) |
59 | + ${BSD_INSTALL_PROGRAM} $(PROG) $(BINDIR) | | 62 | + ${BSD_INSTALL_PROGRAM} $(PROG) $(BINDIR) |
60 | + ${BSD_INSTALL_MAN} $(MANPAGE) $(MANDIR)/windowlab.1 | | 63 | + ${BSD_INSTALL_MAN} $(MANPAGE) $(MANDIR)/windowlab.1 |
61 | | | 64 | |
62 | clean: | | 65 | clean: |
63 | rm -f $(PROG) $(OBJS) | | 66 | rm -f $(PROG) $(OBJS) |