public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Roman" <davidroman96@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-embedded/esp-idf/
Date: Tue, 01 Jul 2025 13:57:05 +0000 (UTC)	[thread overview]
Message-ID: <1751286752.697953ec2572c33bbf0923a3f29427bc9b8a5ba7.davidroman@gentoo> (raw)
Message-ID: <20250701135705.LmAi0s7vukBf2v69oyhtScEWIadqb-56f_FaxPaGSjo@z> (raw)

commit:     697953ec2572c33bbf0923a3f29427bc9b8a5ba7
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Mon Jun 30 12:32:14 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Jun 30 12:32:32 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=697953ec

dev-embedded/esp-idf: add 5.4.2

Signed-off-by: David Roman <davidroman96 <AT> gmail.com>

 dev-embedded/esp-idf/Manifest             |   2 +
 dev-embedded/esp-idf/esp-idf-5.4.2.ebuild | 188 ++++++++++++++++++++++++++++++
 dev-embedded/esp-idf/metadata.xml         |   1 +
 3 files changed, 191 insertions(+)

diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest
index 925d6d4557..57c2a9154d 100644
--- a/dev-embedded/esp-idf/Manifest
+++ b/dev-embedded/esp-idf/Manifest
@@ -1,8 +1,10 @@
 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.2.zip 1368863611 BLAKE2B 222a6fb0aef3ad4a15d06c56a188879549297816fe59473135af747aae73c0e87d1b191e4ffe1b54cdca1b4d588dc57f1a8c2f39f21bf1bbd154d84ddda690af SHA512 90b5b495015adc55be740e5cc462ad5020c0d2fd33378438f0b8032927d64f931fe537384c8f95168da5550c8989fa776524cb79903352391ab46c0d0b8606e6
 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
+DIST openocd-esp32-linux-amd64-0.12.0-esp32-20250422.tar.gz 2445546 BLAKE2B 4f88b4215d2df2131c108f7acb87422462ba06cc2373e1d09dfd9fa127b9fab20dae5b1aa5b2a851c25ca903c396ae9ff5c6138831a20db3c5b3a27b9c3b39b7 SHA512 f9d70c8a8beaff8096ef5e01265ce9a17b96d9481727b72df33e86eba2e22d9fcfad865e4b7845d29b48ebb91d016b2ffffc913ef93922957719e44d2f881b36
 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_20241119-x86_64-linux-gnu.tar.xz 298069324 BLAKE2B dea43004940ef825bca79fbd5f371a3891b8de78f7c145a72aa70228df8604ee482f520efc7dca79d363d68d55f136a6064111e7ea8287b616c9b25ffa7d0ef9 SHA512 7a426fb8cf820d65f0cb1eacf71250d63916222921b90dfd4d98a8064e854cf5fabce20c138a217186df7b04cd722ec23bc86a836956e27318f163c3ed05a188
 DIST riscv32-esp-elf-gdb-14.2_20240403-x86_64-linux-gnu.tar.gz 30707431 BLAKE2B 99809fbd5abe99c4890fbf4edd964ee53bc9269b9bb15f487316d0092a9d7aae9d3f9f61f7597f5721aec4f95813908c8ce6a3f6f97cd453d1610a5caa7dc42e SHA512 1ad4854c53f435b08d634f8e5e1a9169037745684b13972876176483badc7ebf5a6c38109e7ac5c3f484df76e82bf790244661ac70b1e52dd3b2fc8a4956e5ff

diff --git a/dev-embedded/esp-idf/esp-idf-5.4.2.ebuild b/dev-embedded/esp-idf/esp-idf-5.4.2.ebuild
new file mode 100644
index 0000000000..4936ed9043
--- /dev/null
+++ b/dev-embedded/esp-idf/esp-idf-5.4.2.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+PYTHON_GDB_USE=( python_targets_python3_{11,12} )
+VER="14.2.0_20241119"
+GDB_VER="14.2_20240403"
+OPENOCD_VER="0.12.0-esp32-20250422"
+
+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}]
+	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
+	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
+
+	cat - > 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
+	doenvd 99esp-idf
+
+	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
+}

diff --git a/dev-embedded/esp-idf/metadata.xml b/dev-embedded/esp-idf/metadata.xml
index ed8aadb34c..33bb7641ba 100644
--- a/dev-embedded/esp-idf/metadata.xml
+++ b/dev-embedded/esp-idf/metadata.xml
@@ -6,6 +6,7 @@
 		<name>David Roman</name>
 	</maintainer>
 	<use>
+		<flag name="python-gdb">Enable python-dependent gdb for Xtensa and riscv32</flag>
 		<flag name="riscv32">Enable support for riscv32</flag>
 	</use>
 	<upstream>


             reply	other threads:[~2025-07-01 13:57 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-30 12:33 David Roman [this message]
2025-07-01 13:57 ` [gentoo-commits] repo/proj/guru:master commit in: dev-embedded/esp-idf/ David Roman
  -- strict thread matches above, loose matches on Subject: below --
2025-09-01 12:35 [gentoo-commits] repo/proj/guru:dev " David Roman
2025-09-01 12:35 David Roman
2025-08-25 14:07 David Roman
2025-07-22  9:51 Florian Albrechtskirchinger
2025-07-21 15:16 David Roman
2025-07-21 15:00 David Roman
2025-07-14 11:42 David Roman
2025-06-30 12:33 David Roman
2025-04-22  9:18 David Roman
2025-04-22  9:06 David Roman
2025-04-02 12:40 David Roman
2025-03-31 10:50 David Roman
2025-02-25 15:15 David Roman
2025-02-11 14:26 David Roman
2025-01-08 11:02 David Roman
2024-12-11 13:58 David Roman
2024-10-07 10:02 David Roman
2024-09-19 13:49 David Roman
2024-09-05 12:08 David Roman
2024-09-05 10:43 David Roman
2024-09-05 10:38 David Roman
2024-09-05 10:38 David Roman
2024-09-05 10:38 David Roman
2024-07-25  9:20 David Roman
2024-07-04  3:51 Lucio Sauer
2024-06-19  7:15 Florian Schmaus
2024-06-19  7:15 Florian Schmaus
2024-06-04 12:26 [gentoo-commits] repo/proj/guru:master " David Roman
2024-06-04  9:18 ` [gentoo-commits] repo/proj/guru:dev " David Roman
2024-06-04 12:26 [gentoo-commits] repo/proj/guru:master " David Roman
2024-06-04  9:18 ` [gentoo-commits] repo/proj/guru:dev " David Roman
2024-06-04  9:18 David Roman
2024-05-08 12:34 [gentoo-commits] repo/proj/guru:master " David Roman
2024-05-08 12:27 ` [gentoo-commits] repo/proj/guru:dev " David Roman
2024-04-16  7:05 Florian Schmaus
2024-04-16  7:05 Florian Schmaus
2024-03-14 10:19 [gentoo-commits] repo/proj/guru:master " David Roman
2024-03-14  9:40 ` [gentoo-commits] repo/proj/guru:dev " David Roman
2024-02-19 15:43 David Roman
2024-02-19 15:43 David Roman
2023-11-20 14:14 [gentoo-commits] repo/proj/guru:master " David Roman
2023-11-20 13:58 ` [gentoo-commits] repo/proj/guru:dev " David Roman
2023-11-20 14:14 [gentoo-commits] repo/proj/guru:master " David Roman
2023-11-20 14:05 ` [gentoo-commits] repo/proj/guru:dev " David Roman
2023-09-04 10:54 David Roman
2023-07-25 14:57 David Roman
2023-07-17 23:00 Anna Vyalkova
2023-07-05 14:49 David Roman
2023-07-05 13:44 David Roman
2022-05-28 10:17 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2022-05-28 10:17 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2022-05-25  8:24 David Roman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1751286752.697953ec2572c33bbf0923a3f29427bc9b8a5ba7.davidroman@gentoo \
    --to=davidroman96@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox