From lifanov@mail.lifanov.com  Wed Mar 12 02:36:10 2014
Return-Path: <lifanov@mail.lifanov.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id AAABD858
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Mar 2014 02:36:10 +0000 (UTC)
Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 84042405
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Mar 2014 02:36:10 +0000 (UTC)
Received: by mail.lifanov.com (Postfix, from userid 1001)
	id 8D2F21A90BA; Tue, 11 Mar 2014 22:36:03 -0400 (EDT)
Message-Id: <20140312023603.8D2F21A90BA@mail.lifanov.com>
Date: Tue, 11 Mar 2014 22:36:03 -0400 (EDT)
From: Nikolai Lifanov <lifanov@mail.lifanov.com>
Reply-To: Nikolai Lifanov <lifanov@mail.lifanov.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] games/sokoban: undeprecate, modernize, stage, and adopt
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         187471
>Category:       ports
>Synopsis:       [patch] games/sokoban: undeprecate, modernize, stage, and adopt
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    madpilot
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 12 02:40:00 UTC 2014
>Closed-Date:    Mon Mar 24 12:53:15 UTC 2014
>Last-Modified:  Mon Mar 24 13:00:01 UTC 2014
>Originator:     Nikolai Lifanov
>Release:        FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD mail.lifanov.com 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

>Description:
	games/sokoban is a classic console game that works well on all suported FreeBSD releases, but it's not maintained and is now deprecated.
	Please see the attached patch: it modernizes several aspects of the port, including staging.
	There is a pkg version bump too, since it moves the score file to PREFIX. I will maintain it.

>How-To-Repeat:
	Please apply this patch.

>Fix:

--- sokoban.patch begins here ---
Index: games/sokoban/Makefile
===================================================================
--- games/sokoban/Makefile	(revision 347954)
+++ games/sokoban/Makefile	(working copy)
@@ -3,29 +3,31 @@
 
 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
+NEEDS_ROOT=	yes
+
 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
+	@${CHOWN} root:games ${STAGEDIR}${PREFIX}/bin/sokoban
+	@${CHMOD} 2555 ${STAGEDIR}${PREFIX}/bin/sokoban
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/sokoban
+	@${CHOWN} root:games ${STAGEDIR}${PREFIX}/share/sokoban
+	@dd if=/dev/zero of=${STAGEDIR}${PREFIX}/share/sokoban/scores bs=1 count=2
+	@${CHMOD} 664 ${STAGEDIR}${PREFIX}/share/sokoban/scores
+	@${CHOWN} root:games ${STAGEDIR}${PREFIX}/share/sokoban/scores
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/sokoban/screens
+	@${CHOWN} root:games ${STAGEDIR}${PREFIX}/share/sokoban/screens
+	@${INSTALL_DATA} ${WRKSRC}/screens/* ${STAGEDIR}${PREFIX}/share/sokoban/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: 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-aa
===================================================================
--- games/sokoban/files/patch-aa	(revision 347953)
+++ 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 347953)
+++ 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 347953)
+++ 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: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
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ 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	PREFIX	"/share/sokoban/scores"
++#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: 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/pkg-deinstall
===================================================================
--- games/sokoban/pkg-deinstall	(revision 347953)
+++ 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 347953)
+++ 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 347954)
+++ games/sokoban/pkg-plist	(working copy)
@@ -1,4 +1,5 @@
 bin/sokoban
+share/sokoban/scores
 share/sokoban/screens/sokoban.help
 share/sokoban/screens/screen.1
 share/sokoban/screens/screen.2
@@ -52,4 +53,3 @@
 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
--- sokoban.patch ends here ---


>Release-Note:
>Audit-Trail:

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--
Responsible-Changed-From-To: freebsd-ports-bugs->madpilot 
Responsible-Changed-By: madpilot 
Responsible-Changed-When: Sun Mar 23 12:05:17 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187471 
State-Changed-From-To: open->closed 
State-Changed-By: madpilot 
State-Changed-When: Mon Mar 24 12:53:14 UTC 2014 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187471 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187471: commit references a PR
Date: Mon, 24 Mar 2014 12:53:10 +0000 (UTC)

 Author: madpilot
 Date: Mon Mar 24 12:53:05 2014
 New Revision: 348986
 URL: http://svnweb.freebsd.org/changeset/ports/348986
 QAT: https://qat.redports.org/buildarchive/r348986/
 
 Log:
   - Convert to staging
   - Use DATADIR macro
   - Undeprecate
   - Assign maintainership to submitter
   - General cleanup
   
   PR:		ports/187471
   Submitted by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
 
 Added:
   head/games/sokoban/files/patch-Makefile
      - copied, changed from r348948, head/games/sokoban/files/patch-aa
   head/games/sokoban/files/patch-play.c
      - copied, changed from r348850, head/games/sokoban/files/patch-ac
   head/games/sokoban/files/patch-sokoban.h
      - copied, changed from r348850, head/games/sokoban/files/patch-ab
 Deleted:
   head/games/sokoban/files/patch-aa
   head/games/sokoban/files/patch-ab
   head/games/sokoban/files/patch-ac
   head/games/sokoban/pkg-deinstall
   head/games/sokoban/pkg-install
 Modified:
   head/games/sokoban/Makefile
   head/games/sokoban/pkg-plist
 
 Modified: head/games/sokoban/Makefile
 ==============================================================================
 --- head/games/sokoban/Makefile	Mon Mar 24 12:48:08 2014	(r348985)
 +++ head/games/sokoban/Makefile	Mon Mar 24 12:53:05 2014	(r348986)
 @@ -3,29 +3,21 @@
  
  PORTNAME=		sokoban
  PORTVERSION=		1.0
 +PORTREVISION=		1
  CATEGORIES=		games
  MASTER_SITES=		${MASTER_SITE_SUNSITE}
  MASTER_SITE_SUBDIR=	games/strategy
 -DISTFILES=		${PORTNAME}-src${EXTRACT_SUFX}
 +DISTNAME=		${PORTNAME}-src
  
 -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
  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} ${STAGEDIR}${DATADIR}/screens
 +	@${INSTALL_DATA} ${WRKSRC}/screens/* ${STAGEDIR}${DATADIR}/screens
  
  .include <bsd.port.mk>
 
 Copied and modified: head/games/sokoban/files/patch-Makefile (from r348948, head/games/sokoban/files/patch-aa)
 ==============================================================================
 --- head/games/sokoban/files/patch-aa	Mon Mar 24 12:05:23 2014	(r348948, copy source)
 +++ head/games/sokoban/files/patch-Makefile	Mon Mar 24 12:53:05 2014	(r348986)
 @@ -1,25 +1,17 @@
 -*** 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
 -  
 +--- ./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
 + 
 
 Copied and modified: head/games/sokoban/files/patch-play.c (from r348850, head/games/sokoban/files/patch-ac)
 ==============================================================================
 --- head/games/sokoban/files/patch-ac	Sun Mar 23 10:41:00 2014	(r348850, copy source)
 +++ head/games/sokoban/files/patch-play.c	Mon Mar 24 12:53:05 2014	(r348986)
 @@ -1,19 +1,11 @@
 -*** 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 */
 -  
 +--- ./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 */
 + 
 
 Copied and modified: head/games/sokoban/files/patch-sokoban.h (from r348850, head/games/sokoban/files/patch-ab)
 ==============================================================================
 --- head/games/sokoban/files/patch-ab	Sun Mar 23 10:41:00 2014	(r348850, copy source)
 +++ head/games/sokoban/files/patch-sokoban.h	Mon Mar 24 12:53:05 2014	(r348986)
 @@ -1,30 +1,26 @@
 -*** 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 */
 +--- ./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 */
 + /**/
 
 Modified: head/games/sokoban/pkg-plist
 ==============================================================================
 --- head/games/sokoban/pkg-plist	Mon Mar 24 12:48:08 2014	(r348985)
 +++ head/games/sokoban/pkg-plist	Mon Mar 24 12:53:05 2014	(r348986)
 @@ -1,55 +1,62 @@
 +@group games
 +@mode 2555
  bin/sokoban
 -share/sokoban/screens/sokoban.help
 -share/sokoban/screens/screen.1
 -share/sokoban/screens/screen.2
 -share/sokoban/screens/screen.3
 -share/sokoban/screens/screen.4
 -share/sokoban/screens/screen.5
 -share/sokoban/screens/screen.6
 -share/sokoban/screens/screen.7
 -share/sokoban/screens/screen.8
 -share/sokoban/screens/screen.9
 -share/sokoban/screens/screen.10
 -share/sokoban/screens/screen.11
 -share/sokoban/screens/screen.12
 -share/sokoban/screens/screen.13
 -share/sokoban/screens/screen.14
 -share/sokoban/screens/screen.15
 -share/sokoban/screens/screen.16
 -share/sokoban/screens/screen.17
 -share/sokoban/screens/screen.18
 -share/sokoban/screens/screen.19
 -share/sokoban/screens/screen.20
 -share/sokoban/screens/screen.21
 -share/sokoban/screens/screen.22
 -share/sokoban/screens/screen.23
 -share/sokoban/screens/screen.24
 -share/sokoban/screens/screen.25
 -share/sokoban/screens/screen.26
 -share/sokoban/screens/screen.27
 -share/sokoban/screens/screen.28
 -share/sokoban/screens/screen.29
 -share/sokoban/screens/screen.30
 -share/sokoban/screens/screen.31
 -share/sokoban/screens/screen.32
 -share/sokoban/screens/screen.33
 -share/sokoban/screens/screen.34
 -share/sokoban/screens/screen.35
 -share/sokoban/screens/screen.36
 -share/sokoban/screens/screen.37
 -share/sokoban/screens/screen.38
 -share/sokoban/screens/screen.39
 -share/sokoban/screens/screen.40
 -share/sokoban/screens/screen.41
 -share/sokoban/screens/screen.42
 -share/sokoban/screens/screen.43
 -share/sokoban/screens/screen.44
 -share/sokoban/screens/screen.45
 -share/sokoban/screens/screen.46
 -share/sokoban/screens/screen.47
 -share/sokoban/screens/screen.48
 -share/sokoban/screens/screen.49
 -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
 +@group
 +@mode
 +@exec truncate -s 512B /var/games/sokoban
 +@exec chgrp games /var/games/sokoban
 +@exec chmod 0664 /var/games/sokoban
 +%%DATADIR%%/screens/sokoban.help
 +%%DATADIR%%/screens/screen.1
 +%%DATADIR%%/screens/screen.2
 +%%DATADIR%%/screens/screen.3
 +%%DATADIR%%/screens/screen.4
 +%%DATADIR%%/screens/screen.5
 +%%DATADIR%%/screens/screen.6
 +%%DATADIR%%/screens/screen.7
 +%%DATADIR%%/screens/screen.8
 +%%DATADIR%%/screens/screen.9
 +%%DATADIR%%/screens/screen.10
 +%%DATADIR%%/screens/screen.11
 +%%DATADIR%%/screens/screen.12
 +%%DATADIR%%/screens/screen.13
 +%%DATADIR%%/screens/screen.14
 +%%DATADIR%%/screens/screen.15
 +%%DATADIR%%/screens/screen.16
 +%%DATADIR%%/screens/screen.17
 +%%DATADIR%%/screens/screen.18
 +%%DATADIR%%/screens/screen.19
 +%%DATADIR%%/screens/screen.20
 +%%DATADIR%%/screens/screen.21
 +%%DATADIR%%/screens/screen.22
 +%%DATADIR%%/screens/screen.23
 +%%DATADIR%%/screens/screen.24
 +%%DATADIR%%/screens/screen.25
 +%%DATADIR%%/screens/screen.26
 +%%DATADIR%%/screens/screen.27
 +%%DATADIR%%/screens/screen.28
 +%%DATADIR%%/screens/screen.29
 +%%DATADIR%%/screens/screen.30
 +%%DATADIR%%/screens/screen.31
 +%%DATADIR%%/screens/screen.32
 +%%DATADIR%%/screens/screen.33
 +%%DATADIR%%/screens/screen.34
 +%%DATADIR%%/screens/screen.35
 +%%DATADIR%%/screens/screen.36
 +%%DATADIR%%/screens/screen.37
 +%%DATADIR%%/screens/screen.38
 +%%DATADIR%%/screens/screen.39
 +%%DATADIR%%/screens/screen.40
 +%%DATADIR%%/screens/screen.41
 +%%DATADIR%%/screens/screen.42
 +%%DATADIR%%/screens/screen.43
 +%%DATADIR%%/screens/screen.44
 +%%DATADIR%%/screens/screen.45
 +%%DATADIR%%/screens/screen.46
 +%%DATADIR%%/screens/screen.47
 +%%DATADIR%%/screens/screen.48
 +%%DATADIR%%/screens/screen.49
 +%%DATADIR%%/screens/screen.50
 +@dirrm %%DATADIR%%/screens
 +@dirrm %%DATADIR%%
 +@unexec rm -f /var/games/sokoban
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
