[bug#57675,07/10] gnu: Add libdispatch.
Commit Message
* gnu/packages/c.scm (libdispatch): New variable.
---
gnu/packages/c.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
Comments
Am Montag, dem 26.09.2022 um 21:32 +0800 schrieb Hilton Chain:
> * gnu/packages/c.scm (libdispatch): New variable.
> ---
> gnu/packages/c.scm | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
> index 10275970b1..4c183e3b95 100644
> --- a/gnu/packages/c.scm
> +++ b/gnu/packages/c.scm
> @@ -55,6 +55,7 @@ (define-module (gnu packages c)
> #:use-module (gnu packages perl)
> #:use-module (gnu packages texinfo)
> #:use-module (gnu packages guile)
> + #:use-module (gnu packages llvm)
> #:use-module (gnu packages lua)
> #:use-module (gnu packages multiprecision)
> #:use-module (gnu packages pcre)
> @@ -1258,3 +1259,28 @@ (define-public utest-h
> (description
> "This package provides a header-only unit testing library for
> C/C++.")
> (license license:unlicense))))
> +
> +(define-public libdispatch
> + (package
> + (name "libdispatch")
> + (version "5.7")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url
> "https://github.com/apple/swift-corelibs-libdispatch")
> + (commit (string-append "swift-" version "-RELEASE"))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0skg1azbhbg7y0ql2a5sx6lmfip8l1rajqm95zzf9xv45n4dg9nn"))))
> + (build-system cmake-build-system)
> + (native-inputs (list clang-toolchain))
Note: the *-toolchain packages are meant for users, not for packagers.
Since this package fails to compile with GCC, I'll replace this with
the following:
(arguments
(list #:phases
#~(modify-phases %standard-phases
;; Use Clang instead of GCC.
(add-before 'configure 'prepare-build-environment
(lambda _
(setenv "AR" "llvm-ar")
(setenv "NM" "llvm-nm")
(setenv "CC" "clang")
(setenv "CXX" "clang++"))))))
(native-inputs (list clang llvm))
> + (home-page
> "https://apple.github.io/swift-corelibs-libdispatch/")
> + (synopsis
> + "Comprehensive support for concurrent code execution on
> multicore
> +hardware")
> + (description
> + "Grand Central Dispatch (GCD or libdispatch) provides
> comprehensive
> +support for concurrent code execution on multicore hardware.")
> + (license license:asl2.0)))
Cheers
@@ -55,6 +55,7 @@ (define-module (gnu packages c)
#:use-module (gnu packages perl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages guile)
+ #:use-module (gnu packages llvm)
#:use-module (gnu packages lua)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pcre)
@@ -1258,3 +1259,28 @@ (define-public utest-h
(description
"This package provides a header-only unit testing library for C/C++.")
(license license:unlicense))))
+
+(define-public libdispatch
+ (package
+ (name "libdispatch")
+ (version "5.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/apple/swift-corelibs-libdispatch")
+ (commit (string-append "swift-" version "-RELEASE"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0skg1azbhbg7y0ql2a5sx6lmfip8l1rajqm95zzf9xv45n4dg9nn"))))
+ (build-system cmake-build-system)
+ (native-inputs (list clang-toolchain))
+ (home-page "https://apple.github.io/swift-corelibs-libdispatch/")
+ (synopsis
+ "Comprehensive support for concurrent code execution on multicore
+hardware")
+ (description
+ "Grand Central Dispatch (GCD or libdispatch) provides comprehensive
+support for concurrent code execution on multicore hardware.")
+ (license license:asl2.0)))