Subject: [bug#64287] [PATCH 5/9] gnu: skymaker: Update to 3.10.5-0.1a69c47, fix build.

From: Sharlatan Hellseher <[email-masked]>
Date: Sun, 25 Jun 2023 22:28:17 +0100

* gnu/packages/astronomy.scm (skymaker): Update to 3.10.5-0.1a69c47, fix
build.
[source]: Swap to 'git-checkout and pin to the latest commit as upstream
version tag is not available.
[arguments]: Use G-expressions. #:configure-flags add CPPFLAGS to pass
build on GCC 10.
[native-inputs]: Add automake, autoconf, libtool, pkg-config.
---
 gnu/packages/astronomy.scm | 57 ++++++++++++++++++++++----------------
 1 file changed, 33 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 4c869fc295..b5d96c932f 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -900,34 +900,43 @@ (define-public splash
     (license license:gpl2+)))
 
 (define-public skymaker
-  (package
-    (name "skymaker")
-    (version "3.10.5")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://www.astromatic.net/download/skymaker/"
-                           "skymaker-" version ".tar.gz"))
-       (sha256
-        (base32 "03zvx7c89plp9559niqv5532r233kza3ir992rg3nxjksqmrqvx1"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:configure-flags
+  ;; XXX: No version tag availalbe in GitHub.
+  ;; See: https://github.com/astromatic/skymaker/issues/3
+  (let ((commit "1a69c4716bdc9b5c6d4a917b0bc2dbd47635c459")
+        (revision "0"))
+    (package
+      (name "skymaker")
+      (version (git-version "3.10.5" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/astromatic/skymaker")
+               (commit commit)))
+         (sha256
+          (base32 "1vin4vgvcmqmwjdchsxnap374559rksz55xmaliawnl3qpzxn1nk"))
+         (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (arguments
        (list
-        (string-append
-         "--with-fftw-libdir=" (assoc-ref %build-inputs "fftw") "/lib")
-        (string-append
-         "--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
-    (inputs
-     `(("fftw" ,fftwf)))
-    (home-page "https://www.astromatic.net/software/skymaker")
-    (synopsis "Astronomical image simulator")
-    (description
-     "SkyMaker is a program that simulates astronomical images.  It accepts
+        #:configure-flags
+        #~(list
+           "CPPFLAGS=-O2 -g -fcommon"
+           (string-append
+            "--with-fftw-libdir=" #$(this-package-input "fftwf") "/lib")
+           (string-append
+            "--with-fftw-incdir=" #$(this-package-input "fftwf") "/include"))))
+      (native-inputs
+       (list automake autoconf libtool pkg-config))
+      (inputs (list fftwf))
+      (home-page "https://www.astromatic.net/software/skymaker")
+      (synopsis "Astronomical image simulator")
+      (description
+       "SkyMaker is a program that simulates astronomical images.  It accepts
 object lists in ASCII generated by the Stuff program to produce realistic
 astronomical fields.  SkyMaker is part of the EFIGI
 (@url{https://www.astromatic.net/projects/efigi}) development project.")
-    (license license:gpl3+)))
+      (license license:gpl3+))))
 
 (define-public stackistry
   (package
-- 
2.40.1