From patchwork Mon Sep 2 15:32:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15238 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 531B61734D; Mon, 2 Sep 2019 16:36:33 +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 0EEF817329 for ; Mon, 2 Sep 2019 16:36:33 +0100 (BST) Received: from localhost ([::1]:37618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oNc-0003Wp-0G for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 11:36:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41990) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oLI-0001Ma-4N for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oLH-0002cG-0v for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oLG-0002bz-Te for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oLG-0006Rr-Q3 for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v3 04/48] gnu: cmake: 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:06 +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.156743843524633 (code B ref 36477); Mon, 02 Sep 2019 15:34:06 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Sep 2019 15:33:55 +0000 Received: from localhost ([127.0.0.1]:58695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oL4-0006P4-PH for submit@debbugs.gnu.org; Mon, 02 Sep 2019 11:33:55 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oL2-0006Nw-Bq for 36477@debbugs.gnu.org; Mon, 02 Sep 2019 11:33:52 -0400 Received: by mail-wm1-f66.google.com with SMTP id d16so15056526wme.2 for <36477@debbugs.gnu.org>; Mon, 02 Sep 2019 08:33:52 -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=veZqU6dWskdofP94vEQ2ligOZQWONzY/eLOoYY8WvdA=; b=i3UwzybfNlhfZs+KPVKjQVO8uqycfZaVTQ2xkkBqWuXe0CJcJw0+hj69qjYqPlXhKq Fh7WUlxyHnI/RJEI10ZX8RMMm/p86GWAMaBaIMXbxFiEmYIIzQPnWiAIKeu0J8Xc6Nur 6zxemd0GpNHtdz+MvXsVtO48ivaP5/y3Q9p/fYsy52WWJ6Ufqg0u3ZRnEI8Bfpo+CniW H7yoQk3Qjtf0S6qo+QpLm9SV9NiPP7+S2u53PNxWYfwwXBsYCOeHJ77a+ajhlMRZAB9v OFFXPc0Xt5MParOzTpMbIeZnxDYql7v0zp+2FVt2vAmyJC0skEIFSNNVBUYAR7dREigh VLow== 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=veZqU6dWskdofP94vEQ2ligOZQWONzY/eLOoYY8WvdA=; b=MkV3mJzpDpi34upAb9k5Ax9GR02sSqCCCxom+sWConlaYpcgd6+8ed1QLoNAb0cakA fWXfBLy2uE8pXsyYOmFK+SY7e28mK2C6VjxtTZovcWNZStWJD1bobTsVkHfD6UX//tdt WzrAz+i6lkCNYer/uzEqXD+pSSaJ025WlDPcPoA3SDpGxukhGmPy9EsxngZ7SgaiJn/D cfsn7Rq/jsKBBBdI8V8hnGAsHC/0AewjG2W6DtFRhXkd9b8xCc9A3EEHbFjkBndjQKGQ QXNS/FjxXNmmB26dqEK1Eidb4KspXOg2zKar/G+BFBCYSodMOio4O0NooR86JBtsV3/O QOAA== X-Gm-Message-State: APjAAAUoTrExZhBsbIZyrdcYqBx8RxyvskFhy1VG7swDmuvDZ2VR1xNm W90PrAHG+6JtXi+DXu8ieZ4QElJo X-Google-Smtp-Source: APXvYqwPl8jblMAbmIrQVtH9XlFWcz8pu8FVxo+H8vkXoppEN3Vx2AwobJFhADnmvOlr6RMSo/aXog== X-Received: by 2002:a7b:cbcf:: with SMTP id n15mr36984389wmi.48.1567438426538; Mon, 02 Sep 2019 08:33:46 -0700 (PDT) Received: from localhost.localdomain ([80.12.63.115]) by smtp.gmail.com with ESMTPSA id b26sm17232265wmj.14.2019.09.02.08.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 08:33:46 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:32:49 +0200 Message-Id: <20190902153333.11190-5-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/cmake.scm (cmake-minimal-cross): New package. * guix/build-system/cmake.scm (default-cmake): Add new target argument and use it to select cmake-minimal or cmake-minimal-cross. (lower): Pass target to default-cmake. --- gnu/packages/cmake.scm | 8 ++++++++ guix/build-system/cmake.scm | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 1d8d829ec5..9bf0273f00 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -207,6 +207,14 @@ and workspaces that can be used in the compiler environment of your choice.") (outputs '("out" "doc")) (properties (alist-delete 'hidden? (package-properties cmake-minimal))))) +(define-public cmake-minimal-cross + (package + (inherit cmake-minimal) + (name "cmake-minimal-cross") + (native-search-paths '()) + (search-paths + (package-native-search-paths cmake-minimal)))) + (define-public emacs-cmake-mode (package (inherit cmake) diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index ca88fadddf..aa0f4187ec 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -43,16 +43,19 @@ `((guix build cmake-build-system) ,@%gnu-build-system-modules)) -(define (default-cmake) +(define (default-cmake target) "Return the default CMake package." ;; Do not use `@' to avoid introducing circular dependencies. (let ((module (resolve-interface '(gnu packages cmake)))) - (module-ref module 'cmake-minimal))) + (module-ref module + (if target + 'cmake-minimal-cross + 'cmake-minimal)))) (define* (lower name #:key source inputs native-inputs outputs system target - (cmake (default-cmake)) + (cmake (default-cmake target)) #:allow-other-keys #:rest arguments) "Return a bag for NAME."