dev-libs/rocm-comgr: Radeon Open Compute Code Object Manager
authorCraig Andrews <candrews@gentoo.org>
Wed, 31 Jul 2019 16:18:13 +0000 (12:18 -0400)
committerCraig Andrews <candrews@gentoo.org>
Wed, 7 Aug 2019 17:38:47 +0000 (13:38 -0400)
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Craig Andrews <candrews@gentoo.org>
dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch
dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch [new file with mode: 0644]
dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild

index 47f0371682993c764ed311a1eb6869ae83e85921..bce19d168b0a58241a336aa8e077f020e54a4713 100644 (file)
@@ -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 (file)
index 0000000..d61f4c2
--- /dev/null
@@ -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)
index 0f058da194b8e37f5f2f8528bd041f6d1b730efe..c000ce55ab71690371cc6789189b391792b54a54 100644 (file)
@@ -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
 }