diff options
author | David Roman <davidroman96@gmail.com> | 2023-09-04 12:54:36 +0200 |
---|---|---|
committer | David Roman <davidroman96@gmail.com> | 2023-09-04 12:54:36 +0200 |
commit | dd931595ede38591b64fde6e33dcbfa48944ea65 (patch) | |
tree | 8edba02f03d90d21908ac66e9d60dc20260ad98d /dev-embedded | |
parent | media-sound/g4music: add 3.3 (diff) | |
download | guru-dd931595ede38591b64fde6e33dcbfa48944ea65.tar.gz guru-dd931595ede38591b64fde6e33dcbfa48944ea65.tar.bz2 guru-dd931595ede38591b64fde6e33dcbfa48944ea65.zip |
dev-embedded/esp-idf: add 5.1.1
Signed-off-by: David Roman <davidroman96@gmail.com>
Diffstat (limited to 'dev-embedded')
-rw-r--r-- | dev-embedded/esp-idf/Manifest | 1 | ||||
-rw-r--r-- | dev-embedded/esp-idf/esp-idf-5.1.1.ebuild | 159 |
2 files changed, 160 insertions, 0 deletions
diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest index 4436ec569..ec86fd640 100644 --- a/dev-embedded/esp-idf/Manifest +++ b/dev-embedded/esp-idf/Manifest @@ -1,3 +1,4 @@ +DIST esp-idf-5.1.1.zip 1131279692 BLAKE2B 87a74ec1ae7f54a067cddf3d4e4b0797ced4b8164019c68b33e89d356a56232a17ca350363298868af4eb27b003b2d96f48aa30d41a085b6460a800ccbb50eb2 SHA512 88fc90a0f74b9e3dd90b9d32aa473e8943b89abd6684249659553d4cae6c90d2c31409bd2d29cd4e9653f3770f6b3a03e684041ca1c9d7770925062ddd3a71e3 DIST esp-idf-5.1.zip 1062080629 BLAKE2B 78df1d6abfdde5731499422c6d05e0cdf0d6c46b73f6e7a6b94f61c5bb66ddfeffffe9a1f5dba5996397141ca2dc3372fbca5b915b828bb30069d8d711f7858b SHA512 85cc37a910398cb82fca4ff6257d23c28a993cf7deb3f7e34129513cd89e8a495ec7b38d3a206482489ffe4996d800a2742fd6c69cc5ce425b4d0522d19d9592 DIST openocd-esp32-linux-amd64-0.12.0-esp32-20230419.tar.gz 2126949 BLAKE2B ae53bf574c60a7f004b49946f03fe936fefeee2574bf47ac71b2144d066e77e64190889b3650e39010aaf568fef13e05dc773355f1b7f59f547b181346c78080 SHA512 3a7f0e2ff4e68d203847271b1b95fc9c9581adf5d4f503cdc20770985f2b8b59d39f358e46d0d7358e8c94c8ff1437c4747579e02dd92b7a07a0ba23a885d191 DIST riscv32-esp-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 131410024 BLAKE2B 6961ddad1570aa69cbe7a4b1cd6722831d725b83a2d865b5babeea9b2d1762e4dda3cf35bdd4c5137758e15267a229136439387ff72577d5d558a924cd6161aa SHA512 dd0a95408fb487d444cb2c1efc9a0d21404eba2080b16cd9958dd9a9d22c5bf36f3c5e0309b082a226b39e4aeaf9a07ac89af740e2d5c01f85147d26dff7d233 diff --git a/dev-embedded/esp-idf/esp-idf-5.1.1.ebuild b/dev-embedded/esp-idf/esp-idf-5.1.1.ebuild new file mode 100644 index 000000000..1b4e013e1 --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-5.1.1.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_11 ) + +VER="12.2.0_20230208" + +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-20230419/openocd-esp32-linux-amd64-0.12.0-esp32-20230419.tar.gz + https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v12.1_20221002/xtensa-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz" +SRC_URI+=" esp32? ( ${CROSSTOOL_URL}/xtensa-esp32-elf-${VER}-x86_64-linux-gnu.tar.xz )" +SRC_URI+=" esp32s2? ( ${CROSSTOOL_URL}/xtensa-esp32s2-elf-${VER}-x86_64-linux-gnu.tar.xz )" +SRC_URI+=" esp32s3? ( ${CROSSTOOL_URL}/xtensa-esp32s3-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="+esp32 esp32s2 esp32s3 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-size[${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.0.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 + + if use esp32; then + install_tool xtensa-esp32-elf + install_tool xtensa-esp32-elf/xtensa-esp32-elf + fi + + if use esp32s2; then + install_tool xtensa-esp32s2-elf + install_tool xtensa-esp32s2-elf/xtensa-esp32s2-elf + fi + + if use esp32s3; then + install_tool xtensa-esp32s3-elf + install_tool xtensa-esp32s3-elf/xtensa-esp32s3-elf + fi + + 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 . +} |