mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
dev-embedded/esp-idf: add 5.5.3
Signed-off-by: David Roman <davidroman96@gmail.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
DIST esp-idf-5.3.4.zip 1599287093 BLAKE2B f39744048cc199f01b7ff606b573e547a5dc095526d8131f7fb0f1ef78b38f3df238c3e6be2a36ac69ba200cacb42435a99b194fcb88932f2d6a1c4f68a57374 SHA512 f36de5ef3dd33994d02f4f64134c7b1d072ccecefeeda4277bf94a4d34fc76b638edda65c7ad6199eb4b4641d38901c5d576dc4a43c3cb4da7721551bb4c16d7
|
||||
DIST esp-idf-5.4.3.zip 1478722390 BLAKE2B dfda77a01f18a74c27e5be953f9afabcca7e99b3192bc6a30af44e7ddb805e9edce8592f51bd85140bf9d83fa28b20524acb73e35d9ba0c53d8261e820d63c7b SHA512 5ca5dfa537786f0f2261e80fb10da16f244fe5aeaae8aea405c4bd51b113c30d8fb00afbc550b82ebe7ef3e84f0bbed8416bf02de0e62c2b28b0e09a6f8afa9f
|
||||
DIST esp-idf-5.5.2.zip 1504904751 BLAKE2B 8f423a01941e6683751cd41bde4f4f007689f326664f3e2eb559a3b26b4d8aad9d50bc00103f3b73d566d1bfb6574d7a88ec2a2a884d538f0bd38242bd25a5c4 SHA512 de2c8a6679e627b7ac7fc1aa09d55261ce8dcf252d7879bcc95fb0a75515f9ee0ee00a050ea77bd5e862d912e08adff211f4a350be7b99bf2c6c7dc25aeb831e
|
||||
DIST esp-idf-5.5.3.zip 1790510329 BLAKE2B af1a5c00f134453805cee0a069a097e2a3997df533c0784d2fef21d86aebe71a0e6fb4da41deb1f3fae98468fe5ad22d276e0dbb30123fbc8303480dd1f36eac SHA512 b9f1c4156e6455409269bc7ae6de3c9e8ddc362df718267cd9ecc7264b6cb526a7838dee3e5e1fff2c9a796853a26199c111328cd979fc76b7e8684943832bc3
|
||||
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 openocd-esp32-linux-amd64-0.12.0-esp32-20251215.tar.gz 2547606 BLAKE2B c7f875f2b63f0dff29239a4623b06f96760773a7686fa6a9aa0074fd4b10dff6621e09838402a62222cf282a120399fbe7b6cbc4fb70a7c0f4d96c85e02c3e46 SHA512 a6e52a5b35cf053f45d917dbcea87087cad42cdb09381c082c20fac43f65ae341949223f55289bc6c084db61d4a963a8277e030202db4495578801ea7e83b281
|
||||
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_20250730-x86_64-linux-gnu.tar.xz 303504168 BLAKE2B 46b861537f3d3c9b9107c086fd7f606f23e8073e608bb2363c33e492a9de5f710404fb5092c5bf0fbfa1a2c0f55c5e13654e57792274057a003159d8609a96fe SHA512 b8a776bd26e9d56055786faf155bbc6ee8b786e7042e566c6c5c18e7340ee604127baadaa337eb620e8253e7d5329504e1c5fa5ef76ae7e77834f52e6d0b30cb
|
||||
DIST riscv32-esp-elf-14.2.0_20251107-x86_64-linux-gnu.tar.xz 306966476 BLAKE2B 233b3f080d5fdfebb86bdc0ec2a6d82110d01753ad0d19481eb66ce0f28f4bff7e6a10f66d77d38ab3d9ac5b2a0fd8e0595460af1662ba691cbf1ed6132ba8b0 SHA512 3053fbee064dabfb277aaa5fd6c713ca8b6a42ab042defa1b472be17fd714d098495a4c97800599599437177f73a07e9955b9b2aff926d3881aa3274c1dc41c6
|
||||
|
||||
190
dev-embedded/esp-idf/esp-idf-5.5.3.ebuild
Normal file
190
dev-embedded/esp-idf/esp-idf-5.5.3.ebuild
Normal file
@@ -0,0 +1,190 @@
|
||||
# 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: unbundle mbedtls?
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
PYTHON_GDB_USE=( python_targets_python3_{11..13} )
|
||||
VER="14.2.0_20251107"
|
||||
GDB_VER="16.3_20250913"
|
||||
OPENOCD_VER="0.12.0-esp32-20251215"
|
||||
|
||||
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}]
|
||||
virtual/zlib:=
|
||||
"
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*"
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user