freebsd-ports/games/worldofpadman/Makefile
Alexey Dokuchaev c930fb9f43 - Trim old-school Makefile header
- Remove defunct MASTER_SITES
- Improve the COMMENT text
- Fix couple of fallouts after OptionsNG conversion in r304274
- Drop shlib ABI versions from LIB_DEPENDS
- Reindent and generally cleanup Makefile
- Fix couple of typos in pkg-message
- Reformat port description for better readability
2013-03-16 17:17:37 +00:00

161 lines
4.1 KiB
Makefile

# Created by: Alejandro Pulver <alepulver@FreeBSD.org>
# $FreeBSD$
PORTNAME= worldofpadman
PORTVERSION= 1.2.20080621
PORTREVISION= 8
CATEGORIES= games
MASTER_SITES= ftp://ftp.snt.utwente.nl/pub/games/worldofpadman/linux/:full,update \
${MASTER_SITE_LOCAL:S|$|alepulver/:source|}
DISTFILES= worldofpadman.run:full \
wop_patch_1_2.run:update \
${SRC_FILE}.tar.bz2:source
EXTRACT_ONLY= worldofpadman.run \
wop_patch_1_2.run
MAINTAINER= ports@FreeBSD.org
COMMENT= Open source FPS game inspired by the Padman comic strip
USE_MAKESELF= yes
USE_GMAKE= yes
MAKE_ENV= DEFAULT_BASEDIR="${DATADIR}" PTHREAD_LIBS="${PTHREAD_LIBS}"
ALL_TARGET= release
NO_PACKAGE= package will be ~600MB; set FORCE_PACKAGE if you really want it
OPTIONS_DEFINE= CURL CURL_DLOPEN GAMELIBS MP3 OPENAL OPENAL_DLOPEN \
OPTIMIZED_CFLAGS VORBIS
OPTIONS_MULTI= TYPE
OPTIONS_MULTI_TYPE= CLIENT DEDICATED SMP_CLIENT
OPTIONS_DEFAULT= CLIENT CURL CURL_DLOPEN DEDICATED OPTIMIZED_CFLAGS \
VORBIS SMP_CLIENT
CLIENT_DESC= Build client
CURL_DLOPEN_DESC= Enable dynamic loading of cURL
DEDICATED_DESC= Build dedicated server
GAMELIBS_DESC= Force building game libraries
OPENAL_DLOPEN_DESC= Enable dynamic loading of OpenAL
SMP_CLIENT_DESC= Build SMP (threaded) client
SRC_FILE= ${PORTNAME}-${PORTVERSION}
VM_ARCHS= amd64 i386 powerpc
.include <bsd.port.options.mk>
.for arch in ${ARCH}
. if ${VM_ARCHS:M${arch}} != ""
HAVE_VM_COMPILED= yes
. endif
.endfor
.if defined(HAVE_VM_COMPILED)
MAKE_ENV+= HAVE_VM_COMPILED=true
.endif
.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSMP_CLIENT}
# cURL
. if ${PORT_OPTIONS:MCURL}
LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
MAKE_ENV+= USE_CURL=1
. if ${PORT_OPTIONS:MCURL_DLOPEN}
MAKE_ENV+= USE_CURL_DLOPEN=1
. endif
. endif
# OpenAL
. if ${PORT_OPTIONS:MOPENAL}
USE_OPENAL= al
MAKE_ENV+= USE_OPENAL=1
. if ${PORT_OPTIONS:MOPENAL_DLOPEN}
MAKE_ENV+= USE_OPENAL_DLOPEN=1
. endif
. endif
# SDL
USE_SDL= sdl
# Vorbis
. if ${PORT_OPTIONS:MVORBIS}
LIB_DEPENDS+= vorbis:${PORTSDIR}/audio/libvorbis
MAKE_ENV+= USE_CODEC_VORBIS=1
. endif
.endif
.if ${PORT_OPTIONS:MCLIENT}
MAKE_ENV+= BUILD_CLIENT=1
PLIST_SUB+= CLIENT=""
WOPBIN+= wop
.else
PLIST_SUB+= CLIENT="@comment "
.endif
.if ${PORT_OPTIONS:MDEDICATED}
MAKE_ENV+= BUILD_SERVER=1
PLIST_SUB+= DEDICATED=""
WOPBIN+= wopded
.else
PLIST_SUB+= DEDICATED="@comment "
.endif
.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED)
MAKE_ENV+= BUILD_GAME_SO=1
PLIST_SUB+= GAMELIBS=""
.else
PLIST_SUB+= GAMELIBS="@comment "
.endif
.if ${PORT_OPTIONS:MMP3}
LIB_DEPENDS+= mad:${PORTSDIR}/audio/libmad
MAKE_ENV+= USE_CODEC_MP3=1
.endif
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
MAKE_ENV+= USE_OPTIMIZED_CFLAGS=1
.endif
.if ${PORT_OPTIONS:MSMP_CLIENT}
MAKE_ENV+= BUILD_CLIENT_SMP=1
PLIST_SUB+= SMP=""
WOPBIN+= wop-smp
.else
PLIST_SUB+= SMP="@comment "
.endif
post-extract:
@${TAR} jxf ${DISTDIR}/${SRC_FILE}.tar.bz2 -C ${WRKDIR}
@${MKDIR} ${WRKDIR}/wop
.for f in wop-data wop-data-1.2 extras
@cd ${WRKDIR} && ${TAR} xf ${f}.tar -C wop
.endfor
@cd ${WRKDIR} && ${TAR} xf readme.tar
post-patch:
# Do not log debug output of bots (can be enabled with "homedir"/"gamedir")
@${REINPLACE_CMD} -e 's|"botlib\.log"|"/dev/null"|' \
${WRKSRC}/code/botlib/be_interface.c
do-install:
@${MKDIR} ${DATADIR}/wop
${CP} -a ${WRKDIR}/wop/* ${DATADIR}/wop
${INSTALL_DATA} ${WRKDIR}/wop.png \
${PREFIX}/share/pixmaps/${PORTNAME}.png
.for bin in ${WOPBIN}
# Rename wop* -> worldofpadman* to avoid conflicts with `games/wop'
${INSTALL_PROGRAM} ${WRKSRC}/build/release/${bin} \
${PREFIX}/bin/${bin:S/wop/${PORTNAME}/}
.endfor
.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED)
${INSTALL_PROGRAM} ${WRKSRC}/build/release/baseq3/*.so ${DATADIR}/wop
.endif
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
${CP} -a ${WRKDIR}/readme/* ${DOCSDIR}
.endif
@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
generate-distfile:
@if [ -f ${DISTDIR}/${SRC_FILE}.tar.bz2 ]; then \
${ECHO_CMD} "ERROR: the distfile already exists."; \
${FALSE}; \
fi
svn export https://wop-engine.svn.sourceforge.net/svnroot/wop-engine/trunk ${SRC_FILE}
tar cjf ${DISTDIR}/${SRC_FILE}.tar.bz2 ${SRC_FILE}
${RM} -rf ${SRC_FILE}
.include <bsd.port.mk>