2006-06-01 13:19:18 +02:00
|
|
|
# New ports collection makefile for: Warsow
|
|
|
|
# Date created: 31 May 2006
|
|
|
|
# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= warsow
|
2011-02-07 11:59:53 +01:00
|
|
|
PORTVERSION= 0.6
|
2006-06-01 13:19:18 +02:00
|
|
|
CATEGORIES= games
|
2011-02-07 11:59:53 +01:00
|
|
|
MASTER_SITES= http://www.zcdn.org/dl/ \
|
|
|
|
http://www.derchris.eu/warsow/
|
2006-06-01 13:19:18 +02:00
|
|
|
DISTNAME= ${PORTNAME}_${PORTVERSION}_sdk
|
|
|
|
DIST_SUBDIR= ${PORTNAME}
|
|
|
|
|
|
|
|
MAINTAINER= danfe@FreeBSD.org
|
|
|
|
COMMENT= A fast paced first person shooter game
|
|
|
|
|
2011-02-07 11:59:53 +01:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2010-04-03 12:44:36 +02:00
|
|
|
LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl
|
2011-02-07 11:59:53 +01:00
|
|
|
RUN_DEPENDS= ${DATADIR}/basewsw/data0_06.pk3:${PORTSDIR}/games/warsow-data
|
2006-08-20 17:11:09 +02:00
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
2006-06-01 13:19:18 +02:00
|
|
|
USE_GMAKE= yes
|
|
|
|
USE_ZIP= yes
|
|
|
|
|
2009-12-05 16:04:34 +01:00
|
|
|
WRKSRC= ${WRKDIR}/source
|
2006-08-20 17:11:09 +02:00
|
|
|
ALL_TARGET= game
|
2006-06-01 13:19:18 +02:00
|
|
|
RELEASEDIR= ${WRKSRC}/release
|
2008-07-25 08:09:42 +02:00
|
|
|
WSWSUBDIR= basewsw
|
2006-06-01 13:19:18 +02:00
|
|
|
|
2006-06-29 11:07:17 +02:00
|
|
|
OPTIONS= CLIENT "Build client executable" on \
|
2008-07-25 08:09:42 +02:00
|
|
|
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
|
2006-06-29 11:07:17 +02:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if defined(WITHOUT_CLIENT) && defined(WITHOUT_SERVER)
|
2008-07-25 08:09:42 +02:00
|
|
|
IGNORE= requires at least one of CLIENT or SERVER options
|
2006-08-20 17:11:09 +02:00
|
|
|
.endif
|
|
|
|
|
2006-06-29 11:07:17 +02:00
|
|
|
.if !defined(WITHOUT_CLIENT)
|
2010-02-05 12:46:55 +01:00
|
|
|
LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg
|
2006-06-29 11:07:17 +02:00
|
|
|
USE_GL= yes
|
|
|
|
USE_SDL= yes
|
2008-07-25 11:34:45 +02:00
|
|
|
USE_XORG= xinerama xxf86dga
|
2006-06-29 11:07:17 +02:00
|
|
|
ALL_TARGET+= cgame ui client
|
2008-07-25 08:09:42 +02:00
|
|
|
WSWBIN+= warsow
|
2006-06-29 11:07:17 +02:00
|
|
|
PLIST_SUB+= CLIENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CLIENT="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_SERVER)
|
|
|
|
ALL_TARGET+= ded
|
2008-07-25 08:09:42 +02:00
|
|
|
WSWBIN+= wsw_server
|
2006-06-29 11:07:17 +02:00
|
|
|
PLIST_SUB+= SERVER=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SERVER="@comment "
|
|
|
|
.endif
|
|
|
|
|
2008-07-25 08:09:42 +02:00
|
|
|
.if !(defined(WITHOUT_QF) && defined(WITHOUT_OPENAL))
|
2009-07-06 23:25:59 +02:00
|
|
|
LIB_DEPENDS+= vorbisfile.6:${PORTSDIR}/audio/libvorbis
|
2008-07-25 08:09:42 +02:00
|
|
|
.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)
|
2010-01-25 20:15:18 +01:00
|
|
|
USE_OPENAL= al
|
2008-07-25 08:09:42 +02:00
|
|
|
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}
|
|
|
|
|
2006-06-01 13:19:18 +02:00
|
|
|
post-patch: .SILENT
|
2008-07-25 08:09:42 +02:00
|
|
|
# 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
|
2009-12-05 16:04:34 +01:00
|
|
|
# Adjust architecture names, get rid of ``freebsd_'' prefix
|
|
|
|
${REINPLACE_CMD} -e 's/x86_64/amd64/ ; s/freebsd_//' \
|
|
|
|
${WRKSRC}/gameshared/q_arch.h
|
2010-02-05 12:46:55 +01:00
|
|
|
# Resolve name collision with jpeg-8
|
|
|
|
${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
|
|
|
|
${WRKSRC}/ref_gl/r_image.c
|
2011-02-07 11:59:53 +01:00
|
|
|
# Add missing #include's
|
|
|
|
${REINPLACE_CMD} -e '24s|^|#include <sys/socket.h>|' \
|
|
|
|
${WRKSRC}/qcommon/net.c
|
|
|
|
${REINPLACE_CMD} -e '19s|^|#include <stdint.h>|' \
|
|
|
|
${WRKSRC}/unix/unix_xpm.c
|
2006-06-01 13:19:18 +02:00
|
|
|
|
|
|
|
do-install:
|
2008-07-25 08:09:42 +02:00
|
|
|
.for b in ${WSWBIN}
|
|
|
|
${INSTALL_PROGRAM} ${RELEASEDIR}/${b}.${ARCH} ${PREFIX}/bin/${b}
|
2006-06-29 11:07:17 +02:00
|
|
|
.endfor
|
2008-08-12 21:11:19 +02:00
|
|
|
cd ${RELEASEDIR} && ${COPYTREE_SHARE} "${WSWSUBDIR}" ${DATADIR}
|
2006-06-01 13:19:18 +02:00
|
|
|
|
2006-06-29 11:07:17 +02:00
|
|
|
.include <bsd.port.post.mk>
|