From owner-svn-ports-head@FreeBSD.ORG Tue Aug 5 16:18:12 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0D1BFCA for ; Tue, 5 Aug 2014 16:18:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEFFD22D6 for ; Tue, 5 Aug 2014 16:18:12 +0000 (UTC) Received: from nemysis (uid 1324) (envelope-from nemysis@FreeBSD.org) id 55a5 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 05 Aug 2014 16:18:11 +0000 From: Rusmir Dusko Date: Tue, 5 Aug 2014 16:18:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r364117 - in head/games/mangband: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e103c3.55a5.87cc973@svn.freebsd.org> X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 16:18:12 -0000 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 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@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 +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 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 -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 +@group games +@mode 2550 bin/mangband -etc/mangband.cfg -%%EXAMPLESDIR%%/mangrc +@mode +@group +bin/mangclient +@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 +@group games +@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 -@dirrm %%DATADIR%%/xtra/graf -@dirrm %%DATADIR%%/xtra/font +@mode +@group +dirrm %%DATADIR%%/data +@dirrm %%DATADIR%%/edit +@dirrm %%DATADIR%%/file +@dirrm %%DATADIR%%/help +@dirrm %%DATADIR%%/save +@dirrm %%DATADIR%%/text +@dirrm %%DATADIR%%/user @dirrm %%DATADIR%%/xtra/Sound +@dirrm %%DATADIR%%/xtra/font +@dirrm %%DATADIR%%/xtra/graf @dirrm %%DATADIR%%/xtra -@dirrm %%DATADIR%%/user -@dirrm %%DATADIR%%/text -@dirrm %%DATADIR%%/save -@dirrm %%DATADIR%%/help -@dirrm %%DATADIR%%/file -@dirrm %%DATADIR%%/edit -@dirrm %%DATADIR%%/data @dirrm %%DATADIR%% -@dirrm %%EXAMPLESDIR%%