aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xonotic
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-12-08 22:09:43 -0600
committerWilliam Pitcock <nenolod@dereferenced.org>2011-12-08 22:09:43 -0600
commitdd751ad27963646ad7c65fb054e5dd46544c2cee (patch)
tree300051446ee595e8d24cf2e599f7e750dff8ae0a /testing/xonotic
parentf1dd1a2cf2485e85e05412aeeb2d1bb236f7ce77 (diff)
downloadaports-dd751ad27963646ad7c65fb054e5dd46544c2cee.tar.bz2
aports-dd751ad27963646ad7c65fb054e5dd46544c2cee.tar.xz
testing/xonotic: new aport
Diffstat (limited to 'testing/xonotic')
-rw-r--r--testing/xonotic/APKBUILD71
-rw-r--r--testing/xonotic/xonotic-moncontrol.patch21
2 files changed, 92 insertions, 0 deletions
diff --git a/testing/xonotic/APKBUILD b/testing/xonotic/APKBUILD
new file mode 100644
index 0000000000..9db369e036
--- /dev/null
+++ b/testing/xonotic/APKBUILD
@@ -0,0 +1,71 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=xonotic
+pkgver=0.5.0
+pkgrel=0
+pkgdesc="game engine for Xonotic (quake1/nexuiz derivative)"
+url="http://www.xonotic.org/"
+arch="all"
+license="GPL"
+depends="xonotic-data"
+depends_dev="sdl-dev mesa-dev jpeg-dev libvorbis-dev libxpm-dev libxxf86dga-dev libxxf86vm-dev libmodplug-dev libpng-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-glx $pkgname-sdl"
+source="http://dl.xonotic.org/xonotic-${pkgver}-source.zip
+ xonotic-moncontrol.patch"
+
+_builddir="$srcdir"/Xonotic
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+
+ # msg "building Xonotic-patched QuakeC compiler"
+ # make -C source/fteqcc CPUOPTIMIZATIONS="${CFLAGS}"
+
+ msg "building dedicated server"
+ make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 sv-release
+
+ msg "building GLX client"
+ make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 cl-release
+
+ msg "building SDL client"
+ make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 sdl-release
+}
+
+package() {
+ cd "$_builddir"
+
+ mkdir -p "$pkgdir"/usr/bin
+ install -Dm755 source/darkplaces/darkplaces-dedicated "$pkgdir"/usr/bin/xonotic-dedicated
+}
+
+sdl() {
+ pkgdesc="$pkgdesc (SDL client)"
+
+ cd "$_builddir"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ install -Dm755 source/darkplaces/darkplaces-sdl "$subpkgdir"/usr/bin/xonotic-sdl
+}
+
+glx() {
+ pkgdesc="$pkgdesc (GLX client)"
+
+ cd "$_builddir"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ install -Dm755 source/darkplaces/darkplaces-glx "$subpkgdir"/usr/bin/xonotic-glx
+}
+
+md5sums="7382f195386b8e51df65e57e6be413e5 xonotic-0.5.0-source.zip
+e7ad5ace0debe34486ff06b4f78b3f27 xonotic-moncontrol.patch"
diff --git a/testing/xonotic/xonotic-moncontrol.patch b/testing/xonotic/xonotic-moncontrol.patch
new file mode 100644
index 0000000000..9d88866893
--- /dev/null
+++ b/testing/xonotic/xonotic-moncontrol.patch
@@ -0,0 +1,21 @@
+--- Xonotic.orig/source/darkplaces/sys_shared.c
++++ Xonotic/source/darkplaces/sys_shared.c
+@@ -50,18 +50,8 @@
+ exit(returnvalue);
+ }
+
+-#if defined(__linux__) || defined(__FreeBSD__)
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-int moncontrol(int);
+-#endif
+-
+ void Sys_AllowProfiling(qboolean enable)
+ {
+-#if defined(__linux__) || defined(__FreeBSD__)
+- moncontrol(enable);
+-#endif
+ }
+
+