From 166b86d36dda24d2bbaa2fd2ffbbc16fbd0e58da Mon Sep 17 00:00:00 2001 From: John Toomey Date: Wed, 29 Jan 2025 17:54:03 +0000 Subject: bmap-writer: Backport bmap-writer and libtinyxml2 Backport bmap-writer recipe from meta-openembedded master Signed-off-by: John Toomey Signed-off-by: Mark Hatle --- .../recipes-support/bmap-writer/bmap-writer_git.bb | 26 +++++++++++++++++ .../recipes-support/libtinyxml2/files/run-ptest | 10 +++++++ .../libtinyxml2/libtinyxml2_10.0.0.bb | 34 ++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 meta-xilinx-core/recipes-support/bmap-writer/bmap-writer_git.bb create mode 100644 meta-xilinx-core/recipes-support/libtinyxml2/files/run-ptest create mode 100644 meta-xilinx-core/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb diff --git a/meta-xilinx-core/recipes-support/bmap-writer/bmap-writer_git.bb b/meta-xilinx-core/recipes-support/bmap-writer/bmap-writer_git.bb new file mode 100644 index 00000000..c0516f0c --- /dev/null +++ b/meta-xilinx-core/recipes-support/bmap-writer/bmap-writer_git.bb @@ -0,0 +1,26 @@ +# Backported from meta-openembedded master - updated to latest commit which requires libtinyxml2 +# https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/bmap-writer/bmap-writer_git.bb + +SUMMARY = "bmaptool alternative written in C++" +DESCRIPTION = "bmap-writer is a command-line utility designed to efficiently write disk images \ + to storage devices using block mapping (BMAP). It serves as \ + a lightweight alternative to the Yocto BMAP tool, \ + bmap-writer is C++ based does not require Python and focuses solely on writing an image." +HOMEPAGE = "https://github.com/embetrix/bmap-writer" +SECTION = "console/utils" + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e49f4652534af377a713df3d9dec60cb" + +SRC_URI = "git://github.com/embetrix/${BPN};branch=master;protocol=https" +SRCREV = "cd94d9f1fee34215bd761d05838bc7b4dbebfacc" +S = "${WORKDIR}/git" + +DEPENDS = "libtinyxml2 libarchive" +inherit cmake pkgconfig + +EXTRA_OEMAKE += 'LIBXML2_HEADER_PATH="${STAGING_INCDIR}/libxml2"' + +FILES:${PN} = "${bindir}/bmap-writer" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-xilinx-core/recipes-support/libtinyxml2/files/run-ptest b/meta-xilinx-core/recipes-support/libtinyxml2/files/run-ptest new file mode 100644 index 00000000..87091267 --- /dev/null +++ b/meta-xilinx-core/recipes-support/libtinyxml2/files/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +for i in `ls xmltest`; do + ./$i + if [ $? -eq 0 ]; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/meta-xilinx-core/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb b/meta-xilinx-core/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb new file mode 100644 index 00000000..c27bd452 --- /dev/null +++ b/meta-xilinx-core/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb @@ -0,0 +1,34 @@ +# Backported from meta-openembedded master +# https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb + +SUMMARY = "TinyXML-2 is a simple, small, efficient, C++ XML parser that can be easily integrating into other programs" +HOMEPAGE = "https://leethomason.github.io/tinyxml2" +SECTION = "libs" +LICENSE = "Zlib" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=135624eef03e1f1101b9ba9ac9b5fffd" +CVE_PRODUCT = "tinyxml2" + +SRCREV = "321ea883b7190d4e85cae5512a12e5eaa8f8731f" +SRC_URI = "git://github.com/leethomason/tinyxml2.git;branch=master;protocol=https \ + file://run-ptest" + +S = "${WORKDIR}/git" + +inherit meson ptest + +EXTRA_OEMESON += " \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dtests=true', '', d)} \ + -Ddefault_library=both \ +" + +CXXFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" + +do_install_ptest() { + install -Dm 0755 ${B}/xmltest ${D}${PTEST_PATH}/xmltest + install -d ${D}${PTEST_PATH}/resources/out + for f in ${S}/resources/*.xml; do + install -m 0644 $f ${D}${PTEST_PATH}/resources/ + done +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf