aboutsummaryrefslogtreecommitdiffstats
path: root/games/sdl_lopan/Makefile
blob: f37768133d67f282caf43ae96cb07bf2706c4fd5 (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
# $FreeBSD$

PORTNAME=   sdl_lopan
PORTVERSION=    10
PORTREVISION=   2
CATEGORIES= games
MASTER_SITES=   http://www.linuxmotors.com/sdllopan/downloads/ \
        http://www.linuxmotors.com/sdllopan/:icons
DISTFILES=  sdllopan-${DISTVERSION}.tgz \
        sdllopan.gif:icons
DIST_SUBDIR=    ${PORTNAME}
EXTRACT_ONLY=   sdllopan-${DISTVERSION}.tgz

MAINTAINER= nemysis@FreeBSD.org
COMMENT=    Mahjong game remake

LICENSE=    GPLv2

BUILD_DEPENDS=  giftopnm:${PORTSDIR}/graphics/netpbm

WRKSRC=     ${WRKDIR}/sdllopan-${PORTVERSION}

USE_SDL=    sdl image mixer
USE_GMAKE=  yes

ALL_TARGET=

PLIST_FILES=    bin/sdllopan \
        share/pixmaps/sdllopan.png

PORTDATA=   *
PORTDOCS=   Changelog README

DESKTOP_ENTRIES="SDL Lopan" "${COMMENT}" "sdllopan" \
        "sdllopan" "Game;ArcadeGame;" ${FALSE}

NO_STAGE=   yes
.include <bsd.port.options.mk>

post-patch:
    @${REINPLACE_CMD} -e 's|data/bg%d.pcx|${DATADIR}/data/bg%d.pcx|' \
    -e 's|data/tiles%d.pcx|${DATADIR}/data/tiles%d.pcx|' \
    -e 's|char temp\[64\];|char temp\[256\];|' \
        ${WRKSRC}/lopan.c

post-build:
    @(cd ${WRKSRC} && \
        ${LOCALBASE}/bin/giftopnm ${DISTDIR}/${DIST_SUBDIR}/sdllopan.gif | \
        ${LOCALBASE}/bin/pamscale .1 | ${LOCALBASE}/bin/pnmtopng > sdllopan.png)

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/lopan ${PREFIX}/bin/sdllopan
    @(cd ${WRKSRC} && ${COPYTREE_SHARE} data ${DATADIR})
    ${INSTALL_DATA} ${WRKSRC}/sdllopan.png ${PREFIX}/share/pixmaps

.if ${PORT_OPTIONS:MDOCS}
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif

.include <bsd.port.mk>