voyageur    14/10/10 13:15:37

  Added:                wmacpi-2.2-makefile.patch
  Log:
  Version bump with new homepage, update makefile patch
  
  (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with 
key C74525F2)

Revision  Changes    Path
1.1                  x11-plugins/wmacpi/files/wmacpi-2.2-makefile.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-plugins/wmacpi/files/wmacpi-2.2-makefile.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-plugins/wmacpi/files/wmacpi-2.2-makefile.patch?rev=1.1&content-type=text/plain

Index: wmacpi-2.2-makefile.patch
===================================================================
--- Makefile.orig       2014-10-10 14:37:55.000000000 +0200
+++ Makefile    2014-10-10 15:00:33.348752026 +0200
@@ -13,8 +13,8 @@
 #OPT   = -pg -g
 
 CC     := gcc
-CFLAGS += $(OPT) -Wall -W -g -ansi -I/usr/X11R6/include
-LDFLAGS += $(OPT) -lX11 -ldockapp
+CFLAGS := -Wall -W -g -ansi
+LIBS := -lX11 -ldockapp
 
 WMSRC  := wmacpi.c libacpi.c
 HEADERS := libacpi.h wmacpi.h
@@ -26,7 +26,8 @@
 doc_targets += wmacpi-cli.1
 endif
 
-PREFIX := /usr/local
+PREFIX := /usr
+MANDIR := $(PREFIX)/share/man
 
 all: $(targets)
 
@@ -37,7 +38,7 @@
 -include $(WMOBJ:.o=.d)
 
 wmacpi:        $(WMOBJ)
-       $(CC) -o $@ $^ $(LDFLAGS)
+       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 # for the Debian package, we want to make building the command line tools
 # optional. So, we hide all the necessary stuff here . . . 
@@ -47,13 +48,13 @@
 -include $(CLOBJ:.o=.d)
 
 wmacpi-cli: $(CLOBJ)
-       $(CC) $(LDFLAGS) -o $@ $^
+       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 endif
 
 # build per-file dependencies - note that -MM may not be supported
 # in gcc versions older than 2.95.4, but most likely is.
 %.d: %.c
-       gcc -MM $(CFLAGS) $< > $@
+       $(CC) -MM $(CFLAGS) $< > $@
 
 clean:
        rm -f TAGS *.o *~ trace *.out *.bb *.bbg 
@@ -62,10 +63,10 @@
        rm -f *.d $(targets)
 
 install: $(targets)
-       install -d $(PREFIX)/bin/
-       install -pc $(targets) $(PREFIX)/bin/
-       install -d $(PREFIX)/share/man/man1/
-       install -pc $(doc_targets) $(PREFIX)/share/man/man1/
+       install -d $(DESTDIR)$(PREFIX)/bin/
+       install -pc $(targets) $(DESTDIR)$(PREFIX)/bin/
+       install -d $(DESTDIR)$(MANDIR)/man1/
+       install -pc $(doc_targets) $(DESTDIR)$(MANDIR)/man1/
 
 tags:
        etags $(WMSRC) $(CLSRC) $(HEADERS)




Reply via email to