From patchwork Thu Oct 27 08:33:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zhu Zihao X-Patchwork-Id: 44154 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 A955B27BBEB; Thu, 27 Oct 2022 09:37:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A68E127BBEA for ; Thu, 27 Oct 2022 09:37:49 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onyLx-0003w1-Am; Thu, 27 Oct 2022 04:35:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onyLu-0003fA-Vx for guix-patches@gnu.org; Thu, 27 Oct 2022 04:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onyLu-0006kn-O3 for guix-patches@gnu.org; Thu, 27 Oct 2022 04:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onyLu-0001Ll-Ia for guix-patches@gnu.org; Thu, 27 Oct 2022 04:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58394] [PATCH 1/4] gnu: libcxx: Use G-expressions. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Oct 2022 08:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58394 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 58394@debbugs.gnu.org, Zhu Zihao Received: via spool by 58394-submit@debbugs.gnu.org id=B58394.16668596775131 (code B ref 58394); Thu, 27 Oct 2022 08:35:02 +0000 Received: (at 58394) by debbugs.gnu.org; 27 Oct 2022 08:34:37 +0000 Received: from localhost ([127.0.0.1]:56117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onyLL-0001KW-Mm for submit@debbugs.gnu.org; Thu, 27 Oct 2022 04:34:36 -0400 Received: from mail-m972.mail.163.com ([123.126.97.2]:42153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onyLH-0001Jr-7U for 58394@debbugs.gnu.org; Thu, 27 Oct 2022 04:34:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=OGtTj imhw4qYyObLU5V2QU5TKMgCFOBUjOg63qAzldE=; b=cS2VQen/qWw8bOKPxmUHv 7aFV4fTMsZMmcNrxSEcutGbpl5r8FZHtr9K4rQDDAWowrMg0sSjxRMKo24CW+mNw yVD9M7fIoqzoF6OuNuneif6MPQ2z01JbpNm5UpkuvsQiZeeOvx837AkXz5pLOqQF EDPmWVYMaOmeIQA6sEc474= Received: from localhost.localdomain (unknown [27.38.249.197]) by smtp2 (Coremail) with SMTP id GtxpCgDHxcOEQlpjQY5hpA--.34500S2; Thu, 27 Oct 2022 16:34:13 +0800 (CST) From: Zhu Zihao Date: Thu, 27 Oct 2022 16:33:27 +0800 Message-Id: <20221027083330.960-1-all_but_last@163.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <87eduy4yhv.fsf@gnu.org> References: <87eduy4yhv.fsf@gnu.org> MIME-Version: 1.0 X-CM-TRANSID: GtxpCgDHxcOEQlpjQY5hpA--.34500S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxGry7Jw17AFWDXFyDtFy7Jrb_yoW5Gr4UpF Z3Zw1F9r95Ca47Wws3Xr42kr9Yqa9avrs7Z3yaya1xJ3yj9Fy8trsrKFWfCrnrWr4vy3yr uw47tF4fu34rG3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0JUh18kUUUUU= X-Originating-IP: [27.38.249.197] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiFB6nr1aEAZ4x0wABss X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/llvm.scm (libcxx)[arguments]: Use G-expressions. (libcxx-6)[arguments]: Use G-expressions. --- gnu/packages/llvm.scm | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 49eb25db1f..00918bfb90 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2022 Greg Hogan ;;; Copyright © 2022 John Kehayias ;;; Copyright © 2022 Clément Lassieur +;;; Copyright © 2022 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -1540,22 +1541,23 @@ (define-public libcxx "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089")))) (build-system cmake-build-system) (arguments - `(#:phases - (modify-phases (@ (guix build cmake-build-system) %standard-phases) - (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Hide GCC's C++ headers so that they do not interfere with - ;; the ones we are attempting to build. - (setenv "CPLUS_INCLUDE_PATH" - (string-join (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") - #\:)) - ":")) - (format #t - "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CPLUS_INCLUDE_PATH")) - #t)))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")) + #t)))))) (native-inputs (list clang llvm)) (home-page "https://libcxx.llvm.org") @@ -1578,6 +1580,11 @@ (define-public libcxx-6 (sha256 (base32 "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) + (arguments + (substitute-keyword-arguments (package-arguments libcxx) + ((#:phases p) + #~(modify-phases #$p + (delete 'enter-subdirectory))))) (native-inputs (list clang-6 llvm-6))))