1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

- 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@mangband.org>
Approved by:	maintainer
This commit is contained in:
Rusmir Dusko 2014-08-05 16:18:11 +00:00
parent 8af7c17858
commit ca6ac89934
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=364117
7 changed files with 87 additions and 68 deletions

View File

@ -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 <bsd.port.options.mk>
GCU_CONFIGURE_WITH= gcu
.if ${PORT_OPTIONS:MGCU}
CONFIGURE_ARGS+= --with-gcu
.else
CONFIGURE_ARGS+= --without-gcu
.endif
X11_LIB_DEPENDS= libX11.so:${PORTSDIR}/x11/libX11
X11_CONFIGURE_WITH= x11
.if ${PORT_OPTIONS:MX11}
LIB_DEPENDS+= libX11.so:${PORTSDIR}/x11/libX11
CONFIGURE_ARGS+= --with-x11
.else
CONFIGURE_ARGS+= --without-x11
.endif
SDL_LIB_DEPENDS= libX11.so:${PORTSDIR}/x11/libX11
SDL_CONFIGURE_WITH= sdl
.if ${PORT_OPTIONS:MSDL}
LIB_DEPENDS+= libSDL-1.2.so:${PORTSDIR}/devel/sdl12
CONFIGURE_ARGS+= --with-sdl
.else
CONFIGURE_ARGS+= --without-sdl
.endif
PORTEXAMPLES= *
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
${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})
@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}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@echo "[MAngband]" >> ${STAGEDIR}${EXAMPLESDIR}/mangrc
@echo "LibDir ${DATADIR}/" >> ${STAGEDIR}${EXAMPLESDIR}/mangrc
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
--- client/main-sdl.c.orig 2014-02-04 19:51:35.412181886 +0100
+++ client/main-sdl.c 2014-02-04 19:51:50.859119136 +0100
--- ./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);

View File

@ -1,6 +1,6 @@
--- config.h.orig Sun Jan 7 07:21:32 2001
+++ config.h Fri Jan 12 00:04:41 2001
@@ -79,7 +79,7 @@
--- ./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"
*/
@ -9,7 +9,7 @@
/*
* OPTION: Use the "termio" methods in "main-gcu.c"
@@ -107,7 +107,7 @@
@@ -155,7 +155,7 @@
* OPTION: Use the "curs_set()" call in "main-gcu.c".
* Hack -- This option will not work on most BSD machines
*/
@ -18,7 +18,7 @@
# define USE_CURS_SET
#endif
@@ -582,7 +582,7 @@
@@ -570,7 +570,7 @@
/*
* OPTION: Attempt to prevent all "cheating"
*/

View File

@ -1,6 +1,6 @@
--- server/netserver.c.orig 2001-01-02 04:02:10.000000000 +0000
+++ server/netserver.c 2007-11-01 04:27:06.000000000 +0000
@@ -98,7 +98,7 @@
--- ./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;

View File

@ -1,6 +1,6 @@
--- server/save.c.bak Sat May 9 21:38:56 1998
+++ server/save.c Wed Dec 30 13:33:13 1998
@@ -2305,7 +2305,7 @@
--- ./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 */

View File

@ -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
==============================================================================

View File

@ -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
@dirrm %%DATADIR%%/xtra/Sound
@dirrm %%DATADIR%%/xtra
@dirrm %%DATADIR%%/user
@dirrm %%DATADIR%%/text
@dirrm %%DATADIR%%/save
@dirrm %%DATADIR%%/help
@dirrm %%DATADIR%%/file
@mode
@group
dirrm %%DATADIR%%/data
@dirrm %%DATADIR%%/edit
@dirrm %%DATADIR%%/data
@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%%
@dirrm %%EXAMPLESDIR%%