aboutsummaryrefslogtreecommitdiffstats
path: root/games/rlvm/Makefile
blob: e726fd18b5e44dcf6c9b59f4f13b908ec7d9c5a9 (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
98
99
100
101
102
103
# $FreeBSD$

PORTNAME=   rlvm
DISTVERSIONPREFIX=  release-
DISTVERSION=    0.14-67
DISTVERSIONSUFFIX=  -g9350209
PORTREVISION=   21
CATEGORIES= games

PATCH_SITES=    https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES= fb627bad9129.patch:-p1

MAINTAINER= jbeich@FreeBSD.org
COMMENT=    RealLive virtual machine clone

LICENSE=    GPLv2 GPLv3 MIT
LICENSE_COMB=   multi

BROKEN_powerpc64=   fails to link: gcn_platform.cc: undefined reference to gcn::Exception::Exception

BUILD_DEPENDS=  ${LOCALBASE}/include/utf8.h:devel/utf8cpp
LIB_DEPENDS=    libvorbisfile.so:audio/libvorbis \
        libboost_serialization.so:devel/boost-libs \
        libguichan.so:devel/guichan
RUN_DEPENDS=    ${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf:x11-fonts/dejavu

USE_GITHUB= yes
GH_ACCOUNT= eglaysher

USES=       compiler:c++11-lib pkgconfig scons
USE_GL=     glew glu
USE_GNOME=  gtk20
USE_SDL=    image mixer ttf
EXCLUDE=    GLEW SDL_image SDL_mixer SDL_ttf gmock gtest guichan \
        luabind utf8cpp # leaving only pygame, xclannad, *.cpp
EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude vendor/,}
LDFLAGS+=   -Wl,--as-needed # avoid overlinking (gtk deps)
MAKE_ARGS=  VERBOSE=1
INSTALLS_ICONS= yes
PORTDOCS=   AUTHORS.TXT NEWS.TXT README.md STATUS.TXT notes

OPTIONS_DEFINE= DEBUG DOCS NLS TEST
OPTIONS_DEFAULT=MONA
OPTIONS_MULTI=  JAPANESE_FONT
OPTIONS_MULTI_JAPANESE_FONT=KOCHI MONA SAZANAMI
OPTIONS_SUB=    yes

JAPANESE_FONT_DESC=msgothic.ttc alternatives with verified metrics (unless --font)
KOCHI_DESC= kochi-gothic-subst.ttf from japanese/font-kochi
KOCHI_RUN_DEPENDS=${LOCALBASE}/share/fonts/TTF/kochi-gothic-subst.ttf:japanese/font-kochi
MONA_DESC=  mona.ttf from japanese/font-mona-ttf
MONA_RUN_DEPENDS=${LOCALBASE}/share/fonts/TTF/mona.ttf:japanese/font-mona-ttf
SAZANAMI_DESC=  sazanami-gothic.ttf from japanese/font-sazanami
SAZANAMI_RUN_DEPENDS=${LOCALBASE}/share/fonts/TTF/sazanami-gothic.ttf:japanese/font-sazanami

DEBUG_MAKE_ARGS_OFF=--release
NLS_USES=   gettext
NLS_EXTRA_PATCHES_OFF=${FILESDIR}/extra-patch-disable-nls
TEST_USES=  lua:51
TEST_BUILD_DEPENDS=googletest>=1.7.0:devel/googletest \
        googlemock>=1.7.0:devel/googlemock \
        luabind>0:devel/luabind
TEST_EXTRA_PATCHES_OFF=${FILESDIR}/extra-patch-disable-test

post-patch:
    @${GREP} -Flr 'utf8cpp/' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
        -i .bak.utf8cpp -e 's,utf8cpp/,,'
    @${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,' \
        ${WRKSRC}/src/platforms/gtk/gtk_rlvm_instance.cc
    @${REINPLACE_CMD} -e 's,/usr/share,${LOCALBASE}/share,' \
        -e 's,truetype/ttf-dejavu,dejavu,' \
        -e 's,truetype/[^/"]*/,TTF/,' \
        ${WRKSRC}/src/utilities/find_font_file.cc

do-test-TEST-on:
    (cd ${WRKSRC} && build/${PORTNAME}_unittests)

pre-install-TEST-on: do-test-TEST-on

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/build/${PORTNAME} \
        ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/debian/${PORTNAME}.6 \
        ${STAGEDIR}${MAN6PREFIX}/man/man6
    ${INSTALL_DATA} ${WRKSRC}/src/platforms/gtk/${PORTNAME}.desktop \
        ${STAGEDIR}${DESKTOPDIR}
    @(cd ${WRKSRC}/resources && for f in */${PORTNAME}.png; do \
        ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${f%/*}x$${f%/*}/apps; \
        ${INSTALL_DATA} -v $$f \
            ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${f%/*}x$${f%/*}/apps; \
    done)

post-install-NLS-on:
    (cd ${WRKSRC}/build/locale && ${COPYTREE_SHARE} \
        . ${STAGEDIR}${PREFIX}/share/locale)

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

.include <bsd.port.mk>