* [gentoo-commits] repo/proj/guru:master commit in: dev-embedded/esp-idf/, dev-embedded/esp-idf/files/
@ 2023-11-20 14:14 David Roman
2023-11-20 13:39 ` [gentoo-commits] repo/proj/guru:dev commit in: dev-embedded/esp-idf/files/, dev-embedded/esp-idf/ David Roman
0 siblings, 1 reply; 5+ messages in thread
From: David Roman @ 2023-11-20 14:14 UTC (permalink / raw
To: gentoo-commits
commit: 1ed6084af58a87e81d0291c6d8540284fba02c48
Author: David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Mon Nov 20 13:38:39 2023 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Nov 20 13:39:35 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1ed6084a
dev-embedded/esp-idf: add 5.1.2
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>
dev-embedded/esp-idf/Manifest | 2 +
dev-embedded/esp-idf/esp-idf-5.1.2.ebuild | 158 +++++++++++++++++++++
.../files/allow-system-install-esp-idf-5.1.2.patch | 12 ++
3 files changed, 172 insertions(+)
diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest
index ec86fd6405..dd7351dcd2 100644
--- a/dev-embedded/esp-idf/Manifest
+++ b/dev-embedded/esp-idf/Manifest
@@ -1,6 +1,8 @@
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.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 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 xtensa-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz 32006939 BLAKE2B 3963f402f65a1503d4fcef0b68c8efcd1f17407809f77a5b76da03e89a0fdd47cd06545ab958aa444fc2ce822b20b4e7c88d921de723bae81bd74bd93a34e047 SHA512 013641d87729f7387a29afac0715a1fc1012edf88092e1dd51682df07730ab71c511f6824c77f52b17c06dca1a04a85c157730da80d1e5cb61bc6dcbe48e199e
DIST xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 67006496 BLAKE2B 343803d0511f8fd5d382221b57c68d964565e36bbd397d5ee5747f75224498db306120c10b7d664c2d0449888d5fa6c1aa423f5681097f06810c257c922d83aa SHA512 6bba61d3f05a08cb0e0f238c60af1b69caeb950e598849aa1edea6e4e95838938c1006afee8d19ea0533d9747342cb57b9010f52500db8a38b13987bea3a827a
diff --git a/dev-embedded/esp-idf/esp-idf-5.1.2.ebuild b/dev-embedded/esp-idf/esp-idf-5.1.2.ebuild
new file mode 100644
index 0000000000..90dde4378c
--- /dev/null
+++ b/dev-embedded/esp-idf/esp-idf-5.1.2.ebuild
@@ -0,0 +1,158 @@
+# 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-20230921/openocd-esp32-linux-amd64-0.12.0-esp32-20230921.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.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
+
+ 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 .
+}
diff --git a/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.1.2.patch b/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.1.2.patch
new file mode 100644
index 0000000000..c286493a57
--- /dev/null
+++ b/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.1.2.patch
@@ -0,0 +1,12 @@
+diff --git a/tools/idf_tools.py b/tools/idf_tools.py
+index 8a17ed224d..2103e9d60a 100755
+--- a/tools/idf_tools.py
++++ b/tools/idf_tools.py
+@@ -2113,6 +2113,7 @@ def action_install_python_env(args): # type: ignore
+
+
+ def action_check_python_dependencies(args): # type: ignore
++ return
+ use_constraints = not args.no_constraints
+ req_paths = get_requirements('') # no new features -> just detect the existing ones
+
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: dev-embedded/esp-idf/files/, dev-embedded/esp-idf/
2023-11-20 14:14 [gentoo-commits] repo/proj/guru:master commit in: dev-embedded/esp-idf/, dev-embedded/esp-idf/files/ David Roman
@ 2023-11-20 13:39 ` David Roman
0 siblings, 0 replies; 5+ messages in thread
From: David Roman @ 2023-11-20 13:39 UTC (permalink / raw
To: gentoo-commits
commit: 1ed6084af58a87e81d0291c6d8540284fba02c48
Author: David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Mon Nov 20 13:38:39 2023 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Nov 20 13:39:35 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1ed6084a
dev-embedded/esp-idf: add 5.1.2
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>
dev-embedded/esp-idf/Manifest | 2 +
dev-embedded/esp-idf/esp-idf-5.1.2.ebuild | 158 +++++++++++++++++++++
.../files/allow-system-install-esp-idf-5.1.2.patch | 12 ++
3 files changed, 172 insertions(+)
diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest
index ec86fd6405..dd7351dcd2 100644
--- a/dev-embedded/esp-idf/Manifest
+++ b/dev-embedded/esp-idf/Manifest
@@ -1,6 +1,8 @@
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.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 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 xtensa-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz 32006939 BLAKE2B 3963f402f65a1503d4fcef0b68c8efcd1f17407809f77a5b76da03e89a0fdd47cd06545ab958aa444fc2ce822b20b4e7c88d921de723bae81bd74bd93a34e047 SHA512 013641d87729f7387a29afac0715a1fc1012edf88092e1dd51682df07730ab71c511f6824c77f52b17c06dca1a04a85c157730da80d1e5cb61bc6dcbe48e199e
DIST xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 67006496 BLAKE2B 343803d0511f8fd5d382221b57c68d964565e36bbd397d5ee5747f75224498db306120c10b7d664c2d0449888d5fa6c1aa423f5681097f06810c257c922d83aa SHA512 6bba61d3f05a08cb0e0f238c60af1b69caeb950e598849aa1edea6e4e95838938c1006afee8d19ea0533d9747342cb57b9010f52500db8a38b13987bea3a827a
diff --git a/dev-embedded/esp-idf/esp-idf-5.1.2.ebuild b/dev-embedded/esp-idf/esp-idf-5.1.2.ebuild
new file mode 100644
index 0000000000..90dde4378c
--- /dev/null
+++ b/dev-embedded/esp-idf/esp-idf-5.1.2.ebuild
@@ -0,0 +1,158 @@
+# 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-20230921/openocd-esp32-linux-amd64-0.12.0-esp32-20230921.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.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
+
+ 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 .
+}
diff --git a/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.1.2.patch b/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.1.2.patch
new file mode 100644
index 0000000000..c286493a57
--- /dev/null
+++ b/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.1.2.patch
@@ -0,0 +1,12 @@
+diff --git a/tools/idf_tools.py b/tools/idf_tools.py
+index 8a17ed224d..2103e9d60a 100755
+--- a/tools/idf_tools.py
++++ b/tools/idf_tools.py
+@@ -2113,6 +2113,7 @@ def action_install_python_env(args): # type: ignore
+
+
+ def action_check_python_dependencies(args): # type: ignore
++ return
+ use_constraints = not args.no_constraints
+ req_paths = get_requirements('') # no new features -> just detect the existing ones
+
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: dev-embedded/esp-idf/files/, dev-embedded/esp-idf/
@ 2024-07-30 12:58 David Roman
0 siblings, 0 replies; 5+ messages in thread
From: David Roman @ 2024-07-30 12:58 UTC (permalink / raw
To: gentoo-commits
commit: fc244b14e8e705be0651b6a0b902e41948aff580
Author: David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Tue Jul 30 12:57:14 2024 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Tue Jul 30 12:57:14 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fc244b14
dev-embedded/esp-idf: add patch for invalid type conversion error
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>
dev-embedded/esp-idf/esp-idf-5.3-r1.ebuild | 159 +++++++++++++++++++++
.../files/esp-idf-5.3-fix-cpp-build-eth.patch | 125 ++++++++++++++++
2 files changed, 284 insertions(+)
diff --git a/dev-embedded/esp-idf/esp-idf-5.3-r1.ebuild b/dev-embedded/esp-idf/esp-idf-5.3-r1.ebuild
new file mode 100644
index 000000000..7a658ac3c
--- /dev/null
+++ b/dev-embedded/esp-idf/esp-idf-5.3-r1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11,12} )
+
+VER="13.2.0_20240530"
+GDB_VER="14.2_20240403"
+
+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/v0.12.0-esp32-20240318/openocd-esp32-linux-amd64-0.12.0-esp32-20240318.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-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"
+ "${FILESDIR}/${P}-fix-cpp-build-eth.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() {
+ 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 .
+}
diff --git a/dev-embedded/esp-idf/files/esp-idf-5.3-fix-cpp-build-eth.patch b/dev-embedded/esp-idf/files/esp-idf-5.3-fix-cpp-build-eth.patch
new file mode 100644
index 000000000..41fe1e87b
--- /dev/null
+++ b/dev-embedded/esp-idf/files/esp-idf-5.3-fix-cpp-build-eth.patch
@@ -0,0 +1,125 @@
+diff --git a/components/esp_eth/include/esp_eth_mac_esp.h b/components/esp_eth/include/esp_eth_mac_esp.h
+index 8c4909b8c5..39db373798 100644
+--- a/components/esp_eth/include/esp_eth_mac_esp.h
++++ b/components/esp_eth/include/esp_eth_mac_esp.h
+@@ -217,64 +217,64 @@ typedef enum {
+ #error "Unsupported RMII clock mode"
+ #endif // CONFIG_ETH_RMII_CLK_INPUT
+
+-#define ETH_ESP32_EMAC_DEFAULT_CONFIG() \
+- { \
+- .smi_gpio = \
+- { \
+- .mdc_num = 23, \
+- .mdio_num = 18 \
+- }, \
+- .interface = EMAC_DATA_INTERFACE_RMII, \
+- .clock_config = \
+- { \
+- .rmii = \
+- { \
+- .clock_mode = DEFAULT_RMII_CLK_MODE, \
+- .clock_gpio = DEFAULT_RMII_CLK_GPIO \
+- } \
+- }, \
+- .dma_burst_len = ETH_DMA_BURST_LEN_32, \
+- .intr_priority = 0, \
++#define ETH_ESP32_EMAC_DEFAULT_CONFIG() \
++ { \
++ .smi_gpio = \
++ { \
++ .mdc_num = 23, \
++ .mdio_num = 18 \
++ }, \
++ .interface = EMAC_DATA_INTERFACE_RMII, \
++ .clock_config = \
++ { \
++ .rmii = \
++ { \
++ .clock_mode = DEFAULT_RMII_CLK_MODE, \
++ .clock_gpio = (emac_rmii_clock_gpio_t) DEFAULT_RMII_CLK_GPIO \
++ } \
++ }, \
++ .dma_burst_len = ETH_DMA_BURST_LEN_32, \
++ .intr_priority = 0, \
+ }
+ #elif CONFIG_IDF_TARGET_ESP32P4
+-#define ETH_ESP32_EMAC_DEFAULT_CONFIG() \
+- { \
+- .smi_gpio = \
+- { \
+- .mdc_num = 31, \
+- .mdio_num = 27 \
+- }, \
+- .interface = EMAC_DATA_INTERFACE_RMII, \
+- .clock_config = \
+- { \
+- .rmii = \
+- { \
+- .clock_mode = EMAC_CLK_EXT_IN, \
+- .clock_gpio = 50 \
+- } \
+- }, \
+- .clock_config_out_in = \
+- { \
+- .rmii = \
+- { \
+- .clock_mode = EMAC_CLK_EXT_IN, \
+- .clock_gpio = -1 \
+- } \
+- }, \
+- .dma_burst_len = ETH_DMA_BURST_LEN_32, \
+- .intr_priority = 0, \
+- .emac_dataif_gpio = \
+- { \
+- .rmii = \
+- { \
+- .tx_en_num = 49, \
+- .txd0_num = 34, \
+- .txd1_num = 35, \
+- .crs_dv_num = 28, \
+- .rxd0_num = 29, \
+- .rxd1_num = 30 \
+- } \
+- }, \
++#define ETH_ESP32_EMAC_DEFAULT_CONFIG() \
++ { \
++ .smi_gpio = \
++ { \
++ .mdc_num = 31, \
++ .mdio_num = 27 \
++ }, \
++ .interface = EMAC_DATA_INTERFACE_RMII, \
++ .clock_config = \
++ { \
++ .rmii = \
++ { \
++ .clock_mode = EMAC_CLK_EXT_IN, \
++ .clock_gpio = (emac_rmii_clock_gpio_t) 50 \
++ } \
++ }, \
++ .clock_config_out_in = \
++ { \
++ .rmii = \
++ { \
++ .clock_mode = EMAC_CLK_EXT_IN, \
++ .clock_gpio = (emac_rmii_clock_gpio_t) -1 \
++ } \
++ }, \
++ .dma_burst_len = ETH_DMA_BURST_LEN_32, \
++ .intr_priority = 0, \
++ .emac_dataif_gpio = \
++ { \
++ .rmii = \
++ { \
++ .tx_en_num = 49, \
++ .txd0_num = 34, \
++ .txd1_num = 35, \
++ .crs_dv_num = 28, \
++ .rxd0_num = 29, \
++ .rxd1_num = 30 \
++ } \
++ }, \
+ }
+ #endif // CONFIG_IDF_TARGET_ESP32P4
+
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: dev-embedded/esp-idf/files/, dev-embedded/esp-idf/
@ 2023-07-05 13:44 David Roman
0 siblings, 0 replies; 5+ messages in thread
From: David Roman @ 2023-07-05 13:44 UTC (permalink / raw
To: gentoo-commits
commit: d3dada415b7703daf674fb33caaa51ce00505ef8
Author: David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Wed Jul 5 13:43:22 2023 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Wed Jul 5 13:43:22 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d3dada41
dev-embedded/esp-idf: add 5.1
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>
dev-embedded/esp-idf/Manifest | 7 +
dev-embedded/esp-idf/esp-idf-5.1.ebuild | 164 +++++++++++++++++++++
.../esp-idf/files/pyparsing-esp-idf-5.1.patch | 37 +++++
3 files changed, 208 insertions(+)
diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest
index 0f413d12e..3c1f2b2b1 100644
--- a/dev-embedded/esp-idf/Manifest
+++ b/dev-embedded/esp-idf/Manifest
@@ -1,7 +1,14 @@
DIST esp-idf-5.0.2.zip 1000558879 BLAKE2B 6127dfb7f78261060b4981e414fea95a4ef7162bb3da11cf53aeb6504396d9e0958044dd66ba1329e87004fd1149c41a86638b4f7a6c3a9d7236fc908961818d SHA512 c58013a5597c00c2ee1c8ae8814b18365f5949b5d834b1fccbee3dce944561d9f2c4296aad578cfc5d79fcd5f86cfa6a5024ff1472305d08ab65e6634be65f05
+DIST esp-idf-5.1.zip 1062080629 BLAKE2B 78df1d6abfdde5731499422c6d05e0cdf0d6c46b73f6e7a6b94f61c5bb66ddfeffffe9a1f5dba5996397141ca2dc3372fbca5b915b828bb30069d8d711f7858b SHA512 85cc37a910398cb82fca4ff6257d23c28a993cf7deb3f7e34129513cd89e8a495ec7b38d3a206482489ffe4996d800a2742fd6c69cc5ce425b4d0522d19d9592
DIST openocd-esp32-linux-amd64-0.11.0-esp32-20221026.tar.gz 2051435 BLAKE2B 59fd510cf3c12514791fa85b76d81722685add64f0a690793b52c5d41101c727fefe064727b148577c3fc522ffae79e8f632d34f300a9543377027579b9cea70 SHA512 f8296460efa3d43b23a51c81a840a2e7c13272fa213770bfdb269decd23a3571be9c4ff4be6647d87e56e156284952d9a8c92b24244eaa6996fae18497ce15f8
+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
DIST riscv32-esp-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz 110107900 BLAKE2B 70688adf6eb613f6d0a3700d5730882b7ff9dec110cbc4157c822dfe1d2abfe21f902e52c695ed410fef39f9c03dfffa3b9c7effac04464dfce4e8b0dcf88814 SHA512 cf7443e1480456fbf5d0824d4745740d8f5e5858c403e70b3931adfa582816c2e0c53c53dc51d493809d9e6780077bc1b1fae51bc146ba1b6272dc3554c1fedb
DIST xtensa-esp-elf-gdb-11.2_20220823-x86_64-linux-gnu.tar.gz 26947336 BLAKE2B 4970451c7b61df0158294bad456a86718631d24cd73efdd4523de6afcba3f780dd54c07549effc6ab3a0838044b3eb2b817346fc11f8a5ad70f827587e65fdbc SHA512 9532d3cd3c82142c65504e641a68cd836ad1642200e4a512ade62380b149d23ddfa0dccdd339825fdf5a3c55107717a21382469bcf19103113f624a2960ca247
+DIST xtensa-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz 32006939 BLAKE2B 3963f402f65a1503d4fcef0b68c8efcd1f17407809f77a5b76da03e89a0fdd47cd06545ab958aa444fc2ce822b20b4e7c88d921de723bae81bd74bd93a34e047 SHA512 013641d87729f7387a29afac0715a1fc1012edf88092e1dd51682df07730ab71c511f6824c77f52b17c06dca1a04a85c157730da80d1e5cb61bc6dcbe48e199e
+DIST xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 67006496 BLAKE2B 343803d0511f8fd5d382221b57c68d964565e36bbd397d5ee5747f75224498db306120c10b7d664c2d0449888d5fa6c1aa423f5681097f06810c257c922d83aa SHA512 6bba61d3f05a08cb0e0f238c60af1b69caeb950e598849aa1edea6e4e95838938c1006afee8d19ea0533d9747342cb57b9010f52500db8a38b13987bea3a827a
DIST xtensa-esp32-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz 64781328 BLAKE2B 7216df8a7a88f73f9beac705aa4a7703a8215301afb4c9ca64c9d16a2fafb574a06079d2e5288b2784e4cd3e5e8e2b3d03708e21c42bc48a30abb06199207616 SHA512 72cd2e5d3168d1ada66c53428ddec1ee47785fc9720e9c1b4aacc41021e59335a8e2d07cc14b064b1f3ea9c01bd747b7cdff69ff83e5586bf1abb4acf5986508
+DIST xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 64374532 BLAKE2B 7fe7c185e4561e34981615a3b7b96998cc11c473166bf54c2db57eecd617ab2c6c94c62fe6bc632e821cc98cf3e82d6f2b35a9210b56245442b1c6206b135617 SHA512 5381167aff6a2d023fb5b210dc092b610d72ae00484dae17d7c4e016bda9d457e597698895fcd2de755e6a86b9af2b2c5ca993cf89f12c3570f223671f6144da
DIST xtensa-esp32s2-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz 51546516 BLAKE2B f4f4bc5bc138f181819416f0b3b4a67270588f827afd64693da4caf8c1a100a04787aa23cfafedb535e5c26aea7af51ad9e08316a0abba99d5549fb62e73aae5 SHA512 72071cb911eb62eff22d46b98f3ac6af87c1b0af4adc036e7f093e24987048c388a689138627ce1a721b93ef9a63a4a6046cbcc91f92e033b5330e4aacf746ea
+DIST xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz 67512340 BLAKE2B 10859b0fbb1f8c2e3c229e4f87ccac00dda4f1f54827a556772badf2dd85b04c6cf50a79cc89f80a2596fc7fb7253e5750158e5499ab2c4062717de50d04473c SHA512 c23f35f01a938e96ff85bd06fd25db929be3027ab1cd0d57f2c3c355b7abb1d2629f193deae2dfa2f2684faf2c516f96029be28e230dc73b70ea935121ab62ba
DIST xtensa-esp32s3-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz 51899328 BLAKE2B 9ea6e702345fe158d5bbf8c86fffa11faaa4e74f58ab0ad22ba7c2e46fe41bb06897b6e2912852564b19d773642b23ad897a9f0655eb020a354a2d98c3296d97 SHA512 54afc2a307489d719d72c1a9506b325b1152395e87fa8fa78d90b79bc827625e23f86aa104e02f78fc1f074d191b552de5c1853a52ba1ccadae93865c58f5873
diff --git a/dev-embedded/esp-idf/esp-idf-5.1.ebuild b/dev-embedded/esp-idf/esp-idf-5.1.ebuild
new file mode 100644
index 000000000..e78cefd0e
--- /dev/null
+++ b/dev-embedded/esp-idf/esp-idf-5.1.ebuild
@@ -0,0 +1,164 @@
+# 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-single-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-embedded/esptool[${PYTHON_SINGLE_USEDEP}]
+
+ $(python_gen_cond_dep '
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/bitstring[${PYTHON_USEDEP}]
+ dev-python/construct[${PYTHON_USEDEP}]
+ dev-python/ecdsa[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+ dev-python/kconfiglib[${PYTHON_USEDEP}]
+ dev-python/pyelftools[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/python-socketio[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/reedsolomon[${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"
+ "${FILESDIR}/pyparsing-${P}.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 .
+}
diff --git a/dev-embedded/esp-idf/files/pyparsing-esp-idf-5.1.patch b/dev-embedded/esp-idf/files/pyparsing-esp-idf-5.1.patch
new file mode 100644
index 000000000..bd08b43d6
--- /dev/null
+++ b/dev-embedded/esp-idf/files/pyparsing-esp-idf-5.1.patch
@@ -0,0 +1,37 @@
+commit 4020b0deb036ffa3fd01d2dac2297670f65fb7c3
+Author: radim.karnis <radim.karnis@espressif.com>
+Date: Tue Jun 20 13:16:22 2023 +0200
+
+ fix: Compatibility with pyparsing>=3.1.0
+
+diff --git a/tools/ldgen/ldgen/entity.py b/tools/ldgen/ldgen/entity.py
+index 35021a51b5..aecdcab91b 100644
+--- a/tools/ldgen/ldgen/entity.py
++++ b/tools/ldgen/ldgen/entity.py
+@@ -1,5 +1,5 @@
+ #
+-# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
++# SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
+ # SPDX-License-Identifier: Apache-2.0
+ #
+
+@@ -9,8 +9,8 @@ import os
+ from enum import Enum
+ from functools import total_ordering
+
+-from pyparsing import (Group, Literal, OneOrMore, ParseException, SkipTo, Suppress, White, Word, ZeroOrMore, alphas,
+- nums, rest_of_line)
++from pyparsing import (Group, Literal, OneOrMore, ParseException, Regex, SkipTo, Suppress, White, Word, ZeroOrMore,
++ alphas, nums, rest_of_line)
+
+
+ @total_ordering
+@@ -139,7 +139,7 @@ class EntityDB:
+
+ # 00 {section} 0000000 ...
+ # CONTENTS, ALLOC, ....
+- section_entry = (Suppress(Word(nums)) + SkipTo(' ') + Suppress(rest_of_line)
++ section_entry = (Suppress(Word(nums)) + Regex(r'\.\S+') + Suppress(rest_of_line)
+ + Suppress(ZeroOrMore(Word(alphas) + Literal(',')) + Word(alphas)))
+
+ content = Group(object_line
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: dev-embedded/esp-idf/files/, dev-embedded/esp-idf/
@ 2023-05-16 14:55 Mazunki Hoksaas
0 siblings, 0 replies; 5+ messages in thread
From: Mazunki Hoksaas @ 2023-05-16 14:55 UTC (permalink / raw
To: gentoo-commits
commit: f8a8598c201219dfba2c06ee4f814f091d5461f9
Author: Mazunki Hoksaas <rolferen <AT> gmail <DOT> com>
AuthorDate: Tue May 16 14:01:28 2023 +0000
Commit: Mazunki Hoksaas <rolferen <AT> gmail <DOT> com>
CommitDate: Tue May 16 14:48:20 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f8a8598c
dev-embedded/esp-idf: add 5.0.2
Closes: https://bugs.gentoo.org/884855
Signed-off-by: Mazunki Hoksaas <rolferen <AT> gmail.com>
dev-embedded/esp-idf/Manifest | 2 +
dev-embedded/esp-idf/esp-idf-5.0.2.ebuild | 152 +++++++++++++++++++++
.../files/allow-system-install-esp-idf-5.0.2.patch | 39 ++++++
dev-embedded/esp-idf/metadata.xml | 9 +-
4 files changed, 199 insertions(+), 3 deletions(-)
diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest
index c02384ab5..5ad2eef15 100644
--- a/dev-embedded/esp-idf/Manifest
+++ b/dev-embedded/esp-idf/Manifest
@@ -1,6 +1,8 @@
+DIST esp-idf-5.0.2.zip 1000558879 BLAKE2B 6127dfb7f78261060b4981e414fea95a4ef7162bb3da11cf53aeb6504396d9e0958044dd66ba1329e87004fd1149c41a86638b4f7a6c3a9d7236fc908961818d SHA512 c58013a5597c00c2ee1c8ae8814b18365f5949b5d834b1fccbee3dce944561d9f2c4296aad578cfc5d79fcd5f86cfa6a5024ff1472305d08ab65e6634be65f05
DIST esp-idf-5.0.zip 880574300 BLAKE2B 25afdb2e6ee28b86b2072e86ce2de713574e59195480b0be0efbe720e849120585917b393f5de77bf52a7c0245857a09e5c44db41cf96ff966d79640d9138736 SHA512 0fa438ca9afbc02a65259ae21e4957950eb3a373174bbc288b2f316b57a9384ac668ce487ae31373ff27dda85b8300e4c63ef927afce7a35380f8d2e793a4ea0
DIST openocd-esp32-linux-amd64-0.11.0-esp32-20221026.tar.gz 2051435 BLAKE2B 59fd510cf3c12514791fa85b76d81722685add64f0a690793b52c5d41101c727fefe064727b148577c3fc522ffae79e8f632d34f300a9543377027579b9cea70 SHA512 f8296460efa3d43b23a51c81a840a2e7c13272fa213770bfdb269decd23a3571be9c4ff4be6647d87e56e156284952d9a8c92b24244eaa6996fae18497ce15f8
DIST riscv32-esp-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz 110107900 BLAKE2B 70688adf6eb613f6d0a3700d5730882b7ff9dec110cbc4157c822dfe1d2abfe21f902e52c695ed410fef39f9c03dfffa3b9c7effac04464dfce4e8b0dcf88814 SHA512 cf7443e1480456fbf5d0824d4745740d8f5e5858c403e70b3931adfa582816c2e0c53c53dc51d493809d9e6780077bc1b1fae51bc146ba1b6272dc3554c1fedb
+DIST xtensa-esp-elf-gdb-11.2_20220823-x86_64-linux-gnu.tar.gz 26947336 BLAKE2B 4970451c7b61df0158294bad456a86718631d24cd73efdd4523de6afcba3f780dd54c07549effc6ab3a0838044b3eb2b817346fc11f8a5ad70f827587e65fdbc SHA512 9532d3cd3c82142c65504e641a68cd836ad1642200e4a512ade62380b149d23ddfa0dccdd339825fdf5a3c55107717a21382469bcf19103113f624a2960ca247
DIST xtensa-esp32-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz 64781328 BLAKE2B 7216df8a7a88f73f9beac705aa4a7703a8215301afb4c9ca64c9d16a2fafb574a06079d2e5288b2784e4cd3e5e8e2b3d03708e21c42bc48a30abb06199207616 SHA512 72cd2e5d3168d1ada66c53428ddec1ee47785fc9720e9c1b4aacc41021e59335a8e2d07cc14b064b1f3ea9c01bd747b7cdff69ff83e5586bf1abb4acf5986508
DIST xtensa-esp32s2-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz 51546516 BLAKE2B f4f4bc5bc138f181819416f0b3b4a67270588f827afd64693da4caf8c1a100a04787aa23cfafedb535e5c26aea7af51ad9e08316a0abba99d5549fb62e73aae5 SHA512 72071cb911eb62eff22d46b98f3ac6af87c1b0af4adc036e7f093e24987048c388a689138627ce1a721b93ef9a63a4a6046cbcc91f92e033b5330e4aacf746ea
DIST xtensa-esp32s3-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz 51899328 BLAKE2B 9ea6e702345fe158d5bbf8c86fffa11faaa4e74f58ab0ad22ba7c2e46fe41bb06897b6e2912852564b19d773642b23ad897a9f0655eb020a354a2d98c3296d97 SHA512 54afc2a307489d719d72c1a9506b325b1152395e87fa8fa78d90b79bc827625e23f86aa104e02f78fc1f074d191b552de5c1853a52ba1ccadae93865c58f5873
diff --git a/dev-embedded/esp-idf/esp-idf-5.0.2.ebuild b/dev-embedded/esp-idf/esp-idf-5.0.2.ebuild
new file mode 100644
index 000000000..2aad6eb50
--- /dev/null
+++ b/dev-embedded/esp-idf/esp-idf-5.0.2.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_11 )
+
+VER="esp-2022r1"
+
+CROSSTOOL_URL="https://github.com/espressif/crosstool-NG/releases/download/${VER}"
+
+inherit python-single-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.11.0-esp32-20221026/openocd-esp32-linux-amd64-0.11.0-esp32-20221026.tar.gz
+ https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.2_20220823/xtensa-esp-elf-gdb-11.2_20220823-x86_64-linux-gnu.tar.gz
+ ${CROSSTOOL_URL}/xtensa-esp32-elf-gcc11_2_0-${VER}-linux-amd64.tar.xz
+ ${CROSSTOOL_URL}/xtensa-esp32s2-elf-gcc11_2_0-${VER}-linux-amd64.tar.xz
+ ${CROSSTOOL_URL}/xtensa-esp32s3-elf-gcc11_2_0-${VER}-linux-amd64.tar.xz
+ ${CROSSTOOL_URL}/riscv32-esp-elf-gcc11_2_0-${VER}-linux-amd64.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-embedded/esptool[${PYTHON_SINGLE_USEDEP}]
+
+ $(python_gen_cond_dep '
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/bitstring[${PYTHON_USEDEP}]
+ dev-python/construct[${PYTHON_USEDEP}]
+ dev-python/ecdsa[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+ dev-python/kconfiglib[${PYTHON_USEDEP}]
+ dev-python/pyelftools[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/python-socketio[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/reedsolomon[${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-${P}.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\npython3.11 /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
+ fi
+
+ if use esp32s3; then
+ install_tool xtensa-esp32s3-elf
+ fi
+
+ if use riscv32; then
+ install_tool riscv32-esp-elf
+ fi
+ install_tool openocd-esp32
+ 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
+ doins -r .
+}
diff --git a/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.0.2.patch b/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.0.2.patch
new file mode 100644
index 000000000..1bd97c6f4
--- /dev/null
+++ b/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.0.2.patch
@@ -0,0 +1,39 @@
+diff --git a/tools/idf.py b/tools/idf.py
+index 10226bcfef..5f4556f71a 100755
+--- a/tools/idf.py
++++ b/tools/idf.py
+@@ -31,16 +31,12 @@ sys.dont_write_bytecode = True
+
+ import python_version_checker # noqa: E402
+
+-try:
+- from idf_py_actions.errors import FatalError # noqa: E402
+- from idf_py_actions.tools import (PROG, SHELL_COMPLETE_RUN, SHELL_COMPLETE_VAR, PropertyDict, # noqa: E402
+- debug_print_idf_version, get_target, merge_action_lists, print_warning)
+- if os.getenv('IDF_COMPONENT_MANAGER') != '0':
+- from idf_component_manager import idf_extensions
+-except ImportError:
+- # For example, importing click could cause this.
+- print('Please use idf.py only in an ESP-IDF shell environment.', file=sys.stderr)
+- sys.exit(1)
++from idf_py_actions.errors import FatalError # noqa: E402
++from idf_py_actions.tools import (PROG, SHELL_COMPLETE_RUN, SHELL_COMPLETE_VAR, PropertyDict, # noqa: E402
++ debug_print_idf_version, get_target, merge_action_lists, print_warning)
++
++if os.getenv('IDF_COMPONENT_MANAGER') != '0':
++ from idf_component_manager import idf_extensions
+
+ # Use this Python interpreter for any subprocesses we launch
+ PYTHON = sys.executable
+diff --git a/tools/idf_tools.py b/tools/idf_tools.py
+index 8a17ed224d..2103e9d60a 100755
+--- a/tools/idf_tools.py
++++ b/tools/idf_tools.py
+@@ -2113,6 +2113,7 @@ def action_install_python_env(args): # type: ignore
+
+
+ def action_check_python_dependencies(args): # type: ignore
++ return
+ use_constraints = not args.no_constraints
+ req_paths = get_requirements('') # no new features -> just detect the existing ones
+
diff --git a/dev-embedded/esp-idf/metadata.xml b/dev-embedded/esp-idf/metadata.xml
index 7cf5810e9..97ea39c78 100644
--- a/dev-embedded/esp-idf/metadata.xml
+++ b/dev-embedded/esp-idf/metadata.xml
@@ -7,8 +7,11 @@
</maintainer>
<use>
<flag name="esp32">Enable support for esp32</flag>
- <flag name="esp32s2">Enable support for esp32</flag>
- <flag name="esp32s3">Enable support for esp32</flag>
- <flag name="riscv32">Enable support for esp32</flag>
+ <flag name="esp32s2">Enable support for esp32s2</flag>
+ <flag name="esp32s3">Enable support for esp32s3</flag>
+ <flag name="riscv32">Enable support for riscv32</flag>
</use>
+ <upstream>
+ <remote-id type="github">espressif/esp-idf</remote-id>
+ </upstream>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-30 12:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 14:14 [gentoo-commits] repo/proj/guru:master commit in: dev-embedded/esp-idf/, dev-embedded/esp-idf/files/ David Roman
2023-11-20 13:39 ` [gentoo-commits] repo/proj/guru:dev commit in: dev-embedded/esp-idf/files/, dev-embedded/esp-idf/ David Roman
-- strict thread matches above, loose matches on Subject: below --
2024-07-30 12:58 David Roman
2023-07-05 13:44 David Roman
2023-05-16 14:55 Mazunki Hoksaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox