commit:     2aee9b2b00201ad5cd25b44e803e1d93c63c86ed
Author:     Abdelrahman Sarhan <abdulrahmanayman1 <AT> gmail <DOT> com>
AuthorDate: Mon Oct 21 23:40:28 2024 +0000
Commit:     Abdelrahman Sarhan <abdulrahmanayman1 <AT> gmail <DOT> com>
CommitDate: Mon Oct 21 23:40:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2aee9b2b

games-fps/crispy-doom: Fixed configure.ac overwriting CFLAGS and LDFLAGS

Signed-off-by: Abdelrahman Sarhan <abdulrahmanayman1 <AT> gmail.com>

 games-fps/crispy-doom/crispy-doom-5.12.0.ebuild           |  4 ++++
 games-fps/crispy-doom/crispy-doom-6.0.ebuild              |  4 ++++
 .../crispy-doom/files/crispy-doom-5.12.0-makeopts.patch   | 15 +++++++++++++++
 .../crispy-doom/files/crispy-doom-6.0-makeopts.patch      | 15 +++++++++++++++
 4 files changed, 38 insertions(+)

diff --git a/games-fps/crispy-doom/crispy-doom-5.12.0.ebuild 
b/games-fps/crispy-doom/crispy-doom-5.12.0.ebuild
index 60823967d..61c3883e0 100644
--- a/games-fps/crispy-doom/crispy-doom-5.12.0.ebuild
+++ b/games-fps/crispy-doom/crispy-doom-5.12.0.ebuild
@@ -50,6 +50,10 @@ src_prepare() {
        eautoreconf
 }
 
+PATCHES=(
+       "${FILESDIR}"/${P}-makeopts.patch
+)
+
 src_configure() {
        econf \
                --enable-bash-completion \

diff --git a/games-fps/crispy-doom/crispy-doom-6.0.ebuild 
b/games-fps/crispy-doom/crispy-doom-6.0.ebuild
index f4dfd0191..ede240fb3 100644
--- a/games-fps/crispy-doom/crispy-doom-6.0.ebuild
+++ b/games-fps/crispy-doom/crispy-doom-6.0.ebuild
@@ -43,6 +43,10 @@ DOCS=(
        "README.Strife.md"
 )
 
+PATCHES=(
+       "${FILESDIR}"/"${P}"-makeopts.patch
+)
+
 src_prepare() {
        default
 

diff --git a/games-fps/crispy-doom/files/crispy-doom-5.12.0-makeopts.patch 
b/games-fps/crispy-doom/files/crispy-doom-5.12.0-makeopts.patch
new file mode 100644
index 000000000..876ab1898
--- /dev/null
+++ b/games-fps/crispy-doom/files/crispy-doom-5.12.0-makeopts.patch
@@ -0,0 +1,15 @@
+--- a/configure.ac     2024-10-21 18:54:07.483980753 -0400
++++ b/configure.ac     2024-10-21 18:54:52.224330577 -0400
+@@ -166,8 +166,10 @@
+ 
+ # TODO: We currently link everything against libraries that don't need it.
+ # Use the specific library CFLAGS/LIBS variables instead of setting them here.
+-CFLAGS="$CFLAGS $SDL_CFLAGS ${SAMPLERATE_CFLAGS:-} ${PNG_CFLAGS:-} 
${LIBZ_CFLAGS:-}"
+-LDFLAGS="$LDFLAGS $SDL_LIBS ${SAMPLERATE_LIBS:-} ${PNG_LIBS:-} ${LIBZ_LIBS:-}"
++UCFLAGS:=$(shell emerge --info | grep CFLAGS=".*" | cut -d'"' -f2)
++ULDFLAGS:=$(shell emerge --info | grep LDFLAGS=".*" | cut -d'"' -f2)
++CFLAGS+="$UCFLAGS $SDL_CFLAGS ${SAMPLERATE_CFLAGS:-} ${PNG_CFLAGS:-} 
${LIBZ_CFLAGS:-}"
++LDFLAGS+="$ULDFLAGS $SDL_LIBS ${SAMPLERATE_LIBS:-} ${PNG_LIBS:-} 
${LIBZ_LIBS:-}"
+ case "$host" in
+   *-*-mingw* | *-*-cygwin* | *-*-msvc* )
+     LDFLAGS="$LDFLAGS -lwinmm"

diff --git a/games-fps/crispy-doom/files/crispy-doom-6.0-makeopts.patch 
b/games-fps/crispy-doom/files/crispy-doom-6.0-makeopts.patch
new file mode 100644
index 000000000..4e4d72d3f
--- /dev/null
+++ b/games-fps/crispy-doom/files/crispy-doom-6.0-makeopts.patch
@@ -0,0 +1,15 @@
+--- a/configure.ac     2023-03-31 16:42:24.000000000 -0400
++++ b/configure.ac     2024-10-21 19:11:20.577093421 -0400
+@@ -184,8 +184,10 @@
+ 
+ # TODO: We currently link everything against libraries that don't need it.
+ # Use the specific library CFLAGS/LIBS variables instead of setting them here.
+-CFLAGS="$CFLAGS $SDL_CFLAGS ${SAMPLERATE_CFLAGS:-} ${PNG_CFLAGS:-} 
${FLUIDSYNTH_CFLAGS:-} ${LIBZ_CFLAGS:-}"
+-LDFLAGS="$LDFLAGS $SDL_LIBS ${SAMPLERATE_LIBS:-} ${PNG_LIBS:-} 
${FLUIDSYNTH_LIBS:-} ${LIBZ_LIBS:-}"
++UCFLAGS:=$(shell emerge --info | grep CFLAGS=".*" | cut -d'"' -f2)
++ULDFLAGS:=$(shell emerge --info | grep LDFLAGS=".*" | cut -d'"' -f2)
++CFLAGS+="$UCFLAGS $SDL_CFLAGS ${SAMPLERATE_CFLAGS:-} ${PNG_CFLAGS:-} 
${LIBZ_CFLAGS:-}"
++LDFLAGS+="$ULDFLAGS $SDL_LIBS ${SAMPLERATE_LIBS:-} ${PNG_LIBS:-} 
${LIBZ_LIBS:-}"
+ case "$host" in
+   *-*-mingw* | *-*-cygwin* | *-*-msvc* )
+     LDFLAGS="$LDFLAGS -lwinmm"

Reply via email to