From de04efd6a21ea986ec25674577b37e61d1f0b48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 4 Feb 2025 09:37:00 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 ocl-icd revision 4a2724b64bc47851d26e8ae703181e88 --- .gitattributes | 23 +++++ baselibs.conf | 3 + n_UsrShare.patch | 20 ++++ ocl-icd-2.3.1.tar.gz | 3 + ocl-icd.changes | 215 +++++++++++++++++++++++++++++++++++++++++++ ocl-icd.spec | 105 +++++++++++++++++++++ 6 files changed, 369 insertions(+) create mode 100644 .gitattributes create mode 100644 baselibs.conf create mode 100644 n_UsrShare.patch create mode 100644 ocl-icd-2.3.1.tar.gz create mode 100644 ocl-icd.changes create mode 100644 ocl-icd.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..2602e5b --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,3 @@ +libOpenCL1 +ocl-icd-devel + requires "libOpenCL1- = %version" diff --git a/n_UsrShare.patch b/n_UsrShare.patch new file mode 100644 index 0000000..0fc075b --- /dev/null +++ b/n_UsrShare.patch @@ -0,0 +1,20 @@ +Common subdirectories: ocl-icd-2.2.12.orig/m4 and ocl-icd-2.2.12/m4 +diff -u -p ocl-icd-2.2.12.orig/ocl_icd_loader.c ocl-icd-2.2.12/ocl_icd_loader.c +--- ocl-icd-2.2.12.orig/ocl_icd_loader.c 2020-08-22 18:35:11.229578000 +0200 ++++ ocl-icd-2.2.12/ocl_icd_loader.c 2020-08-22 20:31:52.943988000 +0200 +@@ -583,8 +583,15 @@ static void __initClIcd( void ) { + const char* dir_path=getenv("OCL_ICD_VENDORS"); + const char* vendor_path=getenv("OPENCL_VENDOR_PATH"); + if (! vendor_path || vendor_path[0]==0) { ++ struct stat buf; ++ int ret; + vendor_path=ETC_OPENCL_VENDORS; + debug(D_DUMP, "OPENCL_VENDOR_PATH unset or empty. Using hard-coded path '%s'", vendor_path); ++ ret=stat(vendor_path, &buf); ++ if (ret != 0) { ++ debug(D_WARN, "Cannot stat '%s'. Trying /usr/share/OpenCL/vendors", vendor_path); ++ vendor_path="/usr/share/OpenCL/vendors"; ++ } + } else { + debug(D_DUMP, "OPENCL_VENDOR_PATH set to '%s', using it", vendor_path); + } diff --git a/ocl-icd-2.3.1.tar.gz b/ocl-icd-2.3.1.tar.gz new file mode 100644 index 0000000..c31ed02 --- /dev/null +++ b/ocl-icd-2.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a32b67c2d52ffbaf490be9fc18b46428ab807ab11eff7664d7ff75e06cfafd6d +size 102616 diff --git a/ocl-icd.changes b/ocl-icd.changes new file mode 100644 index 0000000..134e21e --- /dev/null +++ b/ocl-icd.changes @@ -0,0 +1,215 @@ +------------------------------------------------------------------- +Mon Nov 11 11:52:00 UTC 2024 - Stefan Dirsch + +- nvidia-compute-G06: fixed conflicts to nvidia-compute-G06; + the requires to libOpenCL1 is already in since 550.120; so do + the conflicts for anything < 550.120 (boo#1233169) + +------------------------------------------------------------------- +Fri Nov 8 13:04:42 UTC 2024 - Stefan Dirsch + +- get rid of update-alternatives; it's no longer needed because with + upcoming G06 production driver, the nvidia packages will rely on + this implementation (JIRA#PED-11444) +- added conflicts to packages for legacy nvidia drivers (G04,G05) + +------------------------------------------------------------------- +Wed May 17 23:21:09 UTC 2023 - Dominique Leuenberger + +- Fix build against recent opencl: pass + --enable-official-khronos-headers to configure. + +------------------------------------------------------------------- +Fri Aug 20 19:17:11 UTC 2021 - Martin Hauke + +- Update to version 2.3.1 + * Khronos Header Compatibility +- Remove patch (included upstream): + * 0001-Updated-to-support-latest-Khronos-headers.patch + +------------------------------------------------------------------- +Tue Aug 17 11:34:01 UTC 2021 - Marcus Meissner + +- overwrite the libopenCL.so.1 link in %post of baselibs. (bsc#1189433) + +------------------------------------------------------------------- +Tue Jun 15 20:06:25 UTC 2021 - Christophe Giboudeaux + +- Add upstream change to fix build: + * 0001-Updated-to-support-latest-Khronos-headers.patch + +------------------------------------------------------------------- +Wed Mar 31 21:05:13 UTC 2021 - Martin Hauke + +- Update to version 2.3.0 + * Change OCL_ICD_LAYERS to OPENCL_LAYERS to conform to + upecification + * Updated layer support around official CL/cl_layer.h + * Updated OpenCL Headers + * Fixed typo in manpage + +------------------------------------------------------------------- +Sat Dec 12 21:50:37 UTC 2020 - Martin Hauke + +- Update to version 2.2.14 + * Added experimental support for layers + +------------------------------------------------------------------- +Sat Oct 24 12:10:24 UTC 2020 - Martin Hauke + +- Update to version 2.2.13 + * Removed warnings and use uniform warning suppression + * Switched Khornos Headers to OpenCL3.0 + * Added OpenCL 3.0 support + * Fix warning in gcc10 + * Updated loader and headers to support + clSetContextDestructorCallback. + * Call clGetDeviceIDs directly through the dispatch table +- Drop patch: + * ocl-icd-gcc10.patch (fixed upstream) + +------------------------------------------------------------------- +Mon Aug 31 19:03:27 UTC 2020 - Stefan Dirsch + +- added patch markups to specfile for better documentation + +------------------------------------------------------------------- +Sat Aug 22 16:49:25 UTC 2020 - Stefan Dirsch + +- n_UsrShare.patch + * first try /etc/OpenCL/vendors, then /usr/share/OpenCL/vendors + (boo#1173005, comment#8) +- supersedes configure option --enable-custom-vendordir + +------------------------------------------------------------------- +Tue Jun 23 18:18:54 UTC 2020 - Stefan Dirsch + +- switch from /usr/etc/OpenCL/vendors to /usr/share/OpenCL/vendors + for vendor specific .icd files (boo#1173005) + +------------------------------------------------------------------- +Thu Jun 18 10:20:08 UTC 2020 - Stefan Dirsch + +- switch to /usr/etc/OpenCL/vendors for vendor specific .icd files + (boo#1173005); currently I'm only aware of Mesa using it (taking + care about adjusting this myself); NVIDIA is using its own + libOpenCL ... + +------------------------------------------------------------------- +Wed Jun 3 10:56:53 UTC 2020 - Dominique Leuenberger + +- Add ocl-icd-gcc10.patch: Fix build with gcc10 (boo#1172436). + +------------------------------------------------------------------- +Sat May 30 08:57:18 UTC 2020 - Marcus Meissner + +- add baselibs.conf to build 32bit binaries for Wine (bsc#1172303) + +------------------------------------------------------------------- +Wed Feb 26 12:25:52 UTC 2020 - Tomáš Chvátal + +- Remove condition for SLE11 build as it is unresolvable anyway +- Require update-alternatives only where really needed +- Require opencl-headers in the develpackage as otherwise all + those that pull the devel would need to do it on their own. + +------------------------------------------------------------------- +Mon Aug 5 15:57:04 UTC 2019 - Antoine Belvire + +- Update to version 2.2.12: + * Switched khronos headers to OpenCL 2.2. + * Added OpenCL 2.2 support. +- Update URL to GitHub repository since previous URL is not + accessible anymore. +- Only suggest pocl instead of recommending it. +- Add check section. + +------------------------------------------------------------------- +Sat Jan 19 21:35:38 UTC 2019 - mardnh@gmx.de + +- Add missing Requires(post): update-alternatives + +------------------------------------------------------------------- +Mon Jan 14 01:22:04 UTC 2019 - sndirsch@suse.com + +- limit usage of update-alernatives to sle15-sp1/Leap 15.1 and newer + +------------------------------------------------------------------- +Sun Jan 13 19:51:09 UTC 2019 - sndirsch@suse.com + +- sle15/Leap15 and newer: switch to usage of update-alternatives, + so the package no longer conflicts with nvidia packages + (boo#1108304) + +------------------------------------------------------------------- +Sat Jul 8 17:37:36 UTC 2017 - mardnh@gmx.de + +- Recommend pocl when installing libOpenCL to get a better + "out of the box" OpenCL experience for (open)SUSE users. + +------------------------------------------------------------------- +Sun Jan 22 10:38:26 UTC 2017 - mpluskal@suse.com + +- Update to version 2.2.11: + * Add autoconf option for custom vendors .icd path + * Make vendordir relative to + * Hack the docs to reflect configured vendordir + * Revert "By default, use platforme specific clGetPlatformInfo" + * Do not deference the plateform structure before checking it is an ICD + * Cleanup --enable-custom-vendordir usage + * [doc] ensure that files are correctly distributed and/or cleaned up + * [doc] improve doc + * [build] add notice message about what is choosen +- Changes for version 2.2.10: + * Suppress warning due to shadowed variable name + * Static-const-ify ICD loader info strings + * Fallback to dispatch table for clGetPlatformInfo + * By default, use platforme specific clGetPlatformInfo +- Changes for version 2.2.9: + * Update clGetICDLoaderInfoOCLICD to report version 2.1. + * Report the correct supported OpenCL version when asked + * Add support for OPENCL_VENDOR_PATH envvar + +------------------------------------------------------------------- +Mon Feb 15 10:01:42 UTC 2016 - mardnh@gmx.de + +- Fix BuildRequires: ocl_icd.h includes CL/cl_egl.h + +------------------------------------------------------------------- +Tue Jan 26 11:33:59 UTC 2016 - mpluskal@suse.com + +- Update to 2.2.7 + * See NEWS for full list of changes + +------------------------------------------------------------------- +Sun Sep 6 12:37:54 UTC 2015 - mpluskal@suse.com + +- Update to 2.2.7 + * See NEWS for full list of changes +- Cleanup spec file with spec-cleaner + +------------------------------------------------------------------- +Thu Aug 7 09:13:55 UTC 2014 - mardnh@gmx.de + +- update to version 2.1.3 + * Brice Videau (3): + Moved some declarations to the header as they are needed in the generated + part now. + If we have no valid platforms non can be valid. + In case a NULL platform is passed to the loader, the default platform is + selected if it exists and is valid. + + * Vincent Danjean (5): + Rewrote initialization comments + All generated file ends with "_gen" suffix (but installed once) + [build] add tests for default platform selection + Refactor code for selection of default platform + Release 2.1.3 + +------------------------------------------------------------------- +Thu Nov 7 12:53:17 UTC 2013 - Rene.vanPaassen@gmail.com + +- added buildroot define for sle +- modifying generated and build-in source, for older gcc, removing some + pragma GCC diagnostic statements + diff --git a/ocl-icd.spec b/ocl-icd.spec new file mode 100644 index 0000000..580e26e --- /dev/null +++ b/ocl-icd.spec @@ -0,0 +1,105 @@ +# +# spec file for package ocl-icd +# +# Copyright (c) 2024 SUSE LLC +# +# 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 https://bugs.opensuse.org/ +# + + +Name: ocl-icd +Version: 2.3.1 +Release: 0 +Summary: OpenCL ICD Bindings +License: BSD-2-Clause +URL: https://github.com/OCL-dev/ocl-icd +Source: https://github.com/OCL-dev/ocl-icd/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: baselibs.conf +# PATCH-FEATURE-OPENSUSE n_UsrShare.patch boo#1173005, comment#8 +Patch0: n_UsrShare.patch +BuildRequires: libtool +BuildRequires: opencl-headers >= 2.2 +BuildRequires: pkgconfig +BuildRequires: ruby +BuildRequires: pkgconfig(egl) + +%description +OpenCL is a royalty-free standard for cross-platform, parallel programming +of modern processors found in personal computers, servers and +handheld/embedded devices. + +This package provides an Installable Client Driver Bindings (ICD Bindings). +The provided libOpenCL library is able to load any free or non-free installed +ICD (driver backend). + +%package -n libOpenCL1 +Summary: OpenCL ICD Bindings +Suggests: pocl +Conflicts: nvidia-compute-G04 +Conflicts: nvidia-compute-G05 +Conflicts: nvidia-compute-G06 < 550.120 + +%description -n libOpenCL1 +OpenCL is a royalty-free standard for cross-platform, parallel programming +of modern processors found in personal computers, servers and +handheld/embedded devices. + +This package provides an Installable Client Driver Bindings (ICD Bindings). +The provided libOpenCL library is able to load any free or non-free installed +ICD (driver backend). + +%package devel +Summary: Development files of ocl-icd +Requires: libOpenCL1 = %{version} +Requires: opencl-headers >= 2.2 +Requires: pkgconfig(egl) + +%description devel +This package provides the files needed to build OpenCL client drivers that +use ocl-icd for ICD functionality. + +%prep +%autosetup -p1 + +%build +./bootstrap +%configure --enable-official-khronos-headers +%make_build stamp-generator stamp-generator-dummy +%make_build + +%install +%make_install +find %{buildroot} -type f -name "*.la" -delete -print +rm -rf instdocs +mv %{buildroot}%{_datadir}/doc/%{name} instdocs + +%post -n libOpenCL1 -p /sbin/ldconfig + +%postun -n libOpenCL1 -p /sbin/ldconfig + +%check +%make_build check + +%files -n libOpenCL1 +%doc README +%{_libdir}/libOpenCL.so.1* + +%files devel +%doc README NEWS +%license COPYING +%doc instdocs/* +%{_libdir}/libOpenCL.so +%{_libdir}/pkgconfig/OpenCL.pc +%{_libdir}/pkgconfig/ocl-icd.pc +%{_includedir}/ocl_icd.h + +%changelog