mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: grass: Improve package style.
* gnu/packages/geo.scm (grass)[arguments]: Use gexps. <#:phases>: Use #:configure-flags instead of overriding the 'configure phase. Change-Id: I52b39f0cd5ad507dfe5dbb5c8040dfe4eb69b18c
This commit is contained in:
committed by
Andreas Enge
parent
3489c0995c
commit
61f8719366
@@ -3261,74 +3261,71 @@ orienteering sport.")
|
||||
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 (,@%default-gnu-imported-modules
|
||||
#:imported-modules `(,@%default-gnu-imported-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="
|
||||
(search-input-directory inputs "/include/freetype2"))
|
||||
(string-append
|
||||
"--with-freetype-libs="
|
||||
(dirname
|
||||
(search-input-file inputs "/lib/libfreetype.so")))
|
||||
"--with-geos"
|
||||
"--with-lapack"
|
||||
"--with-mysql"
|
||||
(string-append
|
||||
"--with-mysql-includes="
|
||||
(search-input-directory inputs "/include/mysql"))
|
||||
(string-append
|
||||
"--with-mysql-libs="
|
||||
(dirname
|
||||
(search-input-file inputs "/lib/libmariadb.so")))
|
||||
"--with-netcdf"
|
||||
"--with-postgres"
|
||||
(string-append
|
||||
"--with-proj-share="
|
||||
(search-input-directory inputs "/share/proj"))
|
||||
"--with-pthread"
|
||||
"--with-readline"
|
||||
"--with-sqlite"
|
||||
"--with-wxwidgets")))
|
||||
(add-after 'install 'install-links
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; Put links for includes and libraries in the standard places.
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(dir (string-append out "/" ,grassxx)))
|
||||
(symlink (string-append dir "/include")
|
||||
(string-append out "/include"))
|
||||
(symlink (string-append dir "/lib")
|
||||
(string-append out "/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"))))))))))
|
||||
#:configure-flags
|
||||
#~(list "--with-blas"
|
||||
"--with-bzlib"
|
||||
(string-append
|
||||
"--with-freetype-includes="
|
||||
(search-input-directory %build-inputs "/include/freetype2"))
|
||||
(string-append
|
||||
"--with-freetype-libs="
|
||||
(dirname
|
||||
(search-input-file %build-inputs "/lib/libfreetype.so")))
|
||||
"--with-geos"
|
||||
"--with-lapack"
|
||||
"--with-mysql"
|
||||
(string-append
|
||||
"--with-mysql-includes="
|
||||
(search-input-directory %build-inputs "/include/mysql"))
|
||||
(string-append
|
||||
"--with-mysql-libs="
|
||||
(dirname
|
||||
(search-input-file %build-inputs "/lib/libmariadb.so")))
|
||||
"--with-netcdf"
|
||||
"--with-postgres"
|
||||
(string-append
|
||||
"--with-proj-share="
|
||||
(search-input-directory %build-inputs "/share/proj"))
|
||||
"--with-pthread"
|
||||
"--with-readline"
|
||||
"--with-sqlite"
|
||||
"--with-wxwidgets"
|
||||
(string-append
|
||||
"SHELL="
|
||||
(search-input-file %build-inputs "/bin/bash"))
|
||||
(string-append
|
||||
"CONFIG_SHELL="
|
||||
(search-input-file %build-inputs "/bin/bash"))
|
||||
(string-append "LDFLAGS=-Wl,-rpath -Wl,"
|
||||
#$output "/" #$grassxx "/lib"))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'fix-lapack
|
||||
(lambda _
|
||||
(substitute* "./configure"
|
||||
(("-lblas") "-lopenblas")
|
||||
(("-llapack") "-lopenblas"))))
|
||||
(add-after 'install 'install-links
|
||||
(lambda _
|
||||
;; Put links for includes and libraries in the standard places.
|
||||
(let ((dir (string-append #$output "/" #$grassxx)))
|
||||
(symlink (string-append dir "/include")
|
||||
(string-append #$output "/include"))
|
||||
(symlink (string-append dir "/lib")
|
||||
(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 _
|
||||
(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
|
||||
|
||||
Reference in New Issue
Block a user