public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Marius Brehler" <marbre@linux.sungazer.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/arrayfire/, sci-libs/arrayfire/files/
Date: Tue, 11 Apr 2017 14:52:36 +0000 (UTC)	[thread overview]
Message-ID: <1491922239.9dff7e7eecad5710bd17afa035a2e13d53bc3856.marbre@gentoo> (raw)

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 <shehzan@arrayfire.com>
+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
+


             reply	other threads:[~2017-04-11 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 14:52 Marius Brehler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-12-01  9:00 [gentoo-commits] proj/sci:master commit in: sci-libs/arrayfire/, sci-libs/arrayfire/files/ Marius Brehler
2016-05-19  7:14 Marius Brehler
2015-09-19 12:51 Justin Lecher
2015-09-15 13:34 Justin Lecher
2015-03-08 18:08 Justin Lecher
2015-01-10 18:03 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491922239.9dff7e7eecad5710bd17afa035a2e13d53bc3856.marbre@gentoo \
    --to=marbre@linux.sungazer.de \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox