From patchwork Wed Oct 2 09:58:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15560 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 709091749F; Wed, 2 Oct 2019 11:01:03 +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 0A1F21749D for ; Wed, 2 Oct 2019 11:01:03 +0100 (BST) Received: from localhost ([::1]:53140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbRN-00046w-Av for patchwork@mira.cbaines.net; Wed, 02 Oct 2019 06:01:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50995) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbQW-0003hv-BR for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbQV-0008TM-8L for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54912) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbQV-0008TH-54 for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFbQV-0000Y8-3y for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v4 02/23] gnu: cmake: 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:07 +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.15700103691750 (code B ref 36477); Wed, 02 Oct 2019 10:00:07 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Oct 2019 09:59:29 +0000 Received: from localhost ([127.0.0.1]:35437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbPt-0000S9-Fq for submit@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:29 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbPr-0000RM-71 for 36477@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:27 -0400 Received: by mail-wm1-f66.google.com with SMTP id b24so6250971wmj.5 for <36477@debbugs.gnu.org>; Wed, 02 Oct 2019 02:59:27 -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=0/xKezzp3clIb0E78khCoupsd0kxknWZjL8IJ24f42k=; b=jKWU3/2o/Lcpu8T4NAaTFju/BkmBAMnvej1F70l9Qn3x8CzVTlJc6wq9b4wXHPXTgz qaaoHGc8/gzSQWub7Z+ByXMVS2AB6EkP0+fL01M3TcJI92GO4t1d0NqNhnE7c+WAyPFw xIFs9D1WTFkBy/GZv822U2f6szjBRBKqpBoO2Y5BjXg4Vtnh9JeQk/pfJgqPE6wnJ7xK MfdP82T3iua8AEUszilzBAswBnBy1qZJuWNT5Xwvde7nOp+i3sRyE+lY7/UJjNexQM7y DPf+6Mq5GEEinVMJbD1RUhPKNywLOf1aiHS8TqgMZEQzPmYWos+mGO2WAFXyW/XOcTOl u4Fg== 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=0/xKezzp3clIb0E78khCoupsd0kxknWZjL8IJ24f42k=; b=hlKITM0+fHYkZ1EwwnfXujMGPLA9PBlDyNgzGHugNl10fBfndwu5e49M2dfS9Vj8k1 L/ovEt9NUXtrW1HPxHg0/581Y6gNBpxPGXvi7XuZuOdyX0jB7ZhulEEgcx/0PADTG9/b dmNVWDmps1mYoPFcWobnqu/oEncBJa8jb1HlJ48KIPTmUJFLCyytXHPuA61O2dAAXn3r I8SaurClyAPI//NUIsrcyExjmsS2tbhNwrb8+qUjmfv2f3TCugsjsXBhcz5UiDsxGt2A Dz5TEq5gDYgTLeXQWRmFmEprLurg8DxpOzp8A3YeRDch/OaWH3fHqLTkpnK1qD5KVxZb f5Zg== X-Gm-Message-State: APjAAAXJNN92KV/4esjaT+VWQhEhnXBbG/7ZK01Lo0BuAFD9WGWXxHqr MWxX3s1y+jT6g3k0jmjy1b1CVZcB X-Google-Smtp-Source: APXvYqwsL7ffgg/T0V1dgYA+KDAtzN7DzpS25wOtH9JYe7I79zr4Mu/SIwXdo9K/kNZl0q6y9uxVzg== X-Received: by 2002:a1c:1f89:: with SMTP id f131mr2068291wmf.72.1570010360868; Wed, 02 Oct 2019 02:59:20 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 02:59:19 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 2 Oct 2019 11:58:43 +0200 Message-Id: <20191002095904.6325-3-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/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 64349be444..13252a9486 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -219,6 +219,14 @@ and workspaces that can be used in the compiler environment of your choice.") (append (search-patches "cmake-curl-certificates.patch") (origin-patches (package-source cmake)))))))) +(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."