diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2006-01-27 09:43:45 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2006-01-27 09:43:45 +0000 |
commit | 658a2c88bdce5f4aeb06a8019b57c44917b35009 (patch) | |
tree | 3410d3b02a0171657624ccc5399976b558588b44 /games/aestats | |
parent | - Update to 2.1.2 (diff) |
Add AEstats 5.39, an advanced HTML statistics generator for various games.
WWW: http://www.planetquake.com/aeons/aestats/
Mark this port as for i386 only, since while we build native FreeBSD
executables, we do so not from source code, but from Linux object files
author provides in distfile, with some hacking from our side (see
`fbsd_stub.c' in files/ for details).
Notes
Notes:
svn path=/head/; revision=154577
Diffstat (limited to 'games/aestats')
-rw-r--r-- | games/aestats/Makefile | 52 | ||||
-rw-r--r-- | games/aestats/distinfo | 3 | ||||
-rw-r--r-- | games/aestats/files/fbsd_stub.c | 53 | ||||
-rw-r--r-- | games/aestats/pkg-descr | 18 | ||||
-rw-r--r-- | games/aestats/pkg-plist | 77 |
5 files changed, 203 insertions, 0 deletions
diff --git a/games/aestats/Makefile b/games/aestats/Makefile new file mode 100644 index 000000000000..460bc9693cb9 --- /dev/null +++ b/games/aestats/Makefile @@ -0,0 +1,52 @@ +# New ports collection makefile for: AEstats +# Date created: 27 Jan 2006 +# Whom: Alexey Dokuchaev <danfe@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= aestats +PORTVERSION= 5.39 +CATEGORIES= games +MASTER_SITES= ${MASTER_SITE_LOCAL} http://freebsd.nsu.ru/distfiles/ +MASTER_SITE_SUBDIR= danfe +DISTNAME= ${PORTNAME}-v${PORTVERSION} + +MAINTAINER= danfe@FreeBSD.org +COMMENT= An advanced HTML statistics generator for various games + +ONLY_FOR_ARCHS= i386 + +USE_ZIP= yes + +WRKSRC= ${WRKDIR}/${DISTNAME}/Linux-o +LINUXBINDIR= ${WRKSRC}/../Linux-Bin +MAKEFILE= makefile +MAKE_ARGS= cc=${CC} + +post-extract: .SILENT + ${CP} ${FILESDIR}/fbsd_stub.c ${WRKSRC} + ${REINPLACE_CMD} -e 's,aes.o,& fbsd_stub.o,' ${WRKSRC}/${MAKEFILE} + ${ECHO_CMD} >> ${LINUXBINDIR}/alias-example.txt + ${MV} ${WRKSRC}/../unsupported/system/Unreal-225 ${WRKSRC}/../unrealmod + +# This port is special. Author does not distribute source code, but gives +# us Linux .o files instead. With some hacking, we can build native FreeBSD +# executables from those .o files. Pretty neat, huh? :-) +# +pre-build: + cd ${WRKSRC} && ${CC} ${CFLAGS} -c fbsd_stub.c + ${OBJCOPY} --redefine-sym stdout=__stdoutp ${WRKSRC}/aespages.o + ${OBJCOPY} --redefine-sym stdout=__stdoutp ${WRKSRC}/paessubs.o + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/AEstats ${WRKSRC}/preAEs ${PREFIX}/bin + @${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${LINUXBINDIR}/AEsscore.cfg \ + ${LINUXBINDIR}/AEstats.cfg ${LINUXBINDIR}/banlist.txt ${DATADIR} + ${INSTALL_DATA} ${LINUXBINDIR}/alias-example.txt ${DATADIR}/alias.txt + ${INSTALL_DATA} ${WRKSRC}/../AEstats.txt ${DATADIR} + cd ${WRKSRC}/.. && ${FIND} logs stats unrealmod | \ + ${CPIO} -pdu -R ${SHAREOWN}:${SHAREGRP} ${DATADIR} + +.include <bsd.port.mk> diff --git a/games/aestats/distinfo b/games/aestats/distinfo new file mode 100644 index 000000000000..8aead288e488 --- /dev/null +++ b/games/aestats/distinfo @@ -0,0 +1,3 @@ +MD5 (aestats-v5.39.zip) = 015184dbf6198b95743c7053dbeb4913 +SHA256 (aestats-v5.39.zip) = 03cf29eef0bf844a3e59186a2dabd4d7261499aef1944d60048bb8e1f044f5b0 +SIZE (aestats-v5.39.zip) = 1544503 diff --git a/games/aestats/files/fbsd_stub.c b/games/aestats/files/fbsd_stub.c new file mode 100644 index 000000000000..8ffa6c1d67c8 --- /dev/null +++ b/games/aestats/files/fbsd_stub.c @@ -0,0 +1,53 @@ +#include <sys/param.h> +#include <sys/stat.h> +#include <runetype.h> + +long int +__strtol_internal(__const char *__restrict __nptr, char **__restrict __endptr, + int __base, int __group) +{ + + return (strtol(__nptr, __endptr, __base)); +} + +/* + * This one is special. We cannot simply call stat(2) and be done with it: + * Linux' and FreeBSD's ``struct stat'' have different sizes (88 and 96, + * respectively per my testing here, but YMMV), leading us to core dump + * if we do so. Instead, copy only mtime field from FreeBSD's ``struct + * stat'' into proper place of provided Linux' ``struct stat'' buffer. + */ + +struct __linux_stat { + char pad0[0x40]; + struct timespec __st_mtim; + char pad1[0x10]; +}; + +int +__xstat(int __ver, __const char *__filename, struct __linux_stat *__stat_buf) +{ + struct stat sb; + int err = stat(__filename, &sb); + + if (!err) + __stat_buf->__st_mtim = sb.st_mtimespec; + return (err); +} + +const int *__ctype_tolower; +const int *__ctype_toupper; + +static void __fbsd_prepare(void) __attribute__ ((constructor)); + +static void +__fbsd_prepare(void) +{ +#if __FreeBSD_version > 502118 + __ctype_tolower = _CurrentRuneLocale->__maplower; + __ctype_toupper = _CurrentRuneLocale->__mapupper; +#else + __ctype_tolower = _CurrentRuneLocale->maplower; + __ctype_toupper = _CurrentRuneLocale->mapupper; +#endif +} diff --git a/games/aestats/pkg-descr b/games/aestats/pkg-descr new file mode 100644 index 000000000000..d02f1e60a8a1 --- /dev/null +++ b/games/aestats/pkg-descr @@ -0,0 +1,18 @@ +AEstats reads game log files for just about all shooters, converts them into +platform independent log format (meta log format), and generates meaningful +(and very pretty!) stats and ranking pages in HTML form. Overall features: + + * Split into two executables to make the code more modular (independent + of specific games/mod). This also makes updates quicker and less prone + to new bugs. + * Modules are command line driven, giving you the maximum control of the + the executables, without having to deal with klutzy platform dependent + interfaces. This makes it possible to control the modules via batch + files or scripts. Ideal for automating calls. + * HTML output is eatable by any browser with frames. Since plain HTML + code is generated, any user should be able to view the output. + * Provides an UnrealScript module (aeonsdmmod.u) that will generate + extra log info, since Unreal does not provide any frag obituaries by + default. + +WWW: http://www.planetquake.com/aeons/aestats/ diff --git a/games/aestats/pkg-plist b/games/aestats/pkg-plist new file mode 100644 index 000000000000..e3a7fac41014 --- /dev/null +++ b/games/aestats/pkg-plist @@ -0,0 +1,77 @@ +bin/AEstats +bin/preAEs +%%DATADIR%%/logs/ngUT.log +%%DATADIR%%/logs/ngUT.mlg +@dirrm %%DATADIR%%/logs +%%DATADIR%%/stats/headers/AEstatsBestOfsHead.html +%%DATADIR%%/stats/headers/AEstatsBuddyHead.html +%%DATADIR%%/stats/headers/AEstatsDiffMatrixHead.html +%%DATADIR%%/stats/headers/AEstatsFAQHead.html +%%DATADIR%%/stats/headers/AEstatsGlobalHead.html +%%DATADIR%%/stats/headers/AEstatsHead.html +%%DATADIR%%/stats/headers/AEstatsHelpHead.html +%%DATADIR%%/stats/headers/AEstatsPlayerStatsHead.html +%%DATADIR%%/stats/headers/AEstatsRankingHead.html +%%DATADIR%%/stats/headers/AEstatsRankMatrixHead.html +%%DATADIR%%/stats/headers/AEstatsTeamHead.html +%%DATADIR%%/stats/headers/AEstatsTeamMapHead.html +%%DATADIR%%/stats/headers/background.gif +%%DATADIR%%/stats/headers/foot.gif +%%DATADIR%%/stats/headers/head.gif +%%DATADIR%%/stats/headers/metal.gif +%%DATADIR%%/stats/headers/t.gif +%%DATADIR%%/stats/headers/metalw.gif +@dirrm %%DATADIR%%/stats/headers +%%DATADIR%%/stats/players/headers/background.gif +%%DATADIR%%/stats/players/headers/foot.gif +%%DATADIR%%/stats/players/headers/head.gif +%%DATADIR%%/stats/players/headers/metal.gif +%%DATADIR%%/stats/players/headers/metalw.gif +%%DATADIR%%/stats/players/headers/t.gif +@dirrm %%DATADIR%%/stats/players/headers +%%DATADIR%%/stats/players/AEstatsPlayer0.html +%%DATADIR%%/stats/players/AEstatsPlayer1.html +%%DATADIR%%/stats/players/AEstatsPlayer10.html +%%DATADIR%%/stats/players/AEstatsPlayer11.html +%%DATADIR%%/stats/players/AEstatsPlayer12.html +%%DATADIR%%/stats/players/AEstatsPlayer2.html +%%DATADIR%%/stats/players/AEstatsPlayer3.html +%%DATADIR%%/stats/players/AEstatsPlayer4.html +%%DATADIR%%/stats/players/AEstatsPlayer5.html +%%DATADIR%%/stats/players/AEstatsPlayer6.html +%%DATADIR%%/stats/players/AEstatsPlayer7.html +%%DATADIR%%/stats/players/AEstatsPlayer8.html +%%DATADIR%%/stats/players/AEstatsPlayer9.html +@dirrm %%DATADIR%%/stats/players +%%DATADIR%%/stats/teams/headers/background.gif +%%DATADIR%%/stats/teams/headers/foot.gif +%%DATADIR%%/stats/teams/headers/head.gif +%%DATADIR%%/stats/teams/headers/metal.gif +%%DATADIR%%/stats/teams/headers/metalw.gif +%%DATADIR%%/stats/teams/headers/t.gif +@dirrm %%DATADIR%%/stats/teams/headers +@dirrm %%DATADIR%%/stats/teams +%%DATADIR%%/stats/AEstats.html +%%DATADIR%%/stats/AEstatsBestOfs.html +%%DATADIR%%/stats/AEstatsBuddy.html +%%DATADIR%%/stats/AEstatsDiffMatrix.html +%%DATADIR%%/stats/AEstatsFAQ.html +%%DATADIR%%/stats/AEstatsGlobal.html +%%DATADIR%%/stats/AEstatsHelp.html +%%DATADIR%%/stats/AEstatsRanking.html +%%DATADIR%%/stats/AEstatsRankMatrix.html +%%DATADIR%%/stats/AEstatsTeam.html +%%DATADIR%%/stats/aestats.css +%%DATADIR%%/stats/index.html +@dirrm %%DATADIR%%/stats +%%DATADIR%%/unrealmod/AEonsDM.uc +%%DATADIR%%/unrealmod/AEonsDMmod.int +%%DATADIR%%/unrealmod/AEonsDMmod.u +%%DATADIR%%/unrealmod/Unreal.ini +@dirrm %%DATADIR%%/unrealmod +%%DATADIR%%/AEsscore.cfg +%%DATADIR%%/AEstats.cfg +%%DATADIR%%/AEstats.txt +%%DATADIR%%/alias.txt +%%DATADIR%%/banlist.txt +@dirrm %%DATADIR%% |