2013-01-31 13:38:42 +00:00
|
|
|
# Created by: Dmitry Marakasov <amdmi3@amdmi3.ru>
|
2008-02-10 19:19:24 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= spring
|
2013-12-16 11:22:24 +00:00
|
|
|
PORTVERSION= 94.1
|
2014-05-09 21:29:46 +00:00
|
|
|
PORTREVISION= 4
|
2008-10-11 13:01:21 +00:00
|
|
|
CATEGORIES= games
|
2013-12-16 11:22:24 +00:00
|
|
|
MASTER_SITES= SF/springrts/springrts/${PORTNAME}-${PORTVERSION} \
|
|
|
|
http://springrts.com/dl/
|
2008-02-10 19:19:24 +00:00
|
|
|
DISTNAME= ${PORTNAME}_${PORTVERSION}_src
|
|
|
|
|
2008-06-19 17:28:24 +00:00
|
|
|
MAINTAINER= amdmi3@FreeBSD.org
|
2014-06-13 07:36:27 +00:00
|
|
|
COMMENT= Project aiming to create a new and versatile RTS Engine
|
2008-02-10 19:19:24 +00:00
|
|
|
|
2013-12-16 11:22:24 +00:00
|
|
|
LICENSE= GPLv2
|
2013-01-31 13:38:42 +00:00
|
|
|
|
2013-12-12 11:14:49 +00:00
|
|
|
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \
|
|
|
|
libboost_thread.so:${PORTSDIR}/devel/boost-libs \
|
|
|
|
libIL.so:${PORTSDIR}/graphics/devil \
|
|
|
|
libogg.so:${PORTSDIR}/audio/libogg \
|
|
|
|
libvorbis.so:${PORTSDIR}/audio/libvorbis \
|
|
|
|
libexecinfo.so:${PORTSDIR}/devel/libexecinfo
|
2009-10-20 03:10:32 +00:00
|
|
|
BUILD_DEPENDS= 7z:${PORTSDIR}/archivers/p7zip
|
2008-02-10 19:19:24 +00:00
|
|
|
|
2013-12-21 12:55:29 +00:00
|
|
|
# XXX: it should be possible to build it on i386, investigate
|
|
|
|
# (currently link fails on undefined reference to __sync_fetch_and_add_8)
|
|
|
|
ONLY_FOR_ARCHS= amd64
|
|
|
|
ONLY_FOR_ARCHS_REASON= relies on x86 floating-point math and amd64 atomic ops
|
2009-04-07 22:21:46 +00:00
|
|
|
|
2008-02-10 19:19:24 +00:00
|
|
|
USE_SDL= sdl
|
2013-12-16 11:22:24 +00:00
|
|
|
USE_GL= gl glu glew
|
2008-10-11 13:01:21 +00:00
|
|
|
USE_XORG= x11 xcursor
|
|
|
|
USE_LDCONFIG= yes
|
2013-12-25 23:29:34 +00:00
|
|
|
DOS2UNIX_GLOB= *.h *.hpp *.cpp
|
2008-02-10 19:19:24 +00:00
|
|
|
|
2013-12-25 23:29:34 +00:00
|
|
|
USES= cmake compiler:c++11-lib dos2unix openal:al
|
2008-10-11 13:01:21 +00:00
|
|
|
CMAKE_ARGS= -DDATADIR:STRING="share/${PORTNAME}" \
|
2010-09-23 00:26:55 +00:00
|
|
|
-DAI_TYPES:STRING="NATIVE" \
|
2013-12-16 11:22:24 +00:00
|
|
|
-DDOCDIR:STRING="share/doc/${PORTNAME}" \
|
|
|
|
-DCREATE_MAN_PAGES:BOOL=false \
|
|
|
|
-DUNITSYNC_PYTHON_WRAPPER:BOOL=false \
|
|
|
|
-DCUSTOM_CFLAGS:BOOL=true
|
2008-02-10 19:19:24 +00:00
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION}
|
|
|
|
|
2008-10-11 13:01:21 +00:00
|
|
|
PORTDOCS= *
|
2013-12-16 11:22:24 +00:00
|
|
|
PORTDATA= *
|
|
|
|
|
|
|
|
OPTIONS_DEFINE= MANPAGES PR_DOWNLOADER DOCS
|
|
|
|
OPTIONS_DEFAULT=MANPAGES PR_DOWNLOADER
|
|
|
|
OPTIONS_SUB= *
|
|
|
|
|
|
|
|
HTMLDOCS_DESC= Build and install HTML documentation
|
|
|
|
PR_DOWNLOADER_DESC= Map and game downloader
|
2008-02-10 19:19:24 +00:00
|
|
|
|
2013-12-16 11:22:24 +00:00
|
|
|
MANPAGES_CMAKE_ON= -DCREATE_MAN_PAGES:BOOL=true -DMANDIR:STRING="man"
|
|
|
|
MANPAGES_CMAKE_OFF= -DCREATE_MAN_PAGES:BOOL=false
|
|
|
|
MANPAGES_BUILD_DEPENDS= 7z:${PORTSDIR}/archivers/p7zip \
|
|
|
|
asciidoc:${PORTSDIR}/textproc/asciidoc \
|
|
|
|
xsltproc:${PORTSDIR}/textproc/libxslt \
|
|
|
|
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl \
|
|
|
|
bash:${PORTSDIR}/shells/bash
|
|
|
|
MANPAGES_DOCS_ON= -DUSERDOCS_PLAIN:BOOL=true
|
|
|
|
MANPAGES_DOCS_OFF= -DUSERDOCS_PLAIN:BOOL=false
|
|
|
|
|
|
|
|
PR_DOWNLOADER_LIB_DEPENDS=libcurl.so:${PORTSDIR}/ftp/curl
|
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2009-12-31 11:16:17 +00:00
|
|
|
.if defined(WITH_SYNC_DEBUG)
|
2010-09-23 00:26:55 +00:00
|
|
|
CFLAGS= # empty
|
|
|
|
CXXFLAGS= # empty
|
2013-12-03 11:33:38 +00:00
|
|
|
CMAKE_ARGS+= -DTRACE_SYNC=true -DSYNCDEBUG=true
|
2013-12-16 11:22:24 +00:00
|
|
|
CMAKE_BUILD_TYPE=DEBUG2
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ! ${PORT_OPTIONS:MPR_DOWNLOADER}
|
|
|
|
post-extract:
|
|
|
|
@${RM} ${WRKSRC}/tools/pr-downloader/CMakeLists.txt
|
2009-12-31 11:16:17 +00:00
|
|
|
.endif
|
|
|
|
|
2008-02-10 19:19:24 +00:00
|
|
|
post-patch:
|
2013-12-16 11:22:24 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/CMakeLists.txt
|
|
|
|
@${REINPLACE_CMD} -e 's|/etc/\(spring/datadir\)|${PREFIX}/\1|g' \
|
2009-05-31 21:42:47 +00:00
|
|
|
${WRKSRC}/rts/System/FileSystem/DataDirLocater.cpp
|
2008-10-11 13:01:21 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|x1F3F|x0F3F|g' \
|
2013-12-16 11:22:24 +00:00
|
|
|
${WRKSRC}/rts/System/Sync/FPUCheck.cpp
|
2009-09-01 23:58:54 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
|
|
|
|
${WRKSRC}/rts/build/cmake/*.cmake
|
2010-09-23 00:26:55 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|execinfo|${LOCALBASE}/lib/libexecinfo.so|' \
|
2013-12-16 11:22:24 +00:00
|
|
|
${WRKSRC}/rts/CMakeLists.txt \
|
|
|
|
${WRKSRC}/rts/builds/dedicated/CMakeLists.txt
|
2010-09-23 00:26:55 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
|
|
|
|
${WRKSRC}/rts/System/Platform/Misc.cpp
|
2013-12-16 11:22:24 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}&|' \
|
|
|
|
${WRKSRC}/doc/manpages/make_manpages.sh
|
|
|
|
.if ! ${PORT_OPTIONS:MMANPAGES}
|
|
|
|
@${REINPLACE_CMD} -e '/set(CREATE_MAN_PAGES)/ d' \
|
|
|
|
${WRKSRC}/doc/CMakeLists.txt
|
2008-02-10 19:19:24 +00:00
|
|
|
.endif
|
|
|
|
|
2013-12-16 11:22:24 +00:00
|
|
|
pre-build:
|
|
|
|
cd ${WRKSRC} && ${MAKE} generateVersionFiles
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|