[packages/khronos-OpenCL-headers] - updated to OpenCL 3.1.1 API (2026.05.29 tag); CLHPP headers moved to khronos-OpenCL-CLHPP.spec
qboosh
qboosh at pld-linux.org
Thu Sep 17 21:22:01 CEST 2026
commit 75659dde5cd075dfe05ff0d4d5a37291c3582e71
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Sep 17 21:22:17 2026 +0200
- updated to OpenCL 3.1.1 API (2026.05.29 tag); CLHPP headers moved to khronos-OpenCL-CLHPP.spec
AMD_extensions.patch | 47 ++++++++++++----------------
khronos-OpenCL-headers.spec | 74 ++++++++++++++++++++++-----------------------
2 files changed, 55 insertions(+), 66 deletions(-)
---
diff --git a/khronos-OpenCL-headers.spec b/khronos-OpenCL-headers.spec
index 982229d..b47d0d0 100644
--- a/khronos-OpenCL-headers.spec
+++ b/khronos-OpenCL-headers.spec
@@ -1,40 +1,19 @@
Summary: OpenCL (Open Computing Language) header files
Summary(pl.UTF-8): Pliki nagłówkowe OpenCL (Open Computing Language)
Name: khronos-OpenCL-headers
-Version: 2.2
-Release: 2
+# use OpenCL spec version for given tag
+Version: 3.1.1
+%define gitver 2026.05.29
+Release: 1
License: MIT-like
Group: Libraries
-Source0: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl.h
-# Source0-md5: 98f9e8ebab9d3baf4b9b7d004a682eca
-Source1: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl_egl.h
-# Source1-md5: c7f42a37356c2d4e42f2692921ed09a7
-Source2: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl_ext.h
-# Source2-md5: 0be05487e184ac36cf789d3badfdede2
-Source3: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl_gl.h
-# Source3-md5: b1dac507ba9b9abf0d6060f4acd5f414
-Source4: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl_gl_ext.h
-# Source4-md5: 8982a32bca3c81bfab06c265e0a4130e
-Source5: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl_platform.h
-# Source5-md5: dbc6a23be143d0cb586f605fd39741d5
-Source6: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/opencl.h
-# Source6-md5: 687394644e8c4ec4fd3d77f2f86bc042
-# Three following are Win32 specific (rely on D3D), so we don't package them:
-#Source11: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl_d3d10.h
-## Source11-md5: 64634186074ea8570ea24ce50b328968
-#Source12: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl_d3d11.h
-## Source12-md5: 2608ee0f7a6101216cdfe3046591da30
-#Source13: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl22/CL/cl_dx9_media_sharing.h
-## Source13-md5: 6d92fb282cab5cfa91aa05d62ed1953e
-# This actually belongs to OpenCL 1.2, included for backward compatibility (OpenCL 2+ uses cl2.hpp)
-Source50: https://www.khronos.org/registry/cl/api/2.1/cl.hpp
-# Source50-md5: f2c8bee05e5a84ea8282b7b95646c515
-# OpenCL 2+ binding from CLHPP project
-#Source51Download: https://www.github.com/KhronosGroup/OpenCL-CLHPP/releases
-Source51: https://github.com/KhronosGroup/OpenCL-CLHPP/releases/download/v2.0.10/cl2.hpp
-# Source51-md5: c38d1b78cd98cc809fa2a49dbd1734a5
+#Source0Download: https://github.com/KhronosGroup/OpenCL-Headers/releases
+Source0: https://github.com/KhronosGroup/OpenCL-Headers/archive/v%{gitver}/OpenCL-Headers-%{gitver}.tar.gz
+# Source0-md5: a8e7d63bd1acc79d0695da3cc36479a8
Patch0: AMD_extensions.patch
URL: http://www.khronos.org/registry/cl/
+BuildRequires: cmake >= 3.16
+Provides: OpenCL-Headers = %{version}
Conflicts: Mesa-libOpenCL-devel
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -46,23 +25,42 @@ OpenCL (Open Computing Language) header files.
Pliki nagłówkowe języka obliczeń OpenCL (Open Computing Language).
%prep
-%setup -q -cT
-
-cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} \
- %{SOURCE50} %{SOURCE51} .
-
+%setup -q -n OpenCL-Headers-%{gitver}
%patch -P0 -p1
%build
+%cmake -B build
+
+%{__make} -C build
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_includedir}/CL
-cp -p *.h cl.hpp cl2.hpp $RPM_BUILD_ROOT%{_includedir}/CL
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# these require DirectX headers
+%{__rm} $RPM_BUILD_ROOT%{_includedir}/CL/{cl_d3d10,cl_d3d11,cl_dx9_media_sharing*}.h
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%{_includedir}/CL
+%dir %{_includedir}/CL
+%{_includedir}/CL/cl.h
+%{_includedir}/CL/cl_egl.h
+%{_includedir}/CL/cl_ext.h
+%{_includedir}/CL/cl_ext_intel.h
+%{_includedir}/CL/cl_function_types.h
+%{_includedir}/CL/cl_gl.h
+%{_includedir}/CL/cl_gl_ext.h
+%{_includedir}/CL/cl_half.h
+%{_includedir}/CL/cl_icd.h
+%{_includedir}/CL/cl_layer.h
+%{_includedir}/CL/cl_platform.h
+%{_includedir}/CL/cl_va_api_media_sharing_intel.h
+%{_includedir}/CL/cl_version.h
+%{_includedir}/CL/opencl.h
+%{_npkgconfigdir}/OpenCL-Headers.pc
+%{_datadir}/cmake/OpenCLHeaders
diff --git a/AMD_extensions.patch b/AMD_extensions.patch
index 1f7e289..8a0730d 100644
--- a/AMD_extensions.patch
+++ b/AMD_extensions.patch
@@ -2,39 +2,29 @@ Author: Vincent Danjean <vdanjean at debian.org>
Subject: include AMD extensions in opencl-headers
Bug-Debian: http://bugs.debian.org/695136
-diff -urNp -x '*.orig' khronos-OpenCL-headers-2.2.org/cl_ext.h khronos-OpenCL-headers-2.2/cl_ext.h
---- khronos-OpenCL-headers-2.2.org/cl_ext.h 2024-12-23 11:52:54.024397720 +0100
-+++ khronos-OpenCL-headers-2.2/cl_ext.h 2024-12-23 11:52:54.064398175 +0100
-@@ -179,9 +179,45 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL
- #define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
+--- OpenCL-Headers-2026.05.29/CL/cl_ext.h.orig 2026-05-12 20:35:06.000000000 +0200
++++ OpenCL-Headers-2026.05.29/CL/cl_ext.h 2026-09-17 19:46:59.924675568 +0200
+@@ -1138,6 +1138,16 @@ clCreateCommandQueueWithPropertiesKHR(
+ #define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
- /*********************************
+ /***************************************************************
+* cl_amd_device_memory_flags *
-+*********************************/
++***************************************************************/
+#define cl_amd_device_memory_flags 1
+
+#define CL_MEM_USE_PERSISTENT_MEM_AMD (1 << 6) // Alloc from GPU's CPU visible heap
+
+/* cl_device_info */
-+#define CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT 0x4032
-+
-+/*********************************
- * cl_amd_device_attribute_query *
- *********************************/
- #define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
-+#define CL_DEVICE_TOPOLOGY_AMD 0x4037
-+#define CL_DEVICE_BOARD_NAME_AMD 0x4038
-+#define CL_DEVICE_GLOBAL_FREE_MEMORY_AMD 0x4039
-+#define CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD 0x4040
-+#define CL_DEVICE_SIMD_WIDTH_AMD 0x4041
-+#define CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD 0x4042
-+#define CL_DEVICE_WAVEFRONT_WIDTH_AMD 0x4043
-+#define CL_DEVICE_GLOBAL_MEM_CHANNELS_AMD 0x4044
-+#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANKS_AMD 0x4045
-+#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD 0x4046
-+#define CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD 0x4047
-+#define CL_DEVICE_LOCAL_MEM_BANKS_AMD 0x4048
++#define CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT 0x4032
+
++/***************************************************************
+ * cl_amd_device_attribute_query
+ ***************************************************************/
+ #define cl_amd_device_attribute_query 1
+@@ -1170,6 +1180,20 @@ clCreateCommandQueueWithPropertiesKHR(
+ #define CL_DEVICE_PREFERRED_CONSTANT_BUFFER_SIZE_AMD 0x4033
+ #define CL_DEVICE_PCIE_ID_AMD 0x4034
+
+typedef union
+{
+ struct { cl_uint type; cl_uint data[5]; } raw;
@@ -48,6 +38,7 @@ diff -urNp -x '*.orig' khronos-OpenCL-headers-2.2.org/cl_ext.h khronos-OpenCL-he
+* cl_amd_offline_devices *
+**************************/
+#define CL_CONTEXT_OFFLINE_DEVICES_AMD 0x403F
-
- /*********************************
- * cl_arm_printf extension
++
+ /***************************************************************
+ * cl_arm_printf
+ ***************************************************************/
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/khronos-OpenCL-headers.git/commitdiff/75659dde5cd075dfe05ff0d4d5a37291c3582e71
More information about the pld-cvs-commit
mailing list