commit:     6e25dc1d7ed57c393af79dd773144323c5a213cb
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 15 22:02:51 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 15 22:07:56 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e25dc1d

media-gfx/mandelbulber: fix build when dev-cpp/ms-gsl is installed

By injecting -I/usr/include/gsl, `#include <algorithm>` starts to mean
"use ms-gsl's algorithm" rather than the C++ stdlib one. But all of the
includes for ms-gsl here are properly namespaced, e.g. <gsl/foo.h>, so
we can drop the explicit -I*.

Closes: https://bugs.gentoo.org/834692
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../mandelbulber/files/mandelbulber-2.33-gsl.patch     | 18 ++++++++++++++++++
 media-gfx/mandelbulber/mandelbulber-2.33.ebuild        |  4 ++++
 2 files changed, 22 insertions(+)

diff --git a/media-gfx/mandelbulber/files/mandelbulber-2.33-gsl.patch 
b/media-gfx/mandelbulber/files/mandelbulber-2.33-gsl.patch
new file mode 100644
index 000000000000..c047276b3c03
--- /dev/null
+++ b/media-gfx/mandelbulber/files/mandelbulber-2.33-gsl.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/834692
+https://github.com/buddhi1980/mandelbulber2/pull/972
+https://github.com/microsoft/GSL/issues/466
+
+By injecting -I/usr/include/gsl, `#include <algorithm>` starts to mean
+"use ms-gsl's algorithm" rather than the C++ stdlib one. But all of the
+includes for ms-gsl here are properly namespaced, e.g. <gsl/foo.h>, so
+we can drop the explicit -I*.
+--- a/makefiles/common.pri
++++ b/makefiles/common.pri
+@@ -122,7 +122,6 @@ macx:DEFINES += "SHARED_DIR_IS_APP_DIR"
+ # test hardcoded lib path for gsl in travis container 
+ #QMAKE_CXXFLAGS += -I/usr/include/gsl
+ 
+-QMAKE_CXXFLAGS += -I/usr/include/gsl
+ m1:QMAKE_CXXFLAGS += -I/opt/homebrew/include
+ 
+ # library linking

diff --git a/media-gfx/mandelbulber/mandelbulber-2.33.ebuild 
b/media-gfx/mandelbulber/mandelbulber-2.33.ebuild
index 42b9f0c2d491..dc9c8f1b91bd 100644
--- a/media-gfx/mandelbulber/mandelbulber-2.33.ebuild
+++ b/media-gfx/mandelbulber/mandelbulber-2.33.ebuild
@@ -41,6 +41,10 @@ DEPEND="${RDEPEND}
 "
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.33-gsl.patch
+)
+
 pkg_pretend() {
        [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp
 }

Reply via email to