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, 25 Jul 2023 15:02:51 +0000 (UTC)	[thread overview]
Message-ID: <1690297045.c6cd59d89dbb75fcd043182ac7772982d59cb1b7.davidroman@gentoo> (raw)
Message-ID: <20230725150251.0BWVLqtLIaPTNnj-sdagIInrJ1QyV1PTNJ2i8Q-9WDc@z> (raw)

commit:     c6cd59d89dbb75fcd043182ac7772982d59cb1b7
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Tue Jul 25 14:56:40 2023 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Tue Jul 25 14:57:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c6cd59d8

dev-embedded/esp-idf: fix unresolved SONAME dependency

Closes: https://bugs.gentoo.org/884853
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>

 dev-embedded/esp-idf/esp-idf-5.1-r1.ebuild | 160 +++++++++++++++++++++++++++++
 1 file changed, 160 insertions(+)

diff --git a/dev-embedded/esp-idf/esp-idf-5.1-r1.ebuild b/dev-embedded/esp-idf/esp-idf-5.1-r1.ebuild
new file mode 100644
index 000000000..1842cc7f9
--- /dev/null
+++ b/dev-embedded/esp-idf/esp-idf-5.1-r1.ebuild
@@ -0,0 +1,160 @@
+# 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"
+	"${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 .
+}


             reply	other threads:[~2023-07-25 15:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 14:57 David Roman [this message]
2023-07-25 15:02 ` [gentoo-commits] repo/proj/guru:master commit in: dev-embedded/esp-idf/ David Roman
  -- strict thread matches above, loose matches on Subject: below --
2025-04-02 12:40 [gentoo-commits] repo/proj/guru:dev " 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 14:05 ` [gentoo-commits] repo/proj/guru:dev " 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-09-04 10:54 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=1690297045.c6cd59d89dbb75fcd043182ac7772982d59cb1b7.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