aboutsummaryrefslogtreecommitdiffstats
path: root/games/annelid/Makefile
blob: e1a2dd4a3a9b99974167654e07e5d9b9ad866885 (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
67
68
69
70
# New ports collection makefile for:    annelid
# Date created:             11 Aug 2005
# Whom:                 Alejandro Pulver <alejandro@varnet.biz>
#
# $FreeBSD$
#

PORTNAME=   annelid
PORTVERSION=    1
CATEGORIES= games
MASTER_SITES=   http://www.garthgillespie.com/annelid/ \
        ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= pav
DISTFILES=  ${PORTNAME}-src${EXTRACT_SUFX} \
        ${PORTNAME}-media${EXTRACT_SUFX}

MAINTAINER= alejandro@varnet.biz
COMMENT=    Remake of the ubiquitous "Snake" and "Worm" games

RESTRICTED= No redistribution allowed

USE_ZIP=    yes
USE_GMAKE=  yes
USE_SDL=    sdl
USE_GL=     yes
USE_REINPLACE=  yes

NO_WRKSUBDIR=   yes

OPTIONS=    OPTIMIZED_CFLAGS "Enable compilation optimizations" on

SUB_FILES=  ${PORTNAME}-sh

DATAFILES=  annelid.dat apple.tga apple.wav backd.tga backn.tga font.dat \
        font.tga front.tga grow.wav head.tga powerup.tga readme.txt \
        score.wav segment.tga shrink.wav slow.wav speed.wav title.tga \
        vortex.wav

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

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

# Data
    @${MKDIR} ${DATADIR}
.for f in ${DATAFILES}
    @${INSTALL_DATA} ${WRKSRC}/${f} ${DATADIR}
.endfor

.include <bsd.port.pre.mk>

post-patch:
# Fix Makefile
    @${REINPLACE_CMD} -e 's|%%CFLAGS%%|${CFLAGS}| ; \
            s|%%X11BASE%%|${X11BASE}| ; \
            s|sdl-config|${SDL_CONFIG}|' \
                ${WRKSRC}/${MAKEFILE}

# Fix SDL include statement
    @${REINPLACE_CMD} -e 's|\(#include.*\)SDL/\(SDL.*\)|\1\2|' \
                ${WRKSRC}/*.cpp ${WRKSRC}/*.h

# Enable/disable compilation optimizations
.if !defined(WITH_OPTIMIZED_CFLAGS)
    @${REINPLACE_CMD} -e 's|$$(OPT)||' ${WRKSRC}/${MAKEFILE}
.endif

.include <bsd.port.post.mk>