dev-embedded/esp-idf: add 5.3.4

Signed-off-by: David Roman <davidroman96@gmail.com>
This commit is contained in:
David Roman
2025-08-25 15:47:44 +02:00
parent 3f0ecf5123
commit 59098dd3e4
2 changed files with 164 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
DIST esp-idf-5.3.3.zip 1286860664 BLAKE2B b1d6f866bfa8d97580c6421b9412723d5e9978dc7c0630e3450aa15c8d5d5bbfc8c69e9df7a2ad8349e50bbbe9f3641b61a844d78a021effc04f06fb98cb08a7 SHA512 be790154d8877886725a500d054dcdf3b36a2a4fb1b48f9a8bba8c55885890151b93a15a62e9ff721ca7a008bb23dbe803e52ae33fa1c34d6a90d39f9692e473
DIST esp-idf-5.3.4.zip 1599287093 BLAKE2B f39744048cc199f01b7ff606b573e547a5dc095526d8131f7fb0f1ef78b38f3df238c3e6be2a36ac69ba200cacb42435a99b194fcb88932f2d6a1c4f68a57374 SHA512 f36de5ef3dd33994d02f4f64134c7b1d072ccecefeeda4277bf94a4d34fc76b638edda65c7ad6199eb4b4641d38901c5d576dc4a43c3cb4da7721551bb4c16d7
DIST esp-idf-5.4.2.zip 1368863611 BLAKE2B 222a6fb0aef3ad4a15d06c56a188879549297816fe59473135af747aae73c0e87d1b191e4ffe1b54cdca1b4d588dc57f1a8c2f39f21bf1bbd154d84ddda690af SHA512 90b5b495015adc55be740e5cc462ad5020c0d2fd33378438f0b8032927d64f931fe537384c8f95168da5550c8989fa776524cb79903352391ab46c0d0b8606e6
DIST esp-idf-5.5.zip 1357029370 BLAKE2B c6b5816b53884a43782b148ff49121af83c3525c76ff4db19f7eae0177cf125284d1d5879348cf4e069403663a5f77b67ff5d5812c038cab74843ce2e8b42583 SHA512 389713f9aa1695b9a1d77ae5579d36a4472de5bd5d029081c20537f9b5281acc302aa36b311eab5eda5c278ad15959313c3b59e053359e9f7a340bb8b6323a1f
DIST openocd-esp32-linux-amd64-0.12.0-esp32-20241016.tar.gz 2398717 BLAKE2B 4550fb391e77c4eb09f88bc596f002de12a1c26e07af1d4e1a9efb25851facab39afc96a73d7c3f5c1bd8dc11963c6dc619d161741ee96cb2fb39c2b9bfbacd8 SHA512 bc72521e5c01090b1628d97a33adf336d32e4b451050abd056046672bb5d8bc0326db350d8c96390a11891d783d1223ff98ebef35e7299cc2f36dde9f0b466f8

View File

@@ -0,0 +1,163 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
VER="13.2.0_20240530"
GDB_VER="16.2_20250324"
OPENOCD_VER="0.12.0-esp32-20250422"
CROSSTOOL_URL="https://github.com/espressif/crosstool-NG/releases/download/esp-${VER}"
inherit estack python-r1
DESCRIPTION="Espressif IoT Development Framework"
HOMEPAGE="https://www.espressif.com/"
# See https://dl.espressif.com/dl/esp-idf/espidf.constraints.v5.3.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"
SRC_URI+=" ${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"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
IUSE="riscv32"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
BDEPEND="app-arch/unzip"
RDEPEND="
${PYTHON_DEPS}
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-4.9.1
dev-embedded/esp-idf-kconfig[${PYTHON_USEDEP}]
dev-embedded/esp-idf-monitor[${PYTHON_USEDEP}]
dev-embedded/esp-idf-nvs-partition-gen[${PYTHON_USEDEP}]
dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}]
dev-embedded/esp-idf-size[${PYTHON_USEDEP}]
dev-embedded/freertos-gdb[${PYTHON_USEDEP}]
dev-embedded/idf-component-manager[${PYTHON_USEDEP}]
sys-libs/zlib
"
RESTRICT="strip"
QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*"
QA_PRESTRIPPED="opt/*"
PATCHES=(
"${FILESDIR}/allow-system-install-${PN}-5.3.patch"
"${FILESDIR}/${PN}-espkconfiglib.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
exeinto /opt/${1}/bin
doexe ../${1}/bin/*
(
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
)
(
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
)
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
if use riscv32; then
install_tool riscv32-esp-elf
install_tool riscv32-esp-elf/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..10} || die
install_tool xtensa-esp-elf-gdb
if use riscv32; then
install_tool riscv32-esp-elf-gdb
fi
echo "IDF_PATH=/usr/share/${PN}" > 99esp-idf || die
doenvd 99esp-idf
insinto /usr/share/${PN}
rm -r .git || die
find . -name ".git" -exec rm -rf {} \; || die
doins -r .
}