ports/173176: [PATCH] games/lmarbles: Makefile changed, OptionsNG, take maintainership

nemysis nemysis at gmx.ch
Sun Oct 28 22:50:01 UTC 2012


>Number:         173176
>Category:       ports
>Synopsis:       [PATCH] games/lmarbles: Makefile changed, OptionsNG, take maintainership
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 28 22:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC
>Description:

- Take maintainership

Added file(s):
- files/pkg-install.in

Makefile changed:

+LICENSE=	GPLv2
+BUILD_DEPENDS=	giftopnm:${PORTSDIR}/graphics/netpbm
+CONFIGURE_ARGS=	--localstatedir=/var/games
+PORTDOCS=	*
+DOCSRCDIR1=	${WRKSRC}
+DOCSRCDIR2=	${WRKSRC}/src/manual
+SUB_FILES=	pkg-install
+.include <bsd.port.options.mk>
 post-patch:
+post-build:
 post-install:
+.if ${PORT_OPTIONS:MDOCS}
pkg-plist

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
>How-To-Repeat:

portlint -A
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: new ports should not set PORTREVISION.
WARN: pkg-install: possible use of absolute pathname "/var/games/lmarbles....".
0 fatal errors and 3 warnings found.

WARN: pkg-install: because is used
FILE="/var/games/lmarbles.prfs"


port test: clean


Build log

https://redports.org/buildarchive/20121028220134-4946/

>Fix:

--- lmarbles-1.0.8_3.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/games/lmarbles/Makefile ./Makefile
--- /usr/ports/games/lmarbles/Makefile	2012-02-18 11:17:58.000000000 +0100
+++ ./Makefile	2012-10-28 22:53:47.000000000 +0100
@@ -7,32 +7,58 @@
 
 PORTNAME=	lmarbles
 PORTVERSION=	1.0.8
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	games
 MASTER_SITES=	SF/lgames/${PORTNAME}
 
-MAINTAINER=	ports at FreeBSD.org
-COMMENT=	A challenging puzzle game similar to Atomix
+MAINTAINER=	nemysis at gmx.ch
+COMMENT=	Atomix-like game of moving marbles in puzzles
+
+LICENSE=	GPLv2
+
+BUILD_DEPENDS=	giftopnm:${PORTSDIR}/graphics/netpbm
 
 USE_SDL=	sdl mixer
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--localstatedir=${DATADIR}
+CONFIGURE_ARGS=	--localstatedir=/var/games
 
 MAN6=		${PORTNAME}.6
 
+PORTDOCS=	*
+
+DOCSRCDIR1=	${WRKSRC}
+DOC_FILES1=	AUTHORS ChangeLog README README-SDL.txt
+
+DOCSRCDIR2=	${WRKSRC}/src/manual
+DOCSDIR2=	${DOCSDIR}/manual
+DOC_FILES2=	*.jpg *.html
+
+SUB_FILES=	pkg-install
+
+.include <bsd.port.options.mk>
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|(datadir)/icons|(datadir)/pixmaps|g' \
+	-e 's|(datadir)/pixmaps/lmarbles48.gif|(datadir)/pixmaps/lmarbles48.png|' \
 		${WRKSRC}/Makefile.in
 
+post-build:
+	@(cd ${WRKSRC} && ${LOCALBASE}/bin/giftopnm lmarbles32.gif | \
+		${LOCALBASE}/bin/pnmtopng > ${PORTNAME}32.png)
+	@(cd ${WRKSRC} && ${LOCALBASE}/bin/giftopnm lmarbles48.gif | \
+		${LOCALBASE}/bin/pnmtopng > ${PORTNAME}48.png)
+
 post-install:
-	@${CHMOD} 2755 ${PREFIX}/bin/${PORTNAME}
-	@${CHOWN} root:games ${PREFIX}/bin/${PORTNAME}
-	@${CHMOD} 0664 ${DATADIR}/${PORTNAME}.prfs
-	@${CHOWN} root:games ${DATADIR}/${PORTNAME}.prfs
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/src/manual/* ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}*.png ${PREFIX}/share/pixmaps
+
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
+	${MKDIR} ${DOCSDIR2}
+	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
 .endif
 
+	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
 .include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/games/lmarbles/files/pkg-install.in ./files/pkg-install.in
--- /usr/ports/games/lmarbles/files/pkg-install.in	1970-01-01 01:00:00.000000000 +0100
+++ ./files/pkg-install.in	2012-10-28 22:37:16.000000000 +0100
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+FILE="/var/games/lmarbles.prfs"
+
+if [ ! -e $FILE ]; then
+	${INSTALL_DATA} ${WRKSRC}/src/empty.prfs $FILE
+fi
+chgrp games $FILE
+chmod 664 $FILE
diff -ruN --exclude=CVS /usr/ports/games/lmarbles/pkg-descr ./pkg-descr
--- /usr/ports/games/lmarbles/pkg-descr	2005-10-10 13:14:37.000000000 +0200
+++ ./pkg-descr	2012-10-28 22:20:20.000000000 +0100
@@ -2,4 +2,9 @@
 The goal is to arrange a figure out of single marbles within a time
 limit to reach the next level.
 
+You goal in the puzzle game marbles is to create a more or less complex
+figure out of single marbles within a time limit to reach the next
+level. Sounds easy? Well, there is a problem: If a marble starts to
+move, it will not stop until it hits a wall or another marble.
+
 WWW: http://lgames.sourceforge.net/index.php?project=LMarbles
diff -ruN --exclude=CVS /usr/ports/games/lmarbles/pkg-plist ./pkg-plist
--- /usr/ports/games/lmarbles/pkg-plist	2009-11-14 19:27:36.000000000 +0100
+++ ./pkg-plist	2012-10-28 22:20:59.000000000 +0100
@@ -1,11 +1,5 @@
 bin/lmarbles
 share/applications/lmarbles.desktop
-%%PORTDOCS%%%%DOCSDIR%%/arrow.jpg
-%%PORTDOCS%%%%DOCSDIR%%/arrow2.jpg
-%%PORTDOCS%%%%DOCSDIR%%/crumble.jpg
-%%PORTDOCS%%%%DOCSDIR%%/manual.html
-%%PORTDOCS%%%%DOCSDIR%%/marbles.jpg
-%%PORTDOCS%%%%DOCSDIR%%/teleport.jpg
 %%DATADIR%%/gfx/board.bmp
 %%DATADIR%%/gfx/f_red.bmp
 %%DATADIR%%/gfx/f_small.bmp
@@ -63,7 +57,6 @@
 %%DATADIR%%/gfx/wood/wall.bmp
 %%DATADIR%%/gfx/wood/wall_crumble.bmp
 %%DATADIR%%/levels/Original
-%%DATADIR%%/lmarbles.prfs
 %%DATADIR%%/sounds/alarm.wav
 %%DATADIR%%/sounds/arrow.wav
 %%DATADIR%%/sounds/click.wav
@@ -72,7 +65,9 @@
 %%DATADIR%%/sounds/select.wav
 %%DATADIR%%/sounds/stop.wav
 %%DATADIR%%/sounds/teleport.wav
+share/pixmaps/lmarbles32.png
 share/pixmaps/lmarbles48.gif
+share/pixmaps/lmarbles48.png
 @dirrm %%DATADIR%%/sounds
 @dirrm %%DATADIR%%/levels
 @dirrm %%DATADIR%%/gfx/wood
@@ -80,5 +75,4 @@
 @dirrm %%DATADIR%%/gfx/metal
 @dirrm %%DATADIR%%/gfx
 @dirrm %%DATADIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrmtry share/applications
--- lmarbles-1.0.8_3.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list