diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2021-03-24 15:28:33 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2021-03-24 20:50:44 +0200 |
commit | 2aab587f842908a886e3bd08b028885dddd650e0 (patch) | |
tree | 87c0723a9ae2c69ab6920d90b6e87ad8510492fe /gnu/packages/opencl.scm | |
parent | 5664bcdcb0e4c10dfe48dd5e4730fc3c746a21e2 (diff) | |
parent | 65c46e79e0495fe4d32f6f2725d7233fff10fd70 (diff) | |
download | guix-2aab587f842908a886e3bd08b028885dddd650e0.tar.gz guix-2aab587f842908a886e3bd08b028885dddd650e0.zip |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/packages/opencl.scm')
-rw-r--r-- | gnu/packages/opencl.scm | 68 |
1 files changed, 29 insertions, 39 deletions
diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm index ddc30ef037..e95d19db47 100644 --- a/gnu/packages/opencl.scm +++ b/gnu/packages/opencl.scm @@ -20,6 +20,7 @@ (define-module (gnu packages opencl) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system python) #:use-module (guix download) #:use-module (guix git-download) @@ -47,44 +48,35 @@ ;; tests that require such devices are all disabled. ;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.html +(define-public opencl-headers + (package + (name "opencl-headers") + (version "2020.12.18") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/KhronosGroup/OpenCL-Headers") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zslxfzvbb1mrzmsik4pjzj88ds8y3p94ry5nnrnkhv6qm4n4lw9")))) + (build-system copy-build-system) + (arguments + '(#:install-plan + '(("CL" "include/")))) ; TODO: add phase for tests + (synopsis "The Khronos OpenCL headers") + (description + "This package provides the C headers by Khronos for OpenCL programming.") + (home-page "https://www.khronos.org/registry/OpenCL/") + (license license:asl2.0))) + (define (make-opencl-headers major-version subversion) - (let ((commit "e986688daf750633898dfd3994e14a9e618f2aa5") - (revision "0")) - (package - (name "opencl-headers") - (version (git-version - (string-append major-version "." subversion ".0") - revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/KhronosGroup/OpenCL-Headers") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "176ydpbyws5nr4av6hf8p41pkhc0rc4m4vrah9w6gp2fw2i32838")))) - (build-system gnu-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (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") - (description - "This package provides the C headers by Khronos for OpenCL -programming.") - (home-page "https://www.khronos.org/registry/OpenCL/") - (license license:expat)))) + ;; 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 (make-opencl-headers "2" "2")) @@ -99,8 +91,6 @@ programming.") (define-public opencl-headers-1.0 (make-opencl-headers "1" "0")) -(define-public opencl-headers opencl-headers-2.2) - (define-public opencl-clhpp (package (name "opencl-clhpp") |