From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8ECE51584AD for ; Tue, 22 Apr 2025 09:18:14 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 511E3341C4B for ; Tue, 22 Apr 2025 09:18:14 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 2077A1104B1; Tue, 22 Apr 2025 09:18:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 142D21104B1 for ; Tue, 22 Apr 2025 09:18:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A1AE3340CA7 for ; Tue, 22 Apr 2025 09:18:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0D15F19F6 for ; Tue, 22 Apr 2025 09:18:11 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1745313446.620cabc679e8090dcb7da7adb55136b82b2eec1a.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-embedded/esp-idf/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-embedded/esp-idf/Manifest dev-embedded/esp-idf/esp-idf-5.3.3.ebuild X-VCS-Directories: dev-embedded/esp-idf/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: 620cabc679e8090dcb7da7adb55136b82b2eec1a X-VCS-Branch: dev Date: Tue, 22 Apr 2025 09:18:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6307e444-2e58-4bff-9c4d-509da2375218 X-Archives-Hash: 0aa2a4793e84e12b062f3ea1e8d6c07e commit: 620cabc679e8090dcb7da7adb55136b82b2eec1a Author: David Roman gmail com> AuthorDate: Tue Apr 22 09:17:26 2025 +0000 Commit: David Roman gmail com> CommitDate: Tue Apr 22 09:17:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=620cabc6 dev-embedded/esp-idf: add 5.3.3 Signed-off-by: David Roman gmail.com> dev-embedded/esp-idf/Manifest | 1 + dev-embedded/esp-idf/esp-idf-5.3.3.ebuild | 162 ++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest index 1e38a802e..925d6d455 100644 --- a/dev-embedded/esp-idf/Manifest +++ b/dev-embedded/esp-idf/Manifest @@ -1,4 +1,5 @@ DIST esp-idf-5.3.2.zip 1900574501 BLAKE2B fa6937d0bc90ae8b3e6590bebbc1703b89c3e6467cf555256d68d5854d093f06cbbe0e8fe83f4afefe044cba1d8f1ff37b4dc08c1bcd0c50ceef76f1a13192cb SHA512 87be2eed9faab03d5da6c5fdecf19e7c59f1ad8b98ba8796c5070c20a286029d5162f48f4a24e623698bc410dbed6ef5476833362238e6508503408bf761af51 +DIST esp-idf-5.3.3.zip 1286860664 BLAKE2B b1d6f866bfa8d97580c6421b9412723d5e9978dc7c0630e3450aa15c8d5d5bbfc8c69e9df7a2ad8349e50bbbe9f3641b61a844d78a021effc04f06fb98cb08a7 SHA512 be790154d8877886725a500d054dcdf3b36a2a4fb1b48f9a8bba8c55885890151b93a15a62e9ff721ca7a008bb23dbe803e52ae33fa1c34d6a90d39f9692e473 DIST esp-idf-5.4.1.zip 1235191686 BLAKE2B e29ce7dbf0783bcc2c549b240d4bad767adabca2f9ad6eb322ab8af3924becb29defffe97f792484a9f8bcd4a7ddc5ebd1ecf306d238c93e3d020df25c422530 SHA512 02e012bfe92f365151bef667588c93516abacf438c2687f05fd7db968b6efb6a4e3469031cf36771d6df5ceb5bef6202d6f205c9b1d537431fa39160ccf5497a 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 diff --git a/dev-embedded/esp-idf/esp-idf-5.3.3.ebuild b/dev-embedded/esp-idf/esp-idf-5.3.3.ebuild new file mode 100644 index 000000000..9b8781ab1 --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-5.3.3.ebuild @@ -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..13} ) + +VER="13.2.0_20240530" +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/$(ver_cut 1-2)" +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 . +} From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1A9A11584AD for ; Tue, 22 Apr 2025 09:28:33 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 08DB8342FEC for ; Tue, 22 Apr 2025 09:28:33 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 1BD4C1104C1; Tue, 22 Apr 2025 09:28:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 0DF271104BE for ; Tue, 22 Apr 2025 09:28:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B6647342F64 for ; Tue, 22 Apr 2025 09:28:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 06EBB26AD for ; Tue, 22 Apr 2025 09:28:16 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1745313446.620cabc679e8090dcb7da7adb55136b82b2eec1a.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-embedded/esp-idf/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-embedded/esp-idf/Manifest dev-embedded/esp-idf/esp-idf-5.3.3.ebuild X-VCS-Directories: dev-embedded/esp-idf/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: 620cabc679e8090dcb7da7adb55136b82b2eec1a X-VCS-Branch: master Date: Tue, 22 Apr 2025 09:28:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c72d4fad-0b89-4631-a7fd-cd73e7f323d5 X-Archives-Hash: c59e3a8042f251433fb3f7a05e81784d Message-ID: <20250422092816.kChKGt6rq7tGqj961g7sw7U6y2vm8izx00y3Ufa8ZJg@z> commit: 620cabc679e8090dcb7da7adb55136b82b2eec1a Author: David Roman gmail com> AuthorDate: Tue Apr 22 09:17:26 2025 +0000 Commit: David Roman gmail com> CommitDate: Tue Apr 22 09:17:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=620cabc6 dev-embedded/esp-idf: add 5.3.3 Signed-off-by: David Roman gmail.com> dev-embedded/esp-idf/Manifest | 1 + dev-embedded/esp-idf/esp-idf-5.3.3.ebuild | 162 ++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest index 1e38a802e..925d6d455 100644 --- a/dev-embedded/esp-idf/Manifest +++ b/dev-embedded/esp-idf/Manifest @@ -1,4 +1,5 @@ DIST esp-idf-5.3.2.zip 1900574501 BLAKE2B fa6937d0bc90ae8b3e6590bebbc1703b89c3e6467cf555256d68d5854d093f06cbbe0e8fe83f4afefe044cba1d8f1ff37b4dc08c1bcd0c50ceef76f1a13192cb SHA512 87be2eed9faab03d5da6c5fdecf19e7c59f1ad8b98ba8796c5070c20a286029d5162f48f4a24e623698bc410dbed6ef5476833362238e6508503408bf761af51 +DIST esp-idf-5.3.3.zip 1286860664 BLAKE2B b1d6f866bfa8d97580c6421b9412723d5e9978dc7c0630e3450aa15c8d5d5bbfc8c69e9df7a2ad8349e50bbbe9f3641b61a844d78a021effc04f06fb98cb08a7 SHA512 be790154d8877886725a500d054dcdf3b36a2a4fb1b48f9a8bba8c55885890151b93a15a62e9ff721ca7a008bb23dbe803e52ae33fa1c34d6a90d39f9692e473 DIST esp-idf-5.4.1.zip 1235191686 BLAKE2B e29ce7dbf0783bcc2c549b240d4bad767adabca2f9ad6eb322ab8af3924becb29defffe97f792484a9f8bcd4a7ddc5ebd1ecf306d238c93e3d020df25c422530 SHA512 02e012bfe92f365151bef667588c93516abacf438c2687f05fd7db968b6efb6a4e3469031cf36771d6df5ceb5bef6202d6f205c9b1d537431fa39160ccf5497a 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 diff --git a/dev-embedded/esp-idf/esp-idf-5.3.3.ebuild b/dev-embedded/esp-idf/esp-idf-5.3.3.ebuild new file mode 100644 index 000000000..9b8781ab1 --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-5.3.3.ebuild @@ -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..13} ) + +VER="13.2.0_20240530" +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/$(ver_cut 1-2)" +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 . +}