Package: guix-patches;
Reported by: Julien Lepiller <julien <at> lepiller.eu>
Date: Thu, 3 Mar 2022 16:04:02 UTC
Severity: normal
Tags: patch
Message #20 received at 54239 <at> debbugs.gnu.org (full text, mbox):
From: Julien Lepiller <julien <at> lepiller.eu> To: 54239 <at> debbugs.gnu.org Subject: [PATCH 5/5] gnu: Add libcxxabi-9. Date: Thu, 3 Mar 2022 17:07:47 +0100
* gnu/packages/llvm.scm (libcxxabi-9): New variable. (libcxxabi-6): Inherit from it. --- gnu/packages/llvm.scm | 72 +++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 63b55ef3df..f1631bbe70 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1396,20 +1396,17 @@ (define-public libcxx-6 (cross-clang (%current-target-system) #:clang clang-6) clang-6))))) -(define-public libcxxabi-6 +(define-public libcxxabi-9 (package (name "libcxxabi") - (version "6.0.1") + (version (package-version clang-9)) (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/llvm/llvm-project") - (commit (string-append "llvmorg-" version)))) - (file-name (git-file-name name version)) + (method url-fetch) + (uri (llvm-uri "libcxxabi" version)) (sha256 (base32 - "0ki6796b5z08kh3a3rbysr5wwb2dkl6wal5dzd03i4li5xfkvx1g")))) + "1b4aiaa8cirx52vk2p5kfk57qmbqf1ipb4nqnjhdgqps9jm7iyg8")))) (build-system cmake-build-system) (arguments `(#:configure-flags @@ -1420,8 +1417,6 @@ (define-public libcxxabi-6 "-DCMAKE_CXX_COMPILER=clang++") #:phases (modify-phases (@ (guix build cmake-build-system) %standard-phases) - (add-after 'unpack 'chdir - (lambda _ (chdir "libcxxabi"))) (add-after 'unpack 'adjust-CPLUS_INCLUDE_PATH (lambda* (#:key inputs native-inputs #:allow-other-keys) (define (delete* what lst) @@ -1455,10 +1450,10 @@ (define-public libcxxabi-6 (string-append gcc "/include/c++")) (string-split (getenv "CROSS_CPLUS_INCLUDE_PATH") #\:))) - ":")) - (format #true - "environment variable `CROSS_CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CROSS_CPLUS_INCLUDE_PATH"))) + ":"))) + (format #true + "environment variable `CROSS_CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CROSS_CPLUS_INCLUDE_PATH")) (format #true "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" (getenv "CPLUS_INCLUDE_PATH"))))) @@ -1466,13 +1461,19 @@ (define-public libcxxabi-6 (lambda* (#:key outputs #:allow-other-keys) (let ((include-dir (string-append (assoc-ref outputs "out") "/include"))) - (install-file "../libcxxabi/include/__cxxabi_config.h" include-dir) - (install-file "../libcxxabi/include/cxxabi.h" include-dir))))))) - (inputs (list llvm-6 libcxx-6)) + (mkdir-p include-dir) + (install-file ,(string-append "../libcxxabi-" version + ".src/include/__cxxabi_config.h") + include-dir) + (install-file ,(string-append "../libcxxabi-" version + ".src/include/cxxabi.h") + include-dir))))))) + (inputs + (list llvm-9 libcxx)) (native-inputs (list (if (%current-target-system) - (cross-clang (%current-target-system) #:clang clang-6) - clang-6))) + (cross-clang (%current-target-system) #:clang clang-9) + clang-9))) (home-page "https://libcxxabi.llvm.org") (synopsis "C++ standard library support") (description @@ -1480,6 +1481,39 @@ (define-public libcxxabi-6 standard C++ library.") (license license:expat))) +(define-public libcxxabi-6 + (package + (inherit libcxxabi-9) + (name "libcxxabi") + (version "6.0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/llvm/llvm-project") + (commit (string-append "llvmorg-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ki6796b5z08kh3a3rbysr5wwb2dkl6wal5dzd03i4li5xfkvx1g")))) + (arguments + (substitute-keyword-arguments (package-arguments libcxxabi-9) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'chdir + (lambda _ (chdir "libcxxabi"))) + (replace 'install-headers + (lambda* (#:key outputs #:allow-other-keys) + (let ((include-dir (string-append + (assoc-ref outputs "out") "/include"))) + (install-file "../libcxxabi/include/__cxxabi_config.h" include-dir) + (install-file "../libcxxabi/include/cxxabi.h" include-dir)))))))) + (inputs (list llvm-6 libcxx-6)) + (native-inputs + (list (if (%current-target-system) + (cross-clang (%current-target-system) #:clang clang-6) + clang-6))))) + (define-public libcxx+libcxxabi-6 (package (inherit libcxx-6) -- 2.34.0
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.