aboutsummaryrefslogtreecommitdiffstats
path: root/games/xye/Makefile
blob: 0d56c8228bb23a98af57371da768ce39cbade9bc (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Created by: Robert Gogolok <gogo@cs.uni-sb.de>
# $FreeBSD$

PORTNAME=   xye
PORTVERSION=    0.12.2
PORTREVISION=   3
CATEGORIES= games
MASTER_SITES=   SF:game \
        http://xye.sourceforge.net/levels/ \
        http://xye.sourceforge.net/:xmas \
        SF/nemysisfreebsdp/${CATEGORIES}/${PORTNAME}/:nemysis \
        http://xye.sourceforge.net/skins/:skins
DISTFILES=  ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}:game \
        ${LEVELS:S/$/.zip/} \
        ${LEVELS_XYE:S/$/.xye/} \
        xmas-xye-2009.zip:xmas \
        xye_extra_levels.20121109.zip:nemysis \
        Xye%20skin%20-%20classic%20kye.zip:skins \
        XMASKYESKIN.zip:skins
DIST_SUBDIR=    ${PORTNAME}
EXTRACT_ONLY=   ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}

MAINTAINER= nemysis@FreeBSD.org
COMMENT=    Puzzle games like sokoban or boulderdash

LICENSE=    ZLIB

EXTRACT_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip

USES=       gmake
USE_SDL=    sdl image ttf
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-docdir=${PREFIX}/share/doc

LEVELS=     Xye%20level%20-%204corners Xye%20level%20-%20Against%20the%20force \
        Xye%20level%20-%20Stop%20that%20cab Xye%20level%20-%20Helping%20Hand \
        Xye%20level%20-%20The%20plan Xye%20level%20-%20Controller \
        Xye%20level%20-%20At%20once Xye%20level%20-%20Open%20Ended \
        Xye%20level%20-%20Sorting Xye%20level%20-%20The%20insider \
        Xye%20level%20-%20The%20slow%20speedrun Xye%20levels%20-%20SuperJustin \
        Xye%20level%20-%20disturbingarrows Xye%20level%20-%20Duels%20of%20fate \
        nuffmagnets Xye%20levels%20-%20Pyramid%20treasure afirflood \
        Xye%20level%20-%20Blob%20prison Xye%20levels%20-%20ActionReplay \
        Xye%20level%20-%20gravity Xye%20level%20-%20pluzze

LEVELS_XYE= dungeon turnaround chekhov

SKINS=      Xye%20skin%20-%20classic%20kye XMASKYESKIN

PORTDOCS=   *

DESKTOP_ENTRIES="Xye" "${COMMENT}" "${PORTNAME}" \
        "${PORTNAME}" "Game;LogicGame;" false

SUB_FILES=   pkg-message

OPTIONS_DEFINE= DOCS SKINS
OPTIONS_DEFAULT=    SKINS
SKINS_DESC= Install additional skins

OPTIONS_SUB=    yes

.include <bsd.port.options.mk>

post-extract-script:
.for l in ${LEVELS:S/$/.zip/} xmas-xye-2009.zip xye_extra_levels.20121109.zip
    @${UNZIP_CMD} -qoj -d ${WRKDIR} ${_DISTDIR}/${l}
.endfor

.if ${PORT_OPTIONS:MSKINS}
.  for s in ${SKINS:S/$/.zip/}
    @${UNZIP_CMD} -qoj -d ${WRKDIR}/skins ${_DISTDIR}/${s}
.  endfor
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|docedir = $$(datadir)|docedir = ${PREFIX}/share/doc|' \
        ${WRKSRC}/Makefile.in

.if ! ${PORT_OPTIONS:MDOCS}
    @${REINPLACE_CMD} '/install-data-am:/s/install-doceDATA//' \
        ${WRKSRC}/Makefile.in
.endif

post-install:
    @(cd ${WRKDIR} && ${COPYTREE_SHARE} "*.xye *.txt" ${STAGEDIR}${DATADIR}/levels)

.if ${PORT_OPTIONS:MSKINS}
    @(cd ${WRKDIR}/skins && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/res)
.endif

    ${LN} -sf ${DATADIR}/res/detailed_icon.png \
        ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png

.include <bsd.port.mk>