summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-10-01 12:32:26 +0000
committernia <nia@pkgsrc.org>2019-10-01 12:32:26 +0000
commit082c055cdb2184234e422af20a24b7018b5a4c9e (patch)
tree2afbffc33338f99081f5501dba11acf4163ec2d2
parentb426641af6a9d0b4061e44e969b577bdce7c19cc (diff)
downloadpkgsrc-082c055cdb2184234e422af20a24b7018b5a4c9e.tar.gz
Add games/xonotic. Based on work by Charlotte Koch in pkgsrc-wip.
Xonotic is an addictive, arena-style first person shooter with crisp movement and a wide array of weapons. It combines intuitive mechanics with in-your-face action to elevate your heart rate. Xonotic is and will always be free-to-play.
-rw-r--r--games/xonotic/DESCR4
-rw-r--r--games/xonotic/Makefile49
-rw-r--r--games/xonotic/PLIST24
-rw-r--r--games/xonotic/distinfo12
-rw-r--r--games/xonotic/files/xonotic.desktop9
-rw-r--r--games/xonotic/patches/patch-Makefile24
-rw-r--r--games/xonotic/patches/patch-source_darkplaces_hmac.c15
-rw-r--r--games/xonotic/patches/patch-source_darkplaces_hmac.h24
-rw-r--r--games/xonotic/patches/patch-source_darkplaces_makefile.inc15
-rw-r--r--games/xonotic/patches/patch-source_gmqcc_Makefile15
-rw-r--r--games/xonotic/patches/patch-source_gmqcc_gmqcc.h15
11 files changed, 206 insertions, 0 deletions
diff --git a/games/xonotic/DESCR b/games/xonotic/DESCR
new file mode 100644
index 00000000000..05bad0fef98
--- /dev/null
+++ b/games/xonotic/DESCR
@@ -0,0 +1,4 @@
+Xonotic is an addictive, arena-style first person shooter with crisp
+movement and a wide array of weapons. It combines intuitive mechanics with
+in-your-face action to elevate your heart rate. Xonotic is and will always
+be free-to-play.
diff --git a/games/xonotic/Makefile b/games/xonotic/Makefile
new file mode 100644
index 00000000000..5179882bc77
--- /dev/null
+++ b/games/xonotic/Makefile
@@ -0,0 +1,49 @@
+# $NetBSD: Makefile,v 1.1 2019/10/01 12:32:26 nia Exp $
+
+DISTNAME= xonotic-0.8.2
+CATEGORIES= games
+MASTER_SITES= https://dl.xonotic.org/
+EXTRACT_SUFX= .zip
+
+MAINTAINER= cfkoch@edgebsd.org
+HOMEPAGE= https://xonotic.org/
+COMMENT= Fast arena-style FPS
+LICENSE= gnu-gpl-v2
+
+USE_TOOLS+= gmake gsed 7za
+USE_LANGUAGES= c c++11
+
+# C++11
+GCC_REQD+= 4.7
+
+WRKSRC= ${WRKDIR}/Xonotic
+BUILD_TARGET= all-zip-source
+INSTALL_TARGET= install-data-zip-source install-engine-zip-source install-links
+INSTALL_ENV+= LIBDIR=${PREFIX}/share/xonotic
+
+ICON_SIZES= 16 24 32 64 128 256 512
+
+INSTALLATION_DIRS+= share/applications
+.for s in ${ICON_SIZES}
+INSTALLATION_DIRS+= share/icons/hicolor/${s}x${s}/apps
+.endfor
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/xonotic.desktop \
+ ${DESTDIR}${PREFIX}/share/applications
+.for s in ${ICON_SIZES}
+ ${INSTALL_DATA} ${WRKSRC}/misc/logos/icons_png/xonotic_${s}.png \
+ ${DESTDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/xonotic.png
+.endfor
+
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/gmp/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXpm/buildlink3.mk"
+.include "../../x11/libXxf86vm/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/games/xonotic/PLIST b/games/xonotic/PLIST
new file mode 100644
index 00000000000..d110ff76efd
--- /dev/null
+++ b/games/xonotic/PLIST
@@ -0,0 +1,24 @@
+@comment $NetBSD: PLIST,v 1.1 2019/10/01 12:32:26 nia Exp $
+bin/xonotic-dedicated
+bin/xonotic-glx
+bin/xonotic-sdl
+share/applications/xonotic.desktop
+share/icons/hicolor/128x128/apps/xonotic.png
+share/icons/hicolor/16x16/apps/xonotic.png
+share/icons/hicolor/24x24/apps/xonotic.png
+share/icons/hicolor/256x256/apps/xonotic.png
+share/icons/hicolor/32x32/apps/xonotic.png
+share/icons/hicolor/512x512/apps/xonotic.png
+share/icons/hicolor/64x64/apps/xonotic.png
+share/xonotic/data/font-unifont-20170401.pk3
+share/xonotic/data/font-xolonium-20170401.pk3
+share/xonotic/data/xonotic-20170401-data.pk3
+share/xonotic/data/xonotic-20170401-maps.pk3
+share/xonotic/data/xonotic-20170401-music.pk3
+share/xonotic/data/xonotic-20170401-nexcompat.pk3
+share/xonotic/xonotic-linux-dedicated.sh
+share/xonotic/xonotic-linux-glx.sh
+share/xonotic/xonotic-linux-sdl.sh
+share/xonotic/xonotic-linux32-dedicated
+share/xonotic/xonotic-linux32-glx
+share/xonotic/xonotic-linux32-sdl
diff --git a/games/xonotic/distinfo b/games/xonotic/distinfo
new file mode 100644
index 00000000000..b4f409a9bee
--- /dev/null
+++ b/games/xonotic/distinfo
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.1 2019/10/01 12:32:26 nia Exp $
+
+SHA1 (xonotic-0.8.2.zip) = 9a1726e3d0d4e5e23c1e799734397c63e5df6ec9
+RMD160 (xonotic-0.8.2.zip) = d57c9e0fd6f1a4325410d87af4b0109351e6ae30
+SHA512 (xonotic-0.8.2.zip) = 0787fcf326827ae0292e5917c7ff2c7fd79947209d4b62e7f83b8b828bec15b575da304e0631f9f163c9b0bd93bed13616e142398ff08cbdaaea890a939dfca5
+Size (xonotic-0.8.2.zip) = 991045679 bytes
+SHA1 (patch-Makefile) = 6c667df4048fd2cbec1c5c8cccb9d525390358ab
+SHA1 (patch-source_darkplaces_hmac.c) = 58f6da84843f82fabd35e6a166e897fa1679a48a
+SHA1 (patch-source_darkplaces_hmac.h) = aa3dd533c2a6ccc0bb8836c5f6284c01db0fb0d4
+SHA1 (patch-source_darkplaces_makefile.inc) = c440ebb63b5c6561e8643f2ff725eb6d49a8ced0
+SHA1 (patch-source_gmqcc_Makefile) = a70657f928f43087fc4de97f206200fd78dd8a4b
+SHA1 (patch-source_gmqcc_gmqcc.h) = 8cf08c5d6b218c042b96fad904b1a35c37cb260d
diff --git a/games/xonotic/files/xonotic.desktop b/games/xonotic/files/xonotic.desktop
new file mode 100644
index 00000000000..7b7ccddab75
--- /dev/null
+++ b/games/xonotic/files/xonotic.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=Xonotic
+Comment=Fast arena-style FPS
+Icon=xonotic
+Exec=xonotic-sdl
+Terminal=false
+Categories=Game;Shooter;
diff --git a/games/xonotic/patches/patch-Makefile b/games/xonotic/patches/patch-Makefile
new file mode 100644
index 00000000000..ff367b7a62d
--- /dev/null
+++ b/games/xonotic/patches/patch-Makefile
@@ -0,0 +1,24 @@
+$NetBSD: patch-Makefile,v 1.1 2019/10/01 12:32:26 nia Exp $
+
+Use DESTDIR.
+
+--- ./Makefile.orig 2015-08-25 15:05:04.000000000 -0700
++++ ./Makefile 2017-01-29 22:14:53.212882308 -0800
+@@ -30,7 +30,7 @@
+ ( cd source/d0_blind_id && ./configure --enable-static --disable-shared $(RIJNDAELDETECT_CONFIGURE) )
+ $(MAKE) -C source/d0_blind_id
+ $(MAKE) -C source/gmqcc
+- $(MAKE) -C source/qcsrc FTEQCC=$(CURDIR)/source/gmqcc/gmqcc
++ $(MAKE) -C source/qcsrc QCC=$(CURDIR)/source/gmqcc/gmqcc
+ $(MAKE) -C source/darkplaces sv-release DP_CRYPTO_STATIC_LIBDIR=$(CURDIR)/source/d0_blind_id/.libs
+ $(MAKE) -C source/darkplaces cl-release DP_CRYPTO_STATIC_LIBDIR=$(CURDIR)/source/d0_blind_id/.libs
+ $(MAKE) -C source/darkplaces sdl-release DP_CRYPTO_STATIC_LIBDIR=$(CURDIR)/source/d0_blind_id/.libs
+@@ -115,7 +115,7 @@
+
+ .PHONY: install-links
+ install-links:
+- $(INSTALL) -d $(BINDIR)
++ $(INSTALL) -d $(DESTDIR)$(BINDIR)
+ $(LN) -snf $(LIBDIR)/xonotic-linux-sdl.sh $(DESTDIR)$(BINDIR)/xonotic-sdl
+ $(LN) -snf $(LIBDIR)/xonotic-linux-glx.sh $(DESTDIR)$(BINDIR)/xonotic-glx
+ $(LN) -snf $(LIBDIR)/xonotic-linux-dedicated.sh $(DESTDIR)$(BINDIR)/xonotic-dedicated
diff --git a/games/xonotic/patches/patch-source_darkplaces_hmac.c b/games/xonotic/patches/patch-source_darkplaces_hmac.c
new file mode 100644
index 00000000000..ac90230c198
--- /dev/null
+++ b/games/xonotic/patches/patch-source_darkplaces_hmac.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-source_darkplaces_hmac.c,v 1.1 2019/10/01 12:32:26 nia Exp $
+
+Avoid conflicting with NetBSD libc.
+
+--- source/darkplaces/hmac.c.orig 2017-04-01 13:26:56.000000000 +0000
++++ source/darkplaces/hmac.c
+@@ -1,7 +1,7 @@
+ #include "quakedef.h"
+ #include "hmac.h"
+
+-qboolean hmac(
++qboolean darkplaces_hmac(
+ hashfunc_t hfunc, int hlen, int hblock,
+ unsigned char *out,
+ const unsigned char *in, int n,
diff --git a/games/xonotic/patches/patch-source_darkplaces_hmac.h b/games/xonotic/patches/patch-source_darkplaces_hmac.h
new file mode 100644
index 00000000000..2dd029d0bd6
--- /dev/null
+++ b/games/xonotic/patches/patch-source_darkplaces_hmac.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-source_darkplaces_hmac.h,v 1.1 2019/10/01 12:32:26 nia Exp $
+
+Avoid conflicting with NetBSD libc.
+
+--- source/darkplaces/hmac.h.orig 2017-04-01 13:26:56.000000000 +0000
++++ source/darkplaces/hmac.h
+@@ -2,14 +2,14 @@
+ #define HMAC_H
+
+ typedef void (*hashfunc_t) (unsigned char *out, const unsigned char *in, int n);
+-qboolean hmac(
++qboolean darkplaces_hmac(
+ hashfunc_t hfunc, int hlen, int hblock,
+ unsigned char *out,
+ const unsigned char *in, int n,
+ const unsigned char *key, int k
+ );
+
+-#define HMAC_MDFOUR_16BYTES(out, in, n, key, k) hmac(mdfour, 16, 64, out, in, n, key, k)
+-#define HMAC_SHA256_32BYTES(out, in, n, key, k) hmac(sha256, 32, 64, out, in, n, key, k)
++#define HMAC_MDFOUR_16BYTES(out, in, n, key, k) darkplaces_hmac(mdfour, 16, 64, out, in, n, key, k)
++#define HMAC_SHA256_32BYTES(out, in, n, key, k) darkplaces_hmac(sha256, 32, 64, out, in, n, key, k)
+
+ #endif
diff --git a/games/xonotic/patches/patch-source_darkplaces_makefile.inc b/games/xonotic/patches/patch-source_darkplaces_makefile.inc
new file mode 100644
index 00000000000..8e380656618
--- /dev/null
+++ b/games/xonotic/patches/patch-source_darkplaces_makefile.inc
@@ -0,0 +1,15 @@
+$NetBSD: patch-source_darkplaces_makefile.inc,v 1.1 2019/10/01 12:32:26 nia Exp $
+
+Allow pkgsrc to set LDFLAGS.
+
+--- source/darkplaces/makefile.inc.orig 2017-04-01 13:26:56.000000000 +0000
++++ source/darkplaces/makefile.inc
+@@ -209,7 +209,7 @@ LDFLAGS_RELEASE=$(OPTIM_RELEASE) -DSVNRE
+
+ OBJ_GLX= builddate.c sys_linux.o vid_glx.o thread_pthread.o keysym2ucs.o $(OBJ_MENU) $(OBJ_SOUND) $(OBJ_CD) $(OBJ_VIDEO_CAPTURE) $(OBJ_COMMON)
+
+-LDFLAGS_UNIXCOMMON=-lm $(LIB_ODE) $(LIB_Z) $(LIB_JPEG) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL)
++LDFLAGS_UNIXCOMMON=$(LDFLAGS) -lm $(LIB_ODE) $(LIB_Z) $(LIB_JPEG) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL)
+ LDFLAGS_UNIXCL=-L$(UNIX_X11LIBPATH) -lX11 -lXpm -lXext -lXxf86vm -pthread $(LIB_SOUND)
+ LDFLAGS_UNIXCL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl
+ LDFLAGS_UNIXSV_PRELOAD=-lz -ljpeg -lpng -lcurl
diff --git a/games/xonotic/patches/patch-source_gmqcc_Makefile b/games/xonotic/patches/patch-source_gmqcc_Makefile
new file mode 100644
index 00000000000..9a0320725d7
--- /dev/null
+++ b/games/xonotic/patches/patch-source_gmqcc_Makefile
@@ -0,0 +1,15 @@
+$NetBSD: patch-source_gmqcc_Makefile,v 1.1 2019/10/01 12:32:26 nia Exp $
+
+Allow pkgsrc to set CXXFLAGS.
+
+--- source/gmqcc/Makefile.orig 2017-04-01 13:28:34.000000000 +0000
++++ source/gmqcc/Makefile
+@@ -10,7 +10,7 @@ WINDOWS=1
+ endif
+
+ CXX ?= clang++
+-CXXFLAGS = \
++CXXFLAGS += \
+ -std=c++11 \
+ -Wall \
+ -Wextra \
diff --git a/games/xonotic/patches/patch-source_gmqcc_gmqcc.h b/games/xonotic/patches/patch-source_gmqcc_gmqcc.h
new file mode 100644
index 00000000000..cd4506a4f3d
--- /dev/null
+++ b/games/xonotic/patches/patch-source_gmqcc_gmqcc.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-source_gmqcc_gmqcc.h,v 1.1 2019/10/01 12:32:26 nia Exp $
+
+Support NetBSD.
+
+--- ./source/gmqcc/gmqcc.h.old 2017-01-29 00:50:17.690470085 -0800
++++ ./source/gmqcc/gmqcc.h 2017-01-29 00:50:41.735428133 -0800
+@@ -104,7 +104,7 @@
+ #define GMQCC_BYTE_ORDER_BIG 4321
+
+ #if defined (__GNUC__) || defined (__GNU_LIBRARY__)
+-# if defined (__FreeBSD__) || defined (__OpenBSD__)
++# if defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__)
+ # include <sys/endian.h>
+ # elif defined (BSD) && (BSD >= 199103) || defined (__DJGPP__) || defined (__CYGWIN32__)
+ # include <machine/endian.h>