1 ;;; guile-gdal --- FFI bindings for GDAL
2 ;;; Copyright (c) 2021 Ahmet Artu Yildirim <ahmet@artulab.com>
6 ;; GNU Guix development package. To build and install, run:
8 ;; guix package -f guix.scm
10 ;; To use as the basis for a development environment, run:
12 ;; guix environment -l guix.scm
16 (use-modules (ice-9 match)
25 (guix build-system gnu)
26 ((guix build utils) #:select (with-directory-excursion))
28 (gnu packages autotools)
30 (gnu packages pkg-config)
32 (gnu packages texinfo))
34 (define %source-dir (dirname (current-filename)))
37 (let* ((pipe (with-directory-excursion %source-dir
38 (open-pipe* OPEN_READ "git" "ls-files")))
39 (files (let loop ((lines '()))
40 (match (read-line pipe)
44 (loop (cons line lines))))))
45 (status (close-pipe pipe)))
47 (match (stat:type stat)
49 ((or 'regular 'symlink)
50 (any (cut string-suffix? <> file) files))
56 (source (local-file %source-dir #:recursive? #t #:select? git-file?))
57 (build-system gnu-build-system)
60 (list (string-append "--with-libgdal-path=" (assoc-ref %build-inputs "gdal") "/lib/libgdal.so"))
61 #:make-flags '("GUILE_AUTO_COMPILE=0")
63 (modify-phases %standard-phases
64 (add-after 'unpack 'bootstrap
65 (lambda _ (zero? (system* "sh" "bootstrap")))))))
67 `(("autoconf" ,autoconf)
68 ("automake" ,automake)
69 ("pkg-config" ,pkg-config)
70 ("texinfo" ,texinfo)))
72 `(("guile" ,guile-2.2)
75 (synopsis "Guile bindings for GDAL")
76 (description "Guile-GDAL provides pure Guile Scheme bindings to the
77 GDAL C shared library via the foreign function interface.")
78 (home-page "https://gitlab.com/ayild/guile-gdal.git")