pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/ioquake3 ioquake3: Add generic multi-arch suppor...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/45c4a7227862
branches:  trunk
changeset: 453023:45c4a7227862
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri May 21 15:01:51 2021 +0000

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

Bump PKGREVISION

diffstat:

 games/ioquake3/MESSAGE                                   |   4 +-
 games/ioquake3/Makefile                                  |  33 ++++-
 games/ioquake3/distinfo                                  |   8 +-
 games/ioquake3/patches/patch-Makefile                    |  95 ++++++++++++++++
 games/ioquake3/patches/patch-aa                          |  33 -----
 games/ioquake3/patches/patch-ac                          |  61 ----------
 games/ioquake3/patches/patch-code_qcommon_q__platform.h  |  28 ++++
 games/ioquake3/patches/patch-code_renderergl1_tr__init.c |  24 ++++
 games/ioquake3/patches/patch-code_renderergl2_tr__init.c |  26 ++++
 9 files changed, 206 insertions(+), 106 deletions(-)

diffs (truncated from 389 to 300 lines):

diff -r 9fa2406f900a -r 45c4a7227862 games/ioquake3/MESSAGE
--- a/games/ioquake3/MESSAGE    Fri May 21 13:20:43 2021 +0000
+++ b/games/ioquake3/MESSAGE    Fri May 21 15:01:51 2021 +0000
@@ -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/
diff -r 9fa2406f900a -r 45c4a7227862 games/ioquake3/Makefile
--- a/games/ioquake3/Makefile   Fri May 21 13:20:43 2021 +0000
+++ b/games/ioquake3/Makefile   Fri May 21 15:01:51 2021 +0000
@@ -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 @@
 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 @@
 .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"
diff -r 9fa2406f900a -r 45c4a7227862 games/ioquake3/distinfo
--- a/games/ioquake3/distinfo   Fri May 21 13:20:43 2021 +0000
+++ b/games/ioquake3/distinfo   Fri May 21 15:01:51 2021 +0000
@@ -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
diff -r 9fa2406f900a -r 45c4a7227862 games/ioquake3/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/ioquake3/patches/patch-Makefile     Fri May 21 15:01:51 2021 +0000
@@ -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
+ 
+ #############################################################################
diff -r 9fa2406f900a -r 45c4a7227862 games/ioquake3/patches/patch-aa
--- a/games/ioquake3/patches/patch-aa   Fri May 21 13:20:43 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-$NetBSD: patch-aa,v 1.5 2020/01/25 20:13:49 jmcneill Exp $
-
---- code/qcommon/q_platform.h.orig     2019-12-07 13:16:15.000000000 +0000
-+++ code/qcommon/q_platform.h
-@@ -201,7 +201,7 @@ Foundation, Inc., 51 Franklin St, Fifth 
- 
- //=================================================================== BSD ===
- 
--#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- 
- #include <sys/types.h>
- #include <machine/endian.h>
-@@ -216,6 +216,8 @@ Foundation, Inc., 51 Franklin St, Fifth 
- #define OS_STRING "openbsd"
- #elif defined(__NetBSD__)
- #define OS_STRING "netbsd"
-+#elif defined(__DragonFly__)
-+#define OS_STRING "dragonfly"
- #endif
- 
- #define ID_INLINE inline
-@@ -229,6 +231,10 @@ Foundation, Inc., 51 Franklin St, Fifth 
- #define ARCH_STRING "x86_64"
- #elif defined __axp__
- #define ARCH_STRING "alpha"
-+#elif defined __arm__
-+#define ARCH_STRING "arm"
-+#elif defined __aarch64__
-+#define ARCH_STRING "aarch64"
- #endif
- 
- #if BYTE_ORDER == BIG_ENDIAN
diff -r 9fa2406f900a -r 45c4a7227862 games/ioquake3/patches/patch-ac
--- a/games/ioquake3/patches/patch-ac   Fri May 21 13:20:43 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-$NetBSD: patch-ac,v 1.5 2021/04/25 07:51:26 mrg Exp $
-
---- Makefile.orig      2019-12-07 05:16:15.000000000 -0800
-+++ Makefile   2021-04-24 18:01:14.100897227 -0700
-@@ -11,6 +11,16 @@
-   COMPILE_ARCH=$(shell uname -p | sed -e 's/i.86/x86/')
- endif
- 
-+ifeq ($(COMPILE_PLATFORM),netbsd)
-+  COMPILE_CPU=$(shell uname -p)
-+  ifeq ($(COMPILE_CPU),aarch64)
-+    COMPILE_ARCH=$(COMPILE_CPU)
-+  endif
-+  ifeq ($(COMPILE_CPU),aarch64eb)
-+    COMPILE_ARCH=aarch64
-+  endif
-+endif
-+
- ifndef BUILD_STANDALONE
-   BUILD_STANDALONE =
- endif
-@@ -850,11 +860,38 @@
- 
-   BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
- 
-+  OPTIMIZEVM = -O3
-+  OPTIMIZE = $(OPTIMIZEVM) -ffast-math
-+
-+  ifeq ($(ARCH),x86_64)
-+    HAVE_VM_COMPILED=true
-+  else
-   ifeq ($(ARCH),x86)
-     HAVE_VM_COMPILED=true
-   endif
-+  endif
-+
-+  ifeq ($(USE_CURL),1)
-+    CLIENT_CFLAGS += $(CURL_CFLAGS)
-+    USE_CURL_DLOPEN=0
-+  endif
- 
--  BUILD_CLIENT = 0
-+  CLIENT_LIBS =
-+
-+  CLIENT_LIBS += $(SDL_LIBS)
-+  RENDERER_LIBS = $(SDL_LIBS)
-+
-+  ifeq ($(USE_OPENAL),1)
-+    ifneq ($(USE_OPENAL_DLOPEN),1)
-+      CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
-+    endif
-+  endif
-+
-+  ifeq ($(USE_CURL),1)
-+    ifneq ($(USE_CURL_DLOPEN),1)
-+      CLIENT_LIBS += $(CURL_LIBS)
-+    endif
-+  endif
- else # ifeq netbsd
- 
- #############################################################################
diff -r 9fa2406f900a -r 45c4a7227862 games/ioquake3/patches/patch-code_qcommon_q__platform.h



Home | Main Index | Thread Index | Old Index