From patchwork Mon Sep 2 15:32:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15249 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 C10F11734D; Mon, 2 Sep 2019 16:37:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 7196F17329 for ; Mon, 2 Sep 2019 16:37:18 +0100 (BST) Received: from localhost ([::1]:37648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oOL-0004Pt-PU for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 11:37:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42171) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oLS-0001Pi-UE for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oLQ-0002w2-Ra for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:18 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49925) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oLO-0002tA-U8 for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:16 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oLM-0006Tk-8s for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:14 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v3 13/48] gnu: icu4c: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Sep 2019 15:34:12 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36477 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 36477@debbugs.gnu.org Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.156743845024868 (code B ref 36477); Mon, 02 Sep 2019 15:34:12 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Sep 2019 15:34:10 +0000 Received: from localhost ([127.0.0.1]:58734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLJ-0006Sm-Jd for submit@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:10 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLC-0006Pa-Cz for 36477@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:02 -0400 Received: by mail-wr1-f68.google.com with SMTP id h7so13115159wrt.13 for <36477@debbugs.gnu.org>; Mon, 02 Sep 2019 08:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=diWb2r+CtGsA56kRxg55pygW7W5hCA/KMHXmhvcq3rw=; b=F63WWnYiCAyesQ/lEQxP/qQki3bsQkvwh6Rvyjxrefv8NQ01Dww9LilDKSUbE7boqp juLrOMSppH0YvxdakzCZtGPcI4juaB44igalZWeLEnqb/213e6CBTxBFZu8a5ksieZKs C65qTeL7CTv7Ba6pU0gxG7T4WEJ1luV+5BuQ1jdmWgh03j5RwuG4F6Mg1TdjKgvp199w WvCC6pJJHhXRH0t3Y+t4N3auBXr9Zgj1yRrcrOadzaQ/YI8XMSXt+cTji+fqn9vaSIDP gIW9Qyb8Uw+a/FZSt1PEb3DMiiTDuVemENJFma2GzFANHIwXy4AqZniaqTY90SIfX5Lt 0IdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=diWb2r+CtGsA56kRxg55pygW7W5hCA/KMHXmhvcq3rw=; b=OOmGpzcPcrlDltUETNwYs0d0GlRcegh4RVp9ApRddElOtJE+YcjuoXPaIhjZWZ7lPZ DROcmx2N2tJxInNeeQtQmtD+qCMMpF33x3OAL6H9X9PExBQJxIRyABrI6euYnvv4RrFw ypPcQ6hpnw7bsc27L1fkk+t34nJWNpGmynRrqQdJozSSb2UjdZmKm3r7O8dQOFeJPU9l fEEjIC0LUHkWb2IDupSH2mnhSx5bzW6rCFnOwrxf496Qu/Aw93ZqiR0HnblkDeW5I0wU V0zcFRTYGasIV3QYfkzocDSE5CmMRIRjddpYx0cP1rNMbpqsVz+jjZTmnOlE0vS4aW70 CEnQ== X-Gm-Message-State: APjAAAVTw4d14e3BLo3qBBT9ZystcsZNenBZsB6DPhymL3JmVxh9GGr5 haiiKGqf+XhmA6kYmhqT3FdhMq57 X-Google-Smtp-Source: APXvYqzVIIGTu/+FTnWzPwGAirU5FO17yPGblu/7FzWwdLlKfGN3uwplCNEkb/c9xAilhWPjoOUY4g== X-Received: by 2002:adf:9482:: with SMTP id 2mr36464179wrr.91.1567438435907; Mon, 02 Sep 2019 08:33:55 -0700 (PDT) Received: from localhost.localdomain ([80.12.63.115]) by smtp.gmail.com with ESMTPSA id b26sm17232265wmj.14.2019.09.02.08.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 08:33:55 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:32:58 +0200 Message-Id: <20190902153333.11190-14-m.othacehe@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190902153333.11190-1-m.othacehe@gmail.com> References: <20190902153333.11190-1-m.othacehe@gmail.com> 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: , Cc: Mathieu Othacehe Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/icu4c.scm (icu4c-build-root): New variable. (icu4c)[native-inputs]: Add it. [arguments]: Pass it as a configure-flag. --- gnu/packages/icu4c.scm | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index 922dfbd348..c70871f7e7 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (gnu packages python) #:use-module (guix licenses) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (guix download) #:use-module (guix build-system ant) #:use-module (guix build-system gnu)) @@ -70,13 +72,23 @@ (sha256 (base32 "0v0xsf14xwlj125y9fd8lrhsaych4d8liv8gr746zng6g225szb2")))) (build-system gnu-build-system) + ;; When cross-compiling, this package needs a source directory of a + ;; native-build of itself. (native-inputs - `(("python" ,python-minimal))) + `(("python" ,python-minimal) + ,@(if (%current-target-system) + `(("icu4c-build-root" ,icu4c-build-root)) + '()))) (inputs `(("perl" ,perl))) (arguments `(#:configure-flags - '("--enable-rpath") + (list + "--enable-rpath" + ,@(if (%current-target-system) + '((string-append "--with-cross-build=" + (assoc-ref %build-inputs "icu4c-build-root"))) + '())) #:phases (modify-phases %standard-phases (add-after 'unpack 'chdir-to-source @@ -105,6 +117,25 @@ C/C++ part.") (license x11) (home-page "http://site.icu-project.org/"))) +(define-public icu4c-build-root + (package + (inherit icu4c) + (name "icu4c-build-root") + (arguments + (substitute-keyword-arguments (package-arguments icu4c) + ((#:tests? _ '()) + #f) + ((#:out-of-source? _ '()) + #t) + ((#:phases phases) + `(modify-phases ,phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively "../build" out) + #t))))))) + (native-inputs '()))) + (define-public java-icu4j (package (name "java-icu4j")