From c06909de9cc2c8d67b1d9ddcf0622432245fd594 Mon Sep 17 00:00:00 2001 From: "Sv. Lockal" Date: Thu, 30 Jul 2026 20:15:51 +0800 Subject: [PATCH] dev-libs/xrt-xdna: fix compilation for live ebuild Upstream changed the way vtd archives are described (was in info.json, now in WHENCE text file). Let the ebuild use the script from upstream instead of wget-ting files manually. Note: eventually this will be pushed to some release, then need to rethink the approach (e. g. consider putting vtd archives repo tarball into manifest). Signed-off-by: Sv. Lockal --- dev-libs/xrt-xdna/xrt-xdna-999999.ebuild | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/dev-libs/xrt-xdna/xrt-xdna-999999.ebuild b/dev-libs/xrt-xdna/xrt-xdna-999999.ebuild index b41cbdd3fc..228611947c 100644 --- a/dev-libs/xrt-xdna/xrt-xdna-999999.ebuild +++ b/dev-libs/xrt-xdna/xrt-xdna-999999.ebuild @@ -89,27 +89,18 @@ python_check_deps() { python_has_version -b "dev-python/pybind11[${PYTHON_USEDEP}]" } +pkg_setup() { + python-any-r1_pkg_setup +} + src_unpack() { if [[ ${PV} == 999999 ]] ; then git-r3_src_unpack pushd "${S}" || die - local VTD_HASH=$(grep -oP 'VTD/raw/\K[0-9a-f]+' tools/info.json | head -n1) - [[ "${VTD_HASH}" == "" ]] && die "Failed to extract VTD hash" - - local VTD_FILES=( - "https://github.com/Xilinx/VTD/raw/${VTD_HASH}/archive/strx/xrt_smi_strx.a" - "https://github.com/Xilinx/VTD/raw/${VTD_HASH}/archive/phx/xrt_smi_phx.a" - "https://github.com/Xilinx/VTD/raw/${VTD_HASH}/archive/npu3/xrt_smi_npu3.a" - ) - - mkdir -p amdxdna_bins/vtd_archives || die - - for url in "${VTD_FILES[@]}"; do - if ! wget -nc "${url}" -O "amdxdna_bins/vtd_archives/${url##*/}"; then - die "Fetching from ${url} failed" - fi - done + # This downloads files specified in https://github.com/amd/xdna-driver/blob/main/tools/WHENCE + # VTD files signatures are not present in the Manifest, but effectively pinned via "whence-commit" + "${EPYTHON}" tools/sync_from_whence.py vtd --out amdxdna_bins/vtd_archives --whence tools/WHENCE || die local msgs_url="https://raw.githubusercontent.com/Tanami/markdown-graphviz-svg/${MGS_COMMIT}/src/${MGS}/${MGS}.py" if ! wget -nc "${msgs_url}" -O "${MGS_PY}"; then