Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 2014 13:25:02 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r366877 - in head/games/quakeforge: . files
Message-ID:  <201409011325.s81DP2ZK032466@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Mon Sep  1 13:25:01 2014
New Revision: 366877
URL: http://svnweb.freebsd.org/changeset/ports/366877
QAT: https://qat.redports.org/buildarchive/r366877/

Log:
  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)

Added:
  head/games/quakeforge/files/patch-libs-audio-targets-snd_oss.c   (contents, props changed)
Modified:
  head/games/quakeforge/Makefile
  head/games/quakeforge/pkg-plist

Modified: head/games/quakeforge/Makefile
==============================================================================
--- head/games/quakeforge/Makefile	Mon Sep  1 13:10:58 2014	(r366876)
+++ head/games/quakeforge/Makefile	Mon Sep  1 13:25:01 2014	(r366877)
@@ -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=${PREF
 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>

Added: head/games/quakeforge/files/patch-libs-audio-targets-snd_oss.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/quakeforge/files/patch-libs-audio-targets-snd_oss.c	Mon Sep  1 13:25:01 2014	(r366877)
@@ -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

Modified: head/games/quakeforge/pkg-plist
==============================================================================
--- head/games/quakeforge/pkg-plist	Mon Sep  1 13:10:58 2014	(r366876)
+++ head/games/quakeforge/pkg-plist	Mon Sep  1 13:25:01 2014	(r366877)
@@ -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



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