diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2014-09-01 13:25:01 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2014-09-01 13:25:01 +0000 |
commit | eba8dc75796b0f9a2eb2e2d8d8522cf8d97ef5ef (patch) | |
tree | 3d145f72f29c567ba213fce140eeebcfa75af5a2 /games | |
parent | 780f79c128a08d1445174e2eb6fe70d941324f70 (diff) | |
download | freebsd-ports-eba8dc75796b0f9a2eb2e2d8d8522cf8d97ef5ef.zip |
In preparation to update QuakeForge to the latest version, unbreak, stagify,
and clean up the port beforehand:
- Require compiler that supports nested functions
- Do not enable extra compiler optimizations by default; they're known to be
the cause of sporadic build and run-time failures
- Make snd_oss actually work: mmap()ped buffer for the DMAing into /dev/dsp
was set up incorrectly. FreeBSD always requires MAP_SHARED for device
mappings
- Remove vestiges of Tier-2 (sparc64) and dropped (alpha) arch gimmicks
- Define LICENSE (GPLv2), miscellaneous cleanups
- Transfer maintainership to games@ while here as well
Submitted by: kib (sound fix)
Diffstat (limited to 'games')
-rw-r--r-- | games/quakeforge/Makefile | 47 | ||||
-rw-r--r-- | games/quakeforge/files/patch-libs-audio-targets-snd_oss.c | 18 | ||||
-rw-r--r-- | games/quakeforge/pkg-plist | 5 |
3 files changed, 46 insertions, 24 deletions
diff --git a/games/quakeforge/Makefile b/games/quakeforge/Makefile index 744b310ed760..dd1ef383dba1 100644 --- a/games/quakeforge/Makefile +++ b/games/quakeforge/Makefile @@ -1,4 +1,4 @@ -# Created by: darius@dons.net.au +# Created by: Daniel J. O'Connor <darius@dons.net.au> # $FreeBSD$ PORTNAME= quakeforge @@ -11,12 +11,14 @@ DIST_SUBDIR= ${PORTNAME} EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= ports@FreeBSD.org -COMMENT= Cleaned up copy of the GPLd Quake 1 source code +COMMENT= Cleaned up copy of the GPL'ed Quake 1 source code + +LICENSE= GPLv2 + +LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png -NOT_FOR_ARCHS= sparc64 -NOT_FOR_ARCHS_REASON= generated Quake C compiler (qfcc) does not work USE_AUTOTOOLS= libtool -USES= bison gmake tar:bzip2 +USES= bison compiler:nestedfct gmake tar:bzip2 USE_LDCONFIG= yes GNU_CONFIGURE= yes WANT_SDL= yes @@ -28,7 +30,7 @@ CONFIGURE_ARGS+=--with-global-cfg=${PREFIX}/etc/quakeforge.conf \ OPTIONS_DEFINE= CLIENTS OPTIMIZED_CFLAGS SDL SERVERS SKYBOXES VORBIS \ XMMS DOCS -OPTIONS_DEFAULT= CLIENTS OPTIMIZED_CFLAGS SERVERS DOCS +OPTIONS_DEFAULT= CLIENTS SERVERS DOCS CLIENTS_DESC= Clients SDL_DESC= SDL client @@ -37,14 +39,11 @@ SKYBOXES_DESC= Install skyboxes pak VORBIS_DESC= Ogg Vorbis support in clients XMMS_DESC= XMMS support in clients -MAN1= pak.1 qfcc.1 qflight.1 qfvis.1 wad.1 SUB_FILES= pkg-message DATADIR= ${Q1DIR} -NO_STAGE= yes .include "${.CURDIR}/../quake-data/Makefile.include" - .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MCLIENTS} @@ -86,10 +85,7 @@ PLIST_SUB+= CLIENTS="@comment " .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} CFLAGS+= -O3 -funroll-loops -fomit-frame-pointer -fno-common \ - -fexpensive-optimizations -fstrict-aliasing -. if ${ARCH} != "alpha" -CFLAGS+= -ffast-math -. endif + -fexpensive-optimizations -fstrict-aliasing -ffast-math .endif .if ${PORT_OPTIONS:MSERVERS} @@ -107,19 +103,22 @@ PLIST_SUB+= SKYBOXES="" PLIST_SUB+= SKYBOXES="@comment " .endif +post-patch: + @${REINPLACE_CMD} -e 's,\*gzfile,gzfile,' ${WRKSRC}/libs/util/quakeio.c + @${REINPLACE_CMD} -e 's,-no-undefined,& -L${LOCALBASE}/lib,' \ + ${WRKSRC}/libs/image/Makefile.in + post-install: .if ${PORT_OPTIONS:MSKYBOXES} - ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/skyboxes.pak ${DATADIR}/QF -.endif -.if ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR} -. for f in *.txt *.q1 *.q2 *.ico *.gif *.fig *.h CodingStyle - ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR} -. endfor -. for d in config data ideas - ${CP} -R ${WRKSRC}/doc/${d} ${DOCSDIR} -. endfor + ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/skyboxes.pak \ + ${STAGEDIR}${DATADIR}/QF .endif - @${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD} + @${MKDIR} ${STAGEDIR}${DOCSDIR} +.for f in *.txt *.q1 *.q2 *.ico *.gif *.fig *.h CodingStyle + ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${STAGEDIR}${DOCSDIR} +.endfor +.for d in config data ideas + ${CP} -a ${WRKSRC}/doc/${d} ${STAGEDIR}${DOCSDIR} +.endfor .include <bsd.port.mk> diff --git a/games/quakeforge/files/patch-libs-audio-targets-snd_oss.c b/games/quakeforge/files/patch-libs-audio-targets-snd_oss.c new file mode 100644 index 000000000000..4139de031eec --- /dev/null +++ b/games/quakeforge/files/patch-libs-audio-targets-snd_oss.c @@ -0,0 +1,18 @@ +--- libs/audio/targets/snd_oss.c.orig 2004-01-16 02:50:26 UTC ++++ libs/audio/targets/snd_oss.c +@@ -132,12 +132,11 @@ try_open (int rw) + if (snd_device->string[0]) + snd_dev = snd_device->string; + +- if (rw) { ++ if (rw) + omode = O_RDWR; +- mmmode |= PROT_READ; +- mmflags |= MAP_SHARED; +- } + omode |= O_NONBLOCK; ++ mmmode |= PROT_READ; ++ mmflags |= MAP_SHARED; /* device mmapping on FreeBSD requires this */ + + audio_fd = open (snd_dev, omode); + if (audio_fd < 0) { // Failed open, retry up to 3 times diff --git a/games/quakeforge/pkg-plist b/games/quakeforge/pkg-plist index e4c3d3706063..81fde6ebcfe6 100644 --- a/games/quakeforge/pkg-plist +++ b/games/quakeforge/pkg-plist @@ -253,6 +253,11 @@ include/QF/ruamoko/gui/Size.h include/QF/ruamoko/gui/Slider.h include/QF/ruamoko/gui/Text.h include/QF/ruamoko/gui/View.h +man/man1/pak.1.gz +man/man1/qfcc.1.gz +man/man1/qflight.1.gz +man/man1/qfvis.1.gz +man/man1/wad.1.gz %%PORTDOCS%%%%DOCSDIR%%/3dfx.txt %%PORTDOCS%%%%DOCSDIR%%/CodingStyle %%PORTDOCS%%%%DOCSDIR%%/glqnotes.txt |