* [gentoo-commits] repo/gentoo:master commit in: games-fps/qudos/files/, games-fps/qudos/
@ 2022-10-24 19:26 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-10-24 19:26 UTC (permalink / raw
To: gentoo-commits
commit: 8a8f555584d6806e35409cb85f652dcf37e2ed8c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 17:17:26 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 19:21:05 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a8f5555
games-fps/qudos: almost fix build w/ Clang 16
- Drop various seds, converting them into patches
- Fix build with libpng 1.4.0 too
- Fix build on modern glibc
- Use pkg-config (and therefore fix build on LLD)
This nearly got there wrt Clang 16, but then ended up hitting
-Wincompatible-function-pointer-types with some USE flags
and got fed up.
Bug: https://bugs.gentoo.org/874486
Closes: https://bugs.gentoo.org/730806
Closes: https://bugs.gentoo.org/770904
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../qudos/files/qudos-0.40.1-libjpeg-clash.patch | 25 +++++
games-fps/qudos/files/qudos-0.40.1-libpng.patch | 30 +++++
games-fps/qudos/files/qudos-0.40.1-libpng15.patch | 10 --
.../qudos/files/qudos-0.40.1-no-bits-nan.patch | 12 ++
.../qudos/files/qudos-0.40.1-respect-cc.patch | 15 +++
.../qudos/files/qudos-0.40.1-respect-libdir.patch | 53 +++++++++
.../qudos/files/qudos-0.40.1-use-pkg-config.patch | 30 +++++
.../qudos/files/qudos-0.40.1-zlib-build.patch | 12 ++
...{qudos-0.40.1.ebuild => qudos-0.40.1-r1.ebuild} | 121 ++++++++++-----------
9 files changed, 235 insertions(+), 73 deletions(-)
diff --git a/games-fps/qudos/files/qudos-0.40.1-libjpeg-clash.patch b/games-fps/qudos/files/qudos-0.40.1-libjpeg-clash.patch
new file mode 100644
index 000000000000..944c1aff856c
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-libjpeg-clash.patch
@@ -0,0 +1,25 @@
+From c657cd54baee3bdfe7a92c9b91536bb5c3ddcdd8 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 24 Oct 2022 17:50:17 +0100
+Subject: [PATCH 2/5] Fix clash with libjpeg
+
+--- a/src/ref_gl/gl_image.c
++++ b/src/ref_gl/gl_image.c
+@@ -912,7 +912,7 @@ jpg_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
+ }
+
+ void
+-jpeg_mem_src(j_decompress_ptr cinfo, byte * mem, int len)
++qudos_jpeg_mem_src(j_decompress_ptr cinfo, byte * mem, int len)
+ {
+ cinfo->src = (struct jpeg_source_mgr *)(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(struct jpeg_source_mgr));
+ cinfo->src->init_source = jpg_null;
+@@ -956,7 +956,7 @@ LoadJPG(char *filename, byte ** pic, int *width, int *height)
+ jpeg_create_decompress(&cinfo);
+
+ /* Feed JPEG memory into the libJpeg Object */
+- jpeg_mem_src(&cinfo, rawdata, rawsize);
++ qudos_jpeg_mem_src(&cinfo, rawdata, rawsize);
+
+ /* Process JPEG header */
+ jpeg_read_header(&cinfo, true);
diff --git a/games-fps/qudos/files/qudos-0.40.1-libpng.patch b/games-fps/qudos/files/qudos-0.40.1-libpng.patch
new file mode 100644
index 000000000000..78fb4cdb7bd5
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-libpng.patch
@@ -0,0 +1,30 @@
+--- a/src/ref_gl/gl_local.h
++++ b/src/ref_gl/gl_local.h
+@@ -29,6 +29,7 @@
+ #include <GL/glu.h>
+ #include <GL/glext.h>
+
++#include <zlib.h> /* Z_DEFAULT_COMPRESSION */
+ #include <png.h>
+ #include <jpeglib.h>
+
+Subject: [PATCH] Fix build with libpng 1.4.0
+
+From the 1.4.0 release notes:
+```
+ m. The function png_set_gray_1_2_4_to_8() was removed. It has been
+ deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
+ png_set_expand_gray_1_2_4_to_8() because the former function also
+ expanded palette images.
+```
+--- a/src/ref_gl/gl_image.c
++++ b/src/ref_gl/gl_image.c
+@@ -1186,7 +1186,7 @@ LoadPNG(char *filename, byte ** pic, int *width, int *height)
+ if (my_png->ColorType == PNG_COLOR_TYPE_PALETTE)
+ png_set_palette_to_rgb(png);
+ if (my_png->ColorType == PNG_COLOR_TYPE_GRAY && my_png->BitDepth < 8)
+- png_set_gray_1_2_4_to_8(png);
++ png_set_expand_gray_1_2_4_to_8(png);
+
+ /* Add alpha channel if present */
+ if (png_get_valid(png, pnginfo, PNG_INFO_tRNS))
diff --git a/games-fps/qudos/files/qudos-0.40.1-libpng15.patch b/games-fps/qudos/files/qudos-0.40.1-libpng15.patch
deleted file mode 100644
index 633215be34be..000000000000
--- a/games-fps/qudos/files/qudos-0.40.1-libpng15.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/ref_gl/gl_local.h
-+++ b/src/ref_gl/gl_local.h
-@@ -29,6 +29,7 @@
- #include <GL/glu.h>
- #include <GL/glext.h>
-
-+#include <zlib.h> /* Z_DEFAULT_COMPRESSION */
- #include <png.h>
- #include <jpeglib.h>
-
diff --git a/games-fps/qudos/files/qudos-0.40.1-no-bits-nan.patch b/games-fps/qudos/files/qudos-0.40.1-no-bits-nan.patch
new file mode 100644
index 000000000000..adcffef23c40
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-no-bits-nan.patch
@@ -0,0 +1,12 @@
+--- a/src/mods/rogue/g_local.h
++++ b/src/mods/rogue/g_local.h
+@@ -26,9 +26,6 @@
+ //==================================================================
+
+ #ifndef _WIN32
+-#ifdef __linux__
+-#include <bits/nan.h>
+-#endif
+ #define min(a,b) ((a) < (b) ? (a) : (b))
+ #define max(a,b) ((a) > (b) ? (a) : (b))
+ #ifdef __sun__
diff --git a/games-fps/qudos/files/qudos-0.40.1-respect-cc.patch b/games-fps/qudos/files/qudos-0.40.1-respect-cc.patch
new file mode 100644
index 000000000000..92c7028e1890
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-respect-cc.patch
@@ -0,0 +1,15 @@
+From 76aef29111d0b8c5e5fffe80833d0c227cca1127 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 24 Oct 2022 17:54:38 +0100
+Subject: [PATCH 4/5] Respect CC
+
+--- a/Makefile
++++ b/Makefile
+@@ -60,7 +60,6 @@ PREFIX?= $(LOCALBASE)
+ DATADIR?= $(LOCALBASE)/share/quake2
+ LIBDIR?= $(LOCALBASE)/lib/QuDos
+
+-CC?= gcc
+ TYPE?= release
+
+ OGG_LDFLAGS= -lvorbisfile -lvorbis -logg
diff --git a/games-fps/qudos/files/qudos-0.40.1-respect-libdir.patch b/games-fps/qudos/files/qudos-0.40.1-respect-libdir.patch
new file mode 100644
index 000000000000..b3e0cdc5a2f7
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-respect-libdir.patch
@@ -0,0 +1,53 @@
+From 1dc6681ee4eea2d1b6e7edd04cf84fd10c407d28 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 24 Oct 2022 17:54:12 +0100
+Subject: [PATCH 3/5] Respect libdir
+
+--- a/Makefile
++++ b/Makefile
+@@ -55,7 +55,6 @@ WITH_XMMS?=YES # Enable XMMS support (thanks AprQ2).
+
+ # General variables.
+ LOCALBASE?= /usr/local
+-X11BASE?= /usr/X11R6
+ PREFIX?= $(LOCALBASE)
+
+ DATADIR?= $(LOCALBASE)/share/quake2
+@@ -98,34 +97,19 @@ GAME_NAME= game$(ARCH).$(SHLIB_EXT)
+ endif
+
+ # Compilation flags.
+-CFLAGS+= -I/usr/include -I$(LOCALBASE)/include -I$(X11BASE)/include \
++CFLAGS+= -I/usr/include -I$(LOCALBASE)/include \
+ -DGAME_NAME='"$(GAME_NAME)"' -DQUDOS_VERSION='"$(VERSION)"'
+
+ WARNS= -Wshadow -Wpointer-arith -Wcast-align -Waggregate-return -Wstrict-prototypes -Wredundant-decls -Wnested-externs
+
+-ifeq ($(TYPE),debug)
+-CFLAGS+= -Wall -Werror -g -ggdb -DDEBUGGING # $(WARNS)
+-else
+- ifeq ($(TYPE),profile)
+-CFLAGS+= -pg
+- else
+-CFLAGS+= -O3 -ffast-math -funroll-loops -fomit-frame-pointer \
+- -fexpensive-optimizations
+- ifeq ($(ARCH),i386)
+-CFLAGS+= -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
+- -fno-strict-aliasing
+- endif
+- endif
+-endif
+-
+ # Linker flags.
+-LDFLAGS+= -L/usr/lib -L$(LOCALBASE)/lib -L$(X11BASE)/lib -lm
++LDFLAGS+= -lm
+
+ ifeq ($(OSTYPE),Linux)
+ LDFLAGS+= -ldl
+ endif
+
+-REF_LDFLAGS= -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lGLU -ljpeg -lpng
++REF_LDFLAGS= -lX11 -lXext -lXxf86vm -lGLU -ljpeg -lpng
+
+ ifeq ($(strip $(WITH_DGA_MOUSE)),YES)
+ REF_LDFLAGS+= -lXxf86dga
diff --git a/games-fps/qudos/files/qudos-0.40.1-use-pkg-config.patch b/games-fps/qudos/files/qudos-0.40.1-use-pkg-config.patch
new file mode 100644
index 000000000000..c2aae64e2b32
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-use-pkg-config.patch
@@ -0,0 +1,30 @@
+From 372cfdd9c81043667451fc46bcb8daaa5a5e3620 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 24 Oct 2022 17:56:14 +0100
+Subject: [PATCH 5/5] Use pkg-config
+
+--- a/Makefile
++++ b/Makefile
+@@ -64,9 +64,9 @@ TYPE?= release
+
+ OGG_LDFLAGS= -lvorbisfile -lvorbis -logg
+
+-SDL_CONFIG?= sdl-config
+-SDL_CFLAGS= $(shell $(SDL_CONFIG) --cflags)
+-SDL_LDFLAGS= $(shell $(SDL_CONFIG) --libs)
++PKG_CONFIG?= pkg-config
++SDL_CFLAGS= $(shell ${PKG_CONFIG} --cflags sdl)
++SDL_LDFLAGS= $(shell ${PKG_CONFIG} --libs sdl)
+
+ ifeq ($(OSTYPE),Linux)
+ ALSA_LDFLAGS= -lasound
+@@ -96,8 +95,7 @@ GAME_NAME= game$(ARCH).$(SHLIB_EXT)
+ endif
+
+ # Compilation flags.
+-CFLAGS+= -I/usr/include -I$(LOCALBASE)/include \
+- -DGAME_NAME='"$(GAME_NAME)"' -DQUDOS_VERSION='"$(VERSION)"'
++CFLAGS+= -DGAME_NAME='"$(GAME_NAME)"' -DQUDOS_VERSION='"$(VERSION)"'
+
+ WARNS= -Wshadow -Wpointer-arith -Wcast-align -Waggregate-return -Wstrict-prototypes -Wredundant-decls -Wnested-externs
+
diff --git a/games-fps/qudos/files/qudos-0.40.1-zlib-build.patch b/games-fps/qudos/files/qudos-0.40.1-zlib-build.patch
new file mode 100644
index 000000000000..d2e1474f2d7b
--- /dev/null
+++ b/games-fps/qudos/files/qudos-0.40.1-zlib-build.patch
@@ -0,0 +1,12 @@
+From bdd75315feed9fbaaf9dcf87f9a7e5eb18ca0b8b Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 24 Oct 2022 17:50:02 +0100
+Subject: [PATCH 1/5] Fix zlib build
+
+--- a/src/qcommon/unzip/ioapi.h
++++ b/src/qcommon/unzip/ioapi.h
+@@ -1,3 +1,4 @@
++#define OF(x) x
+ /*
+ * ioapi.h -- IO base function header for compress/uncompress .zip files
+ * using zlib + zip or unzip API
diff --git a/games-fps/qudos/qudos-0.40.1.ebuild b/games-fps/qudos/qudos-0.40.1-r1.ebuild
similarity index 66%
rename from games-fps/qudos/qudos-0.40.1.ebuild
rename to games-fps/qudos/qudos-0.40.1-r1.ebuild
index 24a6a4e01612..2a289162e2d7 100644
--- a/games-fps/qudos/qudos-0.40.1.ebuild
+++ b/games-fps/qudos/qudos-0.40.1-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit desktop flag-o-matic toolchain-funcs
@@ -20,21 +20,26 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="cdinstall debug dedicated demo dga ipv6 joystick mods opengl qmax oss sdl textures"
-DEPEND="opengl? (
- virtual/opengl
- virtual/glu )
- sdl? ( media-libs/libsdl[joystick?,opengl,sound,video]
- virtual/opengl
- virtual/glu )
- virtual/jpeg:0
+DEPEND="
media-libs/libogg
- media-libs/libpng:0
+ media-libs/libjpeg-turbo
+ media-libs/libpng
media-libs/libvorbis
sys-libs/zlib
x11-libs/libX11
x11-libs/libXext
x11-libs/libXxf86dga
- x11-libs/libXxf86vm"
+ x11-libs/libXxf86vm
+ opengl? (
+ virtual/opengl
+ virtual/glu
+ )
+ sdl? (
+ media-libs/libsdl[joystick?,opengl,sound,video]
+ virtual/opengl
+ virtual/glu
+ )
+"
RDEPEND="
${DEPEND}
cdinstall? ( games-fps/quake2-data )
@@ -45,8 +50,14 @@ RDEPEND="
dir=usr/share/${MY_PN}
PATCHES=(
- "${FILESDIR}"/${P}-libpng15.patch
+ "${FILESDIR}"/${P}-libpng.patch
"${FILESDIR}"/${P}-gnusource.patch
+ "${FILESDIR}"/${P}-zlib-build.patch
+ "${FILESDIR}"/${P}-libjpeg-clash.patch
+ "${FILESDIR}"/${P}-respect-libdir.patch
+ "${FILESDIR}"/${P}-respect-cc.patch
+ "${FILESDIR}"/${P}-use-pkg-config.patch
+ "${FILESDIR}"/${P}-no-bits-nan.patch
)
default_client() {
@@ -81,38 +92,19 @@ pkg_setup() {
if default_client ; then
elog "Selected the ${snd_drv} sound driver as the default."
- echo
fi
}
-src_unpack() {
- unpack "${FILE_STEM}.tar.bz2"
-}
-
src_prepare() {
rm docs/gnu.txt || die
+ default
+
# Change default sound driver and its location
sed -i \
-e "s:\"oss\":\"${snd_drv}\":" \
-e "s:\"\./snd:\"/usr/$(get_libdir)/${PN}/snd:" \
src/client/snd_dma.c || die
-
- sed -i \
- -e 's:jpeg_mem_src:qudos_jpeg_mem_src:g' \
- src/ref_gl/gl_image.c || die
-
- if has_version '>=sys-libs/zlib-1.2.5.1-r1' ; then
- sed -i \
- -e '1i#define OF(x) x' \
- src/qcommon/unzip/ioapi.h || die
- fi
-
- sed -i -e '106,119 s/CFL/LED/' Makefile || die
-
- sed -i -e 's:-L/usr/lib -L$(LOCALBASE)/lib :: ' Makefile || die
-
- default
}
src_configure() {
@@ -122,7 +114,7 @@ src_configure() {
src_compile() {
yesno() {
- usex ${1} YES NO;
+ usex ${1} YES NO
}
local client="YES"
@@ -131,36 +123,39 @@ src_compile() {
local type="release"
use debug && type="debug"
- emake \
- BUILD_QUAKE2="${client}" \
- BUILD_DEDICATED=$(yesno dedicated) \
- BUILD_GLX=$(yesno opengl) \
- BUILD_SDLGL=$(yesno sdl) \
- BUILD_ALSA_SND=NO \
- BUILD_SDL_SND=$(yesno sdl) \
- BUILD_OSS_SND=$(yesno oss) \
- WITH_XMMS=NO \
- WITH_DGA_MOUSE=$(yesno dga) \
- WITH_JOYSTICK=$(yesno joystick) \
- TYPE="${type}" \
- DATADIR="${dir}" \
- LOCALBASE=/usr \
- LIBDIR="/usr/$(get_libdir)"/${PN} \
- WITH_QMAX=$(yesno qmax) \
- BUILD_3ZB2=$(yesno mods) \
- BUILD_CTF=$(yesno mods) \
- BUILD_JABOT=$(yesno mods) \
- BUILD_ROGUE=$(yesno mods) \
- BUILD_XATRIX=$(yesno mods) \
- BUILD_ZAERO=$(yesno mods) \
- WITH_BOTS=$(yesno mods) \
- HAVE_IPV6=$(yesno ipv6) \
- CC="$(tc-getCC)" \
- WITH_X86_ASM=NO \
- WITH_DATADIR=YES \
- WITH_LIBDIR=YES \
- BUILD_DEBUG_DIR=release \
+ local myemakeargs=(
+ BUILD_QUAKE2="${client}"
+ BUILD_DEDICATED=$(yesno dedicated)
+ BUILD_GLX=$(yesno opengl)
+ BUILD_SDLGL=$(yesno sdl)
+ BUILD_ALSA_SND=NO
+ BUILD_SDL_SND=$(yesno sdl)
+ BUILD_OSS_SND=$(yesno oss)
+ WITH_XMMS=NO
+ WITH_DGA_MOUSE=$(yesno dga)
+ WITH_JOYSTICK=$(yesno joystick)
+ TYPE="${type}"
+ DATADIR="${dir}"
+ LOCALBASE=/usr
+ LIBDIR="/usr/$(get_libdir)"/${PN}
+ WITH_QMAX=$(yesno qmax)
+ BUILD_3ZB2=$(yesno mods)
+ BUILD_CTF=$(yesno mods)
+ BUILD_JABOT=$(yesno mods)
+ BUILD_ROGUE=$(yesno mods)
+ BUILD_XATRIX=$(yesno mods)
+ BUILD_ZAERO=$(yesno mods)
+ WITH_BOTS=$(yesno mods)
+ HAVE_IPV6=$(yesno ipv6)
+ CC="$(tc-getCC)"
+ WITH_X86_ASM=NO
+ WITH_DATADIR=YES
+ WITH_LIBDIR=YES
+ BUILD_DEBUG_DIR=release
BUILD_RELEASE_DIR=release
+ )
+
+ emake "${myemakeargs[@]}"
}
src_install() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-fps/qudos/files/, games-fps/qudos/
@ 2021-04-06 20:43 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-04-06 20:43 UTC (permalink / raw
To: gentoo-commits
commit: bc70afdf256aa8e9415e79eaa24d3207354eef3a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 6 20:36:59 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 6 20:42:51 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc70afdf
games-fps/qudos: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <sam <AT> gentoo.org>
games-fps/qudos/files/qudos-0.40.1-gnusource.patch | 4 +-
games-fps/qudos/files/qudos-0.40.1-libpng15.patch | 4 +-
games-fps/qudos/qudos-0.40.1.ebuild | 52 +++++++++++++---------
3 files changed, 34 insertions(+), 26 deletions(-)
diff --git a/games-fps/qudos/files/qudos-0.40.1-gnusource.patch b/games-fps/qudos/files/qudos-0.40.1-gnusource.patch
index dd2113b0c3b..b82a276b012 100644
--- a/games-fps/qudos/files/qudos-0.40.1-gnusource.patch
+++ b/games-fps/qudos/files/qudos-0.40.1-gnusource.patch
@@ -1,5 +1,5 @@
---- src/unix/qsh_unix.c.orig 2011-10-22 17:46:37.665993357 -0500
-+++ src/unix/qsh_unix.c 2011-10-22 17:46:40.965972209 -0500
+--- a/src/unix/qsh_unix.c
++++ b/src/unix/qsh_unix.c
@@ -17,6 +17,9 @@
* Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
diff --git a/games-fps/qudos/files/qudos-0.40.1-libpng15.patch b/games-fps/qudos/files/qudos-0.40.1-libpng15.patch
index ecf9de9370e..633215be34b 100644
--- a/games-fps/qudos/files/qudos-0.40.1-libpng15.patch
+++ b/games-fps/qudos/files/qudos-0.40.1-libpng15.patch
@@ -1,5 +1,5 @@
---- src/ref_gl/gl_local.h
-+++ src/ref_gl/gl_local.h
+--- a/src/ref_gl/gl_local.h
++++ b/src/ref_gl/gl_local.h
@@ -29,6 +29,7 @@
#include <GL/glu.h>
#include <GL/glext.h>
diff --git a/games-fps/qudos/qudos-0.40.1.ebuild b/games-fps/qudos/qudos-0.40.1.ebuild
index 1c167f70ec4..24a6a4e0161 100644
--- a/games-fps/qudos/qudos-0.40.1.ebuild
+++ b/games-fps/qudos/qudos-0.40.1.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils flag-o-matic toolchain-funcs games
+inherit desktop flag-o-matic toolchain-funcs
FILE_STEM="QuDos-${PV}-src"
PK3_FILE="QuDos-${PV}.pk3"
@@ -13,6 +13,7 @@ DESCRIPTION="Enhanced Quake 2 engine"
HOMEPAGE="https://github.com/ZwS/qudos"
SRC_URI="mirror://gentoo/${FILE_STEM}.tar.bz2
https://github.com/ZwS/qudos/raw/master/quake2/baseq2/qudos.pk3 -> ${PK3_FILE}"
+S="${WORKDIR}"/${FILE_STEM}
LICENSE="GPL-2+"
SLOT="0"
@@ -34,13 +35,19 @@ DEPEND="opengl? (
x11-libs/libXext
x11-libs/libXxf86dga
x11-libs/libXxf86vm"
-RDEPEND="${DEPEND}
+RDEPEND="
+ ${DEPEND}
cdinstall? ( games-fps/quake2-data )
demo? ( games-fps/quake2-demodata[symlink] )
- textures? ( games-fps/quake2-textures )"
+ textures? ( games-fps/quake2-textures )
+"
-S=${WORKDIR}/${FILE_STEM}
-dir=${GAMES_DATADIR}/${MY_PN}
+dir=usr/share/${MY_PN}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libpng15.patch
+ "${FILESDIR}"/${P}-gnusource.patch
+)
default_client() {
if use opengl || use sdl || ! use dedicated ; then
@@ -51,8 +58,6 @@ default_client() {
}
pkg_setup() {
- games_pkg_setup
-
if ! use qmax && $( use opengl || use sdl ) ; then
elog "The 'qmax' graphical improvements are recommended."
echo
@@ -85,12 +90,12 @@ src_unpack() {
}
src_prepare() {
- rm docs/gnu.txt
+ rm docs/gnu.txt || die
# Change default sound driver and its location
sed -i \
-e "s:\"oss\":\"${snd_drv}\":" \
- -e "s:\"\./snd:\"$(games_get_libdir)/${PN}/snd:" \
+ -e "s:\"\./snd:\"/usr/$(get_libdir)/${PN}/snd:" \
src/client/snd_dma.c || die
sed -i \
@@ -102,11 +107,12 @@ src_prepare() {
-e '1i#define OF(x) x' \
src/qcommon/unzip/ioapi.h || die
fi
+
sed -i -e '106,119 s/CFL/LED/' Makefile || die
- epatch \
- "${FILESDIR}"/${P}-libpng15.patch \
- "${FILESDIR}"/${P}-gnusource.patch
+ sed -i -e 's:-L/usr/lib -L$(LOCALBASE)/lib :: ' Makefile || die
+
+ default
}
src_configure() {
@@ -115,7 +121,9 @@ src_configure() {
}
src_compile() {
- yesno() { usex $1 YES NO; }
+ yesno() {
+ usex ${1} YES NO;
+ }
local client="YES"
default_client || client="NO"
@@ -137,7 +145,7 @@ src_compile() {
TYPE="${type}" \
DATADIR="${dir}" \
LOCALBASE=/usr \
- LIBDIR="$(games_get_libdir)"/${PN} \
+ LIBDIR="/usr/$(get_libdir)"/${PN} \
WITH_QMAX=$(yesno qmax) \
BUILD_3ZB2=$(yesno mods) \
BUILD_CTF=$(yesno mods) \
@@ -157,24 +165,24 @@ src_compile() {
src_install() {
if default_client ; then
- newgamesbin ${MY_PN}/QuDos ${PN}
+ newbin ${MY_PN}/QuDos ${PN}
+
# Change from gif to png in next version?
newicon docs/q2_orig/quake2.gif ${PN}.gif
+
make_desktop_entry ${PN} "QuDos" ${PN}.gif
fi
if use dedicated ; then
- newgamesbin ${MY_PN}/QuDos-ded ${PN}-ded
+ newbin ${MY_PN}/QuDos-ded ${PN}-ded
fi
- insinto "$(games_get_libdir)"/${PN}
+ insinto "/usr/$(get_libdir)"/${PN}
doins -r ${MY_PN}/*
- rm "${D}/$(games_get_libdir)"/${PN}/QuDos
+ rm "${ED}/usr/$(get_libdir)"/${PN}/QuDos || die
- insinto "$(games_get_libdir)"/${PN}/baseq2
+ insinto "/usr/$(get_libdir)"/${PN}/baseq2
newins "${DISTDIR}/${PK3_FILE}" qudos.pk3
dodoc $(find docs -name \*.txt) docs/q2_orig/README*
-
- prepgamesdirs
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-24 19:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 19:26 [gentoo-commits] repo/gentoo:master commit in: games-fps/qudos/files/, games-fps/qudos/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2021-04-06 20:43 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox