svn commit: r364117 - in head/games/mangband: . files
Rusmir Dusko
nemysis at FreeBSD.org
Tue Aug 5 16:18:12 UTC 2014
Author: nemysis
Date: Tue Aug 5 16:18:11 2014
New Revision: 364117
URL: http://svnweb.freebsd.org/changeset/ports/364117
QAT: https://qat.redports.org/buildarchive/r364117/
Log:
- Bump PORTREVISION for LICENSE adding and more
- Change master site
- Add license (GPLv2)
- Support STAGEDIR
- Simplify Option handling
- Add pkg-message, information about usage
- Unmute install executable and cfg
- Use INSTALL_DAT instead of CP
- Recreate patches with make makepatch
- Recreate pkg-plist with make makeplist and proper use permissions
PR: 189907
Submitted by: maintainer, driedfruit <flambard at mangband.org>
Approved by: maintainer
Added:
head/games/mangband/files/patch-client__main-sdl.c (contents, props changed)
head/games/mangband/files/patch-config.h (contents, props changed)
head/games/mangband/files/patch-server__netserver.c (contents, props changed)
head/games/mangband/files/patch-server__save.c (contents, props changed)
head/games/mangband/files/pkg-message.in (contents, props changed)
Deleted:
head/games/mangband/files/patch-aa
head/games/mangband/files/patch-ac
head/games/mangband/files/patch-client_main-sdl.c
head/games/mangband/files/patch-server-netserver.c
Modified:
head/games/mangband/Makefile
head/games/mangband/pkg-plist
Modified: head/games/mangband/Makefile
==============================================================================
--- head/games/mangband/Makefile Tue Aug 5 15:09:43 2014 (r364116)
+++ head/games/mangband/Makefile Tue Aug 5 16:18:11 2014 (r364117)
@@ -3,12 +3,15 @@
PORTNAME= mangband
PORTVERSION= 1.1.2
+PORTREVISION= 1
CATEGORIES= games
-MASTER_SITES= http://www.mangband.org/ http://www.mangband.org/download/
+MASTER_SITES= http://mangband.org/download/
MAINTAINER= flambard at mangband.org
COMMENT= Free online multiplayer real-time roguelike game
+LICENSE= GPLv2
+
ALL_TARGET= mangclient mangband
WRKSRC= ${WRKDIR}/${DISTNAME}/src
GNU_CONFIGURE= yes
@@ -19,54 +22,34 @@ MAKE_ARGS= "DATADIR=${DATADIR}"
OPTIONS_DEFINE= GCU X11 SDL
OPTIONS_DEFAULT= GCU X11 SDL
-GCU_DESC= Display module GCU
+GCU_DESC= Display module GCU (curses)
X11_DESC= Display module X11
SDL_DESC= Display module SDL
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+GCU_CONFIGURE_WITH= gcu
+
+X11_LIB_DEPENDS= libX11.so:${PORTSDIR}/x11/libX11
+X11_CONFIGURE_WITH= x11
+
+SDL_LIB_DEPENDS= libX11.so:${PORTSDIR}/x11/libX11
+SDL_CONFIGURE_WITH= sdl
+
+PORTEXAMPLES= *
-.if ${PORT_OPTIONS:MGCU}
-CONFIGURE_ARGS+= --with-gcu
-.else
-CONFIGURE_ARGS+= --without-gcu
-.endif
-
-.if ${PORT_OPTIONS:MX11}
-LIB_DEPENDS+= libX11.so:${PORTSDIR}/x11/libX11
-CONFIGURE_ARGS+= --with-x11
-.else
-CONFIGURE_ARGS+= --without-x11
-.endif
-
-.if ${PORT_OPTIONS:MSDL}
-LIB_DEPENDS+= libSDL-1.2.so:${PORTSDIR}/devel/sdl12
-CONFIGURE_ARGS+= --with-sdl
-.else
-CONFIGURE_ARGS+= --without-sdl
-.endif
+SUB_FILES= pkg-message
do-install:
- @${INSTALL_PROGRAM} -o root -g games -m 2550 \
- ${WRKSRC}/mangband ${PREFIX}/bin
- @${INSTALL_PROGRAM} ${WRKSRC}/mangclient ${PREFIX}/bin
- @${CP} ${WRKDIR}/${DISTNAME}/mangband.cfg ${PREFIX}/etc
-
- @echo "# FreeBSD Hacks" >> ${PREFIX}/etc/mangband.cfg
- @echo "EDIT_DIR = \"${DATADIR}/edit\"" >> ${PREFIX}/etc/mangband.cfg
- @echo "SAVE_DIR = \"${DATADIR}/save\"" >> ${PREFIX}/etc/mangband.cfg
- @echo "DATA_DIR = \"${DATADIR}/data\"" >> ${PREFIX}/etc/mangband.cfg
-
- @${MKDIR} ${EXAMPLESDIR}
- @echo "[MAngband]" >> ${EXAMPLESDIR}/mangrc
- @echo "LibDir ${DATADIR}" >> ${EXAMPLESDIR}/mangrc
-
- @${MKDIR} ${DATADIR}
- @cd ${WRKSRC}/../lib && ${PAX} -rw * ${DATADIR}
- @${CHMOD} 750 ${DATADIR}/*
- @${CHMOD} 755 ${DATADIR}/user
- @${CHMOD} 755 ${DATADIR}/xtra
- @${CHOWN} -R root:games ${DATADIR}/*
- @${CHOWN} ${SHAREOWN}:${SHAREGRP} ${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/mangband ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/mangclient ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/mangband.cfg ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
+ @echo "# FreeBSD Hacks" >> ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
+ @echo "EDIT_DIR = \"${DATADIR}/edit\"" >> ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
+ @echo "SAVE_DIR = \"${DATADIR}/save\"" >> ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
+ @echo "DATA_DIR = \"${DATADIR}/data\"" >> ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
+ @(cd ${WRKDIR}/${DISTNAME}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
+
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ @echo "[MAngband]" >> ${STAGEDIR}${EXAMPLESDIR}/mangrc
+ @echo "LibDir ${DATADIR}/" >> ${STAGEDIR}${EXAMPLESDIR}/mangrc
.include <bsd.port.mk>
Added: head/games/mangband/files/patch-client__main-sdl.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/mangband/files/patch-client__main-sdl.c Tue Aug 5 16:18:11 2014 (r364117)
@@ -0,0 +1,11 @@
+--- ./client/main-sdl.c.orig 2014-08-05 15:15:31.836673216 +0200
++++ ./client/main-sdl.c 2014-08-05 15:15:31.996665462 +0200
+@@ -1031,7 +1031,7 @@
+ //if (td->cx != -1 && td->cy != -1) {
+ // RedrawChar(td->cx, td->cy);
+ // }
+- if (td->cx == x && td->cy == y) return;
++ if (td->cx == x && td->cy == y) return (0);
+ //if (x == -1 && y == -1) return;
+ if (td->cursor_on)
+ {
Added: head/games/mangband/files/patch-config.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/mangband/files/patch-config.h Tue Aug 5 16:18:11 2014 (r364117)
@@ -0,0 +1,29 @@
+--- ./config.h.orig 2014-08-05 15:15:31.000000000 +0200
++++ ./config.h 2014-08-05 15:17:19.486687132 +0200
+@@ -137,7 +137,7 @@
+ /*
+ * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
+ */
+-/* #define USE_TPOSIX */
++#define USE_TPOSIX
+
+ /*
+ * OPTION: Use the "termio" methods in "main-gcu.c"
+@@ -155,7 +155,7 @@
+ * OPTION: Use the "curs_set()" call in "main-gcu.c".
+ * Hack -- This option will not work on most BSD machines
+ */
+-#if defined(SYS_V) || defined(linux)
++#if defined(SYS_V) || defined(linux) || defined(__FreeBSD__)
+ # define USE_CURS_SET
+ #endif
+
+@@ -570,7 +570,7 @@
+ /*
+ * OPTION: Attempt to prevent all "cheating"
+ */
+-/* #define VERIFY_HONOR */
++#define VERIFY_HONOR
+
+
+ /*
Added: head/games/mangband/files/patch-server__netserver.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/mangband/files/patch-server__netserver.c Tue Aug 5 16:18:11 2014 (r364117)
@@ -0,0 +1,11 @@
+--- ./server/netserver.c.orig 2014-08-05 15:15:31.916658572 +0200
++++ ./server/netserver.c 2014-08-05 15:15:32.006682679 +0200
+@@ -97,7 +97,7 @@
+ (*drain_receive[256])(int ind);
+ int login_in_progress;
+ static int num_logins, num_logouts;
+-static long Id;
++long Id;
+ int NumPlayers;
+
+ int MetaSocket = -1;
Added: head/games/mangband/files/patch-server__save.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/mangband/files/patch-server__save.c Tue Aug 5 16:18:11 2014 (r364117)
@@ -0,0 +1,11 @@
+--- ./server/save.c.orig 2014-08-05 15:15:31.916658572 +0200
++++ ./server/save.c 2014-08-05 15:15:32.016684533 +0200
+@@ -941,7 +941,7 @@
+ #ifdef VERIFY_SAVEFILE
+
+ /* Lock on savefile */
+- strcpy(temp, savefile);
++ strcpy(temp, p_ptr->savefile);
+ strcat(temp, ".lok");
+
+ /* Remove lock file */
Added: head/games/mangband/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/mangband/files/pkg-message.in Tue Aug 5 16:18:11 2014 (r364117)
@@ -0,0 +1,30 @@
+==============================================================================
+
+MAngband has been installed.
+
+The following mangclient directories could be copied to a user-writable
+location:
+
+ %%DATADIR%%/user
+ %%DATADIR%%/xtra
+
+
+To provide a path for those directories ~/.mangrc should be used.
+Please copy example mangrc to your home directory and adjust it
+
+ su user
+
+ cp %%EXAMPLESDIR%%/mangrc ~/.mangrc
+
+You could manually change Permissions with:
+
+ /bin/chmod 644 ~/.mangrc
+
+ exit
+
+To run mangband server as an unpriviliged user, such user must be added
+to the games group. For example:
+
+ pw usermod <user> -G games
+
+==============================================================================
Modified: head/games/mangband/pkg-plist
==============================================================================
--- head/games/mangband/pkg-plist Tue Aug 5 15:09:43 2014 (r364116)
+++ head/games/mangband/pkg-plist Tue Aug 5 16:18:11 2014 (r364117)
@@ -1,7 +1,10 @@
-bin/mangclient
+ at group games
+ at mode 2550
bin/mangband
-etc/mangband.cfg
-%%EXAMPLESDIR%%/mangrc
+ at mode
+ at group
+bin/mangclient
+ at sample %%ETCDIR%%mangband.cfg
%%DATADIR%%/data/scores.raw
%%DATADIR%%/edit/artifact.txt
%%DATADIR%%/edit/ego_item.txt
@@ -33,6 +36,8 @@ etc/mangband.cfg
%%DATADIR%%/text/news.txt
%%DATADIR%%/text/option.txt
%%DATADIR%%/text/version.txt
+ at group games
+ at mode 0660
%%DATADIR%%/user/font-ami.prf
%%DATADIR%%/user/font-ibm.prf
%%DATADIR%%/user/font-sdl.prf
@@ -87,16 +92,17 @@ etc/mangband.cfg
%%DATADIR%%/xtra/font/nethack10x19-10.hex
%%DATADIR%%/xtra/graf/16x16.bmp
%%DATADIR%%/xtra/graf/mask.bmp
- at dirrm %%DATADIR%%/xtra/graf
- at dirrm %%DATADIR%%/xtra/font
+ at mode
+ at group
+dirrm %%DATADIR%%/data
+ at dirrm %%DATADIR%%/edit
+ at dirrm %%DATADIR%%/file
+ at dirrm %%DATADIR%%/help
+ at dirrm %%DATADIR%%/save
+ at dirrm %%DATADIR%%/text
+ at dirrm %%DATADIR%%/user
@dirrm %%DATADIR%%/xtra/Sound
+ at dirrm %%DATADIR%%/xtra/font
+ at dirrm %%DATADIR%%/xtra/graf
@dirrm %%DATADIR%%/xtra
- at dirrm %%DATADIR%%/user
- at dirrm %%DATADIR%%/text
- at dirrm %%DATADIR%%/save
- at dirrm %%DATADIR%%/help
- at dirrm %%DATADIR%%/file
- at dirrm %%DATADIR%%/edit
- at dirrm %%DATADIR%%/data
@dirrm %%DATADIR%%
- at dirrm %%EXAMPLESDIR%%
More information about the svn-ports-all
mailing list