diff mbox series

[bug#66129,v2,08/20] gnu: Add gklib.

Message ID 03c05cd0488fa4c7cd6d1df8c511e72852f7c056.1695302719.git.david.elsing@posteo.net
State New
Headers show
Series [bug#66129,v2,01/20] gnu: suitesparse: Tweak description. | expand

Commit Message

David Elsing Sept. 21, 2023, 1:27 p.m. UTC
* gnu/packages/maths.scm (gklib): New variable.
---
 gnu/packages/maths.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 8f27134ba8..a2650b3101 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4193,6 +4193,42 @@  (define-public scotch-shared
 (define-public pt-scotch-shared
   (deprecated-package "pt-scotch-shared" pt-scotch))
 
+(define-public gklib
+  (let ((commit "8bd6bad750b2b0d90800c632cf18e8ee93ad72d7")
+        (revision "1"))
+    (package
+      (name "gklib")
+      (version (git-version "5.1.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/KarypisLab/GKlib")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "08k4zzyd7zsisdhfmnwz7zb9w3pzpgagyjq52mwk8i6sqajdxsdn"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:configure-flags
+        #~(list "-DBUILD_SHARED_LIBS=ON"
+                #$@(if (target-x86?)
+                       '()
+                       '("-DNO_X86=1")))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'remove-march=native
+                (lambda _
+                  (substitute* "GKlibSystem.cmake"
+                    (("-march=native") "")))))))
+      (home-page "https://github.com/KarypisLab/GKlib")
+      (synopsis "Helper library for METIS")
+      (description
+       "GKlib is a library of various helper routines and frameworks used by
+software from KarypisLab, such as METIS.")
+      (license license:asl2.0))))
 
 (define-public metis
   (package