diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2024-05-20 15:03:04 +0200 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2024-05-20 15:03:54 +0200 |
commit | c11cbec28dbd063e597839ed1603f9bea62d3e73 (patch) | |
tree | 09f32e17295e591aa53c793d738e7e40e8e42e2e /sci-mathematics | |
parent | profiles/package.mask: treeclean abandoned dev-dotnet packages (diff) | |
download | gentoo-c11cbec28dbd063e597839ed1603f9bea62d3e73.tar.gz gentoo-c11cbec28dbd063e597839ed1603f9bea62d3e73.tar.bz2 gentoo-c11cbec28dbd063e597839ed1603f9bea62d3e73.zip |
sci-mathematics/cvc4: fix musl build
Closes: https://bugs.gentoo.org/839402
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/cvc4/cvc4-1.8-r5.ebuild | 11 | ||||
-rw-r--r-- | sci-mathematics/cvc4/files/cvc4-1.8-musl.patch | 80 |
2 files changed, 89 insertions, 2 deletions
diff --git a/sci-mathematics/cvc4/cvc4-1.8-r5.ebuild b/sci-mathematics/cvc4/cvc4-1.8-r5.ebuild index 6de0fc9372aa..4870f7af7ba6 100644 --- a/sci-mathematics/cvc4/cvc4-1.8-r5.ebuild +++ b/sci-mathematics/cvc4/cvc4-1.8-r5.ebuild @@ -11,6 +11,8 @@ DESCRIPTION="Automatic theorem prover for satisfiability modulo theories (SMT) p HOMEPAGE="https://cvc4.github.io/" SRC_URI="https://github.com/CVC4/CVC4-archived/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}"/${PN^^}-archived-${PV} + LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" @@ -28,8 +30,6 @@ BDEPEND="$(python_gen_any_dep ' ') " -S="${WORKDIR}"/${PN^^}-archived-${PV} - PATCHES=( "${FILESDIR}"/${P}-gentoo.patch "${FILESDIR}"/${P}-toml.patch @@ -40,6 +40,13 @@ python_check_deps() { python_has_version "dev-python/tomli[${PYTHON_USEDEP}]" } +src_prepare() { + cmake_src_prepare + if use elibc_musl ; then + eapply "${FILESDIR}"/${P}-musl.patch + fi +} + src_configure() { local mycmakeargs=( -DANTLR_BINARY=/usr/bin/antlr3 diff --git a/sci-mathematics/cvc4/files/cvc4-1.8-musl.patch b/sci-mathematics/cvc4/files/cvc4-1.8-musl.patch new file mode 100644 index 000000000000..3448f9bab64f --- /dev/null +++ b/sci-mathematics/cvc4/files/cvc4-1.8-musl.patch @@ -0,0 +1,80 @@ +--- a/src/prop/bvminisat/simp/Main.cc 2024-05-20 14:52:26.827202665 +0200 ++++ b/src/prop/bvminisat/simp/Main.cc 2024-05-20 14:53:05.967758613 +0200 +@@ -80,11 +80,6 @@ + setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n"); + // printf("This is MiniSat 2.0 beta\n"); + +-#if defined(__linux__) +- fpu_control_t oldcw, newcw; +- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); +- printf("WARNING: for repeatability, setting FPU to use double precision\n"); +-#endif + // Extra options: + // + IntOption verb ("MAIN", "verb", "Verbosity level (0=silent, 1=some, 2=more).", 1, IntRange(0, 2)); +--- a/src/prop/bvminisat/core/Main.cc 2024-05-20 14:52:35.361105845 +0200 ++++ b/src/prop/bvminisat/core/Main.cc 2024-05-20 14:53:27.116518689 +0200 +@@ -80,11 +80,6 @@ + setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n"); + // printf("This is MiniSat 2.0 beta\n"); + +-#if defined(__linux__) +- fpu_control_t oldcw, newcw; +- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); +- printf("WARNING: for repeatability, setting FPU to use double precision\n"); +-#endif + // Extra options: + // + IntOption verb ("MAIN", "verb", "Verbosity level (0=silent, 1=some, 2=more).", 1, IntRange(0, 2)); +--- a/src/prop/minisat/simp/Main.cc 2024-05-20 14:52:44.044007338 +0200 ++++ b/src/prop/minisat/simp/Main.cc 2024-05-20 14:53:39.356379840 +0200 +@@ -81,11 +81,6 @@ + setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n"); + // printf("This is MiniSat 2.0 beta\n"); + +-#if defined(__linux__) +- fpu_control_t oldcw, newcw; +- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); +- printf("WARNING: for repeatability, setting FPU to use double precision\n"); +-#endif + // Extra options: + // + IntOption verb ("MAIN", "verb", "Verbosity level (0=silent, 1=some, 2=more).", 1, IntRange(0, 2)); +--- a/src/prop/minisat/core/Main.cc 2024-05-20 14:52:50.063939036 +0200 ++++ b/src/prop/minisat/core/Main.cc 2024-05-20 14:53:53.834215599 +0200 +@@ -79,11 +79,6 @@ + setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n"); + // printf("This is MiniSat 2.0 beta\n"); + +-#if defined(__linux__) +- fpu_control_t oldcw, newcw; +- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); +- printf("WARNING: for repeatability, setting FPU to use double precision\n"); +-#endif + // Extra options: + // + IntOption verb ("MAIN", "verb", "Verbosity level (0=silent, 1=some, 2=more).", 1, IntRange(0, 2)); +--- a/src/prop/bvminisat/utils/System.h 2024-05-20 14:54:23.301881326 +0200 ++++ b/src/prop/bvminisat/utils/System.h 2024-05-20 14:54:42.030668881 +0200 +@@ -21,9 +21,6 @@ + #ifndef BVMinisat_System_h + #define BVMinisat_System_h + +-#if defined(__linux__) +-#include <fpu_control.h> +-#endif + + #include "prop/bvminisat/mtl/IntTypes.h" + +--- a/src/prop/minisat/utils/System.h 2024-05-20 14:54:28.650820656 +0200 ++++ b/src/prop/minisat/utils/System.h 2024-05-20 14:54:55.435516829 +0200 +@@ -21,9 +21,6 @@ + #ifndef Minisat_System_h + #define Minisat_System_h + +-#if defined(__linux__) +-#include <fpu_control.h> +-#endif + + #include "prop/minisat/mtl/IntTypes.h" + |