aboutsummaryrefslogtreecommitdiffstats
path: root/games/lgeneral/Makefile
blob: d75e4ae40fab1e96c76f411c96810a8dada752a3 (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
# Created by: Filippo Natali <filippo@widestore.net>
# $FreeBSD$

PORTNAME=   lgeneral
PORTVERSION=    1.2.3
PORTREVISION=   2
CATEGORIES= games
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME} \
        SF/${PORTNAME}/${PORTNAME}-data:data
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}:DEFAULT \
        pg-data${EXTRACT_SUFX}:data

MAINTAINER= ports@FreeBSD.org
COMMENT=    Turn-based strategy engine inspired by Panzer General

LICENSE=    GPLv2 # or later
LICENSE_FILE=   ${WRKSRC}/COPYING

USE_SDL=    sdl
USES=       gmake
GNU_CONFIGURE=  yes
USE_CSTD=   gnu89

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

OPTIONS_DEFINE= SOUND NLS DOCS
OPTIONS_DEFAULT=    SOUND
SOUND_DESC= Enable sound support

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MSOUND}
USE_SDL+=   mixer
.else
CONFIGURE_ARGS+=--disable-sound
.endif

.if ${PORT_OPTIONS:MNLS}
USES+=      gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ENV+= am_cv_func_iconv=no
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif

.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
BROKEN=     Does not install on ia64, powerpc, or sparc64
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|/icons|/pixmaps|' ${WRKSRC}/Makefile.in

post-install:
    ${STAGEDIR}${PREFIX}/bin/lgc-pg -s ${WRKDIR}/pg-data -d ${STAGEDIR}${DATADIR}
    @${FIND} ${STAGEDIR}${DATADIR} -type d | ${XARGS} ${CHMOD} a+rx
    @${FIND} ${STAGEDIR}${DATADIR} -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README.* ${STAGEDIR}${DOCSDIR}
.endif

.include <bsd.port.mk>