From patchwork Sun Mar 22 15:45:22 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: 20845 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 9AC9227BBE4; Sun, 22 Mar 2020 15:46:37 +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=unavailable 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 96B5627BBEA for ; Sun, 22 Mar 2020 15:46:28 +0000 (GMT) Received: from localhost ([::1]:47506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jG2o0-0001GB-1F for patchwork@mira.cbaines.net; Sun, 22 Mar 2020 11:46:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42470) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jG2nd-0001B7-UK for guix-patches@gnu.org; Sun, 22 Mar 2020 11:46:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jG2na-0001iS-Rm for guix-patches@gnu.org; Sun, 22 Mar 2020 11:46:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44870) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jG2na-0001iK-79 for guix-patches@gnu.org; Sun, 22 Mar 2020 11:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jG2na-0004mc-66 for guix-patches@gnu.org; Sun, 22 Mar 2020 11:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#38149] [WIP] gnu: Add qgis. References: <20191109112702.14723-1-wz@freeshell.de> In-Reply-To: <20191109112702.14723-1-wz@freeshell.de> Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Mar 2020 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38149 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 38149@debbugs.gnu.org Received: via spool by 38149-submit@debbugs.gnu.org id=B38149.158489195118359 (code B ref 38149); Sun, 22 Mar 2020 15:46:02 +0000 Received: (at 38149) by debbugs.gnu.org; 22 Mar 2020 15:45:51 +0000 Received: from localhost ([127.0.0.1]:50842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jG2nD-0004lj-OE for submit@debbugs.gnu.org; Sun, 22 Mar 2020 11:45:51 -0400 Received: from mout02.posteo.de ([185.67.36.66]:53753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jG2n8-0004kz-Vp for 38149@debbugs.gnu.org; Sun, 22 Mar 2020 11:45:36 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 6EE862400FB for <38149@debbugs.gnu.org>; Sun, 22 Mar 2020 16:45:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1584891928; bh=6lRw0Qm7mnrcxoK8ECHQANeUuJ4ZFeWUJKFxt+ZBdKg=; h=From:To:Subject:Date:From; b=K2auoyRGxjh6Py3aPJrTtmGDS7JbJl1v5QgOsLJAsWpCJZsEIaVnHxAnz8HQi7MUP fEjF+2MzV5liQsaqzuMImhU01cMKvPJk/lqkgzUA4pM3DVL9jZIWA5N2xkfp/d0vwk yoPq1jD3knLBrh1agWQFchVCdfoSwFF07Z5mMNAWEciLllJxNRV3u1p5gLCtRVCjwG eEsgBcoiiDjbMQEv3rSrJPOB6OY4D5J2ymmmvn0+dJB2V5X0hC2Vg25gDJwMGtr7Mz ecNmO//coVmIx9a3IbhEx7sQOEf1k7vRKcmMWAdBaFdN5RiOMWs9eTebFiwgvO86i4 pFKi/I4+xS5Jg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48lhfs1sPRz9rxZ for <38149@debbugs.gnu.org>; Sun, 22 Mar 2020 16:45:25 +0100 (CET) User-agent: mu4e 1.2.0; emacs 26.3 From: Guillaume Le Vaillant Date: Sun, 22 Mar 2020 16:45:22 +0100 Message-ID: <87a748ieb1.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 I took the WIP patch and updated it for QGIS 3.12.1. I also added some inputs for optional features and some Qt wrapping for the SVG icons to show up correctly in the GUI. Things that can still be improved: - Among the 550 tests, around 60 are failing. I disabled them for now in the package definition. - Also, I only put GPL2+ and GPL3+ as license (like in Gentoo and Nix), and not the complete list for every file (like in Debian). Do you think this package definition for QGIS is good enough to be merged in master (and improved later), or are the remaining issues blocking? P.S. This is related to issues #38150 and #38178 (patch to add GRASS). From 0556194475a068831665175abb78583988ae9793 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Sun, 22 Mar 2020 13:47:06 +0100 Subject: [PATCH 4/4] gnu: Add qgis. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/geo.scm (qgis): New variable. Co-authored-by: Wiktor Żelazny Co-authored-by: Arun Isaac --- gnu/packages/geo.scm | 201 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 200 insertions(+), 1 deletion(-) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index fc5f473418..c632fdd47d 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -68,11 +68,14 @@ #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages gps) #:use-module (gnu packages gtk) + #:use-module (gnu packages haskell-apps) #:use-module (gnu packages image) #:use-module (gnu packages image-processing) #:use-module (gnu packages icu4c) #:use-module (gnu packages java) + #:use-module (gnu packages kde) #:use-module (gnu packages lua) #:use-module (gnu packages maths) #:use-module (gnu packages pcre) @@ -94,7 +97,8 @@ #: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)) (define-public geos (package @@ -1797,3 +1801,198 @@ effective implementation of spatial algorithms and it offers a comprehensive, growing set of geoscientific methods.") (home-page "http://www.saga-gis.org") (license (list license:gpl2+ license:lgpl2.1+)))) + +(define-public qgis + (package + (name "qgis") + (version "3.12.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://qgis.org/downloads/qgis-" + version ".tar.bz2")) + (sha256 + (base32 "1a41525y8ac44gzcfaffjx0lyrm49hgnr83jrq40r5mqd3vpmp57")))) + (build-system cmake-build-system) + (arguments + `(#:modules ((guix build cmake-build-system) + ((guix build python-build-system) #:prefix python:) + (guix build qt-utils) + (guix build utils)) + #:imported-modules (,@%cmake-build-system-modules + (guix build python-build-system) + (guix build qt-utils)) + #:phases + (modify-phases %standard-phases + ;; Configure correct path to PyQt5 SIP directory + (add-after 'unpack 'configure-pyqt5-sip-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "cmake/FindPyQt5.cmake" + (("\"\\\\\\\\1\" PYQT5_SIP_DIR") + (string-append "\"" (assoc-ref inputs "python-pyqt+qscintilla") + "/share/sip\" PYQT5_SIP_DIR"))) + (substitute* (list "scripts/prepare-commit.sh" + "scripts/runtests-local-travis-config.sh" + "scripts/sip_include.sh" + "scripts/sipdiff" + "scripts/sipify_all.sh" + "scripts/spell_check/check_spelling.sh" + "scripts/spell_check/spell_test.sh" + "scripts/verify-indentation.sh" + "tests/code_layout/test_banned_keywords.sh" + "tests/code_layout/test_licenses.sh" + "tests/code_layout/test_shellcheck.sh" + "tests/code_layout/test_sip_include.sh" + "tests/code_layout/test_sipfiles_uptodate.sh" + "tests/code_layout/test_sipify.sh") + (("\\$\\(git rev-parse --show-toplevel\\)") + (getcwd))) + (substitute* "tests/code_layout/test_sip_include.sh" + (("^REV=.*") "REV=currentrev\n")) + #t)) + (replace 'check + (lambda* (#:key inputs #:allow-other-keys) + (setenv "HOME" "/tmp") + (system (string-append (assoc-ref inputs "xorg-server") + "/bin/Xvfb :1 &")) + (setenv "DISPLAY" ":1") + (setenv "TRAVIS" "true") + (setenv "CTEST_OUTPUT_ON_FAILURE" "1") + (invoke "ctest" + "-E" (string-join + '(;; Disable tests that require network access + "qgis_filedownloader" + ;; TODO: Find why the following tests fail + "ProcessingQgisAlgorithmsTestPt1" + "ProcessingQgisAlgorithmsTestPt3" + "ProcessingQgisAlgorithmsTestPt4" + "ProcessingGdalAlgorithmsRasterTest" + "ProcessingGdalAlgorithmsVectorTest" + "ProcessingGrass7AlgorithmsImageryTest" + "ProcessingGrass7AlgorithmsRasterTest" + "ProcessingGrass7AlgorithmsVectorTest" + "ProcessingOtbAlgorithmsTest" + "qgis_authmanagertest" + "qgis_compositionconvertertest" + "qgis_coordinatereferencesystemtest" + "qgis_geometrytest" + "qgis_layouthtmltest" + "qgis_layoutmaptest" + "qgis_painteffecttest" + "qgis_pallabelingtest" + "qgis_svgmarkertest" + "qgis_taskmanagertest" + "qgis_ziplayertest" + "qgis_processingtest" + "qgis_wcsprovidertest" + "qgis_arcgisrestutilstest" + "qgis_grassprovidertest7" + "qgis_gpsinformationwidget" + "PyCoreAdittions" + "PyQgsPythonProvider" + "PyQgsAnnotation" + "PyQgsAuthenticationSystem" + "PyQgsProject" + "PyQgsFileUtils" + "PyQgsGeometryTest" + "PyQgsImageCache" + "PyQgsLayoutExporter" + "PyQgsLayoutLegend" + "PyQgsMapLayer" + "PyQgsOGRProviderGpkg" + "PyQgsPalLabelingLayout" + "PyQgsImportIntoPostGIS" + "PyQgsProviderConnectionPostgres" + "PyQgsProviderConnectionGpkg" + "PyQgsShapefileProvider" + "PyQgsSvgCache" + "PyQgsTextRenderer" + "PyQgsOGRProvider" + "PyQgsSpatialiteProvider" + "PyQgsVectorFileWriter" + "PyQgsVectorLayer" + "PyQgsVectorLayerUtils" + "PyQgsVirtualLayerProvider" + "PyQgsWFSProvider" + "PyQgsOapifProvider" + "PyQgsLayerDependencies" + "PyQgsDBManagerGpkg" + "PyQgsDBManagerSpatialite" + "PyQgsSettings" + "PyQgsAuxiliaryStorage" + "PyQgsSelectiveMasking" + "PyQgsAppStartup" + "qgis_geometrycheckstest" + "qgis_shellcheck" + "qgis_sipify" + "qgis_sip_include" + "qgis_sip_uptodate") + "|")))) + (add-after 'install 'wrap-python + (assoc-ref python:%standard-phases 'wrap)) + (add-after 'wrap-python 'wrap-qt + (lambda* (#:key outputs #:allow-other-keys) + (wrap-qt-program (assoc-ref outputs "out") "qgis") + #t))))) + (inputs + `(("exiv2" ,exiv2) + ("expat" ,expat) + ("gdal" ,gdal) + ("geos" ,geos) + ("gpsbabel" ,gpsbabel) + ("grass" ,grass) + ("gsl" ,gsl) + ("hdf5" ,hdf5) + ("libspatialindex" ,libspatialindex) + ("libspatialite" ,libspatialite) + ("libxml2" ,libxml2) + ("libzip" ,libzip) + ("netcdf" ,netcdf) + ("postgresql" ,postgresql) + ("proj" ,proj) + ("python" ,python) + ("python-chardet" ,python-chardet) + ("python-dateutil" ,python-dateutil) + ("python-gdal" ,python-gdal) + ("python-jinja2" ,python-jinja2) + ("python-numpy" ,python-numpy) + ("python-owslib" ,python-owslib) + ("python-psycopg2" ,python-psycopg2) + ("python-pygments" ,python-pygments) + ("python-pyqt+qscintilla" ,python-pyqt+qscintilla) + ("python-pytz" ,python-pytz) + ("python-pyyaml" ,python-pyyaml) + ("python-requests" ,python-requests) + ("python-sip" ,python-sip) + ("python-six" ,python-six) + ("python-urllib3" ,python-urllib3) + ("qca" ,qca) + ("qscintilla" ,qscintilla) + ("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("qtkeychain" ,qtkeychain) + ("qtlocation" ,qtlocation) + ("qtserialport" ,qtserialport) + ("qtsvg" ,qtsvg) + ("qtwebkit" ,qtwebkit) + ("qwt" ,qwt) + ("saga" ,saga) + ("sqlite" ,sqlite-with-column-metadata))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + ("perl" ,perl) + ("perl-yaml-tiny" ,perl-yaml-tiny) + ("pkg-config" ,pkg-config) + ("python-mock" ,python-mock) + ("python-nose2" ,python-nose2) + ("qttools" ,qttools) + ("shellcheck" ,shellcheck) + ("xorg-server" ,xorg-server-for-tests))) + (home-page "https://qgis.org") + (synopsis "Geographical information system") + (description "QGIS is an easy to use Geographical Information +System (GIS). It is a GIS data viewer and editor. QGIS supports a number of +raster and vector data formats, with new support easily added using the plugin +architecture.") + (license (list license:gpl2+ license:gpl3+)))) -- 2.25.2