commit: 9dff7e7eecad5710bd17afa035a2e13d53bc3856 Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> AuthorDate: Tue Apr 11 14:50:39 2017 +0000 Commit: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> CommitDate: Tue Apr 11 14:50:39 2017 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=9dff7e7e
sci-libs/arrayfire: Apply upstream patch to 3.4.2 Build fix for CUDA Compile PTX generated names by CMake 3.7 See https://github.com/arrayfire/arrayfire/issues/1755 Package-Manager: Portage-2.3.3, Repoman-2.3.1 ...fire-3.4.2.ebuild => arrayfire-3.4.2-r1.ebuild} | 2 ++ ...-fix-for-CUDA-Compile-PTX-generated-names.patch | 34 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/sci-libs/arrayfire/arrayfire-3.4.2.ebuild b/sci-libs/arrayfire/arrayfire-3.4.2-r1.ebuild similarity index 96% rename from sci-libs/arrayfire/arrayfire-3.4.2.ebuild rename to sci-libs/arrayfire/arrayfire-3.4.2-r1.ebuild index 51723b18c..0a9ff57d4 100644 --- a/sci-libs/arrayfire/arrayfire-3.4.2.ebuild +++ b/sci-libs/arrayfire/arrayfire-3.4.2-r1.ebuild @@ -53,6 +53,8 @@ S="${WORKDIR}/${PN}-full-${PV}" BUILD_DIR="${S}/build" CMAKE_BUILD_TYPE=Release +PATCHES=("${FILESDIR}/${P}-Build-fix-for-CUDA-Compile-PTX-generated-names.patch") + # We need write acccess /dev/nvidiactl, /dev/nvidia0 and /dev/nvidia-uvm and the portage # user is (usually) not in the video group RESTRICT="userpriv" diff --git a/sci-libs/arrayfire/files/arrayfire-3.4.2-Build-fix-for-CUDA-Compile-PTX-generated-names.patch b/sci-libs/arrayfire/files/arrayfire-3.4.2-Build-fix-for-CUDA-Compile-PTX-generated-names.patch new file mode 100644 index 000000000..3cc51b1b3 --- /dev/null +++ b/sci-libs/arrayfire/files/arrayfire-3.4.2-Build-fix-for-CUDA-Compile-PTX-generated-names.patch @@ -0,0 +1,34 @@ +From 13c484e10537b52bcd012e6850520659769cece6 Mon Sep 17 00:00:00 2001 +From: Shehzan Mohammed <[email protected]> +Date: Thu, 22 Dec 2016 18:10:54 -0500 +Subject: [PATCH] Build fix for CUDA Compile PTX generated names by CMake 3.7 + +--- + src/backend/cuda/CMakeLists.txt | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/backend/cuda/CMakeLists.txt b/src/backend/cuda/CMakeLists.txt +index 9cfa8a5..2f2045d 100644 +--- a/src/backend/cuda/CMakeLists.txt ++++ b/src/backend/cuda/CMakeLists.txt +@@ -315,8 +315,16 @@ foreach(ptx_src_file ${ptx_sources}) + + get_filename_component(_name "${ptx_src_file}" NAME_WE) + ++ # CUDA_COMPILE_PTX from CMake 3.7 has new features that require this change ++ # TODO Fix this with a more complete solution ++ IF(CMAKE_VERSION VERSION_LESS 3.7) # Before 3.7 ++ SET(NAME_APPEND "") ++ ELSE(CMAKE_VERSION VERSION_LESS 3.7) # 3.7 and newer ++ SET(NAME_APPEND "_1") ++ ENDIF(CMAKE_VERSION VERSION_LESS 3.7) ++ + set(_gen_file_name +- "${PROJECT_BINARY_DIR}/src/backend/cuda/cuda_compile_ptx_generated_${_name}.cu.ptx") ++ "${PROJECT_BINARY_DIR}/src/backend/cuda/cuda_compile_ptx${NAME_APPEND}_generated_${_name}.cu.ptx") + set(_out_file_name + "${PROJECT_BINARY_DIR}/src/backend/cuda/${_name}.ptx") + +-- +2.10.2 +
