aboutsummaryrefslogtreecommitdiffstats
path: root/games/kobodeluxe/Makefile
blob: 94d8fd288f1a673b15885b96abac5a5fbdfecc6f (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
# Created by: Amar Takhar <verm@drunkmonk.net>
# $FreeBSD$

PORTNAME=   kobodeluxe
PORTVERSION=    0.5.1
PORTREVISION=   8
CATEGORIES= games
MASTER_SITES=   http://olofson.net/kobodl/download/ \
        http://mirror.amdmi3.ru/distfiles/
DISTNAME=   KoboDeluxe-${DISTVERSION}

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    An SDL port of the scrolling game XKobo

USE_BZIP2=  yes
USE_SDL=    image sdl
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --sharedstatedir=${SCOREDIR} --enable-oss
MAKE_JOBS_SAFE= yes

MAN6=       kobodl.6

SCOREDIR=   /var/games/${PORTNAME}
PLIST_SUB=  SCOREDIR="${SCOREDIR}"

DATADIR=    ${PREFIX}/share/kobo-deluxe

DESKTOP_ENTRIES="Kobo Deluxe" \
        "An SDL port of the scrolling game XKobo" \
        "${DATADIR}/" \
        "kobodeluxe" \
        "Game;ArcadeGame;" \
        false

OPTIONS_DEFINE= OPENGL
OPTIONS_DEFAULT=OPENGL

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MOPENGL}
USE_GL=     yes
CONFIGURE_ARGS+=    --enable-opengl
.else
CONFIGURE_ARGS+=    --disable-opengl
.endif

post-extract:
    @cd ${WRKSRC} && ${TAR} -xzf icons.tar.gz

post-patch:
    @${REINPLACE_CMD} -e 's|$$(datadir)/games/kobo-deluxe|${DATADIR}|; \
        s|$$(prefix)/games/kobo-deluxe/scores|${SCOREDIR}|; \
        s|-lSDL$$||; s|SDL/SDL|SDL|' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|$$(datadir)/games/kobo-deluxe|${DATADIR}|' \
        ${WRKSRC}/data/Makefile.in

post-install:
    ${CHGRP} games ${PREFIX}/bin/kobodl
    ${CHMOD} g+s ${PREFIX}/bin/kobodl
    ${INSTALL} -d -o root -g games -m 775 ${SCOREDIR}
    ${MKDIR} ${PREFIX}/share/applications
    ${INSTALL_DATA} ${WRKSRC}/icons/Ubuntu/kobodeluxe.desktop \
        ${PREFIX}/share/applications/
    ${INSTALL_DATA} ${WRKSRC}/icons/Ubuntu/kobo-icon.xpm \
        ${PREFIX}/share/pixmaps/

.include <bsd.port.mk>