commit:     d512295a7a744a0d81722b5de466c20d31120692
Author:     Raul E Rangel <rrangel <AT> chromium <DOT> org>
AuthorDate: Fri Aug 11 22:48:47 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 19 07:37:02 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d512295a

dev-embedded/u-boot-tools: Fix missing BDEPENDs

This package currently shows the following errors:

```
Traceback (most recent call last):
  File "scripts/dtc/pylibfdt/setup.py", line 23, in <module>
    from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'
```

```
tools/mkeficapsule.c:21:10: fatal error: 'gnutls/gnutls.h' file not found
```

```
./scripts/dtc-version.sh: line 18: which: command not found
```

This change fixes the errors by not compiling pylibfdt and mkeficapsule.
It also adds the missing `which` dependency.

Signed-off-by: Raul E Rangel <rrangel <AT> chromium.org>
Closes: https://github.com/gentoo/gentoo/pull/32268
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/disable-unused-mkeficapsule.patch             | 14 ++++++++++++++
 .../u-boot-tools/files/disable-unused-pylibfdt.patch    | 17 +++++++++++++++++
 ...ls-2023.10.ebuild => u-boot-tools-2023.10-r1.ebuild} |  7 ++++++-
 3 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/dev-embedded/u-boot-tools/files/disable-unused-mkeficapsule.patch 
b/dev-embedded/u-boot-tools/files/disable-unused-mkeficapsule.patch
new file mode 100644
index 000000000000..90c8ce3f0a4d
--- /dev/null
+++ b/dev-embedded/u-boot-tools/files/disable-unused-mkeficapsule.patch
@@ -0,0 +1,14 @@
+Disable unused mkeficapsule
+
+`CONFIG_TOOLS_MKEFICAPSULE` requires gnutls to build. Since we don't actually
+expose the tool, we can just disable it.
+
+diff -ur a/configs/tools-only_defconfig b/configs/tools-only_defconfig
+--- a/configs/tools-only_defconfig     2023-01-09 09:07:33.000000000 -0700
++++ b/configs/tools-only_defconfig     2023-08-11 14:01:50.151294889 -0600
+@@ -33,4 +33,4 @@
+ # CONFIG_VIRTIO_SANDBOX is not set
+ # CONFIG_GENERATE_ACPI_TABLE is not set
+ # CONFIG_EFI_LOADER is not set
+-CONFIG_TOOLS_MKEFICAPSULE=y
++# CONFIG_TOOLS_MKEFICAPSULE is not set

diff --git a/dev-embedded/u-boot-tools/files/disable-unused-pylibfdt.patch 
b/dev-embedded/u-boot-tools/files/disable-unused-pylibfdt.patch
new file mode 100644
index 000000000000..8686341a8776
--- /dev/null
+++ b/dev-embedded/u-boot-tools/files/disable-unused-pylibfdt.patch
@@ -0,0 +1,17 @@
+Disable unused pylibfdt
+
+The `imply BINMAN` causes `pylibfdt` to be built, which requires python. We
+don't currently expose `pylibfdt`, or declare python dependencies, so disable
+it.
+
+diff -ur a/arch/Kconfig b/arch/Kconfig
+--- a/arch/Kconfig     2023-01-09 09:07:33.000000000 -0700
++++ b/arch/Kconfig     2023-08-11 14:01:05.998403114 -0600
+@@ -205,7 +205,6 @@
+       imply KEYBOARD
+       imply PHYSMEM
+       imply GENERATE_ACPI_TABLE
+-      imply BINMAN
+ 
+ config SH
+       bool "SuperH architecture"

diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2023.10.ebuild 
b/dev-embedded/u-boot-tools/u-boot-tools-2023.10-r1.ebuild
similarity index 92%
rename from dev-embedded/u-boot-tools/u-boot-tools-2023.10.ebuild
rename to dev-embedded/u-boot-tools/u-boot-tools-2023.10-r1.ebuild
index 81a202294643..05e693d9e34a 100644
--- a/dev-embedded/u-boot-tools/u-boot-tools-2023.10.ebuild
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2023.10-r1.ebuild
@@ -19,12 +19,17 @@ IUSE="envtools"
 RDEPEND="dev-libs/openssl:="
 DEPEND="${RDEPEND}"
 BDEPEND="
-       dev-lang/swig
        app-alternatives/yacc
        app-alternatives/lex
+       sys-apps/which
        virtual/pkgconfig
 "
 
+PATCHES=(
+       "${FILESDIR}/disable-unused-mkeficapsule.patch"
+       "${FILESDIR}/disable-unused-pylibfdt.patch"
+)
+
 src_prepare() {
        default
        sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \

Reply via email to