Subject: [PATCH v2 01/22] gnu: sextractor: Update to 2.28.0, fix build.

From: Sharlatan Hellseher <[email-masked]>
Date: Thu, 27 Jul 2023 00:15:27 +0100

* gnu/packages/astronomy.scm (sextractor): Update to 2.28.0, fix build.
[arguments]: Add configure flags for CFitsio detection.
[inputs]: Add cfitsio.
---
 gnu/packages/astronomy.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 9351c691d2..4e03e2fcd6 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -832,7 +832,7 @@ (define-public phd2
 (define-public sextractor
   (package
     (name "sextractor")
-    (version "2.25.0")
+    (version "2.28.0")
     (source
      (origin
        (method git-fetch)
@@ -841,7 +841,7 @@ (define-public sextractor
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0q69n3nyal57h3ik2xirwzrxzljrwy9ivwraxzv9566vi3n4z5mw"))))
+        (base32 "15v7brjiraj2rdyxiidcgb58b3dqzdd363j31cjrfqhd1wc8ii5j"))))
     (build-system gnu-build-system)
     ;; NOTE: (Sharlatan-20210124T103117+0000): Building with `atlas' is failing
     ;; due to missing shared library which required on configure phase. Switch
@@ -851,6 +851,10 @@ (define-public sextractor
      `(#:configure-flags
        (list
         "--enable-openblas"
+        (string-append
+         "--with-cfitsio-libdir=" (assoc-ref %build-inputs "cfitsio") "/lib")
+        (string-append
+         "--with-cfitsio-incdir=" (assoc-ref %build-inputs "cfitsio") "/include")
         (string-append
          "--with-openblas-libdir=" (assoc-ref %build-inputs "openblas") "/lib")
         (string-append
@@ -862,7 +866,8 @@ (define-public sextractor
     (native-inputs
      (list autoconf automake libtool))
     (inputs
-     `(("openblas" ,openblas)
+     `(("cfitsio" ,cfitsio)
+       ("openblas" ,openblas)
        ("fftw" ,fftwf)))
     (home-page "https://www.astromatic.net/software/sextractor")
     (synopsis "Extract catalogs of sources from astronomical images")
-- 
2.40.1