diff --git a/dev-libs/roct-thunk-interface/Manifest b/dev-libs/roct-thunk-interface/Manifest index 71c8bfeec8398..d5b1d9ab69bc8 100644 --- a/dev-libs/roct-thunk-interface/Manifest +++ b/dev-libs/roct-thunk-interface/Manifest @@ -1 +1,2 @@ DIST roct-thunk-interface-4.0.0.tar.gz 2694100 BLAKE2B 49ca128902335fc36d44b9e71d444a467bdd0b39ce0b487c70f1f68180fb4b564b10a65e26e41b71d5e66721c3086ec834aee2550246172965f2d611ce9a644a SHA512 cbb45c4372ce2620fce6ccbf94e8e7600256d12acf6721da9d22aeb619cec9d4e4e25354649b83fb322f8d369347c251ebb7242ff8fc3976cc3983de0d8e30a9 +DIST roct-thunk-interface-4.1.0.tar.gz 2697077 BLAKE2B 6d5d35c57d73c7d23fe28f438421372c1dcd51b1bcbf8720dfc993ce56a4afb3cd2c5d14185f4424436db4ce6d1d48dd5f802d0fc24ea1dd78ceb5cff7604103 SHA512 adef8c6c8f375d6d402c1066859fdb45f1e938578011fa0008ad242e1365d3672c5cb02a50f98b6f2d760269b4ef46b33a77f237521b76afe42ac883c71ecd86 diff --git a/dev-libs/roct-thunk-interface/files/roct-thunk-interface-4.1.0-append-flags.patch b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-4.1.0-append-flags.patch new file mode 100644 index 0000000000000..2f5f1c674944c --- /dev/null +++ b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-4.1.0-append-flags.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3a4d99..0015b0f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -99,17 +99,17 @@ set (HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -Wl,--enable-new-dtags -Wl,--versio + ## Address Sanitize Flag + if ( ${ADDRESS_SANITIZER} ) + set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -fsanitize=address ) +- set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS}" -fsanitize=address ) ++ set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -fsanitize=address ") + if ( BUILD_SHARED_LIBS ) +- set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS}" -shared-libsan ) ++ set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -shared-libsan ") + else () +- set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS}" -static-libsan ) ++ set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -static-libsan ") + endif () + else () + if ( CMAKE_COMPILER_IS_GNUCC ) +- set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS}" -Wl,-no-undefined ) ++ set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -Wl,-no-undefined ") + else () +- set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS}" -Wl,-undefined,error ) ++ set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -Wl,-undefined,error ") + endif () + endif () + diff --git a/dev-libs/roct-thunk-interface/roct-thunk-interface-4.0.0.ebuild b/dev-libs/roct-thunk-interface/roct-thunk-interface-4.0.0.ebuild index ee5be506ed835..3cbf10ed4cd62 100644 --- a/dev-libs/roct-thunk-interface/roct-thunk-interface-4.0.0.ebuild +++ b/dev-libs/roct-thunk-interface/roct-thunk-interface-4.0.0.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 diff --git a/dev-libs/roct-thunk-interface/roct-thunk-interface-4.1.0.ebuild b/dev-libs/roct-thunk-interface/roct-thunk-interface-4.1.0.ebuild new file mode 100644 index 0000000000000..16e23a2d974cf --- /dev/null +++ b/dev-libs/roct-thunk-interface/roct-thunk-interface-4.1.0.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake linux-info + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/" + inherit git-r3 +else + SRC_URI="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/ROCT-Thunk-Interface-rocm-${PV}" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Radeon Open Compute Thunk Interface" +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface" +CONFIG_CHECK="~HSA_AMD ~HMM_MIRROR ~ZONE_DEVICE ~DRM_AMDGPU ~DRM_AMDGPU_USERPTR" +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" + +RDEPEND="sys-process/numactl" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/roct-thunk-interface-4.1.0-append-flags.patch" +) + +src_prepare() { + sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die + cmake_src_prepare +} +src_configure() { + local mycmakeargs=( + -DCPACK_PACKAGING_INSTALL_PREFIX="${EPREFIX}/usr" + ) + cmake_src_configure +}