~ubuntu-branches/ubuntu/quantal/sgt-puzzles/quantal

« back to all changes in this revision

Viewing changes to Recipe

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings
  • Date: 2011-03-01 04:16:54 UTC
  • mfrom: (1.2.9 upstream)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20110301041654-949qy9qrroziy7vq
* New upstream version:
  - Add Range and Signpost puzzles
  - Use stock icons and conventional order for dialog buttons
  - Use Cairo for screen rendering
* Update German translation, thanks to Helge Kreutzmann
* Remove or update patches applied or partially applied upstream
* Use Debian source format 3.0 (quilt)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
         + user32.lib gdi32.lib comctl32.lib comdlg32.lib winspool.lib
22
22
WINDOWS  = windows WINDOWS_COMMON
23
23
COMMON   = midend drawing misc malloc random version
24
 
GTK      = gtk printing ps
 
24
GTK      = gtk[COMBINED] printing ps
25
25
# Objects needed for auxiliary command-line programs.
26
26
STANDALONE = nullfe random misc malloc
27
27
 
37
37
 * it directly, or the changes will be lost next time mkfiles.pl runs.
38
38
 * Instead, edit Recipe and/or its *.R subfiles.
39
39
 */
 
40
#define COMBINED
40
41
#include "puzzles.h"
41
42
#define GAMELIST(A) \
42
43
!end
47
48
# Then we finish up list.c as follows:
48
49
!begin >list.c
49
50
 
50
 
#define DECL(x) extern const game x;
51
 
#define REF(x) &x,
 
51
#define DECL(x)                                         \
 
52
extern const game x;                                    \
 
53
extern const char *const *const x##_xpm_icons[];        \
 
54
extern const int x##_n_xpm_icons;
 
55
#define REF(x) { #x, &x, x##_xpm_icons, &x##_n_xpm_icons },
52
56
GAMELIST(DECL)
53
 
const game *gamelist[] = { GAMELIST(REF) };
 
57
const gameindex gamelist[] = { GAMELIST(REF) };
54
58
const int gamecount = lenof(gamelist);
55
59
!end
56
60
 
90
94
        rm -f raw.dmg devicename
91
95
!end
92
96
 
 
97
# Gtk unified application containing all the puzzles.
 
98
puzzles  : [X] GTK COMMON ALL ALL_ICONS
 
99
!begin gtk
 
100
%-icon.o : override CFLAGS += -Dxpm_icons=$(@:%-icon.o=%)_xpm_icons -Dn_xpm_icons=$(@:%-icon.o=%)_n_xpm_icons
 
101
!end
 
102
 
93
103
# Version management.
94
104
!begin vc
95
105
version.obj: *.c *.h
110
120
# For Unix, we also need the gross MD5 hack that causes automatic
111
121
# version number selection in release source archives.
112
122
!begin gtk
113
 
version.o: FORCE;
114
 
FORCE:
 
123
version.o: version.c version2.def
 
124
        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version2.def` -c version.c
 
125
version2.def: FORCE
115
126
        if test -z "$(VER)" && test -f manifest && md5sum -c manifest; then \
116
 
                $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c; \
 
127
                cat version.def > version2.def.new; \
117
128
        elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
118
 
                $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) "-DREVISION=`svnversion .`" -c version.c; \
119
 
        else \
120
 
                $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c version.c; \
 
129
                echo "-DREVISION=`svnversion .`" >version2.def.new; \
 
130
        else \
 
131
                echo "$(VER)" >version2.def.new; \
 
132
        fi && \
 
133
        if diff -q version2.def.new version2.def; then \
 
134
                rm version2.def.new; \
 
135
        else \
 
136
                mv version2.def.new version2.def; \
121
137
        fi
 
138
.PHONY: FORCE
122
139
!end
123
140
!specialobj gtk version
124
141
!begin nestedvm
125
 
version.o: FORCE;
126
 
FORCE:
 
142
version.o: version.c version2.def
 
143
        $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version2.def` -c version.c
 
144
version2.def: FORCE
127
145
        if test -z "$(VER)" && test -f manifest && md5sum -c manifest; then \
128
 
                $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c; \
 
146
                cat version.def > version2.def.new; \
129
147
        elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
130
 
                $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) "-DREVISION=`svnversion .`" -c version.c; \
131
 
        else \
132
 
                $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c version.c; \
 
148
                echo "-DREVISION=`svnversion .`" >version2.def.new; \
 
149
        else \
 
150
                echo "$(VER)" >version2.def.new; \
 
151
        fi && \
 
152
        if diff -q version2.def.new version2.def; then \
 
153
                rm version2.def.new; \
 
154
        else \
 
155
                mv version2.def.new version2.def; \
133
156
        fi
 
157
.PHONY: FORCE
134
158
!end
135
159
!specialobj nestedvm version
136
160
# For OS X, this is made more fiddly by the fact that we don't have
137
161
# md5sum readily available. We do, however, have `md5 -r' which
138
162
# generates _nearly_ the same output, but it has no check function.
139
163
!begin osx
140
 
version.ppc.o: FORCE;
141
 
FORCE:
142
 
        if test -z "$(VER)" && test -f manifest && (md5 -r `awk '{print $$2}' manifest` | diff -w manifest -); then \
143
 
                $(CC) -arch ppc $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c -o version.ppc.o; \
144
 
        elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
145
 
                $(CC) -arch ppc $(COMPAT) $(XFLAGS) $(CFLAGS) "-DREVISION=`svnversion .`" -c version.c -o version.ppc.o; \
146
 
        else \
147
 
                $(CC) -arch ppc $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c version.c -o version.ppc.o; \
148
 
        fi
149
 
version.i386.o: FORCE2;
150
 
FORCE2:
151
 
        if test -z "$(VER)" && test -f manifest && (md5 -r `awk '{print $$2}' manifest` | diff -w manifest -); then \
152
 
                $(CC) -arch i386 $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c -o version.i386.o; \
153
 
        elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
154
 
                $(CC) -arch i386 $(COMPAT) $(XFLAGS) $(CFLAGS) "-DREVISION=`svnversion .`" -c version.c -o version.i386.o; \
155
 
        else \
156
 
                $(CC) -arch i386 $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c version.c -o version.i386.o; \
157
 
        fi
 
164
version.ppc.o: version.c version2.def
 
165
        $(CC) -arch ppc $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version2.def` -c version.c -o $@
 
166
version.i386.o: version.c version2.def
 
167
        $(CC) -arch i386 $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version2.def` -c version.c -o $@
 
168
version2.def: FORCE
 
169
        if test -z "$(VER)" && test -f manifest && (md5 -r `awk '{print $$2}' manifest` | diff -w manifest -); then \
 
170
                cat version.def > version2.def.new; \
 
171
        elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
 
172
                echo "-DREVISION=`svnversion .`" >version2.def.new; \
 
173
        else \
 
174
                echo "$(VER)" >version2.def.new; \
 
175
        fi && \
 
176
        if diff -q version2.def.new version2.def; then \
 
177
                rm version2.def.new; \
 
178
        else \
 
179
                mv version2.def.new version2.def; \
 
180
        fi
 
181
.PHONY: FORCE
158
182
!end
159
183
!specialobj osx version
160
184
 
161
185
# make install for Unix.
162
186
!begin gtk
163
187
install:
 
188
        mkdir -p $(DESTDIR)$(libdir)/sgt-puzzles
 
189
        $(INSTALL_PROGRAM) -m 755 puzzles \
 
190
                $(DESTDIR)$(libdir)/sgt-puzzles/puzzles
164
191
        for i in $(GAMES); do \
165
 
                $(INSTALL_PROGRAM) -m 755 $$i $(DESTDIR)$(gamesdir)/$$i \
 
192
                ln -s $(libdir)/sgt-puzzles/puzzles $(DESTDIR)$(gamesdir)/$$i \
166
193
                || exit 1; \
167
194
        done
168
195
!end