summaryrefslogtreecommitdiff
path: root/recipes/gpe-go/gpe-go-0.05/fix-make.patch
blob: 996c51e001c5551e0c99ae7a11c2539254fc1144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.dpkg_ipkg gpe-go-0.05/build/Makefile.dpkg_ipkg
--- ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.dpkg_ipkg	2003-11-09 20:28:40.000000000 +0000
+++ gpe-go-0.05/build/Makefile.dpkg_ipkg	2004-09-18 17:09:01.000000000 +0100
@@ -18,8 +18,10 @@
 LIBGPEWIDGET_PC = libgpewidget
 endif
 
+ifeq ($(IN_LIBGPEWIDGET),)
 GPECFLAGS = $(shell $(PC_EXTRA) pkg-config --cflags $(LIBGPEWIDGET_PC))
 GPELIBS = $(shell $(PC_EXTRA) pkg-config --libs $(LIBGPEWIDGET_PC))
+endif
 
 GTKCFLAGS = $(shell pkg-config --cflags gtk+-2.0)
 GTKLIBS = $(shell pkg-config --libs gtk+-2.0)
@@ -28,16 +30,16 @@
 STANDARD_CFLAGS = -MD -Wall
 
 ifeq ($(DEBUG),yes)
-STANDARD_CFLAGS += -O2 -g
-STANDARD_LDFLAGS = -g
+CFLAGS += -O2 -g
+LDFLAGS = -g
 else
-STANDARD_CFLAGS += -Os -fomit-frame-pointer
+CFLAGS += -Os -fomit-frame-pointer
 endif
 
 dist: check-source clean dist-prep
 	rm -rf ../$(PACKAGE)-$(VERSION)
 	mkdir ../$(PACKAGE)-$(VERSION)
-	( tar cf - --exclude "*/CVS" --exclude CVS --exclude "*~" --exclude "#*#" --exclude "debian" --exclude ".*" --exclude "*.ipk" --exclude "*.ipk.*" --exclude "*.mo" --exclude "*.d" --exclude "*.batch" --exclude "translation-ipkgs.txt" * ) | (cd ../$(PACKAGE)-$(VERSION); tar xf -)
+	( tar cf - --exclude "*/CVS" --exclude CVS --exclude "*~" --exclude "#*#" --exclude "debian" --exclude ".*" --exclude "*.ipk" --exclude "*.ipk.*" --exclude "*.mo" --exclude "*.batch" --exclude "translation-ipkgs.txt" * ) | (cd ../$(PACKAGE)-$(VERSION); tar xf -)
 	( cd ../$(PACKAGE)-$(VERSION); mkdir build; cp $(BUILD)/Makefile.dpkg_ipkg $(BUILD)/Makefile.translation build/ ; sed 's:^CVSBUILD.*:CVSBUILD = no:' < Makefile > Makefile.new; mv Makefile.new Makefile )
 	( cd .. ; tar cf - $(PACKAGE)-$(VERSION) | gzip -9 >$(PACKAGE)-$(VERSION).tar.gz )
 	rm -rf ../$(PACKAGE)-$(VERSION)
@@ -53,8 +55,13 @@
 
 install: install-program install-mo
 
+clean-dist:
+	rm -rf familiar/dist familiar/dist.list
+
+clean: clean-dist
+
 check-source:
-	@if ! grep -q '^Source:' familiar/$(CONTROL); then echo -e "\nNo Source: field in control file.  Aborting.\n"; exit 1; fi
+	@if [ -e familiar ] && ! grep -q '^Source:' familiar/$(CONTROL); then echo -e "\nNo Source: field in control file.  Aborting.\n"; exit 1; fi
 
 ipkg: check-source ipkg-prep clean
 	rm -rf familiar/dist
@@ -68,9 +75,9 @@
 	$(MAKE) DESTDIR=`pwd`/familiar/dist PREFIX=/usr prefix=/usr DEBUG=no install-program
 	rm -rf familiar/dist.list
 	ipkg-build -o 0 -g 0 familiar/dist | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> familiar/dist.list
-	rm -f 
 	if [ "x$(LINGUAS)" != "x" ]; then make translation-ipkg; tr ' ' '\n' < translation-ipkgs.txt >> familiar/dist.list; fi
 	md5sum `cat familiar/dist.list` > $(PACKAGE)_$(VERSION).batch
+	rm -rf familiar/dist familiar/dist.list
 	$(MAKE) printinfo
 
 dpkg: dist
@@ -102,3 +109,6 @@
 
 %.pc: %.pc.in
 	sed 's:PREFIX:$(PREFIX):;s:BUILDDIR:$(shell pwd):;s:VERSION:$(VERSION):' < $< > $@
+
+.c.o:;
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@
diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.translation gpe-go-0.05/build/Makefile.translation
--- ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.translation	2003-11-09 20:28:40.000000000 +0000
+++ gpe-go-0.05/build/Makefile.translation	2004-09-18 17:09:01.000000000 +0100
@@ -5,7 +5,7 @@
 # use ipkg-build or ipkg-deb-build
 IPKG_BUILD := ipkg-build
 
-TRANSLATION_SITE := http://www.iro.umontreal.ca/~gnutra/maint/
+TRANSLATION_SITE := http://www.iro.umontreal.ca/~gnutra/maint
 
 ifeq ($(DIR_PO),)
 DIR_PO := po
@@ -56,7 +56,7 @@
 	( SOURCES="$(SOURCES)"; for DESK in $(PACKAGE).desktop.in $(EXTRA_DESKTOPS); do if [ -f $$DESK ]; then intltool-extract --type=gettext/ini $$DESK; SOURCES="$$SOURCES $${DESK}.h"; fi; done; if [ "x$$SOURCES" != "x" ]; then xgettext --add-comments=TRANSLATORS: -k_ -kN_ -o $(DIR_PO)/$(PACKAGE).pot.new $$SOURCES; fi )
 	if [ -f $(DIR_PO)/$(PACKAGE).pot.new ]; then if cmp -s $(DIR_PO)/$(PACKAGE).pot.new $(PACKAGE).pot; then rm $(DIR_PO)/$(PACKAGE).pot.new; else mv $(DIR_PO)/$(PACKAGE).pot.new $(DIR_PO)/$(PACKAGE).pot; fi; fi
 
-clean: clean-po
+clean: clean-po clean-dist-translation
 
 clean-po:
 	rm -rf $(DIR_PO)/*.mo
@@ -76,10 +76,17 @@
 
 MAINTAINER = $(shell grep 'Maintainer: ' familiar/$(CONTROL) | cut -d ' ' -f 2-)
 
+ifndef BUILD
+BUILD = ../build
+endif
+
 transdist := familiar/dist-translation
-templates := ../build/familiar
+templates := $(BUILD)/familiar
 ipkglist  := translation-ipkgs.txt
 
+clean-dist-translation:
+	rm -rf $(transdist) $(ipkglist)
+
 real-translation-package: all-mo
 	rm -rf $(transdist) $(ipkglist)
 	for LINGUA in $(LINGUAS); do \
@@ -89,8 +96,7 @@
 		install -m 644 po/$$LINGUA.mo $(transdist)/$$i$(PREFIX)/share/locale/$$LINGUA/LC_MESSAGES/$(PACKAGE).mo; \
 		sed -e "s/<maintainer>/$(MAINTAINER)/;s/<package>/$(BINPACKAGE)/;s/<version>/$(VERSION)/;s/<language>/$$i/;s!<source>!$(SOURCE)!" $(templates)/control.translation > $(transdist)/$$i/CONTROL/control; \
 		install $(templates)/postinst.translation $(transdist)/$$i/CONTROL/postinst; \
-		chown -R root.root $(transdist)/$$i; \
-		$(IPKG_BUILD) $(transdist)/$$i | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> $(ipkglist); \
+		$(IPKG_BUILD) -g 0 -o 0 $(transdist)/$$i | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> $(ipkglist); \
 	done
 
 translation-ipkg:
diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/gpe-go.c gpe-go-0.05/gpe-go.c
--- ../gpe-go-0.05-r0/gpe-go-0.05/gpe-go.c	2003-11-09 19:38:50.000000000 +0000
+++ gpe-go-0.05/gpe-go.c	2004-09-18 17:04:24.000000000 +0100
@@ -16,12 +16,12 @@
 #include "sgf.h"
 
 //--GPE libs
-#include "gpe/init.h"
-#include "gpe/pixmaps.h"
-#include "gpe/errorbox.h"
-#include "gpe/question.h"
-#include "gpe/popup_menu.h"
-#include "gpe/picturebutton.h"
+#include <gpe/init.h>
+#include <gpe/pixmaps.h>
+#include <gpe/errorbox.h>
+#include <gpe/question.h>
+#include <gpe/popup_menu.h>
+#include <gpe/picturebutton.h>
 
 //--i18n
 #include <libintl.h>
diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/Makefile gpe-go-0.05/Makefile
--- ../gpe-go-0.05-r0/gpe-go-0.05/Makefile	2003-11-09 20:28:40.000000000 +0000
+++ gpe-go-0.05/Makefile	2004-09-18 17:11:06.000000000 +0100
@@ -1,19 +1,8 @@
 VERSION = 0.05
-
 PACKAGE = gpe-go
-
-ifndef PREFIX
-PREFIX = /usr/local
-endif
-
-ifndef DEBUG
+PREFIX = /usr
 DEBUG = no
-endif
-
-ifndef CVSBUILD
 CVSBUILD = no
-endif
-
 
 LINGUAS = cs de pl ro sv nl fr pt ru
 
@@ -21,40 +10,34 @@
 
 PIXMAPS = board white.png black.png
 
-GTKCFLAGS   = `pkg-config --cflags gtk+-2.0`
-GTKLDFLAGS += `pkg-config --libs gtk+-2.0`
+GTKCFLAGS = `pkg-config --cflags gtk+-2.0`
+GTKLDFLAGS = `pkg-config --libs gtk+-2.0 gdk-2.0`
 
-CPPFLAGS = $(GTKCFLAGS) -D_GNU_SOURCE 
-ifeq ($(DEBUG),yes)
-CFLAGS  += -O2 -g -DDEBUG=yes
-LDFLAGS += -g
+PACKAGE_CFLAGS += $(STANDARD_CFLAGS) $(GTKCFLAGS) $(GPECFLAGS)
+PACKAGE_CPPFLAGS += $(STANDARD_CPPFLAGS) -DPACKAGE=\"$(PACKAGE)\" -DPREFIX=\"$(PREFIX)\" -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\"
+PACKAGE_LDFLAGS += $(STANDARD_LDFLAGS) $(GTKLDFLAGS) $(GPELIBS)
+
+ifeq ($(CVSBUILD),yes)
+BUILD = ../build
 else
-CFLAGS += -Os -fomit-frame-pointer
+BUILD = build
 endif
-CFLAGS += -Wall -I../../base/libgpewidget
-CPPFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DPREFIX=\"$(PREFIX)\" -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\"
-CFLAGS += -MD
-
-LDFLAGS += -L../../base/libgpewidget -lgpewidget
-
-.SUFFIXES: .d
 
 OBJS = $(patsubst %,%.o,$(MEMBERS))
-DEPS = $(patsubst %,%.d,$(MEMBERS))
 SOURCES = $(patsubst %,%.c,$(MEMBERS))
+DEPS = $(patsubst %,%.d,$(MEMBERS))
 
 ifdef DESKTOP #environement variable to set if you want extra code included.
-CPPFLAGS += -DDESKTOP
+PACKAGE_CPPFLAGS += -DDESKTOP
 endif
 
 all: $(PACKAGE)
 
 $(PACKAGE): $(OBJS)
-	$(CC) -o $@ $^  $(GTKLDFLAGS) $(LDFLAGS)
+	$(CC) -o $@ $^ $(LDFLAGS) $(PACKAGE_LDFLAGS)
 
 install-program: $(PACKAGE).desktop all 
-	install -D $(PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
-	strip $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
+	install -D $(PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
 	install -d $(DESTDIR)$(PREFIX)/share/pixmaps
 	install -m 644 $(PACKAGE).png $(DESTDIR)$(PREFIX)/share/pixmaps/
 	install -d $(DESTDIR)$(PREFIX)/share/applications
@@ -69,15 +52,6 @@
 	find . -name "*~" -exec rm -f {} \;
 
 
-#--include GPE generic Makefiles
-ifeq ($(CVSBUILD),yes)
-BUILD = ../../base/build
-else
-BUILD = build
-endif
-
 include $(BUILD)/Makefile.dpkg_ipkg
 include $(BUILD)/Makefile.translation
-
-
 -include $(DEPS)