commit:     aad20fe9e8b3e02a6f2f51690df2f5eab88ff234
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Mon Dec  9 19:05:22 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 21:46:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aad20fe9

dev-libs/rocdbgapi: add 6.3.0

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/rocdbgapi/Manifest                        |  1 +
 .../files/rocdbgapi-6.3.0-fix-libcxx.patch         | 37 ++++++++++++
 dev-libs/rocdbgapi/rocdbgapi-6.3.0.ebuild          | 67 ++++++++++++++++++++++
 3 files changed, 105 insertions(+)

diff --git a/dev-libs/rocdbgapi/Manifest b/dev-libs/rocdbgapi/Manifest
index 9153f597bc1b..b714542e461e 100644
--- a/dev-libs/rocdbgapi/Manifest
+++ b/dev-libs/rocdbgapi/Manifest
@@ -1,2 +1,3 @@
 DIST rocdbgapi-5.7.1.tar.gz 251913 BLAKE2B 
96dc859937fdde75a3d68368b29efdd14711e256c7d3c60cd40b128e9a0c066f108c02f7d47d9d64d7ca485e85e9d56d48cac6c67088fc3fbafe44d1d23a7ce2
 SHA512 
e30cf6062b07ced7de1660398cd84d104e632907cfaf9bc05d29289a81a977c2272b69ff0810db201675f9d7e8476b4451c988ad9da0a13eee01fffdde839d26
 DIST rocdbgapi-6.1.1.tar.gz 254274 BLAKE2B 
1621dc715e2540578126ff2fa6dc30dc9db711689e82b5c750dd203aafa091c00f897425a372d4617bec25eddb7b9a44105e8c9b46eb660e197602ede2beecba
 SHA512 
d613e633e27ad9f582b9612d7d088c3ea465c29d6520e94b4821e0340c736e556dcd4a89f8027701097ee4e2d8b55640a232d484f9fa26f8a9165c648f8af219
+DIST rocdbgapi-6.3.0.tar.gz 275368 BLAKE2B 
da4ee565d0bbafad4838ca6a346525bfc0e174ee39a1e4d99da16f2ba041885211d38cc9f9aac0ab0358b62557061f7c4cfc8fd3bcf241398b510ea952d56254
 SHA512 
b9acf8787fa6e76bd9d28a36b3c09932d830085cbdc4b6712d481c19cb36c2fd4ff50fb31fd249d9a523c053019657ae7eace850102be94170c327d4efb49e9d

diff --git a/dev-libs/rocdbgapi/files/rocdbgapi-6.3.0-fix-libcxx.patch 
b/dev-libs/rocdbgapi/files/rocdbgapi-6.3.0-fix-libcxx.patch
new file mode 100644
index 000000000000..b51901035ca6
--- /dev/null
+++ b/dev-libs/rocdbgapi/files/rocdbgapi-6.3.0-fix-libcxx.patch
@@ -0,0 +1,37 @@
+Fix for libc++ (std::basic_ostringstream<char> is not a part of C++ standard).
+Upstream bug: https://github.com/ROCm/ROCdbgapi/issues/18
+--- a/src/os_driver.cpp
++++ b/src/os_driver.cpp
+@@ -1006,12 +1006,12 @@ public:
+   template <typename T, std::enable_if_t<!std::is_pointer_v<T>, int> = 0>
+   void write (const T &v)
+   {
+-    m_stream.write (reinterpret_cast<const std::byte *> (&v), sizeof (T));
++    m_stream.write (reinterpret_cast<const char *> (&v), sizeof (T));
+   }
+ 
+   void write (const std::vector<std::byte> &v)
+   {
+-    m_stream.write (reinterpret_cast<const std::byte *> (v.data ()),
++    m_stream.write (reinterpret_cast<const char *> (v.data ()),
+                     v.size ());
+   }
+ 
+@@ -1026,7 +1026,7 @@ public:
+ 
+     auto str = m_stream.str ();
+     note.size = str.size ();
+-    auto buffer = amd::dbgapi::allocate_memory<std::byte> (note.size);
++    auto buffer = amd::dbgapi::allocate_memory<char> (note.size);
+     std::copy (str.begin (), str.end (), buffer.get ());
+     note.data = buffer.release ();
+ 
+@@ -1034,7 +1034,7 @@ public:
+   }
+ 
+ private:
+-  std::basic_ostringstream<std::byte> m_stream;
++  std::basic_ostringstream<char> m_stream;
+ };
+ 
+ }; /* anonymous namespace.  */

diff --git a/dev-libs/rocdbgapi/rocdbgapi-6.3.0.ebuild 
b/dev-libs/rocdbgapi/rocdbgapi-6.3.0.ebuild
new file mode 100644
index 000000000000..bac45a37c3f1
--- /dev/null
+++ b/dev-libs/rocdbgapi/rocdbgapi-6.3.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="AMD Debugger API"
+HOMEPAGE="https://github.com/ROCm/ROCdbgapi";
+SRC_URI="https://github.com/ROCm/ROCdbgapi/archive/rocm-${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/ROCdbgapi-rocm-${PV}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+IUSE="doc"
+
+BDEPEND="
+       doc? (
+               app-text/doxygen[dot]
+               virtual/latex-base
+               dev-texlive/texlive-latexextra
+               dev-texlive/texlive-plaingeneric
+       )
+"
+RDEPEND="
+       dev-libs/rocm-comgr:${SLOT}
+       dev-libs/rocr-runtime:${SLOT}
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-6.3.0-fix-libcxx.patch"
+)
+
+src_prepare() {
+       sed -e "s/-Werror//" \
+               -e "s/if(DOXYGEN_FOUND)/if(WITH_DOCS AND DOXYGEN_FOUND)/" \
+               -e 
"s:\${CMAKE_INSTALL_DATADIR}/html/amd-dbgapi:\${CMAKE_INSTALL_DOCDIR}/html:" \
+               -i CMakeLists.txt || die
+
+       # Clang 19 detects error
+       # https://github.com/ROCm/ROCdbgapi/issues/12
+       sed -e "s/->n_next/->m_next/g" -i src/utils.h || die
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DWITH_DOCS=$(usex doc ON OFF)
+               -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+       )
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+       use doc && cmake_src_compile doc
+}
+
+src_install() {
+       cmake_src_install
+
+       # remove unneeded copy
+       rm -r "${ED}/usr/share/doc/${PF}-asan" || die
+}

Reply via email to