dev-embedded/esp-idf: add 6.1

Signed-off-by: David Roman <stkw0@disroot.org>
This commit is contained in:
David Roman committed 2026-09-16 11:03:48 +02:00
1 parent 1cfe0a3c3c
commit 39100393fa
2 files changed
+201

No files matched your search

+1
View File
@@ -2,6 +2,7 @@ DIST esp-idf-5.4.4.zip 1988234779 BLAKE2B d8ebf069b71addf6052544da837089a3607a30
DIST esp-idf-5.5.5.zip 1998138049 BLAKE2B 4a625776e0725a7295cc29728fb794d91d846e0c6f3a49d04148d462d5975a127dcea2b838ffc5e778b581a277b4bfdbd45a3236f85d8a10f8f7fef16dfda21d SHA512 a1d5d337ee633d1e144777a777bfb761673d177e7a54e9e4fabfb29995657015a53de3e872702d212809fc39d45f2c29b1ea854e9719719caa86bd7304c33aad
DIST esp-idf-6.0.2.zip 1914371137 BLAKE2B fa7730d37d6b031cb05aac1e929f1a73c664ccb79d4a3e4872948315fae7d8163591e5778f3420174c9d2a9fcd0763968ec636c84b36dc4f2e422b1bd32842c5 SHA512 32448eb20da60d6f594a5529e84a19c15e17d581357b2de505d4aecdb557c4d985488f56c6458098913f887fbf56551c19bec87d8d6e1833dc5c1b14f8ad844b
DIST esp-idf-6.0.3.zip 1997167870 BLAKE2B 4ea4d96e6d7e460f489d51abb99a540b638c8a01b125af17169d170f1d7d6df5e093c508254036a8910eb9c5b8b372f8dac9ffc92c514c464f984c0e84a7b8b3 SHA512 75feb0f7bd14528a940a4d511c65aa3cc04036383e87981b1a407409c0373650d2e8f9680967c3ef4b0db65491a6c2b58627612052ada24b277f0e1e41a51705
DIST esp-idf-6.1.zip 1951682805 BLAKE2B 54dce6d6801ac25a33cef407e90b3e0d07d81c91bda95d1372558ff3240ae4492fc3ca31a52b5c0039cba3b987a06375a124ed22ea21ee7a34e65728e75b0f15 SHA512 d8bbf5233b4aa655a2953b9c749f6b3333860a1b5f2b4209cd133acff9afa98b1ad734a364662c51956e916386334eb00b8e3c7c06ee11261a878d3504e2eea4
DIST openocd-esp32-linux-amd64-0.12.0-esp32-20260304.tar.gz 2603774 BLAKE2B 8621a8c888623c6c5d8414fea4fd4ec4730a19dbad0f75f2f9dbdfec5a56f8e69ed7d60553034dce9b2b85d9427d626e80816281ca55cd9d21f4458c0fca35ee SHA512 516973e361af37a82cff42114603d51581fc41cecf5cfdaf0ead87cccf19f723b94865c8472de11b33ff747fa563a67d72fc801229bc29180b2d74f061ffea60
DIST openocd-esp32-linux-amd64-0.12.0-esp32-20260424.tar.gz 2630575 BLAKE2B 362bb939ecfa6a312ac49e6dcdf8d344c1607a96f1af4763026cd562f2a4eb71b392b7b85f3e68d2aff73b1ddeecb6fc6501ec947b0752636f6acd3bc9d5e127 SHA512 d3bac9561b5c9495682d500fad6d756207d0bbdb9bef2031340d4e499756910bd87cf75c15b8e1806f969a518d0ee56391ad7b3495a3febd51e38253ef3688ae
DIST openocd-esp32-linux-amd64-0.12.0-esp32-20260703.tar.gz 2700256 BLAKE2B 090e0a5ab0c3742413d49df30ec8527d3c2fdaaa39b128692a021bde2169775cc2426e806da8e2a452223d0f28fff92e3d347f372745bd3d89a07ee31b8605c3 SHA512 8ca529d2e9a118c14e1d8b35686ea1ecec0a02dfda0f796f8758dea3d7a27df3fc0ac66581f3d312a0e347309e1df5811242bc687a0a1bd5452f0c1f44a733a8
+200
View File
@@ -0,0 +1,200 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# TODO: add esp-doc package in order to build documentation
# TODO: add examples USE
# TODO: fix to python-single which should help to fix python-gdb dep
EAPI=8
PYTHON_COMPAT=( python3_{12..14} )
PYTHON_GDB_USE=( python_targets_python3_{12..14} )
VER="15.2.0_20251204"
GDB_VER="17.1_20260402"
OPENOCD_VER="0.12.0-esp32-20260703"
CROSSTOOL_URL="https://github.com/espressif/crosstool-NG/releases/download/esp-${VER}"
inherit estack optfeature python-r1
DESCRIPTION="Espressif IoT Development Framework"
HOMEPAGE="https://www.espressif.com/"
# See https://dl.espressif.com/dl/esp-idf/espidf.constraints.v6.1.txt for information about version dependencies
SRC_URI="https://dl.espressif.com/github_assets/espressif/${PN}/releases/download/v${PV}/${PN}-v${PV}.zip -> ${P}.zip
https://github.com/espressif/openocd-esp32/releases/download/v${OPENOCD_VER}/openocd-esp32-linux-amd64-${OPENOCD_VER}.tar.gz
https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v${GDB_VER}/xtensa-esp-elf-gdb-${GDB_VER}-x86_64-linux-gnu.tar.gz
${CROSSTOOL_URL}/xtensa-esp-elf-${VER}-x86_64-linux-gnu.tar.xz"
SRC_URI+=" riscv32? (
${CROSSTOOL_URL}/riscv32-esp-elf-${VER}-x86_64-linux-gnu.tar.xz
https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v${GDB_VER}/riscv32-esp-elf-gdb-${GDB_VER}-x86_64-linux-gnu.tar.gz
)"
S="${WORKDIR}/${PN}-v${PV}"
LICENSE="Apache-2.0"
LICENSE+=" BSD BSD-2 GPL-2 MIT" # license of bundled components
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
IUSE="python-gdb riscv32"
REQUIRED_USE="
python-gdb? ( || ( ${PYTHON_GDB_USE[@]} ) )
${PYTHON_REQUIRED_USE}
"
BDEPEND="app-arch/unzip"
RDEPEND="
${PYTHON_DEPS}
dev-build/cmake
dev-libs/libusb:1
dev-python/click[${PYTHON_USEDEP}]
dev-python/pyserial[${PYTHON_USEDEP}]
dev-python/cryptography[${PYTHON_USEDEP}]
dev-python/pyparsing[${PYTHON_USEDEP}]
dev-python/pyelftools[${PYTHON_USEDEP}]
dev-embedded/esp-coredump[${PYTHON_USEDEP}]
dev-embedded/esptool
dev-embedded/esp-idf-diag[${PYTHON_USEDEP}]
<dev-embedded/esp-idf-kconfig-4.0.0[${PYTHON_USEDEP}]
<dev-embedded/esp-idf-monitor-2.0.0[${PYTHON_USEDEP}]
dev-embedded/esp-idf-nvs-partition-gen[${PYTHON_USEDEP}]
dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}]
<dev-embedded/esp-idf-size-3.0.0[${PYTHON_USEDEP}]
dev-embedded/freertos-gdb[${PYTHON_USEDEP}]
dev-embedded/idf-component-manager[${PYTHON_USEDEP}]
virtual/zlib:=
"
RESTRICT="bindist mirror strip"
QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*"
PATCHES=(
"${FILESDIR}/allow-system-install-${PN}-5.3.patch"
)
install_tool() {
eshopts_push -s globstar
into /opt/${1}
if [[ -d "../${1}/lib" ]]; then
if stat *.so &>/dev/null; then
for i in ../${1}/lib/**/*.so*; do
dolib.so ${i}
done
fi
if stat *.a &>/dev/null; then
for i in ../${1}/lib/**/*.a*; do
dolib.a ${i}
done
fi
insinto /opt/${1}/lib
doins -r ../${1}/lib/*
fi
(
cd ../${1}
for i in libexec/**/*; do
exeinto /opt/${1}/$(dirname ${i})
if [[ -x "${i}" && ! -d "${i}" ]]; then
doexe ${i}
fi
done
if [[ -d "include" ]]; then
insinto /opt/${1}
doins -r include
fi
if [[ -d "share" ]]; then
insinto /opt/${1}
doins -r share
fi
)
if [[ -d "../${1}/bin" ]]; then
exeinto /opt/${1}/bin
doexe ../${1}/bin/*
(
cd "${D}"/opt/${1}/bin/ || die
for i in *; do
dodir /opt/bin
cd "${D}"/opt/bin || die
dosym ../${1}/bin/${i} /opt/bin/${i}
done
)
fi
eshopts_pop
}
src_install() {
echo "v${PV}" > version.txt || die
newbin - idf <<-EOF
#!/bin/sh
# Silence a warning by idf.py
export IDF_PYTHON_ENV_PATH=
exec python /usr/share/${PN}/tools/idf.py \$@
EOF
install_tool xtensa-esp-elf
install_tool xtensa-esp-elf/xtensa-esp-elf
install_tool xtensa-esp-elf/picolibc
install_tool xtensa-esp-elf/picolibc/xtensa-esp-elf
if use riscv32; then
install_tool riscv32-esp-elf
install_tool riscv32-esp-elf/riscv32-esp-elf
install_tool riscv32-esp-elf/picolibc
install_tool riscv32-esp-elf/picolibc/riscv32-esp-elf
fi
install_tool openocd-esp32
# Remove unsupported python versions
rm "${WORKDIR}"/xtensa-esp-elf-gdb/bin/xtensa-esp-elf-gdb-3.{8..11} || die
if use riscv32; then
rm "${WORKDIR}"/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb-3.{8..11} || die
fi
# Remove disabled python versions
for i in "${PYTHON_GDB_USE[@]}"; do
if ! has "${i}" "${PYTHON_COMPAT[@]}"; then
rm -f "${WORKDIR}"/xtensa-esp-elf-gdb/bin/xtensa-esp-elf-gdb-3."${i##*_}" || die
if use riscv32; then
rm -f "${WORKDIR}"/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb-3."${i##*_}" || die
fi
fi
done
install_tool xtensa-esp-elf-gdb
if use riscv32; then
install_tool riscv32-esp-elf-gdb
fi
newenvd - 99esp-idf <<-EOF
IDF_PATH=/usr/share/${PN}
ESP_IDF_VERSION=${PV}
ESP_ROM_ELF_DIR=/usr/share/${PN}/tools
OPENOCD_SCRIPTS=/opt/openocd-esp32/share/openocd/scripts
EOF
insinto /usr/share/${PN}
rm -r .git || die
find . -name ".git" -exec rm -rf {} \; || die
doins -r .
}
pkg_postinst() {
optfeature "gdbgui target" dev-debug/gdbgui
}