Archived
1
0
Fork 0

gnu: opencl-headers: Update to 2020.12.18

* gnu/packages/opencl.scm (opencl-headers): Update to 2020.12.18.
[version]: Use the latest tagged version, now that they exist.
[arguments]: Replace all phases with trivial header copy.
[license]: Change license to Apache 2.0 (happened in March 2020).

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
Milkey Mouse 2021-02-20 22:34:42 -08:00 committed by Nicolas Goaziou
parent 2ee7524c76
commit de84dfbed5
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -20,6 +20,7 @@
(define-module (gnu packages opencl) (define-module (gnu packages opencl)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system python) #:use-module (guix build-system python)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
@ -47,44 +48,35 @@
;; tests that require such devices are all disabled. ;; tests that require such devices are all disabled.
;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.html ;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.html
(define (make-opencl-headers major-version subversion) (define-public opencl-headers
(let ((commit "e986688daf750633898dfd3994e14a9e618f2aa5")
(revision "0"))
(package (package
(name "opencl-headers") (name "opencl-headers")
(version (git-version (version "2020.12.18")
(string-append major-version "." subversion ".0") (source
revision commit)) (origin
(source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/KhronosGroup/OpenCL-Headers") (url "https://github.com/KhronosGroup/OpenCL-Headers")
(commit commit))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32 "1zslxfzvbb1mrzmsik4pjzj88ds8y3p94ry5nnrnkhv6qm4n4lw9"))))
"176ydpbyws5nr4av6hf8p41pkhc0rc4m4vrah9w6gp2fw2i32838")))) (build-system copy-build-system)
(build-system gnu-build-system)
(arguments (arguments
`(#:phases '(#:install-plan
(modify-phases %standard-phases '(("CL" "include/")))) ; TODO: add phase for tests
(delete 'configure)
(delete 'build)
(delete 'check)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(copy-recursively (string-append "./opencl" (string-append
,major-version
,subversion) "/CL")
(string-append
(assoc-ref outputs "out")
"/include/CL")))))))
(synopsis "The Khronos OpenCL headers") (synopsis "The Khronos OpenCL headers")
(description (description
"This package provides the C headers by Khronos for OpenCL "This package provides the C headers by Khronos for OpenCL programming.")
programming.")
(home-page "https://www.khronos.org/registry/OpenCL/") (home-page "https://www.khronos.org/registry/OpenCL/")
(license license:expat)))) (license license:asl2.0)))
(define (make-opencl-headers major-version subversion)
;; The upstream OpenCL-Headers repository is no longer separating headers by
;; version; instead, you are supposed to #define CL_TARGET_OPENCL_VERSION.
(deprecated-package (string-append "opencl-headers-"
major-version "."
subversion) opencl-headers))
(define-public opencl-headers-2.2 (define-public opencl-headers-2.2
(make-opencl-headers "2" "2")) (make-opencl-headers "2" "2"))
@ -99,8 +91,6 @@ programming.")
(define-public opencl-headers-1.0 (define-public opencl-headers-1.0
(make-opencl-headers "1" "0")) (make-opencl-headers "1" "0"))
(define-public opencl-headers opencl-headers-2.2)
(define-public opencl-clhpp (define-public opencl-clhpp
(package (package
(name "opencl-clhpp") (name "opencl-clhpp")