unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
To: 68039@debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler@gmail.com>,
	Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	Raghav Gururajan <rg@raghavgururajan.name>
Subject: [bug#68039] [PATCH rust-team] gnu: librsvg: Improve cross compiling.
Date: Tue, 26 Dec 2023 18:38:48 +0800	[thread overview]
Message-ID: <e935a3a3670911addd41af1732bf68e6f5cd03a9.1703352828.git.zhengjunjie@iscas.ac.cn> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2076 bytes --]

* gnu/packages/gnome.scm (librsvg): Improve cross compiling.
[arguments]<#:phases>: Use platform-rust-target.

Change-Id: I0fd24334286602642b2650fef52c79ea4955c3e8
---
 gnu/packages/gnome.scm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b0417b2df9..339c85489f 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -77,6 +77,7 @@
 ;;; Copyright © 2023 Juliana Sims <juli@incana.org>
 ;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
 ;;; Copyright © 2023 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -238,6 +239,7 @@ (define-module (gnu packages gnome)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix platform)
   #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (ice-9 match)
@@ -3593,12 +3595,12 @@ (define-public librsvg
               ;; In lieu of #:make-flags
               (setenv "CC" #$(cc-for-target))
               (setenv "PKG_CONFIG" #$(pkg-config-for-target))
-              (when #$(%current-target-system)
-                (setenv "RUST_TARGET"
-                        (string-replace
-                          #$(%current-target-system)
-                          "-unknown-linux-gnu"
-                          (string-index #$(%current-target-system) #\-))))
+              #$@(if (%current-target-system)
+                     #~((setenv "RUST_TARGET"
+                                #$(platform-rust-target
+                                   (lookup-platform-by-target
+                                    (%current-target-system)))))
+                     #~())
               ;; Something about the build environment resists building
               ;; successfully with the '--locked' flag.
               (substitute* '("Makefile.am" "Makefile.in")

base-commit: 2f9f39f44108884669e7201c8fbf7f7d39e65ff2
-- 
2.41.0





             reply	other threads:[~2023-12-26 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-26 10:38 Zheng Junjie [this message]
2023-12-26 11:45 ` bug#68039: [PATCH rust-team] gnu: librsvg: Improve cross compiling Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e935a3a3670911addd41af1732bf68e6f5cd03a9.1703352828.git.zhengjunjie@iscas.ac.cn \
    --to=zhengjunjie@iscas.ac.cn \
    --cc=68039@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    --cc=maxim.cournoyer@gmail.com \
    --cc=rg@raghavgururajan.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).