commit:     f6a75a2ad081130e857ddd4f4d1e6f462a9231ec
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Wed Oct 16 14:06:16 2024 +0000
Commit:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
CommitDate: Wed Oct 16 14:06:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f6a75a2a

games-fps/quakespasm: fix RDEPEND and *FLAGS

Closes: https://bugs.gentoo.org/795759
Closes: https://bugs.gentoo.org/810568
Closes: https://bugs.gentoo.org/887677
Closes: https://bugs.gentoo.org/932489
Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 .../files/quakespasm-0.94.1-makefile.patch          | 20 ++++++++++++++++++++
 ...sm-0.94.1.ebuild => quakespasm-0.94.1-r1.ebuild} | 21 ++++++++++++---------
 games-fps/quakespasm/quakespasm-9999.ebuild         | 21 ++++++++++++---------
 3 files changed, 44 insertions(+), 18 deletions(-)

diff --git a/games-fps/quakespasm/files/quakespasm-0.94.1-makefile.patch 
b/games-fps/quakespasm/files/quakespasm-0.94.1-makefile.patch
new file mode 100644
index 000000000..e3ce6b14b
--- /dev/null
+++ b/games-fps/quakespasm/files/quakespasm-0.94.1-makefile.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/795759
+https://bugs.gentoo.org/887677
+--- a/Quake/Makefile
++++ b/Quake/Makefile
+@@ -49,7 +49,6 @@ STRIP ?= strip
+ PKG_CONFIG ?= pkg-config
+ 
+ CPUFLAGS=
+-LDFLAGS =
+ DFLAGS ?=
+ CFLAGS ?= -Wall -Wno-trigraphs
+ CFLAGS += $(CPUFLAGS)
+@@ -59,7 +58,6 @@ CFLAGS += -g
+ do_strip=
+ else
+ DFLAGS += -DNDEBUG
+-CFLAGS += -O2
+ CFLAGS += $(call check_gcc,-fweb,)
+ CFLAGS += $(call check_gcc,-frename-registers,)
+ cmd_strip=$(STRIP) $(1)

diff --git a/games-fps/quakespasm/quakespasm-0.94.1.ebuild 
b/games-fps/quakespasm/quakespasm-0.94.1-r1.ebuild
similarity index 67%
rename from games-fps/quakespasm/quakespasm-0.94.1.ebuild
rename to games-fps/quakespasm/quakespasm-0.94.1-r1.ebuild
index c24a38b76..bb4bf5b49 100644
--- a/games-fps/quakespasm/quakespasm-0.94.1.ebuild
+++ b/games-fps/quakespasm/quakespasm-0.94.1-r1.ebuild
@@ -1,13 +1,13 @@
 # Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 if [[ "${PV}" == "9999" ]]; then
        inherit git-r3
-       EGIT_REPO_URI="git://git.code.sf.net/p/quakespasm/quakespasm.git"
+       EGIT_REPO_URI="https://git.code.sf.net/p/quakespasm/quakespasm";
 else
-       SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz";
+       
SRC_URI="https://downloads.sourceforge.net/project/${PN}/Source/${P}.tar.gz";
        KEYWORDS="~amd64"
 fi
 
@@ -18,17 +18,20 @@ SLOT="0"
 IUSE="sdl2"
 
 DEPEND="
-       media-libs/libvorbis
-       media-libs/libogg
+       media-libs/libglvnd
        media-libs/libmad
-       virtual/opengl
-       virtual/glu
-       sdl2? ( media-libs/libsdl2 )
-       !sdl2? ( media-libs/libsdl )
+       media-libs/libvorbis
+       sdl2? ( media-libs/libsdl2[opengl] )
+       !sdl2? ( media-libs/libsdl[opengl] )
 "
 RDEPEND="${DEPEND}"
 DOCS=( Quakespasm.html  Quakespasm-Music.txt  Quakespasm.txt )
 
+PATCHES=(
+       # bug 795759, 887677
+       "${FILESDIR}/${P}-makefile.patch"
+)
+
 src_compile() {
        cd Quake || die
        emake COMMON_LIBS="-lm -lOpenGL" USE_SDL2=$(usex sdl2 1 0) 
STRIP="/bin/true"

diff --git a/games-fps/quakespasm/quakespasm-9999.ebuild 
b/games-fps/quakespasm/quakespasm-9999.ebuild
index c24a38b76..06e9ceb72 100644
--- a/games-fps/quakespasm/quakespasm-9999.ebuild
+++ b/games-fps/quakespasm/quakespasm-9999.ebuild
@@ -1,13 +1,13 @@
 # Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 if [[ "${PV}" == "9999" ]]; then
        inherit git-r3
-       EGIT_REPO_URI="git://git.code.sf.net/p/quakespasm/quakespasm.git"
+       EGIT_REPO_URI="https://git.code.sf.net/p/quakespasm/quakespasm";
 else
-       SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz";
+       
SRC_URI="https://downloads.sourceforge.net/project/${PN}/Source/${P}.tar.gz";
        KEYWORDS="~amd64"
 fi
 
@@ -18,17 +18,20 @@ SLOT="0"
 IUSE="sdl2"
 
 DEPEND="
-       media-libs/libvorbis
-       media-libs/libogg
+       media-libs/libglvnd
        media-libs/libmad
-       virtual/opengl
-       virtual/glu
-       sdl2? ( media-libs/libsdl2 )
-       !sdl2? ( media-libs/libsdl )
+       media-libs/libvorbis
+       sdl2? ( media-libs/libsdl2[opengl] )
+       !sdl2? ( media-libs/libsdl[opengl] )
 "
 RDEPEND="${DEPEND}"
 DOCS=( Quakespasm.html  Quakespasm-Music.txt  Quakespasm.txt )
 
+src_prepare() {
+       sed -i '/^CFLAGS += -O2$/d' Quake/Makefile || die
+       default
+}
+
 src_compile() {
        cd Quake || die
        emake COMMON_LIBS="-lm -lOpenGL" USE_SDL2=$(usex sdl2 1 0) 
STRIP="/bin/true"

Reply via email to