commit:     ec9d71a566ab9b0836622c5eac5562bdf07bd67c
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 15 18:08:07 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Feb 15 18:11:08 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec9d71a5

dev-embedded/u-boot-tools: add 2024.01

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 dev-embedded/u-boot-tools/Manifest                 |  2 +
 .../u-boot-tools/u-boot-tools-2024.01.ebuild       | 90 ++++++++++++++++++++++
 2 files changed, 92 insertions(+)

diff --git a/dev-embedded/u-boot-tools/Manifest 
b/dev-embedded/u-boot-tools/Manifest
index 833d6d161b79..710591603f22 100644
--- a/dev-embedded/u-boot-tools/Manifest
+++ b/dev-embedded/u-boot-tools/Manifest
@@ -1 +1,3 @@
 DIST u-boot-2023.10.tar.bz2 19645392 BLAKE2B 
1404ab42e8b0c821fbfdf612cc00ed5d6b1a1d15d4e69647e788cf97536234f89fe000f480107f8a78b56f7dae7a022f5e742c06ca7f381050e2251889fcdb83
 SHA512 
f238a69b9cc08ee0a69ea8ca2fa26975f2f2ede14e978b4db274b1e4095e43af0052307ac39034658a72ec9706951cd03c0f316d0591f391adecaf2cc9496fc4
+DIST u-boot-2024.01.tar.bz2 19926911 BLAKE2B 
c62a22f56276426917b0db508ad7dc82efa4fe7be14c5e7d79ecdea172b2b383981b7e65b7e920b196d0162a17fb362ef97a8d758a1b30e509e3c66748d2c106
 SHA512 
45bd093ba3bda23e43cdde83d8656c1ee1348ac2886ecff1fee475f101ac4965a5be6565408fa5b990c723f3fdc833edfca60a719f735a43040cd14a1b59a88b
+DIST u-boot-tools-2024.01-fix-invalid-escape-sequence.patch 1285 BLAKE2B 
ad0af975b59794f21a44472a1f1b4542e75e478d51e649a6c339a4af9963cb4b822e6eba6819cbd3d35c09f3c33f1995288ef296e07466a427cf1f0dd0a399e1
 SHA512 
8675c267ca5a234924bdf8fc03dcaf75501cf86ac7a9b2e7fbc7982b9620e8863af289c124c5e91cccee58cc116b4d2798be745dedc1b28099a143f3464ad4d6

diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2024.01.ebuild 
b/dev-embedded/u-boot-tools/u-boot-tools-2024.01.ebuild
new file mode 100644
index 000000000000..8930c2758c2b
--- /dev/null
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2024.01.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_P="u-boot-${PV/_/-}"
+DESCRIPTION="utilities for working with Das U-Boot"
+HOMEPAGE="https://www.denx.de/wiki/U-Boot/WebHome";
+SRC_URI="
+       https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2
+       
https://github.com/u-boot/u-boot/commit/88b9b9c44c859bdd9bb227e2fdbc4cbf686c3343.patch
+               -> u-boot-tools-2024.01-fix-invalid-escape-sequence.patch
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="envtools"
+
+RDEPEND="dev-libs/openssl:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+       dev-lang/swig
+       app-alternatives/yacc
+       app-alternatives/lex
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       # https://github.com/u-boot/u-boot/pull/489
+       "${DISTDIR}"/u-boot-tools-2024.01-fix-invalid-escape-sequence.patch
+)
+
+src_prepare() {
+       default
+       sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \
+               scripts/kconfig/{g,m,n,q}conf-cfg.sh \
+               scripts/kconfig/Makefile \
+               tools/Makefile || die
+}
+
+src_configure() {
+       tc-export AR BUILD_CC CC PKG_CONFIG
+       tc-export_build_env
+}
+
+src_compile() {
+       # Unset a few KBUILD variables. Bug #540476
+       unset KBUILD_OUTPUT KBUILD_SRC
+
+       local myemakeargs=(
+               V=1
+               AR="${AR}"
+               CC="${CC}"
+               HOSTCC="${BUILD_CC}"
+               HOSTCFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}"' $(HOSTCPPFLAGS)'
+               HOSTLDFLAGS="${BUILD_LDFLAGS}"
+       )
+
+       emake "${myemakeargs[@]}" tools-only_defconfig
+
+       emake "${myemakeargs[@]}" \
+               NO_SDL=1 \
+               HOSTSTRIP=: \
+               STRIP=: \
+               CONFIG_ENV_OVERWRITE=y \
+               $(usex envtools envtools tools-all)
+}
+
+src_test() { :; }
+
+src_install() {
+       cd tools || die
+
+       if ! use envtools; then
+               dobin dumpimage fdtgrep gen_eth_addr img2srec mkenvimage mkimage
+       fi
+
+       dobin env/fw_printenv
+
+       dosym fw_printenv /usr/bin/fw_setenv
+
+       insinto /etc
+       doins env/fw_env.config
+
+       doman ../doc/mkimage.1
+}

Reply via email to