aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/sdl_jewels/Makefile61
-rw-r--r--games/sdl_jewels/distinfo6
2 files changed, 38 insertions, 29 deletions
diff --git a/games/sdl_jewels/Makefile b/games/sdl_jewels/Makefile
index b72429ab6d16..293848393e41 100644
--- a/games/sdl_jewels/Makefile
+++ b/games/sdl_jewels/Makefile
@@ -1,56 +1,63 @@
-# New Ports collection makefile for: SDL_jewels
-# Date created: 2012-04-25
-# Whom: nemysis@gmx.ch
-#
# $FreeBSD$
-#
PORTNAME= sdl_jewels
PORTVERSION= 1.1.1
+PORTREVISION= 1
CATEGORIES= games
-MASTER_SITES= http://www.linuxmotors.com/gljewel/downloads/
-DISTNAME= ${PORTNAME:S/sdl/SDL/}-${PORTVERSION}
-EXTRACT_SUFX= .tgz
+MASTER_SITES= http://www.linuxmotors.com/gljewel/downloads/ \
+ http://www.linuxmotors.com/gljewel/:icons
+DISTFILES= ${PORTNAME:S/sdl/SDL/}-${DISTVERSION}.tgz \
+ gljewel.gif:icons
+DIST_SUBDIR= ${PORTNAME}
+EXTRACT_ONLY= ${PORTNAME:S/sdl/SDL/}-${DISTVERSION}.tgz
MAINTAINER= nemysis@gmx.ch
-COMMENT= SDL Jewels is a tile-matching 8x8 puzzle game
+COMMENT= Tile-matching 8x8 puzzle game
LICENSE= GPLv2
+BUILD_DEPENDS= giftopnm:${PORTSDIR}/graphics/netpbm
+
+WRKSRC= ${WRKDIR}/${PORTNAME:S/sdl/SDL/}-${PORTVERSION}
+
USE_SDL= sdl image mixer
USE_GMAKE= yes
MAKE_JOBS_SAFE= yes
+ALL_TARGET=
-PLIST_FILES= bin/sdljewels
+PLIST_FILES= bin/sdljewels \
+ share/pixmaps/sdljewels.png
PORTDATA= *
PORTDOCS= ChangeLog README
-ALL_TARGET=
+DESKTOP_ENTRIES="SDL Jewels" "${COMMENT}" "sdljewels" \
+ "sdljewels" "Game;ArcadeGame;" ${FALSE}
+
+.include <bsd.port.options.mk>
post-patch:
@${RM} -rf ${WRKSRC}/data/CVS
-# Fix data location
- @${REINPLACE_CMD} -e 's!data/bigfont.ppm!${DATADIR}/data/bigfont.ppm!' \
- -e 's!dirlist\[\]="data";!dirlist[]="${DATADIR}/data";'! \
- -e 's!char name[256],!char name[512],!' \
- ${WRKSRC}/gljewel.c ${WRKSRC}/sound.c
-# Fix CFLAGS/LDFLAGS
- @${REINPLACE_CMD} -e 's!CFLAGS = -O2 -Wall!CFLAGS+=!' \
- -e 's!LDFLAGS =!LDFLAGS+=!' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's|data/bigfont.ppm|${DATADIR}/data/bigfont.ppm|' \
+ -e 's|dirlist\[\]="data";|dirlist[]="${DATADIR}/data";|' \
+ -e 's|char name[256],|char name[512],|' \
+ ${WRKSRC}/gljewel.c ${WRKSRC}/sound.c
+ @${REINPLACE_CMD} -e 's|CFLAGS = -O2 -Wall|CFLAGS+=|' \
+ -e 's|LDFLAGS =|LDFLAGS+=|' ${WRKSRC}/Makefile
+
+post-build:
+ @(cd ${WRKSRC} && \
+ ${LOCALBASE}/bin/giftopnm ${DISTDIR}/${DIST_SUBDIR}/gljewel.gif | \
+ ${LOCALBASE}/bin/pamscale .1 | ${LOCALBASE}/bin/pnmtopng > sdljewels.png)
do-install:
-# Executable
${INSTALL_PROGRAM} ${WRKSRC}/gljewel ${PREFIX}/bin/sdljewels
-# Data
- (cd ${WRKSRC} && ${COPYTREE_SHARE} data ${DATADIR})
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} data ${DATADIR})
+ ${INSTALL_DATA} ${WRKSRC}/sdljewels.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_jewels/distinfo b/games/sdl_jewels/distinfo
index bb795fa792bd..62aef88ca6b1 100644
--- a/games/sdl_jewels/distinfo
+++ b/games/sdl_jewels/distinfo
@@ -1,2 +1,4 @@
-SHA256 (SDL_jewels-1.1.1.tgz) = c9a40b7e18fabb03e4065e656bc2c30f595103bf20dc74a10847c3f3aa138ee7
-SIZE (SDL_jewels-1.1.1.tgz) = 195366
+SHA256 (sdl_jewels/SDL_jewels-1.1.1.tgz) = c9a40b7e18fabb03e4065e656bc2c30f595103bf20dc74a10847c3f3aa138ee7
+SIZE (sdl_jewels/SDL_jewels-1.1.1.tgz) = 195366
+SHA256 (sdl_jewels/gljewel.gif) = 73e5cf488e9a7c399b30d72f9920412834386b6eb6c66fdd0e941300e220683d
+SIZE (sdl_jewels/gljewel.gif) = 57312