From 771de3438d95cdd876eb197e9e6ba45a4e95b6d3 Mon Sep 17 00:00:00 2001 From: Kevron Rees Date: Tue, 4 Nov 2014 09:34:39 -0800 Subject: [PATCH] initial packaging --- packaging/beignet.spec | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++ utests/CMakeLists.txt | 2 ++ 2 files changed, 92 insertions(+) create mode 100644 packaging/beignet.spec diff --git a/packaging/beignet.spec b/packaging/beignet.spec new file mode 100644 index 0000000..9b857f9 --- /dev/null +++ b/packaging/beignet.spec @@ -0,0 +1,90 @@ +# +# spec file for package beignet +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: beignet +Version: 0.9.3.git1414386114.6eb5d67 +Release: 0 +Summary: Open source implementation of the OpenCL for Intel GPUs +License: LGPL-2.1+ +Url: https://01.org/beignet/ +Source0: %{name}-%{version}.tar.xz +#ExclusiveArch: %{ix86} x86_64 +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: llvm >= 3.3 +BuildRequires: clang >= 3.3 +BuildRequires: clang-devel >= 3.3 +BuildRequires: llvm-devel >= 3.3 +BuildRequires: opencl-headers +BuildRequires: pkgconfig +BuildRequires: pkgconfig(egl) +#BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(ice) +BuildRequires: pkgconfig(ocl-icd) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(libdrm_intel) +BuildRequires: ncurses-devel +BuildRequires: python + +%description +Beignet is an open source implementation of the OpenCL specification - a generic +compute oriented API. This code base contains the code to run OpenCL programs +on Intel GPUs which basically defines and implements the OpenCL host functions +required to initialize the device, create the command queues, the kernels and +the programs and run them on the GPU. + +%package devel +Summary: Open source implementation of the OpenCL for Intel GPUs devel package +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version}-%{release} +Requires: opencl-headers + +%description devel +Devel package for Beignet is an open source implementation of the OpenCL +specification - a generic compute oriented API. + +%prep +%setup -q -n %{name}-%{version} + +%build +%cmake \ + -DLLVM_INSTALL_DIR=%{_bindir}/ \ + -DCMAKE_BUILD_TYPE=Release +make VERBOSE=1 %{?_smp_mflags} + +%install +#cd build +rm -rf %{buildroot} +%make_install +find %{buildroot}%{_includedir}/CL/ -regextype posix-egrep -not -regex ".*(cl_intel.h)" -type f -delete -maxdepth 1 + +%files +%defattr(-,root,root) +%doc COPYING README.md +%{_libdir}/beignet/ +%{_sysconfdir}/OpenCL/vendors/intel-beignet.icd +%dir %{_sysconfdir}/OpenCL +%dir %{_sysconfdir}/OpenCL/vendors + +%files devel +%defattr(-,root,root) +%doc docs/* +%{_includedir}/CL/cl_intel.h +%{_includedir}/CL/* + +%changelog diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt index 8cc8b43..9bafab0 100644 --- a/utests/CMakeLists.txt +++ b/utests/CMakeLists.txt @@ -246,6 +246,8 @@ if (COMPILER STREQUAL "CLANG") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-tautological-compare") endif () +message(STATUS "add math func: ${ADDMATHFUNC}") + ADD_LIBRARY(utests SHARED ${ADDMATHFUNC} ${utests_sources}) TARGET_LINK_LIBRARIES(utests cl m ${OPENGL_LIBRARIES} ${UTESTS_REQUIRED_EGL_LIB} ${CMAKE_THREAD_LIBS_INIT}) -- 2.7.4