Lines 6-63
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= asc |
8 |
PORTNAME= asc |
9 |
PORTVERSION= 1.16.4.0 |
9 |
PORTVERSION= 2.4.0.0 |
10 |
PORTREVISION= 6 |
|
|
11 |
CATEGORIES= games |
10 |
CATEGORIES= games |
12 |
MASTER_SITES= SF/${PORTNAME}-hq/ASC%20Source/1.16.4 |
11 |
MASTER_SITES= SF/${PORTNAME}-hq/ASC%20Source/${PORTVERSION:R} \ |
13 |
DISTNAME= ${PORTNAME}-source-${PORTVERSION} |
12 |
http://www.asc-hq.org/music/ |
|
|
13 |
DIST_SUBDIR= ${PORTNAME} |
14 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${ASC_MUSICS} |
15 |
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} |
14 |
|
16 |
|
15 |
MAINTAINER= ports@FreeBSD.org |
17 |
MAINTAINER= ports@FreeBSD.org |
16 |
COMMENT= A turn based, multiplayer strategic game with very nice graphics |
18 |
COMMENT= A turn based, multiplayer strategic game with very nice graphics |
17 |
|
19 |
|
18 |
LIB_DEPENDS= paragui.4:${PORTSDIR}/x11-toolkits/paragui \ |
20 |
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \ |
19 |
sigc-1.2.5:${PORTSDIR}/devel/libsigc++12 |
21 |
${LOCALBASE}/lib/libloki.so:${PORTSDIR}/devel/loki |
|
|
22 |
LIB_DEPENDS= vorbis.4:${PORTSDIR}/audio/libvorbis \ |
23 |
boost_regex.4:${PORTSDIR}/devel/boost-libs \ |
24 |
sigc-1.2.5:${PORTSDIR}/devel/libsigc++12 \ |
25 |
expat.6:${PORTSDIR}/textproc/expat2 |
26 |
RUN_DEPENDS:= ${BUILD_DEPENDS} |
20 |
|
27 |
|
21 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
28 |
OPTIONS= MUSIC "Install extra music files" off \ |
|
|
29 |
XVID "Enable Xvid support" off |
22 |
|
30 |
|
23 |
USE_SDL= image mm mixer sdl |
|
|
24 |
USE_BZIP2= yes |
31 |
USE_BZIP2= yes |
25 |
USE_GMAKE= yes |
32 |
USE_SDL= image mixer sound sdl |
|
|
33 |
USE_WX= 2.4+ |
34 |
WX_CONF_ARGS= absolute |
35 |
USE_LUA= 5.1 |
36 |
LUA_COMPS= lua |
26 |
USE_PERL5_BUILD=yes |
37 |
USE_PERL5_BUILD=yes |
|
|
38 |
USE_GMAKE= yes |
27 |
GNU_CONFIGURE= yes |
39 |
GNU_CONFIGURE= yes |
28 |
CONFIGURE_ENV= CPPFLAGS="`${SDL_CONFIG} --cflags`" \ |
40 |
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" |
29 |
CXXFLAGS="-D_UNICODE_BROKEN_" \ |
|
|
30 |
LIBS="`${SDL_CONFIG} --libs` -lm" |
31 |
|
32 |
CONFIGURE_ARGS= --disable-paraguitest \ |
33 |
--prefix=${PREFIX} |
34 |
|
35 |
OPTIONS= MUSIC "Install extra music files" off |
36 |
|
41 |
|
37 |
MAN6= asc.6 asc_demount.6 asc_mount.6 asc_mapedit.6 asc_makegfx.6 asc_weaponguide.6 |
42 |
MAN6= asc.6 asc_demount.6 asc_mapedit.6 asc_mount.6 \ |
|
|
43 |
asc_weaponguide.6 |
44 |
PLIST_FILES= bin/asc bin/asc_demount bin/asc_mapedit bin/asc_mount \ |
45 |
bin/asc_weaponguide \ |
46 |
%%DATADIR%%/asc2_dlg.zip %%DATADIR%%/main.ascdat |
47 |
PLIST_DIRS= ${ASC_MUSICDIR} %%DATADIR%% |
48 |
|
49 |
CFLAGS+= -D_UNICODE_BROKEN_ |
50 |
CPPFLAGS= -I${LOCALBASE}/include |
51 |
LDFLAGS= -L${LOCALBASE}/lib |
38 |
|
52 |
|
39 |
.include <bsd.port.pre.mk> |
53 |
.include <bsd.port.pre.mk> |
40 |
|
54 |
|
41 |
.if defined(WITH_MUSIC) |
55 |
.if defined(WITH_MUSIC) |
42 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} frontiers.mp3 time_to_strike.mp3 machine_wars.mp3 |
56 |
ASC_MUSICS= frontiers.ogg time_to_strike.ogg machine_wars.ogg |
43 |
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} |
57 |
ASC_MUSICDIR= %%DATADIR%%/music |
44 |
PLIST_SUB+= MUSIC:="" |
58 |
.for file in ${ASC_MUSICS} |
|
|
59 |
PLIST_FILES+= ${ASC_MUSICDIR}/${file} |
60 |
.endfor |
61 |
.else |
62 |
.undef ASC_MUSICS |
63 |
.undef ASC_MUSICDIR |
64 |
.endif |
65 |
|
66 |
.if defined(WITH_XVID) |
67 |
LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid |
45 |
.else |
68 |
.else |
46 |
PLIST_SUB+= MUSIC:="@comment " |
69 |
CONFIGURE_ENV+= ac_cv_lib_xvidcore_xvid_encore=no |
47 |
.endif |
70 |
.endif |
48 |
|
71 |
|
49 |
pre-configure: |
72 |
post-extract: |
50 |
.if defined(WITH_MUSIC) |
73 |
.if defined(WITH_MUSIC) |
51 |
${CP} ${DISTDIR}/frontiers.mp3 ${WRKSRC}/data/music |
74 |
.for file in ${ASC_MUSICS} |
52 |
${CP} ${DISTDIR}/time_to_strike.mp3 ${WRKSRC}/data/music |
75 |
@${TAR} -C ${DISTDIR}/${DIST_SUBDIR} -cf - ${file} | \ |
53 |
${CP} ${DISTDIR}/machine_wars.mp3 ${WRKSRC}/data/music |
76 |
${TAR} -C ${WRKSRC}/data/music --unlink -xf - |
|
|
77 |
.endfor |
54 |
.endif |
78 |
.endif |
55 |
|
79 |
|
56 |
pre-build: |
80 |
post-patch: |
57 |
@${FIND} ${WRKSRC}/source -name \*.cpp | ${XARGS} ${REINPLACE_CMD} \ |
81 |
@${FIND} ${WRKSRC} -name "*.cpp" -print0 | ${XARGS} -0 \ |
58 |
-e 's|<malloc.h>|<stdlib.h>|' |
82 |
${REINPLACE_CMD} -e \ |
59 |
@${FIND} ${WRKSRC}/source -name \*.h | ${XARGS} ${REINPLACE_CMD} \ |
83 |
's|<malloc\.h>|<stdlib.h>|g' |
60 |
-e 's|<malloc.h>|<stdlib.h>|' |
84 |
@${FIND} ${WRKSRC} -name "Makefile.in" -print0 | ${XARGS} -0 \ |
|
|
85 |
${REINPLACE_CMD} -e \ |
86 |
's|/games/|/|g ; \ |
87 |
s|$$(srcdir)/asc_makegfx.6||g' |
88 |
@${REINPLACE_CMD} -e \ |
89 |
's|/games/|/|g ; \ |
90 |
s|lua >=|lua-5.1 >=|g ; \ |
91 |
/if test/s|==|=|g' ${WRKSRC}/configure |
61 |
|
92 |
|
62 |
post-install: |
93 |
post-install: |
63 |
@${CAT} ${PKGMESSAGE} |
94 |
@${CAT} ${PKGMESSAGE} |