Gentoo Archives: gentoo-commits

From: "Michele Noberasco (s4t4n)" <s4t4n@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-plugins/wmacpi/files: wmacpi-2.2_rc1-makefile.patch
Date: Fri, 01 Feb 2008 15:13:04
Message-Id: E1JKxZe-0000jt-Cv@stork.gentoo.org
1 s4t4n 08/02/01 15:13:02
2
3 Added: wmacpi-2.2_rc1-makefile.patch
4 Log:
5 Version bump, plus support for crosscompile, LDFLAGS, etc. Closes bug #207916. Wiped out older version.
6 (Portage version: 2.1.3.19)
7
8 Revision Changes Path
9 1.1 x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-plugins/wmacpi/files/wmacpi-2.2_rc1-makefile.patch?rev=1.1&content-type=text/plain
13
14 Index: wmacpi-2.2_rc1-makefile.patch
15 ===================================================================
16 --- Makefile.orig 2007-07-13 17:26:30.000000000 +0200
17 +++ Makefile 2008-01-28 16:36:41.000000000 +0100
18 @@ -13,8 +13,8 @@
19 #OPT = -pg -g
20
21 CC := gcc
22 -CFLAGS := $(OPT) -Wall -W -g -ansi -I/usr/X11R6/include
23 -LDFLAGS := $(OPT) -lX11 -ldockapp
24 +CFLAGS := $(OPT) -Wall -W -g -ansi -I/usr/include
25 +LDFLAGS += -lX11 -ldockapp
26
27 WMSRC := wmacpi.c libacpi.c
28 HEADERS := libacpi.h wmacpi.h
29 @@ -22,11 +22,12 @@
30 doc_targets := wmacpi.1
31
32 ifdef BUILD_CLI
33 -targets += acpi
34 -doc_targets += acpi.1
35 +targets += acpi-batt-status
36 +doc_targets += acpi-batt-status.1
37 endif
38
39 -PREFIX := /usr/local
40 +PREFIX := /usr
41 +MANDIR := $(PREFIX)/share/man
42
43 all: $(targets)
44
45 @@ -34,20 +35,20 @@
46 WMOBJ := $(patsubst %.c,%.o,$(filter %.c,$(WMSRC)))
47
48 # include per-file dependencies
49 --include $(WMOBJ:.o=.d)
50 +#-include $(WMOBJ:.o=.d)
51
52 wmacpi: $(WMOBJ)
53 - $(CC) $(LDFLAGS) -o $@ $^
54 + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
55
56 # for the Debian package, we want to make building the command line tools
57 # optional. So, we hide all the necessary stuff here . . .
58 ifdef BUILD_CLI
59 -CLSRC := acpi.c libacpi.c
60 +CLSRC := acpi-batt-status.c libacpi.c
61 CLOBJ := $(patsubst %.c,%.o,$(filter %.c,$(CLSRC)))
62 --include $(CLOBJ:.o=.d)
63 +#-include $(CLOBJ:.o=.d)
64
65 -acpi: $(CLOBJ)
66 - $(CC) $(LDFLAGS) -o $@ $^
67 +acpi-batt-status: $(CLOBJ)
68 + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
69 endif
70
71 # build per-file dependencies - note that -MM may not be supported
72 @@ -62,10 +63,10 @@
73 rm -f *.d $(targets)
74
75 install: $(targets)
76 - install -d $(PREFIX)/bin/
77 - install -pc $(targets) $(PREFIX)/bin/
78 - install -d $(PREFIX)/man/man1/
79 - install -pc $(doc_targets) $(PREFIX)/man/man1/
80 + install -d $(DESTDIR)$(PREFIX)/bin/
81 + install -pc $(targets) $(DESTDIR)$(PREFIX)/bin/
82 + install -d $(DESTDIR)$(MANDIR)/man1/
83 + install -p -m 0644 $(doc_targets) $(DESTDIR)$(MANDIR)/man1/
84
85 tags:
86 etags $(WMSRC) $(CLSRC) $(HEADERS)
87
88
89
90 --
91 gentoo-commits@l.g.o mailing list