package/clinfo: new package
authorValentin Korenblit <valentinkorenblit@gmail.com>
Sat, 20 Oct 2018 22:14:37 +0000 (00:14 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 3 Dec 2018 22:08:20 +0000 (23:08 +0100)
This tool allows to verify if the OpenCL environment is set up correctly
and provides information related to the supported OpenCL platforms.

Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr>
Signed-off-by: Valentin Korenblit <valentinkorenblit@gmail.com>
[Thomas:
 - use the libopencl virtual package
 - add LICENSE to the license files]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/clinfo/Config.in [new file with mode: 0644]
package/clinfo/clinfo.hash [new file with mode: 0644]
package/clinfo/clinfo.mk [new file with mode: 0644]

index 84f846b39ababefdc45d9756d1783d5cbd3d10b8..9f27f92a49429b449d2c0c4a66a98c5bbc3e73f3 100644 (file)
@@ -2125,6 +2125,7 @@ F:        package/tstools/
 
 N:     Valentin Korenblit <valentinkorenblit@gmail.com>
 F:     package/clang/
+F:     package/clinfo/
 F:     package/libclc/
 F:     package/llvm/
 
index d34b0c6171e31577af2b89dee801ee853768f52b..f6252f2abbb9416d3b8b6fb6cf5ee043a0c9bdbb 100644 (file)
@@ -82,6 +82,7 @@ menu "Debugging, profiling and benchmark"
        source "package/blktrace/Config.in"
        source "package/bonnie/Config.in"
        source "package/cache-calibrator/Config.in"
+       source "package/clinfo/Config.in"
        source "package/dhrystone/Config.in"
        source "package/dieharder/Config.in"
        source "package/dmalloc/Config.in"
diff --git a/package/clinfo/Config.in b/package/clinfo/Config.in
new file mode 100644 (file)
index 0000000..3df4fee
--- /dev/null
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CLINFO
+       bool "clinfo"
+       depends on BR2_PACKAGE_HAS_LIBOPENCL
+       help
+         clinfo is a simple command-line application that enumerates
+         all possible (known) properties of the OpenCL platform and
+         devices available on the system.
+
+         https://github.com/Oblomov/clinfo
+
+comment "clinfo needs an OpenCL provider"
+       depends on !BR2_PACKAGE_HAS_LIBOPENCL
diff --git a/package/clinfo/clinfo.hash b/package/clinfo/clinfo.hash
new file mode 100644 (file)
index 0000000..d5766e6
--- /dev/null
@@ -0,0 +1,4 @@
+# locally calculated
+sha256 64b02e68ccff3b95437bd0bd70dcb88438c58adec16a7145a5d4e5c26a898ccf clinfo-2.2.18.03.26.tar.gz
+sha256 a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499 legalcode.txt
+sha256 2a7a9321be169ea6edbc6b1010e8f7bb0f4c1482a2f65c34a49e9719f129b79a LICENSE
diff --git a/package/clinfo/clinfo.mk b/package/clinfo/clinfo.mk
new file mode 100644 (file)
index 0000000..cf08692
--- /dev/null
@@ -0,0 +1,21 @@
+################################################################################
+#
+# clinfo
+#
+################################################################################
+
+CLINFO_VERSION = 2.2.18.03.26
+CLINFO_SITE = $(call github,Oblomov,clinfo,$(CLINFO_VERSION))
+CLINFO_LICENSE = CC0-1.0
+CLINFO_LICENSE_FILES = legalcode.txt LICENSE
+CLINFO_DEPENDENCIES = libopencl
+
+define CLINFO_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+endef
+
+define CLINFO_INSTALL_TARGET_CMDS
+       $(INSTALL) -D -m 755 $(@D)/clinfo $(TARGET_DIR)/usr/bin/clinfo
+endef
+
+$(eval $(generic-package))