commit:     528d59f18a7a1b17acedb4628e22de3fb29c0b5b
Author:     YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sun Jul 11 03:04:44 2021 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sun Jul 11 03:25:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=528d59f1

dev-libs/rocr-runtime: fix for gentoo prefix

The current ebuild cannot find bitcode during cmake configuration in
gentoo prefix. This commit provide a fix.

version >= 4 are modified, while 3.x are older versions which remain
original states.

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/21590
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild | 4 ++--
 dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild | 4 ++--
 dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild
index 256f7ffb9e4..6326a7e4b20 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild
@@ -38,10 +38,10 @@ src_prepare() {
        sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i 
CMakeLists.txt || die
 
        # ... otherwise system llvm/clang is used ...
-       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
+       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 ${EPREFIX}/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/amdgcn/bitcode:" -i 
image/blit_src/CMakeLists.txt || die
+       sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" 
-i image/blit_src/CMakeLists.txt || die
 
        cmake_src_prepare
 }

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 38fc7decb01..e91c230b519 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
@@ -39,10 +39,10 @@ src_prepare() {
        sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i 
CMakeLists.txt || die
 
        # ... otherwise system llvm/clang is used ...
-       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
+       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 ${EPREFIX}/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/amdgcn/bitcode:" -i 
image/blit_src/CMakeLists.txt || die
+       sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" 
-i image/blit_src/CMakeLists.txt || die
 
        cmake_src_prepare
 }

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild
index 75444f1b60d..c9bc5602a20 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild
@@ -37,10 +37,10 @@ src_prepare() {
        sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i 
CMakeLists.txt || die
 
        # ... otherwise system llvm/clang is used ...
-       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
+       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 ${EPREFIX}/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/amdgcn/bitcode:" -i 
image/blit_src/CMakeLists.txt || die
+       sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" 
-i image/blit_src/CMakeLists.txt || die
 
        cmake_src_prepare
 }

Reply via email to