From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYh0D-0003IN-JK for guix-patches@gnu.org; Thu, 28 Jun 2018 20:11:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYh0A-0001zq-D2 for guix-patches@gnu.org; Thu, 28 Jun 2018 20:11:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59361) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYh0A-0001zl-85 for guix-patches@gnu.org; Thu, 28 Jun 2018 20:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fYh0A-00022D-0D for guix-patches@gnu.org; Thu, 28 Jun 2018 20:11:02 -0400 Subject: [bug#32001] [PATCH] gnu: Add pocl. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYgzh-0003Fp-FU for guix-patches@gnu.org; Thu, 28 Jun 2018 20:10:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYgzd-0001c5-BF for guix-patches@gnu.org; Thu, 28 Jun 2018 20:10:33 -0400 From: Fis Trivial Date: Fri, 29 Jun 2018 00:10:25 +0000 Message-ID: Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32001@debbugs.gnu.org * gnu/packages/opencl.scm (pocl): New variable. --- gnu/packages/opencl.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++= ++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm index 644cd95e9..14eed5248 100644 --- a/gnu/packages/opencl.scm +++ b/gnu/packages/opencl.scm @@ -24,11 +24,13 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages gl) #:use-module (gnu packages gnupg) #:use-module (gnu packages compression) #:use-module (gnu packages libedit) #:use-module (gnu packages llvm) + #:use-module (gnu packages mpi) #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -38,8 +40,8 @@ #:use-module (gnu packages xorg)) ;; This file adds OpenCL implementation related packages. Due to the fact = that -;; OpenCL devices are not available during build (store environment), test= s are -;; all disabled. +;; OpenCL devices like GPU are not available during build (store environme= nt), +;; tests that require such devices are all disabled. ;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.ht= ml (define (make-opencl-headers major-version subversion) @@ -288,3 +290,50 @@ functions required to initialize the device, create th= e command queues, the kernels and the programs, and run them on the GPU. The code also contains= a back-end for the LLVM compiler framework.") (license license:lgpl2.1+))) + +(define-public pocl + (package + (name "pocl") + (version "1.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/pocl/pocl/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0lrw3hlb0w53xzmrf2hvbda406l70ar4gyadflvlkj4879lx138y")))) + (build-system cmake-build-system) + (native-inputs + `(("libltdl" ,libltdl) + ("pkg-config" ,pkg-config))) + (inputs + `(("clang" ,clang) + ("hwloc" ,hwloc "lib") + ("llvm" ,llvm) + ("ocl-icd" ,ocl-icd))) + (arguments + `(#:configure-flags + (list "-DENABLE_ICD=3DON" + "-DENABLE_TESTSUITES=3DON" + ;; We are not developers, don't run conformance suite. + "-DENABLE_CONFORMANCE=3DOFF" + (string-append "-DEXTRA_HOST_LD_FLAGS=3D-L" + (assoc-ref %build-inputs "libc") "/lib")) + #:phases + (modify-phases %standard-phases + (add-after 'install 'remove-headers + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (delete-file-recursively + (string-append out "/include"))))) + (add-before 'check 'set-HOME + (lambda _ + (setenv "HOME" "/tmp") + #t))))) + (home-page "http://portablecl.org/") + (synopsis "Portable Computing Language (pocl), is an OpenCL implementa= tion") + (description "Pocl is being developed towards an efficient implementat= ion +of OpenCL standard which can be easily adapted for new targets.") + (license license:expat))) -- 2.14.4