aboutsummaryrefslogtreecommitdiffstats
path: root/games/openra/Makefile
blob: 0f6cb147119fca1ba7a4c9543a66fadc749becfd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# $FreeBSD$

PORTNAME=   openra
PORTVERSION=    20170527
DISTVERSIONPREFIX=  release-
PORTREVISION=   2
CATEGORIES= games
MASTER_SITES=   https://github.com/${GH_ACCOUNT}/SDL2-CS/releases/download/20161223/:SDL2_CS \
        https://github.com/${GH_ACCOUNT}/OpenAL-CS/releases/download/20151227/:OpenAL_CS \
        https://github.com/${GH_ACCOUNT}/Eluant/releases/download/20160124/:Eluant \
        https://geolite.maxmind.com/download/geoip/database/:GeoLite2
DISTFILES=  SDL2-CS.dll:SDL2_CS \
        SDL2-CS.dll.config:SDL2_CS \
        OpenAL-CS.dll:OpenAL_CS \
        OpenAL-CS.dll.config:OpenAL_CS \
        Eluant.dll:Eluant \
        GeoLite2-Country.mmdb.gz:GeoLite2
EXTRACT_ONLY=   ${DISTFILES:C/:.*//:N*.config:N*.dll:N*.mmdb*:N*.nupkg}

MAINTAINER= jbeich@FreeBSD.org
COMMENT=    Multiplayer re-envisioning of early RTS games by Westwood Studios

LICENSE=    GPLv3

LIB_DEPENDS=    libfreetype.so:print/freetype2 \
        libgdiplus.so:x11-toolkits/libgdiplus
NUGET_DEPENDS=  FuzzyLogicLibrary=1.2.0 \
        MaxMind.Db=2.0.0 \
        NUnit=3.0.1 \
        NUnit.Console=3.0.1 \
        Open.Nat=2.1.0 \
        SharpFont=4.0.1 \
        SharpZipLib=0.86.0 \
        SmartIrc4net=0.4.5.1 \
        StyleCop.MSBuild=4.7.49.0 \
        StyleCopPlus.MSBuild=4.7.49.5

USE_GITHUB= yes
GH_PROJECT= OpenRA

NO_ARCH=    yes
USES=       desktop-file-utils gmake lua:51,run mono:nuget openal:soft \
        shared-mime-info shebangfix
USE_SDL=    sdl2
NUGET_PACKAGEDIR=${WRKSRC}/thirdparty/download
SHEBANG_FILES=  launch-dedicated.sh
MAKE_ENV=   prefix="${PREFIX}" mandir="${PREFIX}/man"
MAKE_ARGS=  VERSION="${GH_TAGNAME}"
ALL_TARGET= all
INSTALL_TARGET= install-all install-man-page \
        install-linux-mime install-linux-shortcuts
DATADIR=    ${PREFIX}/lib/${PORTNAME}
PORTDATA=   *
PORTDOCS=   *.html

OPTIONS_DEFINE= DOCS TEST ZENITY
OPTIONS_DEFAULT=ZENITY

DOCS_BUILD_DEPENDS=markdown:textproc/markdown
DOCS_ALL_TARGET=docs

TEST_MAKE_ENV=  HOME="${WRKDIR}"
TEST_ALL_TARGET=test

ZENITY_RUN_DEPENDS=xdg-open:devel/xdg-utils \
        zenity:x11/zenity
ZENITY_DESC=    Use native crash dialog

post-extract:
    ${CP} ${DISTFILES:C/:.*//:N*.nupkg:N*.tar*:S,^,${_DISTDIR}/,} \
        ${NUGET_PACKAGEDIR}

post-patch:
    ${REINPLACE_CMD} \
        -e '/echo/!s/   @/  /' \
        -e '/^mods:/s/$$/ version/' \
        ${WRKSRC}/Makefile
    ${REINPLACE_CMD} -e '/[[:<:]]get[[:blank:]]/d' \
            ${WRKSRC}/thirdparty/fetch-thirdparty-deps.sh
    ${FIND} ${WRKSRC}/thirdparty -name '*.config*' -exec ${REINPLACE_CMD} \
        -i '.bak.os' -e '/linux/{ p; s//${OPSYS:tl}/; }' {} +
    ${SED} 's/@LIBLUA51@/liblua-${LUA_VER}.so/' \
        ${WRKSRC}/thirdparty/Eluant.dll.config.in \
        >${WRKSRC}/Eluant.dll.config

post-build-DOCS-on:
    @${ECHO_MSG} Generating HTML documentation...
    @for f in ${WRKSRC}/*.md; do \
        ${ECHO_MSG} markdown $$f -\> $${f%.md}.html; \
        markdown $$f >$${f%.md}.html; \
    done

post-install-DOCS-on:
    (cd ${WRKSRC} && ${COPYTREE_SHARE} \
        "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})

.include <bsd.port.mk>