Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2014 22:20:02 GMT
From:      Nikolai Lifanov <lifanov@mail.lifanov.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/187471: [patch] games/sokoban: undeprecate, modernize, stage, and adopt
Message-ID:  <201403222220.s2MMK2sl074269@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/187471; it has been noted by GNATS.

From: Nikolai Lifanov <lifanov@mail.lifanov.com>
To: bug-followup@FreeBSD.org, lifanov@mail.lifanov.com
Cc:  
Subject: Re: ports/187471: [patch] games/sokoban: undeprecate, modernize,
 stage, and adopt
Date: Sat, 22 Mar 2014 18:11:37 -0400

 This is a multi-part message in MIME format.
 --------------040103070303050806090106
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Please review this patch instead.
 This cleans the port up a bit more: allows packaging as user, uses a 
 macro for DATADIR, and doesn't break file checksums under share.
 
 - Nikolai Lifanov
 
 
 --------------040103070303050806090106
 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0";
  name="sokoban.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="sokoban.diff"
 
 Index: games/sokoban/Makefile
 ===================================================================
 --- games/sokoban/Makefile	(revision 348810)
 +++ games/sokoban/Makefile	(working copy)
 @@ -3,29 +3,23 @@
  
  PORTNAME=		sokoban
  PORTVERSION=		1.0
 +PORTREVISION=		1
  CATEGORIES=		games
  MASTER_SITES=		${MASTER_SITE_SUNSITE}
  MASTER_SITE_SUBDIR=	games/strategy
  DISTFILES=		${PORTNAME}-src${EXTRACT_SUFX}
  
 -MAINTAINER=		ports@FreeBSD.org
 -COMMENT=	Logical game: problems with packets in cave
 +MAINTAINER=		lifanov@mail.lifanov.com
 +COMMENT=		Logical game: problems with packets in cave
  
 -DEPRECATED=	Unmaintained since 2000
 -EXPIRATION_DATE=	2014-04-11
  WRKSRC=			${WRKDIR}/sokoban
  ALL_TARGET=
  
 -NO_STAGE=	yes
 +PLIST_SUB=	PFX=${PREFIX}
 +
  do-install:
 -	@ ${INSTALL_PROGRAM} ${WRKSRC}/sokoban ${PREFIX}/bin/sokoban
 -	@ ${CHOWN} root:games ${PREFIX}/bin/sokoban
 -	@ ${CHMOD} 2555 ${PREFIX}/bin/sokoban
 -	@ ${MKDIR} ${PREFIX}/share/sokoban
 -	@ ${CHOWN} root:games ${PREFIX}/share/sokoban
 -	@ ${MKDIR} ${PREFIX}/share/sokoban/screens
 -	@ ${CHOWN} root:games ${PREFIX}/share/sokoban/screens
 -	@ ${INSTALL_DATA} ${WRKSRC}/screens/* ${PREFIX}/share/sokoban/screens
 -	@ ${SH} pkg-install ${PKGNAME} POST-INSTALL
 +	@${INSTALL_PROGRAM} ${WRKSRC}/sokoban ${STAGEDIR}${PREFIX}/bin/sokoban
 +	@${MKDIR} -p ${STAGEDIR}${DATADIR}/screens
 +	@${INSTALL_DATA} ${WRKSRC}/screens/* ${STAGEDIR}${DATADIR}/screens
  
  .include <bsd.port.mk>
 Index: games/sokoban/files/patch-Makefile
 ===================================================================
 --- games/sokoban/files/patch-Makefile	(revision 0)
 +++ games/sokoban/files/patch-Makefile	(working copy)
 @@ -0,0 +1,17 @@
 +--- ./Makefile.orig	1992-05-09 19:23:46.000000000 -0400
 ++++ ./Makefile	2014-03-11 22:14:36.359748029 -0400
 +@@ -1,8 +1,12 @@
 +-CCOPT= -O3
 ++CCOPT= ${CFLAGS}
 ++.ifdef PREFIX
 ++CCOPT+= -DPREFIX=\"${PREFIX}\"
 ++.endif
 ++
 + OBJECTS= sok.o readscreen.o showscreen.o play.o save.o score.o
 + 
 + sokoban: $(OBJECTS)
 +-	cc $(CCOPT) -static -o sokoban $(OBJECTS) -lcurses -ltermcap
 ++	cc $(CCOPT) -o sokoban $(OBJECTS) -lcurses -ltermcap
 + sok.o: sok.c sokoban.h
 + 	cc $(CCOPT) -c sok.c
 + 
 
 Property changes on: games/sokoban/files/patch-Makefile
 ___________________________________________________________________
 Added: fbsd:nokeywords
 ## -0,0 +1 ##
 +yes
 \ No newline at end of property
 Added: svn:eol-style
 ## -0,0 +1 ##
 +native
 \ No newline at end of property
 Added: svn:mime-type
 ## -0,0 +1 ##
 +text/plain
 \ No newline at end of property
 Index: games/sokoban/files/patch-aa
 ===================================================================
 --- games/sokoban/files/patch-aa	(revision 348810)
 +++ games/sokoban/files/patch-aa	(working copy)
 @@ -1,25 +0,0 @@
 -*** Makefile	Sat May  9 23:23:46 1992
 ---- /home/andy/tmp/wrk/Makefile	Wed Jul  2 06:04:37 1997
 -***************
 -*** 1,8 ****
 -! CCOPT= -O3
 -  OBJECTS= sok.o readscreen.o showscreen.o play.o save.o score.o
 -  
 -  sokoban: $(OBJECTS)
 -! 	cc $(CCOPT) -static -o sokoban $(OBJECTS) -lcurses -ltermcap
 -  sok.o: sok.c sokoban.h
 -  	cc $(CCOPT) -c sok.c
 -  
 ---- 1,12 ----
 -! CCOPT= ${CFLAGS}
 -! .ifdef PREFIX
 -! CCOPT+= -DPREFIX=\"${PREFIX}\"
 -! .endif
 -! 
 -  OBJECTS= sok.o readscreen.o showscreen.o play.o save.o score.o
 -  
 -  sokoban: $(OBJECTS)
 -! 	cc $(CCOPT) -o sokoban $(OBJECTS) -lcurses -ltermcap
 -  sok.o: sok.c sokoban.h
 -  	cc $(CCOPT) -c sok.c
 -  
 Index: games/sokoban/files/patch-ab
 ===================================================================
 --- games/sokoban/files/patch-ab	(revision 348810)
 +++ games/sokoban/files/patch-ab	(working copy)
 @@ -1,30 +0,0 @@
 -*** sokoban.h	Fri May 15 05:15:26 1992
 ---- /home/andy/tmp/wrk/sokoban.h	Tue Apr 29 19:02:00 1997
 -***************
 -*** 1,6 ****
 ---- 1,14 ----
 -  /***********************************************************************
 -     You may wish to alter the following directory paths
 -  ***********************************************************************/
 -+ 
 -+ #ifdef PREFIX
 -+ #define SCREENPATH	PREFIX	"/share/sokoban/screens"
 -+ #define SAVEPATH	PREFIX	"/share/sokoban"
 -+ #define LOCKFILE		"/tmp/sok.tmp"
 -+ #define SCOREFILE		"/var/games/sokoban"
 -+ #else
 -+ 
 -  /**/
 -  /* SCREENPATH: the name of the directioy where the screen file are held */
 -  /**/
 -***************
 -*** 23,28 ****
 ---- 31,38 ----
 -  /* SCOREFILE: the full pathname of the score file */
 -  /**/
 -  #define SCOREFILE	"/usr/games/sokob/highscore"
 -+ 
 -+ #endif
 -  
 -  /**/
 -  /* MAXUSERNAME: defines the maximum length of a system's user name */
 Index: games/sokoban/files/patch-ac
 ===================================================================
 --- games/sokoban/files/patch-ac	(revision 348810)
 +++ games/sokoban/files/patch-ac	(working copy)
 @@ -1,19 +0,0 @@
 -*** play.c	Sat May 16 06:53:27 1992
 ---- /home/andy/tmp/wrk/play.c	Tue Apr 29 18:45:43 1997
 -***************
 -*** 37,43 ****
 -  
 -  short play() {
 -  
 -!    short c;
 -     short ret;
 -     short undolock = 1;		/* locked for undo */
 -  
 ---- 37,43 ----
 -  
 -  short play() {
 -  
 -!    char c;
 -     short ret;
 -     short undolock = 1;		/* locked for undo */
 -  
 Index: games/sokoban/files/patch-play.c
 ===================================================================
 --- games/sokoban/files/patch-play.c	(revision 0)
 +++ games/sokoban/files/patch-play.c	(working copy)
 @@ -0,0 +1,11 @@
 +--- ./play.c.orig	1992-05-16 02:53:27.000000000 -0400
 ++++ ./play.c	2014-03-11 22:14:36.546748659 -0400
 +@@ -37,7 +37,7 @@
 + 
 + short play() {
 + 
 +-   short c;
 ++   char c;
 +    short ret;
 +    short undolock = 1;		/* locked for undo */
 + 
 
 Property changes on: games/sokoban/files/patch-play.c
 ___________________________________________________________________
 Added: svn:mime-type
 ## -0,0 +1 ##
 +text/plain
 \ No newline at end of property
 Added: fbsd:nokeywords
 ## -0,0 +1 ##
 +yes
 \ No newline at end of property
 Added: svn:eol-style
 ## -0,0 +1 ##
 +native
 \ No newline at end of property
 Index: games/sokoban/files/patch-sokoban.h
 ===================================================================
 --- games/sokoban/files/patch-sokoban.h	(revision 0)
 +++ games/sokoban/files/patch-sokoban.h	(working copy)
 @@ -0,0 +1,26 @@
 +--- ./sokoban.h.orig	1992-05-15 01:15:26.000000000 -0400
 ++++ ./sokoban.h	2014-03-11 22:16:45.005739636 -0400
 +@@ -1,6 +1,14 @@
 + /***********************************************************************
 +    You may wish to alter the following directory paths
 + ***********************************************************************/
 ++
 ++#ifdef PREFIX
 ++#define SCREENPATH	PREFIX	"/share/sokoban/screens"
 ++#define SAVEPATH	PREFIX	"/share/sokoban"
 ++#define LOCKFILE		"/tmp/sok.tmp"
 ++#define SCOREFILE		"/var/games/sokoban"
 ++#else
 ++
 + /**/
 + /* SCREENPATH: the name of the directioy where the screen file are held */
 + /**/
 +@@ -24,6 +32,8 @@
 + /**/
 + #define SCOREFILE	"/usr/games/sokob/highscore"
 + 
 ++#endif
 ++
 + /**/
 + /* MAXUSERNAME: defines the maximum length of a system's user name */
 + /**/
 
 Property changes on: games/sokoban/files/patch-sokoban.h
 ___________________________________________________________________
 Added: svn:mime-type
 ## -0,0 +1 ##
 +text/plain
 \ No newline at end of property
 Added: fbsd:nokeywords
 ## -0,0 +1 ##
 +yes
 \ No newline at end of property
 Added: svn:eol-style
 ## -0,0 +1 ##
 +native
 \ No newline at end of property
 Index: games/sokoban/pkg-deinstall
 ===================================================================
 --- games/sokoban/pkg-deinstall	(revision 348810)
 +++ games/sokoban/pkg-deinstall	(working copy)
 @@ -1,8 +0,0 @@
 -#!/bin/sh
 -# $FreeBSD$
 -
 -FILE="/var/games/sokoban"
 -
 -if [ "$2" = "POST-DEINSTALL" -a -f "$FILE" ]; then
 -	echo "===>   If you are completely uninstalling sokoban you may also want to remove the scores files: $FILE"
 -fi
 Index: games/sokoban/pkg-install
 ===================================================================
 --- games/sokoban/pkg-install	(revision 348810)
 +++ games/sokoban/pkg-install	(working copy)
 @@ -1,9 +0,0 @@
 -#!/bin/sh
 -
 -FILE="/var/games/sokoban"
 -[ "$2" != "POST-INSTALL" -o -f "$FILE" ] && exit 0
 -
 -echo "===>   Creating initial high score file $FILE"
 -dd if=/dev/zero of=$FILE bs=1 count=2
 -chmod 664 $FILE
 -chown root:games $FILE
 Index: games/sokoban/pkg-plist
 ===================================================================
 --- games/sokoban/pkg-plist	(revision 348810)
 +++ games/sokoban/pkg-plist	(working copy)
 @@ -1,4 +1,9 @@
  bin/sokoban
 +@exec truncate -s 512B /var/games/sokoban
 +@exec chgrp games /var/games/sokoban
 +@exec chmod 0664 /var/games/sokoban
 +@exec chgrp games %%PFX%%/bin/sokoban
 +@exec chmod 2555 %%PFX%%/bin/sokoban
  share/sokoban/screens/sokoban.help
  share/sokoban/screens/screen.1
  share/sokoban/screens/screen.2
 @@ -52,4 +57,4 @@
  share/sokoban/screens/screen.50
  @dirrm share/sokoban/screens
  @dirrm share/sokoban
 -@unexec if [ `stat -f %z /var/games/sokoban 2>/dev/null` = "2" ]; then rm -f /var/games/sokoban; fi
 +@unexec rm -f /var/games/sokoban
 
 --------------040103070303050806090106--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403222220.s2MMK2sl074269>