blob: 7e5c08086490953efda984ee650c7e2e2a36f98e (
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
75
76
77
78
79
80
81
82
83
84
85
|
# Created by: thierry@pompo.net
# $FreeBSD$
PORTNAME= glob2
PORTVERSION= 0.9.4.4
PORTREVISION= 8
CATEGORIES= games
MASTER_SITES= SAVANNAH/${PORTNAME}/${PORTVERSION:R}/
MAINTAINER= ports@FreeBSD.org
COMMENT= Globulation 2, free and innovative strategy game
LICENSE= GPLv3
LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis \
libspeex.so:${PORTSDIR}/audio/speex \
libfribidi.so:${PORTSDIR}/converters/fribidi \
libboost_thread.so:${PORTSDIR}/devel/boost-libs \
libfreetype.so:${PORTSDIR}/print/freetype2
OPTIONS_DEFINE= DOCS PORTAUDIO
USES= pkgconfig scons
USE_SDL= image net sdl ttf
USE_GL= gl
MAKE_ARGS= CCFLAGS="${CFLAGS}" \
LINKFLAGS="${LDFLAGS}" \
BINDIR="${STAGEDIR}${PREFIX}/bin" \
INSTALLDIR="${STAGEDIR}${PREFIX}/share" \
DATADIR="${DATADIR}"
INSTALLS_ICONS= yes
CFLAGS+= ${PA2_CFLAGS} -I${LOCALBASE}/include -Wno-return-type
LDFLAGS+= ${PA2_LDFLAGS} -L${LOCALBASE}/lib -pthread
PORTDOCS= README
SUB_FILES= pkg-message
.include <bsd.port.options.mk>
# Should work with portaudio v19_20071207
# Can be built with portaudio2 but does not run cleanly
.if ${PORT_OPTIONS:MPORTAUDIO}
BUILD_DEPENDS+= portaudio2>0:${PORTSDIR}/audio/portaudio2
RUN_DEPENDS+= portaudio2>0:${PORTSDIR}/audio/portaudio2
MAKE_ARGS+= --portaudio=true
PA2_CFLAGS+= -I${LOCALBASE}/include/portaudio2
PA2_LDFLAGS+= -L${LOCALBASE}/lib/portaudio2
.endif
post-patch:
@${REINPLACE_CMD} -e \
's|"-g"|""|' \
${WRKSRC}/SConstruct
@${REINPLACE_CMD} -e \
's|portaudio.h|portaudio2/portaudio.h|' \
${WRKSRC}/src/VoiceRecorder.cpp
@${REINPLACE_CMD} -e \
'/^Icon/s|=.*|=${PORTNAME}|' \
${WRKSRC}/data/${PORTNAME}.desktop
@${REINPLACE_CMD} -e \
'/(PACKAGE_SOURCE_DIR)/s|^|//|' \
${WRKSRC}/libgag/src/FileManager.cpp
manual-regression-test:
# Don't enable these tests on pointyhat, they take too long.
.if defined(MAINTAINER_MODE)
(cd ${WRKSRC}/src && ./glob2 -test-games)
.else
(cd ${WRKSRC}/src && ./glob2 -test-games-nox)
.endif
post-install:
.for s in 16 24 32 48 64 128
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps
(cd ${WRKSRC}/data/icons && ${INSTALL_DATA} glob2-icon-${s}x${s}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/${PORTNAME}.png)
.endfor
${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR})
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/glob2
.include <bsd.port.mk>
|