Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/iortcw iortcw: Remove hardcoded list of CPU arch...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4a4f8e62289d
branches:  trunk
changeset: 438747:4a4f8e62289d
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Sep 09 11:22:27 2020 +0000

description:
iortcw: Remove hardcoded list of CPU architectures

diffstat:

 games/iortcw/Makefile                                    |   4 +-
 games/iortcw/distinfo                                    |  10 +-
 games/iortcw/patches/patch-MP_Makefile                   |  36 ++++++++++++-
 games/iortcw/patches/patch-MP_code_qcommon_q__platform.h |  41 +++++++++++++--
 games/iortcw/patches/patch-SP_Makefile                   |  36 ++++++++++++-
 games/iortcw/patches/patch-SP_code_qcommon_q__platform.h |  41 +++++++++++++--
 6 files changed, 141 insertions(+), 27 deletions(-)

diffs (232 lines):

diff -r 59aed63d1dec -r 4a4f8e62289d games/iortcw/Makefile
--- a/games/iortcw/Makefile     Wed Sep 09 11:04:42 2020 +0000
+++ b/games/iortcw/Makefile     Wed Sep 09 11:22:27 2020 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2020/08/18 17:57:51 leot Exp $
+# $NetBSD: Makefile,v 1.9 2020/09/09 11:22:27 nia Exp $
 
 DISTNAME=      iortcw-1.51c
-PKGREVISION=   7
+PKGREVISION=   8
 CATEGORIES=    games
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=iortcw/}
 
diff -r 59aed63d1dec -r 4a4f8e62289d games/iortcw/distinfo
--- a/games/iortcw/distinfo     Wed Sep 09 11:04:42 2020 +0000
+++ b/games/iortcw/distinfo     Wed Sep 09 11:22:27 2020 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.1 2019/11/17 17:56:48 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/09/09 11:22:27 nia Exp $
 
 SHA1 (iortcw-1.51c.tar.gz) = a418f9747f3250ad855885368924dead48006909
 RMD160 (iortcw-1.51c.tar.gz) = db33fd67b58b7163864c6b434a86f4cdd58fb308
 SHA512 (iortcw-1.51c.tar.gz) = bed985e00ba117bfe8c5fae20671575af2fa1c2eeaaba9ef69e6b82485d883084138f7f949299cfdad8171b40209d9baf111879acfd01e5eae16859b63ce77c6
 Size (iortcw-1.51c.tar.gz) = 27246236 bytes
-SHA1 (patch-MP_Makefile) = d1e7ab17dac10a923396bfe71c82deac97ffe1af
-SHA1 (patch-MP_code_qcommon_q__platform.h) = 5bd7cb759a1072589401dae7f13517ecf03e111d
-SHA1 (patch-SP_Makefile) = 61da55b573bebc4349cba29aacf31193736e2a9d
-SHA1 (patch-SP_code_qcommon_q__platform.h) = 69308492c4ac5f928ded4359b1a96b09801dabf7
+SHA1 (patch-MP_Makefile) = c3614773c88bbe619a2a049820c0958cbb8ec879
+SHA1 (patch-MP_code_qcommon_q__platform.h) = 70a91097da12aef4737feda2c3e3de1767f1e603
+SHA1 (patch-SP_Makefile) = ec6f37f38454c6112aa7443df4baa75feff11582
+SHA1 (patch-SP_code_qcommon_q__platform.h) = e469aefba31c26bf161a47533c8468b97aabed27
diff -r 59aed63d1dec -r 4a4f8e62289d games/iortcw/patches/patch-MP_Makefile
--- a/games/iortcw/patches/patch-MP_Makefile    Wed Sep 09 11:04:42 2020 +0000
+++ b/games/iortcw/patches/patch-MP_Makefile    Wed Sep 09 11:22:27 2020 +0000
@@ -1,10 +1,40 @@
-$NetBSD: patch-MP_Makefile,v 1.1 2019/11/17 17:56:48 nia Exp $
+$NetBSD: patch-MP_Makefile,v 1.2 2020/09/09 11:22:27 nia Exp $
 
-Always call it x86_64 regardless of operating system.
+Pass through ARCH_STRING properly on *BSD.
 
 --- MP/Makefile.orig   2019-03-16 18:09:48.000000000 +0000
 +++ MP/Makefile
-@@ -761,7 +761,6 @@ ifneq (,$(findstring "$(PLATFORM)", "fre
+@@ -8,8 +8,8 @@ COMPILE_PLATFORM=$(shell uname | sed -e 
+ COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')
+ ARM_VER_CHECK=$(shell uname -m)
+ 
+-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
+ 
+@@ -369,7 +369,7 @@ MKDIR=mkdir -p
+ EXTRA_FILES=
+ CLIENT_EXTRA_FILES=
+ 
+-ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
++ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "bsd" "gnu"))
+   TOOLS_CFLAGS += -DARCH_STRING=\"$(COMPILE_ARCH)\"
+ endif
+ 
+@@ -752,7 +752,8 @@ else # ifdef MINGW
+ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd" "netbsd"))
+ 
+   BASE_CFLAGS = -Wall -fno-strict-aliasing \
+-    -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
++    -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON \
++    -DARCH_STRING=\\\"$(FILE_ARCH)\\\"
+   CLIENT_CFLAGS += $(SDL_CFLAGS)
+ 
+   OPTIMIZEVM = -O3
+@@ -761,7 +762,6 @@ ifneq (,$(findstring "$(PLATFORM)", "fre
    ifeq ($(ARCH),x86_64)
      OPTIMIZEVM = -O3
      OPTIMIZE = $(OPTIMIZEVM) -ffast-math
diff -r 59aed63d1dec -r 4a4f8e62289d games/iortcw/patches/patch-MP_code_qcommon_q__platform.h
--- a/games/iortcw/patches/patch-MP_code_qcommon_q__platform.h  Wed Sep 09 11:04:42 2020 +0000
+++ b/games/iortcw/patches/patch-MP_code_qcommon_q__platform.h  Wed Sep 09 11:22:27 2020 +0000
@@ -1,15 +1,42 @@
-$NetBSD: patch-MP_code_qcommon_q__platform.h,v 1.1 2019/11/17 17:56:48 nia Exp $
+$NetBSD: patch-MP_code_qcommon_q__platform.h,v 1.2 2020/09/09 11:22:27 nia Exp $
 
-Always call it x86_64 regardless of operating system.
+Remove hardcoded list of architectures.
 
 --- MP/code/qcommon/q_platform.h.orig  2019-03-16 18:09:48.000000000 +0000
 +++ MP/code/qcommon/q_platform.h
-@@ -226,7 +226,7 @@ Foundation, Inc., 51 Franklin St, Fifth 
- #elif defined __amd64__
+@@ -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,19 +216,20 @@ 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
+ #define PATH_SEP '/'
+ 
+-#ifdef __i386__
+-#define ARCH_STRING "i386"
+-#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 "amd64"
-+#define ARCH_STRING "x86_64"
- #elif defined __axp__
- #define ARCH_STRING "alpha"
+-#elif defined __axp__
+-#define ARCH_STRING "alpha"
  #endif
+ 
+ #if BYTE_ORDER == BIG_ENDIAN
diff -r 59aed63d1dec -r 4a4f8e62289d games/iortcw/patches/patch-SP_Makefile
--- a/games/iortcw/patches/patch-SP_Makefile    Wed Sep 09 11:04:42 2020 +0000
+++ b/games/iortcw/patches/patch-SP_Makefile    Wed Sep 09 11:22:27 2020 +0000
@@ -1,10 +1,40 @@
-$NetBSD: patch-SP_Makefile,v 1.1 2019/11/17 17:56:48 nia Exp $
+$NetBSD: patch-SP_Makefile,v 1.2 2020/09/09 11:22:27 nia Exp $
 
-Always call it x86_64 regardless of operating system.
+Pass through ARCH_STRING properly on *BSD.
 
 --- SP/Makefile.orig   2019-03-16 18:09:48.000000000 +0000
 +++ SP/Makefile
-@@ -750,7 +750,6 @@ ifneq (,$(findstring "$(PLATFORM)", "fre
+@@ -8,8 +8,8 @@ COMPILE_PLATFORM=$(shell uname | sed -e 
+ COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')
+ ARM_VER_CHECK=$(shell uname -m)
+ 
+-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
+ 
+@@ -358,7 +358,7 @@ MKDIR=mkdir -p
+ EXTRA_FILES=
+ CLIENT_EXTRA_FILES=
+ 
+-ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
++ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "bsd" "gnu"))
+   TOOLS_CFLAGS += -DARCH_STRING=\"$(COMPILE_ARCH)\"
+ endif
+ 
+@@ -741,7 +741,8 @@ else # ifdef MINGW
+ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd" "netbsd"))
+ 
+   BASE_CFLAGS = -Wall -fno-strict-aliasing \
+-    -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
++    -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON \
++    -DARCH_STRING=\\\"$(FILE_ARCH)\\\"
+   CLIENT_CFLAGS += $(SDL_CFLAGS)
+ 
+   OPTIMIZEVM = -O3
+@@ -750,7 +751,6 @@ ifneq (,$(findstring "$(PLATFORM)", "fre
    ifeq ($(ARCH),x86_64)
      OPTIMIZEVM = -O3
      OPTIMIZE = $(OPTIMIZEVM) -ffast-math
diff -r 59aed63d1dec -r 4a4f8e62289d games/iortcw/patches/patch-SP_code_qcommon_q__platform.h
--- a/games/iortcw/patches/patch-SP_code_qcommon_q__platform.h  Wed Sep 09 11:04:42 2020 +0000
+++ b/games/iortcw/patches/patch-SP_code_qcommon_q__platform.h  Wed Sep 09 11:22:27 2020 +0000
@@ -1,15 +1,42 @@
-$NetBSD: patch-SP_code_qcommon_q__platform.h,v 1.1 2019/11/17 17:56:48 nia Exp $
+$NetBSD: patch-SP_code_qcommon_q__platform.h,v 1.2 2020/09/09 11:22:27 nia Exp $
 
-Always call it x86_64 regardless of operating system.
+Remove hardcoded list of architectures.
 
 --- SP/code/qcommon/q_platform.h.orig  2019-03-16 18:09:48.000000000 +0000
 +++ SP/code/qcommon/q_platform.h
-@@ -226,7 +226,7 @@ Foundation, Inc., 51 Franklin St, Fifth 
- #elif defined __amd64__
+@@ -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,19 +216,20 @@ 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
+ #define PATH_SEP '/'
+ 
+-#ifdef __i386__
+-#define ARCH_STRING "i386"
+-#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 "amd64"
-+#define ARCH_STRING "x86_64"
- #elif defined __axp__
- #define ARCH_STRING "alpha"
+-#elif defined __axp__
+-#define ARCH_STRING "alpha"
  #endif
+ 
+ #if BYTE_ORDER == BIG_ENDIAN



Home | Main Index | Thread Index | Old Index