blob: 781eef770ba1d4e2cba5d7d52520e11b0fbcb482 (
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
|
# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
# $FreeBSD$
PORTNAME= asc
PORTVERSION= 2.6.0.0
PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}-hq/ASC%20Source/${PORTVERSION:R} \
http://www.asc-hq.org/music/:music
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${ASC_MUSICS:S/$/:music/}
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Turn based, multiplayer strategic game with nice graphics
LICENSE= GPLv2
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \
${LOCALBASE}/lib/libloki.so:${PORTSDIR}/devel/loki
LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis \
libboost_regex.so:${PORTSDIR}/devel/boost-libs \
libsigc-1.2.so:${PORTSDIR}/devel/libsigc++12 \
libexpat.so:${PORTSDIR}/textproc/expat2
RUN_DEPENDS:= ${BUILD_DEPENDS}
OPTIONS_DEFINE= MUSIC XVID
MUSIC_DESC= Install extra music files
USE_BZIP2= yes
USES= gmake perl5 pkgconfig
USE_SDL= image mixer sound sdl
USE_WX= 2.4+
WX_CONF_ARGS= absolute
USE_LUA= 5.1
LUA_COMPS= lua
USE_PERL5= build
GNU_CONFIGURE= yes
CFLAGS+= -D_UNICODE_BROKEN_
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_FILES= bin/asc \
bin/asc_demount \
bin/asc_mapedit \
bin/asc_mount \
bin/asc_weaponguide \
man/man6/asc.6.gz \
man/man6/asc_demount.6.gz \
man/man6/asc_mapedit.6.gz \
man/man6/asc_mount.6.gz \
man/man6/asc_weaponguide.6.gz \
share/appdata/asc.appdata.xml \
%%DATADIR%%/asc2_dlg.zip \
%%DATADIR%%/main.ascdat
PLIST_DIRS= ${ASC_MUSICDIR} \
%%DATADIR%%
PLIST_DIRSTRY= share/appdata
DESKTOP_ENTRIES="Advanced Strategic Command" "Turn based strategic game" "" \
"${PORTNAME}" "" ""
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMUSIC}
ASC_MUSICS= frontiers.ogg time_to_strike.ogg machine_wars.ogg
ASC_MUSICDIR= %%DATADIR%%/music
.for i in ${ASC_MUSICS}
PLIST_FILES+= ${ASC_MUSICDIR}/${i}
.endfor
.else
.undef ASC_MUSICS
.undef ASC_MUSICDIR
.endif
.if ${PORT_OPTIONS:MXVID}
LIB_DEPENDS+= libxvidcore.so:${PORTSDIR}/multimedia/xvid
.else
CONFIGURE_ENV+= ac_cv_lib_xvidcore_xvid_encore=no
.endif
post-extract:
.if ${PORT_OPTIONS:MMUSIC}
.for i in ${ASC_MUSICS}
@(cd ${DISTDIR}/${DIST_SUBDIR} && ${PAX} -rw ${i} ${WRKSRC}/data/music)
.endfor
.endif
post-patch:
@${FIND} ${WRKSRC} -name "Makefile.in" -print0 | ${XARGS} -0 \
${REINPLACE_CMD} -e \
's|/games/|/|g'
@${REINPLACE_CMD} -e \
's|/games/|/|g ; \
s|lua >=|lua-5.1 >=|g ; \
/if test/s|==|=|g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e \
's|? 0 :|? (void)0 :|' ${WRKSRC}/source/errors.h
.include <bsd.port.mk>
|