aboutsummaryrefslogtreecommitdiffstats
path: root/games/osgg/Makefile
blob: 1433b3312ae1d66d843db02d1e0bcd9a92968455 (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
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD$

PORTNAME=   osgg
PORTVERSION=    0.99
PORTREVISION=   7
CATEGORIES= games
MASTER_SITES=   SF

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    OldSkool Gravity Game

USES=       tar:bzip2
USE_SDL=    sdl image ttf mixer
USE_GL=     yes

WRKSRC=     ${WRKDIR}/${PORTNAME}

PLIST_FILES=    bin/${PORTNAME}
PORTDATA=   *

post-extract:
    @${FIND} -d ${WRKSRC} -name .svn -exec ${RM} -rf {} \;

post-patch:
    @${RM} -f ${WRKSRC}/osgg
    @${REINPLACE_CMD} -e 's|"[a-z]*.txt"|DATADIR&|; s|endian.h|sys/&|' \
        ${WRKSRC}/main.cpp

do-build:
    cd ${WRKSRC} && ${CXX} ${CXXFLAGS} `${SDL_CONFIG} --libs --cflags` \
        -lGL -lSDL_image -lSDL_ttf -lSDL_mixer -o ${PORTNAME} \
        -DDATADIR="\"${DATADIR}/\"" \
            main.cpp text.cpp sound.cpp

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
    cd ${WRKSRC} && ${COPYTREE_SHARE} "*.txt *.ogg Bandal.ttf icon.png levels" ${STAGEDIR}${DATADIR}/

.include <bsd.port.mk>