From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53014) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFwQl-00039c-Pl for guix-patches@gnu.org; Sun, 22 Mar 2020 04:58:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFwQk-0001YE-2D for guix-patches@gnu.org; Sun, 22 Mar 2020 04:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42612) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFwQj-0001Y1-Jz for guix-patches@gnu.org; Sun, 22 Mar 2020 04:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFwQj-0002gz-IR for guix-patches@gnu.org; Sun, 22 Mar 2020 04:58:01 -0400 Subject: [bug#38178] [WIP v2] gnu: Add grass. Resent-Message-ID: References: <20191112150417.17249-1-wz@freeshell.de> <20191114153036.scgoex7zqc5r53cu@wz.localdomain> <875zex5uik.fsf@devup.no> From: Guillaume Le Vaillant In-reply-to: <875zex5uik.fsf@devup.no> Date: Sun, 22 Mar 2020 09:57:24 +0100 Message-ID: <87blooix6z.fsf@yamatai> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38178@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Marius Bakke skribis: > Wiktor =C5=BBelazny writes: > >> A new version of GRASS GIS got released, which gave me an opportunity >> to bump the version in the old definition and recompile. The errors are >> there, but do not hinder the successful build. Apparently, they have >> been there from the beginning; I just didn=E2=80=99t notice =E2=80=94 bo= th bad and >> good news. >> >> The real error (for now) is >> >> In unknown file: >> 0 (%resolve-variable (7 . wxpython) #) >> >> ERROR: In procedure %resolve-variable: >> Unbound variable: wxpython >> >> I tried changing =E2=80=9Cwxpython=E2=80=9D to =E2=80=9Cpython-wxpython= =E2=80=9D, but this also >> is not recognized. So there=E2=80=99s something wrong with the way I def= ined >> the wrapping. > > Did you get anywhere with this patch? Can you rebase it on the current > master branch for easier testing? TIA! > > By the way, sorry for the sloooooow responses... I have a patch for grass (it compiles, but I have not tested all its functionalities). If I had searched in the issues and found Wiktor's patch, I wouldn't have had to write one from scratch, but well... here it is: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-Add-grass.patch Content-Transfer-Encoding: quoted-printable From=2059894e2bd8cfd1086abd7630d998f29351c88565 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Sun, 22 Mar 2020 00:03:41 +0100 Subject: [PATCH] gnu: Add grass. * gnu/packages/geo.scm (grass): New variable. =2D-- gnu/packages/geo.scm | 122 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index bc870f9620..b244e49a92 100644 =2D-- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -46,10 +46,13 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages algebra) #:use-module (gnu packages astronomy) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) + #:use-module (gnu packages bash) + #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) @@ -58,6 +61,7 @@ #:use-module (gnu packages datastructures) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) + #:use-module (gnu packages flex) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) #:use-module (gnu packages gettext) @@ -80,8 +84,10 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) + #:use-module (gnu packages readline) #:use-module (gnu packages sqlite) #:use-module (gnu packages textutils) + #:use-module (gnu packages time) #:use-module (gnu packages web) #:use-module (gnu packages webkit) #:use-module (gnu packages wxwidgets) @@ -1629,3 +1635,119 @@ track your position right from your laptop.") license:lgpl3+ license:sgifreeb2.0 license:zlib)))) + +(define-public grass + (let* ((version "7.8.2") + (majorminor (string-join (list-head (string-split version #\.) 2)= "")) + (grassxx (string-append "grass" majorminor))) + (package + (name "grass") + (version version) + (source + (origin + (method url-fetch) + (uri (string-append "https://grass.osgeo.org/" grassxx + "/source/grass-" version ".tar.gz")) + (sha256 + (base32 "1fwsm99kz0bxvjk7442qq1h45ikrmhba8bqclafb61gqg1q6ymrk"))= )) + (build-system gnu-build-system) + (inputs + `(("bzip2", bzip2) + ("cairo" ,cairo) + ("fftw" ,fftw) + ("freetype" ,freetype) + ("gdal" ,gdal) + ("geos" ,geos) + ("glu" ,glu) + ("lapack" ,lapack) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("mesa" ,mesa) + ("mariadb-dev" ,mariadb "dev") + ("mariadb-lib" ,mariadb "lib") + ("netcdf" ,netcdf) + ("openblas" ,openblas) + ("perl" ,perl) + ("postgresql" ,postgresql) + ("proj.4" ,proj.4) + ("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"))) + (native-inputs + `(("bash" ,bash-minimal) + ("bison" ,bison) + ("flex" ,flex) + ("pkg-config" ,pkg-config))) + (arguments + `(#: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 + (guix build python-build-system)) + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((shell (string-append (assoc-ref inputs "bash") + "/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=3D" + (assoc-ref outputs "out")) + "--with-blas" + "--with-bzlib" + (string-append "--with-freetype-includes=3D" + (assoc-ref inputs "freetype") + "/include/freetype2") + (string-append "--with-freetype-libs=3D" + (assoc-ref inputs "freetype") + "/lib") + "--with-geos" + "--with-lapack" + "--with-mysql" + (string-append "--with-mysql-includes=3D" + (assoc-ref inputs "mariadb-dev") + "/include/mysql") + (string-append "--with-mysql-libs=3D" + (assoc-ref inputs "mariadb-lib") + "/lib") + "--with-netcdf" + "--with-postgres" + (string-append "--with-proj-share=3D" + (assoc-ref inputs "proj.4") + "/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 pla= ces. + (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"))) + #t)) + (add-after 'install-links 'wrap-python + (assoc-ref python:%standard-phases 'wrap))))) + (synopsis "GRASS Geographic Information System") + (description + "GRASS (Geographic Resources Analysis Support System), is a Geograp= hic +Information System (GIS) software suite used for geospatial data managemen= t and +analysis, image processing, graphics and maps production, spatial modeling= , and +visualization.") + (home-page "https://grass.osgeo.org/") + (license license:gpl2+)))) =2D-=20 2.25.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQkUwKxurH4Z/3KlryPP4Yfgut6mgUCXncodAAKCRCPP4Yfgut6 mk7oAP96qOlctOdNDKwzCFXhLQm0IlIdgvngwSozeAxNC5ta0gEAolJBcJxsmYs0 QrfcBkxB9+/mtQX3orHwjxWTp0zkIQ4= =dlyO -----END PGP SIGNATURE----- --==-=-=--