dev-embedded/esp-idf: add 5.4

Signed-off-by: David Roman <davidroman96@gmail.com>
This commit is contained in:
David Roman 2025-01-08 12:03:09 +01:00
parent d28b74e547
commit 05a4094803
No known key found for this signature in database
GPG Key ID: FFAD0D85E1A0C8D7
2 changed files with 165 additions and 0 deletions

View File

@ -1,6 +1,9 @@
DIST esp-idf-5.3.2.zip 1900574501 BLAKE2B fa6937d0bc90ae8b3e6590bebbc1703b89c3e6467cf555256d68d5854d093f06cbbe0e8fe83f4afefe044cba1d8f1ff37b4dc08c1bcd0c50ceef76f1a13192cb SHA512 87be2eed9faab03d5da6c5fdecf19e7c59f1ad8b98ba8796c5070c20a286029d5162f48f4a24e623698bc410dbed6ef5476833362238e6508503408bf761af51
DIST esp-idf-5.4.zip 1945165988 BLAKE2B ae91d8c4a3ae3190e6bbeaec2e26e89af053db77ac7f3c9d381713f14d1777b51a5e1b5e4b1f07d941f33e54f6df69fb26f6ad8d46b0520ce8d11b45521cb4a0 SHA512 c0fcd0e553a2845b4b4583f0ae2301c60cb456c177563c92cb6f76ad9c57a2055f607ccad647de9510b18487dc0b4f338cf8a17bd4b7459d087185533eafaae9
DIST openocd-esp32-linux-amd64-0.12.0-esp32-20241016.tar.gz 2398717 BLAKE2B 4550fb391e77c4eb09f88bc596f002de12a1c26e07af1d4e1a9efb25851facab39afc96a73d7c3f5c1bd8dc11963c6dc619d161741ee96cb2fb39c2b9bfbacd8 SHA512 bc72521e5c01090b1628d97a33adf336d32e4b451050abd056046672bb5d8bc0326db350d8c96390a11891d783d1223ff98ebef35e7299cc2f36dde9f0b466f8
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
DIST xtensa-esp-elf-13.2.0_20240530-x86_64-linux-gnu.tar.xz 112073272 BLAKE2B 88b6abb5202ebb2ffa03f3cdeca2fc0ef23cb02d96e86388e3334620d7a36ff6401a6e886380f10a4eff68638c60705f3d66d68fa047dc3e37744b41b643da73 SHA512 ecb11e32269513d778d320a429c4403ce50e8556b7e547dee7efb3a1ae333ad526732415cabe79bef30e2e9626305f83f6ca60dc1bd1864adfbfc7b9240e5c46
DIST xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz 174652716 BLAKE2B a53ef806b65bd48f29dce6f2964d72e3247a4d1c35b09ccefce57ef5d42acad6a5ea8f2bdce50e29573227d40d81e9daa7e7954e2c9900eaeaaac47ecdf045ef SHA512 5039ea825aa2da1832c216c1963bcb36ab5a9c239f907426ff0a1174d7e712f9a504f1964f072d50a27b142ed11a3b497c59f349226ed28b0e2a7f207241fbd9
DIST xtensa-esp-elf-gdb-14.2_20240403-x86_64-linux-gnu.tar.gz 31010320 BLAKE2B dcca888811260e86f9cde19ee1a2e7737c73de6a8060d100a362a4c41a606779b82cb04ff62184c5dfa226e6ac9b81b018f4da30e748cbcd644a80ff2122b86a SHA512 8b224393345b45124d5f0698e01e8e465d785c62cea6845eefd7ff852463966dc13ae94f6edb9a6b16871a6cfaa43b4d275740173579994d352303359c122deb

View File

@ -0,0 +1,162 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11,12} )
VER="14.2.0_20241119"
GDB_VER="14.2_20240403"
OPENOCD_VER="0.12.0-esp32-20241016"
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"
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
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"
)
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 .
}