summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2023-02-06 15:12:15 +0100
committerMaciej Barć <xgqt@gentoo.org>2023-02-06 18:23:18 +0100
commitd2b700163970908b03466ad2e07616c5e92623cd (patch)
tree4a4e12a727a0e7cceb0102e0a1dd767954ff4c20 /sci-mathematics/vampire
parentapp-emacs/wgrep: add bugs-to to metadata (diff)
downloadgentoo-d2b700163970908b03466ad2e07616c5e92623cd.tar.gz
gentoo-d2b700163970908b03466ad2e07616c5e92623cd.tar.bz2
gentoo-d2b700163970908b03466ad2e07616c5e92623cd.zip
sci-mathematics/vampire: fix build on musl
Bug: https://github.com/vprover/vampire/pull/432 Closes: https://bugs.gentoo.org/832834 Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'sci-mathematics/vampire')
-rw-r--r--sci-mathematics/vampire/files/vampire-4.6.1-musl.patch40
-rw-r--r--sci-mathematics/vampire/vampire-4.6.1-r2.ebuild4
-rw-r--r--sci-mathematics/vampire/vampire-4.7-r1.ebuild10
3 files changed, 49 insertions, 5 deletions
diff --git a/sci-mathematics/vampire/files/vampire-4.6.1-musl.patch b/sci-mathematics/vampire/files/vampire-4.6.1-musl.patch
new file mode 100644
index 000000000000..4d3d4c56041e
--- /dev/null
+++ b/sci-mathematics/vampire/files/vampire-4.6.1-musl.patch
@@ -0,0 +1,40 @@
+From 48733f4e2d9500b3bdc54563cf117c7fa07193ed Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Maciej=20Bar=C4=87?= <xgqt@gentoo.org>
+Date: Mon, 6 Feb 2023 14:34:05 +0100
+Subject: [PATCH] Minisat/utils/System.*: use fpu_control only on glibc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Maciej Barć <xgqt@gentoo.org>
+---
+ Minisat/utils/System.cc | 2 +-
+ Minisat/utils/System.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Minisat/utils/System.cc b/Minisat/utils/System.cc
+index 942ddb712..2936faa5d 100644
+--- a/Minisat/utils/System.cc
++++ b/Minisat/utils/System.cc
+@@ -104,7 +104,7 @@ double Minisat::memUsedPeak(bool) {
+
+ void Minisat::setX86FPUPrecision()
+ {
+-#if defined(__linux__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
++#if defined(__GLIBC__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
+ // Only correct FPU precision on Linux architectures that needs and supports it:
+ fpu_control_t oldcw, newcw;
+ _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
+diff --git a/Minisat/utils/System.h b/Minisat/utils/System.h
+index ecdde991b..fd501eeec 100644
+--- a/Minisat/utils/System.h
++++ b/Minisat/utils/System.h
+@@ -26,7 +26,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
+ #ifndef Minisat_System_h
+ #define Minisat_System_h
+
+-#if defined(__linux__)
++#if defined(__GLIBC__)
+ #include <fpu_control.h>
+ #endif
+
diff --git a/sci-mathematics/vampire/vampire-4.6.1-r2.ebuild b/sci-mathematics/vampire/vampire-4.6.1-r2.ebuild
index d5579bce688d..0d3a66debc59 100644
--- a/sci-mathematics/vampire/vampire-4.6.1-r2.ebuild
+++ b/sci-mathematics/vampire/vampire-4.6.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -32,6 +32,8 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}"/${P}-musl.patch )
+
src_configure() {
# -Werror=strict-aliasing warnings, bug #863269
filter-lto
diff --git a/sci-mathematics/vampire/vampire-4.7-r1.ebuild b/sci-mathematics/vampire/vampire-4.7-r1.ebuild
index 69e581237127..975da65ac817 100644
--- a/sci-mathematics/vampire/vampire-4.7-r1.ebuild
+++ b/sci-mathematics/vampire/vampire-4.7-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-H=2d02e4655e1b08d1ca9ee7c0aade40f59f046460 # "bump to 4.7"
+[[ ${PV} == 4.7 ]] && COMMIT=2d02e4655e1b08d1ca9ee7c0aade40f59f046460 # "bump to 4.7"
inherit flag-o-matic cmake
@@ -15,9 +15,9 @@ if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="https://github.com/vprover/${PN}.git"
EGIT_SUBMODULES=()
else
- SRC_URI="https://github.com/vprover/${PN}/archive/${H}.tar.gz
+ SRC_URI="https://github.com/vprover/${PN}/archive/${COMMIT}.tar.gz
-> ${P}.tar.gz"
- S="${WORKDIR}"/${PN}-${H}
+ S="${WORKDIR}"/${PN}-${COMMIT}
KEYWORDS="~amd64 ~x86"
fi
@@ -36,6 +36,8 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}"/${PN}-4.6.1-musl.patch )
+
src_configure() {
# -Werror=strict-aliasing warnings, bug #863269
filter-lto