From f644c9e93c4258bde67b3d6f7bda828a60d318ee Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Sun, 27 Dec 2015 20:15:42 +0000 Subject: [PATCH] - Move highscores and saves to /var/games - Modernize plist - Regenerate patches --- games/xsokoban/Makefile | 15 +-- games/xsokoban/files/patch-Imakefile | 31 +++--- games/xsokoban/files/patch-config.h | 108 +++++++++++---------- games/xsokoban/files/patch-config__local.h | 11 +++ games/xsokoban/files/patch-config_local.h | 19 ---- games/xsokoban/files/patch-externs.h | 26 +++-- games/xsokoban/pkg-message | 3 - games/xsokoban/pkg-plist | 13 +-- 8 files changed, 103 insertions(+), 123 deletions(-) create mode 100644 games/xsokoban/files/patch-config__local.h delete mode 100644 games/xsokoban/files/patch-config_local.h delete mode 100644 games/xsokoban/pkg-message diff --git a/games/xsokoban/Makefile b/games/xsokoban/Makefile index 727b2dab132c..cb1984eb7e98 100644 --- a/games/xsokoban/Makefile +++ b/games/xsokoban/Makefile @@ -3,7 +3,7 @@ PORTNAME= xsokoban PORTVERSION= 3.3c -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MASTER_SITES= http://www.cs.cornell.edu/andru/release/ \ ftp://ftp.pmg.lcs.mit.edu/pub/xsokoban/ @@ -20,14 +20,15 @@ post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/config.h post-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/scores \ - ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/bitmaps/defaults \ - ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/saves \ - ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/screens - @${CHMOD} 777 ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/scores - @${CHMOD} 775 ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/saves + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/screens + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/bitmaps/defaults ${INSTALL_DATA} ${WRKSRC}/screens/* ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/screens ${INSTALL_DATA} ${WRKSRC}/bitmaps/defaults/* \ ${STAGEDIR}${PREFIX}/lib/X11/xsokoban/bitmaps/defaults + @${MKDIR} ${STAGEDIR}/var/games/xsokoban/scores + @${MKDIR} ${STAGEDIR}/var/games/xsokoban/saves +# may be created by xsokoban -c + @${PRINTF} "xs02\0\0" > ${STAGEDIR}/var/games/xsokoban/scores/scores.sample + .include diff --git a/games/xsokoban/files/patch-Imakefile b/games/xsokoban/files/patch-Imakefile index 355fb6bab0aa..e7e04fcbd94e 100644 --- a/games/xsokoban/files/patch-Imakefile +++ b/games/xsokoban/files/patch-Imakefile @@ -1,19 +1,12 @@ -*** Imakefile.orig Wed Aug 28 02:34:41 1996 ---- Imakefile Sat Jan 15 00:00:00 2000 -*************** -*** 1,7 **** - DEFINES= -DNDEBUG -! EXTRA_INCLUDES= -I/usr/local/include - -! SYS_LIBRARIES= -L/usr/local/lib -lXpm $(XLIB) - # -lXpm is only needed if you are using Xpm. - - SRCS= display.c main.c resources.c play.c score.c screen.c \ ---- 1,7 ---- - DEFINES= -DNDEBUG -! EXTRA_INCLUDES= -I$(INCDIR)/X11 - -! SYS_LIBRARIES= -lXpm $(XLIB) - # -lXpm is only needed if you are using Xpm. - - SRCS= display.c main.c resources.c play.c score.c screen.c \ +--- Imakefile.orig 1996-08-27 17:34:41 UTC ++++ Imakefile +@@ -1,7 +1,7 @@ + DEFINES= -DNDEBUG +-EXTRA_INCLUDES= -I/usr/local/include ++EXTRA_INCLUDES= -I$(INCDIR)/X11 + +-SYS_LIBRARIES= -L/usr/local/lib -lXpm $(XLIB) ++SYS_LIBRARIES= -lXpm $(XLIB) + # -lXpm is only needed if you are using Xpm. + + SRCS= display.c main.c resources.c play.c score.c screen.c \ diff --git a/games/xsokoban/files/patch-config.h b/games/xsokoban/files/patch-config.h index 32d94ebae589..357048d9022b 100644 --- a/games/xsokoban/files/patch-config.h +++ b/games/xsokoban/files/patch-config.h @@ -1,53 +1,55 @@ -*** config.h.orig Tue Aug 27 21:41:47 1996 ---- config.h Mon Nov 18 18:25:14 1996 -*************** -*** 30,36 **** - variable in the installed version, but you know best... - */ - #ifndef ROOTDIR -! #define ROOTDIR "." - #endif - - /* ---- 30,36 ---- - variable in the installed version, but you know best... - */ - #ifndef ROOTDIR -! #define ROOTDIR "%%PREFIX%%/lib/X11/xsokoban" - #endif - - /* -*************** -*** 95,101 **** - OWNER: defines the name of the local game owner. - */ - #ifndef OWNER -! #define OWNER "andru" - #endif - - /* ---- 95,101 ---- - OWNER: defines the name of the local game owner. - */ - #ifndef OWNER -! #define OWNER "root" - #endif - - /* -*************** -*** 147,153 **** - */ - - #ifndef WWW -! #define WWW 1 - #endif - - #define DEBUG_SERVER(x) ---- 147,153 ---- - */ - - #ifndef WWW -! #define WWW 0 - #endif - - #define DEBUG_SERVER(x) +--- config.h.orig 1997-07-17 16:27:58 UTC ++++ config.h +@@ -30,7 +30,7 @@ + variable in the installed version, but you know best... + */ + #ifndef ROOTDIR +-#define ROOTDIR "." ++#define ROOTDIR "%%PREFIX%%/lib/X11/xsokoban" + #endif + + /* +@@ -46,7 +46,7 @@ + the name .sav + */ + #ifndef SAVEPATH +-#define SAVEPATH ROOTDIR "/saves" ++#define SAVEPATH "/var/games/xsokoban/saves" + #endif + + /* +@@ -62,14 +62,14 @@ + in the same directory as the score file. + */ + #ifndef LOCKFILE +-#define LOCKFILE ROOTDIR "/scores/lock" ++#define LOCKFILE "/var/games/xsokoban/scores/lock" + #endif + + /* + SCOREFILE: the full pathname of the score file + */ + #ifndef SCOREFILE +-#define SCOREFILE ROOTDIR "/scores/scores" ++#define SCOREFILE "/var/games/xsokoban/scores/scores" + #endif + + /* +@@ -95,7 +95,7 @@ + OWNER: defines the name of the local game owner. + */ + #ifndef OWNER +-#define OWNER "andru" ++#define OWNER "root" + #endif + + /* +@@ -147,7 +147,7 @@ + */ + + #ifndef WWW +-#define WWW 1 ++#define WWW 0 + #endif + + #define DEBUG_SERVER(x) diff --git a/games/xsokoban/files/patch-config__local.h b/games/xsokoban/files/patch-config__local.h new file mode 100644 index 000000000000..f05e64a3641f --- /dev/null +++ b/games/xsokoban/files/patch-config__local.h @@ -0,0 +1,11 @@ +--- config_local.h.orig 1996-10-29 19:44:31 UTC ++++ config_local.h +@@ -61,7 +61,7 @@ + #define LOCALTIME_PROTO 1 + + /* Is there a nl_langinfo() call? */ +-#define HAVE_NL_LANGINFO 1 ++#undef HAVE_NL_LANGINFO + + /* Is there a working */ + #define HAVE_SYS_PARAM_H 1 diff --git a/games/xsokoban/files/patch-config_local.h b/games/xsokoban/files/patch-config_local.h deleted file mode 100644 index 94787997e3ec..000000000000 --- a/games/xsokoban/files/patch-config_local.h +++ /dev/null @@ -1,19 +0,0 @@ -*** config_local.h.orig Sun Apr 16 00:50:16 1995 ---- config_local.h Mon Nov 18 18:33:14 1996 -*************** -*** 61,67 **** - #define LOCALTIME_PROTO 1 - - /* Is there a nl_langinfo() call? */ -! #define HAVE_NL_LANGINFO 1 - - /* Is there a working */ - #define HAVE_SYS_PARAM_H 1 ---- 61,67 ---- - #define LOCALTIME_PROTO 1 - - /* Is there a nl_langinfo() call? */ -! #undef HAVE_NL_LANGINFO - - /* Is there a working */ - #define HAVE_SYS_PARAM_H 1 diff --git a/games/xsokoban/files/patch-externs.h b/games/xsokoban/files/patch-externs.h index b8f11957c8d8..b567033dd6df 100644 --- a/games/xsokoban/files/patch-externs.h +++ b/games/xsokoban/files/patch-externs.h @@ -1,14 +1,12 @@ -*** externs.h.orig Sun Apr 16 07:46:14 1995 ---- externs.h Sat Jan 15 00:00:00 2000 -*************** -*** 5,11 **** ---- 5,13 ---- - #include - #include - #include -+ #ifndef __STDC__ - #include -+ #endif - - #ifdef NEED_NETINET_IN - #include +--- externs.h.orig 1995-04-15 22:46:14 UTC ++++ externs.h +@@ -5,7 +5,9 @@ + #include + #include + #include ++#ifndef __STDC__ + #include ++#endif + + #ifdef NEED_NETINET_IN + #include diff --git a/games/xsokoban/pkg-message b/games/xsokoban/pkg-message deleted file mode 100644 index 9786bd53a2f7..000000000000 --- a/games/xsokoban/pkg-message +++ /dev/null @@ -1,3 +0,0 @@ -First, type: 'xsokoban -c' to make score files. -You must be the superuser 'root', and enter password 'score'. - diff --git a/games/xsokoban/pkg-plist b/games/xsokoban/pkg-plist index d746ac0ac6e8..5888a8f37cd4 100644 --- a/games/xsokoban/pkg-plist +++ b/games/xsokoban/pkg-plist @@ -1,4 +1,4 @@ -bin/xsokoban +@(,games,2555) bin/xsokoban man/man1/xsokoban.1.gz lib/X11/xsokoban/bitmaps/defaults/centerwall.xbm lib/X11/xsokoban/bitmaps/defaults/centerwall.xpm @@ -136,10 +136,7 @@ lib/X11/xsokoban/screens/screen.88 lib/X11/xsokoban/screens/screen.89 lib/X11/xsokoban/screens/screen.9 lib/X11/xsokoban/screens/screen.90 -@unexec rm -f %D/lib/X11/xsokoban/scores/scores 2>/dev/null || true -@dirrm lib/X11/xsokoban/bitmaps/defaults -@dirrm lib/X11/xsokoban/bitmaps -@dirrm lib/X11/xsokoban/saves -@dirrm lib/X11/xsokoban/scores -@dirrm lib/X11/xsokoban/screens -@dirrm lib/X11/xsokoban +@sample(,games,664) /var/games/xsokoban/scores/scores.sample +@dir(,games,775) /var/games/xsokoban/scores +@dir(,games,775) /var/games/xsokoban/saves +@dir /var/games/xsokoban