From owner-svn-ports-head@freebsd.org Wed Apr 5 17:58:39 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A177D30328; Wed, 5 Apr 2017 17:58:39 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8C5ECB3; Wed, 5 Apr 2017 17:58:38 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v35Hwbhd089674; Wed, 5 Apr 2017 17:58:37 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v35Hwbh0089669; Wed, 5 Apr 2017 17:58:37 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201704051758.v35Hwbh0089669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Wed, 5 Apr 2017 17:58:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r437802 - in head/games/quake2lnx: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 17:58:39 -0000 Author: danfe Date: Wed Apr 5 17:58:37 2017 New Revision: 437802 URL: https://svnweb.freebsd.org/changeset/ports/437802 Log: Fix a couple of bugs that prevented `games/quake2lnx' from fully working on amd64 (and likely other 64-bit architectures): - Prototype for `void *qwglGetProcAddress(char *symbol)' was guarded by #ifdef __linux__; this was not a problem on i386, where sizeof(void *) /actual return type/ == sizeof(int) /assumed return type of undeclared function/. On amd64, returned pointer would sometimes get truncated, leading to a program's crash. Mend this by turning `#ifdef __linux__' condition essentially into `#ifndef _WIN32' - Software renderer was typedef'ing PIXEL24 as `unsigned long'; fix it by using `unsigned int' type instead - Remove `-s' from OPTIMIZED_CFLAGS: stripping is taken care of during installation (subject to WITH_DEBUG); also remove optimization flag `-fexpensive-optimizations' as it is not being supported by Clang - While here, fix `version' console command to report correct operating system and architecture names - Employ options helper target to install documentation; add more useful changelogs and drop `quake2.3dfxgl' file (meaningless these days) Added: head/games/quake2lnx/files/patch-src_ref__candygl_qgl.h (contents, props changed) head/games/quake2lnx/files/patch-src_ref__gl_qgl.h (contents, props changed) Modified: head/games/quake2lnx/Makefile head/games/quake2lnx/files/patch-src_linux_rw__x11.c head/games/quake2lnx/pkg-plist Modified: head/games/quake2lnx/Makefile ============================================================================== --- head/games/quake2lnx/Makefile Wed Apr 5 17:55:23 2017 (r437801) +++ head/games/quake2lnx/Makefile Wed Apr 5 17:58:37 2017 (r437802) @@ -3,7 +3,7 @@ PORTNAME= quake2lnx PORTVERSION= 0.16.2 -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= games MASTER_SITES= http://offload1.icculus.org/quake2/files/ DISTNAME= quake2-r${PORTVERSION} @@ -181,7 +181,7 @@ MAKE_ARGS+= HAVE_IPV6=YES .endif .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} -MAKE_ARGS+= OPTIMIZED_CFLAGS="-O3 -s -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations" +MAKE_ARGS+= OPTIMIZED_CFLAGS="-O3 -ffast-math -funroll-loops -fomit-frame-pointer" .endif .if ! ${PORT_OPTIONS:MASM} @@ -201,6 +201,9 @@ post-patch: .SILENT ${REINPLACE_CMD} -e 's|/js|/joy|' ${WRKSRC}/src/linux/joystick.c ${REINPLACE_CMD} -e 's|jpeg_mem_src|local_&|' \ ${WRKSRC}/src/ref_candygl/gl_image.c + ${REINPLACE_CMD} -e '/BUILDSTRING/s|Linux|${OPSYS}|' \ + -e '/CPUSTRING/s|Unknown|${ARCH}|' \ + ${WRKSRC}/src/qcommon/qcommon.h do-install: .for tgt in ${EXE_TARGETS} @@ -224,12 +227,17 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/release/game.so \ ${STAGEDIR}${LIBDIR}/baseq2 .endif + +post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/src/docs/3.*_Changes.txt \ + ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/src/docs/README \ ${STAGEDIR}${DOCSDIR}/README.320 - ${INSTALL_DATA} ${WRKSRC}/src/docs/joystick.txt ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/src/docs/quake2.3dfxgl ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/src/docs/changes.txt \ + ${WRKSRC}/src/docs/joystick.txt \ + ${WRKSRC}/src/docs/readme.txt ${STAGEDIR}${DOCSDIR} .include "${.CURDIR}/../quake2-data/Makefile.include" .include Modified: head/games/quake2lnx/files/patch-src_linux_rw__x11.c ============================================================================== --- head/games/quake2lnx/files/patch-src_linux_rw__x11.c Wed Apr 5 17:55:23 2017 (r437801) +++ head/games/quake2lnx/files/patch-src_linux_rw__x11.c Wed Apr 5 17:58:37 2017 (r437802) @@ -1,5 +1,14 @@ --- src/linux/rw_x11.c.orig Wed Oct 9 03:54:25 2002 +++ src/linux/rw_x11.c Mon Jun 16 23:19:40 2003 +@@ -151,7 +151,7 @@ + int config_notify_height; + + typedef unsigned short PIXEL16; +-typedef unsigned long PIXEL24; ++typedef unsigned int PIXEL24; + #ifdef REDBLUE + static PIXEL16 st2d_8to16table_s[2][256]; + static PIXEL24 st2d_8to24table_s[2][256]; @@ -446,7 +446,7 @@ qboolean OpenJoystick(cvar_t *joy_dev) { int i, err; Added: head/games/quake2lnx/files/patch-src_ref__candygl_qgl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/quake2lnx/files/patch-src_ref__candygl_qgl.h Wed Apr 5 17:58:37 2017 (r437802) @@ -0,0 +1,22 @@ +--- src/ref_candygl/qgl.h.orig 2002-06-17 20:03:07 UTC ++++ src/ref_candygl/qgl.h +@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suit + + #include + +-#ifdef __linux__ ++#ifndef _WIN32 + //#include + #include + #endif +@@ -428,9 +428,7 @@ extern BOOL ( WINAPI * qwglSwapIntervalE + extern BOOL ( WINAPI * qwglGetDeviceGammaRampEXT ) ( unsigned char *pRed, unsigned char *pGreen, unsigned char *pBlue ); + extern BOOL ( WINAPI * qwglSetDeviceGammaRampEXT ) ( const unsigned char *pRed, const unsigned char *pGreen, const unsigned char *pBlue ); + +-#endif +- +-#ifdef __linux__ ++#else + + // local function in dll + extern void *qwglGetProcAddress(char *symbol); Added: head/games/quake2lnx/files/patch-src_ref__gl_qgl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/quake2lnx/files/patch-src_ref__gl_qgl.h Wed Apr 5 17:58:37 2017 (r437802) @@ -0,0 +1,13 @@ +--- src/ref_gl/qgl.h.orig 2004-05-02 19:36:53 UTC ++++ src/ref_gl/qgl.h +@@ -426,9 +426,7 @@ extern BOOL ( WINAPI * qwglSwapIntervalE + extern BOOL ( WINAPI * qwglGetDeviceGammaRampEXT ) ( unsigned char *pRed, unsigned char *pGreen, unsigned char *pBlue ); + extern BOOL ( WINAPI * qwglSetDeviceGammaRampEXT ) ( const unsigned char *pRed, const unsigned char *pGreen, const unsigned char *pBlue ); + +-#endif +- +-#ifdef __linux__ ++#else + + // local function in dll + extern void *qwglGetProcAddress(char *symbol); Modified: head/games/quake2lnx/pkg-plist ============================================================================== --- head/games/quake2lnx/pkg-plist Wed Apr 5 17:55:23 2017 (r437801) +++ head/games/quake2lnx/pkg-plist Wed Apr 5 17:58:37 2017 (r437802) @@ -12,10 +12,17 @@ %%SOFTSDL%%%%LIBDIR%%/ref_softsdl.so %%X11%%%%LIBDIR%%/ref_softx.so @comment === DOCS === +%%PORTDOCS%%%%DOCSDIR%%/3.15_Changes.txt +%%PORTDOCS%%%%DOCSDIR%%/3.16_Changes.txt +%%PORTDOCS%%%%DOCSDIR%%/3.17_Changes.txt +%%PORTDOCS%%%%DOCSDIR%%/3.19_Changes.txt +%%PORTDOCS%%%%DOCSDIR%%/3.20_Changes.txt +%%PORTDOCS%%%%DOCSDIR%%/3.21_Changes.txt %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/README.320 +%%PORTDOCS%%%%DOCSDIR%%/changes.txt %%PORTDOCS%%%%DOCSDIR%%/joystick.txt -%%PORTDOCS%%%%DOCSDIR%%/quake2.3dfxgl +%%PORTDOCS%%%%DOCSDIR%%/readme.txt @comment === DATA === %%QMAX%%%%LIBDIR%%/baseq2/maxpak.pak @comment === CLEANUP ===