commit:     13ffdf4047a68a930f6acd9e07d002aa17b390ef
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  5 13:16:10 2025 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 14:02:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13ffdf40

sci-mathematics/giac: fix hard-coded g++

Add a patch to delete a rule in src/Makefile.am. If we delete the rule,
it does the right thing on its own.

Closes: https://bugs.gentoo.org/947000
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../giac/files/giac-1.9.0.995-dont-call-g++.patch  | 29 ++++++++++++++++++++++
 sci-mathematics/giac/giac-1.9.0.995-r2.ebuild      |  3 ++-
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/giac/files/giac-1.9.0.995-dont-call-g++.patch 
b/sci-mathematics/giac/files/giac-1.9.0.995-dont-call-g++.patch
new file mode 100644
index 000000000000..d97be3b39002
--- /dev/null
+++ b/sci-mathematics/giac/files/giac-1.9.0.995-dont-call-g++.patch
@@ -0,0 +1,29 @@
+From 7328ad0895add9acb91f28312c80770530c8be52 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <[email protected]>
+Date: Sun, 5 Jan 2025 08:13:35 -0500
+Subject: [PATCH] src/Makefile.am: delete mkjs rule
+
+There's a custom rule to build mkjs from mkjs.cc, and it hard-codes
+the compiler name (g++). But since building an executable from C++
+source is built-in to Make, we can just delete the rule to fix it.
+---
+ src/Makefile.am | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 7524632..a6c4767 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -70,9 +70,6 @@ js.c: mkjs qjscalcjs.js xcasjs.js
+ js.h: mkjs qjscalcjs.js xcasjs.js
+       ./mkjs
+ 
+-mkjs: mkjs.cc
+-      g++ mkjs.cc -o mkjs
+-
+ AM_CPPFLAGS = -DIN_GIAC -I$(srcdir) -I$(top_srcdir) -I$(builddir) \
+             -I$(top_builddir) $(GMP_CFLAGS) $(NTL_CFLAGS) \
+             $(COCOA_CFLAGS) $(PARI_CFLAGS)
+-- 
+2.45.2
+

diff --git a/sci-mathematics/giac/giac-1.9.0.995-r2.ebuild 
b/sci-mathematics/giac/giac-1.9.0.995-r2.ebuild
index a0a875aadaa6..b0958f787c0a 100644
--- a/sci-mathematics/giac/giac-1.9.0.995-r2.ebuild
+++ b/sci-mathematics/giac/giac-1.9.0.995-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -60,6 +60,7 @@ PATCHES=(
        "${FILESDIR}/${PN}-1.9.0.67-system-gl2ps.patch"
        "${FILESDIR}/${P}-glibcxx-assertions.patch"
        "${FILESDIR}/${P}-fix-undefined-behavior.patch"
+       "${FILESDIR}/${P}-dont-call-g++.patch"
 )
 
 REQUIRED_USE="test? ( gui )"

Reply via email to