diff options
-rw-r--r-- | gnu/packages/geo.scm | 140 |
1 files changed, 68 insertions, 72 deletions
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index c9152fb4f8..e79b2fc4b3 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -2744,106 +2744,102 @@ orienteering sport.") (base32 "1gpfbppfajc8d6b9alw9fdzgaa83w26kl6fff1395bc9gal215ms")))) (build-system gnu-build-system) (inputs - `(("bzip2" ,bzip2) - ("cairo" ,cairo) - ("fftw" ,fftw) - ("freetype" ,freetype) - ("gdal" ,gdal) - ("geos" ,geos) - ("glu" ,glu) - ("libpng" ,libpng) - ("libtiff" ,libtiff) - ("mesa" ,mesa) - ("mariadb-dev" ,mariadb "dev") - ("mariadb-lib" ,mariadb "lib") - ("netcdf" ,netcdf) - ("openblas" ,openblas) - ("perl" ,perl) - ("postgresql" ,postgresql) - ("proj" ,proj) - ("python" ,python) - ("python-dateutil" ,python-dateutil) - ("python-numpy" ,python-numpy) - ("python-wxpython" ,python-wxpython) - ("readline" ,readline) - ("sqlite" ,sqlite) - ("wxwidgets" ,wxwidgets) - ("zlib" ,zlib) - ("zstd" ,zstd "lib"))) + (list bzip2 + cairo + fftw + freetype + gdal + geos + glu + libpng + libtiff + mesa + `(,mariadb "dev") + `(,mariadb "lib") + netcdf + openblas + perl + postgresql + proj + python + python-dateutil + python-numpy + python-wxpython + readline + sqlite + wxwidgets + zlib + `(,zstd "lib"))) (native-inputs - `(("bash" ,bash-minimal) - ("bison" ,bison) - ("flex" ,flex) - ("pkg-config" ,pkg-config))) + (list bash-minimal + bison + flex + pkg-config)) (arguments - `(#:tests? #f ; No tests - #:modules ((guix build gnu-build-system) + (list + #:tests? #f ; No tests + #:modules `((guix build gnu-build-system) ((guix build python-build-system) #:prefix python:) (guix build utils)) - #:imported-modules (,@%gnu-build-system-modules + #:imported-modules `(,@%gnu-build-system-modules (guix build python-build-system)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-lapack - (lambda _ - (substitute* "./configure" - (("-lblas") "-lopenblas") - (("-llapack") "-lopenblas")))) - (replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((shell (search-input-file inputs "/bin/bash"))) - (setenv "SHELL" shell) - (setenv "CONFIG_SHELL" shell) - (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl," - (assoc-ref outputs "out") - "/" ,grassxx "/lib"))) - (invoke "./configure" - (string-append "--prefix=" - (assoc-ref outputs "out")) - "--with-blas" - "--with-bzlib" - (string-append "--with-freetype-includes=" - (assoc-ref inputs "freetype") - "/include/freetype2") - (string-append "--with-freetype-libs=" - (assoc-ref inputs "freetype") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-lapack + (lambda _ + (substitute* "./configure" + (("-lblas") "-lopenblas") + (("-llapack") "-lopenblas")))) + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys) + (let ((shell (search-input-file inputs "/bin/bash"))) + (setenv "SHELL" shell) + (setenv "CONFIG_SHELL" shell) + (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl," + #$output + "/" #$grassxx "/lib"))) + (invoke "./configure" + (string-append "--prefix=" #$output) + "--with-blas" + "--with-bzlib" + (string-append "--with-freetype-includes=" + #$(this-package-input "freetype") + "/include/freetype2") + (string-append "--with-freetype-libs=" + #$(this-package-input "freetype") "/lib") "--with-geos" "--with-lapack" "--with-mysql" (string-append "--with-mysql-includes=" - (assoc-ref inputs "mariadb-dev") + (ungexp (this-package-input "mariadb") "dev") "/include/mysql") (string-append "--with-mysql-libs=" - (assoc-ref inputs "mariadb-lib") + (ungexp (this-package-input "mariadb") "lib") "/lib") "--with-netcdf" "--with-postgres" (string-append "--with-proj-share=" - (assoc-ref inputs "proj") + #$(this-package-input "proj") "/share/proj") "--with-pthread" "--with-readline" "--with-sqlite" "--with-wxwidgets"))) (add-after 'install 'install-links - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Put links for includes and libraries in the standard places. - (let* ((out (assoc-ref outputs "out")) - (dir (string-append out "/" ,grassxx))) + (let* ((dir (string-append #$output "/" #$grassxx))) (symlink (string-append dir "/include") - (string-append out "/include")) + (string-append #$output "/include")) (symlink (string-append dir "/lib") - (string-append out "/lib"))) - #t)) + (string-append #$output "/lib"))))) (add-after 'install-links 'python:wrap (assoc-ref python:%standard-phases 'wrap)) (add-after 'python:wrap 'wrap-with-python-interpreter - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (wrap-program (string-append out "/bin/" ,grassxx) - `("GRASS_PYTHON" = (,(which "python3")))) - #t)))))) + (lambda _ + (wrap-program (string-append #$output "/bin/" #$grassxx) + `("GRASS_PYTHON" = (,(which "python3"))))))))) (synopsis "GRASS Geographic Information System") (description "GRASS (Geographic Resources Analysis Support System), is a Geographic |