all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fis Trivial <ybbs.daans@hotmail.com>
To: "31436@debbugs.gnu.org" <31436@debbugs.gnu.org>
Subject: [bug#31436] [PATCH 1/6] gnu: Add opencl-headers.
Date: Sat, 12 May 2018 19:49:01 +0000	[thread overview]
Message-ID: <BLUPR16MB0500A93AF50FF75DD8E498C1929E0@BLUPR16MB0500.namprd16.prod.outlook.com> (raw)
In-Reply-To: <BLUPR16MB0500D0852942A2CF69BC740D929E0@BLUPR16MB0500.namprd16.prod.outlook.com>


* gnu/packages/opencl.scm: New file.
(make-opencl-headers): New function.
(opencl-headers-2.2, opencl-headers-2.1, opencl-headers-2.0,
opencl-headers-1.2, opencl-headers-1.1, opencl-headers-1.0, opencl-headers):
New variables.

* gnu/local.mk: Add the new file.
---
 gnu/local.mk            |  1 +
 gnu/packages/opencl.scm | 80 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)
 create mode 100644 gnu/packages/opencl.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 3ca7d45bd..39d53586d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -322,6 +322,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/ocaml.scm			\
   %D%/packages/ocr.scm				\
   %D%/packages/onc-rpc.scm			\
+  %D%/packages/opencl.scm			\
   %D%/packages/openbox.scm			\
   %D%/packages/openldap.scm			\
   %D%/packages/openstack.scm			\
diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm
new file mode 100644
index 000000000..25f5cb5a1
--- /dev/null
+++ b/gnu/packages/opencl.scm
@@ -0,0 +1,80 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages opencl)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix git-download)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses) #:prefix license:))
+
+;; This file adds OpenCL implementation related packages. Due to the fact that
+;; OpenCL devices are not available during build (store environment), tests are
+;; all disabled.
+;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.html
+
+(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.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit))
+                (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 Khronos OpenCL c headers.")
+      (home-page "https://www.khronos.org/registry/OpenCL/")
+      (license license:expat))))
+
+(define-public opencl-headers-2.2
+  (make-opencl-headers "2" "2"))
+(define-public opencl-headers-2.1
+  (make-opencl-headers "2" "1"))
+(define-public opencl-headers-2.0
+  (make-opencl-headers "2" "0"))
+(define-public opencl-headers-1.2
+  (make-opencl-headers "1" "2"))
+(define-public opencl-headers-1.1
+  (make-opencl-headers "1" "1"))
+(define-public opencl-headers-1.0
+  (make-opencl-headers "1" "0"))
+
+(define-public opencl-headers opencl-headers-2.2)
-- 
2.14.3


  reply	other threads:[~2018-05-12 19:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12 19:46 [bug#31436] [PATCH 0/6] gnu: Add opencl related packages Fis Trivial
2018-05-12 19:49 ` Fis Trivial [this message]
2018-05-12 19:49 ` [bug#31436] [PATCH 2/6] gnu: Add opencl-clhpp Fis Trivial
2018-05-12 19:50 ` [bug#31436] [PATCH 3/6] gnu: Add ocl-icd Fis Trivial
2018-05-12 19:50 ` [bug#31436] [PATCH 4/6] gnu: Add beignet Fis Trivial
2018-05-12 19:51 ` [bug#31436] [PATCH 5/6] gnu: Add clinfo Fis Trivial
2018-05-12 19:52 ` [bug#31436] [PATCH 6/6] gnu: Add pocl Fis Trivial
2018-05-26 17:42 ` [bug#31436] [PATCH 0/6] gnu: Add opencl related packages Fis Trivial
2018-05-28 12:51   ` Ludovic Courtès
2018-06-25 20:22 ` Ludovic Courtès
2018-06-25 20:58   ` Fis Trivial
2018-06-26 13:44     ` Ludovic Courtès
2018-06-26 18:49       ` Fis Trivial
2018-06-26 19:37       ` [bug#31436] [PATCH 0/3] Resend some opencl packages Fis Trivial
2018-06-26 19:39       ` [bug#31436] [PATCH 1/3] gnu: Add ocl-icd Fis Trivial
2018-06-26 20:26         ` Ludovic Courtès
2018-06-26 20:57           ` Fis Trivial
2018-06-26 19:39       ` [bug#31436] [PATCH 2/3] gnu: Add clinfo Fis Trivial
2018-06-26 20:32         ` Ludovic Courtès
2018-06-26 19:40       ` [bug#31436] [PATCH 3/3] gnu: Add beignet Fis Trivial
2018-06-26 21:00         ` bug#31436: " Ludovic Courtès

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLUPR16MB0500A93AF50FF75DD8E498C1929E0@BLUPR16MB0500.namprd16.prod.outlook.com \
    --to=ybbs.daans@hotmail.com \
    --cc=31436@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.