From patchwork Mon Mar 31 01:49:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 41050 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 E97CA27BBE2; Mon, 31 Mar 2025 02:51:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EF8D027BBE9 for ; Mon, 31 Mar 2025 02:51:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tz4J0-0008V5-8R; Sun, 30 Mar 2025 21:51:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tz4Ir-0008UG-Ue for guix-patches@gnu.org; Sun, 30 Mar 2025 21:51:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tz4Ir-0007ul-Ki for guix-patches@gnu.org; Sun, 30 Mar 2025 21:51:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=sH4SXhKqC15xGylVatj8aSd/V2KNpOz477W3BaoHrKE=; b=rByoH6A/B9C/hF2A8m+mJhcFnEQMFret2quTfw7N88GkvXW6srniBqefCB3h2RNxQQ4106SwY+Y/QKoMGff68GiUx9PXPQbDdKx3KMZLSmbPl2bYjxvrBKrlifWWp0t9yGUeMLk4jRCbNb3uCajCduaDXudXgqQnfQ3QwsGNItRORZlgyn20yumRQ3fZr/E8pbfrdkyj2mvQX5g8gc9V/m8govYGOrFvG0I/B/BFl4sFCdXRU1njc2kB69t+lL8Y9zF6zUG0ztkKa6l7DZUDCIG08odAtn1cFmskz8Ba/d0t2l1CM61KtU3ClUwRTmwZHfe75CeR++vez/nBsq2m1w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tz4Iq-0006RN-9M for guix-patches@gnu.org; Sun, 30 Mar 2025 21:51:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71279] [PATCH v2 1/4] gnu: grass: Improve package style. References: <4d9e85d82fc2c3a030a0255faf2da4915450b653.1717092444.git.monego@posteo.net> In-Reply-To: <4d9e85d82fc2c3a030a0255faf2da4915450b653.1717092444.git.monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 01:51:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71279 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71279@debbugs.gnu.org Cc: andreas@enge.fr, Vinicius Monego Received: via spool by 71279-submit@debbugs.gnu.org id=B71279.174338582524276 (code B ref 71279); Mon, 31 Mar 2025 01:51:04 +0000 Received: (at 71279) by debbugs.gnu.org; 31 Mar 2025 01:50:25 +0000 Received: from localhost ([127.0.0.1]:38641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tz4I8-0006Hi-LQ for submit@debbugs.gnu.org; Sun, 30 Mar 2025 21:50:24 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56821) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tz4I4-0006D6-Ie for 71279@debbugs.gnu.org; Sun, 30 Mar 2025 21:50:18 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2FB3B240027 for <71279@debbugs.gnu.org>; Mon, 31 Mar 2025 03:50:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1743385809; bh=vfN5LFDl362PYJHJc9GMaRKwRYXNH5zgLkkq4MxfQWk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=JQOM6soaZUv7uMS53+aoBWd8OQeZHaum6h2Ye6qRmoVoE0EyUIWA4Mei5Rbi+gtfT q1g3OHvmRtw9dHN/kvUvQdMSAREV0elln70JUGRaTNMpU1W03FxRIaVqHDfbBOO/kn t5sMVBsMP4h6e7fAhGpkoCYnVc/VAXc1UiP9uHa1wCBq53K2HQiq4NdmBHqIbTjjBo I2oXphbCXAuysMMwLc2fEyir1gXjtzLQPAsMXJmg9Rpxo4xD4cjv3HsKKvLabooigi E6ykahJzIschKPD52wYYJDQWNKZg7sS3rK6QeZlRwwPNeBvciWBh27Q+2QUYnoaiZE 8ars3pcN9mKtQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4ZQvG75JJXz9rxK; Mon, 31 Mar 2025 03:50:07 +0200 (CEST) From: Vinicius Monego Date: Mon, 31 Mar 2025 01:49:43 +0000 Message-ID: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/geo.scm (grass)[arguments]: Use Gexp. <#:phases>: Use #:configure-flags instead of overriding the 'configure phase. Change-Id: I52b39f0cd5ad507dfe5dbb5c8040dfe4eb69b18c --- gnu/packages/geo.scm | 127 +++++++++++++++++++++---------------------- 1 file changed, 62 insertions(+), 65 deletions(-) base-commit: a3674c059abf16256f549c4d558a0140b9cd8945 diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index 8682d29e0e..cdab9ac608 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -3261,74 +3261,71 @@ (define-public grass 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