aboutsummaryrefslogtreecommitdiffstats
path: root/games/boswars/Makefile
blob: ad1fee5736deb4f79bcc94b99e9ac978ec1cc97f (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
# New ports collection makefile for:    bos
# Date created:             14 Oct 2005
# Whom:                 Alejandro Pulver <alejandro@varnet.biz>
#
# $FreeBSD$
#

PORTNAME=   boswars
PORTVERSION=    2.5
PORTREVISION=   3
CATEGORIES= games
MASTER_SITES=   http://boswars.org:8001/bos/releases/
DISTNAME=   ${PORTNAME}-${PORTVERSION}-src

MAINTAINER= alepulver@FreeBSD.org
COMMENT=    A real-time strategy game

LIB_DEPENDS=    png.6:${PORTSDIR}/graphics/png \
        theora.0:${PORTSDIR}/multimedia/libtheora \
        vorbis.4:${PORTSDIR}/audio/libvorbis

USE_LUA=    5.0
USE_SDL=    sdl
USE_SCONS=  yes
CPPPATH=    ${LOCALBASE}/include ${LUA_INCDIR}
LIBPATH=    ${LOCALBASE}/lib ${LUA_LIBDIR}
CFLAGS+=    -DSTRATAGUS_LIB_PATH='"\"${DATADIR}\""'

OPTIONS=    GL "Enable OpenGL support" on \
        OPTIMIZED_CFLAGS "Enable compilation optimizations" on

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_GL)
USE_GL=     yes
SCONS_ARGS+=    opengl=1
CPPPATH+=   ${LOCALBASE}/include
LIBPATH+=   ${LOCALBASE}/lib
.endif

.if !defined(WITHOUT_OPTIMIZED_CFLAGS)
CFLAGS+=    -fomit-frame-pointer -fexpensive-optimizations -ffast-math
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' \
        ${WRKSRC}/SConstruct

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
    ${MKDIR} ${DATADIR}
.for f in campaigns graphics intro languages maps scripts sounds units
    ${CP} -R ${WRKSRC}/${f} ${DATADIR}
.endfor
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${WRKSRC}/README.txt ${DOCSDIR}
    ${CP} -R ${WRKSRC}/doc ${DOCSDIR}
.endif

.include <bsd.port.post.mk>