1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

- Belatedly update to version 0.42

- Introduce number of new knobs
- Throw in couple of comments on inplace patching
This commit is contained in:
Alexey Dokuchaev 2008-07-25 06:09:42 +00:00
parent 050c8c51cd
commit 86a5ad2092
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=217459
8 changed files with 174 additions and 292 deletions

View File

@ -6,56 +6,50 @@
#
PORTNAME= warsow
PORTVERSION= 0.12
PORTREVISION= 7
PORTVERSION= 0.42
CATEGORIES= games
MASTER_SITES= http://warsow.aditsystems.com/ \
http://ftp.club-internet.fr/pub/games/nofrag/warsow/ \
http://wsw.surreal-xenotronic.com/
MASTER_SITES= http://data.rodix.free.fr/warsow/files/ \
http://88.191.19.21/wsw/
DISTNAME= ${PORTNAME}_${PORTVERSION}_sdk
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= danfe@FreeBSD.org
COMMENT= A fast paced first person shooter game
RUN_DEPENDS= ${DATADIR}/data0.pk3:${PORTSDIR}/games/warsow-data
LIB_DEPENDS= curl.4:${PORTSDIR}/ftp/curl
RUN_DEPENDS= ${DATADIR}/basewsw/data0.pk3:${PORTSDIR}/games/warsow-data
ONLY_FOR_ARCHS= i386 amd64
USE_GMAKE= yes
USE_GCC= 3.4+
USE_XORG= xxf86dga
USE_ZIP= yes
USE_DOS2UNIX= linux/in_x11.c linux/sys_linux.c
USE_DOS2UNIX= game/q_shared.h
WRKSRC= ${WRKDIR}/source/source012
WRKSRC= ${WRKDIR}/${DISTNAME:S/sdk/src/}/source
ALL_TARGET= game
MAKE_ARGS= PTHREAD_LIBS="${PTHREAD_LIBS}"
RELEASEDIR= ${WRKSRC}/release
WSWDATADIR= ${PREFIX}/lib/${PORTNAME}
WSWSUBDIR= basewsw
OPTIONS= CLIENT "Build client executable" on \
SERVER "Build dedicated server executable" on
SERVER "Build dedicated server executable" on \
QF "Build Qf sound module" on \
OPENAL "Build OpenAL sound module" on \
IRC "Build IRC client module" on \
TV_SRV "Build Warsow TV server" on
.include <bsd.port.pre.mk>
.if defined(WITHOUT_CLIENT) && defined(WITHOUT_SERVER)
IGNORE= requires at least one of CLIENT and SERVER options
.endif
.if ${ARCH} == "i386"
ARCHSUFFIX= "_i386"
PLIST_SUB+= ARCHSUFFIX=${ARCHSUFFIX}
.elif ${ARCH} == "amd64"
ARCHSUFFIX= "_x86_64"
PLIST_SUB+= ARCHSUFFIX=${ARCHSUFFIX}
IGNORE= requires at least one of CLIENT or SERVER options
.endif
.if !defined(WITHOUT_CLIENT)
LIB_DEPENDS= curl.4:${PORTSDIR}/ftp/curl \
jpeg.9:${PORTSDIR}/graphics/jpeg
LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg
USE_GL= yes
USE_SDL= yes
USE_XORG= xxf86dga
ALL_TARGET+= cgame ui client
WSBIN+= warsow
WSWBIN+= warsow
PLIST_SUB+= CLIENT=""
.else
PLIST_SUB+= CLIENT="@comment "
@ -63,25 +57,70 @@ PLIST_SUB+= CLIENT="@comment "
.if !defined(WITHOUT_SERVER)
ALL_TARGET+= ded
WSBIN+= wsw_server
WSWBIN+= wsw_server
PLIST_SUB+= SERVER=""
.else
PLIST_SUB+= SERVER="@comment "
.endif
.if !(defined(WITHOUT_QF) && defined(WITHOUT_OPENAL))
LIB_DEPENDS+= vorbisfile.5:${PORTSDIR}/audio/libvorbis
.endif
.if !(defined(WITHOUT_QF) && defined(WITHOUT_OPENAL) && defined(WITHOUT_IRC))
WSWSUBDIR+= libs
.endif
.if !defined(WITHOUT_QF)
USE_SDL= yes
ALL_TARGET+= qf
PLIST_SUB+= QF=""
.else
PLIST_SUB+= QF="@comment "
.endif
.if !defined(WITHOUT_OPENAL)
LIB_DEPENDS+= openal.0:${PORTSDIR}/audio/openal
ALL_TARGET+= openal
PLIST_SUB+= OPENAL=""
.else
PLIST_SUB+= OPENAL="@comment "
.endif
.if !defined(WITHOUT_IRC)
ALL_TARGET+= irc
PLIST_SUB+= IRC=""
.else
PLIST_SUB+= IRC="@comment "
.endif
.if !defined(WITHOUT_TV_SRV)
ALL_TARGET+= tv_server
WSWBIN+= wswtv_server
PLIST_SUB+= TVSERVER=""
.else
PLIST_SUB+= TVSERVER="@comment "
.endif
PLIST_SUB+= ARCH=${ARCH}
post-patch: .SILENT
${REINPLACE_CMD} -e 's#@$$(DO_CC#$$(DO_CC#; \
s#-O2 ##' ${WRKSRC}/Makefile
${REINPLACE_CMD} -e 's#path", "\.#path", "${WSWDATADIR}#; \
s#dir", "0#dir", "1#' ${WRKSRC}/qcommon/files.c
${REINPLACE_CMD} -e 's#Linux#FreeBSD#' ${WRKSRC}/game/q_shared.h
# Unmute build and link commands, respect CFLAGS
${REINPLACE_CMD} -e 's|@$$(DO_CC|$$(DO_CC| ; /> Linking $$@/d ; \
s|-O2 -fno-strict-aliasing -ffast-math -funroll-loops ||' \
${WRKSRC}/Makefile
# Search directory provided by warsow-data port instead of current. Doing
# so allows us not to install any wrapper scripts.
${REINPLACE_CMD} -e 's|path", "\.|path", "${DATADIR}|' \
${WRKSRC}/qcommon/files.c
# FreeBSD does not use stupid `64' suffix for 64-bit readdir(3)
${REINPLACE_CMD} -e 's/FILE64_SOURCE)/& || defined(__FreeBSD__)/' \
${WRKSRC}/unix/unix_fs.c
do-install:
@${MKDIR} ${PREFIX}/lib/${PORTNAME}/basewsw
.for FILE in ${WSBIN}
${INSTALL_PROGRAM} ${RELEASEDIR}/${FILE} ${PREFIX}/bin
.for b in ${WSWBIN}
${INSTALL_PROGRAM} ${RELEASEDIR}/${b}.${ARCH} ${PREFIX}/bin/${b}
.endfor
${INSTALL_DATA} ${RELEASEDIR}/basewsw/*.so ${PREFIX}/lib/${PORTNAME}/basewsw
${LN} -s ${DATADIR}/* ${PREFIX}/lib/${PORTNAME}/basewsw
cd ${RELEASEDIR} && ${COPYTREE_SHARE} ${WSWSUBDIR} ${DATADIR}
.include <bsd.port.post.mk>

View File

@ -1,6 +1,3 @@
MD5 (warsow/warsow_0.12_sdk.zip) = df1866b9c73d40bebd81d5255ad3ae5d
SHA256 (warsow/warsow_0.12_sdk.zip) = 2fb3de40d6a23c2dc2b0617930db5c83dd4d2b34e19feb25a9bee7481b1b7bec
SIZE (warsow/warsow_0.12_sdk.zip) = 5028892
MD5 (warsow/warsow_0.12_linux.tar.gz) = ee288d7508237a0670b20cf64516ad36
SHA256 (warsow/warsow_0.12_linux.tar.gz) = 7ff7b48106fe09663c76f8e305b1532538bd3ee29458a6c4241225266951c926
SIZE (warsow/warsow_0.12_linux.tar.gz) = 66745206
MD5 (warsow/warsow_0.42_sdk.zip) = 94c9bb2a48ac6f2687b38809e003f3b9
SHA256 (warsow/warsow_0.42_sdk.zip) = 6c3c4cf161472646501c53672792e123787e5fef9f3dac60e70f1235525e9278
SIZE (warsow/warsow_0.42_sdk.zip) = 16601262

View File

@ -1,204 +1,56 @@
--- Makefile.orig 2006-06-08 22:44:02.000000000 +0200
+++ Makefile 2008-04-11 13:18:40.000000000 +0200
@@ -18,15 +18,15 @@
CC?=gcc
-CFLAGS_COMMON=$(CFLAGS) -I. -I$(LOCALBASE)/include -I$(X11BASE)/include -D__linux__ -Wall
-CFLAGS_RELEASE=-O2 -fno-strict-aliasing -ffast-math -funroll-loops
+CFLAGS_COMMON=$(CFLAGS) -I. -I$(LOCALBASE)/include -D__linux__ -Wall
+CFLAGS_RELEASE=-fno-strict-aliasing -ffast-math -funroll-loops
CFLAGS_DEBUG=-O0 -ggdb -DDEBUG
CFLAGS_COMMON+=$(CFLAGS_RELEASE)
CFLAGS_DED=-DDEDICATED_ONLY -DC_ONLY
CFLAGS_MODULE=-fPIC
-LDFLAGS_COMMON=-L/usr/local/lib -ldl -lm
+LDFLAGS_COMMON=-L$(LOCALBASE)/lib -lm
ifeq ($(ARCH),x86_64)
LIB=lib64
@@ -48,13 +48,19 @@
LDFLAGS_SDL=$(shell $(SDL_CONFIG) --libs)
ifeq ($(OS),FreeBSD)
-ARCH=freebsd_$(BASE_ARCH)
+ARCH=_$(BASE_ARCH)
@@ -34,19 +34,12 @@
CC=i586-mingw32msvc-gcc
LD=i586-mingw32msvc-gcc
else
ARCH=$(BASE_ARCH)
-CC?=gcc
-LD=gcc
+CC?=cc
+LD=$(CC)
-# 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/)
+ARCH=$(shell uname -m)
OS=$(shell uname)
-ifeq ($(OS),FreeBSD)
-ARCH=freebsd_$(BASE_ARCH)
-else
-ARCH=$(BASE_ARCH)
-endif
-
SHARED_LIBRARY_EXTENSION=so
endif
-SERVER_EXE=wsw_server.$(ARCH)
-CLIENT_EXE=warsow.$(ARCH)
+ifeq ($(BASE_ARCH),i386)
+ARCHSUFFIX=i386
+else
+ARCHSUFFIX=x86_64
+endif
+
+SERVER_EXE=wsw_server
+CLIENT_EXE=warsow
@@ -134,7 +127,7 @@
LIB=lib
endif
-LDFLAGS_CLIENT=-ljpeg -lz -L$(X11BASE)/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm -lXinerama $(shell curl-config --libs)
+LDFLAGS_CLIENT=-ljpeg -lz -L$(X11BASE)/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm -lXinerama $(shell curl-config --libs) $(PTHREAD_LIBS)
LDFLAGS_DED=-lz $(shell curl-config --libs)
LDFLAGS_MODULE=-shared
LDFLAGS_TV_SERVER=-lz
@@ -149,11 +142,7 @@
# sdl
ifeq ($(BUILD_SND_QF),YES)
-ifeq ($(OS),FreeBSD)
-SDL_CONFIG?=sdl11-config
-else
SDL_CONFIG?=sdl-config
-endif
CFLAGS_SDL=$(shell $(SDL_CONFIG) --cflags)
LDFLAGS_QF=$(shell $(SDL_CONFIG) --libs) -lvorbisfile
@@ -193,8 +182,7 @@
######################################################################################################
# Helper functions
@@ -196,21 +202,21 @@
@echo "> * Building cgame"
@echo "> *********************************************************"
compile-cgame: $(OBJS_CGAME)
-link-cgame: $(BINDIR)/basewsw $(BINDIR)/basewsw/cgame_$(ARCH).so
+link-cgame: $(BINDIR)/basewsw $(BINDIR)/basewsw/cgame_$(ARCHSUFFIX).so
message-game:
@echo "> *********************************************************"
@echo "> * Building game"
@echo "> *********************************************************"
compile-game: $(OBJS_GAME)
-link-game: $(BINDIR)/basewsw $(BINDIR)/basewsw/game_$(ARCH).so
+link-game: $(BINDIR)/basewsw $(BINDIR)/basewsw/game_$(ARCHSUFFIX).so
message-ui:
@echo "> *********************************************************"
@echo "> * Building ui"
@echo "> *********************************************************"
compile-ui: $(OBJS_UI)
-link-ui: $(BINDIR)/basewsw $(BINDIR)/basewsw/ui_$(ARCH).so
+link-ui: $(BINDIR)/basewsw $(BINDIR)/basewsw/ui_$(ARCHSUFFIX).so
######################################################################################################
@@ -220,29 +226,29 @@
# DED
########
$(BINDIR)/$(SERVER_EXE): $(OBJS_DED)
- @echo " > Linking $@" && \
+ echo " > Linking $@" && \
$(CC) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_DED)
-DO_CC=echo " > Compiling $<" && \
- $(CC) $(CFLAGS_COMMON) -c $< -o $@
+DO_CC=$(CC) $(CFLAGS_COMMON) -c $< -o $@
#########
# CLIENT
#########
$(BINDIR)/$(CLIENT_EXE): $(OBJS_CLIENT)
- @echo " > Linking $@" && \
+ echo " > Linking $@" && \
$(CC) -o $@ $(OBJS_CLIENT) $(LDFLAGS_COMMON) $(LDFLAGS_CLIENT) $(LDFLAGS_SDL)
########
# .SO
########
-$(BINDIR)/basewsw/cgame_$(ARCH).so: $(OBJS_CGAME)
- @echo " > Linking $@" && \
+$(BINDIR)/basewsw/cgame_$(ARCHSUFFIX).so: $(OBJS_CGAME)
+ echo " > Linking $@" && \
$(CC) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)
-$(BINDIR)/basewsw/game_$(ARCH).so: $(OBJS_GAME)
- @echo " > Linking $@" && \
+$(BINDIR)/basewsw/game_$(ARCHSUFFIX).so: $(OBJS_GAME)
+ echo " > Linking $@" && \
$(CC) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)
-$(BINDIR)/basewsw/ui_$(ARCH).so: $(OBJS_UI)
- @echo " > Linking $@" && \
+$(BINDIR)/basewsw/ui_$(ARCHSUFFIX).so: $(OBJS_UI)
+ echo " > Linking $@" && \
$(CC) -o $@ $^ $(LDFLAGS_COMMON) $(LDFLAGS_MODULE)
@@ -253,76 +259,76 @@
# CLIENT
########
$(BUILDDIR)/client/%.o: qcommon/%.c
- @$(DO_CC)
+ $(DO_CC)
$(BUILDDIR)/client/%.o: server/%.c
- @$(DO_CC)
+ $(DO_CC)
$(BUILDDIR)/client/%.o: client/%.c
- @$(DO_CC)
+ $(DO_CC)
$(BUILDDIR)/client/%.o: ref_gl/%.c
- @$(DO_CC)
+ $(DO_CC)
$(BUILDDIR)/client/%.o: linux/%.c
- @$(DO_CC)
+ $(DO_CC)
$(BUILDDIR)/client/snd_sdl.o: linux/snd_sdl.c
- @$(DO_CC) $(CFLAGS_SDL)
+ $(DO_CC) $(CFLAGS_SDL)
$(BUILDDIR)/client/%.o: game/%.c
- @$(DO_CC)
+ $(DO_CC)
########
# DED
########
$(BUILDDIR)/ded/%.o: qcommon/%.c
- @$(DO_CC_DED)
+ $(DO_CC_DED)
$(BUILDDIR)/ded/%.o: server/%.c
- @$(DO_CC_DED)
+ $(DO_CC_DED)
$(BUILDDIR)/ded/%.o: linux/%.c
- @$(DO_CC_DED)
+ $(DO_CC_DED)
$(BUILDDIR)/ded/%.o: null/%.c
- @$(DO_CC_DED)
+ $(DO_CC_DED)
$(BUILDDIR)/ded/%.o: game/%.c
- @$(DO_CC_DED)
+ $(DO_CC_DED)
########
# CGAME
########
$(BUILDDIR)/cgame/%.o: cgame/%.c
- @$(DO_CC_MODULE)
+ $(DO_CC_MODULE)
$(BUILDDIR)/cgame/%.o: gameshared/%.c
- @$(DO_CC_MODULE)
+ $(DO_CC_MODULE)
$(BUILDDIR)/cgame/%.o: game/%.c
- @$(DO_CC_MODULE)
+ $(DO_CC_MODULE)
########
# GAME
########
$(BUILDDIR)/game/%.o: game/%.c
- @$(DO_CC_MODULE)
+ $(DO_CC_MODULE)
$(BUILDDIR)/game/%.o: game/ai/%.c
- @$(DO_CC_MODULE)
+ $(DO_CC_MODULE)
$(BUILDDIR)/game/%.o: gameshared/%.c
- @$(DO_CC_MODULE)
+ $(DO_CC_MODULE)
########
# UI
########
$(BUILDDIR)/ui/%.o: game/%.c
- @$(DO_CC_MODULE)
+ $(DO_CC_MODULE)
$(BUILDDIR)/ui/%.o: ui/%.c
- @$(DO_CC_MODULE)
+ $(DO_CC_MODULE)
######################################################################################################
DO_CC_CLIENT=$(DO_CC) $(CFLAGS_CLIENT)
DO_CC_DED=$(DO_CC) $(CFLAGS_DED)

View File

@ -0,0 +1,42 @@
--- game/q_shared.h.orig 2008-07-24 05:38:24.000000000 +0700
+++ game/q_shared.h 2008-07-24 05:41:08.000000000 +0700
@@ -98,15 +98,15 @@
#ifdef _M_IX86
#if defined __FreeBSD__
#define CPUSTRING "i386"
-#define ARCH "freebsd_i386"
+#define ARCH "i386"
#else
#define CPUSTRING "x86"
#define ARCH "x86"
#endif
#elif defined ( _M_AMD64 )
#if defined __FreeBSD__
-#define CPUSTRING "x86_64"
-#define ARCH "freebsd_x86_64"
+#define CPUSTRING "amd64"
+#define ARCH "amd64"
#else
#define CPUSTRING "x64"
#define ARCH "x64"
@@ -162,17 +162,12 @@
#endif
#ifdef __i386__
-#if defined __FreeBSD__
-#define ARCH "freebsd_i386"
-#define CPUSTRING "i386"
-#else
#define ARCH "i386"
#define CPUSTRING "i386"
-#endif
-#elif defined ( __x86_64__ )
+#elif defined ( __x86_64__ ) || defined( __amd64__ )
#if defined __FreeBSD__
-#define ARCH "freebsd_x86_64"
-#define CPUSTRING "x86_64"
+#define ARCH "amd64"
+#define CPUSTRING "amd64"
#else
#define ARCH "x86_64"
#define CPUSTRING "x86_64"

View File

@ -1,15 +0,0 @@
--- linux/in_x11.c.orig Thu Jun 29 12:26:46 2006
+++ linux/in_x11.c Thu Jun 29 11:55:06 2006
@@ -589,10 +589,8 @@
}
else
{
- mx = -((int)event.xmotion.x - mwx);// * 2;
- my = -((int)event.xmotion.y - mwy);// * 2;
- mwx = event.xmotion.x;
- mwy = event.xmotion.y;
+ mx += ((int)event.xmotion.x - mwx);
+ my += ((int)event.xmotion.y - mwy);
if (mx || my)
dowarp = qtrue;

View File

@ -1,20 +0,0 @@
--- linux/sys_linux.c Sat Aug 19 21:04:32 2006
+++ linux/sys_linux.c Sat Aug 19 21:04:55 2006
@@ -380,7 +380,7 @@
#if defined __FreeBSD__
#if defined __i386__
-#define ARCH "freebsd_i386"
+#define ARCH "i386"
#ifdef NDEBUG
const char *debugdir = "freebsd_releasei386";
@@ -389,7 +389,7 @@
#endif
#elif defined __x86_64__
-#define ARCH "xfreebsd_86_64"
+#define ARCH "x86_64"
#ifdef NDEBUG
const char *debugdir = "releasex86_64";
#else

View File

@ -8,5 +8,6 @@ Warsow is a standalone multiplayer game. It features:
* Cartoonish graphics with celshading-like-but-not-Manga style, mixing
dark, flashy, and dirty textures, matching with action full of fun
and speed
* Additional goodies such as in-game IRC client and Warsow TV server
WWW: http://www.warsow.net/

View File

@ -1,24 +1,10 @@
%%CLIENT%%bin/warsow
%%SERVER%%bin/wsw_server
lib/warsow/basewsw/cfgs
%%CLIENT%%lib/warsow/basewsw/cgame%%ARCHSUFFIX%%.so
lib/warsow/basewsw/config.cfg
lib/warsow/basewsw/data0.pk3
lib/warsow/basewsw/data0fix1.pk3
lib/warsow/basewsw/data0fix2.pk3
lib/warsow/basewsw/dedicated_autoexec.cfg
lib/warsow/basewsw/game%%ARCHSUFFIX%%.so
lib/warsow/basewsw/huds
lib/warsow/basewsw/map_wctf1.pk3
lib/warsow/basewsw/map_wdm1.pk3
lib/warsow/basewsw/map_wdm2.pk3
lib/warsow/basewsw/map_wdm5.pk3
lib/warsow/basewsw/map_wmid1.pk3
lib/warsow/basewsw/map_wmid2.pk3
lib/warsow/basewsw/map_wmid3.pk3
lib/warsow/basewsw/map_wtest1.pk3
lib/warsow/basewsw/map_wtest3.pk3
lib/warsow/basewsw/map_wtest4.pk3
%%CLIENT%%lib/warsow/basewsw/ui%%ARCHSUFFIX%%.so
@dirrm lib/warsow/basewsw
@dirrm lib/warsow
%%TVSERVER%%bin/wswtv_server
%%CLIENT%%%%DATADIR%%/basewsw/cgame_%%ARCH%%.so
%%DATADIR%%/basewsw/game_%%ARCH%%.so
%%CLIENT%%%%DATADIR%%/basewsw/ui_%%ARCH%%.so
%%IRC%%%%DATADIR%%/libs/irc_%%ARCH%%.so
%%OPENAL%%%%DATADIR%%/libs/snd_openal_%%ARCH%%.so
%%QF%%%%DATADIR%%/libs/snd_qf_%%ARCH%%.so
%%IRC%%%%OPENAL%%%%QF%%@dirrm %%DATADIR%%/libs