Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2014 23:21:07 +0000 (UTC)
From:      Rusmir Dusko <nemysis@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r349372 - in head/games/crossfire-server: . files
Message-ID:  <201403272321.s2RNL7bk035519@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nemysis
Date: Thu Mar 27 23:21:07 2014
New Revision: 349372
URL: http://svnweb.freebsd.org/changeset/ports/349372
QAT: https://qat.redports.org/buildarchive/r349372/

Log:
  - Bump PORTREVISION for pkg-plist change
  - Use same sources for game and maps (tar.gz)
  - Remove EXTRACR_ONLY
  - Take maintainership
  - Add dependency for textproc/libxslt and textproc/sablotron
  - Use the new format for LIB_DEPENDS
  - Remove DEPRECATED, EXPIRATION_DATE
  - Use uidfix instead of BINOWN
  - USES gmake instead of USE_GMAKE
  - Support STAGEDIR, add CONFIGURE_ARGS=--localstatedir=/var/games
    to work with stage
  - Remove not needed post-extract
  - Add DOCS and Option, remove Makefile* that are not in DOCS installation
  - Change REINPLACE, cosmetical changes and add for perl one
  - Strip libraries
  - Fix the usage of 'perl' to get rid of the implicit lang/perl dependency
  - Fix the usage of 'bash' to get rid of the implicit shells/bash dependency
  - Fix usage, adjust permission for /var/games/crossfire
  - Recreate patches with make makepatch
  - Change pkg-descr
  - Recreate pkg-plist with make makeplist and proper use @group and @mode

Added:
  head/games/crossfire-server/files/patch-common__exp.c   (contents, props changed)
  head/games/crossfire-server/files/patch-common__loader.c   (contents, props changed)
  head/games/crossfire-server/files/patch-common__loader.l   (contents, props changed)
  head/games/crossfire-server/files/patch-include__libproto.h   (contents, props changed)
Deleted:
  head/games/crossfire-server/files/patch-common::exp.c
  head/games/crossfire-server/files/patch-common::loader.l
  head/games/crossfire-server/files/patch-common_loader.c
  head/games/crossfire-server/files/patch-include_libproto.h
Modified:
  head/games/crossfire-server/Makefile
  head/games/crossfire-server/distinfo
  head/games/crossfire-server/pkg-descr
  head/games/crossfire-server/pkg-plist

Modified: head/games/crossfire-server/Makefile
==============================================================================
--- head/games/crossfire-server/Makefile	Thu Mar 27 23:10:12 2014	(r349371)
+++ head/games/crossfire-server/Makefile	Thu Mar 27 23:21:07 2014	(r349372)
@@ -3,59 +3,88 @@
 
 PORTNAME=	crossfire
 PORTVERSION=	1.70.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	games
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 PKGNAMESUFFIX=	-server
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}.maps.tar.bz2
-EXTRACR_ONLY=	${DISTNAME}${EXTRACT_SUFX}
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}.maps${EXTRACT_SUFX}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	nemysis@FreeBSD.org
 COMMENT=	Server for multiplayer graphical arcade and adventure game
 
 BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash
-LIB_DEPENDS=	curl:${PORTSDIR}/ftp/curl \
-		png15:${PORTSDIR}/graphics/png
+RUN_DEPENDS=	xsltproc:${PORTSDIR}/textproc/libxslt
+LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl \
+		libpng15.so:${PORTSDIR}/graphics/png \
+		libsablot.so:${PORTSDIR}/textproc/sablotron
 
 LICENSE=	GPLv2 GPLv3
 LICENSE_COMB=	dual
 
-DEPRECATED=	Unmaintained since 2000
-EXPIRATION_DATE=	2014-04-11
-USES=		perl5
+USES=		gmake perl5 uidfix
 USE_XORG=	ice sm x11 xaw xext xmu xpm xt
 USE_SQLITE=	3
 USE_PYTHON=	yes
-USE_GMAKE=	yes
 USE_AUTOTOOLS=	libtool
-CONFIGURE_ARGS=	--with-check=no
-
-MAN6=		crossfire-config.6 crossfire-server.6 crossloop.6 \
-		crossloop.web.6
+CONFIGURE_ARGS=	--with-check=no --localstatedir=/var/games
 
 CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
 LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
 
-NO_STAGE=	yes
-post-extract:
-	@cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
-		${DISTDIR}/${DISTNAME}.maps.tar.bz2 ${EXTRACT_AFTER_ARGS}
-	@${CHMOD} a+x ${WRKSRC}/utils/install-sh
+PORTDOCS=	*
+
+DOCSRCDIR1=	${WRKSRC}
+DOC_FILES1=	AUTHORS ChangeLog DEVELOPERS NEWS README
+
+DOCSRCDIR2=	${WRKSRC}/doc
+DOCSDIR2=	${DOCSDIR}/doc
+DOC_FILES2=	PlayerStats README RunTimeCommands SurvivalGuide *.doc *.ps \
+		metaserver multigod plugins spellcasters_guide_to_runes
+
+OPTIONS_DEFINE=	DOCS
+
+.include <bsd.port.options.mk>
 
 post-patch:
-	@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
+	@${FIND} ${WRKSRC} -name 'Makefile.in'| ${XARGS} ${REINPLACE_CMD} -e \
 		's|-ldl||g'
-	@${REINPLACE_CMD} -e 's|^#.*/bin/sh|#! ${LOCALBASE}/bin/bash|g ; \
-		 s|-ldl||g ; \
-		 s|python[{].*[}]|${PYTHON_VERSION}|g ; \
+	@${REINPLACE_CMD} -e 's|^#.*/bin/sh|#! ${LOCALBASE}/bin/bash|g; \
+		 s|-ldl||g; \
+		 s|python[{].*[}]|${PYTHON_VERSION}|g; \
 		 s|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e '/<curl\/types.h>/d' ${WRKSRC}/socket/metaserver.c
+	@${REINPLACE_CMD} -e 's| /usr/bin/perl|${LOCALBASE}/bin/perl|' \
+		${WRKSRC}/lib/adm/map_expand.pl
 
 post-install:
-	@${MKDIR} ${DATADIR}/maps
-	cd ${WRKDIR}/maps && ${COPYTREE_SHARE} . ${DATADIR}/maps
-	@${CHOWN} ${BINOWN}:games ${PREFIX}/bin/crossfire-server
-	@${CHMOD} 2755 ${PREFIX}/bin/crossfire-server
-	@${CHGRP} -R games ${PREFIX}/var/crossfire
+.for l in cflogger citylife cfpython cfanim cfnewspaper
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/crossfire/plugins/${l}.so
+.endfor
+
+	@${MKDIR} ${STAGEDIR}${DATADIR}/maps
+	@(cd ${WRKDIR}/maps && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/maps)
+
+	@${FIND} ${STAGEDIR}${PREFIX} -exec ${GREP} -q "#!/usr/bin/perl" {} \; \
+		-exec ${REINPLACE_CMD} -e \
+		's|#!/usr/bin/perl|#!${LOCALBASE}/bin/perl|g' {} \;
+	@${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}/bin/bash|' \
+		${STAGEDIR}${PREFIX}/bin/crossloop.web
+	@${FIND} ${STAGEDIR}${PREFIX} -name "*.bak" -delete
+
+	@${CHMOD} 775 ${STAGEDIR}/var/games/crossfire
+	@${CHMOD} 664 ${STAGEDIR}/var/games/crossfire/*
+.for d in account datafiles maps players template-maps unique-items
+	@${CHMOD} 774 ${STAGEDIR}/var/games/crossfire/${d}
+.endfor
+
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
+	@${FIND} ${WRKSRC}/doc -name 'Makefile*' -delete
+.for d in playbook playbook-html spoiler spoiler-html
+	@(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DOCSDIR2})
+.endfor
+	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2}
+.endif
 
 .include <bsd.port.mk>

Modified: head/games/crossfire-server/distinfo
==============================================================================
--- head/games/crossfire-server/distinfo	Thu Mar 27 23:10:12 2014	(r349371)
+++ head/games/crossfire-server/distinfo	Thu Mar 27 23:21:07 2014	(r349372)
@@ -1,4 +1,4 @@
 SHA256 (crossfire-1.70.0.tar.gz) = f6679aa19f7b041a779d26215a7f0062ab7a1fd96185527c207485e084b4654d
 SIZE (crossfire-1.70.0.tar.gz) = 6626864
-SHA256 (crossfire-1.70.0.maps.tar.bz2) = d75a8a48356db0c0d9a3875b98165f7acaa74a8d6027e696796a899e55ade3f4
-SIZE (crossfire-1.70.0.maps.tar.bz2) = 19500334
+SHA256 (crossfire-1.70.0.maps.tar.gz) = 64b1bccef796fde9559a84b4486cf380710b9db70c2c45a1b0f67adf3d822aa9
+SIZE (crossfire-1.70.0.maps.tar.gz) = 28911538

Added: head/games/crossfire-server/files/patch-common__exp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/crossfire-server/files/patch-common__exp.c	Thu Mar 27 23:21:07 2014	(r349372)
@@ -0,0 +1,11 @@
+--- ./common/exp.c.orig	2012-03-18 07:31:50.000000000 +0100
++++ ./common/exp.c	2014-03-27 18:59:52.047466456 +0100
+@@ -224,7 +224,7 @@
+                 exit(1);
+             }
+ 
+-            tmpexp = atoll(cp);
++            tmpexp = strtoll(cp, (char **)NULL, 10);
+             /* Do some sanity checking - if value is bogus, just exit because
+              * the table otherwise is probably in an inconsistent state
+              */

Added: head/games/crossfire-server/files/patch-common__loader.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/crossfire-server/files/patch-common__loader.c	Thu Mar 27 23:21:07 2014	(r349372)
@@ -0,0 +1,20 @@
+--- ./common/loader.c.orig	2012-03-19 06:14:09.000000000 +0100
++++ ./common/loader.c	2014-03-27 18:59:52.056923524 +0100
+@@ -2898,7 +2898,7 @@
+ 
+ void yyset_out  (FILE * out_str  );
+ 
+-int yyget_leng (void );
++size_t yyget_leng (void );
+ 
+ char *yyget_text (void );
+ 
+@@ -5523,7 +5523,7 @@
+ /** Get the length of the current token.
+  * 
+  */
+-int yyget_leng  (void)
++size_t yyget_leng  (void)
+ {
+         return yyleng;
+ }

Added: head/games/crossfire-server/files/patch-common__loader.l
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/crossfire-server/files/patch-common__loader.l	Thu Mar 27 23:21:07 2014	(r349372)
@@ -0,0 +1,13 @@
+--- ./common/loader.l.orig	2012-03-18 07:31:50.000000000 +0100
++++ ./common/loader.l	2014-03-27 18:59:52.047466456 +0100
+@@ -856,8 +856,8 @@
+ ^maxsp{S}           op->stats.maxsp = IVAL;
+ ^grace{S}           op->stats.grace = IVAL;
+ ^maxgrace{S}        op->stats.maxgrace = IVAL;
+-^exp{S}             op->stats.exp = atoll(yval());
+-^perm_exp{S}        op->perm_exp = atoll(yval());
++^exp{S}             op->stats.exp = strtoll(yval(), (char **)NULL, 10);
++^perm_exp{S}        op->perm_exp = strtoll(yval(), (char **)NULL, 10);
+ ^food{S}            op->stats.food = IVAL;
+ ^dam{S}             op->stats.dam = IVAL;
+ ^wc{S}              op->stats.wc = IVAL;

Added: head/games/crossfire-server/files/patch-include__libproto.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/crossfire-server/files/patch-include__libproto.h	Thu Mar 27 23:21:07 2014	(r349372)
@@ -0,0 +1,11 @@
+--- ./include/libproto.h.orig	2012-03-18 07:31:46.000000000 +0100
++++ ./include/libproto.h	2014-03-27 18:59:52.056923524 +0100
+@@ -441,7 +441,7 @@
+ extern int yyget_lineno(void);
+ extern FILE *yyget_in(void);
+ extern FILE *yyget_out(void);
+-extern int yyget_leng(void);
++extern size_t yyget_leng(void);
+ extern char *yyget_text(void);
+ extern void yyset_lineno(int line_number);
+ extern void yyset_in(FILE *in_str);

Modified: head/games/crossfire-server/pkg-descr
==============================================================================
--- head/games/crossfire-server/pkg-descr	Thu Mar 27 23:10:12 2014	(r349371)
+++ head/games/crossfire-server/pkg-descr	Thu Mar 27 23:21:07 2014	(r349372)
@@ -5,7 +5,7 @@ It has certain flavours from other games
 and Nethack/Moria.
 
 Any number of players can move around in their own window, finding
-and using items and battle monsters.  They can choose to cooperate
-or compete in the same "world".
+and using items and battling monsters, solving quests, etc.
+They can choose to cooperate or compete in the same "world".
 
 WWW: http://crossfire.real-time.com/

Modified: head/games/crossfire-server/pkg-plist
==============================================================================
--- head/games/crossfire-server/pkg-plist	Thu Mar 27 23:10:12 2014	(r349371)
+++ head/games/crossfire-server/pkg-plist	Thu Mar 27 23:21:07 2014	(r349372)
@@ -1,19 +1,23 @@
 bin/crossfire-config
+@group games
+@mode 2755
 bin/crossfire-server
+@mode
+@group
 bin/crossloop
 bin/crossloop.pl
 bin/crossloop.web
 bin/player_dl.pl
-etc/crossfire/ban_file
-etc/crossfire/dm_file
-etc/crossfire/exp_table
-etc/crossfire/forbid
-etc/crossfire/metaserver2
-etc/crossfire/motd
-etc/crossfire/news
-etc/crossfire/rules
-etc/crossfire/settings
-etc/crossfire/stat_bonus
+%%ETCDIR%%/ban_file
+%%ETCDIR%%/dm_file
+%%ETCDIR%%/exp_table
+%%ETCDIR%%/forbid
+%%ETCDIR%%/metaserver2
+%%ETCDIR%%/motd
+%%ETCDIR%%/news
+%%ETCDIR%%/rules
+%%ETCDIR%%/settings
+%%ETCDIR%%/stat_bonus
 lib/crossfire/plugins/cfanim.a
 lib/crossfire/plugins/cfanim.la
 lib/crossfire/plugins/cfanim.so
@@ -33,6 +37,10 @@ libexec/crossfire/add_throw.perl
 libexec/crossfire/metaserver.pl
 libexec/crossfire/mktable.script
 libexec/crossfire/random_map
+man/man6/crossfire-config.6.gz
+man/man6/crossfire-server.6.gz
+man/man6/crossloop.6.gz
+man/man6/crossloop.web.6.gz
 %%DATADIR%%/adm/archsearch.pl
 %%DATADIR%%/adm/collect_images.pl
 %%DATADIR%%/adm/map_expand.pl
@@ -516,6 +524,7 @@ libexec/crossfire/random_map
 %%DATADIR%%/maps/darcap/cave/level2
 %%DATADIR%%/maps/darcap/cave/level3
 %%DATADIR%%/maps/darcap/cave/level4
+%%DATADIR%%/maps/darcap/darcap.quests
 %%DATADIR%%/maps/darcap/darcap/airhouse
 %%DATADIR%%/maps/darcap/darcap/apartment
 %%DATADIR%%/maps/darcap/darcap/bob.msg
@@ -622,7 +631,6 @@ libexec/crossfire/random_map
 %%DATADIR%%/maps/darcap/darcap/thilgar
 %%DATADIR%%/maps/darcap/darcap/thilgar_top
 %%DATADIR%%/maps/darcap/darcap/waterhouse
-%%DATADIR%%/maps/darcap/darcap.quests
 %%DATADIR%%/maps/darcap/house1
 %%DATADIR%%/maps/darcap/lynn/castle1.0
 %%DATADIR%%/maps/darcap/lynn/castle1.1
@@ -3197,6 +3205,7 @@ libexec/crossfire/random_map
 %%DATADIR%%/maps/wolfsburg/volcano/vvmansion
 %%DATADIR%%/maps/wolfsburg/ware1
 %%DATADIR%%/maps/wolfsburg/wolfsburg.quests
+%%DATADIR%%/maps/world.quests
 %%DATADIR%%/maps/world/world_100_100
 %%DATADIR%%/maps/world/world_100_101
 %%DATADIR%%/maps/world/world_100_102
@@ -4097,7 +4106,6 @@ libexec/crossfire/random_map
 %%DATADIR%%/maps/world/world_129_127
 %%DATADIR%%/maps/world/world_129_128
 %%DATADIR%%/maps/world/world_129_129
-%%DATADIR%%/maps/world.quests
 %%DATADIR%%/materials
 %%DATADIR%%/messages
 %%DATADIR%%/races
@@ -4152,12 +4160,19 @@ libexec/crossfire/random_map
 %%DATADIR%%/wizhelp/wizcast
 %%DATADIR%%/wizhelp/wizhelp
 %%DATADIR%%/wizhelp/wizpass
-var/crossfire/banish_file
-var/crossfire/bookarch
-var/crossfire/clockdata
-var/crossfire/highscore
-var/crossfire/temp.maps
-@dirrm %%DATADIR%%/wizhelp
+/var/games/crossfire/banish_file
+/var/games/crossfire/bookarch
+/var/games/crossfire/clockdata
+/var/games/crossfire/highscore
+/var/games/crossfire/temp.maps
+@unexec rmdir >/dev/null 2>&1 /var/games/crossfire/unique-items || :
+@unexec rmdir >/dev/null 2>&1 /var/games/crossfire/template-maps || :
+@unexec rmdir >/dev/null 2>&1 /var/games/crossfire/players || :
+@unexec rmdir >/dev/null 2>&1 /var/games/crossfire/maps || :
+@unexec rmdir >/dev/null 2>&1 /var/games/crossfire/datafiles || :
+@unexec rmdir >/dev/null 2>&1 /var/games/crossfire/account || :
+@unexec rmdir >/dev/null 2>&1 /var/games/crossfire || :
+@dirrmtry %%DATADIR%%/wizhelp
 @dirrm %%DATADIR%%/maps/world
 @dirrm %%DATADIR%%/maps/wolfsburg/volcano
 @dirrm %%DATADIR%%/maps/wolfsburg/tt
@@ -4533,18 +4548,4 @@ var/crossfire/temp.maps
 @dirrm libexec/crossfire
 @dirrm lib/crossfire/plugins
 @dirrm lib/crossfire
-@dirrm etc/crossfire
-@exec mkdir -p %D/var/crossfire/account
-@exec mkdir -p %D/var/crossfire/datafiles
-@exec mkdir -p %D/var/crossfire/maps
-@exec mkdir -p %D/var/crossfire/players
-@exec mkdir -p %D/var/crossfire/template-maps
-@exec mkdir -p %D/var/crossfire/unique-items
-@dirrmtry var/crossfire/unique-items
-@dirrmtry var/crossfire/template-maps
-@dirrmtry var/crossfire/players
-@dirrmtry var/crossfire/maps
-@dirrmtry var/crossfire/datafiles
-@dirrmtry var/crossfire/account
-@dirrmtry var/crossfire
-@dirrmtry var
+@dirrm %%ETCDIR%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403272321.s2RNL7bk035519>