From: Milkey Mouse <milkeymouse@meme.institute>
To: 46676@debbugs.gnu.org
Subject: [bug#46676] [PATCH] gnu: opencl-headers: Update to 2020.12.18
Date: Sat, 20 Feb 2021 22:34:42 -0800 [thread overview]
Message-ID: <20210221063442.863940-1-milkeymouse@meme.institute> (raw)
* 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).
---
Several things have changed since the opencl-headers package was last
touched in 2018:
- OpenCL 3.0 was released: it's now the default in upstream ocl-headers
- The license was changed to Apache 2.0 as of commit 35deb75:
https://github.com/KhronosGroup/OpenCL-Headers/pull/76
- Folder structure was changed: instead of separate folders for each
OpenCL version, there is one set of headers, and the chosen OpenCL
version can be selected by defining CL_TARGET_OPENCL_VERSION. The
opencl-headers packages with specific versions *could* modify the
headers by either wrapping each real header in one that first defines
CL_TARGET_OPENCL_VERSION to the desired OpenCL version, or using
unifdef(1) to remove the header altogether... but, building every
package that depends on opencl-headers or opencl-headers-*.*, they
all work fine with regular opencl-headers (they define for themselves
CL_TARGET_OPENCL_VERSION, or they work fine with default OpenCL 3.0)
so unless some out-of-tree package reallly needs a predefined wrapper
package just to #define CL_TARGET_OPENCL_VERSION 220, it's probably
OK to deprecate opencl-headers-2.2, opencl-headers-1.2, etc.
gnu/packages/opencl.scm | 68 ++++++++++++++++++-----------------------
1 file 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")
--
2.30.1
next reply other threads:[~2021-02-21 6:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-21 6:34 Milkey Mouse [this message]
2021-03-13 13:36 ` bug#46676: [PATCH] gnu: opencl-headers: Update to 2020.12.18 Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210221063442.863940-1-milkeymouse@meme.institute \
--to=milkeymouse@meme.institute \
--cc=46676@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).