pkgsrc-WIP-changes archive

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

import xonotic update, build system parts changed too much.



Module Name:	pkgsrc-wip
Committed By:	nikita <nikita%NetBSD.org@localhost>
Pushed By:	nikita
Date:		Thu May 4 16:10:44 2023 +0200
Changeset:	ae9deda2b074fffc07735c7f8480f16de24308c1

Added Files:
	xonotic/DESCR
	xonotic/Makefile
	xonotic/PLIST
	xonotic/distinfo
	xonotic/files/xonotic.desktop
	xonotic/patches/patch-Makefile
	xonotic/patches/patch-source_darkplaces_hmac.c
	xonotic/patches/patch-source_darkplaces_hmac.h
	xonotic/patches/patch-source_darkplaces_makefile.inc
	xonotic/patches/patch-source_darkplaces_vid__glx.c
	xonotic/patches/patch-source_gmqcc_gmqcc.h

Log Message:
import xonotic update, build system parts changed too much.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ae9deda2b074fffc07735c7f8480f16de24308c1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 xonotic/DESCR                                      |  4 ++
 xonotic/Makefile                                   | 78 ++++++++++++++++++++++
 xonotic/PLIST                                      | 47 +++++++++++++
 xonotic/distinfo                                   | 11 +++
 xonotic/files/xonotic.desktop                      |  9 +++
 xonotic/patches/patch-Makefile                     | 15 +++++
 xonotic/patches/patch-source_darkplaces_hmac.c     | 15 +++++
 xonotic/patches/patch-source_darkplaces_hmac.h     | 24 +++++++
 .../patches/patch-source_darkplaces_makefile.inc   | 15 +++++
 xonotic/patches/patch-source_darkplaces_vid__glx.c | 20 ++++++
 xonotic/patches/patch-source_gmqcc_gmqcc.h         | 15 +++++
 11 files changed, 253 insertions(+)

diffs:
diff --git a/xonotic/DESCR b/xonotic/DESCR
new file mode 100644
index 0000000000..05bad0fef9
--- /dev/null
+++ b/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/xonotic/Makefile b/xonotic/Makefile
new file mode 100644
index 0000000000..a2271e6fc7
--- /dev/null
+++ b/xonotic/Makefile
@@ -0,0 +1,78 @@
+# $NetBSD: Makefile,v 1.15 2022/09/11 12:51:50 wiz Exp $
+
+DISTNAME=	xonotic-0.8.5
+CATEGORIES=	games
+MASTER_SITES=	https://dl.xonotic.org/
+EXTRACT_SUFX=	.zip
+
+MAINTAINER=	charlotte%NetBSD.org@localhost
+HOMEPAGE=	https://xonotic.org/
+COMMENT=	Fast arena-style FPS
+LICENSE=	gnu-gpl-v2
+
+USE_TOOLS+=	gmake gsed 7za bash zip pax perl:run
+USE_LANGUAGES=	c c++11
+
+# C++11
+GCC_REQD+=	4.7
+
+WRKSRC=			${WRKDIR}/Xonotic
+BUILD_TARGET=		both
+MAKE_ENV+=		MAKEFLAGS="-j ${_MAKE_JOBS_N:U1}"
+
+REPLACE_PERL+=		server/rcon.pl
+REPLACE_PERL+=		server/rcon2irc/rcon2irc.pl
+
+ICON_SIZES=	16 24 32 64 128 256 512
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS+=	-msse
+.endif
+
+INSTALLATION_DIRS+=	share/applications
+.for s in ${ICON_SIZES}
+INSTALLATION_DIRS+=	share/icons/hicolor/${s}x${s}/apps
+.endfor
+INSTALLATION_DIRS+=	bin
+INSTALLATION_DIRS+=	share/xonotic
+INSTALLATION_DIRS+=	share/xonotic/data
+
+do-install:
+	${INSTALL_DATA} ${WRKSRC}/data/*.pk3 ${DESTDIR}${PREFIX}/share/xonotic/data
+	${INSTALL_DATA} ${WRKSRC}/key_0.d0pk ${DESTDIR}${PREFIX}/share/xonotic
+	${INSTALL_PROGRAM} ${WRKSRC}/source/darkplaces/darkplaces-sdl \
+		${DESTDIR}${PREFIX}/bin/xonotic-sdl
+	${INSTALL_PROGRAM} ${WRKSRC}/source/darkplaces/darkplaces-dedicated \
+		${DESTDIR}${PREFIX}/bin/xonotic-dedicated
+	cd ${WRKSRC} && ${PAX} -rw server ${DESTDIR}${PREFIX}/share/xonotic
+.for f in xonotic-linux-dedicated.sh xonotic-linux-glx.sh xonotic-linux-sdl.sh
+	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/share/xonotic
+.endfor
+.for f in xonotic-linux64-dedicated xonotic-linux64-glx xonotic-linux64-sdl
+	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/share/xonotic
+.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
+
+.if ${OPSYS} == "Linux"
+.  include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+.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/xonotic/PLIST b/xonotic/PLIST
new file mode 100644
index 0000000000..9f1984e4d3
--- /dev/null
+++ b/xonotic/PLIST
@@ -0,0 +1,47 @@
+@comment $NetBSD$
+bin/xonotic-dedicated
+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-20220627.pk3
+share/xonotic/data/font-xolonium-20220627.pk3
+share/xonotic/data/xonotic-20220627-data.pk3
+share/xonotic/data/xonotic-20220627-maps.pk3
+share/xonotic/data/xonotic-20220627-music.pk3
+share/xonotic/data/xonotic-20220627-nexcompat.pk3
+share/xonotic/key_0.d0pk
+share/xonotic/server/.gitattributes
+share/xonotic/server/rcon.pl
+share/xonotic/server/rcon2irc/bans.pl
+share/xonotic/server/rcon2irc/echo-rcon.pl
+share/xonotic/server/rcon2irc/fastest_lap.pl
+share/xonotic/server/rcon2irc/irc_nick_change.pl
+share/xonotic/server/rcon2irc/joinmessage.pl
+share/xonotic/server/rcon2irc/joinsparts.pl
+share/xonotic/server/rcon2irc/ping-pl.pl
+share/xonotic/server/rcon2irc/raw.pl
+share/xonotic/server/rcon2irc/rbiserver.pl
+share/xonotic/server/rcon2irc/rcon2irc-example.conf
+share/xonotic/server/rcon2irc/rcon2irc.pl
+share/xonotic/server/rcon2irc/rcon2irc.txt
+share/xonotic/server/rcon2irc/rename.pl
+share/xonotic/server/rcon2irc/showlogins.pl
+share/xonotic/server/rcon2irc/suggestmap.pl
+share/xonotic/server/rcon2irc/votestop.pl
+share/xonotic/server/readme.txt
+share/xonotic/server/server.cfg
+share/xonotic/server/server_linux.sh
+share/xonotic/server/server_mac.sh
+share/xonotic/server/server_windows.bat
+share/xonotic/xonotic-linux-dedicated.sh
+share/xonotic/xonotic-linux-glx.sh
+share/xonotic/xonotic-linux-sdl.sh
+share/xonotic/xonotic-linux64-dedicated
+share/xonotic/xonotic-linux64-glx
+share/xonotic/xonotic-linux64-sdl
diff --git a/xonotic/distinfo b/xonotic/distinfo
new file mode 100644
index 0000000000..9cf07c7a03
--- /dev/null
+++ b/xonotic/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.4 2021/10/26 10:44:34 nia Exp $
+
+BLAKE2s (xonotic-0.8.5.zip) = 5902efba2dfdd5d7ebeb34790c9133d791fdf325b2c9894446bbd49ee200c80f
+SHA512 (xonotic-0.8.5.zip) = 4ffc4b73eeb5f580d178a98419d5b44cbff0c56e356a62baa729b5b7a6c3d43b2b425b123428c9b1bf3f4718eaf61bcf5d62914521cc061c7563a253440c807e
+Size (xonotic-0.8.5.zip) = 1228561792 bytes
+SHA1 (patch-Makefile) = db68600f4efb60387d31b253fb3e121ed359c2c6
+SHA1 (patch-source_darkplaces_hmac.c) = 58f6da84843f82fabd35e6a166e897fa1679a48a
+SHA1 (patch-source_darkplaces_hmac.h) = aa3dd533c2a6ccc0bb8836c5f6284c01db0fb0d4
+SHA1 (patch-source_darkplaces_makefile.inc) = c440ebb63b5c6561e8643f2ff725eb6d49a8ced0
+SHA1 (patch-source_darkplaces_vid__glx.c) = 35f44684e2eb7afd37727f4dc52788d71b5e6805
+SHA1 (patch-source_gmqcc_gmqcc.h) = 8cf08c5d6b218c042b96fad904b1a35c37cb260d
diff --git a/xonotic/files/xonotic.desktop b/xonotic/files/xonotic.desktop
new file mode 100644
index 0000000000..7b7ccddab7
--- /dev/null
+++ b/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/xonotic/patches/patch-Makefile b/xonotic/patches/patch-Makefile
new file mode 100644
index 0000000000..6ebbe383c8
--- /dev/null
+++ b/xonotic/patches/patch-Makefile
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Do not assume nproc exists.
+
+--- Makefile.orig	2023-05-04 14:20:42.760107212 +0200
++++ Makefile	2023-05-04 14:22:14.309951566 +0200
+@@ -6,8 +6,6 @@
+ # CC and MAKEFLAGS are always set so ?= has no effect, therefore
+ # use CFLAGS to set default optimisations and support user override
+ CFLAGS ?= -pipe -march=native -mtune=native -flto=auto
+-# user can override this with make -j
+-MAKEFLAGS := -j$(shell nproc)
+ # DP makefile overrides CFLAGS (exporting CFLAGS does work for d0_blind_id but so does this)
+ export CC += $(CFLAGS)
+ 
diff --git a/xonotic/patches/patch-source_darkplaces_hmac.c b/xonotic/patches/patch-source_darkplaces_hmac.c
new file mode 100644
index 0000000000..ac90230c19
--- /dev/null
+++ b/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/xonotic/patches/patch-source_darkplaces_hmac.h b/xonotic/patches/patch-source_darkplaces_hmac.h
new file mode 100644
index 0000000000..2dd029d0bd
--- /dev/null
+++ b/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/xonotic/patches/patch-source_darkplaces_makefile.inc b/xonotic/patches/patch-source_darkplaces_makefile.inc
new file mode 100644
index 0000000000..8e38065661
--- /dev/null
+++ b/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/xonotic/patches/patch-source_darkplaces_vid__glx.c b/xonotic/patches/patch-source_darkplaces_vid__glx.c
new file mode 100644
index 0000000000..feae78b2b8
--- /dev/null
+++ b/xonotic/patches/patch-source_darkplaces_vid__glx.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-source_darkplaces_vid__glx.c,v 1.1 2020/10/05 18:53:37 nia Exp $
+
+Load an unversioned libGL so this works with NetBSD native X.
+
+--- source/darkplaces/vid_glx.c.orig	2017-04-01 12:26:58.000000000 +0000
++++ source/darkplaces/vid_glx.c
+@@ -1353,10 +1353,10 @@ static qboolean VID_InitModeGL(viddef_mo
+ #if defined(__APPLE__) && defined(__MACH__)
+ 	drivername = "/usr/X11R6/lib/libGL.1.dylib";
+ #else
+-	drivername = "libGL.so.1";
++	drivername = "libGL.so";
+ #endif
+-// COMMANDLINEOPTION: Linux GLX: -gl_driver <drivername> selects a GL driver library, default is libGL.so.1, useful only for using fxmesa or similar, if you don't know what this is for, you don't need it
+-// COMMANDLINEOPTION: BSD GLX: -gl_driver <drivername> selects a GL driver library, default is libGL.so.1, useful only for using fxmesa or similar, if you don't know what this is for, you don't need it
++// COMMANDLINEOPTION: Linux GLX: -gl_driver <drivername> selects a GL driver library, default is libGL.so, useful only for using fxmesa or similar, if you don't know what this is for, you don't need it
++// COMMANDLINEOPTION: BSD GLX: -gl_driver <drivername> selects a GL driver library, default is libGL.so, useful only for using fxmesa or similar, if you don't know what this is for, you don't need it
+ // LordHavoc: although this works on MacOSX, it's useless there (as there is only one system libGL)
+ 	i = COM_CheckParm("-gl_driver");
+ 	if (i && i < com_argc - 1)
diff --git a/xonotic/patches/patch-source_gmqcc_gmqcc.h b/xonotic/patches/patch-source_gmqcc_gmqcc.h
new file mode 100644
index 0000000000..cd4506a4f3
--- /dev/null
+++ b/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>


Home | Main Index | Thread Index | Old Index