From patchwork Sun May 28 23:28:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Lechner X-Patchwork-Id: 50402 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 CFED327BBE9; Mon, 29 May 2023 00:29:15 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 162E227BBE2 for ; Mon, 29 May 2023 00:29:13 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3Pos-0003WI-T8; Sun, 28 May 2023 19:29:02 -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 1q3Pos-0003W0-3K for guix-patches@gnu.org; Sun, 28 May 2023 19:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3Por-0008Ml-RX for guix-patches@gnu.org; Sun, 28 May 2023 19:29:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3Por-0006Pz-Ic for guix-patches@gnu.org; Sun, 28 May 2023 19:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63508] [PATCH v3 1/3] gnu: eudev: Convert native-inputs to new style, and build arguments to Gexps. References: In-Reply-To: Resent-From: Felix Lechner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 May 2023 23:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63508 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63508@debbugs.gnu.org Cc: Liliana Marie Prikler , Felix Lechner Received: via spool by 63508-submit@debbugs.gnu.org id=B63508.168531651624617 (code B ref 63508); Sun, 28 May 2023 23:29:01 +0000 Received: (at 63508) by debbugs.gnu.org; 28 May 2023 23:28:36 +0000 Received: from localhost ([127.0.0.1]:56258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3PoR-0006Ox-Ms for submit@debbugs.gnu.org; Sun, 28 May 2023 19:28:36 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]:58770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3PoP-0006Oe-6j for 63508@debbugs.gnu.org; Sun, 28 May 2023 19:28:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=5P5CGrcqFruYgDF kFgOgpkp9GqZDJ6MI/mw1dhv1SgY=; h=date:subject:cc:to:from; d=lease-up.com; b=nPJVo/PjEs9n+Ufv5E73vgBnBfGUtRJX0iiUcW8EwgvQRLF90tOa y4DF4JIDr+wyMgSl5GrsmB7PyrGqvjB0bqO0P+K4psdTbZBJEouCowj863qt/sGlu10Vx4 UJrNCc+33eJA/BKlsIR+sXqYU8XazwlQ08wac+eAfo8Jzlxpk= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 17c3c3c2 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sun, 28 May 2023 23:28:32 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id caf9a6b5; Sun, 28 May 2023 23:28:31 +0000 (UTC) Date: Sun, 28 May 2023 16:28:20 -0700 Message-Id: <475e3d003e5a1edf2d57e61466aa646db0ad7ebc.1685316502.git.felix.lechner@lease-up.com> X-Mailer: git-send-email 2.40.1 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: , Reply-to: Felix Lechner X-ACL-Warn: , Felix Lechner via Guix-patches X-Patchwork-Original-From: Felix Lechner via Guix-patches via From: Felix Lechner 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/linux.scm (eudev): Convert native-inputs to new style, and build arguments to Gexps. --- gnu/packages/linux.scm | 94 ++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 49 deletions(-) base-commit: d64d6ea2cf5a1be801be355031fb2cfa5901a92a diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 1be505d949..ae2792825b 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4189,56 +4189,52 @@ (define-public eudev (patches (search-patches "eudev-rules-directory.patch")))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'bootstrap 'patch-file-names - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (substitute* "man/make.sh" - (("/usr/bin/xsltproc") - (string-append (assoc-ref - (or native-inputs inputs) "xsltproc") - "/bin/xsltproc"))))) - (add-after 'install 'move-static-library - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (static (assoc-ref outputs "static")) - (source (string-append out "/lib/libudev.a")) - (target (string-append static "/lib/libudev.a"))) - (mkdir-p (dirname target)) - (link source target) - (delete-file source) - ;; Remove reference to the static library from the .la file - ;; such that Libtool looks for it in the usual places. - (substitute* (string-append out "/lib/libudev.la") - (("old_library=.*") - "old_library=''\n"))))) - (add-after 'install 'build-hwdb - (lambda* (#:key outputs #:allow-other-keys) - ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and - ;; similar tools to display product names. - ;; - ;; XXX: This can't be done when cross-compiling. Find another way - ;; to generate hwdb.bin for cross-built systems. - (let ((out (assoc-ref outputs "out"))) - ,@(if (%current-target-system) - '(#t) - '((invoke (string-append out "/bin/udevadm") - "hwdb" "--update"))))))) - #:configure-flags (list "--enable-manpages"))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'bootstrap 'patch-file-names + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (substitute* "man/make.sh" + (("/usr/bin/xsltproc") + (search-input-file (or native-inputs inputs) "/bin/xsltproc"))))) + (add-after 'install 'move-static-library + (lambda _ + (let ((source (string-append #$output "/lib/libudev.a")) + (target (string-append #$output:static "/lib/libudev.a"))) + (mkdir-p (dirname target)) + (link source target) + (delete-file source) + ;; Remove reference to the static library from the .la file + ;; such that Libtool looks for it in the usual places. + (substitute* (string-append #$output "/lib/libudev.la") + (("old_library=.*") + "old_library=''\n"))))) + (add-after 'install 'build-hwdb + (lambda _ + ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and + ;; similar tools to display product names. + ;; + ;; XXX: This can't be done when cross-compiling. Find another way + ;; to generate hwdb.bin for cross-built systems. + #$@(if (%current-target-system) + #~(#t) + #~((invoke (string-append #$output "/bin/udevadm") + "hwdb" "--update")))))) + #:configure-flags #~(list "--enable-manpages"))) (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("gperf" ,gperf) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config) - ;; For tests. - ("perl" ,perl) - ("python" ,python-wrapper) - ;; For documentation. - ("docbook-xml" ,docbook-xml-4.2) - ("docbook-xsl" ,docbook-xsl) - ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES - ("xsltproc" ,libxslt))) + (list autoconf + automake + gperf + libtool + pkg-config + ;; For tests. + perl + python-wrapper + ;; For documentation. + docbook-xml-4.2 + docbook-xsl + libxml2 ;for $XML_CATALOG_FILES + libxslt)) (inputs ;; When linked against libblkid, eudev can populate /dev/disk/by-label ;; and similar; it also installs the '60-persistent-storage.rules' file,