commit:     a14f0a3fbd2d7cb7ec3f2f04f16598be2b1b9000
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 31 16:18:13 2019 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Wed Aug  7 17:38:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a14f0a3f

dev-libs/rocm-comgr: Radeon Open Compute Code Object Manager

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 .../files/rocm-comgr-2.6.0-dependencies.patch      | 25 ------------------
 .../files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch | 30 ++++++++++++++++++++++
 dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild        |  7 ++---
 3 files changed, 34 insertions(+), 28 deletions(-)

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch 
b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch
index 47f03716829..bce19d168b0 100644
--- a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch
@@ -36,28 +36,3 @@ 
https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/19
  
  target_link_libraries(amd_comgr
    PUBLIC
-@@ -203,8 +218,8 @@
-     ${AMD_COMGR_PRIVATE_LINKER_OPTIONS}
-     yaml-cpp
-     ${CLANG_LIBS}
--    ${LLD_LIBS}
-     ${LLVM_LIBS}
-+    ${LLD_LIBS}
- )
- 
- if (NOT UNIX)
-@@ -238,3 +253,14 @@
- if (NOT CPack_CMake_INCLUDED)
-   include(CPack)
- endif()
-+
-+MESSAGE(STATUS "<<< Gentoo configuration >>>
-+Build type      ${CMAKE_BUILD_TYPE}
-+Install path    ${CMAKE_INSTALL_PREFIX}
-+Compiler flags:
-+C               ${CMAKE_C_FLAGS}
-+C++             ${CMAKE_CXX_FLAGS}
-+Linker flags:
-+Executable      ${CMAKE_EXE_LINKER_FLAGS}
-+Module          ${CMAKE_MODULE_LINKER_FLAGS}
-+Shared          ${CMAKE_SHARED_LINKER_FLAGS}\n")

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch 
b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch
new file mode 100644
index 00000000000..d61f4c2a200
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch
@@ -0,0 +1,30 @@
+diff --git a/lib/comgr/CMakeLists.txt b/lib/comgr/CMakeLists.txt
+index 454b830..70e2526 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -90,12 +90,8 @@ if (UNIX)
+         -Wl,--no-undefined)
+     endif()
+   endif()
+-  # FIXME: Remove when yaml-cpp is removed from the build.
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ else()
+   list(APPEND AMD_COMGR_PRIVATE_COMPILE_OPTIONS "/W0" "/wd4244")
+-  # FIXME: Make this private once yaml-cpp is removed from the build.
+-  add_definitions(-D_HAS_EXCEPTIONS=0)
+ endif()
+ 
+ # Windows is strict about visibility of exports in shared libraries, so we ask
+@@ -179,10 +175,8 @@ install(EXPORT amd_comgr_export
+   DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}"
+   FILE "${AMD_COMGR_TARGETS_NAME}")
+ 
+-set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing" FORCE)
+-set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Enable parse tools" FORCE)
+-add_subdirectory(yaml-cpp EXCLUDE_FROM_ALL)
+-include_directories(./yaml-cpp/include)
++find_package(yaml-cpp REQUIRED)
++include_directories(${YAML_CPP_INCLUDE_DIR})
+ 
+ set(CLANG_LIBS
+   clangFrontendTool)

diff --git a/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild 
b/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild
index 0f058da194b..c000ce55ab7 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild
@@ -19,6 +19,7 @@ PATCHES=(
        "${FILESDIR}/${P}-find-clang.patch"
        "${FILESDIR}/${P}-find-lld-includes.patch"
        "${FILESDIR}/${P}-dependencies.patch"
+       "${FILESDIR}/${P}-unbundle-yaml-cpp.patch"
 )
 
 DESCRIPTION="Radeon Open Compute Code Object Manager"
@@ -27,12 +28,12 @@ LICENSE="MIT"
 SLOT="0/$(ver_cut 1-2)"
 
 RDEPEND="dev-libs/rocm-device-libs
-       dev-cpp/yaml-cpp
-       sys-devel/llvm-roc"
+       dev-cpp/yaml-cpp:=
+       sys-devel/llvm-roc:="
 DEPEND="${RDEPEND}"
 
 src_prepare() {
-#      rm -rf yaml-cpp || die
+       rm -rf yaml-cpp || die
        cmake-utils_src_prepare
 }
 

Reply via email to