diff --git a/science-libs/minisat/BUILD b/science-libs/minisat/BUILD
new file mode 100755
index 0000000..534561c
--- /dev/null
+++ b/science-libs/minisat/BUILD
@@ -0,0 +1,2 @@
+CFLAGS+=' -fpermissive -Wno-literal-suffix' &&
+default_build_make -C simp r MROOT="$PWD"
diff --git a/science-libs/minisat/DETAILS b/science-libs/minisat/DETAILS
new file mode 100755
index 0000000..a1bf982
--- /dev/null
+++ b/science-libs/minisat/DETAILS
@@ -0,0 +1,29 @@
+# Watch: http://minisat.se/downloads/
+ SPELL=minisat
+ VERSION=2.2.0
+ SOURCE="$SPELL-$VERSION.tar.gz"
+ SOURCE_URL[0]=http://minisat.se/downloads/$SOURCE
+
SOURCE_HASH=sha512:cf79b05d43ebdc8fd8081899a1f853370de051cafe6e5b143eaff9827efc542b58062782a3ce2a3d1a03561a9ffd780c9cdc645bb50036eb61e80fa729136e64
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL"
+ WEB_SITE="http://minisat.se/"
+ LICENSE[0]="MIT"
+ ENTERED=20250515
+ KEYWORDS=""
+ SHORT="minimalistic, open-source SAT solver"
+cat << EOF
+MiniSat is a minimalistic, open-source SAT solver, developed to help
+researchers and developers alike to get started on SAT.
+
+Some key features of MiniSat:
+
+* Easy to modify. MiniSat is small and well-documented, and possibly also
+ well-designed, making it an ideal starting point for adapting SAT based
+ techniques to domain specific problems.
+* Highly efficient. Winning all the industrial categories of the SAT 2005
+ competition, MiniSat is a good starting point both for future research in
+ SAT, and for applications using SAT.
+* Designed for integration. MiniSat supports incremental SAT and has
+ mechanisms for adding non-clausal constraints. By virtue of being easy to
+ modify, it is a good choice for integrating as a backend to another tool,
+ such as a model checker or a more generic constraint solver.
+EOF
diff --git a/science-libs/minisat/HISTORY b/science-libs/minisat/HISTORY
new file mode 100644
index 0000000..e79f266
--- /dev/null
+++ b/science-libs/minisat/HISTORY
@@ -0,0 +1,3 @@
+2025-05-15 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, DETAILS, INSTALL, PRE_BUILD,
+ patches/0001-Fix-build-against-musl-libc.patch: spell created
diff --git a/science-libs/minisat/INSTALL b/science-libs/minisat/INSTALL
new file mode 100755
index 0000000..5465ee0
--- /dev/null
+++ b/science-libs/minisat/INSTALL
@@ -0,0 +1 @@
+install -vD simp/minisat_release "$INSTALL_ROOT"/usr/bin/minisat
diff --git a/science-libs/minisat/PRE_BUILD b/science-libs/minisat/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/science-libs/minisat/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git
a/science-libs/minisat/patches/0001-Fix-build-against-musl-libc.patch
b/science-libs/minisat/patches/0001-Fix-build-against-musl-libc.patch
new file mode 100644
index 0000000..6b2776e
--- /dev/null
+++ b/science-libs/minisat/patches/0001-Fix-build-against-musl-libc.patch
@@ -0,0 +1,42 @@
+From 80e2ee241403f82538a41a7b175947b6b438c630 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Thu, 15 May 2025 14:44:09 +0200
+Subject: [PATCH] Fix build against musl libc
+
+Origin: Source Mage
+Upstream-Status: Pending
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ simp/Main.cc | 2 +-
+ utils/System.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/System.h b/utils/System.h
+index a51d4c2ee8d3..031014e96da4 100644
+--- a/utils/System.h
++++ b/utils/System.h
+@@ -21,7 +21,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(__linux__) && defined(__GLIBC__)
+ #include <fpu_control.h>
+ #endif
+
+diff --git a/simp/Main.cc b/simp/Main.cc
+index e59d73be0627..99ee47bea438 100644
+--- a/simp/Main.cc
++++ b/simp/Main.cc
+@@ -74,7 +74,7 @@ int main(int argc, char** argv)
+ 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__)
++#if defined(__linux__) && defined(__GLIBC__)
+ 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");
+--
+2.49.0
+
[[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (2597f113537790f243b8d83da4d9f69d80aa7ea9),
Ismael Luceno, 05/15/2025