aboutsummaryrefslogtreecommitdiffstats
path: root/games/duel/Makefile
blob: 5497788e8903572dca70b41b323e16a73965a9ac (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
# New ports collection makefile for:    duel
# Date created:             10 Aug 2005
# Whom:                 Alejandro Pulver <alejandro@varnet.biz>
#
# $FreeBSD$
#

PORTNAME=   duel
PORTVERSION=    0.98
PORTREVISION=   2
CATEGORIES= games
MASTER_SITES=   http://www.personal.rdg.ac.uk/~sir03me/
DISTNAME=   lin${PORTNAME}

MAINTAINER= alepulver@FreeBSD.org
COMMENT=    An overhead, OpenGL space shooter

BUILD_DEPENDS=  ${X11BASE}/lib/libftgl.a:${PORTSDIR}/graphics/ftgl
LIB_DEPENDS=    freetype.9:${PORTSDIR}/print/freetype2

WRKSRC=     ${WRKDIR}/${PORTNAME}

USE_BZIP2=  yes
USE_GL=     yes
USE_SDL=    sdl
REINPLACE_ARGS= -i ''

GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="`${SDL_CONFIG} --cflags` `freetype-config --cflags` -I${X11BASE}/include -I${X11BASE}/include/FTGL" \
        LDFLAGS="`${SDL_CONFIG} --libs` -L${X11BASE}/lib"

SUB_FILES=  ${PORTNAME}-sh

post-patch:
# Fix SDL include statement
.for f in *.cpp *.h
    @${FIND} ${WRKSRC}/src -type f -name ${f} -print0 | \
        ${XARGS} -0 \
        ${REINPLACE_CMD} -e 's|\(#include.*\)SDL/\(SDL.*\)|\1\2|'
.endfor

# Remove -lSDL flag
    @${REINPLACE_CMD} -e 's|-lSDL ||' ${WRKSRC}/src/Makefile.in

do-install:
# Script
    ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-sh ${PREFIX}/bin/${PORTNAME}

# Program
    ${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/libexec

# Data
    ${MKDIR} ${DATADIR}
    ${CP} -R ${WRKSRC}/runDir/* ${DATADIR}

post-install:
# Fix permissions
    ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}
    ${FIND} ${DATADIR} -type f -print0 | \
        ${XARGS} -0 ${CHMOD} ${SHAREMODE}
    ${FIND} ${DATADIR} -type d -print0 | \
        ${XARGS} -0 ${CHMOD} ${BINMODE}

.include <bsd.port.mk>