commit:     46cc53d53d30eee0e4a241efb9c640b5aefb4695
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  8 19:17:51 2021 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Thu Apr  8 19:18:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46cc53d5

dev-libs/rocr-runtime: add debug USE flag

Closes: https://bugs.gentoo.org/780480
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild |  6 ++++++
 dev-libs/rocr-runtime/rocr-runtime-9999.ebuild  | 12 +++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
index 75444f1b60d..caacf00b4bf 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
@@ -23,6 +23,7 @@ PATCHES=(
 
 LICENSE="MIT"
 SLOT="0/$(ver_cut 1-2)"
+IUSE="debug"
 
 COMMON_DEPEND="sys-process/numactl
        dev-libs/elfutils:="
@@ -44,3 +45,8 @@ src_prepare() {
 
        cmake_src_prepare
 }
+
+src_configure() {
+       use debug || local mycmakeargs=(-DCMAKE_CXX_FLAGS='-DNDEBUG')
+       cmake_src_configure
+}

diff --git a/dev-libs/rocr-runtime/rocr-runtime-9999.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-9999.ebuild
index 2a972d7fd3d..caacf00b4bf 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-9999.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -18,11 +18,12 @@ fi
 DESCRIPTION="Radeon Open Compute Runtime"
 HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime";
 PATCHES=(
-       "${FILESDIR}/${PN}-3.7.0-cmake-install-paths.patch"
+       "${FILESDIR}/${PN}-4.1.0-cmake-install-paths.patch"
 )
 
 LICENSE="MIT"
 SLOT="0/$(ver_cut 1-2)"
+IUSE="debug"
 
 COMMON_DEPEND="sys-process/numactl
        dev-libs/elfutils:="
@@ -40,7 +41,12 @@ src_prepare() {
        sed -e "s:find_package(Clang REQUIRED HINTS 
\${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm 
):find_package(Clang REQUIRED HINTS /usr/lib/llvm/roc ):" -i 
image/blit_src/CMakeLists.txt || die
 
        # Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" 
directory ...
-       sed -e "s:/opt/rocm/amdgcn/bitcode:/usr/lib:" -i 
image/blit_src/CMakeLists.txt || die
+       sed -e "s:/opt/rocm/amdgcn/bitcode:/usr/lib/amdgcn/bitcode:" -i 
image/blit_src/CMakeLists.txt || die
 
        cmake_src_prepare
 }
+
+src_configure() {
+       use debug || local mycmakeargs=(-DCMAKE_CXX_FLAGS='-DNDEBUG')
+       cmake_src_configure
+}

Reply via email to