cuda-samples: move debian unpacking into do_unpack task

There is now a check that ${S} exists after running do_unpack, so
append the extraction of the sources from the debian package to
the do_unpack task, instead of breaking it out as a separate
task.

Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
Matt Madison
2024-05-29 06:12:28 -07:00
parent b097a5a48f
commit cae3b11804
2 changed files with 9 additions and 5 deletions

View File

@@ -4,6 +4,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
SRC_URI = "file://math-vector.h"
S = "${WORKDIR}/sources"
UNPACKDIR = "${S}"
COMPATIBLE_MACHINE:class-target = "(cuda)"
COMPATIBLE_HOST = "(x86_64|aarch64)"

View File

@@ -10,16 +10,17 @@ SRC_COMMON_DEBS = "${BPN}-${CUDA_VERSION_DASHED}_${PV}_arm64.deb;unpack=false"
L4T_DEB_GROUP = "cuda-samples"
SRC_URI[sha256sum] = "58b2d1f5fbb5c1adc12d168042cebb2fdf4e279bc820cf3fc7f4431695d2f0b6"
do_unpack_samples() {
unpack_samples() {
mkdir -p ${S}
dpkg-deb --fsys-tarfile ${UNPACKDIR}/cuda-samples-${CUDA_VERSION_DASHED}_${PV}_arm64.deb | \
tar --strip-components=5 --exclude="*/doc/*" --exclude="*/bin/*" -x -f- -C ${S}
}
do_unpack_samples[dirs] = "${S}"
do_unpack_samples[cleandirs] = "${S}"
do_unpack_samples[depends] += "dpkg-native:do_populate_sysroot"
python do_unpack:append() {
bb.build.exec_func("unpack_samples", d)
}
addtask unpack_samples after do_unpack before do_patch
do_unpack[depends] += "dpkg-native:do_populate_sysroot"
inherit l4t_deb_pkgfeed cuda