From patchwork Wed Oct 2 09:58:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15561 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 B89171749F; Wed, 2 Oct 2019 11:01:07 +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 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 6C0E51749D for ; Wed, 2 Oct 2019 11:01:07 +0100 (BST) Received: from localhost ([::1]:53142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbRS-0004G9-7z for patchwork@mira.cbaines.net; Wed, 02 Oct 2019 06:01:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51041) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbQY-0003je-O3 for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbQX-0008Uc-76 for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54915) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbQX-0008UU-1y for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFbQX-0000YV-1I for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v4 05/23] gnu: icu4c: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Oct 2019 10:00:08 +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 Cc: Mathieu Othacehe Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.15700103761812 (code B ref 36477); Wed, 02 Oct 2019 10:00:08 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Oct 2019 09:59:36 +0000 Received: from localhost ([127.0.0.1]:35448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbPz-0000T4-Td for submit@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:36 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbPt-0000RS-Vy for 36477@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:31 -0400 Received: by mail-wm1-f68.google.com with SMTP id a6so6458586wma.5 for <36477@debbugs.gnu.org>; Wed, 02 Oct 2019 02:59:29 -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=fjXVKqA00qO5p1WiysL/bCpKHq9ohnRt2tYJ3t6RNNY=; b=UL68+YJ+PMvkIGKdgXrtvRnsNvfWU07MMJNtgUlBkjMq8XXJa8piPV1lgPfJwSEVg/ nMeMLUDB8s23eTog4eQqJ7Z5TB5vsE2pRLsljl6skTR83QepkXj70gzTENxZcnyC31+F wKoDhm5Fzg+4dL+7LmfSEYWawFk6JePD5UjSHzZFJLhm+I4sC4ICyfSo/zKEqNRKGsN7 39o5k7lJMAkp8vwvPoxW/pp6EtNhuhuswKfAablYzaH9WTld0IcW3zNVewxbbByec67b 1mD7/x5GikhebqOHCRfMyNy+A+nXEQHeqZRQTq2BCUmhj22PHr2VjUM4sdPmSzIdBXpV n1mQ== 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=fjXVKqA00qO5p1WiysL/bCpKHq9ohnRt2tYJ3t6RNNY=; b=a5Kb30J+vfIgLzzpV3kiUPrUT7LQipQCjIs4cBqfnzNJ/YpMpWbHCbQt5jtgUD1fwO ezOxox9DFZo2J5KsJemhW4X5znSto7TNNK/dgT0MY/0HO6DoT3ejTQM77W/vRMv6cEL/ 8RpHV431D5aVaE9EOHz5oQKhoSZUuUD7qHAdT/xpywIF3rWIQ8/Bq4jsGPz1aSlW4ZWB zreUAfVPH0YJo+ZWR8fboL5HwbrJQz2UoJDhUW7M9HqlBpGTXzXLGaTaVPaHNNypkgw/ JXG5IuAcgaiceqVWpd7LP2qw+pSMMaBAdcp9ql+HNJLjkDGQXCMTM8yi5KEM5ZMDuxek SC+A== X-Gm-Message-State: APjAAAWdH+yCgPGR7N/6HVtPSSXxMZAg4KJVJ0Gu576Gux57PjPrgAoH watk0FmX+8hPQI7z9ur3T4g1DDOZ X-Google-Smtp-Source: APXvYqxA1N8JZqFxXRu2ZpcFUcwR0dlaTS3SdA73us62av2trfwXfHVaIwIcfaZGDZ0FexNkZrtqMg== X-Received: by 2002:a1c:5fd6:: with SMTP id t205mr2139747wmb.124.1570010363981; Wed, 02 Oct 2019 02:59:23 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:fa:a50:21e:67ff:fe5b:4283]) by smtp.gmail.com with ESMTPSA id w12sm29621318wrg.47.2019.10.02.02.59.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 02:59:23 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 2 Oct 2019 11:58:46 +0200 Message-Id: <20191002095904.6325-6-m.othacehe@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191002095904.6325-1-m.othacehe@gmail.com> References: <20191002095904.6325-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: , 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")