blob: 8aee1fe69f2fd72b3967dc0ab64177910e4059dd (
plain)
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
|
PORTNAME= traingame
PORTVERSION= 0.3
PORTREVISION= 28
CATEGORIES= games
MAINTAINER= ports@FreeBSD.org
COMMENT= Game about Trains
WWW= https://www.doof.me.uk/train-game/
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING.txt
LIB_DEPENDS= libfreetype.so:print/freetype2 \
libxerces-c.so:textproc/xerces-c3 \
libboost_filesystem.so:devel/boost-libs
USE_GITHUB= yes
GH_ACCOUNT= nickg
GH_TAGNAME= cb6513e
USES= cmake:insource compiler:c++11-lib dos2unix gl gnome pkgconfig \
sdl
DOS2UNIX_GLOB= *.mtl *.obj
USE_CXXSTD= c++11
USE_SDL= sdl image
USE_GL= glew
LDFLAGS+= -L${LOCALBASE}/lib
CFLAGS+= -Wno-return-type
PORTDOCS= model_notes.txt models.gnuplot
OPTIONS_DEFINE= DOCS
ICON_SIZES= 22x22 32x32 48x48 64x64 72x72 96x96 128x128 192x192
SUB_FILES= ${PORTNAME} pkg-message
post-patch:
@${REINPLACE_CMD} -e 's|[io]fstream|std::&|g' \
${WRKSRC}/src/*.cpp ${WRKSRC}/include/*.hpp
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}-map.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-map
.for d in buildings engines fonts images layouts maps schemas trees waggons
@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
.endfor
${INSTALL_PROGRAM} ${WRKSRC}/bin/TrainGame ${STAGEDIR}${DATADIR}/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR}
.for s in ${ICON_SIZES}
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/
${INSTALL_DATA} ${WRKSRC}/icons/${PORTNAME}_${s}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png
.endfor
${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps/
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
post-install:
@${ECHO_CMD}
@${ECHO_CMD} ===============================================================================
@${ECHO_CMD}
@${ECHO_CMD} "These Maps you can use:"
@${ECHO_CMD}
@${LS} ${STAGEDIR}${DATADIR}/maps
@${ECHO_CMD}
@${ECHO_CMD} ===============================================================================
.include <bsd.port.mk>
|