hi everyone,

i compiled xbat on my amd64 box and get the same problem, changing the
setting of UNION in the makefile fixes it. the attached patch does not
do this, but instead uses the union_check.c program included in the
package to detect this setting at compile-time. this is still dirty, but
way less dirty than the rest of the code...

i will NMU this in a few days if no one tells me not to.

to the games team: perhaps it's better to remove this game altogether,
the code is ugly and the game crappy...

cu  robert

-- 
Robert Lemmen                               http://www.semistable.com 
--- xbat-1.11.orig/debian/rules	2008-12-03 19:27:39.000000000 +0000
+++ xbat-1.11.mine/debian/rules	2008-12-03 19:25:56.000000000 +0000
@@ -7,14 +7,6 @@
   DOMO_DIR=/usr/share/games/xbat/Domo \
   BINDIR=/usr/games
 
-# UNION is a compile flag.  It cannot be evaluated in the Imakefile,
-# because imake doesn't give cpp a nice $ARCH flag to evaluate.  
-ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386)
-  UNION=1
-else
-  UNION=0
-endif
-
 build: build-stamp
 build-stamp:
 	dh_testdir
@@ -22,8 +14,10 @@
 	rm -f Makefile
 	xmkmf
 	gcc -o union_check union_check.c
-	$(MAKE) UNION=$(UNION) $(FHS_DEFINES) depend
-	$(MAKE) UNION=$(UNION) $(FHS_DEFINES) xbat
+	$(MAKE) UNION=`./union_check 2>&1 | sed -e 's/.*\([01]\).*/\1/'` \
+		 $(FHS_DEFINES) depend
+	$(MAKE) UNION=`./union_check 2>&1 | sed -e 's/.*\([01]\).*/\1/'` \
+		 $(FHS_DEFINES) xbat
 	rm union_check.c
 	touch build-stamp
 

Attachment: signature.asc
Description: Digital signature

Reply via email to