summaryrefslogtreecommitdiff
path: root/x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch')
-rw-r--r--x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch b/x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch
new file mode 100644
index 000000000000..af142fd574ee
--- /dev/null
+++ b/x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch
@@ -0,0 +1,71 @@
+--- Makefile.orig 2007-07-13 17:26:30.000000000 +0200
++++ Makefile 2008-01-28 16:36:41.000000000 +0100
+@@ -13,8 +13,8 @@
+ #OPT = -pg -g
+
+ CC := gcc
+-CFLAGS := $(OPT) -Wall -W -g -ansi -I/usr/X11R6/include
+-LDFLAGS := $(OPT) -lX11 -ldockapp
++CFLAGS := $(OPT) -Wall -W -g -ansi -I/usr/include
++LDFLAGS += -lX11 -ldockapp
+
+ WMSRC := wmacpi.c libacpi.c
+ HEADERS := libacpi.h wmacpi.h
+@@ -22,11 +22,12 @@
+ doc_targets := wmacpi.1
+
+ ifdef BUILD_CLI
+-targets += acpi
+-doc_targets += acpi.1
++targets += acpi-batt-status
++doc_targets += acpi-batt-status.1
+ endif
+
+-PREFIX := /usr/local
++PREFIX := /usr
++MANDIR := $(PREFIX)/share/man
+
+ all: $(targets)
+
+@@ -34,20 +35,20 @@
+ WMOBJ := $(patsubst %.c,%.o,$(filter %.c,$(WMSRC)))
+
+ # include per-file dependencies
+--include $(WMOBJ:.o=.d)
++#-include $(WMOBJ:.o=.d)
+
+ wmacpi: $(WMOBJ)
+- $(CC) $(LDFLAGS) -o $@ $^
++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+ # for the Debian package, we want to make building the command line tools
+ # optional. So, we hide all the necessary stuff here . . .
+ ifdef BUILD_CLI
+-CLSRC := acpi.c libacpi.c
++CLSRC := acpi-batt-status.c libacpi.c
+ CLOBJ := $(patsubst %.c,%.o,$(filter %.c,$(CLSRC)))
+--include $(CLOBJ:.o=.d)
++#-include $(CLOBJ:.o=.d)
+
+-acpi: $(CLOBJ)
+- $(CC) $(LDFLAGS) -o $@ $^
++acpi-batt-status: $(CLOBJ)
++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+ endif
+
+ # build per-file dependencies - note that -MM may not be supported
+@@ -62,10 +63,10 @@
+ rm -f *.d $(targets)
+
+ install: $(targets)
+- install -d $(PREFIX)/bin/
+- install -pc $(targets) $(PREFIX)/bin/
+- install -d $(PREFIX)/man/man1/
+- install -pc $(doc_targets) $(PREFIX)/man/man1/
++ install -d $(DESTDIR)$(PREFIX)/bin/
++ install -pc $(targets) $(DESTDIR)$(PREFIX)/bin/
++ install -d $(DESTDIR)$(MANDIR)/man1/
++ install -p -m 0644 $(doc_targets) $(DESTDIR)$(MANDIR)/man1/
+
+ tags:
+ etags $(WMSRC) $(CLSRC) $(HEADERS)