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