diff options
author | David Roman <davidroman96@gmail.com> | 2024-02-19 16:42:57 +0100 |
---|---|---|
committer | David Roman <davidroman96@gmail.com> | 2024-02-19 16:43:40 +0100 |
commit | c89b793e9cff09f446a043bc584e9ee3a6033da2 (patch) | |
tree | ced063a54a7650bb2c975d8d8f1bbea3b098e3f2 /dev-embedded/esp-idf | |
parent | app-containers/waydroid: added python3.12 support (diff) | |
download | guru-c89b793e9cff09f446a043bc584e9ee3a6033da2.tar.gz guru-c89b793e9cff09f446a043bc584e9ee3a6033da2.tar.bz2 guru-c89b793e9cff09f446a043bc584e9ee3a6033da2.zip |
dev-embedded/esp-idf: add 5.2
Signed-off-by: David Roman <davidroman96@gmail.com>
Diffstat (limited to 'dev-embedded/esp-idf')
-rw-r--r-- | dev-embedded/esp-idf/Manifest | 4 | ||||
-rw-r--r-- | dev-embedded/esp-idf/esp-idf-5.2.ebuild | 146 |
2 files changed, 150 insertions, 0 deletions
diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest index 6db04f63b..870daf7b2 100644 --- a/dev-embedded/esp-idf/Manifest +++ b/dev-embedded/esp-idf/Manifest @@ -1,9 +1,13 @@ DIST esp-idf-5.1.1.zip 1131279692 BLAKE2B 87a74ec1ae7f54a067cddf3d4e4b0797ced4b8164019c68b33e89d356a56232a17ca350363298868af4eb27b003b2d96f48aa30d41a085b6460a800ccbb50eb2 SHA512 88fc90a0f74b9e3dd90b9d32aa473e8943b89abd6684249659553d4cae6c90d2c31409bd2d29cd4e9653f3770f6b3a03e684041ca1c9d7770925062ddd3a71e3 DIST esp-idf-5.1.2.zip 1200519153 BLAKE2B d8714163e3a449e24bec8a93ce666d269ddb7d406d7e3dc0b5db0845b7a9c05f6a5186796f8bbda68bb0a8e40a2743a88792eb341e72a276e4ec1e3e8b04c34d SHA512 46e96419b5f58d8b41d5b7b35f6e96beee94f6c1e20ba22eaf48a7f3d3cf4f3c9b8aa79468e6ea95718f598f6e30e7b72be616d1fb856045758191eb244151c8 +DIST esp-idf-5.2.zip 1287699728 BLAKE2B d91d69da49423afa1c5345053af1da65d0c2d610f72a9a0c30a56bf9d4d2a9f10d2d30a2187e6db63953d5b9547877240cda8ff2d31032e7b4b9f2fad74c21e9 SHA512 fbbdd08aff3fe310638312d46a61466f97a039906a7766cc4ab5343b41a66f742b065b375695f8b2e749104bb7214eb31a1357e24c231048fc03fc81a615c90e DIST openocd-esp32-linux-amd64-0.12.0-esp32-20230419.tar.gz 2126949 BLAKE2B ae53bf574c60a7f004b49946f03fe936fefeee2574bf47ac71b2144d066e77e64190889b3650e39010aaf568fef13e05dc773355f1b7f59f547b181346c78080 SHA512 3a7f0e2ff4e68d203847271b1b95fc9c9581adf5d4f503cdc20770985f2b8b59d39f358e46d0d7358e8c94c8ff1437c4747579e02dd92b7a07a0ba23a885d191 DIST openocd-esp32-linux-amd64-0.12.0-esp32-20230921.tar.gz 2193783 BLAKE2B 8f94d628bb415ab75daa85d51c94e8d2a9a1d9399b706963b8bd663d145e440a9e86d7f29000f196d1c9e2585c24882739a80ba29c5b83a96ada384f262f0941 SHA512 8ca3c932c5b7b236133c2a305d95b8059d9db14640efc077e34c256390da05e177479a973aa974005f34fba4a74119dcdb59d876344bdef8940b58c3c948c9f7 DIST riscv32-esp-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 131410024 BLAKE2B 6961ddad1570aa69cbe7a4b1cd6722831d725b83a2d865b5babeea9b2d1762e4dda3cf35bdd4c5137758e15267a229136439387ff72577d5d558a924cd6161aa SHA512 dd0a95408fb487d444cb2c1efc9a0d21404eba2080b16cd9958dd9a9d22c5bf36f3c5e0309b082a226b39e4aeaf9a07ac89af740e2d5c01f85147d26dff7d233 +DIST riscv32-esp-elf-13.2.0_20230928-x86_64-linux-gnu.tar.xz 143575940 BLAKE2B a888291f4b2c482cf2f3620519fc02607ba22d99f8d02e20415daf58cf2eecfa96144b0fc6fdbf98b3569ff0e5755d854650735e30cbfab56701a3d61627ddba SHA512 71b5def3d291eb80ab98adfbd23626ea4c6c5d8b30ab34a9f8a100013df58c4867044b974d8ced9405b5b45b26232835806746814051f55b650dde82bffe40f4 +DIST xtensa-esp-elf-13.2.0_20230928-x86_64-linux-gnu.tar.xz 112588084 BLAKE2B 9b462426d09f0071d205066d6e9897d035a3c65bef6c9bf2cccefdbcbb3629af38cec5b5411e5f32c1e0b19d51c78675e264544c1f730a1b0554262c9b6dd7d1 SHA512 60e718d8bc4007966d4b66ca57a56b144ac6614e6a283ceb6681a29aab60f1f621049e3b691440e3da38a47d7260467a06c91c190d383aeb5c915df2dd908b94 DIST xtensa-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz 32006939 BLAKE2B 3963f402f65a1503d4fcef0b68c8efcd1f17407809f77a5b76da03e89a0fdd47cd06545ab958aa444fc2ce822b20b4e7c88d921de723bae81bd74bd93a34e047 SHA512 013641d87729f7387a29afac0715a1fc1012edf88092e1dd51682df07730ab71c511f6824c77f52b17c06dca1a04a85c157730da80d1e5cb61bc6dcbe48e199e +DIST xtensa-esp-elf-gdb-12.1_20231023-x86_64-linux-gnu.tar.gz 36942094 BLAKE2B ecb04aacb864ad625d603b59fb39df9e76ff63cbbab39fa2370154c939e5113e56fc7eeff03411c33d73adf05376531f8d107c6da55e5b619390b5272d4f1ad5 SHA512 7afee5aa9919420d847d5dc351598ba7a0ba41c61e20647501b62d83c65868fd1673f45065b0563204cd30049e5dcceb3a0c095f7f0382d7166904ee202ea730 DIST xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 67006496 BLAKE2B 343803d0511f8fd5d382221b57c68d964565e36bbd397d5ee5747f75224498db306120c10b7d664c2d0449888d5fa6c1aa423f5681097f06810c257c922d83aa SHA512 6bba61d3f05a08cb0e0f238c60af1b69caeb950e598849aa1edea6e4e95838938c1006afee8d19ea0533d9747342cb57b9010f52500db8a38b13987bea3a827a DIST xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 64374532 BLAKE2B 7fe7c185e4561e34981615a3b7b96998cc11c473166bf54c2db57eecd617ab2c6c94c62fe6bc632e821cc98cf3e82d6f2b35a9210b56245442b1c6206b135617 SHA512 5381167aff6a2d023fb5b210dc092b610d72ae00484dae17d7c4e016bda9d457e597698895fcd2de755e6a86b9af2b2c5ca993cf89f12c3570f223671f6144da DIST xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 67512340 BLAKE2B 10859b0fbb1f8c2e3c229e4f87ccac00dda4f1f54827a556772badf2dd85b04c6cf50a79cc89f80a2596fc7fb7253e5750158e5499ab2c4062717de50d04473c SHA512 c23f35f01a938e96ff85bd06fd25db929be3027ab1cd0d57f2c3c355b7abb1d2629f193deae2dfa2f2684faf2c516f96029be28e230dc73b70ea935121ab62ba diff --git a/dev-embedded/esp-idf/esp-idf-5.2.ebuild b/dev-embedded/esp-idf/esp-idf-5.2.ebuild new file mode 100644 index 000000000..6036f9efe --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-5.2.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11,12} ) + +VER="13.2.0_20230928" + +CROSSTOOL_URL="https://github.com/espressif/crosstool-NG/releases/download/esp-${VER}" + +inherit python-r1 + +DESCRIPTION="Espressif IoT Development Framework" +HOMEPAGE="https://www.espressif.com/" + +# https://github.com/espressif/binutils-esp32ulp/releases/download/v2.28.51-esp-20191205/binutils-esp32ulp-linux-amd64-2.28.51-esp-20191205.tar.gz +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/v0.12.0-esp32-20230921/openocd-esp32-linux-amd64-0.12.0-esp32-20230921.tar.gz + https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v12.1_20231023/xtensa-esp-elf-gdb-12.1_20231023-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://dl.espressif.com/dl/toolchains/preview/riscv32-esp-elf-gcc8_4_0-crosstool-ng-1.24.0-123-g64eb9ff-linux-amd64.tar.gz + +KEYWORDS="~amd64" +LICENSE="Apache-2.0" +IUSE="riscv32" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +SLOT="0" + +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-panic-decoder[${PYTHON_USEDEP}] + dev-embedded/esp-idf-size[${PYTHON_USEDEP}] + dev-embedded/freertos-gdb[${PYTHON_USEDEP}] + dev-embedded/idf-component-manager[${PYTHON_USEDEP}] +" + +RESTRICT="strip" + +QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*" +QA_PRESTRIPPED="opt/*" + +PATCHES=( + "${FILESDIR}/allow-system-install-${PN}-5.1.2.patch" +) + +S="${WORKDIR}/${PN}-v${PV}" + +install_tool() { + shopt -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 + ) + + shopt -u globstar +} + +src_install() { + echo -e "#!/bin/sh\npython /usr/share/${PN}/tools/idf.py \"\$@\"" > idf + dobin idf + + 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.{6..10} || die + install_tool xtensa-esp-elf-gdb + + 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 . +} |