Gentoo Archives: gentoo-commits

From: "Kacper Kowalik (xarthisius)" <xarthisius@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/gperiodic/files: gperiodic-2.0.10-makefile.patch
Date: Mon, 23 Aug 2010 19:48:36
Message-Id: 20100823194831.E4BB220051@flycatcher.gentoo.org
1 xarthisius 10/08/23 19:48:31
2
3 Added: gperiodic-2.0.10-makefile.patch
4 Log:
5 Simplify ebuild by patching Makefile, correct nls, fix parallel make. Remove old version using built_with_use.
6 (Portage version: 2.1.8.3/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sci-chemistry/gperiodic/files/gperiodic-2.0.10-makefile.patch
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gperiodic/files/gperiodic-2.0.10-makefile.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gperiodic/files/gperiodic-2.0.10-makefile.patch?rev=1.1&content-type=text/plain
13
14 Index: gperiodic-2.0.10-makefile.patch
15 ===================================================================
16 Respect CC, CFLAGS, LDFLAGS
17 Fix install paths
18 Fix parallel build
19
20 --- Makefile
21 +++ Makefile
22 @@ -1,6 +1,5 @@
23 -CC := gcc
24 -CFLAGS := `pkg-config --cflags gtk+-2.0` -I. -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
25 -LIBS :=`pkg-config --libs gtk+-2.0`
26 +CFLAGS += `pkg-config --cflags gtk+-2.0` -I. -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
27 +LIBS +=`pkg-config --libs gtk+-2.0`
28 bindir ?= /usr/bin
29 datadir ?= /usr/share
30 enable_nls ?= 1
31 @@ -8,12 +7,11 @@
32 .c.o:
33 $(CC) -c $(CFLAGS) $(CPPFLAGS) $<
34
35 -all:
36 - make gperiodic
37 - make -C po/ all enable_nls=$(enable_nls)
38 +all: gperiodic
39 + $(MAKE) -C po/ all enable_nls=$(enable_nls)
40
41 gperiodic: gperiodic.o
42 - $(CC) $(CFLAGS) -o gperiodic gperiodic.o $(LIBS)
43 + $(CC) $(LDFLAGS) $(CFLAGS) -o gperiodic gperiodic.o $(LIBS)
44 ifeq ($(strip),1)
45 strip gperiodic
46 endif
47 @@ -23,24 +21,21 @@
48 gperiodic.o: gperiodic.c gperiodic.h table_data.h
49
50 install:
51 - mkdir -p $(DESTDIR)$(bindir)
52 - install -m 755 gperiodic $(DESTDIR)$(bindir)
53 - mkdir -p $(DESTDIR)$(datadir)/applications
54 - install -m 644 gperiodic.desktop $(DESTDIR)$(datadir)/applications
55 - mkdir -p $(DESTDIR)$(datadir)/pixmaps
56 - install -m 644 gperiodic.png $(DESTDIR)$(datadir)/pixmaps
57 - install -m 644 gperiodic-crystal.png $(DESTDIR)$(datadir)/pixmaps
58 - make -C po/ install enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
59 + install -D -m 755 gperiodic $(DESTDIR)$(bindir)/gperiodic
60 + install -D -m 644 gperiodic.desktop $(DESTDIR)$(datadir)/applications/gperiodic.desktop
61 + install -D -m 644 gperiodic.png $(DESTDIR)$(datadir)/pixmaps/gperiodic.png
62 + install -m 644 gperiodic-crystal.png $(DESTDIR)$(datadir)/pixmaps/gperiodic-crystal.png
63 + $(MAKE) -C po/ install enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
64
65 uninstall:
66 rm -f $(bindir)/gperiodic \
67 $(datadir)/applications/gperiodic.desktop
68 $(datadir)/pixmaps/gperiodic.png \
69 $(datadir)/pixmaps/gperiodic-crystal.png
70 - make -C po/ uninstall enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
71 + $(MAKE) -C po/ uninstall enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
72
73 clean:
74 rm -f *.o gperiodic
75 - make -C po/ clean
76 + $(MAKE) -C po/ clean
77
78 .PHONY: install uninstall clean