aboutsummaryrefslogtreecommitdiffstats
path: root/games/atr3d/Makefile
blob: 5be44f05ddebef3c3ec713111c819a18b955f565 (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
# New ports collection makefile for:    atr3d
# Date created:             11 Jun 2003
# Whom:                 Kirill Ponomarew <ponomarew@oberon.net>
#
# $FreeBSD$
#

PORTNAME=   atr3d
PORTVERSION=    0.6
PORTREVISION=   8
CATEGORIES= games
MASTER_SITES=   ftp://ftp.avoidtheroid.com/pub/${PORTNAME}/
DISTNAME=   ${PORTNAME}_source_${PORTVERSION}
EXTRACT_SUFX=   .tgz

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

LIB_DEPENDS=    openal.0:${PORTSDIR}/audio/openal \
        glut.4:${PORTSDIR}/graphics/libglut \
        alut.1:${PORTSDIR}/audio/freealut

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

WRKSRC=     ${WRKDIR}/${PORTNAME}

USE_X_PREFIX=   yes
USE_GMAKE=  yes
USE_GL=     yes
USE_PERL5_BUILD=yes
GNU_CONFIGURE=  yes
CONFIGURE_TARGET=   --build=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --enable-sound
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \
        SDL_CONFIG="${SDL_CONFIG}"
USE_AUTOTOOLS=  automake:19 autoconf:261

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

.include <bsd.port.pre.mk>

.if ${OSVERSION} >= 700042
.if ${ARCH} == amd64 || ${ARCH} == sparc64
BROKEN=     does not compile
.endif
.endif

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

post-patch:
    @${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|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.post.mk>