diff options
Diffstat (limited to 'dev-libs/roct-thunk-interface')
9 files changed, 179 insertions, 61 deletions
diff --git a/dev-libs/roct-thunk-interface/Manifest b/dev-libs/roct-thunk-interface/Manifest index 997768492e70..bd29fcff0219 100644 --- a/dev-libs/roct-thunk-interface/Manifest +++ b/dev-libs/roct-thunk-interface/Manifest @@ -1,16 +1,19 @@ +AUX kfdtest-6.1.0-libpath.patch 431 BLAKE2B ba078dda302bddc7431ce8016271d895e0104f3779681ec2d89756f2b43679a7085bd9477868283b127ebed8a40dcf406f8c2a70369e470ebd52d6affd9a3e9f SHA512 b86538013763552963b7667657a3b2d0c946d5b989bf73523308c191b48902deda6c7a097dbc53851e979fcd72e150dc38ded0ed9c1e22f16e1466becb456217 +AUX kfdtest-6.1.0-linklibLLVM.patch 1087 BLAKE2B d0d8bea523995a1bd82f813e09958875806eabba78c54daf299df9cc129fd043377241896ce5e829676c6ba2fe3055b0eebb76478b6c9c80d8f76ebfb745159b SHA512 3c5ed615c2e3a6abc45fb931f25596d6d5d83de096f1057f24cdac2d7efbbfea58d369eb0b1eefa93fa67efb46600d8df20be4924efac3a73cd8fcec1cbcd491 +AUX kfdtest-6.1.0-skipIPCtest.patch 955 BLAKE2B af2c2f59acf24415746bf6d4179589b7c2e3e4c6292fccd2b2ebd9400f76543da8cc6d963a5e0fb62c407710d9c39fcd8f5a7d086eeb57a3c34ce8048a1e3bbe SHA512 286b0226a2e75de5a2d882c85bd9a4e5014683a5a95c11a9ee9d06f075af1ce15b276e570d2bd02e3ba9a572ae8f8bbea2fbeda9804312218cc2f34ccb636b58 AUX roct-thunk-interface-5.7.0-functions.patch 335 BLAKE2B 590ee1b8f412836c9fae0e10d7acd91842f6dd9aa87dd40a7a8ea48596dc2a1aabf2dea69cc2924fa0b4467d8238bde42c58ac95415fc0324133ea4389f413a8 SHA512 a1961fb2d0636bdb1720abdf433ef4d0f5f69f48784efc45ed77dc8cdd7bc2433dc9aaec0ef9105db12e4d6a8a57d50ee1ffa7b0d42990be1d88ff668f7b15ba AUX roct-thunk-interface-5.7.1-musl.patch 1878 BLAKE2B c2103b5b8d76e3a637b79bb701308d7c1b2f6def76206e5a1e3841c12e92bec19a6e9a596238709ee4413072530dd984f7910be6bfc394622b34a93ad5cf1c9e SHA512 b5da199e15eb01a087bbc3600a7df5971029594a778ebfc71185320a662f0681a65fd55ad71ba3089e6a72745dfa1de5f637cb96fe8ab3510869e9fb272f5819 -AUX roct-thunk-interface-6.0.0-functions.patch 309 BLAKE2B 98644ddc99416d99da0c671e4b70607cb360831fd0f2a64f38e6f2f2c008d9c6b2fa24a1ac525cbbbdffabf918eaf84ce0c10db7a383e05ac30f6e999c6913f4 SHA512 136b42cac9dfb209594b6b88c4abd501e98d48dca1bd573443e414ab7098cfcac3789cecb3b625e8ed91d0d15fe1ef13668bf4da9f89d808838de9d348eba99f +AUX roct-thunk-interface-6.1.0-visibility.patch 868 BLAKE2B d32fcc6a230af549b73db30183fcb2339fcd3bc68dfbf1f7dce0e35361a674f77cba58ef485c3212de43e95c5eabf517386c6b7a289e57ed38b5d6e21e191939 SHA512 6c540e70c53a602477943ff9a26d5eab3d02d8a3c8577b1e39d5baf5a3703de70073e1d0db5083d03460bdd1e2d2fff2cf6356e57d7e392ce4d4dac6bae74900 DIST roct-thunk-interface-5.1.3.tar.gz 3178689 BLAKE2B c46af7bc60772beaa9a214a86a634290cfd7952589f70736c0c2544c0459eb4fdcc65030d897dbb67bfbaae545f529ac647397df3fcfeddeb5d5e05a283cfd6b SHA512 746a04e667ce242160d6e2519594fc93b205520dae28678859fbd40c3c641082aa6219c04c8e2b58289763a5244dd6336b56c2e2016ba671c5e5a6fb9ca5caea DIST roct-thunk-interface-5.3.3.tar.gz 646773 BLAKE2B 48632cad576ceccede0ee62663f226cbedba8374d8962028fd729a7b8e7eb75bebcb2f8ce06a838de15a388caea3d6dcb150db80f8d45a91675997b4f80625e6 SHA512 4a8730d16a0d240a43d5e22092325b0731d133733af0aac6c6893763d1ffb1a04a0c045d988835079581e097fc7c9e383f41ba84daa105c032d3a653b6b2c6b0 DIST roct-thunk-interface-5.4.3.tar.gz 648897 BLAKE2B 9eefc5f417280a98c7c6b6d611d0d87fa52abca94f67bf5ecc10d84bb86433b5ff502f76aa6724245c7cf9d82b5c16c10943275e8d41f0053484765df5a901db SHA512 1787526515ec708edc398cdba308a8dfa32c2579524a6856a6f336cb7bfee8f9a00d67f1b489993c7454d1d88885032ce85ac752b4a15aaedef910f147aed3b5 DIST roct-thunk-interface-5.5.1.tar.gz 649617 BLAKE2B 54ecae486e5d8b99363947a93b38bb80f6b129bbacc1b3152d58e44cf093e44254075cdc49f6d0f474a04c5e2a1f3945399a744892ac1e5c1fb3ff38fd02370c SHA512 359ce5c7d8fce1f6100aac236efd24d35ce8098732bf89225e7c07a4731452388b5213eda8767a8d7723afa2041033bbcb287dcb00e88a0df9494acf70f8ebaf DIST roct-thunk-interface-5.7.1.tar.gz 665529 BLAKE2B 407601d45976ad66e85999c53bcaa62fefa2ea823e1d3296a9aabe8b6a9c915776344de4499fcf6f9ee80193201308b27b387a7225aca5d2cc7e294143eefacd SHA512 c0dc449c8b713ac543f6cd6c876ea0f160dcb1a5c4a52a2b1364fcae0039e9fe195e4223a2644d7d3a7fbc2a48166e798d15b9088e2097b65974e2ba5e48bdcf -DIST roct-thunk-interface-6.0.0.tar.gz 665726 BLAKE2B 634165c1dce2d4e2f635688ea54c0eb3dd0cf0a0ae84fbbf22f07f62675ad77daea168b16c73e7b4912a46b8507d414119310f31bf110475e27d4629209067d9 SHA512 136a512273823738a3a85330158099b33084018485c94cb20244d61b5f6932949d32eba1fe77512b0933f0269da2f5bcec4cef5b503dc810140a9c080cf65e0f +DIST roct-thunk-interface-6.1.1.tar.gz 666377 BLAKE2B b30d733fb769f7169e97b8a28eaa61c84205aec06b55d662d24f159a3c84190f3252f090413769e56eb621abc789fae521cb7b26d7cdac952ff1e4e120707bc9 SHA512 2c579606d2ced9f8b5e32841db745819771b7d6ce0cef90b818e3710470e30c7715540125d99ed5ea13c4e672d5af6d8ad2dd5975ef76cab7ba993d86cf74eb4 EBUILD roct-thunk-interface-5.1.3.ebuild 1107 BLAKE2B c8d1aad9be55420235043628caa570cfa5f9164c6a3d20c7d90a6cac385ad2c886c44a89f2d9181742f9c284067b0d0b078fb2ea04e44ac9f1a145505f4b9971 SHA512 08bce5619f4e5e163b23928c0088e7f022d0f9f95bfba4b4e237a74ade30a327bf3cf954590f9d788ab7a16dd4f90ff53bd3e87011866af1d68a200bbeeceb7f EBUILD roct-thunk-interface-5.3.3.ebuild 1107 BLAKE2B c8d1aad9be55420235043628caa570cfa5f9164c6a3d20c7d90a6cac385ad2c886c44a89f2d9181742f9c284067b0d0b078fb2ea04e44ac9f1a145505f4b9971 SHA512 08bce5619f4e5e163b23928c0088e7f022d0f9f95bfba4b4e237a74ade30a327bf3cf954590f9d788ab7a16dd4f90ff53bd3e87011866af1d68a200bbeeceb7f EBUILD roct-thunk-interface-5.4.3.ebuild 1107 BLAKE2B c5523fd9ba5475faf5b8bb4ea35a100f4049a8b008c3dec048e03b8e14b394f28b8b5515f7b93c94774c75304e2df7ef745e9538eae5309c6faa569748d32551 SHA512 dfc0e032b61667c9171900f36bc7f18df0e67635e8988d91a8041c298053d9c977adf123af2326e7986bbe00f45ea3ec3e3630ff0993279cfd7becbb5492fc36 EBUILD roct-thunk-interface-5.5.1.ebuild 1055 BLAKE2B a2341ff457f5ee2754ee8cb63a68b90ee67074946d39ab064fa8838b8fa5d0239f330b2751d233c3038b3988a40486d9df7715df0fd26a6677c5789982679c1f SHA512 49819d214fde8e77f8ca051d9dc44af03472a17e0509aa92812a416bff9008577d3a5bbf96fed12315ce3bd1655641f71ac721d2440b7031927e883475c648fe EBUILD roct-thunk-interface-5.7.1-r1.ebuild 1149 BLAKE2B 31bacc1a1123eac6afe14c9dacf150cf64c8ac85b46e7f4ad386b9e3d8b06b6a2264210f021123218c42c74c87a849f34327baeb648ffd5269276f31302a7151 SHA512 f58abcb15dcbf13d0ef5c148430e2de70345831ad693fa2c2fca2e586e5625a8252c6a57f9ec0d2a75c4f92ba7267acffd985cbc91d8ba157a3e13a952fecf76 -EBUILD roct-thunk-interface-6.0.0-r1.ebuild 1149 BLAKE2B 6b2697ae965530cee6d036a370376ded734acadf93970bb4ef6636cbb0245b122e5153a462496395fad1d41daf1e4901c5c21b5464824e81a249997ab61a79e2 SHA512 249cc0a47b0cd2c59c5c2e4e946973154b18aaf9d9c2ac4c68dcd08b4b289080e52baaa2290f60c5ae29dbf3f4256f56e4b35a3f267514e06403914b994a97e9 -MISC metadata.xml 674 BLAKE2B ceb6cc04ddd9f957a765c89bfe83de382412c5d04bce87e3fa9c0fdfe72fa2d24e597aa47287488463fa34d85a91556d2b7ea073b19c341a48045c9e7f51f9f3 SHA512 8cb0feb4d6ea9d3de4a45a9be0de498b5ebb36a779af03e58f5c04593082e5bd618614c1daf2707f3bb1de019bf88292605669e2be48d9bede6e708c39aae7e2 +EBUILD roct-thunk-interface-6.1.1.ebuild 1865 BLAKE2B dea59c6a6f34bded83edffaebdbea338857050ec782c87a29e0bcab40a20782f383f029b782776ab4f8e11c8e56e6d41a62ef88485be281cc442239d7af2abef SHA512 bc61c903a352b5ea1a5f453fe0aa37361e028af2b277bce9a300a52dbd34aa3dd26ae9a9286acf4e569a4175ebdccaf98cf215a20ae9a039e1343a7cf81d8a84 +MISC metadata.xml 661 BLAKE2B c019c853506c550339b18a7f1ab57fd5f2876309823bab923ef07f7f997d820c2664ae5c0c1d2e29c2ccdf613f96cdaf85d92a3734aeb105c392847aed73c76b SHA512 194cdad18f2be9fb4d895ff75b4ce9c6a59443caad443061ea70a8cc4778ec13ca35273c8018ac1d00c7ecd146302ee4bf856ad653a174a1ad281d235b6e12e9 diff --git a/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-libpath.patch b/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-libpath.patch new file mode 100644 index 000000000000..1d7d73ad7a8a --- /dev/null +++ b/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-libpath.patch @@ -0,0 +1,13 @@ +The built hsakmt library is right under BUILD_DIR, not BUILD_DIR/lib +=================================================================== +--- a/tests/kfdtest/CMakeLists.txt ++++ b./tests/kfdtest/CMakeLists.txt +@@ -117,7 +117,7 @@ else() + endif() + + if( DEFINED LIBHSAKMT_PATH ) +- set ( HSAKMT_LIBRARY_DIRS ${LIBHSAKMT_PATH}/lib ) ++ set ( HSAKMT_LIBRARY_DIRS ${LIBHSAKMT_PATH}/ ) + set ( HSAKMT_LIBRARIES hsakmt ) + endif() + diff --git a/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-linklibLLVM.patch b/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-linklibLLVM.patch new file mode 100644 index 000000000000..61d8b99bf335 --- /dev/null +++ b/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-linklibLLVM.patch @@ -0,0 +1,31 @@ +https://github.com/ROCm/ROCT-Thunk-Interface/pull/102 +From 6d7d48bb6843405aac2777388edf4c7c2a6f9dc3 Mon Sep 17 00:00:00 2001 +From: Yiyang Wu <xgreenlandforwyy@gmail.com> +Date: Tue, 30 Apr 2024 13:35:08 +0800 +Subject: [PATCH] Allow linking libLLVM dynamic library rather than separate + components + +--- + tests/kfdtest/CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tests/kfdtest/CMakeLists.txt b/tests/kfdtest/CMakeLists.txt +index 9d1172e..ccad7f4 100644 +--- a/tests/kfdtest/CMakeLists.txt ++++ b/tests/kfdtest/CMakeLists.txt +@@ -154,7 +154,11 @@ include_directories(${LLVM_INCLUDE_DIRS}) + separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS}) + add_definitions(${LLVM_DEFINITIONS_LIST}) + +-llvm_map_components_to_libnames(llvm_libs AMDGPUAsmParser Core Support) ++if (LLVM_LINK_LLVM_DYLIB) ++ set(llvm_libs LLVM) ++else() ++ llvm_map_components_to_libnames(llvm_libs AMDGPUAsmParser Core Support) ++endif() + + include_directories(${PROJECT_SOURCE_DIR}/gtest-1.6.0) + include_directories(${PROJECT_SOURCE_DIR}/include) +-- +2.44.0 + diff --git a/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-skipIPCtest.patch b/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-skipIPCtest.patch new file mode 100644 index 000000000000..cca728dad601 --- /dev/null +++ b/dev-libs/roct-thunk-interface/files/kfdtest-6.1.0-skipIPCtest.patch @@ -0,0 +1,20 @@ +Issue: https://github.com/ROCm/ROCT-Thunk-Interface/issues/103 +=================================================================== +--- ROCT-Thunk-Interface-rocm-6.1.1.orig/tests/kfdtest/scripts/kfdtest.exclude ++++ ROCT-Thunk-Interface-rocm-6.1.1/tests/kfdtest/scripts/kfdtest.exclude +@@ -63,6 +63,7 @@ PERMANENT_BLACKLIST_ALL_ASICS=\ + # failures can be found + # NOTE: If you update this alphabetical listing, add the corresponding JIRA ticket for reference + # ++# KFDIPCTest.BasicTest are not compatible with upstream amdgpu kernel module + # KFDQMTest.GPUDoorbellWrite fails intermittently (KFD-318) + # KFDQMTest.mGPUShareBO (KFD-334) + # KFDHWSTest.* (SWDEV-193035) +@@ -72,6 +73,7 @@ PERMANENT_BLACKLIST_ALL_ASICS=\ + # KFDDBGTest.SuspendQueues (SWDEV-417850) + # KFDDBGTest.HitAddressWatch (SWDEV-420281) + TEMPORARY_BLACKLIST_ALL_ASICS=\ ++"KFDIPCTest.BasicTest:"\ + "KFDQMTest.GPUDoorbellWrite:"\ + "KFDQMTest.mGPUShareBO:"\ + "KFDQMTest.SdmaEventInterrupt:"\ diff --git a/dev-libs/roct-thunk-interface/files/roct-thunk-interface-6.0.0-functions.patch b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-6.0.0-functions.patch deleted file mode 100644 index cbea737c4b4c..000000000000 --- a/dev-libs/roct-thunk-interface/files/roct-thunk-interface-6.0.0-functions.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/libhsakmt.ver b/src/libhsakmt.ver -index 15c2916..c04cefe 100644 ---- a/src/libhsakmt.ver -+++ b/src/libhsakmt.ver -@@ -81,6 +81,7 @@ hsaKmtWaitOnEvent_Ext; - hsaKmtWaitOnMultipleEvents_Ext; - hsaKmtReplaceAsanHeaderPage; - hsaKmtReturnAsanHeaderPage; -+hsaKmtGetAMDGPUDeviceHandle; - - local: *; - }; diff --git a/dev-libs/roct-thunk-interface/files/roct-thunk-interface-6.1.0-visibility.patch b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-6.1.0-visibility.patch new file mode 100644 index 000000000000..d907d2f13e41 --- /dev/null +++ b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-6.1.0-visibility.patch @@ -0,0 +1,26 @@ +https://github.com/ROCm/ROCT-Thunk-Interface/pull/102 +From 8385d8795b994f31e00e651dc4f41e18d82ff968 Mon Sep 17 00:00:00 2001 +From: Yiyang Wu <xgreenlandforwyy@gmail.com> +Date: Tue, 30 Apr 2024 15:07:12 +0800 +Subject: [PATCH] hsaKmtCheckRuntimeDebugSupport should be visible for kfdtest + +--- + src/debug.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/debug.c b/src/debug.c +index 932e829..67c32c8 100644 +--- a/src/debug.c ++++ b/src/debug.c +@@ -268,7 +268,7 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtDbgAddressWatch(HSAuint32 NodeId, + #define HSA_RUNTIME_ENABLE_MAX_MAJOR 1 + #define HSA_RUNTIME_ENABLE_MIN_MINOR 13 + +-HSAKMT_STATUS hsaKmtCheckRuntimeDebugSupport(void) { ++HSAKMT_STATUS HSAKMTAPI hsaKmtCheckRuntimeDebugSupport(void) { + HsaNodeProperties node = {0}; + HsaSystemProperties props = {0}; + HsaVersionInfo versionInfo = {0}; +-- +2.44.0 + diff --git a/dev-libs/roct-thunk-interface/metadata.xml b/dev-libs/roct-thunk-interface/metadata.xml index 9af2c0cba14b..67fd1c7363cb 100644 --- a/dev-libs/roct-thunk-interface/metadata.xml +++ b/dev-libs/roct-thunk-interface/metadata.xml @@ -14,6 +14,6 @@ <name>Proxy Maintainers</name> </maintainer> <upstream> - <remote-id type="github">RadeonOpenCompute/ROCT-Thunk-Interface</remote-id> + <remote-id type="github">ROCm/ROCT-Thunk-Interface</remote-id> </upstream> </pkgmetadata> diff --git a/dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0-r1.ebuild b/dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0-r1.ebuild deleted file mode 100644 index eb0384989522..000000000000 --- a/dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0-r1.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -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}" -BDEPEND="x11-libs/libdrm[video_cards_amdgpu]" - -CMAKE_BUILD_TYPE=Release - -PATCHES=( - "${FILESDIR}/${PN}-6.0.0-functions.patch" - "${FILESDIR}/${PN}-5.7.1-musl.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 -} diff --git a/dev-libs/roct-thunk-interface/roct-thunk-interface-6.1.1.ebuild b/dev-libs/roct-thunk-interface/roct-thunk-interface-6.1.1.ebuild new file mode 100644 index 000000000000..8f599ac5ce48 --- /dev/null +++ b/dev-libs/roct-thunk-interface/roct-thunk-interface-6.1.1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_SKIP_GLOBALS=1 +inherit cmake linux-info rocm + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/ROCm/ROCT-Thunk-Interface/" + inherit git-r3 +else + SRC_URI="https://github.com/ROCm/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/ROCm/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 + x11-libs/libdrm[video_cards_amdgpu]" +DEPEND="${RDEPEND} + test? ( sys-devel/llvm + dev-cpp/gtest )" + +IUSE="test" +RESTRICT="!test? ( test )" + +CMAKE_BUILD_TYPE=Release + +PATCHES=( + "${FILESDIR}/${PN}-5.7.1-musl.patch" + "${FILESDIR}/${PN}-6.1.0-visibility.patch" + "${FILESDIR}/kfdtest-6.1.0-linklibLLVM.patch" + "${FILESDIR}/kfdtest-6.1.0-libpath.patch" + "${FILESDIR}/kfdtest-6.1.0-skipIPCtest.patch" +) + +test_wrapper() { + local S="$1" + shift 1 + local CMAKE_USE_DIR="${S}" + local BUILD_DIR="${S}_build" + cd "${S}" || die + $@ +} + +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 + + if use test; then + export LIBHSAKMT_PATH="${BUILD_DIR}" + test_wrapper "${S}/tests/kfdtest" cmake_src_configure + fi +} + +src_compile() { + cmake_src_compile + if use test; then + LIBRARY_PATH="${BUILD_DIR}" test_wrapper "${S}/tests/kfdtest" cmake_src_compile + fi +} + +src_test() { + check_amdgpu + TESTDIR="${S}/tests/kfdtest_build/" + cd "${TESTDIR}" || die + PATH="${PATH}:${TESTDIR}" ./run_kfdtest.sh +} |