dev-embedded/esp-idf: add 5.5.1

Signed-off-by: David Roman <davidroman96@gmail.com>
This commit is contained in:
David Roman
2025-09-01 14:34:01 +02:00
parent 2605f43c9d
commit 9c4f897751
2 changed files with 193 additions and 0 deletions

View File

@@ -1,7 +1,9 @@
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.1.zip 1414183542 BLAKE2B 0f8768cc01501b925cce2916d2847414d72b90e74aaf6987445bbc7a2b9f21c4484214c809ee03a609466efccd6932e74a4162a3000cd60ed09929560cd5d114 SHA512 5c23a3e015870bdfe4d5307aa11727bbe482d1439a8aacd3e1fc0210aa199fe8bcbf58d23ddee2c82db58890e9132bf1e16fe2d2fd6a421c18c14958fa563b6b
DIST esp-idf-5.5.zip 1357029370 BLAKE2B c6b5816b53884a43782b148ff49121af83c3525c76ff4db19f7eae0177cf125284d1d5879348cf4e069403663a5f77b67ff5d5812c038cab74843ce2e8b42583 SHA512 389713f9aa1695b9a1d77ae5579d36a4472de5bd5d029081c20537f9b5281acc302aa36b311eab5eda5c278ad15959313c3b59e053359e9f7a340bb8b6323a1f
DIST openocd-esp32-linux-amd64-0.12.0-esp32-20250422.tar.gz 2445546 BLAKE2B 4f88b4215d2df2131c108f7acb87422462ba06cc2373e1d09dfd9fa127b9fab20dae5b1aa5b2a851c25ca903c396ae9ff5c6138831a20db3c5b3a27b9c3b39b7 SHA512 f9d70c8a8beaff8096ef5e01265ce9a17b96d9481727b72df33e86eba2e22d9fcfad865e4b7845d29b48ebb91d016b2ffffc913ef93922957719e44d2f881b36
DIST openocd-esp32-linux-amd64-0.12.0-esp32-20250707.tar.gz 2489724 BLAKE2B c10986749d4eede30d516f7d1e66cbadde19c45d2299f806504262b4d455ab3932db4416f300946f4e71cd6dd5c1f97ad959064d0b5024d0c3fb0e8a06966334 SHA512 5e57d1256aa08bc56ede84a672f9fbdfa6fa56a9044604b4078b1145822d645c1071e5383bc75dffc173e8121baadd9bd2124f19a7b44aea56e67f7c92ab9017
DIST riscv32-esp-elf-13.2.0_20240530-x86_64-linux-gnu.tar.xz 145544808 BLAKE2B b55513bf4cd6526a438aa5460806f0886438a52932631f5d142bc9c5f0b0affcda7a830b2f9b13c83ed356a4cebd7e3e0c0b5c29e718e880d312b6aa2f61c5b2 SHA512 fb4c868877bd9e68bedceb816c1aeec1736e2876bc1adf3138d59b73f0e9b0fb14eb826c885749b6070e6cf1e8e794f0a53c85bf5c5c896d8b3a6c7e6d0d821b
DIST riscv32-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz 298069324 BLAKE2B dea43004940ef825bca79fbd5f371a3891b8de78f7c145a72aa70228df8604ee482f520efc7dca79d363d68d55f136a6064111e7ea8287b616c9b25ffa7d0ef9 SHA512 7a426fb8cf820d65f0cb1eacf71250d63916222921b90dfd4d98a8064e854cf5fabce20c138a217186df7b04cd722ec23bc86a836956e27318f163c3ed05a188
DIST riscv32-esp-elf-gdb-14.2_20240403-x86_64-linux-gnu.tar.gz 30707431 BLAKE2B 99809fbd5abe99c4890fbf4edd964ee53bc9269b9bb15f487316d0092a9d7aae9d3f9f61f7597f5721aec4f95813908c8ce6a3f6f97cd453d1610a5caa7dc42e SHA512 1ad4854c53f435b08d634f8e5e1a9169037745684b13972876176483badc7ebf5a6c38109e7ac5c3f484df76e82bf790244661ac70b1e52dd3b2fc8a4956e5ff

View File

@@ -0,0 +1,191 @@
# Copyright 1999-2024 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: unbundle mbedtls?
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
PYTHON_GDB_USE=( python_targets_python3_{11..13} )
VER="14.2.0_20241119"
GDB_VER="16.2_20250324"
OPENOCD_VER="0.12.0-esp32-20250707"
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.v5.4.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"
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-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-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
if use riscv32; then
rm "${WORKDIR}"/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb-3.{8..10} || 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_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
}