From patchwork Sat Nov 9 11:31:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Wiktor_=C5=BBelazny?= X-Patchwork-Id: 16068 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 713A9176B6; Sat, 9 Nov 2019 11:34:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0779917695 for ; Sat, 9 Nov 2019 11:34:11 +0000 (GMT) Received: from localhost ([::1]:36026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTP0M-00022A-JR for patchwork@mira.cbaines.net; Sat, 09 Nov 2019 06:34:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55172) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTP0F-00021l-NE for guix-patches@gnu.org; Sat, 09 Nov 2019 06:34:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTP0E-0004Om-CQ for guix-patches@gnu.org; Sat, 09 Nov 2019 06:34:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39495) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTP0E-0004Oi-95 for guix-patches@gnu.org; Sat, 09 Nov 2019 06:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iTP0E-0002Ar-4R for guix-patches@gnu.org; Sat, 09 Nov 2019 06:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38150] [WIP] gnu: Add grass. Resent-From: Wiktor =?utf-8?q?=C5=BBelazny?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Nov 2019 11:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38150 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 38150@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15732991968296 (code B ref -1); Sat, 09 Nov 2019 11:34:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Nov 2019 11:33:16 +0000 Received: from localhost ([127.0.0.1]:48316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTOzU-00029k-18 for submit@debbugs.gnu.org; Sat, 09 Nov 2019 06:33:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:35170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTOzT-00029d-2j for submit@debbugs.gnu.org; Sat, 09 Nov 2019 06:33:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55103) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTOzR-0001vh-Kj for guix-patches@gnu.org; Sat, 09 Nov 2019 06:33:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTOzQ-000419-6F for guix-patches@gnu.org; Sat, 09 Nov 2019 06:33:13 -0500 Received: from freeshell.de ([2a01:360:106::2]:57252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iTOzP-00040X-SJ for guix-patches@gnu.org; Sat, 09 Nov 2019 06:33:12 -0500 From: Wiktor =?utf-8?q?=C5=BBelazny?= Date: Sat, 9 Nov 2019 12:31:54 +0100 Message-Id: <20191109113154.20481-1-wz@freeshell.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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 From: Wiktor Żelazny * gnu/packages/geo.scm (grass): New variable. No GUI due to wxpython not found on runtime. --- Another GIS beast. This one builds, at least on my machine, but $ grass78 Starting GRASS GIS... ERROR: wxGUI requires wxPython. No module named 'wx' Perhaps this is something specific to Python module treatment by Guix. Only one of these guix environment python python-wxpython guix environment python --ad-hoc python-wxpython guix environment --ad-hoc python python-wxpython , for instance, gives a desired result. gnu/packages/geo.scm | 79 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index dfb00c7547..7d3dea9d79 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -40,16 +40,20 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (gnu packages algebra) #:use-module (gnu packages astronomy) #:use-module (gnu packages autotools) + #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages datastructures) #:use-module (gnu packages documentation) + #:use-module (gnu packages flex) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) @@ -67,7 +71,9 @@ #:use-module (gnu packages web) #:use-module (gnu packages webkit) #:use-module (gnu packages wxwidgets) - #:use-module (gnu packages xml)) + #:use-module (gnu packages xml) + #:use-module (gnu packages xorg) + #:use-module (ice-9 match)) (define-public geos (package @@ -1037,3 +1043,74 @@ persisted. @end itemize ") (license license:expat))) + +(define-public grass + (package + (name "grass") + (version "7.8.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://grass.osgeo.org/" name + (match (string-split version #\.) + ((major minor _ ...) + (string-append major minor))) + "/source/" name "-" version ".tar.gz")) + ;; md5sum checked + (sha256 + (base32 + "1ynclznkpnm18vi0brmbfcplgi15yd7lwd424abgv7wm9qlr44ab")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + ;; Replace configure phase as the ./configure script does not like + ;; CONFIG_SHELL and SHELL passed as parameters + (replace 'configure + (lambda* (#:key outputs build target #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=" out) + ,(string-append "--build=" build) + ;; Fix `Unable to locate FreeType includes.' + ,(string-append + "--with-freetype-includes=" + (assoc-ref %build-inputs "freetype") + "/include/freetype2") + ;; Fix `Unable to locate PROJ data files.' + ,(string-append + "--with-proj-share=" + (assoc-ref %build-inputs "proj.4") + "/share/proj") + ,"--with-postgres"))) + (setenv "CONFIG_SHELL" bash) + (apply invoke bash "./configure" flags))))) + #:tests? #f)) ;no check target + (native-inputs + `(("flex" ,flex) + ("bison" ,bison) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("python-six" ,python-six))) + (inputs + `(("proj.4" ,proj.4) + ("gdal" ,gdal) + ("zlib" ,zlib) + ("zstd:lib" ,zstd "lib") + ("libtiff" ,libtiff) + ("libpng" ,libpng) + ("sqlite" ,sqlite) + ("freeglut" ,freeglut) + ("fftw" ,fftw) + ("cairo" ,cairo) + ("freetype" ,freetype) + ("libxt" ,libxt) + ("python-wxpython" ,python-wxpython) ;; for gui + ("postgresql" ,postgresql))) + (home-page "https://grass.osgeo.org/") + (synopsis "Geographic Resources Analysis Support System") + (description "GRASS is a @dfn{Geographic Information System} (GIS) software +suite used for geospatial data management and analysis, image processing, +graphics and maps production, spatial modeling, and visualization.") + (license license:gpl2+)))