From c27a4c0a6586fcb3532a39b1d7875856e4d1e574 Mon Sep 17 00:00:00 2001 From: Dennis E. Mungai Date: Tue, 8 Mar 2016 23:14:40 +0300 Subject: pocl updated with all dependencies. Have fun.--- gn/packages/pocl.scm | 122 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 116 insertions(+), 6 deletions(-) (limited to 'gn/packages') diff --git a/gn/packages/pocl.scm b/gn/packages/pocl.scm index c5cb8cb..93534b7 100644 --- a/gn/packages/pocl.scm +++ b/gn/packages/pocl.scm @@ -20,6 +20,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix git-download) #:use-module (guix download) + #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) #:use-module (guix packages) #:use-module (gnu packages algebra) @@ -38,9 +39,13 @@ #:use-module (gnu packages maths) #:use-module (gnu packages mpi) #:use-module (gnu packages web) + #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages xorg) - #:use-module (gnu packages version-control) + #:use-module (gnu packages version-control) + #:use-module (gnu packages ruby) + #:use-module (gnu packages gnupg) + #:use-module (gnu packages zip) #:use-module (gnu packages linux)) (define-public pocl @@ -76,19 +81,28 @@ ("libjpeg" ,libjpeg) ("libltdl" ,libltdl) ("libtiff" ,libtiff) - ("llvm" ,llvm) + ("llvm" ,llvm-3.7.1) + ("ocl-icd" ,ocl-icd) + ("opencl-headers" ,opencl-headers) ("mesa-utils" ,mesa-utils) ("openmpi" ,openmpi) + ("perl" ,perl) ("randrproto" ,randrproto) ("libxrandr" ,libxrandr) ("xineramaproto" ,xineramaproto) ("libxinerama" ,libxinerama) ("libxcursor" ,libxcursor) ("fftw-openmpi" ,fftw-openmpi))) - (build-system cmake-build-system) - (arguments - `(#:configure-flags '("-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=ON") - #:tests? #f)) + (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--enable-icd") + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'rewrite-usr-bin + (lambda _ + (zero? (system* "./autogen.sh"))))))) (synopsis "pocl: Portable Computing Language (pocl) aims to become a MIT-licensed open source implementation of the OpenCL standard which can be easily adapted for new targets and devices, both for homogeneous CPU and heterogenous GPUs/accelerators.") @@ -97,3 +111,99 @@ new targets and devices, both for homogeneous CPU and heterogenous GPUs/accelerators.") (home-page "http://portablecl.org/") (license license:gpl2)))) + +(define-public llvm-3.7.1 +(package + (name "llvm-3.7.1") + (version "3.7.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://llvm.org/releases/" + version "/llvm-" version ".src.tar.xz")) + (sha256 + (base32 + "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy")))) + (build-system cmake-build-system) + (native-inputs + `(("python" ,python-wrapper) + ("perl" ,perl))) + (arguments + `(#:configure-flags '("-DCMAKE_SKIP_BUILD_RPATH=FALSE" + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"))) + (home-page "http://www.llvm.org") + (synopsis "Optimizing compiler infrastructure") + (description + "LLVM is a compiler infrastructure designed for compile-time, link-time, +runtime, and idle-time optimization of programs from arbitrary programming +languages. It currently supports compilation of C and C++ programs, using +front-ends derived from GCC 4.0.1. A new front-end for the C family of +languages is in development. The compiler infrastructure includes mirror sets +of programming tools as well as libraries with equivalent functionality.") + (license license:ncsa))) + +(define-public ocl-icd + (package + (name "ocl-icd") + (version "2.2.9") + (source (origin + (method url-fetch) + (uri (string-append "https://forge.imag.fr/frs/download.php/716/ocl-icd-" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1rgaixwnxmrq2aq4kcdvs0yx7i6krakarya9vqs7qwsv5hzc32hc")))) + (inputs `(("zip" ,zip) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("ruby" ,ruby) + ("libtool" ,libtool) + ("opencl-headers" ,opencl-headers) + ("libgcrypt" ,libgcrypt))) + (build-system gnu-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (add-after 'unpack `bootstrap + (lambda _ + (zero? (system* "autoreconf" "-vfi"))))))) + (home-page "https://forge.imag.fr/projects/ocl-icd/") + (synopsis "OpenCL implementations are provided as ICD (Installable Client Driver).") + (description "OpenCL implementations are provided as ICD (Installable Client Driver). + An OpenCL program can use several ICD thanks to the use of an ICD Loader as provided by this project. + This free ICD Loader can load any (free or non free) ICD") + (license license:gpl2))) + + (define-public opencl-headers +(let ((commit "c1770dc")) + (package + (name "opencl-headers") + (version (string-append "2.1-" 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 + "0m9fkblqja0686i2jjqiszvq3df95gp01a2674xknlmkd6525rck")))) + (propagated-inputs '()) + (inputs '()) + (native-inputs '()) + (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 + (assoc-ref outputs "out") + "/include/CL"))))))) + (synopsis "The Khronos OpenCL headers") + (description "This package provides the Khronos OpenCL headers") + (home-page "https://www.khronos.org/registry/cl/") + (license license:gpl2)))) -- cgit v1.2.3