commit: 16f3be66790df19991d406b9a2de69393f4e8c97
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 28 11:23:02 2021 +0000
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Mon Aug 30 21:21:39 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16f3be66
dev-embedded/u-boot-tools: Version bump to 2021.07
* Bump EAPI to 8
* Use https:// instead of ftp:// in SRC_URI
* Combine same build flags into myemakeargs
* Use toolchain-funcs to export BUILD_CC and
set HOSTCC=${BUILD_CC}, which enables us
to correctly cross-compile the package,
otherwise the build system tries to use
cross-compiler as HOSTCC
* Add USE=envtools that builds and installs
only target-side environment tools which is
useful for low storage situations where we only
need envtools to read and modify U-Boot environment
variables. This functionality matches the uboot-envtools
package which is available in OpenWRT
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
dev-embedded/u-boot-tools/Manifest | 1 +
dev-embedded/u-boot-tools/metadata.xml | 11 +--
.../u-boot-tools/u-boot-tools-2021.07.ebuild | 79 ++++++++++++++++++++++
3 files changed, 87 insertions(+), 4 deletions(-)
diff --git a/dev-embedded/u-boot-tools/Manifest
b/dev-embedded/u-boot-tools/Manifest
index af7e7c744be..758cfea596b 100644
--- a/dev-embedded/u-boot-tools/Manifest
+++ b/dev-embedded/u-boot-tools/Manifest
@@ -1 +1,2 @@
DIST u-boot-2021.04-rc2.tar.bz2 16620315 BLAKE2B
e16c167346ef3999443855b9a702bf28faacf51b7887c84096f7a372a0c820d6ed9f06c1dd209b4070adf8000853b58b7b9b81c5b32a973d37558acf1da2edfa
SHA512
7bf07f15e0c5f5e63ef8cb9568278ea7c209e484bbb599c47b22a8d2e5c007cc204eec365e5328dea3e7b016cd6ba0cb4c917330cc76163b1016f7c7762ad1bf
+DIST u-boot-2021.07.tar.bz2 17275746 BLAKE2B
1a209a604e0f30264781a14ca855bbb777e8f1c031de60d28de397084fc9bfc4a3771ad00ec22f5cdcfa721f22707a533b9b59004ac0b107df927f23dc5ab0a6
SHA512
210b206a4626feb0985580d9448a97b499b09bf9b9313ca847a66624785e9e9b0fae8f2e329acd344f5f75cb722d2093dd0ee394311ddd1fde05e400ee71a24d
diff --git a/dev-embedded/u-boot-tools/metadata.xml
b/dev-embedded/u-boot-tools/metadata.xml
index 71b1461e114..899a677d0cd 100644
--- a/dev-embedded/u-boot-tools/metadata.xml
+++ b/dev-embedded/u-boot-tools/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>[email protected]</email>
- <name>Embedded Gentoo</name>
-</maintainer>
+ <maintainer type="project">
+ <email>[email protected]</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+ <use>
+ <flag name="envtools">Build only the target-side environment
tools</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2021.07.ebuild
b/dev-embedded/u-boot-tools/u-boot-tools-2021.07.ebuild
new file mode 100644
index 00000000000..8511d1c5504
--- /dev/null
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2021.07.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2021 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"
+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="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+
+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
+}
+
+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="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)'
+ HOSTLDFLAGS="${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 bmp_logo 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
+}