aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/sdl_lopan/Makefile51
-rw-r--r--games/sdl_lopan/distinfo6
2 files changed, 33 insertions, 24 deletions
diff --git a/games/sdl_lopan/Makefile b/games/sdl_lopan/Makefile
index eb40fca8b395..50f8d8db3411 100644
--- a/games/sdl_lopan/Makefile
+++ b/games/sdl_lopan/Makefile
@@ -1,54 +1,61 @@
-# New Ports collection makefile for: SDL_Lopan
-# Date created: 2012-04-26
-# Whom: nemysis@gmx.ch
-#
# $FreeBSD$
-#
PORTNAME= sdl_lopan
PORTVERSION= 10
+PORTREVISION= 1
CATEGORIES= games
-MASTER_SITES= http://www.linuxmotors.com/sdllopan/downloads/
-DISTNAME= ${PORTNAME:S/_//}-${PORTVERSION}
-EXTRACT_SUFX= .tgz
+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@gmx.ch
COMMENT= Mahjong game remake
LICENSE= GPLv2
+BUILD_DEPENDS= giftopnm:${PORTSDIR}/graphics/netpbm
+
WRKSRC= ${WRKDIR}/sdllopan-${PORTVERSION}
USE_SDL= sdl image mixer
USE_GMAKE= yes
MAKE_JOBS_SAFE= yes
-PLIST_FILES= bin/sdllopan
+ALL_TARGET=
+
+PLIST_FILES= bin/sdllopan \
+ share/pixmaps/sdllopan.png
PORTDATA= *
PORTDOCS= Changelog README
-ALL_TARGET=
+DESKTOP_ENTRIES="SDL Lopan" "${COMMENT}" "sdllopan" \
+ "sdllopan" "Game;ArcadeGame;" ${FALSE}
+
+.include <bsd.port.options.mk>
post-patch:
-# Fix data location
- @${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
+ @${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:
-# Executable
${INSTALL_PROGRAM} ${WRKSRC}/lopan ${PREFIX}/bin/sdllopan
-# Data
@(cd ${WRKSRC} && ${COPYTREE_SHARE} data ${DATADIR})
+ ${INSTALL_DATA} ${WRKSRC}/sdllopan.png ${PREFIX}/share/pixmaps
-# Documentation
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
-.for f in ${PORTDOCS}
- ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
-.endfor
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif
.include <bsd.port.mk>
diff --git a/games/sdl_lopan/distinfo b/games/sdl_lopan/distinfo
index b4a76ce6b47d..94ae6a7d2758 100644
--- a/games/sdl_lopan/distinfo
+++ b/games/sdl_lopan/distinfo
@@ -1,2 +1,4 @@
-SHA256 (sdllopan-10.tgz) = 386de065bc8c3449c3b0b5e5651cb035cb1bdc242b425c865dd387c54ce708c3
-SIZE (sdllopan-10.tgz) = 380102
+SHA256 (sdl_lopan/sdllopan-10.tgz) = 386de065bc8c3449c3b0b5e5651cb035cb1bdc242b425c865dd387c54ce708c3
+SIZE (sdl_lopan/sdllopan-10.tgz) = 380102
+SHA256 (sdl_lopan/sdllopan.gif) = 390f26f4792e1116b4f4456a1e2b9713bca6b9fd200badb85e4b9be403a0988a
+SIZE (sdl_lopan/sdllopan.gif) = 45164