media-gfx/darktable : add hints to find opencl header file.
authorThomas Deutschmann <whissi@gentoo.org>
Fri, 29 Dec 2017 17:48:42 +0000 (18:48 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Sun, 31 Dec 2017 14:05:23 +0000 (15:05 +0100)
Closes: https://github.com/gentoo/gentoo/pull/6633

media-gfx/darktable/darktable-2.4.0.ebuild
media-gfx/darktable/files/darktable-find-opencl-header.patch [new file with mode: 0644]

index 3f0453270d40ba5b429693f106fea795d8e65c21..c32deff305a70397f96c34c619ac2fd917a4f065 100644 (file)
@@ -69,6 +69,8 @@ DEPEND="${CDEPEND}
                >=sys-devel/llvm-4
        )"
 
+PATCHES=( "${FILESDIR}"/"${PN}"-find-opencl-header.patch )
+
 S="${WORKDIR}/${P/_/~}"
 
 pkg_pretend() {
diff --git a/media-gfx/darktable/files/darktable-find-opencl-header.patch b/media-gfx/darktable/files/darktable-find-opencl-header.patch
new file mode 100644 (file)
index 0000000..0a692f9
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Nur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt   2017-12-24 09:09:10.000000000 +0000
++++ b/CMakeLists.txt   2017-12-25 20:42:40.998693994 +0000
+@@ -355,7 +355,7 @@
+       message(STATUS "Found clang compiler - ${CLANG_OPENCL_COMPILER}")
+ 
+       find_path(CLANG_OPENCL_INCLUDE_DIR opencl-c.h
+-        HINTS ${LLVM_INSTALL_PREFIX}/lib/clang ${LLVM_INSTALL_PREFIX}/lib64/clang
++        HINTS ${LLVM_INSTALL_PREFIX}/lib/clang ${LLVM_INSTALL_PREFIX}/lib64/clang /usr/lib/clang /usr/lib64/clang
+         PATH_SUFFIXES include ${LLVM_PACKAGE_VERSION}/include
+         NO_DEFAULT_PATH
+       )