From patchwork Sun Mar 22 08:57:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guillaume Le Vaillant X-Patchwork-Id: 20842 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 58B9327BBEB; Sun, 22 Mar 2020 08:58:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id D525627BBEA for ; Sun, 22 Mar 2020 08:58:10 +0000 (GMT) Received: from localhost ([::1]:44304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFwQs-00039v-Dz for patchwork@mira.cbaines.net; Sun, 22 Mar 2020 04:58:10 -0400 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 X-Loop: help-debbugs@gnu.org Subject: [bug#38178] [WIP v2] gnu: Add grass. Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Mar 2020 08:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38178 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 38178@debbugs.gnu.org Received: via spool by 38178-submit@debbugs.gnu.org id=B38178.158486746310320 (code B ref 38178); Sun, 22 Mar 2020 08:58:01 +0000 Received: (at 38178) by debbugs.gnu.org; 22 Mar 2020 08:57:43 +0000 Received: from localhost ([127.0.0.1]:48585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFwQQ-0002gO-Ot for submit@debbugs.gnu.org; Sun, 22 Mar 2020 04:57:43 -0400 Received: from mout02.posteo.de ([185.67.36.66]:60861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFwQM-0002g8-80 for 38178@debbugs.gnu.org; Sun, 22 Mar 2020 04:57:42 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 4806E2400FB for <38178@debbugs.gnu.org>; Sun, 22 Mar 2020 09:57:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1584867452; bh=8skXw6FQCt9pDjoAC7B8pYAATodETnVBAV9KLIkd4f8=; h=From:To:Subject:Date:From; b=Ph86oFR0LDIwAQmfkU+Qqd9Bn0vfvFghD5BCrFF9NEGvUbttBKr2HDl1NqRYeDr+B SzgR4AUAXdEHC9WGC3dOy6//62DHU1cxnoTeB82xtvgC5IDjurQeuj/hsYvIYsdl42 8EeEMX9z3FjvfAxGx5ut1j5jbbQPzqf6hI2J9zhJxpoSQHkIfkfww2TsqWVSPH7c+g Q19rJ+nTtCD04Yx12xv6FFRqWcnCKSpXSyiv/h/LffuS04HKSzrfxQwNJ11ydUnDCm 5fQd0pky4AwXivLvXpVD5K3Kyjq67VpWmNDO0w8iqfewPdwS4cN10QixHQsaLrr9S+ XQs//wxWjdCWQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48lWc55xWkz9rxR for <38178@debbugs.gnu.org>; Sun, 22 Mar 2020 09:57:25 +0100 (CET) References: <20191112150417.17249-1-wz@freeshell.de> <20191114153036.scgoex7zqc5r53cu@wz.localdomain> <875zex5uik.fsf@devup.no> User-agent: mu4e 1.2.0; emacs 26.3 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Marius Bakke skribis: > Wiktor Żelazny 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’t notice — both 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 “wxpython” to “python-wxpython”, but this also >> is not recognized. So there’s something wrong with the way I defined >> 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: From 59894e2bd8cfd1086abd7630d998f29351c88565 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. --- 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 --- 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=" + (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") + "/lib") + "--with-geos" + "--with-lapack" + "--with-mysql" + (string-append "--with-mysql-includes=" + (assoc-ref inputs "mariadb-dev") + "/include/mysql") + (string-append "--with-mysql-libs=" + (assoc-ref inputs "mariadb-lib") + "/lib") + "--with-netcdf" + "--with-postgres" + (string-append "--with-proj-share=" + (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 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"))) + #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 Geographic +Information System (GIS) software suite used for geospatial data management and +analysis, image processing, graphics and maps production, spatial modeling, and +visualization.") + (home-page "https://grass.osgeo.org/") + (license license:gpl2+)))) -- 2.25.2