

























This package can - and should - be made to compile with GCC 16 by targeting the "gnu17" standard.
diff --git a/PKGBUILD b/PKGBUILD
index a81ae26..4b4c796 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8 +8 @@ pkgver=20140513
-pkgrel=4
+pkgrel=5
@@ -41 +41 @@ build() {
- make OPTIM_RELEASE="${CFLAGS}" DP_FS_BASEDIR=/usr/share/games/quake release
+ make OPTIM_RELEASE="${CFLAGS} -std=gnu17" DP_FS_BASEDIR=/usr/share/games/quake release
I have a fix! I can commit if the maintainer would allow, however I have literally never committed to the AUR before, so I don't know what the process is.
Edit2: gcc13 would have worked as well. CC=gcc-13 paru -S darkplaces
Edit: I install gcc11 from AUR. Took forever. Then: CC=gcc-11 paru -S darkplaces worked. I'm sure there is a way to patch it so it works with the newest gcc, but that is far beyond my modest abilities. || Doesn't compile no more.
In file included from ../../../quakedef.h:45,
from ../../../sys_linux.c:16:
../../../qtypes.h:9:26: error: cannot use keyword ‘false’ as enumeration constant
9 | typedef enum qboolean_e {false, true} qboolean;
| ^
../../../qtypes.h:9:26: note: ‘false’ is a keyword with ‘-std=c23’ onwards
make[3]: *** [makefile.inc:556: sys_linux.o] Error 1
I switched the standard to c99 and c11. Then I had to add a few more include files for strings and sys/select and what not. Then it told me the array wasn't a multiple ... actually, here the error:
../../../dpsoftrast.c:240:22: error: size of array element is not a multiple of its alignment
240 | typedef ALIGN(struct DPSOFTRAST_State_Thread_s
| ^
../../../dpsoftrast.c:46:36: note: in definition of macro ‘ALIGN’
46 | #define ALIGN(var) var attribute((aligned(16)))
| ^ ~~
../../../dpsoftrast.c:5180:78: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [makefile.inc:544: dpsoftrast.o] Error 1
../../../dpsoftrast.c: In function ‘DPSOFTRAST_Interpret_Draw’:
../../../dpsoftrast.c:5180:78: error: ‘M_LN2’ undeclared (first use in this function)
5180 | y = (int)(log((float)y)*0.5f/M_LN2);
| ^
looks like math.h is missing as well.
Anyway, that's far more than I'm able to. Help anyone?
DarkPlaces-Quake build 16:37:35 Feb 21 2022 darkplaces-glx crashes often when I do vid_restart. darkplaces-sdl doesn't let me set snd_channels to 8. Always sets it to 6 - which ends up being stereo anyway. Also it hogs my mouse buttons so mumble doesn't see me pressing them.
Basically what I'm saying is, how do I compile the 2014 version my own self? Because there everything worked fine.
Edit: Never mind. I mistook the build date as release. My issues are still there though. Edit: Turns out the vid_restart was the Nvidia driver. I only use the glx version these days, so with the new drivers it's all good. Well, if it compiles.
@kleintux looks like maintainer lost interest in maintaining this. here's a patch you need to apply to fix it.
--- PKGBUILD.orig 2021-09-19 22:47:10.045758485 +0200
+++ PKGBUILD 2021-09-19 22:46:27.978817641 +0200
@@ -13,9 +13,11 @@
'libxxf86vm' 'sdl' 'zlib')
install=$pkgname.install
source=(http://icculus.org/twilight/$pkgname/files/darkplacesengine$pkgver.zip
- $pkgname.desktop)
+ $pkgname.desktop
+ gcc-11.patch::https://gitweb.gentoo.org/repo/gentoo.git/plain/games-fps/darkplaces/files/darkplaces-20140513-gcc-11.patch?id=bc2ba1cd6fdc5a7ad7d161efb21652b73c6b207e)
sha512sums=('45864b590057c6de0ea978b3cc967feb879b87b2d376f3b4d8525e037b10ca1fc68599c152506494bb06669c6c2304e0aa0ee1b28f7a0d589d10c23f7285052c'
- 'daed32cb397b8f5d8a569b0679680377b9a1fb7a30fc5b99742381723850b792424d221deafb48ed4bad99d9fc7812f8a667263d9f0e63a40fbc2d9e1013c1d6')
+ 'daed32cb397b8f5d8a569b0679680377b9a1fb7a30fc5b99742381723850b792424d221deafb48ed4bad99d9fc7812f8a667263d9f0e63a40fbc2d9e1013c1d6'
+ '426e6e3926872131afde4b6f162453f5f24ee0075b13c2da9732c7519bdbae9f05348502f74cafce88b183adddf5d9916020d1df0db25b953fafdeda7b49f1e2')
noextract=(darkplacesengine$pkgver.zip)
prepare() {
@@ -27,6 +29,10 @@
# Fix a couple options in the Makefile.
sed -i '1i DP_LINK_TO_LIBJPEG=1' makefile
sed -i '/(STRIP)/d' makefile.inc
+
+ # Fix compilation with GCC-11
+ patch -p1 -i "${srcdir}/gcc-11.patch"
+
}
build() {
Building with gcc 11 fails with the following error:
../../../dpsoftrast.c:239:22: error: size of array element is not a multiple of its alignment
239 | typedef ALIGN(struct DPSOFTRAST_State_Thread_s
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Here's a patch that fixes this: https://bugs.gentoo.org/786288#c9
libglvnd should be a makedepend. This package does not build without GL/glx.h.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
As to Callumari's comment, try to contact jose1711 directly to see whether they still have the time and inclination to maintain it. If they do not respond within a reasonable timeframe (two weeks at least), you may click the "Submit Request" link on this page and request that the package be orphaned. Once in an orphaned state, the package may be adopted by another AUR user.