dev-libs/xrt-xdna: 999999, fix build, enable py3.15

Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
This commit is contained in:
Sv. Lockal
2026-07-10 21:32:22 +08:00
parent 84c3a13cdf
commit 2a92f8567e
2 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
Fix for network-isolated builds
--- a/specification/CMakeLists.txt
+++ b/specification/CMakeLists.txt
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: MIT
# Copyright (C) 2023 Advanced Micro Devices, Inc.
+if(NOT SPEC_TOOL_DEPS_DOWNLOADED)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_custom_target(spec-tool-deps
COMMAND wget -q -O markdown_graphviz_svg.py
@@ -15,6 +16,10 @@ else()
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endif()
+else()
+ add_custom_target(spec-tool-deps)
+endif()
+
set(SPEC_PYTHON_PATH ${CMAKE_CURRENT_BINARY_DIR})

View File

@@ -3,7 +3,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{12..14} )
PYTHON_COMPAT=( python3_{12..15} )
inherit cmake python-any-r1 linux-info
DESCRIPTION="Runtime for AIE and FPGA based platforms"
@@ -13,7 +13,6 @@ if [[ ${PV} == 999999 ]] ; then
EGIT_REPO_URI="https://github.com/amd/xdna-driver.git"
EGIT_SUBMODULES=(
xrt
xrt/src/runtime_src/aie-rt
xrt/src/runtime_src/core/common/aiebu
xrt/src/runtime_src/core/common/elf
xrt/src/runtime_src/xdp
@@ -21,9 +20,17 @@ if [[ ${PV} == 999999 ]] ; then
inherit git-r3
BDEPEND="net-misc/wget"
MGS_COMMIT=master
MGS=markdown_graphviz_svg
MGS_PY=${MGS}-${MGS_COMMIT}.py
else
VTD_HASH=c79b5d21568a4ffa5b0612a8279b352fc4e1109a
MGS_COMMIT=554d75e924ed621f23d077b0495c247c329bc770
MGS=markdown_graphviz_svg
MGS_PY=${MGS}-${MGS_COMMIT:0:8}.py
declare -Ag submodules
submodules["xrt"]=https://github.com/Xilinx/XRT.git@4eb1f4392a012b4e6eca759762389c612537f7c7
submodules["xrt/src/runtime_src/aie-rt"]=https://github.com/Xilinx/aie-rt.git@a8b0667133ea2851ce27793a1796c5968226d9af
@@ -35,6 +42,7 @@ else
https://github.com/Xilinx/VTD/raw/${VTD_HASH}/archive/strx/xrt_smi_strx.a -> xrt_smi_strx-${VTD_HASH:0:8}.a
https://github.com/Xilinx/VTD/raw/${VTD_HASH}/archive/phx/xrt_smi_phx.a -> xrt_smi_phx-${VTD_HASH:0:8}.a
https://github.com/Xilinx/VTD/raw/${VTD_HASH}/archive/npu3/xrt_smi_npu3.a -> xrt_smi_npu3-${VTD_HASH:0:8}.a
https://raw.githubusercontent.com/Tanami/markdown-graphviz-svg/${MGS_COMMIT}/src/${MGS}/${MGS}.py -> ${MGS_PY}
"
for k in "${!submodules[@]}"; do
git_url="${submodules[$k]%@*}"
@@ -103,6 +111,11 @@ src_unpack() {
fi
done
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
die "Fetching from ${msgs_url} failed"
fi
popd || die
else
default
@@ -131,6 +144,10 @@ src_unpack() {
}
src_prepare() {
pushd "xrt/src/runtime_src/core/common/aiebu" || die
eapply "${FILESDIR}"/aiebu-no-downloads.patch
popd || die
sed -e "/Unknown Linux package flavor/ s/FATAL_ERROR/MESSAGE/" -i "CMake/pkg.cmake" || die
sed -e "s/set (XRT_UPSTREAM 0)/set (XRT_UPSTREAM 1)/" -i xrt/src/CMake/settings.cmake || die
@@ -146,11 +163,20 @@ src_configure() {
-DSKIP_KMOD=1
-DUMQ_HELLO_TEST=n
-DPython3_EXECUTABLE="${PYTHON}"
-DSPEC_TOOL_DEPS_DOWNLOADED=ON
-Wno-dev
)
[[ ${PV} != 999999 ]] && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON )
cmake_src_configure
if [[ ${PV} == 999999 ]]; then
local mgs_py_path="${S}/${MGS_PY}"
else
local mgs_py_path="${DISTDIR}/${MGS_PY}"
fi
ln -s "${mgs_py_path}" "${BUILD_DIR}/xrt/src/runtime_src/core/common/aiebu/specification/${MGS}.py" || die
}
src_install() {