Forráskód Böngészése

package/opencl-headers: new package

Add the "opencl-headers" package to install the OpenCL C API headers,
which are required at build time by consumers such as
opencl-icd-loader.

While Mesa provides these headers internally, they are not installed
by default since clover and opencl-gallium are deprecated and will
be removed starting from mesa 25.2

And since we should install them manually from mesa, it is better
use external headers. This ensures these headers are always
available and up-to-date independently from those provided by Mesa,
folowing the same logic used for "opencl-clhpp".

see:
https://github.com/KhronosGroup/OpenCL-ICD-Loader#dependencies
https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/include/CL
https://github.com/KhronosGroup/OpenCL-Headers
https://gitlab.freedesktop.org/mesa/mesa/-/commit/5844dea31620f36c41ac738e17fefd57084b2dbb#feedf4d0444f717d7227468a9529c2cf9740b6fd

Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
[Julien: add Medhi in DEVELOPERS for this package]
Signed-off-by: Julien Olivain <ju.o@free.fr>
El Mehdi YOUNES 1 hónapja
szülő
commit
dba2912be3

+ 3 - 0
DEVELOPERS

@@ -911,6 +911,9 @@ F:	configs/acmesystems_acqua_a5_512mb_defconfig
 N:	Eero Aaltonen <eero.aaltonen@vaisala.com>
 F:	package/docopt-cpp/
 
+N:	El Mehdi YOUNES <elmehdi.younes@smile.fr>
+F:	package/opencl-headers/
+
 N:	Eloi Bail <eloi.bail@savoirfairelinux.com>
 F:	package/bayer2rgb-neon/
 F:	package/gstreamer1/gst1-plugins-bayer2rgb-neon/

+ 1 - 0
package/Config.in

@@ -1788,6 +1788,7 @@ menu "Graphics"
 	source "package/libwpe/Config.in"
 	source "package/menu-cache/Config.in"
 	source "package/opencl-clhpp/Config.in"
+	source "package/opencl-headers/Config.in"
 	source "package/opencv3/Config.in"
 	source "package/opencv4/Config.in"
 	source "package/opencv4-contrib/Config.in"

+ 6 - 0
package/opencl-headers/Config.in

@@ -0,0 +1,6 @@
+config BR2_PACKAGE_OPENCL_HEADERS
+	bool "opencl-headers"
+	help
+	  C language headers for the OpenCL API
+
+	  https://github.com/KhronosGroup/OpenCL-Headers

+ 3 - 0
package/opencl-headers/opencl-headers.hash

@@ -0,0 +1,3 @@
+#Locally generated
+sha256  159f2a550592bae49859fee83d372acd152328fdf95c0dcd8b9409f8fad5db93  OpenCL-Headers-2024.10.24.tar.gz
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE

+ 26 - 0
package/opencl-headers/opencl-headers.mk

@@ -0,0 +1,26 @@
+################################################################################
+#
+# opencl-headers
+#
+################################################################################
+
+# The opencl-headers, opencl-icd-loader, and opencl-clhpp packages
+# must always be updated together to compatible versions.
+# Version desynchronization may result in build or runtime errors.
+# When updating one of them, make sure to check and update the others.
+
+OPENCL_HEADERS_VERSION = 2024.10.24
+OPENCL_HEADERS_SOURCE = OpenCL-Headers-$(OPENCL_HEADERS_VERSION).tar.gz
+OPENCL_HEADERS_SITE = $(call github,KhronosGroup,OpenCL-Headers,v$(OPENCL_HEADERS_VERSION))
+OPENCL_HEADERS_LICENSE = Apache-2.0
+OPENCL_HEADERS_LICENSE_FILES = LICENSE
+OPENCL_HEADERS_INSTALL_STAGING = YES
+OPENCL_HEADERS_INSTALL_TARGET = NO
+
+define OPENCL_HEADERS_INSTALL_STAGING_CMDS
+	mkdir -p $(STAGING_DIR)/usr/include/CL
+	$(INSTALL) -D -m 0644 $(@D)/CL/* \
+		$(STAGING_DIR)/usr/include/CL
+endef
+
+$(eval $(generic-package))