1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/games/teeworlds/Makefile
Marcus von Appen 5a4d34c9a4 - Fix the usage of 'python' to get rid of the implicit lang/python
dependency
- Restrict the build to the supported Python versions

Reported by:	exp-run (PR 184591)
Approved by:	portmgr (blanket)
2013-12-15 13:35:52 +00:00

83 lines
2.2 KiB
Makefile

# Created by: Dmitry Marakasov <amdmi3@amdmi3.ru>
# $FreeBSD$
PORTNAME= teeworlds
PORTVERSION= 0.6.2
CATEGORIES= games
MASTER_SITES= https://www.teeworlds.com/files/ \
http://mirror.amdmi3.ru/distfiles/
DISTNAME= ${PORTNAME}-${PORTVERSION}-source
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} bam-${BAM_VERSION}${EXTRACT_SUFX}
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Platform game featuring buggers equipped with weapons
LICENSE= ZLIB
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2
USE_PYTHON_BUILD= 2
BAM_VERSION= 0.4.0
BAM_WRKSRC= ${WRKDIR}/bam-${BAM_VERSION}
BAM_TARGET= release
USE_GCC= any
PLIST_FILES+= bin/${PORTNAME}_srv
PORTDATA= *
OPTIONS_DEFINE= SERVER_ONLY
SERVER_ONLY_DESC=Build dedicated server only
.include <bsd.port.options.mk>
.if ${ARCH} == "ia64"
BROKEN= Does not install on ia64: gets bus error
.endif
.if ${PORT_OPTIONS:MSERVER_ONLY}
BAM_TARGET= server_release
PKGNAMESUFFX= -server
.else
USE_XORG= x11
USE_GL= gl glu
USE_SDL= sdl
PLIST_FILES+= bin/${PORTNAME}
DESKTOP_ENTRIES="Teeworlds" \
"Platform game featuring buggers equipped with weapons" \
"${DATADIR}/Teeworlds.ico" \
"${PORTNAME}" \
"Game;ActionGame;" \
""
.endif
post-patch:
@${REINPLACE_CMD} -e 's|"python "|"${PYTHON_CMD} "|' \
${WRKSRC}/bam.lua
@${REINPLACE_CMD} -e 's|-O.||; s|-lpthread|${PTHREAD_LIBS}|; s|^gcc|${CC} ${CFLAGS}|; s|-ldl||g' \
${BAM_WRKSRC}/make_unix.sh
@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|' ${WRKSRC}/other/sdl/sdl.lua
@${REINPLACE_CMD} -e '/aDirs\[\]/,/}/ s|"/.*"|"${DATADIR}"|' \
${WRKSRC}/src/engine/shared/storage.cpp
@${REINPLACE_CMD} -e 's|gcc|${CC}|; s|g++|${CXX}|' \
${BAM_WRKSRC}/src/driver_gcc.lua ${WRKSRC}/configure.lua
# build bam executable - teeworlds own build system
pre-build:
cd ${BAM_WRKSRC} && ${SH} -v make_unix.sh
# build teeworlds
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${BAM_WRKSRC}/bam -n -a -v ${_MAKE_JOBS:C/-j/-j /} ${BAM_TARGET}
do-install:
.if ! ${PORT_OPTIONS:MSERVER_ONLY}
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
.endif
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}_srv ${STAGEDIR}${PREFIX}/bin/
@cd ${WRKSRC}/data && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/other/icons/Teeworlds.ico ${STAGEDIR}${DATADIR}/
.include <bsd.port.mk>