aboutsummaryrefslogtreecommitdiffstats
path: root/games/atr3d/Makefile
blob: 11faaedae2ebcd3937cb122a4e5b02dd990be73d (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
# Created by: Kirill Ponomarew <ponomarew@oberon.net>
# $FreeBSD$

PORTNAME=   atr3d
PORTVERSION=    0.6
PORTREVISION=   14
CATEGORIES= games
MASTER_SITES=   http://rodrigo.osorio.free.fr/freebsd/distfiles/
DISTNAME=   ${PORTNAME}_source_${PORTVERSION}
EXTRACT_SUFX=   .tgz

MAINTAINER= gahr@FreeBSD.org
COMMENT=    3D asteroids-like multiplayer game

OPTIONS_DEFINE= OPENAL
OPTIONS_DEFAULT=OPENAL

SDL_CONFIG?=    ${LOCALBASE}/bin/sdl-config

WRKSRC=     ${WRKDIR}/${PORTNAME}

USE_GMAKE=  yes
USE_GL=     glut glu
USE_XORG=   xmu xi x11
USE_PERL5_BUILD=yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  SDL_CONFIG="${SDL_CONFIG}"
USE_AUTOTOOLS=  automake autoconf

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

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MOPENAL}
USE_OPENAL=     alut
CONFIGURE_ARGS+=    --enable-sound
.else
CONFIGURE_ARGS+=    --disable-sound
.endif

pre-patch:
    @${REINPLACE_CMD} -i '' -e 's|^aclocal|${ACLOCAL}|' \
            -e 's|^autoconf|${AUTOCONF}|' \
            -e  's|^automake|${AUTOMAKE}|' \
        ${WRKSRC}/autogen.sh
    @${REINPLACE_CMD} -e 's|-lopenal|& -lalut|' ${WRKSRC}/Makefile.am

post-patch:
    @${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/Makefile.am

pre-configure:
    cd ${WRKSRC}; ${SH} autogen.sh

post-configure:
    @${REINPLACE_CMD} -e \
        's|-lpthread|${PTHREAD_LIBS}|g' \
        ${WRKSRC}/Makefile

.include <bsd.port.mk>