From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:42502) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oMB-00028L-QP for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oMA-0004CF-K0 for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50021) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oMA-0004Bz-Gb for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oMA-0006c9-9z for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:02 -0400 Subject: [bug#36477] [PATCH v3 16/48] gnu: eudev: Fix cross-compilation. Resent-Message-ID: From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:33:01 +0200 Message-Id: <20190902153333.11190-17-m.othacehe@gmail.com> In-Reply-To: <20190902153333.11190-1-m.othacehe@gmail.com> References: <20190902153333.11190-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36477@debbugs.gnu.org Cc: Mathieu Othacehe * gnu/packages/linux.scm (eudev)[arguments]: Look for xsltproc in both native-inputs and inputs. Also, do not run udevadm when cross-compiling. We need to find another way to generate hwdb.bin file for cross-built systems. --- gnu/packages/linux.scm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index bf1e00421f..0225f8c376 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2564,7 +2564,7 @@ from the module-init-tools project.") (patches (search-patches "eudev-rules-directory.patch")))) (build-system gnu-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (add-after 'unpack 'make-source-writable (lambda _ @@ -2573,19 +2573,25 @@ from the module-init-tools project.") (for-each make-file-writable (find-files ".")) #t)) (add-before 'bootstrap 'patch-file-names - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) (substitute* "man/make.sh" (("/usr/bin/xsltproc") - (string-append (assoc-ref inputs "xsltproc") + (string-append (assoc-ref + (or native-inputs inputs) "xsltproc") "/bin/xsltproc"))) #t)) (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"))) - (invoke (string-append out "/bin/udevadm") - "hwdb" "--update"))))) + ,@(if (%current-target-system) + '(#t) + '((invoke (string-append out "/bin/udevadm") + "hwdb" "--update"))))))) #:configure-flags (list "--enable-manpages"))) (native-inputs `(("autoconf" ,autoconf) -- 2.20.1