From d9d33446a3eeea32f224ded0ede79683d764a6bb Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 18 Apr 2015 20:44:08 +0000 Subject: Allow building on NetBSD/arm. --- games/ioquake3/Makefile | 12 +++++++++++- games/ioquake3/PLIST | 18 +++++++++--------- games/ioquake3/distinfo | 4 ++-- games/ioquake3/patches/patch-aa | 23 +++++++++++++++++------ 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/games/ioquake3/Makefile b/games/ioquake3/Makefile index 4fb64f58e72..f9d69ef1df4 100644 --- a/games/ioquake3/Makefile +++ b/games/ioquake3/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2012/10/06 11:54:43 asau Exp $ +# $NetBSD: Makefile,v 1.4 2015/04/18 20:44:08 joerg Exp $ # DISTNAME= ioquake3-1.36 @@ -17,6 +17,16 @@ do-install: ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/ioquake3 cd ${WRKSRC} && ${GMAKE} copyfiles COPYDIR=${DESTDIR}${PREFIX}/lib/ioquake3 +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "NetBSD" && ${MACHINE_CPU:U} == "arm" +QUAKE_ARCH!= uname -m +.else +QUAKE_ARCH= ${MACHINE_ARCH} +.endif + +PLIST_SUBST+= QUAKE_ARCH=${QUAKE_ARCH:Q} + .include "../../audio/openal/buildlink3.mk" .include "../../devel/SDL/buildlink3.mk" .include "../../graphics/MesaLib/buildlink3.mk" diff --git a/games/ioquake3/PLIST b/games/ioquake3/PLIST index 161b09df4c2..1f6baab7ef6 100644 --- a/games/ioquake3/PLIST +++ b/games/ioquake3/PLIST @@ -1,9 +1,9 @@ -@comment $NetBSD: PLIST,v 1.2 2009/06/14 17:56:48 joerg Exp $ -lib/ioquake3/baseq3/cgame${MACHINE_ARCH}.so -lib/ioquake3/baseq3/qagame${MACHINE_ARCH}.so -lib/ioquake3/baseq3/ui${MACHINE_ARCH}.so -lib/ioquake3/ioq3ded.${MACHINE_ARCH} -lib/ioquake3/ioquake3.${MACHINE_ARCH} -lib/ioquake3/missionpack/cgame${MACHINE_ARCH}.so -lib/ioquake3/missionpack/qagame${MACHINE_ARCH}.so -lib/ioquake3/missionpack/ui${MACHINE_ARCH}.so +@comment $NetBSD: PLIST,v 1.3 2015/04/18 20:44:08 joerg Exp $ +lib/ioquake3/baseq3/cgame${QUAKE_ARCH}.so +lib/ioquake3/baseq3/qagame${QUAKE_ARCH}.so +lib/ioquake3/baseq3/ui${QUAKE_ARCH}.so +lib/ioquake3/ioq3ded.${QUAKE_ARCH} +lib/ioquake3/ioquake3.${QUAKE_ARCH} +lib/ioquake3/missionpack/cgame${QUAKE_ARCH}.so +lib/ioquake3/missionpack/qagame${QUAKE_ARCH}.so +lib/ioquake3/missionpack/ui${QUAKE_ARCH}.so diff --git a/games/ioquake3/distinfo b/games/ioquake3/distinfo index 1fd0eaf3559..e97df2ea4cb 100644 --- a/games/ioquake3/distinfo +++ b/games/ioquake3/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.4 2013/10/28 23:45:59 joerg Exp $ +$NetBSD: distinfo,v 1.5 2015/04/18 20:44:08 joerg Exp $ SHA1 (ioquake3-1.36.tar.bz2) = 0f92891e2b174253d02f666fd22e147c886089b4 RMD160 (ioquake3-1.36.tar.bz2) = af9f65bbde2fe5531fa371ec6d2023126a523293 Size (ioquake3-1.36.tar.bz2) = 3503058 bytes -SHA1 (patch-aa) = 3f89e248cb2e64657f37ccb4f77b837fc7e7a012 +SHA1 (patch-aa) = 6faee94e1a194b904d1ad72968f0b652ab7d8ec2 SHA1 (patch-ab) = 7808f9c26160ae1931c96fe1bc5e898b69afbde2 SHA1 (patch-ac) = 4631bdda582aa105b661f45e09e0d5eb68713978 SHA1 (patch-ad) = 577ca1c8fab64289d6f91e9e02542094cf7f2800 diff --git a/games/ioquake3/patches/patch-aa b/games/ioquake3/patches/patch-aa index 54c37c0c0d2..40880e97aaa 100644 --- a/games/ioquake3/patches/patch-aa +++ b/games/ioquake3/patches/patch-aa @@ -1,8 +1,17 @@ -$NetBSD: patch-aa,v 1.2 2009/03/23 09:57:37 hasso Exp $ +$NetBSD: patch-aa,v 1.3 2015/04/18 20:44:08 joerg Exp $ ---- code/qcommon/q_platform.h.orig 2009-01-12 19:28:35 +0200 -+++ code/qcommon/q_platform.h 2009-03-23 11:14:03 +0200 -@@ -170,7 +170,7 @@ Foundation, Inc., 51 Franklin St, Fifth +--- code/qcommon/q_platform.h.orig 2009-03-02 17:29:30.000000000 +0000 ++++ code/qcommon/q_platform.h +@@ -163,6 +163,8 @@ Foundation, Inc., 51 Franklin St, Fifth + #define ARCH_STRING "mips" + #elif defined __sh__ + #define ARCH_STRING "sh" ++#elif defined __arm__ ++#define ARCH_STRING "arm" + #endif + + #if __FLOAT_WORD_ORDER == __BIG_ENDIAN +@@ -177,7 +179,7 @@ Foundation, Inc., 51 Franklin St, Fifth //=================================================================== BSD === @@ -11,7 +20,7 @@ $NetBSD: patch-aa,v 1.2 2009/03/23 09:57:37 hasso Exp $ #include #include -@@ -185,6 +185,8 @@ Foundation, Inc., 51 Franklin St, Fifth +@@ -192,6 +194,8 @@ Foundation, Inc., 51 Franklin St, Fifth #define OS_STRING "openbsd" #elif defined(__NetBSD__) #define OS_STRING "netbsd" @@ -20,12 +29,14 @@ $NetBSD: patch-aa,v 1.2 2009/03/23 09:57:37 hasso Exp $ #endif #define ID_INLINE inline -@@ -194,6 +196,8 @@ Foundation, Inc., 51 Franklin St, Fifth +@@ -201,6 +205,10 @@ Foundation, Inc., 51 Franklin St, Fifth #define ARCH_STRING "i386" #elif defined __axp__ #define ARCH_STRING "alpha" +#elif defined __x86_64__ +#define ARCH_STRING "x86_64" ++#elif defined __arm__ ++#define ARCH_STRING "arm" #endif #if BYTE_ORDER == BIG_ENDIAN -- cgit v1.2.3