aboutsummaryrefslogtreecommitdiffstats
path: root/games/sdl_jewels
diff options
context:
space:
mode:
authorak <ak@FreeBSD.org>2012-10-11 21:43:44 +0800
committerak <ak@FreeBSD.org>2012-10-11 21:43:44 +0800
commit691aff9fad2e5553d72f8eb025541d7db1b3bd59 (patch)
tree782aab03a4046da6fe37853834072abd06459573 /games/sdl_jewels
parentf5f38928dee144fbee9b2f66bb577edd57652a4d (diff)
downloadfreebsd-ports-gnome-691aff9fad2e5553d72f8eb025541d7db1b3bd59.tar.gz
freebsd-ports-gnome-691aff9fad2e5553d72f8eb025541d7db1b3bd59.tar.zst
freebsd-ports-gnome-691aff9fad2e5553d72f8eb025541d7db1b3bd59.zip
- Convert Makefile headers to new style
- Convert to new options framework - Remove redundant comments - Improve COMMENT - Add DESKTOP_ENTRIES - Fix typo in sed regexp - Bump PORTREVISION Submitted by: nemysis <nemysis at gmx.ch> (maintainer) Feature safe: yes
Diffstat (limited to 'games/sdl_jewels')
-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