r5400 - in packages/trunk/warsow/debian: . patches
Andres Mejia
ceros-guest at alioth.debian.org
Wed Jan 16 07:11:22 UTC 2008
Author: ceros-guest
Date: 2008-01-16 07:11:22 +0000 (Wed, 16 Jan 2008)
New Revision: 5400
Modified:
packages/trunk/warsow/debian/changelog
packages/trunk/warsow/debian/patches/makefile_modifications.diff
packages/trunk/warsow/debian/rules
Log:
* Modifying patch for upstream Makefile to show all options used for
compiling and linking.
* Add 'nostrip' option.
Modified: packages/trunk/warsow/debian/changelog
===================================================================
--- packages/trunk/warsow/debian/changelog 2008-01-16 05:42:20 UTC (rev 5399)
+++ packages/trunk/warsow/debian/changelog 2008-01-16 07:11:22 UTC (rev 5400)
@@ -14,6 +14,9 @@
* Removed Encoding field from desktop file.
* Edited English description in desktop and menu file.
* No longer renaming upstream changelog.
+ * Modifying patch for upstream Makefile to show all options used for
+ compiling and linking.
+ * Add 'nostrip' option.
-- Andres Mejia <mcitadel at gmail.com> Tue, 15 Jan 2008 19:37:36 -0500
Modified: packages/trunk/warsow/debian/patches/makefile_modifications.diff
===================================================================
--- packages/trunk/warsow/debian/patches/makefile_modifications.diff 2008-01-16 05:42:20 UTC (rev 5399)
+++ packages/trunk/warsow/debian/patches/makefile_modifications.diff 2008-01-16 07:11:22 UTC (rev 5400)
@@ -1,15 +1,14 @@
-Index: Some makefile modifications
+Index: Some makefile modifications, making it more useful in building
+Debian packages.
===================================================================
---- ./warsow_0.32/source/Makefile.bak 2007-09-04 16:34:07.000000000 -0400
-+++ ./warsow_0.32/source/Makefile 2007-09-04 16:38:28.000000000 -0400
-@@ -31,8 +31,8 @@
- CC=i586-mingw32msvc-gcc
+--- ./warsow_0.32/source/Makefile.bak 2008-01-16 01:27:01.000000000 -0500
++++ ./warsow_0.32/source/Makefile 2008-01-16 02:01:06.000000000 -0500
+@@ -32,7 +32,7 @@
LD=i586-mingw32msvc-gcc
else
--CC?=gcc
+ CC?=gcc
-LD=gcc
-+CC=$(DEB_HOST_GNU_TYPE)-gcc
-+LD=$(DEB_HOST_GNU_TYPE)-gcc
++LD?=gcc
# this nice line comes from the linux kernel makefile
BASE_ARCH:=$(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/)
@@ -22,24 +21,29 @@
BINDIR=release
DEPENDFILE_CLIENT=$(BUILDDIR)/client/Makefile.d
-@@ -96,11 +96,11 @@
+@@ -96,13 +96,13 @@
CLIENT_EXE=warsow_$(ARCH).exe
SERVER_EXE=wsw_server_$(ARCH).exe
-else # USE_MINGW
--LOCALBASE?=/usr/local
+else # when USE_MINGW=NO
-+#LOCALBASE?=/usr/local #shouldn't be using /usr/local
+ LOCALBASE?=/usr/local
X11BASE?=/usr/X11R6
--CFLAGS_COMMON=$(CFLAGS) -I. -I$(LOCALBASE)/include -I$(X11BASE)/include -Wall
-+CFLAGS_COMMON=$(CFLAGS) -I. -I$(X11BASE)/include -Wall
+ CFLAGS_COMMON=$(CFLAGS) -I. -I$(LOCALBASE)/include -I$(X11BASE)/include -Wall
CFLAGS_RELEASE=-O2 -fno-strict-aliasing -ffast-math -funroll-loops -DNDEBUG
- CFLAGS_DEBUG=-O0 -ggdb -D_DEBUG
+-CFLAGS_DEBUG=-O0 -ggdb -D_DEBUG
++CFLAGS_DEBUG=-O0 -g -D_DEBUG
ifeq ($(DEBUG_BUILD),YES)
-@@ -114,16 +114,12 @@
- CFLAGS_MODULE=-DPIC -fPIC
+ CFLAGS_COMMON+=$(CFLAGS_DEBUG)
+ else
+@@ -111,19 +111,15 @@
+ CFLAGS_CLIENT=$(shell curl-config --cflags)
+ CFLAGS_DED=-DDEDICATED_ONLY -DC_ONLY
+-CFLAGS_MODULE=-DPIC -fPIC
++CFLAGS_MODULE=-DPIC -fPIC -D_REENTRANT
+
ifeq ($(OS),FreeBSD)
-LDFLAGS_COMMON=-L/usr/local/lib -lm
+LDFLAGS_COMMON=-L/usr/lib -lm
@@ -67,3 +71,85 @@
endif # USE_MINGW
# Mac support, hacking this in at the end where it is easier than adding more if statements throughout
+@@ -182,8 +178,10 @@
+ ######################################################################################################
+ # Helper functions
+ ######################################################################################################
+-DO_CC=echo " > Compiling $<" && \
+- $(CC) $(CFLAGS_COMMON) -c $< -o $@
++# Need to adjust this so that all options used are displayed
++# in the build logs.
++DO_CC=@echo "$(CC) $(CFLAGS_COMMON) -c $< -o $@" && \
++ $(CC) $(CFLAGS_COMMON) -c $< -o $@
+
+ DO_CC_CLIENT=$(DO_CC) $(CFLAGS_CLIENT)
+ DO_CC_DED=$(DO_CC) $(CFLAGS_DED)
+@@ -439,12 +437,13 @@
+
+ ######################################################################################################
+ # Linking Rules
++# Need to display all options used for later viewing from build logs.
+ ######################################################################################################
+ ########
+ # DED
+ ########
+ $(BINDIR)/$(SERVER_EXE): $(OBJS_DED)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_DED)" && \
+ $(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_DED)
+
+ #########
+@@ -452,11 +451,11 @@
+ #########
+ ifeq ($(OS),Darwin)
+ $(BINDIR)/$(CLIENT_EXE): $(OBJS_CLIENT)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $(OBJS_CLIENT) mac/SDLMain.m $(LDFLAGS_COMMON) $(LDFLAGS_CLIENT)" && \
+ $(LD) -o $@ $(OBJS_CLIENT) mac/SDLMain.m $(LDFLAGS_COMMON) $(LDFLAGS_CLIENT)
+ else
+ $(BINDIR)/$(CLIENT_EXE): $(OBJS_CLIENT)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $(OBJS_CLIENT) $(LDFLAGS_COMMON) $(LDFLAGS_CLIENT)" && \
+ $(LD) -o $@ $(OBJS_CLIENT) $(LDFLAGS_COMMON) $(LDFLAGS_CLIENT)
+ endif
+
+@@ -464,33 +463,33 @@
+ # OPENAL
+ #########
+ $(BINDIR)/libs/snd_openal_$(ARCH).$(SHARED_LIBRARY_EXTENSION): $(OBJS_OPENAL)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE) $(LDFLAGS_OPENAL)" && \
+ $(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE) $(LDFLAGS_OPENAL)
+
+ #########
+ # QF
+ #########
+ $(BINDIR)/libs/snd_qf_$(ARCH).$(SHARED_LIBRARY_EXTENSION): $(OBJS_QF)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE) $(LDFLAGS_QF)" && \
+ $(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE) $(LDFLAGS_QF)
+
+ ########
+ # .SO
+ ########
+ $(BINDIR)/basewsw/cgame_$(ARCH).$(SHARED_LIBRARY_EXTENSION): $(OBJS_CGAME)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)" && \
+ $(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)
+
+ $(BINDIR)/basewsw/game_$(ARCH).$(SHARED_LIBRARY_EXTENSION): $(OBJS_GAME)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)" && \
+ $(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)
+
+ $(BINDIR)/basewsw/ui_$(ARCH).$(SHARED_LIBRARY_EXTENSION): $(OBJS_UI)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)" && \
+ $(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)
+
+ $(BINDIR)/libs/irc_$(ARCH).$(SHARED_LIBRARY_EXTENSION): $(OBJS_IRC)
+- @echo " > Linking $@" && \
++ @echo "$(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)" && \
+ $(LD) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)
+
+ ######################################################################################################
Modified: packages/trunk/warsow/debian/rules
===================================================================
--- packages/trunk/warsow/debian/rules 2008-01-16 05:42:20 UTC (rev 5399)
+++ packages/trunk/warsow/debian/rules 2008-01-16 07:11:22 UTC (rev 5400)
@@ -8,6 +8,13 @@
# Needed for deleting a directory when running rules clean after a build
DPKG_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+# nostrip option implies noopt as well for this package.
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ DEBUG = no
+else
+ DEBUG = yes
+endif
+
# Needed for deleting directory created when running rules clean twice on
# x86_64 and other architectures.
UNAME_ARCH=$(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/)
@@ -26,7 +33,8 @@
build: patch build-stamp
build-stamp:
dh_testdir
- cd warsow_0.32/source && $(MAKE) BUILD_DEBUG=NO
+ cd warsow_0.32/source && $(MAKE) LOCALBASE=/usr DEBUG_BUILD=$(DEBUG) \
+ CC=$(DEB_HOST_GNU_TYPE)-gcc LD=$(DEB_HOST_GNU_TYPE)-gcc
touch build-stamp
clean: clean-patched unpatch to-dos
@@ -74,7 +82,9 @@
dh_desktop
dh_installman -pwarsow debian/warsow.6
dh_installman -pwarsow-server debian/warsow-server.6
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
dh_strip
+endif
dh_compress
dh_fixperms
dh_installdeb
More information about the Pkg-games-commits
mailing list