opencl-clhpp/opencl-clhpp.spec

91 lines
3.3 KiB
RPMSpec
Raw Permalink Normal View History

%global date 2020.12.18
2021-11-11 11:25:07 +08:00
Name: opencl-clhpp
Version: 2.0.12
2021-11-24 15:28:11 +08:00
Release: 9
2021-11-11 11:25:07 +08:00
Summary: OpenCL (Open Computing Language) bind cpp header files.
2021-11-24 15:28:11 +08:00
License: Apache-2.0 and MIT
2021-11-11 11:25:07 +08:00
URL: https://github.com/KhronosGroup/OpenCL-CLHPP
Source0: https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v%{version}.tar.gz
Source1: https://github.com/KhronosGroup/OpenCL-Headers/archive/v%{date}.tar.gz
2021-11-18 09:26:36 +08:00
Source2: https://github.com/ThrowTheSwitch/CMock/archive/refs/tags/v2.5.3.tar.gz
Source3: https://github.com/ThrowTheSwitch/Unity/archive/refs/tags/v2.5.2.tar.gz
Source4: https://github.com/ThrowTheSwitch/CException/archive/refs/tags/v1.3.3.tar.gz
2021-11-12 17:35:29 +08:00
2021-11-24 15:28:11 +08:00
Patch1: 0001-Add_CL_DEVICE_BOARD_NAME_AMD.patch
Patch2: 0002-add-missing-const-to-context-properties.patch
Patch3: 0003-Fix-cl-enqueueMapSVM-for-cl-vector-and-cl-pointer.patch
2021-11-11 11:25:07 +08:00
BuildArch: noarch
2021-11-22 19:44:59 +08:00
BuildRequires: gcc-c++ cmake >= 3.14.0 ocl-icd rubygems ruby python git
2021-11-12 17:35:29 +08:00
Provides: bundled(grpc)
2021-11-12 17:35:29 +08:00
2021-11-11 11:25:07 +08:00
%description
%{summary}.
%prep
2021-11-24 15:28:11 +08:00
tar -zxf %SOURCE0 -C %{_builddir}/
tar -zxf %SOURCE1 -C %{_builddir}/OpenCL-CLHPP-%{version}
2021-11-18 09:26:36 +08:00
tar -zxf %SOURCE2 -C %{_builddir}/OpenCL-CLHPP-%{version}/external/
tar -zxf %SOURCE3 -C %{_builddir}/OpenCL-CLHPP-%{version}/external/
tar -zxf %SOURCE3 -C %{_builddir}/OpenCL-CLHPP-%{version}/external/CMock/vendor/
tar -zxf %SOURCE4 -C %{_builddir}/OpenCL-CLHPP-%{version}/external/CMock/vendor/
mv %{_builddir}/OpenCL-CLHPP-%{version}/external/CMock/vendor/Unity/* %{_builddir}/OpenCL-CLHPP-%{version}/external/CMock/vendor/unity/
2021-11-11 11:25:07 +08:00
%build
2021-11-24 15:28:11 +08:00
cd %{_builddir}/OpenCL-CLHPP-%{version}
2021-11-12 17:35:29 +08:00
ln -s /usr/lib64/libOpenCL.so.1 %{_builddir}/OpenCL-CLHPP-%{version}/libOpenCL.so
rm -rf build
mkdir build
cd build
2021-11-12 17:35:29 +08:00
cmake .. -DOPENCL_INCLUDE_DIR=%{_builddir}/OpenCL-CLHPP-%{version}/OpenCL-Headers-%{date} \
-DOPENCL_LIB_DIR=%{_builddir}/OpenCL-CLHPP-%{version}/ \
2021-11-18 09:26:36 +08:00
-DBUILD_TESTS=ON \
2021-11-12 17:35:29 +08:00
-DBUILD_DOCS=ON \
-DBUILD_EXAMPLES=ON
2021-11-11 11:25:07 +08:00
%install
2021-11-24 15:28:11 +08:00
cd %{_builddir}/OpenCL-CLHPP-%{version}
cd build
make install DESTDIR=%{buildroot}
2021-11-11 11:25:07 +08:00
2021-11-18 09:26:36 +08:00
%check
2021-11-24 15:28:11 +08:00
cd %{_builddir}/OpenCL-CLHPP-%{version}
2021-11-18 09:26:36 +08:00
cd build
make test
2021-11-11 11:25:07 +08:00
%files
%dir /usr/local/include/CL
/usr/local/include/CL/cl2.hpp
2021-11-11 11:25:07 +08:00
%changelog
2021-11-24 15:28:11 +08:00
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-9
- remove patch
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-8
- patch 0003-Fix-cl-enqueueMapSVM-for-cl-vector-and-cl-pointer.patch
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-7
- patch 0002-add-missing-const-to-context-properties
2021-11-22 19:44:59 +08:00
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-6
- patch 0001-Add_CL_DEVICE_BOARD_NAME_AMD
2021-11-18 09:26:36 +08:00
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-5
- Add Make Test Check
2021-11-12 17:35:29 +08:00
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-4
- Add Access Control
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-3
- Add OpenCL-headers files for opencl-clhpp build
2021-11-12 10:23:47 +08:00
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-2
- Updata README
2021-11-11 11:25:07 +08:00
* Tue Nov 11 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-1
- Package init