[iortcw] 08/17: Build-depend on ioquake3-server and use its copy of q3arch

Simon McVittie smcv at debian.org
Sun Aug 16 19:35:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository iortcw.

commit f436c30a74c8a63da06598ab824568a567fe76ee
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Aug 2 13:40:56 2015 +0100

    Build-depend on ioquake3-server and use its copy of q3arch
---
 debian/control |   1 +
 debian/q3arch  | 149 ---------------------------------------------------------
 debian/rules   |  10 +---
 3 files changed, 2 insertions(+), 158 deletions(-)

diff --git a/debian/control b/debian/control
index e128cb2..729ce25 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends: debhelper (>= 9),
                dh-systemd,
                dpkg-dev (>= 1.16.1),
                imagemagick,
+               ioquake3-server (>= 1.36+u20150730+dfsg1-1~),
                libcurl4-gnutls-dev,
                libjpeg-dev,
                libopenal-dev,
diff --git a/debian/q3arch b/debian/q3arch
deleted file mode 100755
index 2a4e536..0000000
--- a/debian/q3arch
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/bin/sh
-# Usage: q3arch arch|platform|compat_arch BUILD|HOST
-#
-# Output an architecture or platform name that Quake 3 could use for the
-# build or host CPU architecture or operating system.
-
-set -e
-
-case $1 in
-
-arch|compat_arch|rtcw_file_arch)
-    # In the upstream Makefile the architecture is given by uname -m, with the
-    # following substitutions:
-    #
-    # i.86 -> x86 (used to be i386)
-    # powerpc -> ppc
-    # powerpc64 -> ppc64
-    # axp -> alpha on Linux and FreeBSD (used to be axp)
-    #
-    # However, for most architectures the build system doesn't actually care,
-    # it's just "some other architecture", so we can get away with using the
-    # GNU CPU as-is. i386, ppc and x86_64 are the unusual ones.
-    #
-    # On the other hand, in q_platform.h it all becomes rather more
-    # significant: the engine expects to see one of:
-    #
-    # x86, x86_64, AXP (Windows)
-    # x86, x86_64, ppc64, ppc, s390, s390x, ia64, alpha, sparc, arm, cris,
-    #    hppa, mips, sh (Linux, kFreeBSD)
-    # some subset of the Linux set (Mac OS, *BSD, SunOS, Irix)
-
-    DEB_X_GNU_CPU=`dpkg-architecture -qDEB_$2_GNU_CPU`
-    COMPAT_Q3ARCH=
-    RTCW_FILE_ARCH=
-
-    case ${DEB_X_GNU_CPU} in
-
-    i?86)
-        Q3ARCH=x86
-        COMPAT_Q3ARCH=i386
-        RTCW_FILE_ARCH=i386
-        ;;
-
-    alpha)
-        Q3ARCH=alpha
-	COMPAT_Q3ARCH=axp
-        ;;
-
-    powerpc)
-        Q3ARCH=ppc
-        ;;
-
-    powerpc64)
-        Q3ARCH=ppc64
-        ;;
-
-    mipsel)
-        Q3ARCH=mips
-	;;
-
-    x86_64|s390|s390x|ia64|sparc|hppa|mips|arm)
-        Q3ARCH=${DEB_X_GNU_CPU}
-	;;
-
-    sh4)
-        Q3ARCH=sh
-        ;;
-
-    *)
-        echo "CPU ${DEB_X_GNU_CPU} not supported by Quake 3, might not work" >&2
-        Q3ARCH=${DEB_X_GNU_CPU}
-        ;;
-
-    esac
-
-    case $1 in
-    (arch)
-        echo "DEB_$2_GNU_CPU = ${DEB_X_GNU_CPU}, using Q3 architecture ${Q3ARCH}">&2
-        echo ${Q3ARCH}
-        ;;
-    (compat_arch)
-        if test -n "${COMPAT_ARCH}"; then
-            echo "DEB_$2_GNU_CPU = ${DEB_X_GNU_CPU}, older ioquake3 would use ${COMPAT_ARCH}">&2
-            echo ${COMPAT_ARCH}
-        fi
-        ;;
-    (rtcw_file_arch)
-        if test -n "${RTCW_FILE_ARCH}"; then
-            echo "DEB_$2_GNU_CPU = ${DEB_X_GNU_CPU}, RTCW files use ${RTCW_FILE_ARCH}">&2
-            echo ${RTCW_FILE_ARCH}
-        fi
-        ;;
-    esac
-
-    ;;
-
-platform)
-    # In the upstream Makefile the platform is given by uname, with the
-    # following substitutions:
-    #
-    # anything after _ removed
-    # folded to lower case
-    # / -> _
-    #
-    # This would result in Debian builds being done for linux, gnu_kfreebsd and
-    # gnu.
-    #
-    # However, for most platform names the build system doesn't actually care,
-    # it's just "some other platform", so we can get away with using the
-    # GNU system as-is.
-    #
-    # (For instance, on Debian kFreeBSD buildd, uname says GNU/kFreeBSD whereas
-    # the GNU CPU type is kfreebsd-gnu, but that's not important because the
-    # Makefile doesn't actually do anything different.)
-
-    DEB_X_GNU_SYSTEM=`dpkg-architecture -qDEB_$2_GNU_SYSTEM`
-
-    case ${DEB_X_GNU_SYSTEM} in
-
-    linux-gnu*)
-        # including, but not limited to:
-	# arm-linux-gnueabi (Debian armel: ARM EABI, LE)
-	# arm-linux-gnueabihf (Debian armhf: ARM EABI, LE, hardfloat)
-	# powerpc-linux-gnuspe (Debian powerpcspe: Signal Processing Extension)
-        Q3OS=linux
-        ;;
-
-    *)
-        Q3OS=${DEB_X_GNU_SYSTEM}
-        ;;
-
-    esac
-
-    echo "DEB_$2_GNU_SYSTEM = ${DEB_X_GNU_SYSTEM}, using Q3 platform ${Q3OS}">&2
-    echo ${Q3OS}
-
-    ;;
-
-*)
-    echo "Usage: sh q3arch.sh arch|compat_arch|platform BUILD|HOST" >&2
-    exit 1
-    ;;
-
-esac
-
-# Copyright 2009-2013 Simon McVittie <smcv at debian.org>
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided this notice is preserved.
-# This file is offered as-is, without any warranty.
diff --git a/debian/rules b/debian/rules
index fe84ae7..dc09789 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,11 +5,6 @@ DEB_MAINT_CFLAGS_APPEND := -fsigned-char
 
 include /usr/share/dpkg/default.mk
 
-Q3ARCH             := $(shell $(CURDIR)/debian/q3arch arch     HOST)
-FILE_ARCH          := $(shell $(CURDIR)/debian/q3arch rtcw_file_arch HOST)
-Q3PLATFORM         := $(shell $(CURDIR)/debian/q3arch platform HOST)
-Q3COMPILE_ARCH     := $(shell $(CURDIR)/debian/q3arch arch     BUILD)
-Q3COMPILE_PLATFORM := $(shell $(CURDIR)/debian/q3arch platform BUILD)
 distro             := $(shell lsb_release -is)
 
 %:
@@ -33,10 +28,7 @@ options := \
 	USE_OPENAL_DLOPEN=0 \
 	USE_VOIP=1 \
 	BUILD_GAME_QVM=0 \
-	ARCH=$(Q3ARCH) \
-	PLATFORM=$(Q3PLATFORM) \
-	COMPILE_ARCH=$(Q3COMPILE_ARCH) \
-	COMPILE_PLATFORM=$(Q3COMPILE_PLATFORM) \
+	$(shell /usr/share/ioquake3/q3arch make ${DEB_HOST_GNU_CPU} ${DEB_HOST_GNU_SYSTEM}) \
 	COPYDIR=/usr/lib/rtcw \
 	VERSION=$(DEB_VERSION)/$(distro) \
 	CFLAGS="$(CPPFLAGS) $(CFLAGS)" \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list