[SCM] logic game ported from ATARI XE/XL branch, master, updated. debian/0.65.6+dfsg-1-7-gf68950d

Peter Pentchev roam at ringlet.net
Sat Dec 4 21:37:53 UTC 2010


On Fri, Dec 03, 2010 at 03:13:19PM +0000, Stephen Kitt wrote:
> The following commit has been merged in the master branch:
> commit ae1e259fdb4e4ad150789bb7f53c38c5925db5bf
> Author: Stephen Kitt <steve at sk2.org>
> Date:   Fri Dec 3 15:28:38 2010 +0100
> 
>     Simplify debian/rules using dh.
> 
[snip]
> diff --git a/debian/rules b/debian/rules
> index d8ccb85..1753467 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -4,26 +4,11 @@
>  # Uncomment this to turn on verbose mode.
>  #export DH_VERBOSE=1
>  
> -include /usr/share/quilt/quilt.make
> +CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
> +LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

My first reaction was "...but what about CPPFLAGS?"; then I took
a quick look at the gnurobbo source and... it seems it is not
using CPPFLAGS at all :)  I wonder if this could be a problem -
e.g. if somebody wants to add some kind of -I or -D directive to
all the packages built...  Have you thought about adding $CPPFLAGS
to $CFLAGS in the Makefile?

Also, I believe you might want to export CFLAGS and LDFLAGS after
getting them from dpkg-buildflags; if you don't, they will only be
visible to Makefile statements and won't be placed in the child
processes' environment, so "dh $@" won't really see them.
To wit:

[roam at greylight ~/deb/pkg-games/git/gnurobbo]$ env DEB_CFLAGS_APPEND=furrfu debuild -uc -us
 dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: env): -g -O2 furrfu
[snip]
make[1]: Entering directory `/home/roam/deb/pkg-games/git/gnurobbo'
cc -g -O2 furrfu -pipe -Wall `sdl-config --cflags` -DPLATFORM_PC -DVERSION=\"0.66\" -DPACKAGE_DATA_DIR=\"/usr/share/games/gnurobbo\"   -DHAVE_DESIGNER -c board.c -o board.o
gcc-4.4.real: furrfu: No such file or directory
make[1]: *** [board.o] Error 1

So far so good, but if you don't use debuild or dpkg-buildpackage:

[roam at greylight ~/deb/pkg-games/git/gnurobbo]$ env DEB_CFLAGS_APPEND=furrfu debian/rules build
dh build
   dh_testdir
   dh_auto_configure
   dh_auto_build
make[1]: Entering directory `/home/roam/deb/pkg-games/git/gnurobbo'
cc -O3 -pipe -Wall `sdl-config --cflags` -DPLATFORM_PC -DVERSION=\"0.66\" -DPACKAGE_DATA_DIR=\"/usr/share/games/gnurobbo\"   -DHAVE_DESIGNER -c board.c -o board.o
cc -O3 -pipe -Wall `sdl-config --cflags` -DPLATFORM_PC -DVERSION=\"0.66\" -DPACKAGE_DATA_DIR=\"/usr/share/games/gnurobbo\"   -DHAVE_DESIGNER -c controls.c -o controls.o
cc -O3 -pipe -Wall `sdl-config --cflags` -DPLATFORM_PC -DVERSION=\"0.66\" -DPACKAGE_DATA_DIR=\"/usr/share/games/gnurobbo\"   -DHAVE_DESIGNER -c font.c -o font.o
...

As you can see, the flags obtained from dpkg-buildflags are *not* passed
on to the environment of the "dh build" child process, and thus the two
assignments for CFLAGS and LDFLAGS in the Makefile have no effect.
Easily fixed by adding an "export CFLAGS LDFLAGS" a line or two later :)

G'luck,
Peter

-- 
Peter Pentchev	roam at space.bg    roam at ringlet.net    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If this sentence didn't exist, somebody would have invented it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-commits/attachments/20101204/75b8a74c/attachment.pgp>


More information about the Pkg-games-commits mailing list