pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/ioquake3



Module Name:    pkgsrc
Committed By:   nia
Date:           Fri May 21 15:01:52 UTC 2021

Modified Files:
        pkgsrc/games/ioquake3: MESSAGE Makefile distinfo
Added Files:
        pkgsrc/games/ioquake3/patches: patch-Makefile
            patch-code_qcommon_q__platform.h patch-code_renderergl1_tr__init.c
            patch-code_renderergl2_tr__init.c
Removed Files:
        pkgsrc/games/ioquake3/patches: patch-aa patch-ac

Log Message:
ioquake3: Add generic multi-arch support, avoid bundled dependencies

Bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/games/ioquake3/MESSAGE
cvs rdiff -u -r1.16 -r1.17 pkgsrc/games/ioquake3/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/games/ioquake3/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/games/ioquake3/patches/patch-Makefile \
    pkgsrc/games/ioquake3/patches/patch-code_qcommon_q__platform.h \
    pkgsrc/games/ioquake3/patches/patch-code_renderergl1_tr__init.c \
    pkgsrc/games/ioquake3/patches/patch-code_renderergl2_tr__init.c
cvs rdiff -u -r1.5 -r0 pkgsrc/games/ioquake3/patches/patch-aa \
    pkgsrc/games/ioquake3/patches/patch-ac

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/ioquake3/MESSAGE
diff -u pkgsrc/games/ioquake3/MESSAGE:1.1.1.1 pkgsrc/games/ioquake3/MESSAGE:1.2
--- pkgsrc/games/ioquake3/MESSAGE:1.1.1.1       Tue Jan 13 00:12:29 2009
+++ pkgsrc/games/ioquake3/MESSAGE       Fri May 21 15:01:51 2021
@@ -1,7 +1,7 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 2009/01/13 00:12:29 jmcneill Exp $
+$NetBSD: MESSAGE,v 1.2 2021/05/21 15:01:51 nia Exp $
 
-To run ioquake3, you must place the file 'pak0.pk3' from your
+To run Quake III Arena, you must place the file 'pak0.pk3' from your
 Quake 3 CD into:
 
  ${LOCALBASE}/lib/ioquake3/baseq3/

Index: pkgsrc/games/ioquake3/Makefile
diff -u pkgsrc/games/ioquake3/Makefile:1.16 pkgsrc/games/ioquake3/Makefile:1.17
--- pkgsrc/games/ioquake3/Makefile:1.16 Wed Apr 21 13:24:41 2021
+++ pkgsrc/games/ioquake3/Makefile      Fri May 21 15:01:51 2021
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2021/04/21 13:24:41 adam Exp $
+# $NetBSD: Makefile,v 1.17 2021/05/21 15:01:51 nia Exp $
 #
 
 DISTNAME=      ioquake3-1.36.20200125
-PKGREVISION=   6
+PKGREVISION=   7
 CATEGORIES=    games
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=ioquake/}
 GITHUB_PROJECT=        ioq3
@@ -13,20 +13,34 @@ HOMEPAGE=   http://www.ioquake3.org/
 COMMENT=       Open source Quake 3 distribution
 LICENSE=       gnu-gpl-v2
 
-USE_TOOLS+=    gmake
+USE_TOOLS+=    gmake pkg-config
 BUILD_TARGET=  release
 INSTALL_TARGET=        copyfiles
 
 MAKE_FLAGS+=   COPYDIR=${DESTDIR}${PREFIX}/lib/ioquake3
+MAKE_FLAGS+=   PKG_CONFIG=${TOOLS_PATH.pkg-config:Q}
+MAKE_FLAGS+=   USE_INTERNAL_JPEG=0
+MAKE_FLAGS+=   USE_INTERNAL_OGG=0
+MAKE_FLAGS+=   USE_INTERNAL_OPUS=0
+MAKE_FLAGS+=   USE_INTERNAL_VORBIS=0
+MAKE_FLAGS+=   USE_INTERNAL_ZLIB=0
 
 .include "../../mk/bsd.prefs.mk"
 
-.if ${OPSYS} == "NetBSD" && ${MACHINE_CPU:U} == "arm"
-QUAKE_ARCH!=   uname -m
-.elif ${OPSYS} == "NetBSD" && ${MACHINE_CPU:U} == "aarch64"
-QUAKE_ARCH=    ${MACHINE_CPU}
+.if !empty(MACHINE_ARCH:M*arm*)
+QUAKE_ARCH=    arm
+.elif !empty(MACHINE_ARCH:M*mips*)
+QUAKE_ARCH=    mips
+.elif !empty(MACHINE_ARCH:M*sh3*)
+QUAKE_ARCH=    sh
 .elif ${MACHINE_ARCH} == "i386"
 QUAKE_ARCH=    x86
+.elif ${MACHINE_ARCH} == "powerpc"
+QUAKE_ARCH=    ppc
+.elif ${MACHINE_ARCH} == "powerpc64"
+QUAKE_ARCH=    ppc64
+.elif ${MACHINE_ARCH} == "sparc64"
+QUAKE_ARCH=    sparc
 .else
 QUAKE_ARCH=    ${MACHINE_ARCH}
 .endif
@@ -50,7 +64,12 @@ post-install:
 .endfor
 
 .include "../../audio/openal-soft/buildlink3.mk"
+.include "../../audio/opusfile/buildlink3.mk"
+.include "../../audio/libvorbis/buildlink3.mk"
 .include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
 .include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../multimedia/libogg/buildlink3.mk"
 .include "../../www/curl/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/games/ioquake3/distinfo
diff -u pkgsrc/games/ioquake3/distinfo:1.9 pkgsrc/games/ioquake3/distinfo:1.10
--- pkgsrc/games/ioquake3/distinfo:1.9  Sun Apr 25 07:51:26 2021
+++ pkgsrc/games/ioquake3/distinfo      Fri May 21 15:01:51 2021
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.9 2021/04/25 07:51:26 mrg Exp $
+$NetBSD: distinfo,v 1.10 2021/05/21 15:01:51 nia Exp $
 
 SHA1 (ioquake3-1.36.20200125-daae32ddfdab2172a628072ed3ff7dd1fc1563fe.tar.gz) = 791bc69ea853ced457134ed4759a76b40cd0e008
 RMD160 (ioquake3-1.36.20200125-daae32ddfdab2172a628072ed3ff7dd1fc1563fe.tar.gz) = 10c18309b358b0b091073f96c3ddaeb7c1535aa5
 SHA512 (ioquake3-1.36.20200125-daae32ddfdab2172a628072ed3ff7dd1fc1563fe.tar.gz) = 
689a0efa6eaf88fcf98616c100df625b77617c55e351455cc25727fea525748855c58e2288f04d86372d392a556f2ef4926e2c808f75e104ac328baa9458c4d1
 Size (ioquake3-1.36.20200125-daae32ddfdab2172a628072ed3ff7dd1fc1563fe.tar.gz) = 7691640 bytes
-SHA1 (patch-aa) = b146df4f36fc7f9e0bfece50bd154c24e507dc2f
-SHA1 (patch-ac) = 93f78831bf301a52d2235a004bab7c1d335f3dc0
+SHA1 (patch-Makefile) = fd04edd2718644694945cae1623ae22035c27d13
+SHA1 (patch-code_qcommon_q__platform.h) = 7845c7ba9431c7a34c5fbfde702cc0b7e1dc66d5
+SHA1 (patch-code_renderergl1_tr__init.c) = a9968c3035d6558ea65ec1bd00afd628a01eab49
+SHA1 (patch-code_renderergl2_tr__init.c) = c38bb445cbb70f35cac4114b46c7172cacc7d44f
 SHA1 (patch-code_tools_lcc_cpp_unix.c) = e80699461d92b9a659c88c0f5d66580ecf237f5f

Added files:

Index: pkgsrc/games/ioquake3/patches/patch-Makefile
diff -u /dev/null pkgsrc/games/ioquake3/patches/patch-Makefile:1.1
--- /dev/null   Fri May 21 15:01:52 2021
+++ pkgsrc/games/ioquake3/patches/patch-Makefile        Fri May 21 15:01:52 2021
@@ -0,0 +1,95 @@
+$NetBSD: patch-Makefile,v 1.1 2021/05/21 15:01:52 nia Exp $
+
+- Add support for NetBSD-style uname.
+- Build client on NetBSD.
+- Pass ARCH_STRING on *BSD so multi-arch support works.
+
+https://github.com/ioquake/ioq3/pull/466
+
+--- Makefile.orig      2019-12-07 13:16:15.000000000 +0000
++++ Makefile
+@@ -6,8 +6,8 @@
+ COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' '[:lower:]' | sed -e 's/\//_/g')
+ COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')
+ 
+-ifeq ($(COMPILE_PLATFORM),sunos)
+-  # Solaris uname and GNU uname differ
++ifneq (,$(findstring "$(COMPILE_PLATFORM)", "sunos" "netbsd"))
++  # Solaris/NetBSD uname and GNU uname differ
+   COMPILE_ARCH=$(shell uname -p | sed -e 's/i.86/x86/')
+ endif
+ 
+@@ -65,6 +65,10 @@ ifeq ($(PLATFORM),mingw64)
+   MINGW=1
+ endif
+ 
++ifeq ($(COMPILE_ARCH),i386)
++  COMPILE_ARCH=x86
++endif
++
+ ifeq ($(COMPILE_ARCH),i86pc)
+   COMPILE_ARCH=x86
+ endif
+@@ -338,7 +342,7 @@ MKDIR=mkdir -p
+ EXTRA_FILES=
+ CLIENT_EXTRA_FILES=
+ 
+-ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
++ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "freebsd" "netbsd" "openbsd" "dragonfly" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
+   TOOLS_CFLAGS += -DARCH_STRING=\"$(COMPILE_ARCH)\"
+ endif
+ 
+@@ -712,7 +716,7 @@ ifeq ($(PLATFORM),freebsd)
+   # flags
+   BASE_CFLAGS = \
+     -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+-    -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
++    -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON -DARCH_STRING=\\\"$(ARCH)\\\"
+   CLIENT_CFLAGS += $(SDL_CFLAGS)
+   HAVE_VM_COMPILED = true
+ 
+@@ -766,7 +770,7 @@ else # ifeq freebsd
+ ifeq ($(PLATFORM),openbsd)
+ 
+   BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+-    -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
++    -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON -DARCH_STRING=\\\"$(ARCH)\\\"
+   CLIENT_CFLAGS += $(SDL_CFLAGS)
+ 
+   OPTIMIZEVM = -O3
+@@ -848,13 +852,32 @@ ifeq ($(PLATFORM),netbsd)
+   SHLIBLDFLAGS=-shared $(LDFLAGS)
+   THREAD_LIBS=-lpthread
+ 
+-  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
++  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
++    -pipe -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\"
++
++  CLIENT_LIBS += $(SDL_LIBS)
++  RENDERER_LIBS = $(SDL_LIBS)
++
++  # optional features/libraries
++  ifeq ($(USE_OPENAL),1)
++    ifeq ($(USE_OPENAL_DLOPEN),1)
++      CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
++    endif
++  endif
++
++  ifeq ($(USE_CURL),1)
++    CLIENT_CFLAGS += $(CURL_CFLAGS)
++    ifeq ($(USE_CURL_DLOPEN),1)
++      CLIENT_LIBS += $(CURL_LIBS)
++    endif
++  endif
+ 
+   ifeq ($(ARCH),x86)
+     HAVE_VM_COMPILED=true
+   endif
+-
+-  BUILD_CLIENT = 0
++  ifeq ($(ARCH),x86_64)
++    HAVE_VM_COMPILED=true
++  endif
+ else # ifeq netbsd
+ 
+ #############################################################################
Index: pkgsrc/games/ioquake3/patches/patch-code_qcommon_q__platform.h
diff -u /dev/null pkgsrc/games/ioquake3/patches/patch-code_qcommon_q__platform.h:1.1
--- /dev/null   Fri May 21 15:01:52 2021
+++ pkgsrc/games/ioquake3/patches/patch-code_qcommon_q__platform.h      Fri May 21 15:01:52 2021
@@ -0,0 +1,28 @@
+$NetBSD: patch-code_qcommon_q__platform.h,v 1.1 2021/05/21 15:01:52 nia Exp $
+
+Remove hardcoded list of BSD archs - implement multi-arch generically
+
+https://github.com/ioquake/ioq3/pull/466
+
+--- code/qcommon/q_platform.h.orig     2019-12-07 13:16:15.000000000 +0000
++++ code/qcommon/q_platform.h
+@@ -221,14 +221,13 @@ Foundation, Inc., 51 Franklin St, Fifth 
+ #define ID_INLINE inline
+ #define PATH_SEP '/'
+ 
+-#ifdef __i386__
+-#define ARCH_STRING "x86"
+-#elif defined __amd64__
++#if !defined(ARCH_STRING)
++# error ARCH_STRING should be defined by the Makefile
++#endif
++
++#if defined __x86_64__
+ #undef idx64
+ #define idx64 1
+-#define ARCH_STRING "x86_64"
+-#elif defined __axp__
+-#define ARCH_STRING "alpha"
+ #endif
+ 
+ #if BYTE_ORDER == BIG_ENDIAN
Index: pkgsrc/games/ioquake3/patches/patch-code_renderergl1_tr__init.c
diff -u /dev/null pkgsrc/games/ioquake3/patches/patch-code_renderergl1_tr__init.c:1.1
--- /dev/null   Fri May 21 15:01:52 2021
+++ pkgsrc/games/ioquake3/patches/patch-code_renderergl1_tr__init.c     Fri May 21 15:01:52 2021
@@ -0,0 +1,24 @@
+$NetBSD: patch-code_renderergl1_tr__init.c,v 1.1 2021/05/21 15:01:52 nia Exp $
+
+Debian Games Team policy seems to be to default to windowed to avoid
+resetting screen geometry, breaking multi-head, etc. r_fullscreen
+is "archived" (saved to the user configuration), so this doesn't
+affect current players.
+
+Most people will want to configure a higher resolution than 640x480
+anyway, at which point it's easy to switch fullscreen on too.
+
+Also set default r_mode to 3 (640x480) in renderergl2, matching
+renderergl1.
+
+--- code/renderergl1/tr_init.c.orig    2019-12-07 13:16:15.000000000 +0000
++++ code/renderergl1/tr_init.c
+@@ -1040,7 +1040,7 @@ void R_Register( void ) 
+       r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH );
+       r_ignorehwgamma = ri.Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH);
+       r_mode = ri.Cvar_Get( "r_mode", "3", CVAR_ARCHIVE | CVAR_LATCH );
+-      r_fullscreen = ri.Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE );
++      r_fullscreen = ri.Cvar_Get( "r_fullscreen", "0", CVAR_ARCHIVE );
+       r_noborder = ri.Cvar_Get("r_noborder", "0", CVAR_ARCHIVE | CVAR_LATCH);
+       r_customwidth = ri.Cvar_Get( "r_customwidth", "1600", CVAR_ARCHIVE | CVAR_LATCH );
+       r_customheight = ri.Cvar_Get( "r_customheight", "1024", CVAR_ARCHIVE | CVAR_LATCH );
Index: pkgsrc/games/ioquake3/patches/patch-code_renderergl2_tr__init.c
diff -u /dev/null pkgsrc/games/ioquake3/patches/patch-code_renderergl2_tr__init.c:1.1
--- /dev/null   Fri May 21 15:01:52 2021
+++ pkgsrc/games/ioquake3/patches/patch-code_renderergl2_tr__init.c     Fri May 21 15:01:52 2021
@@ -0,0 +1,26 @@
+$NetBSD: patch-code_renderergl2_tr__init.c,v 1.1 2021/05/21 15:01:52 nia Exp $
+
+Debian Games Team policy seems to be to default to windowed to avoid
+resetting screen geometry, breaking multi-head, etc. r_fullscreen
+is "archived" (saved to the user configuration), so this doesn't
+affect current players.
+
+Most people will want to configure a higher resolution than 640x480
+anyway, at which point it's easy to switch fullscreen on too.
+
+Also set default r_mode to 3 (640x480) in renderergl2, matching
+renderergl1.
+
+--- code/renderergl2/tr_init.c.orig    2019-12-07 13:16:15.000000000 +0000
++++ code/renderergl2/tr_init.c
+@@ -1203,8 +1203,8 @@ void R_Register( void ) 
+       ri.Cvar_CheckRange( r_ext_multisample, 0, 4, qtrue );
+       r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH );
+       r_ignorehwgamma = ri.Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH);
+-      r_mode = ri.Cvar_Get( "r_mode", "-2", CVAR_ARCHIVE | CVAR_LATCH );
+-      r_fullscreen = ri.Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE );
++      r_mode = ri.Cvar_Get( "r_mode", "3", CVAR_ARCHIVE | CVAR_LATCH );
++      r_fullscreen = ri.Cvar_Get( "r_fullscreen", "0", CVAR_ARCHIVE );
+       r_noborder = ri.Cvar_Get("r_noborder", "0", CVAR_ARCHIVE | CVAR_LATCH);
+       r_customwidth = ri.Cvar_Get( "r_customwidth", "1600", CVAR_ARCHIVE | CVAR_LATCH );
+       r_customheight = ri.Cvar_Get( "r_customheight", "1024", CVAR_ARCHIVE | CVAR_LATCH );



Home | Main Index | Thread Index | Old Index