diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
| commit | bfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch) | |
| tree | 0d7a74b4463ee387f9cf9368ceb1b757f694f72a /dev-embedded | |
| parent | f716a9fe6455d39eef01e718aae68dae61c19704 (diff) | |
| download | baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip | |
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'dev-embedded')
368 files changed, 12984 insertions, 0 deletions
diff --git a/dev-embedded/arduino-builder/Manifest b/dev-embedded/arduino-builder/Manifest new file mode 100644 index 000000000000..3ede1f693c37 --- /dev/null +++ b/dev-embedded/arduino-builder/Manifest @@ -0,0 +1,2 @@ +DIST arduino-builder-1.5.4-deps.tar.xz 137397880 BLAKE2B 42232892533289966399b5c6664b624eb7b38fddfe99a77a0f05dd41adbf34d51d3876d8d6914a4c0f7544412a781a91da1a2b03eade8be390cb09b31eea2ee7 SHA512 308623c6ea6884e815fb8efe492a42d4154761bf5b3672c1aeaeefc52034d09bf4af487626dcc5c83efc8fcf2c292c8629f825e9ddb4bb423c74717f7632975e +DIST arduino-builder-1.5.4.tar.gz 38550 BLAKE2B 0dcf6097be6b42e52a74e8feeaa44f54c77a780a8fd0a2d046342b160d3eb6ef586e8b98c3058f11693991883acc83e3fd68f381cdab13c5fac410b2b0b8a27e SHA512 a5d117018e9eb3587564cfe49bbee95ac93eef742ce21ca49e4f1037b51fd64f1f2ffbac6fed282dfc79f307d6499222fab94f6c5472030cbb2a134fc553ea00 diff --git a/dev-embedded/arduino-builder/arduino-builder-1.5.4-r2.ebuild b/dev-embedded/arduino-builder/arduino-builder-1.5.4-r2.ebuild new file mode 100644 index 000000000000..bb44b353760f --- /dev/null +++ b/dev-embedded/arduino-builder/arduino-builder-1.5.4-r2.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module + +DESCRIPTION="A command line tool for compiling Arduino sketches" +HOMEPAGE="https://github.com/arduino/arduino-builder" +SRC_URI="https://github.com/arduino/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + +LICENSE="GPL-2+" +LICENSE+=" Apache-2.0 BSD BSD-2 GPL-3 LGPL-2.1 MIT MPL-2.0" +SLOT="0" +KEYWORDS="amd64 x86" + +RDEPEND="sys-devel/crossdev + dev-embedded/avrdude + dev-embedded/arduino-ctags" + +src_compile() { + GOBIN="${S}"/bin go install . || die +} + +src_install() { + dobin bin/arduino-builder + # In addition to the binary, we also want to install these two files below. They are needed by + # the dev-embedded/arduino which copies those files in its "hardware" folder. + insinto "/usr/share/${PN}" + doins hardware/platform.keys.rewrite.txt + doins "${FILESDIR}/platform.txt" +} + +pkg_postinst() { + [ ! -x /usr/bin/avr-gcc ] && ewarn "Missing avr-gcc; you need to crossdev -s4 avr" +} diff --git a/dev-embedded/arduino-builder/files/platform.txt b/dev-embedded/arduino-builder/files/platform.txt new file mode 100644 index 000000000000..2bdd70c789fd --- /dev/null +++ b/dev-embedded/arduino-builder/files/platform.txt @@ -0,0 +1,19 @@ +# arduino-preprocessor +# -------------------- + +tools.arduino-preprocessor.path={runtime.tools.arduino-preprocessor.path} +tools.arduino-preprocessor.cmd.path={path}/arduino-preprocessor +tools.arduino-preprocessor.pattern="{cmd.path}" "{source_file}" "{codecomplete}" -- -std=gnu++11 + +# ctags +# ------------------------------ +tools.ctags.path=/usr/bin +tools.ctags.cmd.path={path}/arduino-ctags +tools.ctags.pattern="{cmd.path}" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "{source_file}" + +# additional entries +tools.avrdude.path=/usr/bin + +preproc.macros.flags=-w -x c++ -E -CC +#preproc.macros.compatibility_flags={build.mbed_api_include} {build.nRF51822_api_include} {build.ble_api_include} {compiler.libsam.c.flags} {compiler.arm.cmsis.path} {build.variant_system_include} +#recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} {preproc.macros.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {preproc.macros.compatibility_flags} {includes} "{source_file}" -o "{preprocessed_file_path}" diff --git a/dev-embedded/arduino-builder/metadata.xml b/dev-embedded/arduino-builder/metadata.xml new file mode 100644 index 000000000000..2db6367254f9 --- /dev/null +++ b/dev-embedded/arduino-builder/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="github">arduino/arduino-builder</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/arduino-cli/Manifest b/dev-embedded/arduino-cli/Manifest new file mode 100644 index 000000000000..b0b003716753 --- /dev/null +++ b/dev-embedded/arduino-cli/Manifest @@ -0,0 +1,6 @@ +DIST arduino-cli-1.0.4-vendor.tar.xz 3090184 BLAKE2B 31252bdea3ecffb1e7ea82274b93707663e68c72758b4ee6f933ac2f58436cff6957fac67949dd3938d03ccc7437cf455ea7699142755d64fc3f0700d331ae23 SHA512 12aed3b4006ee9f96fa94cd1788aaa49995e4a66ea46814df9e37dfefe1a326233d18bd6ce4da7d564deb742c08db94fb833dc8f4111bdbeed191d7aa32b0491 +DIST arduino-cli-1.0.4.tar.gz 10052105 BLAKE2B bbf1a3b8cdee533cd82d5f2019b0200e6c2386e7839abb857f323367d95f993d8d5c11a10e331afa37ee912b615d16de1c48718e3f36368f8ef70e9acd915618 SHA512 a7029ff6a623a60b791943c26ac7bf90bf95a8d4e1ef2b6091339f47fa52683649e852fc206606eb324bf4fd617e5bba3f0cc8901d5cf82ebd907e7e7b9cbcc2 +DIST arduino-cli-1.1.1-vendor.tar.xz 3125648 BLAKE2B 0300db72042a1b699839a3d4ff9824ce460f9063bd7f03518edb0df5129fda549e2c7c385ed1d6438c7473e0473853549876c21c82601ba403a04914eef33cca SHA512 201da343811d6986f71929b8ebfd1a028788466afe99545707da7d7ca234a763e87332ec365a9be74837c6dca333fc747bdd452428abb3bfad4857726e60f16b +DIST arduino-cli-1.1.1.tar.gz 10136198 BLAKE2B 327441d5003aa215491429ac465de274bb20af925a4f080aa1a4cbd1189c3d1c4952196108780dd3981cb6305964b8051fcbbe76c6a1580a8924a30f9254ba42 SHA512 0ecca837e6c9e97e7314f5839a041e073d07e61df630328f6f1e960c7ac089b4850787c6bad910df946be6bd6d18612ac8c6ca0e4b4fcac29d90783cc5cc2b9e +DIST arduino-cli-1.3.1-vendor.tar.xz 2919532 BLAKE2B cabcc79d188fd16df762fbc4b0d377ceff6335fc54241193407b4266a8613d8f223dcc526bb62e0a2c226dfae291d87cc26f25adbae84ba3370fb724a6eefa45 SHA512 8437ea81931ae620a576d3305eab8900b4a9aab1e9fc0a5ca4aa57002f658452f7ead5d67a2afb50109f101fdeee6601db1b92d8c55c7c81b15c40dfc76490a5 +DIST arduino-cli-1.3.1.tar.gz 10986096 BLAKE2B 736ae0b0376698966c86b2cd0f57884351a6b3b3ff8fb2b9313c6114039d604540b51f98d5df0f740009de958de3dcc506703743d9f5ec8ff8603b8b18b93c34 SHA512 250074438a8bc5f86698bbbae5565c987ba724bdc9841b469677ff763afc47180180e3a2fb6bc095a8550c60b30bd1841c0f098b24957911b67a2027e57cb55e diff --git a/dev-embedded/arduino-cli/arduino-cli-1.0.4.ebuild b/dev-embedded/arduino-cli/arduino-cli-1.0.4.ebuild new file mode 100644 index 000000000000..930bc95067db --- /dev/null +++ b/dev-embedded/arduino-cli/arduino-cli-1.0.4.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module + +DESCRIPTION="Next-generation arduino command line tool" +HOMEPAGE="https://arduino.github.io/arduino-cli/latest/" + +SRC_URI=" + https://github.com/arduino/arduino-cli/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://pkg.artemis.sh/gentoo/pkg-deps/dev-embedded/arduino-cli/${P}-vendor.tar.xz +" + +LICENSE="Apache-2.0 BSD BSD-2 GPL-2 GPL-3 LGPL-3 MIT MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64" + +src_compile() { + ego build -tags xversion \ + -ldflags "-X github.com/arduino/arduino-cli/version.versionString=${PV}" +} + +src_install() { + dobin arduino-cli +} diff --git a/dev-embedded/arduino-cli/arduino-cli-1.1.1.ebuild b/dev-embedded/arduino-cli/arduino-cli-1.1.1.ebuild new file mode 100644 index 000000000000..930bc95067db --- /dev/null +++ b/dev-embedded/arduino-cli/arduino-cli-1.1.1.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module + +DESCRIPTION="Next-generation arduino command line tool" +HOMEPAGE="https://arduino.github.io/arduino-cli/latest/" + +SRC_URI=" + https://github.com/arduino/arduino-cli/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://pkg.artemis.sh/gentoo/pkg-deps/dev-embedded/arduino-cli/${P}-vendor.tar.xz +" + +LICENSE="Apache-2.0 BSD BSD-2 GPL-2 GPL-3 LGPL-3 MIT MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64" + +src_compile() { + ego build -tags xversion \ + -ldflags "-X github.com/arduino/arduino-cli/version.versionString=${PV}" +} + +src_install() { + dobin arduino-cli +} diff --git a/dev-embedded/arduino-cli/arduino-cli-1.3.1.ebuild b/dev-embedded/arduino-cli/arduino-cli-1.3.1.ebuild new file mode 100644 index 000000000000..18c2ed023d1c --- /dev/null +++ b/dev-embedded/arduino-cli/arduino-cli-1.3.1.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module + +DESCRIPTION="Next-generation arduino command line tool" +HOMEPAGE="https://arduino.github.io/arduino-cli/latest/" + +SRC_URI=" + https://github.com/arduino/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/gentoo-golang-dist/${PN}/releases/download/v${PV}/${P}-vendor.tar.xz +" + +LICENSE="Apache-2.0 BSD BSD-2 GPL-2 GPL-3 LGPL-3 MIT MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64" + +src_compile() { + ego build -tags xversion \ + -ldflags "-X github.com/arduino/arduino-cli/version.versionString=${PV}" +} + +src_install() { + dobin arduino-cli +} diff --git a/dev-embedded/arduino-cli/metadata.xml b/dev-embedded/arduino-cli/metadata.xml new file mode 100644 index 000000000000..1b5d10e9b751 --- /dev/null +++ b/dev-embedded/arduino-cli/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>artemis@artemis.sh</email> + <description>Primary maintainer</description> + <name>Artemis Everfree</name> + </maintainer> + <upstream> + <remote-id type="github">arduino/arduino-cli</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/arduino-ctags/Manifest b/dev-embedded/arduino-ctags/Manifest new file mode 100644 index 000000000000..8398798df86e --- /dev/null +++ b/dev-embedded/arduino-ctags/Manifest @@ -0,0 +1 @@ +DIST arduino-ctags-20161123.tar.gz 490200 BLAKE2B f51b18a0db420124c5fed2b320c16d9eeb96fce6d0f118cf43a8177f88400daaeb83437c3993353c16b73781961c7476e782e66891582f4b3dc5301c73da64dc SHA512 ae5bde92c3dd0b9a179bc1df998f20312c4ab8b2c9c1840dbe543d23fb4531b9e5524f1399d9922ed9b2de4582bdb74635f7ec576a42c808d152c3fbb84f9687 diff --git a/dev-embedded/arduino-ctags/arduino-ctags-20161123-r2.ebuild b/dev-embedded/arduino-ctags/arduino-ctags-20161123-r2.ebuild new file mode 100644 index 000000000000..77e78545e384 --- /dev/null +++ b/dev-embedded/arduino-ctags/arduino-ctags-20161123-r2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +MY_COMMIT_HASH="abc8fca7499f44c725122881cd380a88c37abe0e" +DESCRIPTION="Arduino private fork of dev-util/ctags" +HOMEPAGE="https://github.com/arduino/ctags" +SRC_URI="https://github.com/arduino/ctags/archive/${COMMITHASH}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/ctags-${MY_COMMIT_HASH}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +PATCHES=( + "${FILESDIR}"/${PN}-20161123-gcc-unused-attribute.patch + "${FILESDIR}"/${PN}-20161123-implicit-exit.patch + "${FILESDIR}"/${PN}-20161123-implicit-int.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --disable-readlib \ + --disable-etags \ + --enable-tmpdir="${EPREFIX}"/tmp +} + +src_install() { + # This package compiles into a "ctags" executable, but don't want to clash into + # actually legitimate ctags implementations. + mv ctags arduino-ctags + dobin arduino-ctags +} diff --git a/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-gcc-unused-attribute.patch b/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-gcc-unused-attribute.patch new file mode 100644 index 000000000000..96cfb4aa8347 --- /dev/null +++ b/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-gcc-unused-attribute.patch @@ -0,0 +1,236 @@ +https://bugs.gentoo.org/828550 + +Thanks-to: <s.zharkoff@gmail.com> +--- a/eiffel.c ++++ b/eiffel.c +@@ -807,7 +807,7 @@ + + static boolean parseType (tokenInfo *const token); + +-static void parseGeneric (tokenInfo *const token, boolean declaration __unused__) ++static void parseGeneric (tokenInfo *const token, boolean declaration __arduino_unused__) + { + unsigned int depth = 0; + #ifdef TYPE_REFERENCE_TOOL +--- a/general.h ++++ b/general.h +@@ -57,7 +57,7 @@ + * to prevent warnings about unused variables. + */ + #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !defined (__GNUG__) +-# define __unused__ __attribute__((unused)) ++# define __arduino_unused__ __attribute__ ((__unused__)) + # define __printf__(s,f) __attribute__((format (printf, s, f))) + #else + # define __unused__ +--- a/lregex.c ++++ b/lregex.c +@@ -538,11 +538,11 @@ + #endif /* HAVE_REGEX */ + + extern void addTagRegex ( +- const langType language __unused__, +- const char* const regex __unused__, +- const char* const name __unused__, +- const char* const kinds __unused__, +- const char* const flags __unused__) ++ const langType language __arduino_unused__, ++ const char* const regex __arduino_unused__, ++ const char* const name __arduino_unused__, ++ const char* const kinds __arduino_unused__, ++ const char* const flags __arduino_unused__) + { + #ifdef HAVE_REGEX + Assert (regex != NULL); +@@ -564,10 +564,10 @@ + } + + extern void addCallbackRegex ( +- const langType language __unused__, +- const char* const regex __unused__, +- const char* const flags __unused__, +- const regexCallback callback __unused__) ++ const langType language __arduino_unused__, ++ const char* const regex __arduino_unused__, ++ const char* const flags __arduino_unused__, ++ const regexCallback callback __arduino_unused__) + { + #ifdef HAVE_REGEX + Assert (regex != NULL); +@@ -581,7 +581,7 @@ + } + + extern void addLanguageRegex ( +- const langType language __unused__, const char* const regex __unused__) ++ const langType language __arduino_unused__, const char* const regex __arduino_unused__) + { + #ifdef HAVE_REGEX + if (! regexBroken) +@@ -602,7 +602,7 @@ + */ + + extern boolean processRegexOption (const char *const option, +- const char *const parameter __unused__) ++ const char *const parameter __arduino_unused__) + { + boolean handled = FALSE; + const char* const dash = strchr (option, '-'); +@@ -624,7 +624,7 @@ + return handled; + } + +-extern void disableRegexKinds (const langType language __unused__) ++extern void disableRegexKinds (const langType language __arduino_unused__) + { + #ifdef HAVE_REGEX + if (language <= SetUpper && Sets [language].count > 0) +@@ -639,8 +639,8 @@ + } + + extern boolean enableRegexKind ( +- const langType language __unused__, +- const int kind __unused__, const boolean mode __unused__) ++ const langType language __arduino_unused__, ++ const int kind __arduino_unused__, const boolean mode __arduino_unused__) + { + boolean result = FALSE; + #ifdef HAVE_REGEX +@@ -660,7 +660,7 @@ + return result; + } + +-extern void printRegexKinds (const langType language __unused__, boolean indent __unused__) ++extern void printRegexKinds (const langType language __arduino_unused__, boolean indent __arduino_unused__) + { + #ifdef HAVE_REGEX + if (language <= SetUpper && Sets [language].count > 0) +--- a/lua.c ++++ b/lua.c +@@ -37,7 +37,7 @@ + */ + + /* for debugging purposes */ +-static void __unused__ print_string (char *p, char *q) ++static void __arduino_unused__ print_string (char *p, char *q) + { + for ( ; p != q; p++) + fprintf (errout, "%c", *p); +--- a/main.c ++++ b/main.c +@@ -522,7 +522,7 @@ + * Start up code + */ + +-extern int main (int __unused__ argc, char **argv) ++extern int main (int __arduino_unused__ argc, char **argv) + { + cookedArgs *args; + #ifdef VMS +--- a/options.c ++++ b/options.c +@@ -731,7 +731,7 @@ + } + + static void processExcludeOption ( +- const char *const option __unused__, const char *const parameter) ++ const char *const option __arduino_unused__, const char *const parameter) + { + const char *const fileName = parameter + 1; + if (parameter [0] == '\0') +@@ -869,7 +869,7 @@ + } + + static void processFilterTerminatorOption ( +- const char *const option __unused__, const char *const parameter) ++ const char *const option __arduino_unused__, const char *const parameter) + { + freeString (&Option.filterTerminator); + Option.filterTerminator = stringCopy (parameter); +@@ -932,8 +932,8 @@ + } + + static void processHelpOption ( +- const char *const option __unused__, +- const char *const parameter __unused__) ++ const char *const option __arduino_unused__, ++ const char *const parameter __arduino_unused__) + { + printProgramIdentification (); + putchar ('\n'); +@@ -1141,8 +1141,8 @@ + } + + static void processLicenseOption ( +- const char *const option __unused__, +- const char *const parameter __unused__) ++ const char *const option __arduino_unused__, ++ const char *const parameter __arduino_unused__) + { + printProgramIdentification (); + puts (""); +@@ -1168,8 +1168,8 @@ + } + + static void processListMapsOption ( +- const char *const __unused__ option, +- const char *const __unused__ parameter) ++ const char *const __arduino_unused__ option, ++ const char *const __arduino_unused__ parameter) + { + if (parameter [0] == '\0' || strcasecmp (parameter, "all") == 0) + printLanguageMaps (LANG_AUTO); +@@ -1185,8 +1185,8 @@ + } + + static void processListLanguagesOption ( +- const char *const option __unused__, +- const char *const parameter __unused__) ++ const char *const option __arduino_unused__, ++ const char *const parameter __arduino_unused__) + { + printLanguageList (); + exit (0); +@@ -1360,8 +1360,8 @@ + } + + static void processVersionOption ( +- const char *const option __unused__, +- const char *const parameter __unused__) ++ const char *const option __arduino_unused__, ++ const char *const parameter __arduino_unused__) + { + printProgramIdentification (); + exit (0); +--- a/parse.c ++++ b/parse.c +@@ -376,7 +376,7 @@ + */ + + extern void processLanguageDefineOption ( +- const char *const option, const char *const parameter __unused__) ++ const char *const option, const char *const parameter __arduino_unused__) + { + #ifdef HAVE_REGEX + if (parameter [0] == '\0') +--- a/python.c ++++ b/python.c +@@ -135,7 +135,7 @@ + * extract all relevant information and create a tag. + */ + static void makeFunctionTag (vString *const function, +- vString *const parent, int is_class_parent, const char *arglist __unused__) ++ vString *const parent, int is_class_parent, const char *arglist __arduino_unused__) + { + tagEntryInfo tag; + initTagEntry (&tag, vStringValue (function)); +--- a/routines.c ++++ b/routines.c +@@ -526,7 +526,7 @@ static boolean isPathSeparator (const int c) + + #if ! defined (HAVE_STAT_ST_INO) + +-static void canonicalizePath (char *const path __unused__) ++static void canonicalizePath (char *const path __arduino_unused__) + { + #if defined (MSDOS_STYLE_PATH) + char *p; diff --git a/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-implicit-exit.patch b/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-implicit-exit.patch new file mode 100644 index 000000000000..c14555ca503b --- /dev/null +++ b/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-implicit-exit.patch @@ -0,0 +1,21 @@ +diff '--color=auto' -ruN ctags-abc8fca7499f44c725122881cd380a88c37abe0e.orig/configure.ac ctags-abc8fca7499f44c725122881cd380a88c37abe0e/configure.ac +--- ctags-abc8fca7499f44c725122881cd380a88c37abe0e.orig/configure.ac 2016-11-23 10:52:52.000000000 +0100 ++++ ctags-abc8fca7499f44c725122881cd380a88c37abe0e/configure.ac 2024-11-05 00:53:01.050413525 +0100 +@@ -369,7 +369,8 @@ + AC_EXEEXT + + AC_MSG_CHECKING(if struct stat contains st_ino) +-AC_TRY_COMPILE([#include <sys/stat.h>], [ ++AC_TRY_COMPILE([#include <sys/stat.h> ++#include <stdlib.h>], [ + struct stat st; + stat(".", &st); + if (st.st_ino > 0) +@@ -449,6 +450,7 @@ + AC_TRY_RUN([ + #include <sys/types.h> + #include <regex.h> ++#include <stdlib.h> + main() { + regex_t patbuf; + exit (regcomp (&patbuf, "/hello/", 0) != 0); diff --git a/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-implicit-int.patch b/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-implicit-int.patch new file mode 100644 index 000000000000..5331df9db0d0 --- /dev/null +++ b/dev-embedded/arduino-ctags/files/arduino-ctags-20161123-implicit-int.patch @@ -0,0 +1,12 @@ +diff '--color=auto' -ruN ctags-abc8fca7499f44c725122881cd380a88c37abe0e.orig/configure.ac ctags-abc8fca7499f44c725122881cd380a88c37abe0e/configure.ac +--- ctags-abc8fca7499f44c725122881cd380a88c37abe0e.orig/configure.ac 2024-11-05 00:55:57.281788938 +0100 ++++ ctags-abc8fca7499f44c725122881cd380a88c37abe0e/configure.ac 2024-11-05 00:59:21.852536947 +0100 +@@ -451,7 +451,7 @@ + #include <sys/types.h> + #include <regex.h> + #include <stdlib.h> +-main() { ++int main() { + regex_t patbuf; + exit (regcomp (&patbuf, "/hello/", 0) != 0); + }],regcomp_works=yes,regcomp_works=no,AC_DEFINE(CHECK_REGCOMP)) diff --git a/dev-embedded/arduino-ctags/metadata.xml b/dev-embedded/arduino-ctags/metadata.xml new file mode 100644 index 000000000000..88b2b98ed8a1 --- /dev/null +++ b/dev-embedded/arduino-ctags/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="github">arduino/ctags</remote-id> + </upstream> + <longdescription> + Arduino's build process includes a preprocessing phase that involves ctags, + but not any version of ctags, *Arduino's* ctags, a private fork that + Arduino maintains. We can't use <pkg>dev-util/ctags</pkg> because it causes Arduino + to produce corrupt executables. + </longdescription> +</pkgmetadata> diff --git a/dev-embedded/arduino-ide/Manifest b/dev-embedded/arduino-ide/Manifest new file mode 100644 index 000000000000..b5047b741cb3 --- /dev/null +++ b/dev-embedded/arduino-ide/Manifest @@ -0,0 +1 @@ +DIST arduino-ide_2.3.8_Linux_64bit.zip 201571331 BLAKE2B 90642f1ce4074cca88a6f7e70a1a81df7bc3749d976ee1e9e1187d63a5c627c232a46c7b3572cf50ace05483839ef53b783768d3f58dafc1de62f912a203d29d SHA512 877c2a84b377b85754c51f90a48d4e356789bc35f9c5e5333cb8799068728d4a7e743afdb072f4b6d7a39febd1e73b03b7d944c71d38a36c47ff931ba2bd85da diff --git a/dev-embedded/arduino-ide/arduino-ide-2.3.8-r1.ebuild b/dev-embedded/arduino-ide/arduino-ide-2.3.8-r1.ebuild new file mode 100644 index 000000000000..e58a23a10aab --- /dev/null +++ b/dev-embedded/arduino-ide/arduino-ide-2.3.8-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop xdg + +DESCRIPTION="Arduino IDE 2.x - A modern open-source IDE for Arduino development" +HOMEPAGE="https://www.arduino.cc/en/software https://github.com/arduino/arduino-ide" + +SRC_URI="https://github.com/arduino/arduino-ide/releases/download/${PV}/arduino-ide_${PV}_Linux_64bit.zip" +S="${WORKDIR}" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="-* ~amd64" +IUSE="egl wayland" +RESTRICT="mirror strip bindist" + +RDEPEND=" + || ( + sys-apps/systemd + sys-apps/systemd-utils + ) + >=app-accessibility/at-spi2-core-2.46.0:2 + app-crypt/libsecret[crypt] + app-misc/ca-certificates + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + media-libs/alsa-lib + media-libs/libglvnd + media-libs/mesa + net-misc/curl + net-print/cups + sys-apps/dbus + virtual/zlib + sys-process/lsof + x11-libs/cairo + x11-libs/gtk+:3 + x11-libs/libdrm + x11-libs/libX11 + x11-libs/libxcb + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libxkbcommon + x11-libs/libxkbfile + x11-libs/libXrandr + x11-libs/libXScrnSaver + x11-libs/pango + x11-misc/xdg-utils +" + +BDEPEND="app-arch/unzip" + +QA_PREBUILT="*" + +src_install() { + # Install application files + mkdir -p "${ED}/opt/${PN}" || die + cp -r "${S}/arduino-ide_${PV}_Linux_64bit/"* "${ED}/opt/${PN}" || die + + # Drop cortex-debug precompiled native modules: cross-arch arm/arm64 + # variants never run on amd64, and the x64 variant links against + # libnode.so.72 which Electron does not ship. Cortex-debug falls back + # to non-native GDB driving when the modules are absent. + rm -rf "${ED}/opt/${PN}/resources/app/plugins/cortex-debug/extension/binary_modules" || die + + # Fix chrome-sandbox permissions + fperms 4755 /opt/${PN}/chrome-sandbox + + # Create symlink for the main executable + dosym ../../opt/${PN}/arduino-ide /usr/bin/arduino-ide + + # Build exec flags based on USE flags + local EXEC_EXTRA_FLAGS=() + if use wayland; then + EXEC_EXTRA_FLAGS+=( "--ozone-platform-hint=auto" "--enable-wayland-ime" "--wayland-text-input-version=3" ) + fi + if use egl; then + EXEC_EXTRA_FLAGS+=( "--use-gl=egl" ) + fi + + # Install desktop file with proper exec flags + sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \ + "${FILESDIR}/${PN}.desktop" \ + > "${T}/${PN}.desktop" || die + domenu "${T}/${PN}.desktop" + + # Install icon + newicon "${ED}/opt/${PN}/resources/app/resources/icons/512x512.png" "${PN}.png" +} + +pkg_postinst() { + xdg_pkg_postinst + elog "Arduino IDE 2.x has been installed to /opt/${PN}" + elog "You can start it by running 'arduino-ide' from the command line" + elog "or by selecting it from your application menu." + elog "" + elog "Note: Arduino IDE 2.x is a completely new application based on" + elog "Eclipse Theia, and can coexist with the classic Arduino IDE 1.x." +} diff --git a/dev-embedded/arduino-ide/files/arduino-ide.desktop b/dev-embedded/arduino-ide/files/arduino-ide.desktop new file mode 100644 index 000000000000..2b58fe1978ca --- /dev/null +++ b/dev-embedded/arduino-ide/files/arduino-ide.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Arduino IDE +Comment=Arduino IDE 2.x - Open-source electronics prototyping platform +GenericName=Arduino IDE +Exec=/usr/bin/arduino-ide @exec_extra_flags@ %U +Icon=arduino-ide +Type=Application +StartupNotify=true +StartupWMClass=Arduino IDE +Categories=Development;IDE;Electronics; +MimeType=text/x-arduino; +Keywords=arduino;electronics;microcontroller;embedded; diff --git a/dev-embedded/arduino-ide/metadata.xml b/dev-embedded/arduino-ide/metadata.xml new file mode 100644 index 000000000000..1cfadb831a2b --- /dev/null +++ b/dev-embedded/arduino-ide/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>vowstar@gmail.com</email> + <name>Huang Rui</name> + </maintainer> + <upstream> + <remote-id type="github">arduino/arduino-ide</remote-id> + </upstream> + <longdescription lang="en"> + Arduino IDE 2.x is a modern, open-source IDE for Arduino development. + Based on the Eclipse Theia framework, it provides features like + autocompletion, code navigation, live debugger, and a unified interface + for managing libraries and boards. + </longdescription> + <longdescription lang="zh"> + Arduino IDE 2.x 是用于 Arduino 开发的现代开源集成开发环境。 + 基于 Eclipse Theia 框架构建,提供自动补全、代码导航、实时调试器 + 以及统一的库和开发板管理界面等功能。 + </longdescription> +</pkgmetadata> diff --git a/dev-embedded/arduino-listserialportsc/Manifest b/dev-embedded/arduino-listserialportsc/Manifest new file mode 100644 index 000000000000..e143d2e98903 --- /dev/null +++ b/dev-embedded/arduino-listserialportsc/Manifest @@ -0,0 +1 @@ +DIST arduino-listserialportsc-1.4.0.tar.gz 5448 BLAKE2B a1b5256c9e9ece7ec4de8b1481b6e20769fe07fd94b73d099922074ff20d251896d992aba1e3680dc7e667ff2897fec05812a07273efe097cf5387a5f0207554 SHA512 0e8bbf1e49fa8705a6d3c28b44043f8d13589b7ebdac245db79ed3826bf56028778fdf721af3cf756cc8ea19e7a2f7e5f19421a105211cf0cd35041ec718c2bb diff --git a/dev-embedded/arduino-listserialportsc/arduino-listserialportsc-1.4.0-r1.ebuild b/dev-embedded/arduino-listserialportsc/arduino-listserialportsc-1.4.0-r1.ebuild new file mode 100644 index 000000000000..78222b7860f6 --- /dev/null +++ b/dev-embedded/arduino-listserialportsc/arduino-listserialportsc-1.4.0-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit java-pkg-2 toolchain-funcs + +DESCRIPTION="Arduino helper library to list serial ports" +HOMEPAGE="https://github.com/arduino/listSerialPortsC" +SRC_URI="https://github.com/arduino/listSerialPortsC/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/listSerialPortsC-${PV}" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="amd64 x86" + +COMMON_DEPEND=">=dev-libs/libserialport-0.1.1" +DEPEND="${COMMON_DEPEND} + >=virtual/jdk-1.8:*" +RDEPEND="${COMMON_DEPEND} + >=virtual/jre-1.8:*" + +src_compile() { + $(tc-getCC) -O2 -Wall ${CPPFLAGS} ${CFLAGS} -c -o main.o main.c || die + + $(tc-getCC) ${CFLAGS} ${LDFLAGS} main.o -lserialport -o listSerialC || die + + $(tc-getCC) \ + -O2 -Wall ${CPPFLAGS} ${CFLAGS} -fPIC \ + -I$(java-config-2 -o)/include \ + -I$(java-config-2 -o)/include/linux \ + -o jnilib.o -c jnilib.c || die + + $(tc-getCC) \ + ${CFLAGS} ${LDFLAGS} \ + -shared -Wl,-soname,liblistSerialsj.so \ + jnilib.o -lserialport -o liblistSerialsj.so.${PV} || die +} + +src_install() { + dobin listSerialC + dolib.so liblistSerialsj.so.${PV} + dosym liblistSerialsj.so.${PV} /usr/$(get_libdir)/liblistSerialsj.so +} diff --git a/dev-embedded/arduino-listserialportsc/metadata.xml b/dev-embedded/arduino-listserialportsc/metadata.xml new file mode 100644 index 000000000000..40151337eaf6 --- /dev/null +++ b/dev-embedded/arduino-listserialportsc/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="github">arduino/listSerialPortsC</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/arduino/Manifest b/dev-embedded/arduino/Manifest new file mode 100644 index 000000000000..2c5e7ecab1bf --- /dev/null +++ b/dev-embedded/arduino/Manifest @@ -0,0 +1,4 @@ +DIST arduino-1.8.19.tar.gz 34715155 BLAKE2B d0bb23548db5b5c402e418f85339c1ace9a21306f5866bd4923edabd188e9e8e273227927d2f45ce50cdc1ee7bb59dfa4d62b027ee0f723d5948ec9ba77c0d50 SHA512 65db7aec67d6bbb96eea83d60608dd4c138ff1f9dd3c02259f3ffa0ce51f59a9a073a1ddb48acc0208477ece92ec79b5a6a87b445110f59e698990d61300bbf9 +DIST arduino-WiFi101-Updater-ArduinoIDE-Plugin-0.12.0.zip 21873817 BLAKE2B ef2ee6291c452b58b990594a1cbae0daf86e1b6078b51225a7253d782554648610d39c2761ed67914e54a757d1345c7de4c8a63fbe12483f0134c21eac5dc303 SHA512 17e2d07fbdca491a8d80abb6f2ceb000c68af59b755da7db70dce2d5f781204340f43365c40e641acf0b084b2073b3b056f63d68990f405adefb76887f4c5b72 +DIST arduino-avr-1.8.3.tar.bz2 4941548 BLAKE2B 48d84a30f3ccf1074df6ec006ccc58d702a572dee51cff1753121055d660ad6cea4176e74488af93227a9eeea4d3a9c0c0856711ebded26ee14a755fb519dd6f SHA512 c8a63ad79f16c380def83b1215762f5cbddfc51480d658853370c3210724bb04627272f3affc0ad01af4463a68980665a4e1c37cc8fabcec16e97c4550d1bb03 +DIST arduino-examples-1.9.1.zip 4810227 BLAKE2B 0781ecb330adc444e660f6db89533dfb01995ec87dec7b5f55e28e65bfaf7f505aa79362f5815193ea6500cb1d6a16a86d5f300acf70fc4eaff0265c2891d371 SHA512 c0e21dd374b2751a1e5f2b790202d4883879da2e26e9a23ccbaec478647e2b8160cbc085e76888deafc05b9b14b1aff4ce2a9b834a7b83e8226c3bc41801015c diff --git a/dev-embedded/arduino/arduino-1.8.19-r1.ebuild b/dev-embedded/arduino/arduino-1.8.19-r1.ebuild new file mode 100644 index 000000000000..63ed48d1684d --- /dev/null +++ b/dev-embedded/arduino/arduino-1.8.19-r1.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit java-pkg-2 desktop xdg + +DESCRIPTION="An open-source AVR electronics prototyping platform" +HOMEPAGE="https://www.arduino.cc/ https://github.com/arduino/" + +AVR_VERSION="1.8.3" +EXAMPLES_VERSION="1.9.1" +PLUGIN_VERSION="0.12.0" + +SRC_URI="https://github.com/arduino/Arduino/archive/${PV}.tar.gz -> ${P}.tar.gz + https://downloads.arduino.cc/cores/avr-${AVR_VERSION}.tar.bz2 -> ${PN}-avr-${AVR_VERSION}.tar.bz2 + https://github.com/arduino/arduino-examples/archive/refs/tags/${EXAMPLES_VERSION}.zip -> ${PN}-examples-${EXAMPLES_VERSION}.zip + https://github.com/arduino/WiFi101-FirmwareUpdater-Plugin/releases/download/v${PLUGIN_VERSION}/WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip -> ${PN}-WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip + " +S="${WORKDIR}/Arduino-${PV}" + +LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0" +SLOT="0" +KEYWORDS="amd64" + +BDEPEND=">=dev-java/ant-1.10.14-r3:0" +CDEPEND="dev-embedded/arduino-builder" + +RDEPEND="${CDEPEND} + >=dev-util/astyle-3.1[java] + dev-embedded/arduino-listserialportsc + >=virtual/jre-1.8" + +DEPEND="${CDEPEND} + app-arch/unzip + >=virtual/jdk-1.8" + +EANT_BUILD_TARGET="build" +# don't run the default "javadoc" target, we don't have one. +EANT_DOC_TARGET="" + +RESTRICT="strip" +QA_PREBUILT="usr/share/arduino/hardware/arduino/avr/firmwares/*" + +PATCHES=( + # We need to load system astyle/listserialportsc instead of bundled ones. + "${FILESDIR}/${PN}-1.8.5-lib-loading.patch" +) + +src_unpack() { + # We don't want to unpack tools, just move zip files into the work dir + local a=( ${A} ) + unpack "${a[0]}" + + cp "${DISTDIR}/${PN}-avr-${AVR_VERSION}.tar.bz2" "${S}/build/avr-${AVR_VERSION}.tar.bz2" || die + cp "${DISTDIR}/${PN}-examples-${EXAMPLES_VERSION}.zip" "${S}/build/" || die + cp "${DISTDIR}/${PN}-WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip" "${S}/build/shared/WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip" || die +} + +src_prepare() { + default +# java-pkg_clean # pretty much stuff to get unbundled + + # Unbundle libastyle + sed -i 's/\(target name="linux-libastyle-[a-zA-Z0-9]*"\)/\1 if="never"/g' "$S/build/build.xml" || die + + # Unbundle avr toolchain + sed -i 's/target name="avr-toolchain-bundle" unless="light_bundle"/target name="avr-toolchain-bundle" if="never"/' "$S/build/build.xml" || die + + # Install avr hardware + sed -i 's/target name="assemble-hardware" unless="light_bundle"/target name="assemble-hardware"/' "$S/build/build.xml" || die +} + +src_compile() { + eant -f build/build.xml -Dlight_bundle=1 -Dlocal_sources=1 -Dno_arduino_builder=1 -Dversion=1.8.19 +} + +src_install() { + cd "${S}"/build/linux/work || die + + # We need to replace relative paths for toolchain executable by paths to system ones. + sed -i -e 's@^compiler.path=.*@compiler.path=/usr/bin/@' -e 's@^tools.avrdude.path=.*@tools.avrdude.path=/usr@' \ + -e 's@^tools.avrdude.config.path=.*@tools.avrdude.config.path=/etc/avrdude.conf@' hardware/arduino/avr/platform.txt || die + + java-pkg_dojar lib/*.jar + java-pkg_dolauncher ${PN} \ + --pwd "/usr/share/${PN}" \ + --main "processing.app.Base" \ + --java_args "-DAPP_DIR=/usr/share/${PN} -Djava.library.path=${EPREFIX}/usr/$(get_libdir)" + + insinto "/usr/share/${PN}" + + doins -r examples hardware lib tools + + # In upstream's build process, we copy these fiels below from the bundled arduino-builder. + # Here we do the same thing, but from the system arduino-builder. + dosym "../../arduino-builder/platform.txt" "/usr/share/${PN}/hardware/platform.txt" + dosym "../../arduino-builder/platform.keys.rewrite.txt" "/usr/share/${PN}/hardware/platform.keys.rewrite.txt" + dosym "../../bin/arduino-builder" "/usr/share/${PN}/arduino-builder" + + # hardware/tools/avr needs to exist or arduino-builder will + # complain about missing required -tools arg + dodir "/usr/share/${PN}/hardware/tools/avr" + + # Install menu and icons + domenu "${FILESDIR}/${PN}.desktop" + cd lib/icons || die + local icondir + for icondir in *; do + # icondir name is something like "24x24" we want the "24" part + local iconsize=`cut -dx -f1 <<< "${icondir}"` + newicon -s $iconsize \ + "${icondir}/apps/arduino.png" \ + "${PN}.png" + done +} + +pkg_postinst() { + xdg_pkg_postinst + [[ ! -x /usr/bin/avr-g++ ]] && ewarn "Missing avr-g++; you need to crossdev -s4 avr" +} diff --git a/dev-embedded/arduino/files/arduino-1.8.5-lib-loading.patch b/dev-embedded/arduino/files/arduino-1.8.5-lib-loading.patch new file mode 100644 index 000000000000..d2516aeb7357 --- /dev/null +++ b/dev-embedded/arduino/files/arduino-1.8.5-lib-loading.patch @@ -0,0 +1,26 @@ +diff --git a/app/src/cc/arduino/packages/formatter/AStyleInterface.java b/app/src/cc/arduino/packages/formatter/AStyleInterface.java +index 4224bf164..fa92506ba 100644 +--- a/app/src/cc/arduino/packages/formatter/AStyleInterface.java ++++ b/app/src/cc/arduino/packages/formatter/AStyleInterface.java +@@ -41,7 +41,7 @@ public class AStyleInterface { + loadLib(Base.getContentFile(System.mapLibraryName("msvcp100"))); + loadLib(Base.getContentFile(System.mapLibraryName("msvcr100"))); + } +- loadLib(new File(Base.getContentFile("lib"), System.mapLibraryName("astylej"))); ++ System.loadLibrary("astylej"); + } + + private static void loadLib(File lib) { +diff --git a/arduino-core/src/processing/app/Platform.java b/arduino-core/src/processing/app/Platform.java +index 28a7ba0f5..8a943a8ac 100644 +--- a/arduino-core/src/processing/app/Platform.java ++++ b/arduino-core/src/processing/app/Platform.java +@@ -154,7 +154,7 @@ public class Platform { + } + + static { +- loadLib(new File(BaseNoGui.getContentFile("lib"), System.mapLibraryName("listSerialsj"))); ++ System.loadLibrary("listSerialsj"); + } + + private static void loadLib(File lib) { diff --git a/dev-embedded/arduino/files/arduino.desktop b/dev-embedded/arduino/files/arduino.desktop new file mode 100644 index 000000000000..e72bcfcd3c29 --- /dev/null +++ b/dev-embedded/arduino/files/arduino.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Name=Arduino +Comment=Open-source electronics prototyping platform +Exec=arduino +Icon=arduino +Terminal=false +Type=Application +Categories=Development; +StartupNotify=false diff --git a/dev-embedded/arduino/metadata.xml b/dev-embedded/arduino/metadata.xml new file mode 100644 index 000000000000..422d37cf7e0c --- /dev/null +++ b/dev-embedded/arduino/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="github">arduino/Arduino</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/avarice/Manifest b/dev-embedded/avarice/Manifest new file mode 100644 index 000000000000..4a7e6f650dc1 --- /dev/null +++ b/dev-embedded/avarice/Manifest @@ -0,0 +1 @@ +DIST avarice-2.14.tar.bz2 253668 BLAKE2B 673c95d8f7f296ffdd5c225e82bd8ef348f0c222201acb826798451fa195ec9c2fd8e8d1ecd3f847f9e0ac069ee2f6a4358f660ff45343817b14d804e79a8c90 SHA512 e0b23bd02bfa7d4dc05027f0f59ec7da868d8d0c0cd4f66595f6aaa5c335fa4eb64fc47399e51c0ed5112803ee99a3f041812bf4072dc096cc933cd17f9348a0 diff --git a/dev-embedded/avarice/avarice-2.14-r1.ebuild b/dev-embedded/avarice/avarice-2.14-r1.ebuild new file mode 100644 index 000000000000..81b774af626f --- /dev/null +++ b/dev-embedded/avarice/avarice-2.14-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +DESCRIPTION="Interface for GDB to Atmel AVR JTAGICE in circuit emulator" +HOMEPAGE="https://avarice.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +PATCHES=( + "${FILESDIR}"/${P}-broken-__unused-macro.patch + "${FILESDIR}"/${P}-implicit-function-declarations.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # bug #788295 + append-cxxflags -std=c++14 + + default +} + +src_install() { + default + dodoc doc/*.txt +} diff --git a/dev-embedded/avarice/files/avarice-2.14-broken-__unused-macro.patch b/dev-embedded/avarice/files/avarice-2.14-broken-__unused-macro.patch new file mode 100644 index 000000000000..9c3ba3da2f4b --- /dev/null +++ b/dev-embedded/avarice/files/avarice-2.14-broken-__unused-macro.patch @@ -0,0 +1,39 @@ +--- a/src/jtag2usb.cc ++++ b/src/jtag2usb.cc +@@ -739,7 +739,7 @@ + + #ifdef HAVE_LIBUSB_2_0 + /* USB thread */ +-static void *usb_thread(void * data __unused) ++static void *usb_thread(void * data) + { + struct pollfd fds[2]; + +--- a/src/jtag3io.cc ++++ b/src/jtag3io.cc +@@ -350,12 +350,12 @@ + throw jtag_exception("doSimpleJtagCommand(): too many failures"); + } + +-void jtag3::changeBitRate(int newBitRate __unused) ++void jtag3::changeBitRate(int newBitRate) + { + throw; + } + +-bool jtag3::synchroniseAt(int bitrate __unused) ++bool jtag3::synchroniseAt(int bitrate) + { + throw; + } +--- a/src/jtag3prog.cc ++++ b/src/jtag3prog.cc +@@ -106,7 +106,7 @@ + } + + +-void jtag3::downloadToTarget(const char* filename __unused, bool program __unused, bool verify __unused) ++void jtag3::downloadToTarget(const char* filename, bool program, bool verify) + { + statusOut("\nDownload not done.\n"); + throw jtag_exception("Target programming not implemented for JTAGICE3"); diff --git a/dev-embedded/avarice/files/avarice-2.14-implicit-function-declarations.patch b/dev-embedded/avarice/files/avarice-2.14-implicit-function-declarations.patch new file mode 100644 index 000000000000..1d266b0bb113 --- /dev/null +++ b/dev-embedded/avarice/files/avarice-2.14-implicit-function-declarations.patch @@ -0,0 +1,24 @@ +Bug: https://bugs.gentoo.org/900687 +Upstream patch: https://sourceforge.net/p/avarice/patches/41/ + +--- a/configure.ac ++++ b/configure.ac +@@ -97,7 +97,7 @@ + + # Checks for header files. + AC_HEADER_STDC +-AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h termios.h unistd.h]) ++AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/stat.h sys/time.h termios.h unistd.h]) + + AC_CHECK_HEADERS([bfd.h], , [ac_found_bfd_h=no]) + +@@ -142,6 +142,9 @@ + AC_MSG_CHECKING([whether libbfd requires libdl]) + AC_LINK_IFELSE( + [AC_LANG_SOURCE([#include <bfd.h> ++ #ifndef bfd_get_section_name ++ extern bfd_get_section_name(bfd *abfd, const char *name); ++ #endif + bfd *file; + int main(void) { + bfd_init(); diff --git a/dev-embedded/avarice/metadata.xml b/dev-embedded/avarice/metadata.xml new file mode 100644 index 000000000000..4b1606086a79 --- /dev/null +++ b/dev-embedded/avarice/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">avarice</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/avr-libc/Manifest b/dev-embedded/avr-libc/Manifest new file mode 100644 index 000000000000..803d0c4b9ebe --- /dev/null +++ b/dev-embedded/avr-libc/Manifest @@ -0,0 +1,2 @@ +DIST avr-libc-2.1.0.tar.bz2 3638672 BLAKE2B b17f3c4971221abe78d4f1d749c6f093e6fcf77b3435bc280af6025bf1c263a4d4d71c55c285ab7d7b458b361baa1d8b928f3ff706510c22b8c6d9f594c44abc SHA512 207b8844353c45172cc819cd5e694bbfe7cd281359cd01cff520f1e70226852d708f1a4fc2e841b2ceb8e3f7d19f2ce45a3f499aee4a25eeb5f6f0aa919611c8 +DIST avr-libc-manpages-2.1.0.tar.bz2 149031 BLAKE2B 3a2ab8b17ff4954cbe8ba1b1d7751b4d50993559eecb58315b5bcd5a6913f72a2c1138e2bf25f075e89bc7e5d45f00e5e1172b02de84e729c25abed7bdec8754 SHA512 a6fc16b5aa60c25ba1230c0be213bda173f8f437bc71553dc04974cd14e3b9c8ea0abb3a25eac2b6517d34e912880db8eb73fec4a5d5374aa5172e14acbf4fa4 diff --git a/dev-embedded/avr-libc/avr-libc-2.1.0.ebuild b/dev-embedded/avr-libc/avr-libc-2.1.0.ebuild new file mode 100644 index 000000000000..46b7dfddf19c --- /dev/null +++ b/dev-embedded/avr-libc/avr-libc-2.1.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +CHOST="avr" +CTARGET="avr" + +inherit flag-o-matic + +DESCRIPTION="C library for Atmel AVR microcontrollers" +HOMEPAGE="https://www.nongnu.org/avr-libc/" +SRC_URI=" + https://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2 + https://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${PV}.tar.bz2 +" + +LICENSE="BSD" +SLOT="0" +# 'amd64' is a blessed placeholder for crossdev. It could +# be any other arch. See bug #620316#c5 +# Don't add more arches to KEYWORDS. +KEYWORDS="amd64" +IUSE="headers-only" + +DEPEND=">=sys-devel/crossdev-0.9.1" +[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \ + && RDEPEND="!dev-embedded/avr-libc" \ + || RDEPEND="" + +DOCS="AUTHORS ChangeLog* NEWS README" + +pkg_setup() { + # check for avr-gcc, bug #134738 + ebegin "Checking for avr-gcc" + if type -p avr-gcc > /dev/null ; then + eend 0 + else + eend 1 + + eerror + eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:" + eerror " $ crossdev -t avr" + eerror + die "AVR toolchain not found" + fi +} + +src_prepare() { + default + + # work around broken gcc versions PR45261 + local mcu + for mcu in $(sed -r -n '/CHECK_AVR_DEVICE/{s:.*[(](.*)[)]:\1:;p}' configure.ac) ; do + if avr-gcc -E - -mmcu=${mcu} <<<"" |& grep -q 'unknown MCU' ; then + sed -i "/HAS_${mcu}=yes/s:yes:no:" configure + fi + done + + strip-flags + strip-unsupported-flags +} + +src_install() { + default + + # man pages can not go into standard locations + # as they would then overwrite libc man pages + docinto man/man3 + dodoc -r "${WORKDIR}"/man/man3/. + + # Make sure diff cross-compilers don't collide #414075 + mv "${ED}"/usr/share/doc/{${PF},${CTARGET}-${PF}} || die +} diff --git a/dev-embedded/avr-libc/metadata.xml b/dev-embedded/avr-libc/metadata.xml new file mode 100644 index 000000000000..222a305ddd93 --- /dev/null +++ b/dev-embedded/avr-libc/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <longdescription> + This package is part of the avr- binutils, -gcc, -lib toolchain for the Atmel microcontrollers. + These ebuilds have been created and submitted by Scott L. Price (dflytech.com). + </longdescription> + <upstream> + <remote-id type="github">avrdudes/avr-libc</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/avra/Manifest b/dev-embedded/avra/Manifest new file mode 100644 index 000000000000..60792d584357 --- /dev/null +++ b/dev-embedded/avra/Manifest @@ -0,0 +1 @@ +DIST avra-1.4.2.tar.gz 392445 BLAKE2B 6b556583838e0e5bef0207f7291da7c5e6dad01e695d9592b3de8f528bc7a5dafc3015f75934bcc8f9e0b6baca39ff0ae13c88ee290e657868bbb522d27da068 SHA512 f51a43b1b28102d6180ce27e74b50642de8f3d18fa35a82904fddaac993e87e1096667f2245bebfad92e4ba3283330f6ac4b6083e486be5af9edca7b7e90e56f diff --git a/dev-embedded/avra/avra-1.4.2-r1.ebuild b/dev-embedded/avra/avra-1.4.2-r1.ebuild new file mode 100644 index 000000000000..7533d38295ab --- /dev/null +++ b/dev-embedded/avra/avra-1.4.2-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Atmel AVR Assembler" +HOMEPAGE="https://github.com/hsoft/avra" +SRC_URI="https://github.com/hsoft/avra/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc ~x86" + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + PREFIX=/usr \ + CFLAGS="${CFLAGS} \$(CDEFS)" \ + LDFLAGS="${LDFLAGS}" +} + +src_install() { + emake PREFIX=/usr DESTDIR="${ED}" install + dodoc {AUTHORS,CHANGELOG.md,README.md,USAGE.md} +} diff --git a/dev-embedded/avra/metadata.xml b/dev-embedded/avra/metadata.xml new file mode 100644 index 000000000000..0385cb2a0254 --- /dev/null +++ b/dev-embedded/avra/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jsmolic@gentoo.org</email> + <name>Jakov Smolić</name> + </maintainer> + <upstream> + <remote-id type="github">hsoft/avra</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/avrdude/Manifest b/dev-embedded/avrdude/Manifest new file mode 100644 index 000000000000..ab5c66389600 --- /dev/null +++ b/dev-embedded/avrdude/Manifest @@ -0,0 +1 @@ +DIST avrdude-7.2.tar.gz 2622520 BLAKE2B 7bf86ea802bb150415a0d8c1ba884d5ff84b3d4bfb0e77470205d578001c1c19f782ddd37ae4235fba9f2ccc05247aea1723ebc2e1c71174c23b0986e835231e SHA512 04d04492458bc1d183ad8ff403cf3d38f65f44bb992df589e8f49d28b5347eb63433568c95f5d575ae651be70d725d3f178175cd1fe6dcd46ec013c3fe3f2ab0 diff --git a/dev-embedded/avrdude/avrdude-7.2.ebuild b/dev-embedded/avrdude/avrdude-7.2.ebuild new file mode 100644 index 000000000000..e403b6031ea7 --- /dev/null +++ b/dev-embedded/avrdude/avrdude-7.2.ebuild @@ -0,0 +1,65 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="AVR Downloader/UploaDEr" +HOMEPAGE="https://avrdudes.github.io/avrdude https://github.com/avrdudes/avrdude" +SRC_URI="https://github.com/avrdudes/avrdude/archive/refs/tags/v${PV}.tar.gz -> avrdude-${PV}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0/1" # SOVERSION in src/CMakeLists.txt +KEYWORDS="amd64 arm ppc ppc64 x86" +IUSE="ftdi readline" + +RDEPEND=" + dev-libs/hidapi + virtual/libelf:= + virtual/libusb:0 + virtual/libusb:1 + ftdi? ( dev-embedded/libftdi:1 ) + readline? ( sys-libs/readline:0= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-alternatives/yacc + app-alternatives/lex +" + +src_prepare() { + cmake_src_prepare + + # CMAKE_INSTALL_LIBDIR is not respected. Fixed in the next release. + sed -i "s@DESTINATION lib@DESTINATION $(get_libdir)@g" \ + src/CMakeLists.txt || die + + # For some reason 'TYPE SYSCONF' and 'CMAKE_INSTALL_SYSCONFDIR' + # prepends '/usr' so the config ends up getting installed as + # '/usr/etc/avrdude.conf' which is not correct. + sed -i 's@TYPE SYSCONF@DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}@' \ + src/CMakeLists.txt || die +} + +src_configure() { + # Optional libraries like libftdi aren't gated behind options and + # find_package calls, but find_library is called directly + # instead. + # + # Set the cache variable to an empty string if we do not want a + # library to be automatically detected. + local mycmakeargs=( + -DBUILD_DOC=OFF # This currently does nothing... + -DBUILD_SHARED_LIBS=ON + -DDEBUG_CMAKE=ON + -DHAVE_LIBGPIOD='' # Bug #921301 + -DHAVE_LIBFTDI='' + -DHAVE_LINUXGPIO=ON # Seems like there is no reason to have this off. + -DHAVE_LINUXSPI=ON # Ditto. + -DHAVE_PARPORT=ON + ) + use ftdi || mycmakeargs+=( -DHAVE_LIBFTDI1='' ) + use readline || mycmakeargs+=( -DHAVE_LIBREADLINE='' ) + cmake_src_configure +} diff --git a/dev-embedded/avrdude/metadata.xml b/dev-embedded/avrdude/metadata.xml new file mode 100644 index 000000000000..4b3b9dad10e3 --- /dev/null +++ b/dev-embedded/avrdude/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <use> + <flag name="ftdi">Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag> + </use> + <slots> + <subslots>reflect soname of libavrdude</subslots> + </slots> + <upstream> + <remote-id type="github">avrdudes/avrdude</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/bcm2-utils/Manifest b/dev-embedded/bcm2-utils/Manifest new file mode 100644 index 000000000000..293cdbc9e68c --- /dev/null +++ b/dev-embedded/bcm2-utils/Manifest @@ -0,0 +1 @@ +DIST bcm2-utils-0.9.8.tar.gz 120559 BLAKE2B ae244bab2f3440a251d8453862d4431b3f6697f04584f93d4e737a3e9aaa0f3335cb2282957a998b740389779eedae319840a27d3c7663e4631275b7863cd0a2 SHA512 bc818a2233ff1d33b9bf36afb09d035512b565467384e6080ba405ebeabc33b7d22f537e8b88bf0d4db75bf2063f47a630bb5750cfea6dd7cf0a042ca49ac34a diff --git a/dev-embedded/bcm2-utils/bcm2-utils-0.9.8.ebuild b/dev-embedded/bcm2-utils/bcm2-utils-0.9.8.ebuild new file mode 100644 index 000000000000..89d08ce878f2 --- /dev/null +++ b/dev-embedded/bcm2-utils/bcm2-utils-0.9.8.ebuild @@ -0,0 +1,44 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Utilities for Broadcom-based cable modems" +HOMEPAGE="https://github.com/jclehner/bcm2-utils" +SRC_URI="https://github.com/jclehner/bcm2-utils/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-libs/boost + dev-libs/openssl +" +RDEPEND="dev-libs/openssl" + +src_prepare(){ + default + sed -i 's@shell git describe --always@shell git describe --always 2>/dev/null@' "Makefile" || die +} + +src_compile(){ + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + CFLAGS="${CFLAGS} '-DVERSION=\"v${PV}\"'" \ + CXXFLAGS="${CXXFLAGS} '-DVERSION=\"v${PV}\"'" \ + LDFLAGS="${LDFLAGS}" +} + +src_install(){ + mkdir -p "${D}/usr/bin" || die + emake PREFIX="${D}/usr" install +} + +src_test(){ + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" check +} diff --git a/dev-embedded/bcm2-utils/metadata.xml b/dev-embedded/bcm2-utils/metadata.xml new file mode 100644 index 000000000000..918dbb5589a3 --- /dev/null +++ b/dev-embedded/bcm2-utils/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>eli.burch@burchbytes.com</email> + <name>Eli Burch</name> + </maintainer> + <upstream> + <remote-id type="github">jclehner/bcm2-utils</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/cpik/Manifest b/dev-embedded/cpik/Manifest new file mode 100644 index 000000000000..58c56330d0d0 --- /dev/null +++ b/dev-embedded/cpik/Manifest @@ -0,0 +1 @@ +DIST cpik-0.7.4-4.tar.gz 8322003 BLAKE2B e88f04a92f44800139089b3115da42c5bbe88128300db28660b9300ae4260cba08432de0865d0426ce179743388483c9a3310c417bfaa3c7e4ef93217c38574b SHA512 d376af949bd2fbc80bd3c13e02d44c5a9ef82c409ac20e4c750fa77b654b89e77289b5a022988e05261cdbfe15563f837ec0e6382bb8bf27be673d0e55bbfa2c diff --git a/dev-embedded/cpik/cpik-0.7.4_p4-r1.ebuild b/dev-embedded/cpik/cpik-0.7.4_p4-r1.ebuild new file mode 100644 index 000000000000..f55608b21c4b --- /dev/null +++ b/dev-embedded/cpik/cpik-0.7.4_p4-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PV="${PV/_p/-}" +MY_P="${PN}-${MY_PV}" +inherit qmake-utils + +DESCRIPTION="C compiler for PIC18 devices" +HOMEPAGE="http://pikdev.free.fr/" +SRC_URI="http://pikdev.free.fr/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="dev-qt/qtbase:6" + +DOCS=( ${MY_PV/-*/}/doc/cpik-{0.5.2-tutorial,0.7.4-4-doc}.pdf ) +HTML_DOCS=( ${MY_PV/-*/}/doc/html/. ) + +PATCHES=( "${FILESDIR}/${P}-gcc6.patch" ) + +src_prepare() { + default + + # installs docs in wrong path + sed -e '/INSTALLS += docs/d' -i "${PN}"*.pro || die +} + +src_configure() { + eqmake6 +} + +src_install() { + emake INSTALL_ROOT="${D}" install + einstalldocs + dosym "${PN}-${MY_PV/-*/}" "/usr/bin/${PN}" +} diff --git a/dev-embedded/cpik/files/cpik-0.7.4_p4-gcc6.patch b/dev-embedded/cpik/files/cpik-0.7.4_p4-gcc6.patch new file mode 100644 index 000000000000..f0b95dc371f8 --- /dev/null +++ b/dev-embedded/cpik/files/cpik-0.7.4_p4-gcc6.patch @@ -0,0 +1,12 @@ +diff -Naur a/utility.h b/utility.h +--- a/utility.h 2017-12-03 03:47:35.302504007 +0100 ++++ b/utility.h 2017-12-03 03:47:59.537116442 +0100 +@@ -75,7 +75,7 @@ + static bool stringTo ( const string& s, T& result ) + { + istringstream is ( s ) ; +- return is >> result ; ++ return static_cast<bool>(is >> result); + } + + /** generic conversion from T to string */ diff --git a/dev-embedded/cpik/metadata.xml b/dev-embedded/cpik/metadata.xml new file mode 100644 index 000000000000..9eb88a4f56b0 --- /dev/null +++ b/dev-embedded/cpik/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <longdescription lang="en"> + CPIK (the C compiler for PIC18 devices) is released under the GPL licence. + CPIK is an easy to use, near ANSI C compiler which is fully integrated with + PikDev. This project is still in progress but near to be finished and the + current version is perfectly usable. (from Pikdev or from a command-line + interpreter). + </longdescription> +</pkgmetadata> diff --git a/dev-embedded/dc-tool-ip/Manifest b/dev-embedded/dc-tool-ip/Manifest new file mode 100644 index 000000000000..38d1f7788123 --- /dev/null +++ b/dev-embedded/dc-tool-ip/Manifest @@ -0,0 +1 @@ +DIST dcload-ip-1.0.4-src.tar.gz 104758 BLAKE2B 4c8c52077b047da81341a133272a5569de9e6b304942c181da01a617a00243ace2847bbd380ac723710d91dc43d6de134d3a34e083ef9fa61471ba49ce5021f3 SHA512 c58f574bf13dd44a00395060af4c718593471242366d09dddb234490d20a6e0322a2c3853613aa1c8a5269802cf6434407d3f6c62c934e8b66f8fc1e86a12536 diff --git a/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4-r1.ebuild b/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4-r1.ebuild new file mode 100644 index 000000000000..54bd407e0998 --- /dev/null +++ b/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4-r1.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Ethernet program loader for the Dreamcast" +HOMEPAGE="https://cadcdev.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/cadcdev/dcload-ip-${PV}-src.tar.gz" +S="${WORKDIR}/dcload-ip-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="doc" + +RDEPEND="sys-libs/binutils-libs" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-bfd-update.patch + "${FILESDIR}"/${P}-headers.patch + "${FILESDIR}"/${P}-makefile.patch +) + +src_configure() { + tc-export CC + append-cppflags -DPACKAGE -DPACKAGE_VERSION #465952 +} + +src_compile() { + emake -C host-src/tool +} + +src_install() { + dobin host-src/tool/dc-tool + + dodoc README NETWORK CHANGES + dodoc -r make-cd + use doc && dodoc -r example-src +} diff --git a/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch new file mode 100644 index 000000000000..2b3b32d7e3f4 --- /dev/null +++ b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-bfd-update.patch @@ -0,0 +1,22 @@ +--- a/host-src/tool/dc-tool.c ++++ b/host-src/tool/dc-tool.c +@@ -431,13 +431,13 @@ + if ((section->flags & SEC_HAS_CONTENTS) && (section->flags & SEC_LOAD)) { + printf("Section %s, ",section->name); + printf("lma 0x%x, ",section->lma); +- printf("size %d\n",section->_raw_size); +- if (section->_raw_size) { +- size += section->_raw_size; +- inbuf = malloc(section->_raw_size); +- bfd_get_section_contents(somebfd, section, inbuf, 0, section->_raw_size); ++ printf("size %d\n",section->rawsize); ++ if (section->rawsize) { ++ size += section->rawsize; ++ inbuf = malloc(section->rawsize); ++ bfd_get_section_contents(somebfd, section, inbuf, 0, section->rawsize); + +- send_data(inbuf, section->lma, section->_raw_size); ++ send_data(inbuf, section->lma, section->rawsize); + + free(inbuf); + } diff --git a/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-headers.patch b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-headers.patch new file mode 100644 index 000000000000..678278262900 --- /dev/null +++ b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-headers.patch @@ -0,0 +1,22 @@ +--- a/host-src/tool/dc-tool.c ++++ b/host-src/tool/dc-tool.c +@@ -24,6 +24,7 @@ + #include <fcntl.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #ifdef _WIN32 + #include <string.h> + #include <windows.h> +--- a/host-src/tool/syscalls.c ++++ b/host-src/tool/syscalls.c +@@ -24,6 +24,9 @@ + #include <fcntl.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> ++#include <arpa/inet.h> ++#include <time.h> + #include <sys/time.h> + #include <unistd.h> + #include <utime.h> diff --git a/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-makefile.patch b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-makefile.patch new file mode 100644 index 000000000000..ae902dcc2a6b --- /dev/null +++ b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-makefile.patch @@ -0,0 +1,45 @@ +--- a/host-src/tool/Makefile ++++ b/host-src/tool/Makefile +@@ -1,18 +1,13 @@ + include ../../Makefile.cfg + +-CC = $(HOSTCC) +-CFLAGS = $(HOSTCFLAGS) -DDREAMCAST_IP=\"$(DREAMCAST_IP)\" -DHAVE_GETOPT +-INCLUDE = -I$(BFDINCLUDE) ++CPPFLAGS += -DDREAMCAST_IP=\"$(DREAMCAST_IP)\" -DHAVE_GETOPT + + OBJECTS = dc-tool.o syscalls.o + +-.c.o: +- $(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $< +- + all: dc-tool + + dc-tool: $(OBJECTS) +- $(CC) -o $@ $(OBJECTS) $(BFDLIB) ++ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(BFDLIB) + + .PHONY : install + install: dc-tool +--- a/Makefile.cfg ++++ b/Makefile.cfg +@@ -8,8 +8,8 @@ + # the ones in your system + + # these must point to your sh-elf bfd, not the system one +-BFDLIB = -L/usr/local/dcdev/lib -lbfd -liberty +-BFDINCLUDE = /usr/local/dcdev/include ++BFDLIB = -lbfd -liberty ++BFDINCLUDE = + + # cygwin + # these must point to your sh-elf bfd, not the system one +@@ -24,7 +24,7 @@ + + # you generally shouldn't change this unless you are making forked + # versions (or test versions) +-VERFLAGS = -DDCLOAD_VERSION=\"1.0.4\" ++CPPFLAGS += -DDCLOAD_VERSION=\"1.0.4\" + TARGETCFLAGS += $(VERFLAGS) + HOSTCFLAGS += $(VERFLAGS) + diff --git a/dev-embedded/dc-tool-ip/metadata.xml b/dev-embedded/dc-tool-ip/metadata.xml new file mode 100644 index 000000000000..0a4c2273d2fa --- /dev/null +++ b/dev-embedded/dc-tool-ip/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">cadcdev</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/dfu-programmer/Manifest b/dev-embedded/dfu-programmer/Manifest new file mode 100644 index 000000000000..de126a841242 --- /dev/null +++ b/dev-embedded/dfu-programmer/Manifest @@ -0,0 +1 @@ +DIST dfu-programmer-1.1.0.tar.gz 149164 BLAKE2B dba088ae27872cee07ac2ae1b666edd0db6f1e30efe35842e4f09909102f8ce29a9c04205fe2817dc73b3d90e3054e7e0693c3c1cb1fdaf795c26e84fb723ecc SHA512 9d52b68023c6b38c93a3e8d4a04bcac9e9858f20d810a15bbcc9c37ab117d7799194363813bcc074585c86d7cc7877307e060f3b60655b7632f97421e23db30d diff --git a/dev-embedded/dfu-programmer/dfu-programmer-1.1.0.ebuild b/dev-embedded/dfu-programmer/dfu-programmer-1.1.0.ebuild new file mode 100644 index 000000000000..c0090e82453b --- /dev/null +++ b/dev-embedded/dfu-programmer/dfu-programmer-1.1.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools bash-completion-r1 udev + +DESCRIPTION="A Device Firmware Update based USB programmer for Atmel chips" +HOMEPAGE=" + https://dfu-programmer.github.io/ + https://sourceforge.net/projects/dfu-programmer/ + https://github.com/dfu-programmer/dfu-programmer +" +SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ~arm64" + +RDEPEND=" + acct-group/plugdev + virtual/libusb:1 + virtual/udev +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + eautoreconf +} + +src_install() { + default + + cat <<-EOF > 70-dfu-programmer.rules + # + # do not edit this file, it will be overwritten on update + # + EOF + printf 'SUBSYSTEM=="usb", ACTION!="remove", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="%s", MODE="660", GROUP="plugdev", SYMLINK+="dfu-%%n"\n' \ + 2ff{a,b,9,7,4,3} >> 70-dfu-programmer.rules + + udev_dorules 70-dfu-programmer.rules + newbashcomp dfu_programmer dfu-programmer +} + +pkg_postinst() { + udev_reload + + elog "To update device firmware as user you must be in the plugdev group:" + elog + elog "usermod -aG plugdev <user>" +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-embedded/dfu-programmer/metadata.xml b/dev-embedded/dfu-programmer/metadata.xml new file mode 100644 index 000000000000..f5df457efa6e --- /dev/null +++ b/dev-embedded/dfu-programmer/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">dfu-programmer</remote-id> + <remote-id type="github">dfu-programmer/dfu-programmer</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esp-coredump/Manifest b/dev-embedded/esp-coredump/Manifest new file mode 100644 index 000000000000..5fdbd8ff259f --- /dev/null +++ b/dev-embedded/esp-coredump/Manifest @@ -0,0 +1,4 @@ +DIST esp_coredump-1.13.1.tar.gz 36549 BLAKE2B 6177e99d1f48013f0048615d612186dfb6017482d0c814dcd18f0b8b3ea1bcffc5dcd85720f578fd75d3986c1ea670df3e2fef1c6637ec98e3ec2afc511635ab SHA512 68e948cd359bbc9e2bc1fd5485de4b59bddeee7cef6f3eca78543d70e8ac5de1e9b1b003cb19bc28b063eba1b9a4465fd7e7c95c8b99b3a4f09adc27da5f8073 +DIST esp_coredump-1.14.0.tar.gz 36731 BLAKE2B f8e789d88ad7830ada901daf947d7bb0e27a566d790ed8c6535126168cee12e9ea956075f1132a87223a0d932095ebec4903e9ab6d15b862b37c24c4911cbe9b SHA512 59479360cae717852d286dc228979c75051c3fb234914310627f6e5496ba5badd0d1884364616a9fd34af3ea8d69f02b79ec549246de8c9b850d745b6c8e7c06 +DIST esp_coredump-1.15.0.tar.gz 37442 BLAKE2B 2f3f26301abd47f05dc98c243956761fcd52ee678938dee4169eef27aeb44c75f9613cd782e8698fc9f253f8ddeb65ebaf15266b0b741ee3d812cf3fdb6ad827 SHA512 99f7812040b501a2575594440b0a7a40cb1a5ea13c14eb54d863e0278ea93956b4034f025ba13fa8c932954bf596e185378093ffb548a73239d7089c127cd090 +DIST esp_coredump-1.16.0.tar.gz 37700 BLAKE2B 6ee80c1abbb7dbee6c1c08896e73ac0bde097d3b8a5e608f0b992f12cf87bb8f196a55cb3b8308dcc98fb2fefb24d62f4d502c9abece068dc9cd58de06535090 SHA512 8394f74288c4258dfb4f919741df9e27287d1e7d227d5cbace69a326c054acd2b49d66d45c07966ad8fae4fe56fe954405e2f2372b6cd5a7f770136673202716 diff --git a/dev-embedded/esp-coredump/esp-coredump-1.13.1.ebuild b/dev-embedded/esp-coredump/esp-coredump-1.13.1.ebuild new file mode 100644 index 000000000000..8e3f9d130912 --- /dev/null +++ b/dev-embedded/esp-coredump/esp-coredump-1.13.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Utility that helps users to retrieve and analyse core dumps" +HOMEPAGE="https://github.com/espressif/esp-coredump" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-embedded/esptool + dev-python/construct[${PYTHON_USEDEP}] + dev-python/pygdbmi[${PYTHON_USEDEP}] +" + +DEPEND="${RDEPEND}" + +src_prepare() { + default + rm -r tests || die +} diff --git a/dev-embedded/esp-coredump/esp-coredump-1.14.0.ebuild b/dev-embedded/esp-coredump/esp-coredump-1.14.0.ebuild new file mode 100644 index 000000000000..7407a81672da --- /dev/null +++ b/dev-embedded/esp-coredump/esp-coredump-1.14.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Utility that helps users to retrieve and analyse core dumps" +HOMEPAGE="https://github.com/espressif/esp-coredump" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-embedded/esptool + dev-python/construct[${PYTHON_USEDEP}] + dev-python/pygdbmi[${PYTHON_USEDEP}] +" + +DEPEND="${RDEPEND}" + +src_prepare() { + default + rm -r tests || die +} diff --git a/dev-embedded/esp-coredump/esp-coredump-1.15.0.ebuild b/dev-embedded/esp-coredump/esp-coredump-1.15.0.ebuild new file mode 100644 index 000000000000..7407a81672da --- /dev/null +++ b/dev-embedded/esp-coredump/esp-coredump-1.15.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Utility that helps users to retrieve and analyse core dumps" +HOMEPAGE="https://github.com/espressif/esp-coredump" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-embedded/esptool + dev-python/construct[${PYTHON_USEDEP}] + dev-python/pygdbmi[${PYTHON_USEDEP}] +" + +DEPEND="${RDEPEND}" + +src_prepare() { + default + rm -r tests || die +} diff --git a/dev-embedded/esp-coredump/esp-coredump-1.16.0.ebuild b/dev-embedded/esp-coredump/esp-coredump-1.16.0.ebuild new file mode 100644 index 000000000000..7407a81672da --- /dev/null +++ b/dev-embedded/esp-coredump/esp-coredump-1.16.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Utility that helps users to retrieve and analyse core dumps" +HOMEPAGE="https://github.com/espressif/esp-coredump" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-embedded/esptool + dev-python/construct[${PYTHON_USEDEP}] + dev-python/pygdbmi[${PYTHON_USEDEP}] +" + +DEPEND="${RDEPEND}" + +src_prepare() { + default + rm -r tests || die +} diff --git a/dev-embedded/esp-coredump/metadata.xml b/dev-embedded/esp-coredump/metadata.xml new file mode 100644 index 000000000000..3ffb5870ec97 --- /dev/null +++ b/dev-embedded/esp-coredump/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/esp-coredump</remote-id> + <remote-id type="pypi">esp-coredump</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esp-idf-diag/Manifest b/dev-embedded/esp-idf-diag/Manifest new file mode 100644 index 000000000000..71e8033095c1 --- /dev/null +++ b/dev-embedded/esp-idf-diag/Manifest @@ -0,0 +1 @@ +DIST esp_idf_diag-0.2.0.tar.gz 23248 BLAKE2B 5cbe624ba6f74336b070cbafc213dad1bc16099e604a6b0d97e35616e25e968bb3e260f667b087c864efce50e99eb61491929a0f11545cbcd40a7ceff34bda40 SHA512 c92fe768af9ce66285e9924685ec15477dc41cfcf0af14536ad1789c7b182825070165acb3a3c1df28bf87b3591c38ddc7502e5f1c290e1c629a50415812b69a diff --git a/dev-embedded/esp-idf-diag/esp-idf-diag-0.2.0.ebuild b/dev-embedded/esp-idf-diag/esp-idf-diag-0.2.0.ebuild new file mode 100644 index 000000000000..0d8448d22243 --- /dev/null +++ b/dev-embedded/esp-idf-diag/esp-idf-diag-0.2.0.ebuild @@ -0,0 +1,28 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="A tool to gather diagnostic information about the ESP-IDF environment." +HOMEPAGE="https://github.com/espressif/esp-idf-diag" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/rich[${PYTHON_USEDEP}] +" + +DEPEND="${RDEPEND}" + +BDEPEND="test? ( dev-embedded/esp-idf )" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest diff --git a/dev-embedded/esp-idf-diag/metadata.xml b/dev-embedded/esp-idf-diag/metadata.xml new file mode 100644 index 000000000000..086c379f8a3f --- /dev/null +++ b/dev-embedded/esp-idf-diag/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/esp-idf-diag</remote-id> + <remote-id type="pypi">esp-idf-diag</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esp-idf-kconfig/Manifest b/dev-embedded/esp-idf-kconfig/Manifest new file mode 100644 index 000000000000..e8a2f53134a1 --- /dev/null +++ b/dev-embedded/esp-idf-kconfig/Manifest @@ -0,0 +1,4 @@ +DIST esp_idf_kconfig-2.5.1.tar.gz 140118 BLAKE2B 9faddf102415a0b26ab698ed4b8336e8e5508c681166676b55655f990a8f271f9c62a86f979fedcbe76d4aee3d07909bb0e8c82044ed5115d141926f614426d0 SHA512 e31cf1b3405105d471f4ce3ae31af3943a3e72f48828a5a2e9dc584854d778beccbfd42d7fa29e903e4a3fad0c9080306bf0afe46930d26d1023cb31f437c3c7 +DIST esp_idf_kconfig-2.5.2.tar.gz 140746 BLAKE2B 3ab5d56956004a633118930b05b05a296d2be882a790709b1de845728f8c83492a1d28df6cbf0e437c39a9663b74771ea6c412dd0c157927676dbf2df8f142c3 SHA512 e2619ae2471ef8071125158d42342b12e769fdfa55a9a035d987b7a25201240211a2189146c4f71e80c8e645f93abdeb0baafa301e352432687a1ee1812174ee +DIST esp_idf_kconfig-3.6.0.tar.gz 169357 BLAKE2B 8b225426d34da6b7b91ea77d31a74fd1e59cce906ca41d5f4cc508e5140cff74fafeda666d8d5e3d4851da6ab1a5598e418f71e4044a748f035a3952a5b3abe6 SHA512 f08da49965a8d435eaf9b6620a0bdf188fa4a3d26284b62b32e796a022df913aed51a7d17a6127dda038cc24ae6584320031df69fa08481e3dd49c1ae4820ea8 +DIST esp_idf_kconfig-3.8.1.tar.gz 174675 BLAKE2B e89a3ebe8bdd0e1c56205e5967d19643058148770d33af5791dc9e0dc39775f6d43d6bfd5f931c1652e44c482c637fb1035773b128d6058d7b22c30555495bf3 SHA512 a7a04e0c2d3050f4ba6f9757a440396c7a184ed4a09eab037e25b6806e24ccbb9d4bdc7a9f14c8059fa6dcca10406a93489c4c8bf9df93816b306870447eb3d9 diff --git a/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-2.5.1-r1.ebuild b/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-2.5.1-r1.ebuild new file mode 100644 index 000000000000..b1b0a9d4bde8 --- /dev/null +++ b/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-2.5.1-r1.ebuild @@ -0,0 +1,26 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Kconfig tooling for esp-idf" +HOMEPAGE="https://github.com/espressif/esp-idf-kconfig" + +LICENSE="Apache-2.0" +SLOT="0" + +KEYWORDS="~amd64" + +RESTRICT="test" + +PATCHES=( "${FILESDIR}/${P}-rename-kconfiglib.patch" ) + +src_prepare() { + default + rm -r docs || die +} diff --git a/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-2.5.2.ebuild b/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-2.5.2.ebuild new file mode 100644 index 000000000000..b1b0a9d4bde8 --- /dev/null +++ b/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-2.5.2.ebuild @@ -0,0 +1,26 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Kconfig tooling for esp-idf" +HOMEPAGE="https://github.com/espressif/esp-idf-kconfig" + +LICENSE="Apache-2.0" +SLOT="0" + +KEYWORDS="~amd64" + +RESTRICT="test" + +PATCHES=( "${FILESDIR}/${P}-rename-kconfiglib.patch" ) + +src_prepare() { + default + rm -r docs || die +} diff --git a/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-3.6.0.ebuild b/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-3.6.0.ebuild new file mode 100644 index 000000000000..9e6e4b44c576 --- /dev/null +++ b/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-3.6.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Kconfig tooling for esp-idf" +HOMEPAGE="https://github.com/espressif/esp-idf-kconfig" + +LICENSE="Apache-2.0" +SLOT="0" + +KEYWORDS="~amd64" + +RESTRICT="test" + +src_prepare() { + default + rm -r docs || die +} diff --git a/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-3.8.1.ebuild b/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-3.8.1.ebuild new file mode 100644 index 000000000000..9e6e4b44c576 --- /dev/null +++ b/dev-embedded/esp-idf-kconfig/esp-idf-kconfig-3.8.1.ebuild @@ -0,0 +1,24 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Kconfig tooling for esp-idf" +HOMEPAGE="https://github.com/espressif/esp-idf-kconfig" + +LICENSE="Apache-2.0" +SLOT="0" + +KEYWORDS="~amd64" + +RESTRICT="test" + +src_prepare() { + default + rm -r docs || die +} diff --git a/dev-embedded/esp-idf-kconfig/files/esp-idf-kconfig-2.5.1-rename-kconfiglib.patch b/dev-embedded/esp-idf-kconfig/files/esp-idf-kconfig-2.5.1-rename-kconfiglib.patch new file mode 100644 index 000000000000..416f18f9562d --- /dev/null +++ b/dev-embedded/esp-idf-kconfig/files/esp-idf-kconfig-2.5.1-rename-kconfiglib.patch @@ -0,0 +1,160 @@ +# Needed to avoid conflicts with dev-python/kconfiglib +# See https://github.com/espressif/esp-idf-kconfig/issues/13 for context +diff --git c/esp_idf_kconfig/gen_kconfig_doc.py w/esp_idf_kconfig/gen_kconfig_doc.py +index 87d0c1a..cb83260 100644 +--- c/esp_idf_kconfig/gen_kconfig_doc.py ++++ w/esp_idf_kconfig/gen_kconfig_doc.py +@@ -11,7 +11,7 @@ + # SPDX-License-Identifier: Apache-2.0 + import re + +-import kconfiglib.core as kconfiglib ++import espkconfiglib.core as kconfiglib + + # Indentation to be used in the generated file + INDENT = " " +diff --git c/kconfiglib/__init__.py w/espkconfiglib/__init__.py +similarity index 100% +rename from kconfiglib/__init__.py +rename to espkconfiglib/__init__.py +diff --git c/kconfiglib/core.py w/espkconfiglib/core.py +similarity index 99% +rename from kconfiglib/core.py +rename to espkconfiglib/core.py +index 971b53e..cf2a5ec 100644 +--- c/kconfiglib/core.py ++++ w/espkconfiglib/core.py +@@ -2,7 +2,7 @@ + # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + # SPDX-FileCopyrightText: 2011-2019, Ulf Magnusson + # SPDX-License-Identifier: ISC +-# This file is copied from kconfiglib project: ++# This file is copied from espkconfiglib project: + # https://github.com/ulfalizer/Kconfiglib/commit/061e71f7d78cb057762d88de088055361863deff + import errno + import importlib +@@ -2476,7 +2476,7 @@ class Kconfig(object): + returns node that was parsed as a last one in this function. + probably will be deprecated as the call logic is different from the original. + """ +- from kconfiglib.kconfig_parser import Parser ++ from espkconfiglib.kconfig_parser import Parser + + parser = Parser(kconfig=self) + +diff --git c/kconfiglib/kconfig_grammar.py w/espkconfiglib/kconfig_grammar.py +similarity index 99% +rename from kconfiglib/kconfig_grammar.py +rename to espkconfiglib/kconfig_grammar.py +index d4c8fee..5f00c1f 100644 +--- c/kconfiglib/kconfig_grammar.py ++++ w/espkconfiglib/kconfig_grammar.py +@@ -29,7 +29,7 @@ from pyparsing import one_of + from pyparsing import opAssoc + + if TYPE_CHECKING: +- from kconfiglib.kconfig_parser import Parser ++ from espkconfiglib.kconfig_parser import Parser + + + class KconfigBlock(Token): +diff --git c/kconfiglib/kconfig_parser.py w/espkconfiglib/kconfig_parser.py +similarity index 99% +rename from kconfiglib/kconfig_parser.py +rename to espkconfiglib/kconfig_parser.py +index 86e6f7f..4bab061 100644 +--- c/kconfiglib/kconfig_parser.py ++++ w/espkconfiglib/kconfig_parser.py +@@ -17,7 +17,7 @@ from pyparsing import ParseResults + from pyparsing import line as pyparsing_line + from pyparsing import lineno + +-from kconfiglib.kconfig_grammar import KconfigGrammar ++from espkconfiglib.kconfig_grammar import KconfigGrammar + + from .core import AND + from .core import BOOL +diff --git c/kconfgen/core.py w/kconfgen/core.py +index dbcf8c3..37f3205 100755 +--- c/kconfgen/core.py ++++ w/kconfgen/core.py +@@ -27,7 +27,7 @@ from typing import Set + from typing import Tuple + + import esp_idf_kconfig.gen_kconfig_doc as gen_kconfig_doc +-import kconfiglib.core as kconfiglib ++import espkconfiglib.core as kconfiglib + from esp_idf_kconfig import __version__ + + +diff --git c/kconfserver/core.py w/kconfserver/core.py +index fead552..8693663 100644 +--- c/kconfserver/core.py ++++ w/kconfserver/core.py +@@ -13,7 +13,7 @@ import tempfile + from json import JSONDecodeError + + import kconfgen.core as kconfgen +-import kconfiglib.core as kconfiglib ++import espkconfiglib.core as kconfiglib + from esp_idf_kconfig import __version__ + + # Min/Max supported protocol versions +diff --git c/menuconfig/core.py w/menuconfig/core.py +index 1d71292..2fa6cdd 100755 +--- c/menuconfig/core.py ++++ w/menuconfig/core.py +@@ -2,7 +2,7 @@ + # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + # SPDX-FileCopyrightText: 2018-2019, Nordic Semiconductor ASA and Ulf Magnusson + # SPDX-License-Identifier: ISC +-# This file is copied from kconfiglib project: ++# This file is copied from espkconfiglib project: + # https://github.com/ulfalizer/Kconfiglib/commit/061e71f7d78cb057762d88de088055361863deff + """ + Overview +@@ -193,25 +193,25 @@ import sys + import textwrap + from typing import Union + +-from kconfiglib.core import AND +-from kconfiglib.core import BOOL +-from kconfiglib.core import BOOL_TO_STR +-from kconfiglib.core import COMMENT +-from kconfiglib.core import HEX +-from kconfiglib.core import INT +-from kconfiglib.core import MENU +-from kconfiglib.core import OR +-from kconfiglib.core import STRING +-from kconfiglib.core import TYPE_TO_STR +-from kconfiglib.core import Choice +-from kconfiglib.core import MenuNode +-from kconfiglib.core import Symbol +-from kconfiglib.core import expr_str +-from kconfiglib.core import expr_value +-from kconfiglib.core import split_expr +-from kconfiglib.core import standard_config_filename +-from kconfiglib.core import standard_kconfig +-from kconfiglib.core import standard_sc_expr_str ++from espkconfiglib.core import AND ++from espkconfiglib.core import BOOL ++from espkconfiglib.core import BOOL_TO_STR ++from espkconfiglib.core import COMMENT ++from espkconfiglib.core import HEX ++from espkconfiglib.core import INT ++from espkconfiglib.core import MENU ++from espkconfiglib.core import OR ++from espkconfiglib.core import STRING ++from espkconfiglib.core import TYPE_TO_STR ++from espkconfiglib.core import Choice ++from espkconfiglib.core import MenuNode ++from espkconfiglib.core import Symbol ++from espkconfiglib.core import expr_str ++from espkconfiglib.core import expr_value ++from espkconfiglib.core import split_expr ++from espkconfiglib.core import standard_config_filename ++from espkconfiglib.core import standard_kconfig ++from espkconfiglib.core import standard_sc_expr_str + + _IS_WINDOWS = os.name == "nt" # Are we running on Windows? + diff --git a/dev-embedded/esp-idf-kconfig/files/esp-idf-kconfig-2.5.2-rename-kconfiglib.patch b/dev-embedded/esp-idf-kconfig/files/esp-idf-kconfig-2.5.2-rename-kconfiglib.patch new file mode 100644 index 000000000000..7a21175298ac --- /dev/null +++ b/dev-embedded/esp-idf-kconfig/files/esp-idf-kconfig-2.5.2-rename-kconfiglib.patch @@ -0,0 +1,160 @@ +# Needed to avoid conflicts with dev-python/kconfiglib +# See https://github.com/espressif/esp-idf-kconfig/issues/13 for context +diff --git c/esp_idf_kconfig/gen_kconfig_doc.py w/esp_idf_kconfig/gen_kconfig_doc.py +index 87d0c1a..cb83260 100644 +--- c/esp_idf_kconfig/gen_kconfig_doc.py ++++ w/esp_idf_kconfig/gen_kconfig_doc.py +@@ -11,7 +11,7 @@ + # SPDX-License-Identifier: Apache-2.0 + import re + +-import kconfiglib.core as kconfiglib ++import espkconfiglib.core as kconfiglib + + # Indentation to be used in the generated file + INDENT = " " +diff --git c/kconfiglib/__init__.py w/espkconfiglib/__init__.py +similarity index 100% +rename from kconfiglib/__init__.py +rename to espkconfiglib/__init__.py +diff --git c/kconfiglib/core.py w/espkconfiglib/core.py +similarity index 99% +rename from kconfiglib/core.py +rename to espkconfiglib/core.py +index 7753b6f..e4dabee 100644 +--- c/kconfiglib/core.py ++++ w/espkconfiglib/core.py +@@ -2,7 +2,7 @@ + # SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD + # SPDX-FileCopyrightText: 2011-2019, Ulf Magnusson + # SPDX-License-Identifier: ISC +-# This file is copied from kconfiglib project: ++# This file is copied from espkconfiglib project: + # https://github.com/ulfalizer/Kconfiglib/commit/061e71f7d78cb057762d88de088055361863deff + import errno + import importlib +@@ -2524,7 +2524,7 @@ class Kconfig(object): + returns node that was parsed as a last one in this function. + probably will be deprecated as the call logic is different from the original. + """ +- from kconfiglib.kconfig_parser import Parser ++ from espkconfiglib.kconfig_parser import Parser + + parser = Parser(kconfig=self) + +diff --git c/kconfiglib/kconfig_grammar.py w/espkconfiglib/kconfig_grammar.py +similarity index 99% +rename from kconfiglib/kconfig_grammar.py +rename to espkconfiglib/kconfig_grammar.py +index a446b08..112a9b5 100644 +--- c/kconfiglib/kconfig_grammar.py ++++ w/espkconfiglib/kconfig_grammar.py +@@ -29,7 +29,7 @@ from pyparsing import infix_notation + from pyparsing import one_of + + if TYPE_CHECKING: +- from kconfiglib.kconfig_parser import Parser ++ from espkconfiglib.kconfig_parser import Parser + + + class KconfigBlock(Token): +diff --git c/kconfiglib/kconfig_parser.py w/espkconfiglib/kconfig_parser.py +similarity index 99% +rename from kconfiglib/kconfig_parser.py +rename to espkconfiglib/kconfig_parser.py +index a7c4801..08349ee 100644 +--- c/kconfiglib/kconfig_parser.py ++++ w/espkconfiglib/kconfig_parser.py +@@ -17,7 +17,7 @@ from pyparsing import ParseResults + from pyparsing import line as pyparsing_line + from pyparsing import lineno + +-from kconfiglib.kconfig_grammar import KconfigGrammar ++from espkconfiglib.kconfig_grammar import KconfigGrammar + + from .core import AND + from .core import BOOL +diff --git c/kconfgen/core.py w/kconfgen/core.py +index 5e9e660..5709b5a 100755 +--- c/kconfgen/core.py ++++ w/kconfgen/core.py +@@ -27,7 +27,7 @@ from typing import Set + from typing import Tuple + + import esp_idf_kconfig.gen_kconfig_doc as gen_kconfig_doc +-import kconfiglib.core as kconfiglib ++import espkconfiglib.core as kconfiglib + from esp_idf_kconfig import __version__ + + +diff --git c/kconfserver/core.py w/kconfserver/core.py +index fead552..8693663 100644 +--- c/kconfserver/core.py ++++ w/kconfserver/core.py +@@ -13,7 +13,7 @@ import tempfile + from json import JSONDecodeError + + import kconfgen.core as kconfgen +-import kconfiglib.core as kconfiglib ++import espkconfiglib.core as kconfiglib + from esp_idf_kconfig import __version__ + + # Min/Max supported protocol versions +diff --git c/menuconfig/core.py w/menuconfig/core.py +index 1d71292..2fa6cdd 100755 +--- c/menuconfig/core.py ++++ w/menuconfig/core.py +@@ -2,7 +2,7 @@ + # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + # SPDX-FileCopyrightText: 2018-2019, Nordic Semiconductor ASA and Ulf Magnusson + # SPDX-License-Identifier: ISC +-# This file is copied from kconfiglib project: ++# This file is copied from espkconfiglib project: + # https://github.com/ulfalizer/Kconfiglib/commit/061e71f7d78cb057762d88de088055361863deff + """ + Overview +@@ -193,25 +193,25 @@ import sys + import textwrap + from typing import Union + +-from kconfiglib.core import AND +-from kconfiglib.core import BOOL +-from kconfiglib.core import BOOL_TO_STR +-from kconfiglib.core import COMMENT +-from kconfiglib.core import HEX +-from kconfiglib.core import INT +-from kconfiglib.core import MENU +-from kconfiglib.core import OR +-from kconfiglib.core import STRING +-from kconfiglib.core import TYPE_TO_STR +-from kconfiglib.core import Choice +-from kconfiglib.core import MenuNode +-from kconfiglib.core import Symbol +-from kconfiglib.core import expr_str +-from kconfiglib.core import expr_value +-from kconfiglib.core import split_expr +-from kconfiglib.core import standard_config_filename +-from kconfiglib.core import standard_kconfig +-from kconfiglib.core import standard_sc_expr_str ++from espkconfiglib.core import AND ++from espkconfiglib.core import BOOL ++from espkconfiglib.core import BOOL_TO_STR ++from espkconfiglib.core import COMMENT ++from espkconfiglib.core import HEX ++from espkconfiglib.core import INT ++from espkconfiglib.core import MENU ++from espkconfiglib.core import OR ++from espkconfiglib.core import STRING ++from espkconfiglib.core import TYPE_TO_STR ++from espkconfiglib.core import Choice ++from espkconfiglib.core import MenuNode ++from espkconfiglib.core import Symbol ++from espkconfiglib.core import expr_str ++from espkconfiglib.core import expr_value ++from espkconfiglib.core import split_expr ++from espkconfiglib.core import standard_config_filename ++from espkconfiglib.core import standard_kconfig ++from espkconfiglib.core import standard_sc_expr_str + + _IS_WINDOWS = os.name == "nt" # Are we running on Windows? + diff --git a/dev-embedded/esp-idf-kconfig/metadata.xml b/dev-embedded/esp-idf-kconfig/metadata.xml new file mode 100644 index 000000000000..0a812141c6cb --- /dev/null +++ b/dev-embedded/esp-idf-kconfig/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/esp-idf-kconfig</remote-id> + <remote-id type="pypi">esp-idf-kconfig</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esp-idf-monitor/Manifest b/dev-embedded/esp-idf-monitor/Manifest new file mode 100644 index 000000000000..3b12b024f830 --- /dev/null +++ b/dev-embedded/esp-idf-monitor/Manifest @@ -0,0 +1,2 @@ +DIST esp_idf_monitor-1.8.0.tar.gz 48324 BLAKE2B e21c7a427b3f2d3bdff865fd6b83ac7af0bcb7b2e86e36478a509b0330273f4cb6947948ad1dabb8bbb2052a48395012dc1bc972fb9096a11a4dd63555002445 SHA512 34a65372fd68e796aac13aec7ddb8713341d2f136916a5aeecda8d3fe724bb8d2c5175358717fe65390f9dff220bff2402e3bbf655d55931984ee0e7b5a8b118 +DIST esp_idf_monitor-1.9.0.tar.gz 53402 BLAKE2B 727aedcff8f38348dade50a14791124fbc851e2512810c6f420699b77cdc7757a1d545be0e6f16049abaf37b3b5bce7195376df09b6cd3861a0c9f2c264cb1c9 SHA512 f155a50616703f4c32e2122a2cb65cbb746f5ba83c2e937e94d5c2155c3f2d13cc5358d6b66514cf3bc53394eee955fe935296c6681866a4084da4564e5f90a4 diff --git a/dev-embedded/esp-idf-monitor/esp-idf-monitor-1.8.0.ebuild b/dev-embedded/esp-idf-monitor/esp-idf-monitor-1.8.0.ebuild new file mode 100644 index 000000000000..3d9a19dfb46c --- /dev/null +++ b/dev-embedded/esp-idf-monitor/esp-idf-monitor-1.8.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python object-oriented database" +HOMEPAGE="https://github.com/espressif/esp-idf-monitor" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-embedded/esp-coredump[${PYTHON_USEDEP}] + dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}] + dev-python/pyserial[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" diff --git a/dev-embedded/esp-idf-monitor/esp-idf-monitor-1.9.0.ebuild b/dev-embedded/esp-idf-monitor/esp-idf-monitor-1.9.0.ebuild new file mode 100644 index 000000000000..3d9a19dfb46c --- /dev/null +++ b/dev-embedded/esp-idf-monitor/esp-idf-monitor-1.9.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python object-oriented database" +HOMEPAGE="https://github.com/espressif/esp-idf-monitor" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-embedded/esp-coredump[${PYTHON_USEDEP}] + dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}] + dev-python/pyserial[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" diff --git a/dev-embedded/esp-idf-monitor/metadata.xml b/dev-embedded/esp-idf-monitor/metadata.xml new file mode 100644 index 000000000000..a40032c8bc49 --- /dev/null +++ b/dev-embedded/esp-idf-monitor/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/esp-idf-monitor</remote-id> + <remote-id type="pypi">esp-idf-monitor</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esp-idf-nvs-partition-gen/Manifest b/dev-embedded/esp-idf-nvs-partition-gen/Manifest new file mode 100644 index 000000000000..b6f6f2429a10 --- /dev/null +++ b/dev-embedded/esp-idf-nvs-partition-gen/Manifest @@ -0,0 +1 @@ +DIST esp_idf_nvs_partition_gen-0.1.9.tar.gz 24332 BLAKE2B 61592b26459e8e6822d1d724c1192fd6fd2741e5eda66fe5bd6e2a725242ee3c8b27346cc0488a591f9f2a7dccb2c28207cbaa5fd82d431a60afb3d9ee7e5f3f SHA512 91b06f5775f720684f75f03dfd7bf093b7013898d8cbe9b65f6d62c3a92398caafa590db997eb0fec7b30c1da3a7512c5d98ead19c6debaecaedc54e8302f634 diff --git a/dev-embedded/esp-idf-nvs-partition-gen/esp-idf-nvs-partition-gen-0.1.9.ebuild b/dev-embedded/esp-idf-nvs-partition-gen/esp-idf-nvs-partition-gen-0.1.9.ebuild new file mode 100644 index 000000000000..2ad8143b7e14 --- /dev/null +++ b/dev-embedded/esp-idf-nvs-partition-gen/esp-idf-nvs-partition-gen-0.1.9.ebuild @@ -0,0 +1,16 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Parses ESP-IDF panic handler output acts as a GDB server over stdin/stdout" +HOMEPAGE="https://github.com/espressif/esp-idf-nvs-partition-gen" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" diff --git a/dev-embedded/esp-idf-nvs-partition-gen/metadata.xml b/dev-embedded/esp-idf-nvs-partition-gen/metadata.xml new file mode 100644 index 000000000000..c5fb7aa9bcf0 --- /dev/null +++ b/dev-embedded/esp-idf-nvs-partition-gen/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/esp-idf-nvs-partition-gen</remote-id> + <remote-id type="pypi">esp-idf-nvs-partition-gen</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esp-idf-panic-decoder/Manifest b/dev-embedded/esp-idf-panic-decoder/Manifest new file mode 100644 index 000000000000..ae8b68273bd3 --- /dev/null +++ b/dev-embedded/esp-idf-panic-decoder/Manifest @@ -0,0 +1,2 @@ +DIST esp_idf_panic_decoder-1.4.1.tar.gz 21772 BLAKE2B 3a972cb735d5dd72edd2aedc98e7d75a3d4d5145f882c2ce0a1e912661609929a3ff7ed7e90d4fb9cce34ceb0a0e01847cce04a17d1a99209925d6bc441b07ef SHA512 88d05bd30cd420c1cc0b437861b2b907b68e5795e21f8d85f8d29aa2e754a7be0e308d38da4cbf67b5ddf5bd6311a352fd2004b0811698eaabc026f8a79b869d +DIST esp_idf_panic_decoder-1.5.0.tar.gz 21841 BLAKE2B 2d451dac1bf259403c4e82233cca576b370cce757973fd0efe9c1f2473177e2744fb332495ea64353fd862e13928c65a8f0afc26e2956a7afdbfda93180147f6 SHA512 da9e84e4a84938a2fa9e8d2041db9dae6791676897d665332312c4ec8b32c5eb11115324b10a91cbd2dca66ce9dfe00689a1df9e2cf3638a74257b52dec17c6d diff --git a/dev-embedded/esp-idf-panic-decoder/esp-idf-panic-decoder-1.4.1.ebuild b/dev-embedded/esp-idf-panic-decoder/esp-idf-panic-decoder-1.4.1.ebuild new file mode 100644 index 000000000000..a8ebbf65f393 --- /dev/null +++ b/dev-embedded/esp-idf-panic-decoder/esp-idf-panic-decoder-1.4.1.ebuild @@ -0,0 +1,23 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Parses ESP-IDF panic handler output acts as a GDB server over stdin/stdout" +HOMEPAGE="https://github.com/espressif/esp-idf-panic-decoder" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-python/pyelftools[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" diff --git a/dev-embedded/esp-idf-panic-decoder/esp-idf-panic-decoder-1.5.0.ebuild b/dev-embedded/esp-idf-panic-decoder/esp-idf-panic-decoder-1.5.0.ebuild new file mode 100644 index 000000000000..a31125d89cee --- /dev/null +++ b/dev-embedded/esp-idf-panic-decoder/esp-idf-panic-decoder-1.5.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Parses ESP-IDF panic handler output acts as a GDB server over stdin/stdout" +HOMEPAGE="https://github.com/espressif/esp-idf-panic-decoder" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-python/pyelftools[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" diff --git a/dev-embedded/esp-idf-panic-decoder/metadata.xml b/dev-embedded/esp-idf-panic-decoder/metadata.xml new file mode 100644 index 000000000000..7abccefa1379 --- /dev/null +++ b/dev-embedded/esp-idf-panic-decoder/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/esp-idf-panic-decoder</remote-id> + <remote-id type="pypi">esp-idf-panic-decoder</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esp-idf-size/Manifest b/dev-embedded/esp-idf-size/Manifest new file mode 100644 index 000000000000..0472590a4dff --- /dev/null +++ b/dev-embedded/esp-idf-size/Manifest @@ -0,0 +1,3 @@ +DIST esp_idf_size-1.7.1.tar.gz 73712 BLAKE2B da73be60605336ca35191db2f1f0860cfa96ca3f2acd412c8bc1c6244159c3f0eb8ed5e39a52cac0919c128e6bcdf8ccad6b36a2a28ca1f0b46f6769f35f4086 SHA512 1b0b7f5fd84c9de3901256453c068538261b88ffaa3259b8e0686e24ee50074987ce770d57566d4a380f1ffa5704fab900f228d519e783b308a537ebf7c4ffaf +DIST esp_idf_size-2.1.0.tar.gz 61201 BLAKE2B 326257b0842a1d33648c409bc967587ae54a93a9dbbf599ecdf23ead7472cec599b8f50381bfe450505f4e473704e826093d04de419601f3e42246a3a98a8df3 SHA512 7894adccf9be81635ec52b872b9af860d18db3b7b692f51cef655d3604f51069e8c64ccabda62bdb5edabdd177aa1cd9b31ae44253b16ef58f0fa0ff145a8396 +DIST esp_idf_size-2.2.0.tar.gz 61926 BLAKE2B 3289234a8fa28f9c674ed2008bdf56ee9eae7cfa461e1a6314e7f081c3fb6dfe8b5b7c0f149444265db6c63243bbc5719676b242d095499a13380ccf8709fe24 SHA512 b25da169734ac9fd11bb549b126c164baece26f8de36480bf9f736c379bb5816808a517fc49fc9ed1a313e6b52da877ae008e1aa617e697accf4e66a57e39338 diff --git a/dev-embedded/esp-idf-size/esp-idf-size-1.7.1.ebuild b/dev-embedded/esp-idf-size/esp-idf-size-1.7.1.ebuild new file mode 100644 index 000000000000..4be615e8ffe7 --- /dev/null +++ b/dev-embedded/esp-idf-size/esp-idf-size-1.7.1.ebuild @@ -0,0 +1,26 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Firmware size analysis for ESP-IDF" +HOMEPAGE="https://github.com/espressif/esp-idf-size" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-python/pyelftools[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/rich[${PYTHON_USEDEP}] +" + +DEPEND="${RDEPEND}" diff --git a/dev-embedded/esp-idf-size/esp-idf-size-2.1.0.ebuild b/dev-embedded/esp-idf-size/esp-idf-size-2.1.0.ebuild new file mode 100644 index 000000000000..4be615e8ffe7 --- /dev/null +++ b/dev-embedded/esp-idf-size/esp-idf-size-2.1.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Firmware size analysis for ESP-IDF" +HOMEPAGE="https://github.com/espressif/esp-idf-size" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="test" + +RDEPEND=" + dev-python/pyelftools[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/rich[${PYTHON_USEDEP}] +" + +DEPEND="${RDEPEND}" diff --git a/dev-embedded/esp-idf-size/esp-idf-size-2.2.0.ebuild b/dev-embedded/esp-idf-size/esp-idf-size-2.2.0.ebuild new file mode 100644 index 000000000000..879271ba615c --- /dev/null +++ b/dev-embedded/esp-idf-size/esp-idf-size-2.2.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Firmware size analysis for ESP-IDF" +HOMEPAGE="https://github.com/espressif/esp-idf-size" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +# requires aditional files not present in repository +RESTRICT="test" + +RDEPEND=" + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/rich[${PYTHON_USEDEP}] +" + +DEPEND="${RDEPEND}" diff --git a/dev-embedded/esp-idf-size/metadata.xml b/dev-embedded/esp-idf-size/metadata.xml new file mode 100644 index 000000000000..2c0a9dac5769 --- /dev/null +++ b/dev-embedded/esp-idf-size/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/esp-idf-size</remote-id> + <remote-id type="pypi">esp-idf-size</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest new file mode 100644 index 000000000000..baab6746ed33 --- /dev/null +++ b/dev-embedded/esp-idf/Manifest @@ -0,0 +1,12 @@ +DIST esp-idf-5.4.4.zip 1988234779 BLAKE2B d8ebf069b71addf6052544da837089a3607a30a1873be9fa4bcd0a32eb683472000d45e4ea35105871320dc7d7f2101ac890801377a93b032e72a24228851121 SHA512 f1fd1a25a96cc3d56404eadd2808a9db9c6c620f0e64ba3ccf1c1cbe671372adc9af379da77b68a647a0f7bfde24866235157771c7f10dcd2352ff1414c83d9b +DIST esp-idf-5.5.4.zip 1829210055 BLAKE2B 607effb487d67a614d5bfe9e49912362668e9dddfbd92550287d4657abde691bc2b6d62a10a2013b3ae3696f607623eee5fed10afa4a32036c28df4881d4c5e5 SHA512 5c59b21169dee3161517de63c7f02c6838aeac4725410a86654095a80dbe3c0e7da92d6889a5aaf8a8914f7d583a27987609d948b231b1c17ac988b3c97d66b7 +DIST esp-idf-6.0.1.zip 1825997344 BLAKE2B c318ec28f06b7bea6ff6496c674817eef714e1762a75765b412d8f1a7663574cd598ac9ad2786062b8b3e1bf5959c70c8fca398a219cb5b202689686542b1aba SHA512 c0813fa92adfbe5c664e6d121564b7d8e590ae32d9dfe0551bed7237fca38b0318c521e85e82321d5dcb067b48455d22b8c0142629488b243b8829149365d132 +DIST esp-idf-6.0.zip 1779685216 BLAKE2B d2585d87f7ec25fea444c2fdb2890e622fdf432720b4772bbfc7f65904a88b09b5fbc69ace8321d8921dbeabfa1f911d317d6d204e9fa883d86370987d053233 SHA512 acc0ca998aeb0a9c500ed4434e38099ffdfe515b5440d0424ca440d532000491fe9401d664da4c2e82d6bc5a4059c541f25e17381200e8d3b3a4d73ad5322ce6 +DIST openocd-esp32-linux-amd64-0.12.0-esp32-20251215.tar.gz 2547606 BLAKE2B c7f875f2b63f0dff29239a4623b06f96760773a7686fa6a9aa0074fd4b10dff6621e09838402a62222cf282a120399fbe7b6cbc4fb70a7c0f4d96c85e02c3e46 SHA512 a6e52a5b35cf053f45d917dbcea87087cad42cdb09381c082c20fac43f65ae341949223f55289bc6c084db61d4a963a8277e030202db4495578801ea7e83b281 +DIST openocd-esp32-linux-amd64-0.12.0-esp32-20260304.tar.gz 2603774 BLAKE2B 8621a8c888623c6c5d8414fea4fd4ec4730a19dbad0f75f2f9dbdfec5a56f8e69ed7d60553034dce9b2b85d9427d626e80816281ca55cd9d21f4458c0fca35ee SHA512 516973e361af37a82cff42114603d51581fc41cecf5cfdaf0ead87cccf19f723b94865c8472de11b33ff747fa563a67d72fc801229bc29180b2d74f061ffea60 +DIST riscv32-esp-elf-14.2.0_20260121-x86_64-linux-gnu.tar.xz 292412032 BLAKE2B 8ad34f39932b41806c5c7d6b65b0aad3f454509ea881a24af6a4e01bd76a09041f9f1ab87205ba60b4b93982f32545d4ff71e66368fc37523840bc8c80943bf8 SHA512 f64cb726b9d11ca8dde1a8362ac448fcf0eefb0348cca8f10642671fed2a76ec3da2ef09c5d0738aecca2d45aa40ee8ee3d4fa8cd7538c83067ba09dd392a9ac +DIST riscv32-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz 393927372 BLAKE2B b4844981283489a18a7ae2c1453fce520a534ed2e6178a52c33ff06330eb2ac4f13c6d0449cd500aa459647d572e747ea455c73eb95efa1f371718afe7d1ef16 SHA512 b66569cffcaee5b23cab8ba19a711fc6dbbcbbda391e3dc71d5d2e26ae8991a2f333a2f00aecfddc76fe5062df20efc70e8c64c0927af5c817e96b7dd641b881 +DIST riscv32-esp-elf-gdb-16.3_20250913-x86_64-linux-gnu.tar.gz 36557187 BLAKE2B 3a51c074b72fe5630d10faee8c2369ef3089107a866f31de40bf31da291dd1c14077bda79de350130853fa9dfbd85a519e33229014d06868364245815c723f4c SHA512 b813bbe14d602f39d663941f990c5e6e7e59cc5ee60949003ee818d47e4962028fe43f3d1eb1f52fba7176db0d7b2a5af5eb96b12857f4b6f88c4a102ed43597 +DIST xtensa-esp-elf-14.2.0_20260121-x86_64-linux-gnu.tar.xz 176559292 BLAKE2B dc0bcb08f376ad82fa71c0141bdaf763cf82432bc1649480576c1b16938be90686501abcc065e168cc9e21b2d69ad2d8850b5de71e844b7b69ca5df4934f61b7 SHA512 404eade857e72ecbb08d9740aafafa201e930c9dfe1dc7ece60368b9ef16909548983679e0da7736ae7e7b542439c1917f9652de85a913f244b566e3a9ef47b2 +DIST xtensa-esp-elf-15.2.0_20251204-x86_64-linux-gnu.tar.xz 180530004 BLAKE2B d5aa73b2445155aa9758c153a920e75766f0453cae4a70e0e81b3281049af8c82318e24fff26cf981a5fbf79848ec354427c8174662c3d4ebbebf5cf33923eef SHA512 1e30c757a92e100ca0a19fa7d5205d213c5bfc5329e8368d64aa38c24a738946fdda9d66d7c2d44c2acd12f8a06fd8db92eb77a914c066c4b44355aa819b7171 +DIST xtensa-esp-elf-gdb-16.3_20250913-x86_64-linux-gnu.tar.gz 36396804 BLAKE2B 8271884d5aa3efa261165e24e440d69bb16c4a609f0c6a0b10ae67bd26c9567751e72f21fabcfdc3f89b6aa918950d8d9e05d8d0c005a6618bd582fd6f2808bf SHA512 436cf5fc116d62d712452eb3d687d0c69ab2df3ac6ffd53fd061698061b246f81dbe1ef881a4466597810eaa6da4b2f82f0e8a7980a51f48e948ee1e9b43748a diff --git a/dev-embedded/esp-idf/esp-idf-5.4.4.ebuild b/dev-embedded/esp-idf/esp-idf-5.4.4.ebuild new file mode 100644 index 000000000000..901d970cd3bd --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-5.4.4.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_GDB_USE=( python_targets_python3_12 ) +VER="14.2.0_20260121" +GDB_VER="16.3_20250913" +OPENOCD_VER="0.12.0-esp32-20260304" + +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-5.0.0 + <dev-embedded/esp-idf-kconfig-3.0.0[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-monitor-2.0.0[${PYTHON_USEDEP}] + dev-embedded/esp-idf-nvs-partition-gen[${PYTHON_USEDEP}] + dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-size-2.0.0[${PYTHON_USEDEP}] + dev-embedded/freertos-gdb[${PYTHON_USEDEP}] + <dev-embedded/idf-component-manager-3.0.0[${PYTHON_USEDEP}] + virtual/zlib:= +" + +RESTRICT="strip mirror" + +QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*" +QA_PRESTRIPPED="opt/*" + +PATCHES=( + "${FILESDIR}/allow-system-install-${PN}-5.3.patch" + "${FILESDIR}/${PN}-espkconfiglib.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..11} || die + if use riscv32; then + rm "${WORKDIR}"/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb-3.{8..11} || 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/esp-idf-5.5.4.ebuild b/dev-embedded/esp-idf/esp-idf-5.5.4.ebuild new file mode 100644 index 000000000000..c761905acffb --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-5.5.4.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# TODO: add esp-doc package in order to build documentation +# TODO: add examples USE +# TODO: fix to python-single which should help to fix python-gdb dep + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_GDB_USE=( python_targets_python3_{12..13} ) +VER="14.2.0_20260121" +GDB_VER="16.3_20250913" +OPENOCD_VER="0.12.0-esp32-20251215" + +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-build/cmake + 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-diag[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-kconfig-3.0.0[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-monitor-2.0.0[${PYTHON_USEDEP}] + dev-embedded/esp-idf-nvs-partition-gen[${PYTHON_USEDEP}] + dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-size-2.0.0[${PYTHON_USEDEP}] + dev-embedded/freertos-gdb[${PYTHON_USEDEP}] + <dev-embedded/idf-component-manager-3.0.0[${PYTHON_USEDEP}] + virtual/zlib:= +" + +RESTRICT="strip" + +QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*" + +PATCHES=( + "${FILESDIR}/allow-system-install-${PN}-5.3.patch" + "${FILESDIR}/${PN}-espkconfiglib.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..11} || die + if use riscv32; then + rm "${WORKDIR}"/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb-3.{8..11} || 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 + + newenvd - 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 + + 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/esp-idf-6.0-r1.ebuild b/dev-embedded/esp-idf/esp-idf-6.0-r1.ebuild new file mode 100644 index 000000000000..1818f4c20b78 --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-6.0-r1.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# TODO: add esp-doc package in order to build documentation +# TODO: add examples USE +# TODO: fix to python-single which should help to fix python-gdb dep + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_GDB_USE=( python_targets_python3_{12..13} ) +VER="15.2.0_20251204" +GDB_VER="16.3_20250913" +OPENOCD_VER="0.12.0-esp32-20251215" + +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-build/cmake + 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-diag[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-kconfig-4.0.0[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-monitor-2.0.0[${PYTHON_USEDEP}] + dev-embedded/esp-idf-nvs-partition-gen[${PYTHON_USEDEP}] + dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-size-3.0.0[${PYTHON_USEDEP}] + dev-embedded/freertos-gdb[${PYTHON_USEDEP}] + dev-embedded/idf-component-manager[${PYTHON_USEDEP}] + virtual/zlib:= +" + +RESTRICT="strip" + +QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*" + +PATCHES=( + "${FILESDIR}/allow-system-install-${PN}-5.3.patch" + "${FILESDIR}/${P}-build-fix.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 + + newenvd - 99esp-idf <<-EOF + IDF_PATH=/usr/share/${PN} + ESP_IDF_VERSION=${PV} + ESP_ROM_ELF_DIR=/usr/share/${PN}/tools + OPENOCD_SCRIPTS=/opt/openocd-esp32/share/openocd/scripts +EOF + + 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/esp-idf-6.0.1-r1.ebuild b/dev-embedded/esp-idf/esp-idf-6.0.1-r1.ebuild new file mode 100644 index 000000000000..00992d7a635e --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-6.0.1-r1.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# TODO: add esp-doc package in order to build documentation +# TODO: add examples USE +# TODO: fix to python-single which should help to fix python-gdb dep + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_GDB_USE=( python_targets_python3_{12..14} ) +VER="15.2.0_20251204" +GDB_VER="16.3_20250913" +OPENOCD_VER="0.12.0-esp32-20260304" + +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-build/cmake + 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-diag[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-kconfig-4.0.0[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-monitor-2.0.0[${PYTHON_USEDEP}] + dev-embedded/esp-idf-nvs-partition-gen[${PYTHON_USEDEP}] + dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-size-3.0.0[${PYTHON_USEDEP}] + dev-embedded/freertos-gdb[${PYTHON_USEDEP}] + dev-embedded/idf-component-manager[${PYTHON_USEDEP}] + virtual/zlib:= +" + +RESTRICT="strip" + +QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*" + +PATCHES=( + "${FILESDIR}/allow-system-install-${PN}-5.3.patch" + "${FILESDIR}/${PN}-6.0-build-fix.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 + + ( + 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 + ) + + if [[ -d "../${1}/bin" ]]; then + exeinto /opt/${1}/bin + doexe ../${1}/bin/* + + ( + 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 + ) + fi + + 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 + install_tool xtensa-esp-elf/picolibc + install_tool xtensa-esp-elf/picolibc/xtensa-esp-elf + + if use riscv32; then + install_tool riscv32-esp-elf + install_tool riscv32-esp-elf/riscv32-esp-elf + install_tool riscv32-esp-elf/picolibc + install_tool riscv32-esp-elf/picolibcriscv32-esp-elf + fi + + install_tool openocd-esp32 + + # Remove unsupported python versions + rm "${WORKDIR}"/xtensa-esp-elf-gdb/bin/xtensa-esp-elf-gdb-3.{8..11} || die + if use riscv32; then + rm "${WORKDIR}"/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb-3.{8..11} || 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 + + newenvd - 99esp-idf <<-EOF + IDF_PATH=/usr/share/${PN} + ESP_IDF_VERSION=${PV} + ESP_ROM_ELF_DIR=/usr/share/${PN}/tools + OPENOCD_SCRIPTS=/opt/openocd-esp32/share/openocd/scripts +EOF + + 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/esp-idf-6.0.1.ebuild b/dev-embedded/esp-idf/esp-idf-6.0.1.ebuild new file mode 100644 index 000000000000..f01495169432 --- /dev/null +++ b/dev-embedded/esp-idf/esp-idf-6.0.1.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# TODO: add esp-doc package in order to build documentation +# TODO: add examples USE +# TODO: fix to python-single which should help to fix python-gdb dep + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_GDB_USE=( python_targets_python3_{12..14} ) +VER="15.2.0_20251204" +GDB_VER="16.3_20250913" +OPENOCD_VER="0.12.0-esp32-20260304" + +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-build/cmake + 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-diag[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-kconfig-4.0.0[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-monitor-2.0.0[${PYTHON_USEDEP}] + dev-embedded/esp-idf-nvs-partition-gen[${PYTHON_USEDEP}] + dev-embedded/esp-idf-panic-decoder[${PYTHON_USEDEP}] + <dev-embedded/esp-idf-size-3.0.0[${PYTHON_USEDEP}] + dev-embedded/freertos-gdb[${PYTHON_USEDEP}] + dev-embedded/idf-component-manager[${PYTHON_USEDEP}] + virtual/zlib:= +" + +RESTRICT="strip" + +QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*" + +PATCHES=( + "${FILESDIR}/allow-system-install-${PN}-5.3.patch" + "${FILESDIR}/${PN}-6.0-build-fix.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..11} || die + if use riscv32; then + rm "${WORKDIR}"/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb-3.{8..11} || 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 + + newenvd - 99esp-idf <<-EOF + IDF_PATH=/usr/share/${PN} + ESP_IDF_VERSION=${PV} + ESP_ROM_ELF_DIR=/usr/share/${PN}/tools + OPENOCD_SCRIPTS=/opt/openocd-esp32/share/openocd/scripts +EOF + + 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/files/allow-system-install-esp-idf-5.3.patch b/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.3.patch new file mode 100644 index 000000000000..2b2a3de260d0 --- /dev/null +++ b/dev-embedded/esp-idf/files/allow-system-install-esp-idf-5.3.patch @@ -0,0 +1,12 @@ +diff --git a/tools/idf_tools.py b/tools/idf_tools.py +index 4c0cfe8b68..e20b7152df 100755 +--- a/tools/idf_tools.py ++++ b/tools/idf_tools.py +@@ -2685,6 +2685,7 @@ def action_check_python_dependencies(args): # type: ignore + Checks if all the dependencies (from requirements, constraints...) are installed properly. + Raises SystemExit if not. + """ ++ 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/files/esp-idf-6.0-build-fix.patch b/dev-embedded/esp-idf/files/esp-idf-6.0-build-fix.patch new file mode 100644 index 000000000000..a23bc5215a16 --- /dev/null +++ b/dev-embedded/esp-idf/files/esp-idf-6.0-build-fix.patch @@ -0,0 +1,21 @@ +See https://github.com/espressif/esp-idf/pull/18275 +diff --git i/components/esp_eth/include/esp_eth_mac_esp.h w/components/esp_eth/include/esp_eth_mac_esp.h +index 53cdbff68d..dd4d479624 100644 +--- i/components/esp_eth/include/esp_eth_mac_esp.h ++++ w/components/esp_eth/include/esp_eth_mac_esp.h +@@ -225,7 +225,6 @@ typedef bool (*ts_target_exceed_cb_from_isr_t)(esp_eth_mediator_t *eth, void *us + }, \ + .dma_burst_len = ETH_DMA_BURST_LEN_32, \ + .intr_priority = 0, \ +- .mdc_freq_hz = 0, \ + .emac_dataif_gpio = \ + { \ + .rmii = \ +@@ -246,6 +245,7 @@ typedef bool (*ts_target_exceed_cb_from_isr_t)(esp_eth_mediator_t *eth, void *us + .clock_gpio = -1 \ + } \ + }, \ ++ .mdc_freq_hz = 0, \ + } + #endif // CONFIG_IDF_TARGET_ESP32P4 + diff --git a/dev-embedded/esp-idf/files/esp-idf-espkconfiglib.patch b/dev-embedded/esp-idf/files/esp-idf-espkconfiglib.patch new file mode 100644 index 000000000000..0f446ee54316 --- /dev/null +++ b/dev-embedded/esp-idf/files/esp-idf-espkconfiglib.patch @@ -0,0 +1,22 @@ +diff --git i/tools/ldgen/ldgen/sdkconfig.py w/tools/ldgen/ldgen/sdkconfig.py +index 7899ae5f91..a9994d6b8d 100644 +--- i/tools/ldgen/ldgen/sdkconfig.py ++++ w/tools/ldgen/ldgen/sdkconfig.py +@@ -3,7 +3,7 @@ + # SPDX-License-Identifier: Apache-2.0 + # + +-import kconfiglib ++import espkconfiglib + + + class SDKConfig: +@@ -11,7 +11,7 @@ class SDKConfig: + Evaluates conditional expressions based on the build's sdkconfig and Kconfig files. + """ + def __init__(self, kconfig_file, sdkconfig_file): +- self.config = kconfiglib.Kconfig(kconfig_file) ++ self.config = espkconfiglib.Kconfig(kconfig_file) + self.config.load_config(sdkconfig_file) + self.config.warn = False # eval_string may contain un-declared symbol + diff --git a/dev-embedded/esp-idf/metadata.xml b/dev-embedded/esp-idf/metadata.xml new file mode 100644 index 000000000000..1b49a7a0c2e0 --- /dev/null +++ b/dev-embedded/esp-idf/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <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> + <remote-id type="github">espressif/esp-idf</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/esptool/Manifest b/dev-embedded/esptool/Manifest new file mode 100644 index 000000000000..658df12885df --- /dev/null +++ b/dev-embedded/esptool/Manifest @@ -0,0 +1,3 @@ +DIST esptool-4.10.0.tar.gz 5961194 BLAKE2B 153d57ec90dee53a237dcdf694e6add85d380421a30a4d2ff7c13f73a6511fb120d2a6071adc7327e6ce3cb82c496bd33c972a5739b6d565369e60453be73238 SHA512 98a5329d50286766a11c86b371cb4c383a9fa6de87dbdbc97afc8def63a9f6aba7b633467fb896ba93638006ac73cb1a243973b7daddbc7959e0988d0c00eb6d +DIST esptool-5.1.0.tar.gz 5904981 BLAKE2B e6f49ff15da617cac8f7a3c2558598430b53a1267632c4e06180ec121d063bf9b80ee5d646207ffa4da00c82fd23a890e07322174afa4d14aa75d1900414442f SHA512 07caaf96225d5b6cd6668cbd6022cf564e7b25f54ed2f2ed6345660c3d4f686ca1489937acd806b90ac30fd3bc15389116776932caa50d091404204d2712d954 +DIST esptool-5.2.0.tar.gz 6056496 BLAKE2B cc036196b9a8a84f9f44c5d5f44796d531510f967946c984f6b5c74c1bd8558ffd611f3f59fce9bcde3d7ab5f161e6ef4bc5520804ebec774bfcc60d61051f67 SHA512 df62952b12abb9d47a7f5a46ea00ce1bd59f32c73017e6b13f31eb2d197caec17810ff358e4a538ed9be958000de88bc97c5c74c41c06f9340e784aec5b6f7e6 diff --git a/dev-embedded/esptool/esptool-4.10.0.ebuild b/dev-embedded/esptool/esptool-4.10.0.ebuild new file mode 100644 index 000000000000..275ddcbcd4cb --- /dev/null +++ b/dev-embedded/esptool/esptool-4.10.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 2021-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 eapi9-ver + +DESCRIPTION="Utility to communicate with the ROM bootloader in Espressif ESP8266 and ESP32" +HOMEPAGE="https://github.com/espressif/esptool" +SRC_URI="https://github.com/espressif/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 x86" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/bitstring[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/ecdsa[${PYTHON_USEDEP}] + dev-python/intelhex[${PYTHON_USEDEP}] + dev-python/pyserial[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/reedsolo[${PYTHON_USEDEP}] + ') +" +BDEPEND=" + $(python_gen_cond_dep ' + dev-python/wheel[${PYTHON_USEDEP}] + ') + test? ( $(python_gen_cond_dep ' + dev-python/pyelftools[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + ') ) +" +distutils_enable_tests pytest +EPYTEST_DESELECT=( + # need real hardware connected + test/test_esptool.py + # need network + test/test_uf2_ids.py +) + +src_prepare() { + default + + # test_espsecure_hsm.py needs setup of a "Soft HSM" or real hardware. remove. + rm test/test_espsecure_hsm.py || die +} + +pkg_postinst() { + if ver_replacing -lt 4; then + ewarn "${P} - new 4.x release with breaking changes:" + ewarn " - Public API has been defined by limiting access to internals that have been refactored into multiple source files" + ewarn " - If active security features are detected, the default behavior changes to prevent unintentional bricking" + ewarn " - Flash parameters in an image header can now be changed only when no SHA256 digest is appended" + ewarn " - The ESP8684 alias has been removed, ESP32-C2 has to be used" + ewarn " - Megabit flash sizes have been deprecated, use megabyte units from now on" + fi +} diff --git a/dev-embedded/esptool/esptool-5.1.0.ebuild b/dev-embedded/esptool/esptool-5.1.0.ebuild new file mode 100644 index 000000000000..aec2d2c3f2c8 --- /dev/null +++ b/dev-embedded/esptool/esptool-5.1.0.ebuild @@ -0,0 +1,75 @@ +# Copyright 2021-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 eapi9-ver + +DESCRIPTION="Serial utility for flashing and interacting with Espressif ESP8266 and ESP32" +HOMEPAGE="https://github.com/espressif/esptool" +SRC_URI="https://github.com/espressif/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 x86" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/bitstring[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/intelhex[${PYTHON_USEDEP}] + dev-python/pyserial[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/reedsolo[${PYTHON_USEDEP}] + dev-python/rich-click[${PYTHON_USEDEP}] + ') +" +BDEPEND=" + $(python_gen_cond_dep ' + dev-python/wheel[${PYTHON_USEDEP}] + ') + test? ( $(python_gen_cond_dep ' + dev-python/pyelftools[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + ') ) +" +distutils_enable_tests pytest +EPYTEST_DESELECT=( + # need real hardware connected + test/test_esptool.py + # need network + test/test_uf2_ids.py +) + +src_prepare() { + default + + # test_espsecure_hsm.py needs setup of a "Soft HSM" or real hardware. remove. + rm test/test_espsecure_hsm.py || die +} + +pkg_postinst() { + if ver_replacing -lt 4; then + ewarn "${P} - new 4.x release with breaking changes:" + ewarn " - Public API has been defined by limiting access to internals that have been refactored into multiple source files" + ewarn " - If active security features are detected, the default behavior changes to prevent unintentional bricking" + ewarn " - Flash parameters in an image header can now be changed only when no SHA256 digest is appended" + ewarn " - The ESP8684 alias has been removed, ESP32-C2 has to be used" + ewarn " - Megabit flash sizes have been deprecated, use megabyte units from now on" + fi + if ver_replacing -lt 5; then + ewarn "${P} - new 5.x release with breaking changes:" + ewarn " - The .py suffix is deprecated for the following scripts:" + ewarn " - esptool" + ewarn " - espefuse" + ewarn " - espsecure" + ewarn " - esp_rfc2217_server" + ewarn " - execute-scripts command is removed" + ewarn "" + ewarn "The official announcement of the changes can be found here: https://developer.espressif.com/blog/2025/04/esptool-v5/" + fi +} diff --git a/dev-embedded/esptool/esptool-5.2.0.ebuild b/dev-embedded/esptool/esptool-5.2.0.ebuild new file mode 100644 index 000000000000..ab78660846c3 --- /dev/null +++ b/dev-embedded/esptool/esptool-5.2.0.ebuild @@ -0,0 +1,76 @@ +# Copyright 2021-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 eapi9-ver + +DESCRIPTION="Serial utility for flashing and interacting with Espressif ESP8266 and ESP32" +HOMEPAGE="https://github.com/espressif/esptool" +SRC_URI="https://github.com/espressif/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/bitstring[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/intelhex[${PYTHON_USEDEP}] + dev-python/pyserial[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/reedsolo[${PYTHON_USEDEP}] + dev-python/rich-click[${PYTHON_USEDEP}] + ') +" +BDEPEND=" + $(python_gen_cond_dep ' + dev-python/wheel[${PYTHON_USEDEP}] + ') + test? ( $(python_gen_cond_dep ' + dev-python/pyelftools[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + ') ) +" +EPYTEST_PLUGINS=( ) +distutils_enable_tests pytest +EPYTEST_DESELECT=( + # need real hardware connected + test/test_esptool.py + # need network + test/test_uf2_ids.py +) + +src_prepare() { + default + + # test_espsecure_hsm.py needs setup of a "Soft HSM" or real hardware. remove. + rm test/test_espsecure_hsm.py || die +} + +pkg_postinst() { + if ver_replacing -lt 4; then + ewarn "${P} - new 4.x release with breaking changes:" + ewarn " - Public API has been defined by limiting access to internals that have been refactored into multiple source files" + ewarn " - If active security features are detected, the default behavior changes to prevent unintentional bricking" + ewarn " - Flash parameters in an image header can now be changed only when no SHA256 digest is appended" + ewarn " - The ESP8684 alias has been removed, ESP32-C2 has to be used" + ewarn " - Megabit flash sizes have been deprecated, use megabyte units from now on" + fi + if ver_replacing -lt 5; then + ewarn "${P} - new 5.x release with breaking changes:" + ewarn " - The .py suffix is deprecated for the following scripts:" + ewarn " - esptool" + ewarn " - espefuse" + ewarn " - espsecure" + ewarn " - esp_rfc2217_server" + ewarn " - execute-scripts command is removed" + ewarn "" + ewarn "The official announcement of the changes can be found here: https://developer.espressif.com/blog/2025/04/esptool-v5/" + fi +} diff --git a/dev-embedded/esptool/metadata.xml b/dev-embedded/esptool/metadata.xml new file mode 100644 index 000000000000..1b55bbe42baf --- /dev/null +++ b/dev-embedded/esptool/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>martin.dummer@gmx.net</email> + <name>Martin Dummer</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <stabilize-allarches/> + <upstream> + <remote-id type="github">espressif/esptool</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/flip-link/Manifest b/dev-embedded/flip-link/Manifest new file mode 100644 index 000000000000..0032bee934a6 --- /dev/null +++ b/dev-embedded/flip-link/Manifest @@ -0,0 +1,37 @@ +DIST aho-corasick-1.1.4.crate 184015 BLAKE2B 088766e505a828a221a9bca29cb1833ac3964a538cda62d12b723a263fe0e588406af0b710cf87ef67b0ccb9aa3bf69f42e0e5225ade47abe93c73fcaca69ec1 SHA512 c77e35191b00546f5e499fab154170cedd619599e7250f92db9fba0a41c833eb426f214e58b00c5c39f8757406b33492b3241cb8cb233ce384ad0683c3ee4b62 +DIST anstyle-1.0.13.crate 17651 BLAKE2B 026d4163f4bc8d1677d0830dbe46fd335d18e50420d2d809a675609c1e020f7e3c5e69b8d0a7baf5f42fa2321b6230c619a93aaf8e02ceaef638f8006dbf479b SHA512 1a92c4bf6ff7262c0f5fe72ff66eaf11f0c84e84a06746767918903c0416ba5d33ac54ff9a2c6cde37e26bb2287675d3f0a8a7efa95eb013c9be388b8139661e +DIST assert_cmd-2.1.1.crate 27211 BLAKE2B 88f0a92ce37d5381edcd376760dd7b1572f30080c326356deaff6e086e23dbeb2731bf0dac07d85df6ca03753b9604626ce46380b1d9431d7e4de80fd18f3fff SHA512 e13ace350e832f3fb58e1f9ac775b12deb5567577a65e41ccdb49b42814a8fb9d1ce7cbd95c7a38a0bf543cb61e656128633ecb4627592bfb70c635b52e171fa +DIST bstr-1.12.1.crate 354916 BLAKE2B 07b8e047c7a115d7d722ef57a37c5ac1e7ddba080e35b4eed78c3104cd92f08af5e67609faaa7a480ae15031f54c3f5d88784e23c96e659a7f4800c42dad45c3 SHA512 63a1e62d43c4dce00f287421b1ec76accbbab7f0897c8df26227f533af325896c0c8921a873f4125381e7b89fbb69a4358a96698ec6ee61191955464ff1c84ac +DIST cfg-if-1.0.4.crate 9360 BLAKE2B beadbfb273ee97cbb6e3740891fbace57511399ad203459b66b397587d794677a9515cde4e9ec4320c3795518bf1551d72b9a889f8ac4b225168f493288b7c19 SHA512 176e04df7ba783b7143bb84397b777f5c5a1305c08a5c3a218d4a66830620be89ed68992ba27686165bcd3fb2f34b2daf80b2a1d4b481ecc267c988e84d28e9d +DIST difflib-0.4.0.crate 7638 BLAKE2B 57c703de0d467c997bcbedc4d6577569b3d72c612d3ccd929025a98f4bf8f72f2a0d43f3cd3bc616676c2569aed176b3c1362cfa868a4bb1197e05fe4dbce32f SHA512 fcb57859424fea6958a4407061c421599fbca111357b1fe72faa65d8fb0b74425c993a24484e8414f475fa146cd8368c4f82e1ceb4e8dd9f95741149345b37a9 +DIST env_filter-0.1.4.crate 15281 BLAKE2B 4c069793165e5adcbf59586a4bbf4aa436532d838f1b939ad92db011f51f1e337cdbd7e3b84cb9e7681d942c36400f169e0ed6f8b66429cdc77626010a781f68 SHA512 58ebb6a087e50c212fe1292a4e0fe6ce7154d3ca7164ffc6bab914e4300543726f4b7875918effcdbb660b08ccac67df7c91b1fc43f5fdf53ea7a46351ac9299 +DIST env_logger-0.11.8.crate 32538 BLAKE2B 9d62afecac4d4fb20bbb99611cade6ddbec17c8dedca94aeb13fad8fbfcf82988a55bb45400e78adf8257fb346b0d6cda3e2c2ed2332961d485055b365f396fb SHA512 84091355d3d9f2bfb1fdf4f1c6309444b513385d9b911f3af8cd1b5c467033769e7add11f65f31da8931dd05d96a348e0bcd670733d31ff981faf760d727afa7 +DIST evalexpr-12.0.3.crate 77874 BLAKE2B de537d084dd8489125ff2b5054070eb719ffc16fdcfc12d6f7213ea12aa57f0f6686938b4cbd2ed7b6932a7c7eabe29b8085ced9a1071adcb5457ea5878bb09a SHA512 3e2e925426b5aaec9559adcd49ae3f64329ea0d10965e5047f1bac6a80979400f55d606384a3f2910537461d40f218ab151fd10d933062e03b8a7992b5e24295 +DIST flip-link-0.1.12.tar.gz 30459 BLAKE2B 7537f0a0ed6e10a47b42a2b7942385f64e7fd75c51d0a7e05af40ad809794bcbfbac0f903746f3d2dee6f9118ba85b3826253f98e1362b69cceb294cc0b73c4a SHA512 401aba8c96069c34f1bb6c1e06f42a79aaa38365a8d39dfad823f69220d9f4c4ee4542187b1da8aaee85d5587fcfdadb20cdc0de15dc9f52f4197c5409abad4a +DIST getrandom-0.2.16.crate 40163 BLAKE2B cf95b380a610313eaf068fa210bdb4a9e0b9211321d708f9877cd9e1901df0f6b7f57462a4937da3419c7547ef300291deb5367f4dce4ff776e7f0d9d36dcd8d SHA512 6391d5322f8ce2ea7d14062d378ae2ffad66622afd58b9f1732e5314b27d3a554c8a008f6d0d133640f11d769ac51ea4acd24e40259e14e2ffce93d5c3c1eb1e +DIST glob-0.3.3.crate 22861 BLAKE2B 34434d0ee1d50d0453f7294cb793ff123415feda605b09a2634708646fd91584db6b77a51d38c20ec89d8e3b36b136d071d30020f6325cbffbce736403c68803 SHA512 159a5de81cd59c472cd5705a50f140d29adb64ef10d8dd4bab77f9a44cce33933a779ecd12b399edffaac551fd935a3aa74ede4c9aa9b3e5212d220b3fe22219 +DIST libc-0.2.177.crate 792045 BLAKE2B ecea1ade26b0faa9cb5fb025e237f3a59dfb562e7b3de3682b42a41038b1d436e83b42b53158c1fc1cc4b1cc64ab55ba1497e869ae850a677c089fcce9138912 SHA512 9d737091dba80244137987d06a52ffcd44a968c96b59ae9af9cfa40c38cb9675d023f6324fbf25c436ce1b9592ebf26248f85b0a7c97ee02360ca624b0efb3e0 +DIST log-0.4.28.crate 51131 BLAKE2B 2911509cabe6a69b60945e798f2afee934d865d21efa22d150288de6a27a797fe00ee4f249fc6f6d7a02e2efb7377d2a7188a8ed8cb692f76b94a0df56d74d83 SHA512 cea74c92c80f291360a7cdf022e3ce2f509b9051b415840ab2a159585384f3fe606289da00a6def0c3d666416c5fcda865e2ae4ad48df07618818e8486cd0209 +DIST memchr-2.7.6.crate 97616 BLAKE2B 3429786e97f1aa078892e417c8ed8198ec727969517309049b842e44097e58038583508aa974e6246888c18e11f9d23863c1bb012b542c5685250fe34e250d7b SHA512 38843817334da88ad74ce679b4401cf948cf8138815f3acc5eb0d005da3aabceb2216e20887e79344396569a2fa136e3aa1f7f3251a00d07dd6934cee79f4fad +DIST object-0.35.0.crate 317792 BLAKE2B 0f18cf2fe8ae4eac322e03708a2e3e9b5cb8a788aaef47ea8776a406fe4df10c5dc6a46d86fe6d5aeaf520ebd3d8333b99163e1e5b824d145f374b5f1d620d63 SHA512 4230b083bca1f7954c3c50f6fbd12e03d7e4a5ea47aa55c08d0df94bbe0e2e61187413bf59eabfb39ef680c35e11577408ecf58d460e4b97e5ad58f376cbfab7 +DIST predicates-3.1.3.crate 24063 BLAKE2B f57d4d19128107107b436bcce2be5efcb2a17cb18952221bbcb63691f5bb0fa3932a50e721dcfbd959d27b34084a6a9931378bc55c3c23a6668fa6a552e72abf SHA512 0da703faeb708e3f9eb9bb8803dd8cf6a493b02d38b9b617fd1eed7ccb870ae96c5be6cfe63b7ea8855cb2a019a7ea59799faf2bd78fb490d62e640d1a7de1e2 +DIST predicates-core-1.0.9.crate 8618 BLAKE2B e5ff73c0756f4cd91ff5d2fdd7dfd33e300dae34731933c11798d7ad2e07d9500dbb7828e7473a055c55b5ffa8a761f02a9d04ef313e544e477e4cb94159576b SHA512 618db56d417f44f5575159265f245fbb62399951824730546df735dd9bc9dba2200f58c0a7c7830040bf27954bb48e01fddb5fe0f4d4890d5e172cb1c586735b +DIST predicates-tree-1.0.12.crate 8392 BLAKE2B 4b124a7b718d2942f5624d410fb8c59c06e90ec5b576fdfe20542dd00da64fe6a5fbacadcde3c3a6f19b8ef99efd862b08be08e08691e858a4b3d7bd72a4cf71 SHA512 f5f6d7d0cba4ca7176a26d9adea5ded46f1a3361f9b6ceaa7dcf468ce616912cf3b764b8250f39a42a24eac71fb94e0d4d822c89361aae02472cf761ba55dfaa +DIST proc-macro2-1.0.103.crate 60024 BLAKE2B e5ce5f77838fd063b5615b1555db02175621135132de6aa7479d67fd0a34c15e8235290112a728f3251cf913a835bf0aafaf6930880511427143b63152047259 SHA512 9a6964a2ad24dbb1108b7018882ddb48cb6e6f652d1c5eed1cac94602539fc71f011a0a276765778df161edbd6387bf03a8505d93565e0c106f09e98d7d6efce +DIST quote-1.0.41.crate 31408 BLAKE2B 9d496e0878fc329ac9492ecbd470e762bd807ec8ca4e17a856b4d1c776351434778f519977137a67b8c143ee60b20774c09768d480cff51b22f2cfcb364a20d9 SHA512 64374d70eb29f7d7e02e535ba383586d93f68a9b6464c79840fa6c42a1ac47be7ba14e415a40e158f845e486ed33d5c564c882913780d296360b30a56301ff7e +DIST regex-1.12.2.crate 163843 BLAKE2B 4e36124886e35c2e06ecf3310c32f45bb80fff978a99509abd7d7eb6378f81123819470c227d5c234fd6e3bc7a8e7baa331ee0ed3137f9256c76cb32413ecb7f SHA512 c459657944679350369462c3c7686dcdf412597f75bc13c450a131bfceebfe2cd1e1d7f95f0f55b4aa16bfc1acb5c777f344fcfd6a5927aa76b8a2d7aa954d3c +DIST regex-automata-0.4.13.crate 625250 BLAKE2B e8682eff5df93737430a783cd913265dd45a9692fc4623a956557cd7d6553f34eff731f6f3ec5fed5c0dc6b7f8f31236203ad9f459a998fede053d990d9faea6 SHA512 f76939dc573a88d17b4cf37fedfcdf95202171ca8607374a5c2bcdc515abd1ef9231376175c6cf11cc567eddda34e0c5f90ed1c592f2c5efbd1dee883954a932 +DIST regex-syntax-0.8.8.crate 359141 BLAKE2B db4a6a76dfd7d2619fffb7fddd8a82411afad16bc8b1a8501628e872c9b3e0a4fe71947a135900442590b944a623c5e9253e36bab865703bd5b5150aa2a65e51 SHA512 337ca84af81f2c5cd7d213e3ad96a1facba2917f135c4c1ef03571160d24e4ae47186ad07e421a7a4ff0baadbe95d34365e69400f3c36ef39ebeb3e7c14224e4 +DIST relative-path-1.9.3.crate 22400 BLAKE2B c6bd04b060013de042079a741a864150632c02cdc493ca1cfd746bcc12f6ad903f8f0748ec68261c979d833089c0fc091f7c9da2b2936e8f75dad8d4638a7b10 SHA512 fd5c88d370865870570859a110245e009eba557225e4297783a606227b13b42abf0c7e69a4beb5093a5a9dabac1545afd988f4c831abe912c21ccd8013c30382 +DIST rstest-0.19.0.crate 32932 BLAKE2B d9a59bbb9fbb1f51fc55e843530d1cc7648d20d69a76a17d678f2f66bc7ec45a1ca3c77922c86d0d370c66fdf1f90e3070cf7bed6199bdbc06ef1a9faf13ad6d SHA512 d6f4288225a3cf0e8bf7429d915b6ce1ffeca0024666ecc272fb775f31cd800b2d22a1bb2b987723ed7dae00edc1ba13d50b1769d4977000e1a4c29ccd4d0ef7 +DIST rstest_macros-0.19.0.crate 61243 BLAKE2B d653e0c8d046690c47d80313db5092018cbc883dd86680dc2af041d1c9099a6245e63256758f17f57a20670efe1036de16f8c4aa3c70c74b55e82685ca21ebf6 SHA512 fed39ce5b14e1cfe6c4bb6983e62ad5b494715cc7240c147de90d1c62014c7f1329ddb101b03497a3b1388ef7e4ee0df9ceefe411e38853e08b2d0f3b7e4227b +DIST rustc_version-0.4.1.crate 12245 BLAKE2B 0ed627c560d88e5ade830cc5f72c62f6ba88be3e30d0f8db34761fcd0b284e5b2fc063c240149aabdfb12c8410ecdbe50cb10a3544500b5a020f95a31cd6709c SHA512 7aa8a487ca7411b6d23cae62f7568fa3474a7b1fd1589621071be3428a550ed3b7c4ad68277a8f86849e5900397d7d0e9d678f5d423742a045dc7c660fa6c598 +DIST semver-1.0.27.crate 30081 BLAKE2B 760cd2994baba2ab8d63656b39f281304b309152cb3c576a0cf31ebf57294bdb6a10ad73e61f974688b0dd80490e0f4da004f3396cb6988bc90af8eee0961ed9 SHA512 8492a2ce5adf32cf6183d03509766f169b323a9376b061c9659a8752f69de5f45f7c64f474fa907fd9261fe3e9a7691a39c8a603d0c2e8d9484f5946bc27d78c +DIST serde-1.0.228.crate 83652 BLAKE2B d1909d671ea6d5c2eb4ce34ee4493ecaf665d416111b4cac754b5d33b85f916296110bae7aa961efd987a2ceb4a31ba645752ce99dd28dedb9f1eecdd4d7b1b2 SHA512 9b645d6214203533b303fc5e88ad4f7686c22df084878d18a0209a92304a340fcb62fdde88a7080cf7a7348d47b9b363885c4e1da90dba08cc99ff620f375e97 +DIST serde_core-1.0.228.crate 63111 BLAKE2B 8a64e4627ad21a3d16dd37d53fb809d11171bf337ec16bb1223075cbf81b6b85cd1c8d19abadf42460d0fbea323e2f351eeb6ef823389d519121b74e68edb215 SHA512 43897e3a7ebdc85d81d1cb30cda8f0a11610f6f551529c8a21462c24fb83110652b462846aa3e1bed5fbf8b5d7927018845a524ee9e079e2c8acf2c687efd6c4 +DIST serde_derive-1.0.228.crate 59605 BLAKE2B 166ee2f9ff9f7a0928d0a65a72db3d9226c377bca2a1771956e8ecd9c7faf0544673c9c21be2a5553e621b55c74c7b958052592a1cf6eb6427a2d4f3e3dc6bb8 SHA512 8bfdfeee10ee7ef0670972aa963ef63b13e8eb2c8a09b9e0b717f92551aa89b3dd2a0dcbae6ccf20a1caece07e6adb18f0db56fdac020e4e0281b0d24e376003 +DIST syn-2.0.109.crate 301826 BLAKE2B 1078f6f0e47331a66b72cb789ca0a7fba6ebc7a5459d65719faa133403cffc5f3339fb61aea966ee599e4337f38b131188dc8f34ccb93cc4bc99eabd58131ef6 SHA512 edba9df045f3b90bbafd1c2a1f1e0e091c03ed5ef3f020584a2eef833ea1bce04c63a62bf83462e4da3a82d42a3b57ea378f5da87842f39cb10205865ac43c7c +DIST termtree-0.5.1.crate 8498 BLAKE2B ebe1face80741908e28d3fbf828bd0a7a70bb317f4532fe38ac9b6adae898a7032f751718a39300ecca8c7bf0ea6cca028c02c93c7ce7a645d67656318e90172 SHA512 43d92132cef6d352c6c0190ce4a688d7cffb61ee86dbc6b49ba1f4c404661f9b329331198063d913ae52b2d4c69e6a2d9f5cd62886894c468093abd8604f0125 +DIST unicode-ident-1.0.22.crate 47919 BLAKE2B 766f52249631092af952df717e09e1eb0d2a8e87c45e65113f0b2b88b42e8b406a87241fadd368ceb9e13339362b48cdbbc6f699f95f448ab45dbbd861615d62 SHA512 81666679aaa2eebfe1429827fa2a88ee0b52bd69723067132c24252070133b3731287bcd880ba16d16274f038c7b27bcf637e9150b6cd955fb4ff49642078125 +DIST wait-timeout-0.2.1.crate 11435 BLAKE2B 6fc9e1b88253c96aaadeafa4eace8281ef9c4bc961334058866e9db9490da35f191973d46753c381cbd53fd8b8843ed3ccaf681bd26fed5113cbdc9872b1f635 SHA512 aa89eb76bd7abc8c12d0d372a74a3e838978d85939ae5bec97392031ba4c211c09fbc0a8719c668835dec325f94c6098a9a684ba180f9fa8352f8131754cd334 +DIST wasi-0.11.1+wasi-snapshot-preview1.crate 28477 BLAKE2B bcc773ba28cbe8d820e9e9fbb275fb4451bc7f39b3bd88bcd93850bf2bdb5300489bd8eca27489ccc5f6269b00f4e1b505ae3a33a35d708cd5a414ad307be149 SHA512 29e3c903763db2580a15f50db487c5e1d4e90763e48d90a5b3f681e468a24f9df1a01773bd1ffa0e3cd293dd8cb4d6fbabfaa63c0e13889c811a56f4554ada49 diff --git a/dev-embedded/flip-link/flip-link-0.1.12.ebuild b/dev-embedded/flip-link/flip-link-0.1.12.ebuild new file mode 100644 index 000000000000..1bccc7847bf2 --- /dev/null +++ b/dev-embedded/flip-link/flip-link-0.1.12.ebuild @@ -0,0 +1,60 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.15.1 + +EAPI=8 + +CRATES=" + aho-corasick@1.1.4 + anstyle@1.0.13 + assert_cmd@2.1.1 + bstr@1.12.1 + cfg-if@1.0.4 + difflib@0.4.0 + env_filter@0.1.4 + env_logger@0.11.8 + evalexpr@12.0.3 + getrandom@0.2.16 + glob@0.3.3 + libc@0.2.177 + log@0.4.28 + memchr@2.7.6 + object@0.35.0 + predicates-core@1.0.9 + predicates-tree@1.0.12 + predicates@3.1.3 + proc-macro2@1.0.103 + quote@1.0.41 + regex-automata@0.4.13 + regex-syntax@0.8.8 + regex@1.12.2 + relative-path@1.9.3 + rstest@0.19.0 + rstest_macros@0.19.0 + rustc_version@0.4.1 + semver@1.0.27 + serde@1.0.228 + serde_core@1.0.228 + serde_derive@1.0.228 + syn@2.0.109 + termtree@0.5.1 + unicode-ident@1.0.22 + wait-timeout@0.2.1 + wasi@0.11.1+wasi-snapshot-preview1 +" + +inherit cargo + +DESCRIPTION="Flips the memory layout of embedded programs to protect against stack overflows" +HOMEPAGE="https://github.com/knurling-rs/flip-link" +SRC_URI=" + ${CARGO_CRATE_URIS} + https://github.com/knurling-rs/flip-link/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz +" + +LICENSE="|| ( Apache-2.0 MIT )" +# Dependent crate licenses +LICENSE+=" AGPL-3 MIT Unicode-3.0" +SLOT="0" +KEYWORDS="~amd64" diff --git a/dev-embedded/flip-link/metadata.xml b/dev-embedded/flip-link/metadata.xml new file mode 100644 index 000000000000..5ded350a2132 --- /dev/null +++ b/dev-embedded/flip-link/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>pinguinlars1105+gentoo@gmail.com</email> + <name>AshyPinguin</name> + </maintainer> + <upstream> + <remote-id type="github">knurling-rs/flip-link</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/freaklabs-boards/Manifest b/dev-embedded/freaklabs-boards/Manifest new file mode 100644 index 000000000000..fdaa62efbf33 --- /dev/null +++ b/dev-embedded/freaklabs-boards/Manifest @@ -0,0 +1 @@ +DIST freaklabs-v1.0.0-manual-install.zip 123494 BLAKE2B 5ac9d31782c217f074a73bf9b3b1e832e1cea89f4f767ec01e1b3c3672bca1245adba4c8d661a7af62f306f5a104978913809b232d9287b6938f3550bc109067 SHA512 8fd265265a31c39bc4637492ff0fec564d1e9a4450a9a709adf436536c2320f14676259f70857b332c9f0e5766fa5eb3640b168f450ab8820733c2100fe4b36d diff --git a/dev-embedded/freaklabs-boards/freaklabs-boards-1.0.0.ebuild b/dev-embedded/freaklabs-boards/freaklabs-boards-1.0.0.ebuild new file mode 100644 index 000000000000..7b44c1089d06 --- /dev/null +++ b/dev-embedded/freaklabs-boards/freaklabs-boards-1.0.0.ebuild @@ -0,0 +1,35 @@ +# Copyright 2019-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Arduino hardware definitions for freaklabs boards" +HOMEPAGE="https://freaklabs.org/chibiarduino/" + +#this is for 1.0.3 from git but it doesn't seem to work +#GIT_COMMIT="ff3ebd11934c123091d485e6dc2845d78bda4255" +#SRC_URI="https://github.com/freaklabs/freaklabs-boards/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" +#S="${WORKDIR}/${PN}-${GIT_COMMIT}" + +SRC_URI="https://freaklabs.org/pub/chibiArduino/boards/freaklabs-v${PV}-manual%20install.zip -> freaklabs-v${PV}-manual-install.zip" +S="${WORKDIR}/freaklabs-v1.0.0" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND="app-arch/unzip" +PDEPEND="dev-embedded/arduino" + +src_install() { + insinto /usr/share/arduino/hardware/freaklabs/avr + doins -r avr/* + + #non working 1.0.3 + #doins -r boards/1.0.3/{boards.txt,platform.local.txt,variants,bootloaders} +} + +pkg_postinst() { + ewarn "For this to work you need to install cross-avr/gcc[-ssp,-pie]" + ewarn "Something like USE='-pie -ssp' crossdev -S -s4 avr" +} diff --git a/dev-embedded/freaklabs-boards/metadata.xml b/dev-embedded/freaklabs-boards/metadata.xml new file mode 100644 index 000000000000..97eff4632a18 --- /dev/null +++ b/dev-embedded/freaklabs-boards/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> +</pkgmetadata> diff --git a/dev-embedded/freertos-gdb/Manifest b/dev-embedded/freertos-gdb/Manifest new file mode 100644 index 000000000000..eff40d58293a --- /dev/null +++ b/dev-embedded/freertos-gdb/Manifest @@ -0,0 +1 @@ +DIST freertos-gdb-1.0.4.tar.gz 14137 BLAKE2B 6b1ab104256239496e7db8455ba53d6c43658606090a78447bced3e1807314f422b7f59e5160676610f6f07ce15e448e4aa5209ee17db409560d60bce8058f4e SHA512 7e55c677edf00d4ff259cd40fdb168a403feef2d3a75c4fb70585fec1abf94a3c4cd8ae9f64be895323a381b3c82514685bb7033e4c1f1bc0ca68e1fef4688bd diff --git a/dev-embedded/freertos-gdb/freertos-gdb-1.0.4.ebuild b/dev-embedded/freertos-gdb/freertos-gdb-1.0.4.ebuild new file mode 100644 index 000000000000..1a5f266f6672 --- /dev/null +++ b/dev-embedded/freertos-gdb/freertos-gdb-1.0.4.ebuild @@ -0,0 +1,21 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_NO_NORMALIZE=1 +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python module for operating with freeRTOS-kernel objects in GDB" +HOMEPAGE="https://github.com/espressif/freertos-gdb" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="dev-debug/gdb[python]" + +RESTRICT="test" diff --git a/dev-embedded/freertos-gdb/metadata.xml b/dev-embedded/freertos-gdb/metadata.xml new file mode 100644 index 000000000000..2fb1b5754976 --- /dev/null +++ b/dev-embedded/freertos-gdb/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/freertos-gdb</remote-id> + <remote-id type="pypi">freertos-gdb</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/fwup/Manifest b/dev-embedded/fwup/Manifest new file mode 100644 index 000000000000..c080b93d7821 --- /dev/null +++ b/dev-embedded/fwup/Manifest @@ -0,0 +1,2 @@ +DIST fwup-1.15.1.tar.gz 25588820 BLAKE2B 0b030a76c3f7699fa6a2ea7fd1f8e8391d8a62ad874f3f26ab39380ec9ec6727483659726ffd1894a9751e76c71a7c8e194b4b9af88ee39ff28187b96b16e572 SHA512 7b80a10a805a9023b5fc6103c3165f84cba2ac563ee58feb27d99589797551250522fe152f01be899d79e6d07d9eb7a07c7745bf634f5828e886f386fa2ba454 +DIST fwup-1.16.0.tar.gz 25593107 BLAKE2B 6d7e350e636457f830c3ca94e110c08a3f00d287008257e5a00cb102fd90bda01a167177436bbdd06fd5eaf99f22e5921f58b068436a0c8bbb9e52e64b435e8e SHA512 e9bb6503ed4169407dbe7325afd53c61715b18f3fbea55d15d364b6c64ae104e80f7b4831ac58531a81670cc7597dcf8cacde95dd953fcfb8e4ea495438739f3 diff --git a/dev-embedded/fwup/fwup-1.15.1.ebuild b/dev-embedded/fwup/fwup-1.15.1.ebuild new file mode 100644 index 000000000000..10b3732a880a --- /dev/null +++ b/dev-embedded/fwup/fwup-1.15.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Configurable embedded Linux firmware update creator and runner" +HOMEPAGE="https://github.com/fwup-home/fwup" +SRC_URI="https://github.com/fwup-home/fwup/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=app-arch/libarchive-3.7.9 + app-arch/zip + >=dev-libs/confuse-2.8 + dev-util/xdelta:3 + sys-fs/dosfstools + sys-fs/mtools + sys-fs/squashfs-tools +" + +src_prepare() { + default + ./autogen.sh +} + +src_test() { + # The fwup tests do not like the portage sandbox. Make them play nice. + + # Modify tests/common.sh to ensure $WRITE_SHIM and $MOUNT_SHIM point to + # files that don't exist. This is needed to ensure tests don't try to use + # LD_PRELOAD. + sed -i 's/^\(WRITE\|MOUNT\)_SHIM=".*"/\1_SHIM=""/' 'tests/common.sh' \ + || die 'Could not sed tests/common.sh' + + # set VERIFY_SYSCALLS_DISABLE, to disable tracing + VERIFY_SYSCALLS_DISABLE="" emake check +} diff --git a/dev-embedded/fwup/fwup-1.16.0.ebuild b/dev-embedded/fwup/fwup-1.16.0.ebuild new file mode 100644 index 000000000000..10b3732a880a --- /dev/null +++ b/dev-embedded/fwup/fwup-1.16.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Configurable embedded Linux firmware update creator and runner" +HOMEPAGE="https://github.com/fwup-home/fwup" +SRC_URI="https://github.com/fwup-home/fwup/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=app-arch/libarchive-3.7.9 + app-arch/zip + >=dev-libs/confuse-2.8 + dev-util/xdelta:3 + sys-fs/dosfstools + sys-fs/mtools + sys-fs/squashfs-tools +" + +src_prepare() { + default + ./autogen.sh +} + +src_test() { + # The fwup tests do not like the portage sandbox. Make them play nice. + + # Modify tests/common.sh to ensure $WRITE_SHIM and $MOUNT_SHIM point to + # files that don't exist. This is needed to ensure tests don't try to use + # LD_PRELOAD. + sed -i 's/^\(WRITE\|MOUNT\)_SHIM=".*"/\1_SHIM=""/' 'tests/common.sh' \ + || die 'Could not sed tests/common.sh' + + # set VERIFY_SYSCALLS_DISABLE, to disable tracing + VERIFY_SYSCALLS_DISABLE="" emake check +} diff --git a/dev-embedded/fwup/metadata.xml b/dev-embedded/fwup/metadata.xml new file mode 100644 index 000000000000..1539f8b550b9 --- /dev/null +++ b/dev-embedded/fwup/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mathijs@mathsaey.be</email> + <name>Mathijs Saey</name> + </maintainer> + <upstream> + <remote-id type="github">fwup-home/fwup</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/gnusim8085/Manifest b/dev-embedded/gnusim8085/Manifest new file mode 100644 index 000000000000..0088b91ac51a --- /dev/null +++ b/dev-embedded/gnusim8085/Manifest @@ -0,0 +1 @@ +DIST gnusim8085-1.4.1.tar.gz 670313 BLAKE2B c866df8711ad52f12ebd0ad908918ee8236b2e6bf42502e8b8719ef2361b1edc15f65779cea1d4dce44a92aa7445a2eb578b35bb83b2d1d29d7936e3abe3484d SHA512 4136ccb732495d9da043e646eee198b5ce569c5ed519f27f98ff330cc585836da1aaeb85af33e65aa20b671cc057380e2d77088ffc1a3de9e2f7ef0044eaf385 diff --git a/dev-embedded/gnusim8085/gnusim8085-1.4.1.ebuild b/dev-embedded/gnusim8085/gnusim8085-1.4.1.ebuild new file mode 100644 index 000000000000..d072ec86df02 --- /dev/null +++ b/dev-embedded/gnusim8085/gnusim8085-1.4.1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit xdg + +DESCRIPTION="A GTK 8085 Simulator" +HOMEPAGE="https://gnusim8085.srid.ca/ https://github.com/GNUSim8085/GNUSim8085" +SRC_URI="https://github.com/GNUSim8085/GNUSim8085/releases/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="nls" + +RDEPEND=" + dev-libs/glib:2 + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3 + x11-libs/gtksourceview:3.0= + x11-libs/pango +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-text/discount + virtual/pkgconfig + nls? ( sys-devel/gettext ) +" + +src_configure() { + econf $(use_enable nls) +} + +src_install() { + default + + doman doc/gnusim8085.1 + + docinto examples + dodoc doc/examples/*.asm doc/asm-guide.txt + docompress -x /usr/share/doc/${PF}/examples +} diff --git a/dev-embedded/gnusim8085/metadata.xml b/dev-embedded/gnusim8085/metadata.xml new file mode 100644 index 000000000000..f5853fe4526e --- /dev/null +++ b/dev-embedded/gnusim8085/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="launchpad">gnusim8085</remote-id> + <remote-id type="github">GNUSim8085/GNUSim8085</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/gpsim/Manifest b/dev-embedded/gpsim/Manifest new file mode 100644 index 000000000000..89b47f32445a --- /dev/null +++ b/dev-embedded/gpsim/Manifest @@ -0,0 +1 @@ +DIST gpsim-0.32.1.tar.gz 3770485 BLAKE2B 0720ffa7dee073573f3d053367714752dda25e99293d803ff32e4050f8ad5a14241de8fb273fb78ddf2fc927c9d209564d43a28a25489f38fb93dbefe09e51f4 SHA512 9b6d24f8f183eb421506a3c08883915f3580999b9ee7742c4af2d61e7d84643d125e3b4e1c3412bcb4a312011d7b6fef44c12d22fcc475f66a1f083e394e5623 diff --git a/dev-embedded/gpsim/files/gpsim-0.32.1-configure.patch b/dev-embedded/gpsim/files/gpsim-0.32.1-configure.patch new file mode 100644 index 000000000000..2933e9a109e8 --- /dev/null +++ b/dev-embedded/gpsim/files/gpsim-0.32.1-configure.patch @@ -0,0 +1,26 @@ +--- ./configure.ac 2025-02-17 13:54:52.780179636 +0100 ++++ ./configure.ac.new 2025-02-17 13:55:02.913179831 +0100 +@@ -169,11 +169,6 @@ + fi + X_LDFLAGS="$X_LDFLAGS -lm" + +-wi_LIB_READLINE +- if test "$wi_cv_lib_readline" != yes; then +- AC_MSG_ERROR(Cannot find readline library) +- fi +- + # Checks for programs. + AC_PROG_CXX + AC_PROG_CXXCPP +@@ -186,6 +181,11 @@ + AC_PROG_LEX(noyywrap) + LT_INIT + ++wi_LIB_READLINE ++ if test "$wi_cv_lib_readline" != yes; then ++ AC_MSG_ERROR(Cannot find readline library) ++ fi ++ + # Checks for libraries. + AC_LANG([C++]) + #AC_CHECK_LIB([gpsim], [main]) diff --git a/dev-embedded/gpsim/files/gpsim-0.32.1-missing-lib-m.patch b/dev-embedded/gpsim/files/gpsim-0.32.1-missing-lib-m.patch new file mode 100644 index 000000000000..8383ab2f94c1 --- /dev/null +++ b/dev-embedded/gpsim/files/gpsim-0.32.1-missing-lib-m.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/949813 +https://sourceforge.net/p/gpsim/bugs/296/ +--- ./configure.ac.orig 2025-02-17 13:47:15.764170851 +0100 ++++ ./configure.ac 2025-02-17 13:47:52.610171559 +0100 +@@ -167,6 +167,7 @@ + echo linking with gtk-$GTK_VERSION_T + AC_DEFINE_UNQUOTED([GTK_VERSION],"$GTK_VERSION_T",[gtk version]) + fi ++X_LDFLAGS="$X_LDFLAGS -lm" + + wi_LIB_READLINE + if test "$wi_cv_lib_readline" != yes; then diff --git a/dev-embedded/gpsim/gpsim-0.32.1-r1.ebuild b/dev-embedded/gpsim/gpsim-0.32.1-r1.ebuild new file mode 100644 index 000000000000..2e19f9dfed47 --- /dev/null +++ b/dev-embedded/gpsim/gpsim-0.32.1-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="A simulator for the Microchip PIC microcontrollers" +HOMEPAGE="https://gpsim.sourceforge.net" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86" + +IUSE="doc gui" + +RDEPEND=" + gui? ( x11-libs/gtk+:2 ) + >=dev-embedded/gputils-0.12 + dev-libs/glib:2 + dev-libs/popt + sys-libs/readline:0= +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-alternatives/lex + virtual/pkgconfig + app-alternatives/yacc +" +DOCS=( ANNOUNCE AUTHORS ChangeLog HISTORY PROCESSORS README README.MODULES \ + TODO doc/gpsim.pdf ) +HTML_DOCS=( doc/gpsim.html.LyXconv/gpsim.html ) + +PATCHES=( + "${FILESDIR}"/${P}-missing-lib-m.patch + "${FILESDIR}"/${P}-configure.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(usex gui "" --disable-gui) + --disable-static + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-embedded/gpsim/metadata.xml b/dev-embedded/gpsim/metadata.xml new file mode 100644 index 000000000000..83563d95cbdc --- /dev/null +++ b/dev-embedded/gpsim/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">gpsim</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/gputils/Manifest b/dev-embedded/gputils/Manifest new file mode 100644 index 000000000000..007cca7187a7 --- /dev/null +++ b/dev-embedded/gputils/Manifest @@ -0,0 +1 @@ +DIST gputils-1.5.2.tar.bz2 7231711 BLAKE2B c52bd75ee408b2ff98f63679b18834e8e41b5aea4f2b4b659860acb8fa4dd3f922aa6307f99ae0fc024a4fc6f56d3be262cd873cf112ebac444d41eeca635d3b SHA512 43ed508d164152bf36e4f27b09656e6e3d58fc174806ad57d6415e6e2726a56381b1323be3acfc635f2a05babade695e9777b0db8b5f4b90da00b9d29e75eddc diff --git a/dev-embedded/gputils/files/gputils-1.5.2-fix-build-with-C23.patch b/dev-embedded/gputils/files/gputils-1.5.2-fix-build-with-C23.patch new file mode 100644 index 000000000000..72b7db3158f0 --- /dev/null +++ b/dev-embedded/gputils/files/gputils-1.5.2-fix-build-with-C23.patch @@ -0,0 +1,39 @@ +Make the code C23-compatible + +Replace the enum-defined true/false constants with the default one. Also +fix-up a function definition. + +Authour: Alexander Golubev (Fat-Zer) <fatzer2@gmail.com> +Bug: https://bugs.gentoo.org/944881 +Source: A dedicated patch for Gentoo + +--- a/libgputils/gpcoffgen.h ++++ b/libgputils/gpcoffgen.h +@@ -88,7 +88,7 @@ extern gp_reloc_t *gp_coffgen_add_reloc(gp_section_t *Section); + #define RELOC_DISABLE_WARN (1 << 0) + #define RELOC_ENABLE_CINIT_WARN (1 << 1) + +-extern void gp_coffgen_check_relocations(const gp_object_t *Object, unsigned int Behavior); ++extern void gp_coffgen_check_relocations(const gp_object_t *Object, gp_boolean Behavior); + + extern gp_boolean gp_coffgen_del_reloc(gp_section_t *Section, gp_reloc_t *Relocation); + extern const char *gp_coffgen_reloc_type_to_str(uint16_t Type); +--- a/libgputils/gptypes.h ++++ b/libgputils/gptypes.h +@@ -26,10 +26,16 @@ Boston, MA 02111-1307, USA. */ + + #include "stdhdr.h" + ++/* C99 systems have <stdbool.h>. Non-C99 systems may or may not. */ ++#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ++#include <stdbool.h> ++typedef int gp_boolean; /* use int rather than bool to keep ABI compatible with enum; replace with bool if you are bold */ ++#else + typedef enum { + false = (0 == 1), + true = (0 == 0) + } gp_boolean; ++#endif + + typedef long gp_symvalue_t; + diff --git a/dev-embedded/gputils/files/gputils-1.5.2-fix-invalid-operator.patch b/dev-embedded/gputils/files/gputils-1.5.2-fix-invalid-operator.patch new file mode 100644 index 000000000000..ec2d8d425832 --- /dev/null +++ b/dev-embedded/gputils/files/gputils-1.5.2-fix-invalid-operator.patch @@ -0,0 +1,25 @@ +Fix invalid operator in dash + +Some shells, like dash, don't support [ x == x ], reporting invalid syntax, +and silently failing. + +--- gputils-1.5.2.orig/doc/html-help/Makefile.am ++++ gputils-1.5.2/doc/html-help/Makefile.am +@@ -7,7 +7,7 @@ + pkgdatadir = @GPUTILS_HTMLDOC_PATH@ + + html-doc: +- if [ "$(ENABLE_HTML_DOC)" == "yes" ]; then \ ++ if [ "$(ENABLE_HTML_DOC)" = "yes" ]; then \ + if [ ! -e $(DEFAULT_MPLABX_PATH)/mpasmx/8bit_device.info ]; then \ + @echo "Can't find mplabx installation; HTML documentation will not be built."; \ + else \ +@@ -18,7 +18,7 @@ + install: install-html + + install-html: +- if [ "$(ENABLE_HTML_DOC)" == "yes" ]; then \ ++ if [ "$(ENABLE_HTML_DOC)" = "yes" ]; then \ + if [ -n "$$(ls *.html 2>/dev/null)" -a -n "$$(ls *.css 2>/dev/null)" ]; then \ + $(install_sh) -d "$(DESTDIR)$(pkgdatadir)"; \ + $(install_sh) -c -m 644 *.css *.html "$(DESTDIR)$(pkgdatadir)"; \ diff --git a/dev-embedded/gputils/gputils-1.5.2-r1.ebuild b/dev-embedded/gputils/gputils-1.5.2-r1.ebuild new file mode 100644 index 000000000000..0baf3f7f50b8 --- /dev/null +++ b/dev-embedded/gputils/gputils-1.5.2-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs flag-o-matic + +DESCRIPTION="Tools including assembler, linker and librarian for PIC microcontrollers" +HOMEPAGE="https://gputils.sourceforge.io" +SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/$(ver_cut 1-2).0/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm64 ppc ppc64 x86" +IUSE="doc" + +PATCHES=( + "${FILESDIR}/${PN}-1.5.2-fix-invalid-operator.patch" + "${FILESDIR}/${PN}-1.5.2-fix-build-with-C23.patch" +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # Their configure script tries to do funky things with default + # compiler selection. Force our own defaults instead. + tc-export CC + + # LTO currently causes various segfaults in dev-embedded/sdcc + # sys-devel/gcc-11.3.0 '-O3 -flto' + filter-lto + + local myeconfargs=( + $(use_enable doc html-doc) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + use doc && dodoc doc/gputils.pdf +} diff --git a/dev-embedded/gputils/gputils-1.5.2.ebuild b/dev-embedded/gputils/gputils-1.5.2.ebuild new file mode 100644 index 000000000000..6ae5d6381d78 --- /dev/null +++ b/dev-embedded/gputils/gputils-1.5.2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs flag-o-matic + +DESCRIPTION="Tools including assembler, linker and librarian for PIC microcontrollers" +HOMEPAGE="https://gputils.sourceforge.io" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm64 ppc ppc64 x86" +IUSE="doc" + +PATCHES=( + "${FILESDIR}"/gputils-1.5.2-fix-invalid-operator.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # bug #369291, bug #818802 + tc-ld-disable-gold + + # Their configure script tries to do funky things with default + # compiler selection. Force our own defaults instead. + tc-export CC + + # LTO currently causes various segfaults in dev-embedded/sdcc + # sys-devel/gcc-11.3.0 '-O3 -flto' + filter-lto + + local myeconfargs=( + $(use_enable doc html-doc) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + use doc && dodoc doc/gputils.pdf +} diff --git a/dev-embedded/gputils/metadata.xml b/dev-embedded/gputils/metadata.xml new file mode 100644 index 000000000000..2e817f7a5888 --- /dev/null +++ b/dev-embedded/gputils/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">gputils</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/icdprog/Manifest b/dev-embedded/icdprog/Manifest new file mode 100644 index 000000000000..e931f763c41b --- /dev/null +++ b/dev-embedded/icdprog/Manifest @@ -0,0 +1 @@ +DIST icdprog-0.5.tar.gz 47195 BLAKE2B 66ba011f1809bce21db64074da1fb52c1373caa20d6843abbad023da466f32888b8b4e906512975d29bc9bfb73bb9726b49040e52a70f187f1fea5eab3122b91 SHA512 3e238cbbbcfc034a5100c78c1e8ffea669deeec26cdf2a2ad1d27577acff1a114badfb67453d4241b9a239326d0d624616fc8383affc3d34380edfdc0fcf7989 diff --git a/dev-embedded/icdprog/icdprog-0.5-r1.ebuild b/dev-embedded/icdprog/icdprog-0.5-r1.ebuild new file mode 100644 index 000000000000..d0550e591186 --- /dev/null +++ b/dev-embedded/icdprog/icdprog-0.5-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Microchip PIC Programmer using ICD hardware" +HOMEPAGE="https://icdprog.sf.net/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 x86" + +DOCS=( src/README.coders ) +HTML_DOCS=( readme.html ) + +src_configure() { + tc-export CC +} + +src_compile() { + emake CFLAGS="${CFLAGS}" -C src + emake CFLAGS="${CFLAGS}" -C src/icddump +} + +src_install() { + dobin src/icdprog + dobin src/icddump/icddump + + einstalldocs +} + +pkg_postinst() { + elog "Please see readme.html if the ICD seems to be very slow." +} diff --git a/dev-embedded/icdprog/metadata.xml b/dev-embedded/icdprog/metadata.xml new file mode 100644 index 000000000000..643c7e56e84d --- /dev/null +++ b/dev-embedded/icdprog/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <longdescription> + ICDPROG is a simple command line programmer for Microchip PIC + controllers, using the Microchip ICD (in circuit debugger) + hardware. + </longdescription> + <upstream> + <remote-id type="sourceforge">icdprog</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/idf-component-manager/Manifest b/dev-embedded/idf-component-manager/Manifest new file mode 100644 index 000000000000..32d97a148ccf --- /dev/null +++ b/dev-embedded/idf-component-manager/Manifest @@ -0,0 +1,4 @@ +DIST idf-component-manager-2.4.2.gh.tar.gz 328411 BLAKE2B 26dda6f11bcc1d36ddc51b79e0bfa9b7c537e1f7e116f0c8df57cbd395d196e6b0d54d7039024e4fdef4f37c7d6e3275f7b22471f2595b9a6eafda9f3b62ba4e SHA512 437c79a18c1cad50aa61486dce1a8d5b690a2ff4fd525084d4ef02ff6b2db7b0ab986f5e64ff6bc2cb635a22e2c835db71b9334d1061511f85ced55f3f3dcb5a +DIST idf-component-manager-2.4.6.gh.tar.gz 336846 BLAKE2B ef1c6bd3b6591b9b796dcd31ef8c2eee1a87eb1680730e0281bab3ad3ed11a0a81ebc9bbd9d774426b7b7845d72ca5c93b059c5b9f92820ffc15610c2d3ec0a5 SHA512 93bfd0179b9b98ea8b40cc73be6f2394ed358a682f1a0c3ad278269f39a78385a074b997412b1a83bb66ea284f5ca96898995daf3614ccf85b2e360aa21ab82c +DIST idf-component-manager-3.0.0.gh.tar.gz 341925 BLAKE2B 505bfedb91ee3658b77a3542b896975e830ee42150763e7736ec3b5e06298fbdef26829bb3efd27a69278abf6051330c85ccd7830d2c3b6eec6bd568410d6263 SHA512 6b01c407ec9ea4e5be4d688fc1606c34d0f20c870553bef7b6759ae6401472ef49cbfc78a236062eaf1c62843e586ae9e21e6d6e8d36f00e359de33b398f5c58 +DIST idf-component-manager-3.0.2.gh.tar.gz 345743 BLAKE2B 93f300f0b182070914d7899f0f09ca38377ad4262307d8bdb9c11abfe876bc9ed90d365aab21588145f072d08525ce2df56c4762af9120bb4b4a1e078c6561b3 SHA512 6f0cb69c114fa521bed6d6e0cae98196a2192e908e3e59904b1937104ec9c0e968f0936c9826a5099654bd973d761ca17aa9b1897bd2845d87307d35bfe4b944 diff --git a/dev-embedded/idf-component-manager/idf-component-manager-2.4.2.ebuild b/dev-embedded/idf-component-manager/idf-component-manager-2.4.2.ebuild new file mode 100644 index 000000000000..8da412c2e91a --- /dev/null +++ b/dev-embedded/idf-component-manager/idf-component-manager-2.4.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 + +DESCRIPTION="Tool for installing ESP-IDF components" +HOMEPAGE="https://github.com/espressif/idf-component-manager" +SRC_URI="https://github.com/espressif/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=" + test? ( + dev-python/requests-mock[${PYTHON_USEDEP}] + dev-python/jsonschema[${PYTHON_USEDEP}] + dev-python/vcrpy[${PYTHON_USEDEP}] + dev-python/filelock[${PYTHON_USEDEP}] + dev-vcs/git + ) +" + +RDEPEND=" + dev-python/cachecontrol[${PYTHON_USEDEP}] + dev-python/click[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/jsonref[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/pydantic[${PYTHON_USEDEP}] + dev-python/pydantic-settings[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/requests-toolbelt[${PYTHON_USEDEP}] + dev-python/requests-file[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + dev-python/schema[${PYTHON_USEDEP}] + dev-python/tqdm[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] +" + +# Requires networking or additional files not available in the tarball +EPYTEST_DESELECT=( + tests/core/test_upload_component.py::test_check_only_upload_component + tests/test_component_manager.py::test_pack_component_with_examples_errors + tests/test_component_manager.py::test_pack_component_with_dest_dir + tests/test_profile.py::TestMultiStorageClient::test_registry_storage_url + tests/test_profile.py::TestMultiStorageClient::test_storage_clients_precedence + tests/test_mirror_sync.py::test_sync_dependency_with_matches + tests/test_mirror_sync.py::test_sync_dependency_with_rules + tests/test_mirror_sync.py::test_update_existing_local_mirror + tests/test_mirror_sync.py::test_registry_sync_latest_with_two_requirements + tests/cli/test_manifest_command.py::test_add_git_dependency + tests/cli/test_manifest_command.py::test_add_git_dependency_invalid + tests/cli/test_manifest_command.py::test_manifest_keeps_comments + tests/cli/test_module.py::test_raise_exception_on_warnings + tests/cli/test_registry_command.py::test_logout_from_registry_revoked_token + tests/sources/test_git.py::test_versions_component_hash + + tests/test_lock.py::TestLockManager::test_lock_dump_with_solution + tests/test_lock.py::TestLockManager::test_lock_dump_with_dictionary + tests/test_lock.py::TestLockManager::test_lock_dump +) + +# network access +EPYTEST_IGNORE=( + tests/test_api_client.py + tests/test_prepare_dep_dirs.py +) + +EPYTEST_PLUGINS=( pytest-mock ) +distutils_enable_tests pytest diff --git a/dev-embedded/idf-component-manager/idf-component-manager-2.4.6.ebuild b/dev-embedded/idf-component-manager/idf-component-manager-2.4.6.ebuild new file mode 100644 index 000000000000..4965a4612179 --- /dev/null +++ b/dev-embedded/idf-component-manager/idf-component-manager-2.4.6.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 + +DESCRIPTION="Tool for installing ESP-IDF components" +HOMEPAGE="https://github.com/espressif/idf-component-manager" +SRC_URI="https://github.com/espressif/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=" + test? ( + dev-python/filelock[${PYTHON_USEDEP}] + dev-python/jsonschema[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/requests-mock[${PYTHON_USEDEP}] + dev-python/vcrpy[${PYTHON_USEDEP}] + dev-vcs/git + ) +" + +RDEPEND=" + dev-python/cachecontrol[${PYTHON_USEDEP}] + dev-python/click[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/jsonref[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/pydantic[${PYTHON_USEDEP}] + dev-python/pydantic-settings[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/requests-toolbelt[${PYTHON_USEDEP}] + dev-python/requests-file[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + dev-python/schema[${PYTHON_USEDEP}] + dev-python/tqdm[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] +" + +# Requires networking or additional files not available in the tarball +EPYTEST_DESELECT=( + tests/core/test_upload_component.py::test_check_only_upload_component + tests/test_component_manager.py::test_pack_component_with_examples_errors + tests/test_component_manager.py::test_pack_component_with_dest_dir + tests/test_profile.py::TestMultiStorageClient::test_registry_storage_url + tests/test_profile.py::TestMultiStorageClient::test_storage_clients_precedence + tests/test_mirror_sync.py::test_collect_component_versions_merges_multiple_specs + tests/test_mirror_sync.py::test_sync_dependency_with_matches + tests/test_mirror_sync.py::test_sync_dependency_with_rules + tests/test_mirror_sync.py::test_update_existing_local_mirror + tests/test_mirror_sync.py::test_registry_sync_latest_with_two_requirements + tests/cli/test_manifest_command.py::test_add_git_dependency + tests/cli/test_manifest_command.py::test_add_git_dependency_invalid + tests/cli/test_manifest_command.py::test_manifest_keeps_comments + tests/cli/test_module.py::test_raise_exception_on_warnings + tests/cli/test_registry_command.py::test_logout_from_registry_revoked_token + tests/sources/test_git.py::test_versions_component_hash + tests/version_solver/test_local_components_precedence.py::test_local_component_transitive_dependency + tests/version_solver/test_local_components_precedence.py::test_local_component_chain_dependency + + tests/test_lock.py::TestLockManager::test_lock_dump_with_solution + tests/test_lock.py::TestLockManager::test_lock_dump_with_dictionary + tests/test_lock.py::TestLockManager::test_lock_dump +) + +# network access +EPYTEST_IGNORE=( + tests/test_api_client.py + tests/test_prepare_dep_dirs.py +) + +EPYTEST_PLUGINS=( pytest-mock ) +distutils_enable_tests pytest diff --git a/dev-embedded/idf-component-manager/idf-component-manager-3.0.0.ebuild b/dev-embedded/idf-component-manager/idf-component-manager-3.0.0.ebuild new file mode 100644 index 000000000000..4965a4612179 --- /dev/null +++ b/dev-embedded/idf-component-manager/idf-component-manager-3.0.0.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 + +DESCRIPTION="Tool for installing ESP-IDF components" +HOMEPAGE="https://github.com/espressif/idf-component-manager" +SRC_URI="https://github.com/espressif/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=" + test? ( + dev-python/filelock[${PYTHON_USEDEP}] + dev-python/jsonschema[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/requests-mock[${PYTHON_USEDEP}] + dev-python/vcrpy[${PYTHON_USEDEP}] + dev-vcs/git + ) +" + +RDEPEND=" + dev-python/cachecontrol[${PYTHON_USEDEP}] + dev-python/click[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/jsonref[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/pydantic[${PYTHON_USEDEP}] + dev-python/pydantic-settings[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/requests-toolbelt[${PYTHON_USEDEP}] + dev-python/requests-file[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + dev-python/schema[${PYTHON_USEDEP}] + dev-python/tqdm[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] +" + +# Requires networking or additional files not available in the tarball +EPYTEST_DESELECT=( + tests/core/test_upload_component.py::test_check_only_upload_component + tests/test_component_manager.py::test_pack_component_with_examples_errors + tests/test_component_manager.py::test_pack_component_with_dest_dir + tests/test_profile.py::TestMultiStorageClient::test_registry_storage_url + tests/test_profile.py::TestMultiStorageClient::test_storage_clients_precedence + tests/test_mirror_sync.py::test_collect_component_versions_merges_multiple_specs + tests/test_mirror_sync.py::test_sync_dependency_with_matches + tests/test_mirror_sync.py::test_sync_dependency_with_rules + tests/test_mirror_sync.py::test_update_existing_local_mirror + tests/test_mirror_sync.py::test_registry_sync_latest_with_two_requirements + tests/cli/test_manifest_command.py::test_add_git_dependency + tests/cli/test_manifest_command.py::test_add_git_dependency_invalid + tests/cli/test_manifest_command.py::test_manifest_keeps_comments + tests/cli/test_module.py::test_raise_exception_on_warnings + tests/cli/test_registry_command.py::test_logout_from_registry_revoked_token + tests/sources/test_git.py::test_versions_component_hash + tests/version_solver/test_local_components_precedence.py::test_local_component_transitive_dependency + tests/version_solver/test_local_components_precedence.py::test_local_component_chain_dependency + + tests/test_lock.py::TestLockManager::test_lock_dump_with_solution + tests/test_lock.py::TestLockManager::test_lock_dump_with_dictionary + tests/test_lock.py::TestLockManager::test_lock_dump +) + +# network access +EPYTEST_IGNORE=( + tests/test_api_client.py + tests/test_prepare_dep_dirs.py +) + +EPYTEST_PLUGINS=( pytest-mock ) +distutils_enable_tests pytest diff --git a/dev-embedded/idf-component-manager/idf-component-manager-3.0.2.ebuild b/dev-embedded/idf-component-manager/idf-component-manager-3.0.2.ebuild new file mode 100644 index 000000000000..4965a4612179 --- /dev/null +++ b/dev-embedded/idf-component-manager/idf-component-manager-3.0.2.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 + +DESCRIPTION="Tool for installing ESP-IDF components" +HOMEPAGE="https://github.com/espressif/idf-component-manager" +SRC_URI="https://github.com/espressif/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=" + test? ( + dev-python/filelock[${PYTHON_USEDEP}] + dev-python/jsonschema[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/requests-mock[${PYTHON_USEDEP}] + dev-python/vcrpy[${PYTHON_USEDEP}] + dev-vcs/git + ) +" + +RDEPEND=" + dev-python/cachecontrol[${PYTHON_USEDEP}] + dev-python/click[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/jsonref[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/pydantic[${PYTHON_USEDEP}] + dev-python/pydantic-settings[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/requests-toolbelt[${PYTHON_USEDEP}] + dev-python/requests-file[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + dev-python/schema[${PYTHON_USEDEP}] + dev-python/tqdm[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] +" + +# Requires networking or additional files not available in the tarball +EPYTEST_DESELECT=( + tests/core/test_upload_component.py::test_check_only_upload_component + tests/test_component_manager.py::test_pack_component_with_examples_errors + tests/test_component_manager.py::test_pack_component_with_dest_dir + tests/test_profile.py::TestMultiStorageClient::test_registry_storage_url + tests/test_profile.py::TestMultiStorageClient::test_storage_clients_precedence + tests/test_mirror_sync.py::test_collect_component_versions_merges_multiple_specs + tests/test_mirror_sync.py::test_sync_dependency_with_matches + tests/test_mirror_sync.py::test_sync_dependency_with_rules + tests/test_mirror_sync.py::test_update_existing_local_mirror + tests/test_mirror_sync.py::test_registry_sync_latest_with_two_requirements + tests/cli/test_manifest_command.py::test_add_git_dependency + tests/cli/test_manifest_command.py::test_add_git_dependency_invalid + tests/cli/test_manifest_command.py::test_manifest_keeps_comments + tests/cli/test_module.py::test_raise_exception_on_warnings + tests/cli/test_registry_command.py::test_logout_from_registry_revoked_token + tests/sources/test_git.py::test_versions_component_hash + tests/version_solver/test_local_components_precedence.py::test_local_component_transitive_dependency + tests/version_solver/test_local_components_precedence.py::test_local_component_chain_dependency + + tests/test_lock.py::TestLockManager::test_lock_dump_with_solution + tests/test_lock.py::TestLockManager::test_lock_dump_with_dictionary + tests/test_lock.py::TestLockManager::test_lock_dump +) + +# network access +EPYTEST_IGNORE=( + tests/test_api_client.py + tests/test_prepare_dep_dirs.py +) + +EPYTEST_PLUGINS=( pytest-mock ) +distutils_enable_tests pytest diff --git a/dev-embedded/idf-component-manager/metadata.xml b/dev-embedded/idf-component-manager/metadata.xml new file mode 100644 index 000000000000..23e2573588b1 --- /dev/null +++ b/dev-embedded/idf-component-manager/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>stkw0@disroot.org</email> + <name>David Roman</name> + </maintainer> + <upstream> + <remote-id type="github">espressif/idf-component-manager</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/imsprog/Manifest b/dev-embedded/imsprog/Manifest new file mode 100644 index 000000000000..d451a05b4bac --- /dev/null +++ b/dev-embedded/imsprog/Manifest @@ -0,0 +1 @@ +DIST imsprog-1.8.3_p20260518.tar.gz 2068639 BLAKE2B 8787f93d48126eeec0e086f12f1fce4a396e3cb6bb3b684ed1157aaeaf841f96b71fabbfe9134d608a2883b4dc41bcbc2f86d95b9dd9fcd94554a8902d84ed3c SHA512 3a2e7b6020db53d4c9a4589b440b690c0f00b54fdb796c7910cad9d4d9bfcbe6c7fc146f5e7ad5757db1ab4bbc7cb8811ff960774ac45e364f319a260d8a31ff diff --git a/dev-embedded/imsprog/imsprog-1.8.3_p20260518.ebuild b/dev-embedded/imsprog/imsprog-1.8.3_p20260518.ebuild new file mode 100644 index 000000000000..f2108459208d --- /dev/null +++ b/dev-embedded/imsprog/imsprog-1.8.3_p20260518.ebuild @@ -0,0 +1,50 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake udev + +MY_PN="IMSProg" +DESCRIPTION="I2C, MicroWire and SPI EEPROM/Flash chip Programmer" +HOMEPAGE="https://github.com/bigbigmdm/IMSProg" +HASH_COMMIT="97f56e23c248c1f06884996abe12c0c91981bf63" +if [[ ${PV} == *_p* ]]; then + SRC_URI="https://github.com/bigbigmdm/IMSProg/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${MY_PN}-${HASH_COMMIT}" +else + SRC_URI="https://github.com/bigbigmdm/IMSProg/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${MY_PN}-${PV}" +fi + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-qt/qtbase:6[gui,network,ssl,widgets] + >=virtual/libusb-1-r2:1 +" +RDEPEND="${DEPEND} + virtual/udev +" +BDEPEND=" + app-alternatives/gzip + dev-qt/qttools:6[linguist] + virtual/pkgconfig +" + +src_install() { + local HTML_DOCS=( IMSProg_programmer/other/index.html img/* ) + cmake_src_install + rm -r "${ED}"/usr/share/doc/imsprog || die + gunzip "${ED}"/usr/share/man/man1/* || die +} + +pkg_postrm() { + udev_reload +} + +pkg_postinst() { + udev_reload +} diff --git a/dev-embedded/imsprog/metadata.xml b/dev-embedded/imsprog/metadata.xml new file mode 100644 index 000000000000..5fe3f4830c38 --- /dev/null +++ b/dev-embedded/imsprog/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>christianschoffit@gmail.com</email> + <name>Christian Schoffit</name> + </maintainer> + <longdescription> + IMSProg - software for CH341A-based programmers to work with I2C, + SPI and MicroWire EEPROM/Flash chips. It is composed by IMSProg + (the programmer), IMSProgEditor (the chip database editor) and + IMSProgUpdater (the chip database updates downloader) + </longdescription> + <upstream> + <maintainer> + <name>Mikhail Medvedev</name> + <email>e-ink-reader@yandex.ru</email> + </maintainer> + <changelog>https://github.com/bigbigmdm/IMSProg/releases</changelog> + <doc>https://github.com/bigbigmdm/IMSProg</doc> + <remote-id type="github">bigbigmdm/IMSProg</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/include/Manifest b/dev-embedded/include/Manifest new file mode 100644 index 000000000000..73a092fa83b7 --- /dev/null +++ b/dev-embedded/include/Manifest @@ -0,0 +1 @@ +DIST include-0.4.2.tar.bz2 110312 BLAKE2B d6104fce3dd95d003b5704449300e1d70bfc225b25e24ab717e0249197eebeb0063c9c5d73e5f65050f11e0920950959ce3a525801e436bef8cdcffa4e8052c0 SHA512 5c8f6eab27bfbc7628107162cae71d2e88ce6d96b655427468b81de052abf02ef48b7fe05435fc1468855e21665e4e973ef63d94265351f09e078119180dc07b diff --git a/dev-embedded/include/include-0.4.2-r1.ebuild b/dev-embedded/include/include-0.4.2-r1.ebuild new file mode 100644 index 000000000000..34fc3fcc1d81 --- /dev/null +++ b/dev-embedded/include/include-0.4.2-r1.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="A collection of useful, independent include files for C/Assembler developers" +HOMEPAGE="https://openwince.sourceforge.net/include/" +SRC_URI="https://downloads.sourceforge.net/openwince/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ppc ~sparc x86" + +src_prepare() { + default + + eautoreconf +} diff --git a/dev-embedded/include/metadata.xml b/dev-embedded/include/metadata.xml new file mode 100644 index 000000000000..a3853962acee --- /dev/null +++ b/dev-embedded/include/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">openwince</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/jal/Manifest b/dev-embedded/jal/Manifest new file mode 100644 index 000000000000..fd6c44012e8c --- /dev/null +++ b/dev-embedded/jal/Manifest @@ -0,0 +1 @@ +DIST jal-0.4.62.tar.gz 429020 BLAKE2B 65e04feb0379050b535c0dcb513e0955a6f20bd0f8cd8a50179bbf20ee6d114cf301a85dfa9553533db81c9db819a014409aa44e54287ff69a663df8bae2e0a3 SHA512 2354359507c2d33d8eeb7a5b9d40471a2d8cff245eb59d64484a89e4aff14d7d3c6021f0b26f1e48adb986fc221e4dade1037cef50167cbe249da445c77dbcb1 diff --git a/dev-embedded/jal/files/jal-0.4.62-fix-incompatible-integer-to-pointer-clang16.patch b/dev-embedded/jal/files/jal-0.4.62-fix-incompatible-integer-to-pointer-clang16.patch new file mode 100644 index 000000000000..77536e0fefac --- /dev/null +++ b/dev-embedded/jal/files/jal-0.4.62-fix-incompatible-integer-to-pointer-clang16.patch @@ -0,0 +1,22 @@ +Bug: https://bugs.gentoo.org/883243 +--- a/jal/treerep.c ++++ b/jal/treerep.c +@@ -892,7 +892,7 @@ tree new_asm(loc_t loc, opcode_t opcode, tree arg1, int arg2) + + + if (code_has(p->opcode, field_flabel)) { +- assert_pointer(NULL, arg2); ++ assert_pointer(NULL, (void *)arg2); + p->next = new_const(new_value(type_universal, arg2)); + } + +--- a/jal/treetools.c ++++ b/jal/treetools.c +@@ -600,7 +600,6 @@ tree arg(tree p, int n, boolean must_find) + #endif + assert_kind(p->loc, p, node_procedure); + /* jal_assert(p->loc, n > 0); */ +- assert_pointer(p->loc, n > 0); + p = p->first; + assert_pointer(NULL, p); + diff --git a/dev-embedded/jal/jal-0.4.62-r1.ebuild b/dev-embedded/jal/jal-0.4.62-r1.ebuild new file mode 100644 index 000000000000..d4ed0ecf57b6 --- /dev/null +++ b/dev-embedded/jal/jal-0.4.62-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="A high-level language for Microchip PIC and Ubicom SX microcontrollers" +HOMEPAGE="https://jal.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/jal/${P}.tar.gz" +S="${WORKDIR}/${PN}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +PATCHES=( + "${FILESDIR}"/${PN}-0.4.62-fix-incompatible-integer-to-pointer-clang16.patch +) + +src_prepare() { + default + eautoreconf +} diff --git a/dev-embedded/jal/metadata.xml b/dev-embedded/jal/metadata.xml new file mode 100644 index 000000000000..d57ae0cb0cd4 --- /dev/null +++ b/dev-embedded/jal/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <longdescription> + Jal is a high-level language for a number of Microchip (TM) PIC microcontrollers (16c84, 16f84, 12c508, + 12c509, 16F877) and Ubicom SX (SX18 and SX28) microcontrollers + </longdescription> + <upstream> + <remote-id type="sourceforge">jal</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/kobs-ng/Manifest b/dev-embedded/kobs-ng/Manifest new file mode 100644 index 000000000000..33986eb0cda3 --- /dev/null +++ b/dev-embedded/kobs-ng/Manifest @@ -0,0 +1 @@ +DIST kobs-ng-3.0.35-4.1.0.tar.gz 145817 BLAKE2B eed8a20be261c5ee03f0cff0d0381079353a7f0887202201eabe1377bc14387b7e5b2240bdf4e5d908aaa38dd58ec3299e8a1ea264122970a872cc29aadaf23b SHA512 b2bb27202ecbf31bebec8eadcf04362178ec74337400416259237880b94ac2e5fcffae59b48857e9fcfa1b1aae584b181901d4dafea63eb1e0972ed3bc3b9e6e diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch new file mode 100644 index 000000000000..28b1ef97c7f0 --- /dev/null +++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch @@ -0,0 +1,13 @@ +the part array is declared as part[2], so trying to index [2] isn't going to work + +--- a/src/mtd.c ++++ b/src/mtd.c +@@ -786,7 +786,7 @@ + mp->ecc = 1; + } + +- if (md->part[1].fd >= 0 && md->part[2].fd >=0) ++ if (md->part[1].fd >= 0) + md->flags |= F_MULTICHIP; + + /* if a second partition has been opened, verify that are compatible */ diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch new file mode 100644 index 000000000000..b7dfbe3e2e39 --- /dev/null +++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch @@ -0,0 +1,75 @@ +# Source: http://git.buildroot.net/buildroot/plain/package/kobs-ng/kobs-ng-fix-mtd-defines.patch?id=b6fb2f5018fe0ae9bba275991efc502236422924 + +Newer kernel headers renamed mtd mode defines and no longer support +MEMSETOOBSEL. Allow code to work with both older and newer kernel +versions. + +Signed-off-by: Paul B. Henson <henson@acm.org> + +diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.c kobs-ng-3.0.35-4.0.0/src/mtd.c +--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.c 2012-12-17 22:37:40.000000000 -0800 ++++ kobs-ng-3.0.35-4.0.0/src/mtd.c 2013-07-28 19:39:59.000000000 -0700 +@@ -852,8 +852,11 @@ + mp = &md->part[i]; + + if (mp->fd != -1) { ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + (void)ioctl(mp->fd, MEMSETOOBSEL, + &mp->old_oobinfo); ++#endif + close(mp->fd); + } + +@@ -896,6 +899,8 @@ + continue; + } + ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + if (r == -ENOTTY) { + r = ioctl(mp->fd, MEMSETOOBSEL, &mp->old_oobinfo); + if (r != 0) { +@@ -904,6 +909,7 @@ + } + mp->oobinfochanged = 0; + } ++#endif + } else { + r = ioctl(mp->fd, MTDFILEMODE, (void *)MTD_MODE_RAW); + if (r != 0 && r != -ENOTTY) { +@@ -911,6 +917,8 @@ + continue; + } + ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + if (r == -ENOTTY) { + r = ioctl(mp->fd, MEMSETOOBSEL, &none_oobinfo); + if (r != 0) { +@@ -920,6 +928,7 @@ + mp->oobinfochanged = 1; + } else + mp->oobinfochanged = 2; ++#endif + } + + mp->ecc = ecc; +diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.h kobs-ng-3.0.35-4.0.0/src/mtd.h +--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.h 2012-12-17 22:37:40.000000000 -0800 ++++ kobs-ng-3.0.35-4.0.0/src/mtd.h 2013-07-28 19:33:57.000000000 -0700 +@@ -31,6 +31,14 @@ + #include "BootControlBlocks.h" + #include "rom_nand_hamming_code_ecc.h" + ++// Newer kernel headers renamed define ++#ifndef MTD_MODE_NORMAL ++#define MTD_MODE_NORMAL MTD_FILE_MODE_NORMAL ++#endif ++#ifndef MTD_MODE_RAW ++#define MTD_MODE_RAW MTD_FILE_MODE_RAW ++#endif ++ + //------------------------------------------------------------------------------ + // Re-definitions of true and false, because the standard ones aren't good + // enough? diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch new file mode 100644 index 000000000000..47fd33170b2e --- /dev/null +++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch @@ -0,0 +1,13 @@ +add missing mode to open() when using O_CREAT + +--- kobs-ng-3.0.35-4.1.0/src/main.c ++++ kobs-ng-3.0.35-4.1.0/src/main.c +@@ -563,7 +563,7 @@ + int sz = getpagesize(); + + from = open(file_name, O_RDONLY); +- to = open(tmp_file, O_CREAT | O_RDWR); ++ to = open(tmp_file, O_CREAT | O_RDWR, 0644); + if (from < 0 || to < 0) { + fprintf(stderr, "unable to create a temporary file\n"); + exit(5); diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-stdint.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-stdint.patch new file mode 100644 index 000000000000..d323da1d09ec --- /dev/null +++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-stdint.patch @@ -0,0 +1,93 @@ +--- a/src/BootControlBlocks.h ++++ b/src/BootControlBlocks.h +@@ -20,6 +20,8 @@ + #ifndef BOOTCONTROLBLOCKS_H_ + #define BOOTCONTROLBLOCKS_H_ + ++#include <stdint.h> ++ + #define NCB_FINGERPRINT1 0x504d5453 //!< 'STMP' + #define NCB_FINGERPRINT2 0x2042434e //!< 'NCB<space>' - NAND Control Block + #define NCB_FINGERPRINT3 0x4e494252 //!< 'RBIN' - ROM Boot Image Block - N +--- a/src/bootstream.c ++++ b/src/bootstream.c +@@ -30,6 +30,7 @@ + #include <time.h> + #include <alloca.h> + #include <stddef.h> ++#include <stdint.h> + + #include "config.h" + #include "mtd.h" +--- a/src/dcp_bootstream_ioctl.h ++++ b/src/dcp_bootstream_ioctl.h +@@ -20,6 +20,8 @@ + #ifndef DCP_BOOTSTREAM_IOCTL_H + #define DCP_BOOTSTREAM_IOCTL_H + ++#include <stdint.h> ++ + /* remember to have included the proper _IO definition + * file before hand. + * For user space it's <sys/ioctl.h> +--- a/src/mtd.c ++++ b/src/mtd.c +@@ -24,6 +24,7 @@ + + #define _GNU_SOURCE + #include <stdio.h> ++#include <stdint.h> + #include <malloc.h> + #include <unistd.h> + #include <stdlib.h> +--- a/src/mtd.h ++++ b/src/mtd.h +@@ -25,6 +25,8 @@ + #ifndef MTD_H + #define MTD_H + ++#include <stdint.h> ++ + #include <mtd/mtd-user.h> + #include <endian.h> + +--- a/src/ncb.c ++++ b/src/ncb.c +@@ -25,6 +25,7 @@ + #include <string.h> + #include <assert.h> + #include <errno.h> ++#include <stdint.h> + + #include "mtd.h" + #include "config.h" +--- a/src/plat_boot_config.h ++++ b/src/plat_boot_config.h +@@ -23,6 +23,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <stdint.h> + + #include "mtd.h" + +--- a/src/rom_nand_hamming_code_ecc.c ++++ b/src/rom_nand_hamming_code_ecc.c +@@ -32,6 +32,7 @@ + // Includes and external references + //////////////////////////////////////////////////////////////////////////////// + ++#include <stdint.h> + #include <string.h> + + #include "rom_nand_hamming_code_ecc.h" +--- a/src/sha1.c ++++ b/src/sha1.c +@@ -23,6 +23,7 @@ + * SUCH DAMAGE. + */ + ++#include <stdint.h> + #include <string.h> + + #include "sha.h" diff --git a/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild b/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild new file mode 100644 index 000000000000..0b1be3432977 --- /dev/null +++ b/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PV="$(ver_cut 1-3)-$(ver_cut 4-)" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Utility to write u-boot images to NAND on Freescale iMX devices" +HOMEPAGE="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6_SW" +SRC_URI="http://storage.googleapis.com/chromeos-localmirror/distfiles/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-fix-mtd-defines.patch + "${FILESDIR}"/${PN}-fix-open-without-mode.patch + "${FILESDIR}"/${PN}-fix-array-violation.patch + "${FILESDIR}"/${PN}-fix-stdint.patch +) diff --git a/dev-embedded/kobs-ng/metadata.xml b/dev-embedded/kobs-ng/metadata.xml new file mode 100644 index 000000000000..98ae10b3c34a --- /dev/null +++ b/dev-embedded/kobs-ng/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> diff --git a/dev-embedded/libdisasm/Manifest b/dev-embedded/libdisasm/Manifest new file mode 100644 index 000000000000..bbcc529ef2b2 --- /dev/null +++ b/dev-embedded/libdisasm/Manifest @@ -0,0 +1 @@ +DIST libdisasm-0.23.tar.gz 454721 BLAKE2B d695b9e102e361c0f005fa8f04163d54fbdcc5254f6e203eee967c58733a2bfdb4ffd9ebfedac3d6e2f06364df03a5c961514f3db6897707402e342c4777e806 SHA512 29eecfbfd8168188242278a1a38f0c90770d0581a52d4600ae6343829dd0d6607b98329f12a3d7409d43dd56dca6a7d1eb25d58a001c2bfd3eb8474c0e7879e7 diff --git a/dev-embedded/libdisasm/files/libdisasm-0.23-user-AS-OBJDUMP.patch b/dev-embedded/libdisasm/files/libdisasm-0.23-user-AS-OBJDUMP.patch new file mode 100644 index 000000000000..93e1131b0c81 --- /dev/null +++ b/dev-embedded/libdisasm/files/libdisasm-0.23-user-AS-OBJDUMP.patch @@ -0,0 +1,15 @@ +--- a/test/asmdisasm.pl ++++ b/test/asmdisasm.pl +@@ -22,10 +22,10 @@ + # uninitialized stuff + my ($line, $output); + +-system "as --32 -o $obj_file $asm_file"; ++system "$ENV{AS} --32 -o $obj_file $asm_file"; + exit(1) if ($? != 0); + +-$output = (grep(/\.text/,`objdump -h $obj_file`))[0]; ++$output = (grep(/\.text/,`$ENV{OBJDUMP} -h $obj_file`))[0]; + $output =~ s/^\s+//g; + my ($idx,$name,$size,$vma,$lma,$offset,$align)=split(/\s+/,$output); + $size = hex($size); diff --git a/dev-embedded/libdisasm/libdisasm-0.23-r1.ebuild b/dev-embedded/libdisasm/libdisasm-0.23-r1.ebuild new file mode 100644 index 000000000000..31d2d575f756 --- /dev/null +++ b/dev-embedded/libdisasm/libdisasm-0.23-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Provides basic disassembly of Intel x86 instructions from a binary stream" +HOMEPAGE="https://bastard.sourceforge.net/libdisasm.html" +SRC_URI="https://downloads.sourceforge.net/project/bastard/${PN}/${PV}/${P}.tar.gz" + +LICENSE="Clarified-Artistic" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" + +PATCHES=( "${FILESDIR}"/${P}-user-AS-OBJDUMP.patch ) + +src_configure() { + # bug 722606 + tc-export AS OBJDUMP + + econf +} + +src_install() { + default + + # no static archives + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-embedded/libdisasm/metadata.xml b/dev-embedded/libdisasm/metadata.xml new file mode 100644 index 000000000000..7e3786e434e3 --- /dev/null +++ b/dev-embedded/libdisasm/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">bastard</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/libftd2xx/Manifest b/dev-embedded/libftd2xx/Manifest new file mode 100644 index 000000000000..da3ca4509950 --- /dev/null +++ b/dev-embedded/libftd2xx/Manifest @@ -0,0 +1,3 @@ +DIST libftd2xx-arm-v6-hf-1.4.33.tar.gz 555312 BLAKE2B 730344c7ed89928f5b90ba3a1da9cca4c83ec10d2fde9b1d89637ba0e6f84e7f9afc7d2b0b31a133a3b48586600d1ffec58c2bad9880690dc30ab87b2e177d50 SHA512 8548fc94612c3780f3cc892182746996252e941a6449286d5f72464ea96e7356e0cc060443535df3d7d6d38464a2bac30d71e31f266a9c40be985bfe10da288e +DIST libftd2xx-x86_32-1.4.33.tar.gz 568501 BLAKE2B dc1fab398abc7ca8a8c6bdd0d0a227289ab3c89950d33b01962966d99e84fde02d7a35319d9c149fe88925f44b9d1dbaa9213b2589fce1aa646340ffc124c18c SHA512 f21cb29058037782c7e6a7a41e3dc1287fb1b383a79cb8247a2382a03d07378f9a66d59bf31057080fc78d107a5982950fe9d3adc18a254a652aacc6cd3f6ec8 +DIST libftd2xx-x86_64-1.4.33.tar.gz 570741 BLAKE2B ba3cd42fb6796d1ac2bd6ce5a78f26ef3e1658a16b23b4d0b15db797f443e4430c197494d22d6843bbd8f605d82879f7afd8626d74ed53c48cea038038906243 SHA512 655fa76a3f650ec3af73245a3c5d6562a0e2c820437fa3aa793d7dc5d166f7463ec1490f0562969f4c63862c176e31f613afdea8e3336b26538bc7520678d7b3 diff --git a/dev-embedded/libftd2xx/libftd2xx-1.4.33.ebuild b/dev-embedded/libftd2xx/libftd2xx-1.4.33.ebuild new file mode 100644 index 000000000000..7bd1b4e03fd4 --- /dev/null +++ b/dev-embedded/libftd2xx/libftd2xx-1.4.33.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Library that allows a direct access to a USB device" +HOMEPAGE="https://www.ftdichip.com/drivers/d2xx-drivers/" +# NOTE: We could include other arm versions here too. +MY_URI="https://ftdichip.com/wp-content/uploads/2025/03" +SRC_URI=" + amd64? ( ${MY_URI}/${PN}-linux-x86_64-${PV}.tgz -> ${PN}-x86_64-${PV}.tar.gz ) + arm? ( ${MY_URI}/${PN}-linux-arm-v6-hf-${PV}.tgz -> ${PN}-arm-v6-hf-${PV}.tar.gz ) + x86? ( ${MY_URI}/${PN}-linux-x86_32-${PV}.tgz -> ${PN}-x86_32-${PV}.tar.gz ) +" +S="${WORKDIR}" + +LICENSE="FTDI LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="examples" + +QA_PREBUILT="*" + +src_install() { + local myarch + if use amd64 ; then + myarch="linux-x86_64" + elif use x86 ; then + myarch="linux-x86_32" + elif use arm ; then + myarch="linux-arm-v6-hf" + fi + + cd "${myarch}" || die + + dolib.so ${PN}.so + dosym ${PN}.so /usr/$(get_libdir)/${PN}.so.${PV:0:1} + dosym ${PN}.so.${PV:0:1} /usr/$(get_libdir)/${PN}.so.${PV} + insinto /usr/include + doins ftd2xx.h WinTypes.h + + if use examples ; then + docinto sample + dodoc -r examples + fi + + dodoc release-notes.txt +} diff --git a/dev-embedded/libftd2xx/metadata.xml b/dev-embedded/libftd2xx/metadata.xml new file mode 100644 index 000000000000..d17e45aea3d5 --- /dev/null +++ b/dev-embedded/libftd2xx/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>vowstar@gmail.com</email> + <name>Huang Rui</name> + </maintainer> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> +</pkgmetadata> diff --git a/dev-embedded/libftdi/Manifest b/dev-embedded/libftdi/Manifest new file mode 100644 index 000000000000..dd6e7ef13b30 --- /dev/null +++ b/dev-embedded/libftdi/Manifest @@ -0,0 +1 @@ +DIST libftdi1-1.5.tar.bz2 116297 BLAKE2B 460ab93026e14a452e31fcc6930d305638fdc0ed06cb44fb9d50ad8f80199b17057d2f48a27b8295b43b956934289c872a2ef1ddb7f93fa93c6816511ef7607d SHA512 c525b2ab6aff9ef9254971ae7d57f3549a36a36875765c48f947d52532814a2a004de1232389d4fe824a8c8ab84277b08427308573476e1da9b7db83db802f6f diff --git a/dev-embedded/libftdi/files/libftdi-1.5-cmake-cxx.patch b/dev-embedded/libftdi/files/libftdi-1.5-cmake-cxx.patch new file mode 100644 index 000000000000..a04aee1cf1d0 --- /dev/null +++ b/dev-embedded/libftdi/files/libftdi-1.5-cmake-cxx.patch @@ -0,0 +1,46 @@ +https://bugs.gentoo.org/766818 + +From cdb28383402d248dbc6062f4391b038375c52385 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Fri, 17 Jul 2020 21:25:03 +0200 +Subject: [PATCH] CMakeLists.txt: fix paths when FTDIPP is set + +Use the same project name (i.e. libftdi1 and not libftdipp1) when FTDIPP +is enabled as suggested by Aurelien Jarno in +http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00044.html + +Without this change, the libftdi1.pc config file defines the include +path as /usr/local/include/libftdipp1 while the ftdi.h file is actually +installed in /usr/local/include/libftdi1 + +This is an issue for example for libsigrok which will fail on: + +In file included from src/hardware/asix-sigma/protocol.c:27: +src/hardware/asix-sigma/protocol.h:28:10: fatal error: ftdi.h: No such file or directory + 28 | #include <ftdi.h> + | ^~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/1427f44e36752c337791597fab47a1889552a2fe + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +--- + CMakeLists.txt | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5aecafc..3b0b87c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,7 +136,7 @@ endif () + + add_subdirectory(src) + if ( FTDIPP ) +- project(libftdipp1 C CXX) ++ project(libftdi1 C CXX) + add_subdirectory(ftdipp) + endif () + if ( PYTHON_BINDINGS ) +-- +1.7.1 + diff --git a/dev-embedded/libftdi/files/libftdi-1.5-cmake4.patch b/dev-embedded/libftdi/files/libftdi-1.5-cmake4.patch new file mode 100644 index 000000000000..21a9fa3ec1cd --- /dev/null +++ b/dev-embedded/libftdi/files/libftdi-1.5-cmake4.patch @@ -0,0 +1,87 @@ +From 503c8789db7cb99e4e53cae3c220f80aef07c785 Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov <yegorslists@googlemail.com> +Date: Wed, 2 Apr 2025 10:12:34 +0200 +Subject: [PATCH] CMakeLists.txt: bump CMake version to 3.15 + +Older CMake versions are treated as deprecated. + +merged with cherry-picks of preceding changes: + 3861e7dc9e83f2f6ff4e1579cf3bbf63a6827105 + de9f01ece34d2fe6e842e0250a38f4b16eda2429 + 3f314ed78111473b7cbf1b9d1854c9f6322eea7a + +diff -u a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,3 +1,5 @@ ++cmake_minimum_required(VERSION 3.15 FATAL_ERROR) ++ + # Project + project(libftdi1 C) + set(MAJOR_VERSION 1) +@@ -12,7 +14,6 @@ + set(CMAKE_BUILD_TYPE RelWithDebInfo) + endif("${CMAKE_BUILD_TYPE}" STREQUAL "") + set(CMAKE_COLOR_MAKEFILE ON) +-cmake_minimum_required(VERSION 2.6 FATAL_ERROR) + + add_definitions(-Wall) + +@@ -211,30 +212,25 @@ + + set ( LIBFTDI_USE_FILE ${CMAKE_INSTALL_PREFIX}/${LIBFTDI_CMAKE_CONFIG_DIR}/UseLibFTDI1.cmake ) + +-if(CMAKE_VERSION VERSION_LESS 2.8.8) +- configure_file ( cmake/LibFTDI1Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake @ONLY ) +- configure_file ( cmake/LibFTDI1ConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1ConfigVersion.cmake @ONLY ) +-else () +- include(CMakePackageConfigHelpers) +- +- configure_package_config_file ( +- cmake/LibFTDI1Config.cmake.in +- ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake +- INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR} +- PATH_VARS +- LIBFTDI_USE_FILE +- LIBFTDI_ROOT_DIR +- LIBFTDI_INCLUDE_DIR +- LIBFTDI_INCLUDE_DIRS +- LIBFTDI_LIBRARY_DIRS +- NO_CHECK_REQUIRED_COMPONENTS_MACRO +- ) +- write_basic_package_version_file ( +- LibFTDI1ConfigVersion.cmake +- VERSION ${LIBFTDI_VERSION_STRING} +- COMPATIBILITY AnyNewerVersion +- ) +-endif () ++include(CMakePackageConfigHelpers) ++ ++configure_package_config_file ( ++ cmake/LibFTDI1Config.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake ++ INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR} ++ PATH_VARS ++ LIBFTDI_USE_FILE ++ LIBFTDI_ROOT_DIR ++ LIBFTDI_INCLUDE_DIR ++ LIBFTDI_INCLUDE_DIRS ++ LIBFTDI_LIBRARY_DIRS ++ NO_CHECK_REQUIRED_COMPONENTS_MACRO ++) ++write_basic_package_version_file ( ++ LibFTDI1ConfigVersion.cmake ++ VERSION ${LIBFTDI_VERSION_STRING} ++ COMPATIBILITY AnyNewerVersion ++) + + + install ( FILES +--- a/examples/cmake_example/CMakeLists.txt ++++ b/examples/cmake_example/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required ( VERSION 2.8 ) ++cmake_minimum_required(VERSION 3.15 FATAL_ERROR) + + project ( example C ) + diff --git a/dev-embedded/libftdi/files/libftdi-1.5-py312.patch b/dev-embedded/libftdi/files/libftdi-1.5-py312.patch new file mode 100644 index 000000000000..51fdd10efd81 --- /dev/null +++ b/dev-embedded/libftdi/files/libftdi-1.5-py312.patch @@ -0,0 +1,25 @@ +https://bugs.gentoo.org/934224 +http://developer.intra2net.com/git/?p=libftdi;a=commit;h=abd19b721f7e9b4d514ed319ece173ebc7b1ea72 + +From abd19b721f7e9b4d514ed319ece173ebc7b1ea72 Mon Sep 17 00:00:00 2001 +From: =?utf8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz> +Date: Mon, 19 Dec 2022 17:40:43 +0100 +Subject: [PATCH] python: move from distutils to sysconfig + +The distutils module was deprecated in Python 3.10, and will be removed +in 3.12 [1], thus switch to the sysconfig module instead. + +[1] https://peps.python.org/pep-0632/ +--- a/python/CMakeLists.txt ++++ b/python/CMakeLists.txt +@@ -42,7 +42,7 @@ endif () + + set_target_properties ( ${SWIG_MODULE_ftdi1_REAL_NAME} PROPERTIES NO_SONAME ON ) + +-execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print( sysconfig.get_python_lib( plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}' ) )" ++execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig; print( sysconfig.get_path( 'platlib', vars={'platbase': '${CMAKE_INSTALL_PREFIX}'} ) )" + OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE ) + +-- +1.7.1 diff --git a/dev-embedded/libftdi/files/libftdi-1.5-swig-4.3.patch b/dev-embedded/libftdi/files/libftdi-1.5-swig-4.3.patch new file mode 100644 index 000000000000..59f53a6f7528 --- /dev/null +++ b/dev-embedded/libftdi/files/libftdi-1.5-swig-4.3.patch @@ -0,0 +1,82 @@ +https://bugs.gentoo.org/953348 +http://developer.intra2net.com/git/?p=libftdi;a=commit;h=ff7707e3ffadc09af420b26370b9e097a5b2bc8b + +From ff7707e3ffadc09af420b26370b9e097a5b2bc8b Mon Sep 17 00:00:00 2001 +From: William S Fulton <wsf@fultondesigns.co.uk> +Date: Fri, 18 Oct 2024 09:38:20 +0200 +Subject: [PATCH] python: update for SWIG 4.3 + +SWIG 4.3 comes with an API change to the SWIG_Python_AppendOutput() +function, so switch to the recommended SWIG_AppendOutput() instead. +Because the new function is a macro in fact also switch to the {..} +delimiters as the code needs to be preprocessed. The change is +compatible with the previous SWIG releases 4.2 and 4.1 at least. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2319133 +Related: https://github.com/swig/swig/pull/2907 +--- + python/ftdi1.i | 18 +++++++++--------- + 1 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/python/ftdi1.i b/python/ftdi1.i +index 8b179f9..fac4d16 100644 +--- a/python/ftdi1.i ++++ b/python/ftdi1.i +@@ -52,7 +52,7 @@ char * str2charp_size(PyObject* pyObj, int * size) + %enddef + %feature("autodoc", ftdi_usb_find_all_docstring) ftdi_usb_find_all; + %typemap(in,numinputs=0) SWIGTYPE** OUTPUT ($*ltype temp) %{ $1 = &temp; %} +-%typemap(argout) SWIGTYPE** OUTPUT %{ $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj((void*)*$1,$*descriptor,0)); %} ++%typemap(argout,noblock=1) SWIGTYPE** OUTPUT { $result = SWIG_AppendOutput($result, SWIG_NewPointerObj((void*)*$1,$*descriptor,0)); } + %apply SWIGTYPE** OUTPUT { struct ftdi_device_list **devlist }; + int ftdi_usb_find_all(struct ftdi_context *ftdi, struct ftdi_device_list **devlist, + int vendor, int product); +@@ -92,12 +92,12 @@ char * str2charp_size(PyObject* pyObj, int * size) + %enddef + %feature("autodoc", ftdi_read_data_docstring) ftdi_read_data; + %typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %} +-%typemap(argout) (unsigned char *buf, int size) %{ ++%typemap(argout,noblock=1) (unsigned char *buf, int size) { + if(result<0) + $2=0; +- $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, $2)); ++ $result = SWIG_AppendOutput($result, charp2str((char*)$1, $2)); + free($1); +-%} ++} + int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int size); + %clear (unsigned char *buf, int size); + +@@ -119,12 +119,12 @@ char * str2charp_size(PyObject* pyObj, int * size) + %enddef + %feature("autodoc", ftdi_read_pins_docstring) ftdi_read_pins; + %typemap(in,numinputs=0) unsigned char *pins ($*ltype temp) %{ $1 = &temp; %} +-%typemap(argout) (unsigned char *pins) %{ $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, 1)); %} ++%typemap(argout,noblock=1) (unsigned char *pins) { $result = SWIG_AppendOutput($result, charp2str((char*)$1, 1)); } + int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins); + %clear unsigned char *pins; + + %typemap(in,numinputs=0) unsigned char *latency ($*ltype temp) %{ $1 = &temp; %} +-%typemap(argout) (unsigned char *latency) %{ $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, 1)); %} ++%typemap(argout,noblock=1) (unsigned char *latency) { $result = SWIG_AppendOutput($result, charp2str((char*)$1, 1)); } + int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char *latency); + %clear unsigned char *latency; + +@@ -137,12 +137,12 @@ char * str2charp_size(PyObject* pyObj, int * size) + %clear int* value; + + %typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %} +-%typemap(argout) (unsigned char *buf, int size) %{ ++%typemap(argout,noblock=1) (unsigned char *buf, int size) { + if(result<0) + $2=0; +- $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, $2)); ++ $result = SWIG_AppendOutput($result, charp2str((char*)$1, $2)); + free($1); +-%} ++} + int ftdi_get_eeprom_buf(struct ftdi_context *ftdi, unsigned char * buf, int size); + %clear (unsigned char *buf, int size); + +-- +1.7.1 diff --git a/dev-embedded/libftdi/files/libftdi-1.5-tests-no-cxx.patch b/dev-embedded/libftdi/files/libftdi-1.5-tests-no-cxx.patch new file mode 100644 index 000000000000..6adba408f7f1 --- /dev/null +++ b/dev-embedded/libftdi/files/libftdi-1.5-tests-no-cxx.patch @@ -0,0 +1,35 @@ +Fixes failure to build tests with USE="-cxx" (default). +http://developer.intra2net.com/git/?p=libftdi;a=patch;h=11a50ae5b80b3e03694a19e84513345d0794e563;hp=6dd18122a81e6030dd239391df6ffde8cb8c59c7 +From 11a50ae5b80b3e03694a19e84513345d0794e563 Mon Sep 17 00:00:00 2001 +From: Thomas Jarosch <thomas.jarosch@intra2net.com> +Date: Mon, 24 Aug 2020 19:27:22 +0200 +Subject: [PATCH 1/1] Fix building unit tests without FTDIPP + +Needed to run the baudrate unit tests. + +Probably another fallout from: + +**************************** +commit 0209a3633dc877a577af07d883eb5059e22f6a91 + +cmake: do not check for g++ when FTDIPP is disabled +**************************** +--- + CMakeLists.txt | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3b0b87c..58f664a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,6 +150,7 @@ if ( EXAMPLES ) + endif () + add_subdirectory(packages) + if ( BUILD_TESTS ) ++ project(libftdi1 C CXX) + add_subdirectory(test) + endif () + +-- +1.7.1 + diff --git a/dev-embedded/libftdi/libftdi-1.5-r8.ebuild b/dev-embedded/libftdi/libftdi-1.5-r8.ebuild new file mode 100644 index 000000000000..c06e554d0a2b --- /dev/null +++ b/dev-embedded/libftdi/libftdi-1.5-r8.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P="${PN}1-${PV}" +PYTHON_COMPAT=( python3_{13..14} ) +inherit cmake python-single-r1 + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="git://developer.intra2net.com/${PN}" +else + SRC_URI="https://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2" + S="${WORKDIR}/${MY_P}" + KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86" +fi + +DESCRIPTION="Userspace access to FTDI USB interface chips" +HOMEPAGE="https://www.intra2net.com/en/developer/libftdi/" + +LICENSE="LGPL-2" +SLOT="1" +IUSE="cxx doc examples python test tools" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +RDEPEND=" + virtual/libusb:1 + cxx? ( dev-libs/boost ) + doc? ( !dev-embedded/libftdi:0[doc] ) + python? ( ${PYTHON_DEPS} ) + tools? ( dev-libs/confuse:= ) +" +DEPEND="${RDEPEND} + test? ( dev-libs/boost ) +" +BDEPEND=" + doc? ( app-text/doxygen ) + python? ( >=dev-lang/swig-4.2.0 ) +" + +PATCHES=( + "${FILESDIR}"/${P}-tests-no-cxx.patch + "${FILESDIR}"/${P}-cmake-cxx.patch + "${FILESDIR}"/${P}-py312.patch + "${FILESDIR}"/${P}-cmake4.patch + "${FILESDIR}"/${P}-swig-4.3.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DFTDIPP=$(usex cxx) + -DDOCUMENTATION=$(usex doc) + -DEXAMPLES=$(usex examples) + -DPYTHON_BINDINGS=$(usex python) + -DBUILD_TESTS=$(usex test) + -DFTDI_EEPROM=$(usex tools) + -DCMAKE_SKIP_BUILD_RPATH=ON + -DSTATICLIBS=OFF + ) + cmake_src_configure +} + +src_test() { + cd "${BUILD_DIR}/test" || die + LD_LIBRARY_PATH="${BUILD_DIR}/src" ./test_libftdi1 -l all || die +} + +src_install() { + cmake_src_install + + use python && python_optimize + dodoc AUTHORS ChangeLog README TODO + + if use doc ; then + # Clean up man pages with too generic names. #356369 + rm -vf "${BUILD_DIR}"/doc/man/man3/_* || die + + doman "${BUILD_DIR}"/doc/man/man3/* + dodoc -r "${BUILD_DIR}"/doc/html + fi + + if use examples ; then + docinto examples + dodoc examples/*.c + fi +} diff --git a/dev-embedded/libftdi/libftdi-9999.ebuild b/dev-embedded/libftdi/libftdi-9999.ebuild new file mode 100644 index 000000000000..a5809506dbea --- /dev/null +++ b/dev-embedded/libftdi/libftdi-9999.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P="${PN}1-${PV}" +PYTHON_COMPAT=( python3_{13..14} ) +inherit cmake python-single-r1 + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="git://developer.intra2net.com/${PN}" +else + SRC_URI="https://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2" + S="${WORKDIR}/${MY_P}" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +DESCRIPTION="Userspace access to FTDI USB interface chips" +HOMEPAGE="https://www.intra2net.com/en/developer/libftdi/" + +LICENSE="LGPL-2" +SLOT="1" +IUSE="cxx doc examples python test tools" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +RDEPEND=" + virtual/libusb:1 + cxx? ( dev-libs/boost ) + python? ( ${PYTHON_DEPS} ) + tools? ( dev-libs/confuse:= ) +" +DEPEND="${RDEPEND} + test? ( dev-libs/boost ) +" +BDEPEND=" + doc? ( app-text/doxygen ) + python? ( >=dev-lang/swig-4.2.0 ) +" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DFTDIPP=$(usex cxx) + -DDOCUMENTATION=$(usex doc) + -DEXAMPLES=$(usex examples) + -DPYTHON_BINDINGS=$(usex python) + -DBUILD_TESTS=$(usex test) + -DFTDI_EEPROM=$(usex tools) + -DCMAKE_SKIP_BUILD_RPATH=ON + -DSTATICLIBS=OFF + ) + cmake_src_configure +} + +src_test() { + cd "${BUILD_DIR}/test" || die + LD_LIBRARY_PATH="${BUILD_DIR}/src" ./test_libftdi1 -l all || die +} + +src_install() { + cmake_src_install + + use python && python_optimize + dodoc AUTHORS ChangeLog README TODO + + if use doc ; then + # Clean up man pages with too generic names. #356369 + rm -vf "${BUILD_DIR}"/doc/man/man3/_* || die + + doman "${BUILD_DIR}"/doc/man/man3/* + dodoc -r "${BUILD_DIR}"/doc/html + fi + + if use examples ; then + docinto examples + dodoc examples/*.c + fi +} diff --git a/dev-embedded/libftdi/metadata.xml b/dev-embedded/libftdi/metadata.xml new file mode 100644 index 000000000000..2a9cc0fb2349 --- /dev/null +++ b/dev-embedded/libftdi/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +<use> + <flag name="tools">build ftdi_eeprom helper tool</flag> +</use> +</pkgmetadata> diff --git a/dev-embedded/libjaylink/Manifest b/dev-embedded/libjaylink/Manifest new file mode 100644 index 000000000000..dc1bd8e5b022 --- /dev/null +++ b/dev-embedded/libjaylink/Manifest @@ -0,0 +1 @@ +DIST libjaylink-0.3.1.tar.bz2 61062 BLAKE2B 7a220b7e1ae1818b9d65d6bb92b282516ce6e4144ce77ee8b77088ebc92f9a091ae04a78c043afaa90ee9f737baa7c2fcd0a9237b60662af0d858fb24cef1c5e SHA512 4964e522cb59f59db444ca350529dd3695e2ccb451f7607e2c14074bafe47688f35b2e8b3304170a611db2d21040f3f98c95def179cf4f95733287986811fd78 diff --git a/dev-embedded/libjaylink/libjaylink-0.3.1.ebuild b/dev-embedded/libjaylink/libjaylink-0.3.1.ebuild new file mode 100644 index 000000000000..efa49fe3dcb0 --- /dev/null +++ b/dev-embedded/libjaylink/libjaylink-0.3.1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools udev + +DESCRIPTION="Library to access J-Link devices" +HOMEPAGE="https://gitlab.zapb.de/libjaylink/libjaylink" +SRC_URI="https://gitlab.zapb.de/libjaylink/libjaylink/-/archive/${PV}/${P}.tar.bz2" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 arm ~loong ~riscv x86" + +DEPEND="virtual/libusb:1" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + # Remove -Werror from CFLAGS. + sed -i '/^JAYLINK_CFLAGS=/s/ -Werror//' configure.ac || die + + eautoreconf +} + +src_configure() { + econf --disable-static +} + +src_install() { + default + udev_dorules contrib/99-${PN}.rules + find "${D}" -type f -name '*.la' -delete || die +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-embedded/libjaylink/metadata.xml b/dev-embedded/libjaylink/metadata.xml new file mode 100644 index 000000000000..98ae10b3c34a --- /dev/null +++ b/dev-embedded/libjaylink/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> diff --git a/dev-embedded/lpc21isp/Manifest b/dev-embedded/lpc21isp/Manifest new file mode 100644 index 000000000000..675d272fbf03 --- /dev/null +++ b/dev-embedded/lpc21isp/Manifest @@ -0,0 +1 @@ +DIST lpc21isp-1.97.tar.gz 62171 BLAKE2B 0c01e35c4006f6b106651629f82a025fa15810e0b809adc8d672d1e8a8bde0e81b897bfd2fab88b770ac5527ded537567c1e8b3eb16f938752c56779f5435aa3 SHA512 bd4644352b9d4f3c24f93d8fe68274e2d238d9c91d3d0d6a0c06b878d31099cada772b35ce94885bccd309f5e2e56bc881a0a5302901349046a51537cfebb795 diff --git a/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild b/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild new file mode 100644 index 000000000000..1814ae50a1bf --- /dev/null +++ b/dev-embedded/lpc21isp/lpc21isp-1.97.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P="${PN}_$(ver_rs 1- '')" + +DESCRIPTION="In-circuit programming (ISP) tool for the NXP microcontrollers" +HOMEPAGE="https://sourceforge.net/projects/lpc21isp/" +SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${MY_P}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +S="${WORKDIR}"/${MY_P} + +src_prepare() { + default + + # Upstream makefile has got DOS line endings so using patches there is fragile, + # see Bug #827018. + sed -i -e 's#^\(CC \?\)=#\1?=#' Makefile || die +} + +src_install() { + dobin lpc21isp +} diff --git a/dev-embedded/lpc21isp/metadata.xml b/dev-embedded/lpc21isp/metadata.xml new file mode 100644 index 000000000000..d36d3a6b610c --- /dev/null +++ b/dev-embedded/lpc21isp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <longdescription>In-circuit programming (ISP) tool for the NXP (Philips) LPC1100 / LPC1300 / LPC1700 / LPC2000 series ARM7 / Cortex-M0 / Cortex-M3 microcontrollers</longdescription> + <upstream> + <remote-id type="sourceforge">lpc21isp</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/mavlink_c/Manifest b/dev-embedded/mavlink_c/Manifest new file mode 100644 index 000000000000..e9599ebf7272 --- /dev/null +++ b/dev-embedded/mavlink_c/Manifest @@ -0,0 +1 @@ +DIST mavlink_c-20220518.tar.gz 875511 BLAKE2B d7776e8200b00802d77a07fac68625a9c72c9c6bec4d35be309235d31731581f7f5faf4b94792cc6158cc69ab56607ab4abb40ffd9879f24c861145fe5aded33 SHA512 9dd29cc6d8efb0d3e18a5d992741fa29ff986c328fb56f73f4e49d31787ced4185d76da98e6efecb9ad25e3e620683bba139f9d30e94c2ef457f9d3f22e5dc62 diff --git a/dev-embedded/mavlink_c/mavlink_c-20220518.ebuild b/dev-embedded/mavlink_c/mavlink_c-20220518.ebuild new file mode 100644 index 000000000000..5e9873b2d6a0 --- /dev/null +++ b/dev-embedded/mavlink_c/mavlink_c-20220518.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +MY_PN="c_library_v2" +MY_P="${MY_PN}-${PV}" + +# sadly no upstream tags or releases from gh for ref snapshots +GIT_COMMIT="241907e288b43513b28f83595d0de3b2088bce0f" +SRC_URI="https://github.com/mavlink/${MY_PN}/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +S="${WORKDIR}" + +DESCRIPTION="Official reference C library for the v2 protocol" +HOMEPAGE="https://github.com/mavlink/c_library_v2" + +LICENSE="MIT" +SLOT="0" +IUSE="test" + +RESTRICT="test" + +src_install() { + einfo "Installing base headers required for v2 reference library" + mkdir -p "${MY_PN}-${GIT_COMMIT}"/message_definitions/v1.0 + mv "${MY_PN}-${GIT_COMMIT}"/message_definitions/*.xml \ + "${MY_PN}-${GIT_COMMIT}"/message_definitions/v1.0/ + mv "${MY_PN}-${GIT_COMMIT}" mavlink + + doheader -r mavlink +} diff --git a/dev-embedded/mavlink_c/metadata.xml b/dev-embedded/mavlink_c/metadata.xml new file mode 100644 index 000000000000..142eb38b7019 --- /dev/null +++ b/dev-embedded/mavlink_c/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/mavlink/mavlink/issues</bugs-to> + <doc lang="en">https://mavlink.io/en/</doc> + <remote-id type="github">mavlink/mavlink</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/mcu8051ide/Manifest b/dev-embedded/mcu8051ide/Manifest new file mode 100644 index 000000000000..9177b2577bc7 --- /dev/null +++ b/dev-embedded/mcu8051ide/Manifest @@ -0,0 +1 @@ +DIST mcu8051ide-1.4.10.tar.gz 5928583 BLAKE2B 4e8e119790d8130859034f2366ac3372373805dcb173328e61a9a18513cb6b9580e8f3912592888268bfdf694e835032fca3148d9fc00a7aa061660378674f0e SHA512 686c2b7054475aa38bbbe73ef745303141f038e2d6eca86d548317c130febb6b12d7c0e0737a9b15d2c3f4890bcd0238fffae030c689f8367f3b54821ab52866 diff --git a/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-appdata.patch b/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-appdata.patch new file mode 100644 index 000000000000..c92f5aedfd4a --- /dev/null +++ b/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-appdata.patch @@ -0,0 +1,22 @@ +From: Carlos Henrique Lima Melara <charlesmelara@outlook.com> +Subject: Update the appdata file to comply with the new standard +Last-Update: 2020-06-27 + +--- a/mcu8051ide.appdata.xml ++++ b/mcu8051ide.appdata.xml +@@ -1,7 +1,7 @@ + <?xml version="1.0" encoding="UTF-8"?> + <!-- Copyright 2014 Martin Ošmera <martin.osmera@moravia-microsystems.com> --> +-<application> +- <id type="desktop">mcu8051ide.desktop</id> ++<component type="desktop-application"> ++ <id>mcu8051ide.desktop</id> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-2.0+</project_license> + <name>MCU 8051 IDE</name> +@@ -19,4 +19,4 @@ + <url type="homepage">https://sourceforge.net/projects/mcu8051ide/</url> + <updatecontact>martin.osmera@gmail.com</updatecontact> + <project_group>Development</project_group> +-</application> ++</component> diff --git a/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-cmake.patch b/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-cmake.patch new file mode 100644 index 000000000000..04b24f4c1e87 --- /dev/null +++ b/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-cmake.patch @@ -0,0 +1,36 @@ +From: Carlos Henrique Lima Melara <charlesmelara@outlook.com> +Subject: Remove unneeded files installation and update appstream location +Last-Update: 2020-06-27 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,10 +53,6 @@ + ENDFOREACH(ext) + ENDFOREACH(subdir) + +-# Install manual page(s) +-FILE(GLOB man doc/man/*) +-INSTALL(FILES ${man} DESTINATION share/man/man1) +- + # Install demonstration project files + FILE(GLOB demo demo/*) + INSTALL(FILES ${demo} DESTINATION ${target_installation_directory}/demo) +@@ -72,7 +68,7 @@ INSTALL(FILES ${translations} DESTINATIO + # Install .desktop spec and application icon + INSTALL(FILES mcu8051ide.png DESTINATION share/pixmaps/) + INSTALL(FILES mcu8051ide.desktop DESTINATION share/applications/) +-INSTALL(FILES mcu8051ide.appdata.xml DESTINATION share/appdata/) ++INSTALL(FILES mcu8051ide.appdata.xml DESTINATION share/metainfo/) + INSTALL(FILES application-x-mcu8051ide.xml DESTINATION share/mime/packages/) + + # Install launcher +@@ -84,9 +80,3 @@ INSTALL( + OWNER_WRITE OWNER_READ OWNER_EXECUTE + GROUP_EXECUTE GROUP_READ + ) +- +-# Install misc. files +-INSTALL( +- FILES ChangeLog LICENSE +- DESTINATION ${target_installation_directory} +-) diff --git a/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-desktop-file.patch b/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-desktop-file.patch new file mode 100644 index 000000000000..00dde9bdef96 --- /dev/null +++ b/dev-embedded/mcu8051ide/files/mcu8051ide-1.4.10-desktop-file.patch @@ -0,0 +1,23 @@ +Subject: Add Keywords and Field code to Exec field + Fabricio added some keywords and Carlos added the Field code. + +Author: Fabricio Alcalde <f@lcald.com.ar> +Author: Carlos Henrique Lima Melara <charlesmelara@outlook.com> +Last-Update: 2020-06-27 + +--- a/mcu8051ide.desktop ++++ b/mcu8051ide.desktop +@@ -2,7 +2,7 @@ + Categories=Development; + Comment=Graphical IDE for MCS-51 based microcontrollers + Comment[en_US]=Graphical IDE for MCS-51 based microcontrollers +-Exec=mcu8051ide ++Exec=mcu8051ide %f + GenericName=MCU 8051 IDE + GenericName[en_US]=MCU 8051 IDE + Icon=mcu8051ide +@@ -17,3 +17,4 @@ Version=1.0 + X-DCOP-ServiceType= + X-KDE-SubstituteUID=false + X-KDE-Username= ++Keywords=mcu8051ide;8051;ide diff --git a/dev-embedded/mcu8051ide/mcu8051ide-1.4.10-r1.ebuild b/dev-embedded/mcu8051ide/mcu8051ide-1.4.10-r1.ebuild new file mode 100644 index 000000000000..11d5acc69d11 --- /dev/null +++ b/dev-embedded/mcu8051ide/mcu8051ide-1.4.10-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake xdg + +DESCRIPTION="Graphical IDE for microcontrollers based on 8051" +HOMEPAGE="https://sourceforge.net/projects/mcu8051ide/" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64" + +# The doxygen dependency is suspect, but it appears to be used at runtime. +RDEPEND=" + >=app-text/doxygen-1.7 + >=app-text/hunspell-1.3 + >=dev-embedded/sdcc-2.5[mcs51] + >=dev-lang/tcl-8.5.9:* + >=dev-lang/tk-8.5.9:* + >=dev-tcltk/bwidget-1.8 + >dev-tcltk/itcl-3.3 + >=dev-tcltk/tcllib-1.11 + >=dev-tcltk/tclx-8.4 + >=dev-tcltk/tdom-0.8 + >=dev-tcltk/tkimg-1.4 + >=dev-util/indent-2.2 +" +DEPEND="${RDEPEND}" +BDEPEND="app-arch/gzip" + +PATCHES=( + # Patches thanks to Debian + "${FILESDIR}"/${P}-cmake.patch + "${FILESDIR}"/${P}-appdata.patch + "${FILESDIR}"/${P}-desktop-file.patch +) + +src_prepare() { + cmake_src_prepare + gunzip doc/man/mcu8051ide.1.gz || die +} + +src_install() { + cmake_src_install + doman doc/man/mcu8051ide.1 +} diff --git a/dev-embedded/mcu8051ide/metadata.xml b/dev-embedded/mcu8051ide/metadata.xml new file mode 100644 index 000000000000..b14cae3a5f32 --- /dev/null +++ b/dev-embedded/mcu8051ide/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!--maintainer-needed--> + <upstream> + <maintainer> + <!-- Valid on Gentoo Bugzilla --> + <email>martin.osmera@gmail.com</email> + <name>Martin Osmera</name> + </maintainer> + <remote-id type="sourceforge">mcu8051ide</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/metadata.xml b/dev-embedded/metadata.xml new file mode 100644 index 000000000000..595e54678610 --- /dev/null +++ b/dev-embedded/metadata.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The dev-embedded category contains libraries and utilities relevant to + embedded programming. + </longdescription> + <longdescription lang="de"> + Die Kategorie dev-embedded enhält Bibliotheken und Werkzeuge für die + Embedded-Programmierung. + </longdescription> + <longdescription lang="es"> + La categoría dev-embedded contiene librerias y utilidades referentes a + embedded-programming. + </longdescription> + <longdescription lang="ja"> + dev-embeddedカテゴリーには組み込みプログラミングに関連したライブラリーと + ユーティリティが含まれます。 + </longdescription> + <longdescription lang="nl"> + De dev-embedded categorie bevat bibliotheken en hulpmiddelen voor het + programmeren in een "embedded" omgeving. + </longdescription> + <longdescription lang="vi"> + Nhóm dev-embedded chứa các thư viện và tiện ích liên quan + đến lập trình nhúng. + </longdescription> + <longdescription lang="it"> + La categoria dev-embedded contiene librerie ed utilità per la programmazione di sistemi embedded. + </longdescription> + <longdescription lang="pt"> + A categoria dev-embedded contém bibliotecas e utilitários + referentes a programação de dispositivos embedded. + </longdescription> + <longdescription lang="pl"> + Kategoria dev-embedded zawiera biblioteki i narzędzia związane z + programowaniem dla urządzeń osadzonych. + </longdescription> +</catmetadata> diff --git a/dev-embedded/minipro/Manifest b/dev-embedded/minipro/Manifest new file mode 100644 index 000000000000..909a44fd4c30 --- /dev/null +++ b/dev-embedded/minipro/Manifest @@ -0,0 +1,2 @@ +DIST minipro-0.7.3.tar.bz2 345229 BLAKE2B 0fe1b36e18abf2a785f7cb584a38927ef4aba3784047f273bcf050d107d525a812272355bd83cbaeb34529dae4df18a9cd099647df8b21a52d46f049eacc518e SHA512 14df5329f0cdfd3b0456db2d5b09079a841fe2c09e1410b4bb3e8ef58b8d566358eb9afc585bcb5de1e3929ed1819e259e7bb92894b35e6a8aa0aa7c259acde2 +DIST minipro-0.7.4.tar.bz2 346583 BLAKE2B b23830b5911a5425486561371f2f4edefb55c862a81eb71f206219807ca82c7c6b580dacf0d9bb8622d6ce8658b7072b7cc665b1efe41b460e0f1112ee5e0817 SHA512 b740d2b5bfbf42f4e740c6bf37aa5849f78670ef37c49116b79eafd24df25cf95fd5c4d163cb88ccb37fa5c1702d873548eae1f00ae84809ce2b1c1f50a54060 diff --git a/dev-embedded/minipro/metadata.xml b/dev-embedded/minipro/metadata.xml new file mode 100644 index 000000000000..6ba2a04d5c21 --- /dev/null +++ b/dev-embedded/minipro/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>mario.haustein@hrz.tu-chemnitz.de</email> + <name>Mario Haustein</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="gitlab">DavidGriffith/minipro</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/minipro/minipro-0.7.3.ebuild b/dev-embedded/minipro/minipro-0.7.3.ebuild new file mode 100644 index 000000000000..568ff6a44aed --- /dev/null +++ b/dev-embedded/minipro/minipro-0.7.3.ebuild @@ -0,0 +1,48 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 toolchain-funcs udev + +DESCRIPTION="A program for controlling the MiniPRO TL866xx series of chip programmers" +HOMEPAGE="https://gitlab.com/DavidGriffith/minipro/" + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://gitlab.com/DavidGriffith/minipro.git" + inherit git-r3 +else + SRC_URI="https://gitlab.com/DavidGriffith/minipro/-/archive/${PV}/${P}.tar.bz2" + KEYWORDS="amd64 x86" +fi + +LICENSE="GPL-3+" +SLOT="0" + +DEPEND=" + virtual/libusb:= +" +RDEPEND="${DEPEND}" +BDEPEND=" + virtual/pkgconfig +" + +src_compile() +{ + emake CC=$(tc-getCC) PREFIX="${EPREFIX}/usr" COMPLETIONS_DIR="$(get_bashcompdir)" +} + +src_install() +{ + emake CC=$(tc-getCC) DESTDIR="${D}" PREFIX="${EPREFIX}/usr" COMPLETIONS_DIR="$(get_bashcompdir)" install +} + +pkg_postinst() +{ + udev_reload +} + +pkg_postrm() +{ + udev_reload +} diff --git a/dev-embedded/minipro/minipro-0.7.4.ebuild b/dev-embedded/minipro/minipro-0.7.4.ebuild new file mode 100644 index 000000000000..6aaf2144a9aa --- /dev/null +++ b/dev-embedded/minipro/minipro-0.7.4.ebuild @@ -0,0 +1,48 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 toolchain-funcs udev + +DESCRIPTION="A program for controlling the MiniPRO TL866xx series of chip programmers" +HOMEPAGE="https://gitlab.com/DavidGriffith/minipro/" + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://gitlab.com/DavidGriffith/minipro.git" + inherit git-r3 +else + SRC_URI="https://gitlab.com/DavidGriffith/minipro/-/archive/${PV}/${P}.tar.bz2" + KEYWORDS="amd64 x86" +fi + +LICENSE="GPL-3+" +SLOT="0" + +DEPEND=" + virtual/libusb:= +" +RDEPEND="${DEPEND}" +BDEPEND=" + virtual/pkgconfig +" + +src_compile() +{ + emake CC=$(tc-getCC) PREFIX="${EPREFIX}/usr" COMPLETIONS_DIR="$(get_bashcompdir)" +} + +src_install() +{ + emake CC=$(tc-getCC) DESTDIR="${D}" PREFIX="${EPREFIX}/usr" COMPLETIONS_DIR="$(get_bashcompdir)" install +} + +pkg_postinst() +{ + udev_reload +} + +pkg_postrm() +{ + udev_reload +} diff --git a/dev-embedded/minipro/minipro-9999.ebuild b/dev-embedded/minipro/minipro-9999.ebuild new file mode 100644 index 000000000000..3d5ae43e965c --- /dev/null +++ b/dev-embedded/minipro/minipro-9999.ebuild @@ -0,0 +1,48 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 toolchain-funcs udev + +DESCRIPTION="A program for controlling the MiniPRO TL866xx series of chip programmers" +HOMEPAGE="https://gitlab.com/DavidGriffith/minipro/" + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://gitlab.com/DavidGriffith/minipro.git" + inherit git-r3 +else + SRC_URI="https://gitlab.com/DavidGriffith/minipro/-/archive/${PV}/${P}.tar.bz2" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3+" +SLOT="0" + +DEPEND=" + virtual/libusb:= +" +RDEPEND="${DEPEND}" +BDEPEND=" + virtual/pkgconfig +" + +src_compile() +{ + emake CC=$(tc-getCC) PREFIX="${EPREFIX}/usr" COMPLETIONS_DIR="$(get_bashcompdir)" +} + +src_install() +{ + emake CC=$(tc-getCC) DESTDIR="${D}" PREFIX="${EPREFIX}/usr" COMPLETIONS_DIR="$(get_bashcompdir)" install +} + +pkg_postinst() +{ + udev_reload +} + +pkg_postrm() +{ + udev_reload +} diff --git a/dev-embedded/mspdebug/Manifest b/dev-embedded/mspdebug/Manifest new file mode 100644 index 000000000000..a4e210145c93 --- /dev/null +++ b/dev-embedded/mspdebug/Manifest @@ -0,0 +1 @@ +DIST mspdebug-0.25.tar.gz 333878 BLAKE2B d2104e49d904a057858bd7c3b48977b57f9e315c2a188428af4d492560d0c479ae77302ec313da1a264ef47cdaf108dae13ac75e952b6fb23bbafb024c19283c SHA512 5eba1d4fa6773daa89cccd8eb1964a5dfd5fb5e6719769ab6241c71010aca05c43217a8fcb6bebe1c2d9f58824f1dda5787f27b2e119f0d086eb9ae40e7fca90 diff --git a/dev-embedded/mspdebug/metadata.xml b/dev-embedded/mspdebug/metadata.xml new file mode 100644 index 000000000000..20a01f668a53 --- /dev/null +++ b/dev-embedded/mspdebug/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <longdescription> + MSPDebug is a free debugger for use with MSP430 MCUs. It supports + FET430UIF, eZ430, RF2500, and Olimex MSP-JTAG-TINY programmers. It can be + used as a proxy for gdb or as an independent debugger with support for + programming, disassembly, and reverse engineering. + </longdescription> + <upstream> + <remote-id type="sourceforge">mspdebug</remote-id> + <remote-id type="github">dlbeer/mspdebug</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/mspdebug/mspdebug-0.25-r1.ebuild b/dev-embedded/mspdebug/mspdebug-0.25-r1.ebuild new file mode 100644 index 000000000000..1b68b8fafadc --- /dev/null +++ b/dev-embedded/mspdebug/mspdebug-0.25-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A free debugger for use with MSP430 MCUs" +HOMEPAGE="https://dlbeer.co.nz/mspdebug/ https://github.com/dlbeer/mspdebug" +SRC_URI="https://github.com/dlbeer/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="readline" + +DEPEND="readline? ( sys-libs/readline:0= ) + virtual/libusb:0" +RDEPEND="${DEPEND}" + +src_prepare() { + default + sed -i "s:-O1 \(.*\) -ggdb:\1:" Makefile || die +} + +src_compile() { + emake CC="$(tc-getCC)" LIBDIR=/usr/$(get_libdir) $(usex readline "" "WITHOUT_READLINE=1") +} + +src_install() { + emake DESTDIR="${ED}" LIBDIR=/usr/$(get_libdir) PREFIX=/usr install + einstalldocs +} diff --git a/dev-embedded/mv88e6xxx-dump/Manifest b/dev-embedded/mv88e6xxx-dump/Manifest new file mode 100644 index 000000000000..566e5bc69127 --- /dev/null +++ b/dev-embedded/mv88e6xxx-dump/Manifest @@ -0,0 +1 @@ +DIST mv88e6xxx-dump-0.2.0_pre20210327.tar.gz 33322 BLAKE2B 0cdcad23bc2cbfca0f3f9d83653fdf3fe7af4248af2f079d06d3e568e86e24eb1023d4cede2118fc7eb00dea916ad4d11f638e651817182a9f4f6f2200ac330b SHA512 aca3dd3189334f4b9930d494efede0ab462de10a409511963fc51a978272061ac9617893577b1df4da92012fe136f04c08d738e92a4f5910b4bf0d19b44b579f diff --git a/dev-embedded/mv88e6xxx-dump/metadata.xml b/dev-embedded/mv88e6xxx-dump/metadata.xml new file mode 100644 index 000000000000..e096653bdd8f --- /dev/null +++ b/dev-embedded/mv88e6xxx-dump/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>kurt@kmk-computers.de</email> + <name>Kurt Kanzenbach</name> + </maintainer> + <upstream> + <remote-id type="github">lunn/mv88e6xxx_dump</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/mv88e6xxx-dump/mv88e6xxx-dump-0.2.0_pre20210327.ebuild b/dev-embedded/mv88e6xxx-dump/mv88e6xxx-dump-0.2.0_pre20210327.ebuild new file mode 100644 index 000000000000..2ede2dfba11c --- /dev/null +++ b/dev-embedded/mv88e6xxx-dump/mv88e6xxx-dump-0.2.0_pre20210327.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +MY_COMMIT="25fa4d07d7a5551fee6d8d7ad128cdffd50532c8" + +DESCRIPTION="Dump information about Marvell mv88e6xxx Ethernet switches" +HOMEPAGE="https://github.com/lunn/mv88e6xxx_dump" +SRC_URI="https://github.com/lunn/mv88e6xxx_dump/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/mv88e6xxx_dump-${MY_COMMIT}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +BDEPEND="virtual/pkgconfig" +RDEPEND="net-libs/libmnl:=" +DEPEND="${RDEPEND}" + +src_prepare() { + default + eautoreconf +} diff --git a/dev-embedded/nodemcu-uploader/Manifest b/dev-embedded/nodemcu-uploader/Manifest new file mode 100644 index 000000000000..e2d2e2e58bc7 --- /dev/null +++ b/dev-embedded/nodemcu-uploader/Manifest @@ -0,0 +1 @@ +DIST nodemcu-uploader-1.0.0.gh.tar.gz 855474 BLAKE2B f61e10d8c55653003063f93f276fda3d22eb7f4b30cf36bf23dac68775e6be55b73931a4cab54eb244f158b61b7dd4bb5290994386fb355b4be103bf429b5b3c SHA512 9196f8394a26bb5d412d667f7ad423c38b23f906c800e190bbc6f93206a2cbf7da28609a0803bff8b83b32c699df073c49525c05d2dbf276530156224c539864 diff --git a/dev-embedded/nodemcu-uploader/metadata.xml b/dev-embedded/nodemcu-uploader/metadata.xml new file mode 100644 index 000000000000..ea87397a0919 --- /dev/null +++ b/dev-embedded/nodemcu-uploader/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <stabilize-allarches/> + <upstream> + <remote-id type="pypi">nodemcu-uploader</remote-id> + <remote-id type="github">kmpm/nodemcu-uploader</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/nodemcu-uploader/nodemcu-uploader-1.0.0-r1.ebuild b/dev-embedded/nodemcu-uploader/nodemcu-uploader-1.0.0-r1.ebuild new file mode 100644 index 000000000000..fcd92a9e2b4f --- /dev/null +++ b/dev-embedded/nodemcu-uploader/nodemcu-uploader-1.0.0-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 + +DESCRIPTION="Simple tool for uploading files to the filesystem of an ESP8266 running NodeMCU" +HOMEPAGE="https://github.com/kmpm/nodemcu-uploader" +SRC_URI=" + https://github.com/kmpm/nodemcu-uploader/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/pyserial-3.4[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( ${RDEPEND} ) +" + +src_prepare() { + # https://bugs.gentoo.org/796422 + sed -i -e 's:description-file:description_file:' setup.cfg || die + + distutils-r1_src_prepare +} + +python_test() { + "${EPYTHON}" -m unittest -v tests.get_tests || + die "Tests failed on ${EPYTHON}" +} diff --git a/dev-embedded/nxp-gui-guider/Manifest b/dev-embedded/nxp-gui-guider/Manifest new file mode 100644 index 000000000000..2ef21666529d --- /dev/null +++ b/dev-embedded/nxp-gui-guider/Manifest @@ -0,0 +1 @@ +DIST Gui-Guider-Setup-1.10.1-GA.deb 215467198 BLAKE2B 6fb770d166d3477bb0c43a6532b9d1783307679809ad92f5ed173609b0fd60db3d5e0650bc04d76d1bd4745f690bdf67f8d2463de4ea7b456b02578db8b4a8f5 SHA512 b9625e42f6be0591d635bd7dcd9810069e431863fd9ecee6bb6db788f1234de4884f0ff8eeb4c7b5ce226200b24e2a27606429944ee9c3cc9cf161d076bef4e6 diff --git a/dev-embedded/nxp-gui-guider/metadata.xml b/dev-embedded/nxp-gui-guider/metadata.xml new file mode 100644 index 000000000000..ec4d2ea50408 --- /dev/null +++ b/dev-embedded/nxp-gui-guider/metadata.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>vowstar@gmail.com</email> + <name>Huang Rui</name> + </maintainer> + <longdescription lang="en"> + GUI Guider is a user-friendly graphical user interface development tool + from NXP that enables the rapid development of high quality display + with the open-source LVGL graphics library. GUI Guider's drag-and-drop + editor makes it easy to utilize the many features of LVGL such as + widgets, animations and styles to create a GUI with minimal or no coding + at all. + With the click of a button, you can run your application in a simulated + environment or export it to a target project. Generated code from GUI + Guider can easily be added to an MCUXpresso IDE or IAR Embedded + Workbench project, accelerating the development process and allowing you + to seamlessly add an embedded user interface to your application. + GUI Guider is free to use with NXP’s general purpose and crossover MCUs, + and includes built in project templates for several supported platforms. + </longdescription> + <longdescription lang="zh"> + GUI Guider 是 NXP 推出的一款用户友好的图形用户界面开发工具,可利用开源 + LVGL 图形库快速开发高质量显示器。 GUI Guider 的拖放编辑器可以轻松利用 + LVGL 的许多功能(例如小部件、动画和样式)来创建 GUI,只需最少的编码或 + 根本不需要编码。 + 只需单击按钮,您就可以在模拟环境中运行应用程序或将其导出到目标项目。 + GUI Guider 生成的代码可以轻松添加到 MCUXpresso IDE 或 IAR Embedded + Workbench 项目中,从而加速开发过程,并允许您将嵌入式用户界面无缝添加到您 + 的应用程序中。 + GUI Guider 可免费与 NXP 的通用和交叉 MCU 一起使用,并包含适用于多个受 + 支持平台的内置项目模板。 + </longdescription> +</pkgmetadata> diff --git a/dev-embedded/nxp-gui-guider/nxp-gui-guider-1.10.1.ebuild b/dev-embedded/nxp-gui-guider/nxp-gui-guider-1.10.1.ebuild new file mode 100644 index 000000000000..aabb6eab5758 --- /dev/null +++ b/dev-embedded/nxp-gui-guider/nxp-gui-guider-1.10.1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit desktop unpacker xdg + +DESCRIPTION="GUI Guider is a user-friendly GUI development tool for LVGL" +HOMEPAGE="https://www.nxp.com/design/design-center/software/development-software/gui-guider" +SRC_URI=" + Gui-Guider-Setup-${PV}-GA.deb +" +S="${WORKDIR}" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="-* ~amd64" + +RESTRICT="bindist fetch strip" + +RDEPEND=" + dev-libs/libayatana-appindicator + dev-libs/libffi + dev-libs/nss + media-libs/libsdl2 + media-libs/vips + x11-libs/libnotify + x11-libs/libXtst +" +DEPEND="${RDEPEND}" +BDEPEND="dev-util/patchelf" + +QA_PREBUILT="*" +DOCS=( "opt/Gui-Guider/EULA.txt" ) + +pkg_nofetch() { + einfo "${PN} requires you to accept their license agreement before downloading." + einfo "Download ${SRC_URI}" + einfo "with your browser and place it in DISTDIR (usually /var/cache/distfiles/)" + einfo "Please place the ${P} installation file ${SRC_URI}" + einfo "in your \$\{DISTDIR\}." +} + +src_install() { + insinto "/opt" + doins -r opt/Gui-Guider + # Fix RPATHs to ensure the libraries can be found + pushd "${D}/opt/Gui-Guider" || die + for f in $(find .) ; do + [[ -f "${f}" && $(od -t x1 -N 4 "${f}") == *"7f 45 4c 46"* ]] || continue + fperms 0755 "/opt/Gui-Guider/${f}" + [[ "${f: -4}" != ".cfx" ]] || continue + patchelf --set-rpath "/opt/Gui-Guider" "${f}" || die "patchelf failed on ${f}" + done + popd || die + for f in $(find "${D}/opt/Gui-Guider/environment/LinkServer/linux/binaries") ; do + [[ -f "${f}" && $(od -t x1 -N 4 "${f}") == *"7f 45 4c 46"* ]] || continue + [[ "${f: -4}" != ".cfx" ]] || continue + patchelf --set-rpath \ +"/opt/Gui-Guider/environment/LinkServer/linux/binaries:\ +/opt/Gui-Guider/environment/LinkServer/linux/dist:\ +/opt/Gui-Guider/environment/LinkServer/linux/MCU-LINK_installer/bin:\ +/opt/Gui-Guider/environment/LinkServer/linux/dist/lib-dynload" \ + "${f}" || die "patchelf failed on ${f}" + done + for i in 16 32 64 128 256 512; do + png_file="usr/share/icons/hicolor/${i}x${i}/apps/Gui-Guider.png" + if [ -e "${png_file}" ]; then + newicon -s "${i}" "${png_file}" "Gui-Guider.png" + fi + done + domenu "usr/share/applications/Gui-Guider.desktop" + einstalldocs +} diff --git a/dev-embedded/openocd/Manifest b/dev-embedded/openocd/Manifest new file mode 100644 index 000000000000..bfa1962f57ef --- /dev/null +++ b/dev-embedded/openocd/Manifest @@ -0,0 +1 @@ +DIST openocd-0.12.0.tar.gz 8445833 BLAKE2B 82616ed1bf51588d2a19c56fab6a6944ac5fa22e07bc5f83962ff8fecd88faeceb33e2104acb3cd08710f7f96d578ccd4ef6282372ae9d206ab469b3ac70fff8 SHA512 2b95d30eb10316b5cf1b329e0214b8d9f3fbf1fda5fa5568acc8cb16cdc25aa58c211f17f9883d8e4b93bcda3f296e511c279b44d24db9303c26e6c6640540b0 diff --git a/dev-embedded/openocd/files/openocd-0.12.0-capstone-includedir.patch b/dev-embedded/openocd/files/openocd-0.12.0-capstone-includedir.patch new file mode 100644 index 000000000000..f2dbff6520e5 --- /dev/null +++ b/dev-embedded/openocd/files/openocd-0.12.0-capstone-includedir.patch @@ -0,0 +1,40 @@ +Bug: https://bugs.gentoo.org/889762 +diff --git a/contrib/cross-build.sh b/contrib/cross-build.sh +index b199bf715..919a22005 100755 +--- a/contrib/cross-build.sh ++++ b/contrib/cross-build.sh +@@ -155,7 +155,7 @@ if [ -d $CAPSTONE_SRC ] ; then + sed -i '1s;^;prefix=/usr \ + exec_prefix=${prefix} \ + libdir=${exec_prefix}/lib \ +-includedir=${prefix}/include/capstone\n\n;' $CAPSTONE_PC_FILE ++includedir=${prefix}/include\n\n;' $CAPSTONE_PC_FILE + fi + + +diff --git a/src/target/a64_disassembler.c b/src/target/a64_disassembler.c +index ca3d3ea7a..9579860f0 100644 +--- a/src/target/a64_disassembler.c ++++ b/src/target/a64_disassembler.c +@@ -15,7 +15,7 @@ + + #if HAVE_CAPSTONE + +-#include <capstone.h> ++#include <capstone/capstone.h> + + static void print_opcode(struct command_invocation *cmd, const cs_insn *insn) + { +diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c +index 749274f36..e78d08853 100644 +--- a/src/target/arm_disassembler.c ++++ b/src/target/arm_disassembler.c +@@ -16,7 +16,7 @@ + #include <helper/log.h> + + #if HAVE_CAPSTONE +-#include <capstone.h> ++#include <capstone/capstone.h> + #endif + + /* diff --git a/dev-embedded/openocd/metadata.xml b/dev-embedded/openocd/metadata.xml new file mode 100644 index 000000000000..358a9c0a93c5 --- /dev/null +++ b/dev-embedded/openocd/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>fercerpav@gmail.com</email> + <name>Paul Fertser</name> + </maintainer> + <maintainer type="person"> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <use> + <flag name="capstone">Use <pkg>dev-libs/capstone</pkg> for disassembly support</flag> + <flag name="cmsis-dap">Support for CMSIS-DAP compliant adapters</flag> + <flag name="dummy">Build the dummy port driver</flag> + <flag name="gpiod">Enable Linux GPIO bitbang support via libgpiod</flag> + <flag name="jlink"> Build the SEGGER J-Link driver</flag> + <flag name="ftdi">Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag> + <flag name="parport">Enable support for parport JTAG devices</flag> + <flag name="verbose-io">Verbose IO and comm JTAG and USB messages</flag> + </use> + <upstream> + <remote-id type="sourceforge">openocd</remote-id> + <remote-id type="cpe">cpe:/a:openocd:open_on-chip_debugger</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/openocd/openocd-0.12.0-r1.ebuild b/dev-embedded/openocd/openocd-0.12.0-r1.ebuild new file mode 100644 index 000000000000..13157b08cc8c --- /dev/null +++ b/dev-embedded/openocd/openocd-0.12.0-r1.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools udev + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI=" https://repo.or.cz/openocd.git" +else + MY_PV="${PV/_/-}" + MY_P="${PN}-${MY_PV}" + S="${WORKDIR}"/${MY_P} + KEYWORDS="amd64 ~arm x86" + SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz" +fi + +DESCRIPTION="OpenOCD - Open On-Chip Debugger" +HOMEPAGE="https://openocd.sourceforge.io" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="capstone +cmsis-dap dummy +ftdi +jlink parport +usb verbose-io" +RESTRICT="strip" # includes non-native binaries + +RDEPEND=" + acct-group/plugdev + >=dev-lang/jimtcl-0.81:= + dev-libs/libgpiod:0/2 + capstone? ( dev-libs/capstone ) + cmsis-dap? ( dev-libs/hidapi ) + jlink? ( >=dev-embedded/libjaylink-0.2.0 ) + usb? ( virtual/libusb:1 ) + ftdi? ( dev-embedded/libftdi:= )" + +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-0.12.0-capstone-includedir.patch" +) + +src_prepare() { + default + + AT_NO_RECURSIVE=yes eautoreconf +} + +src_configure() { + local myconf=( + --enable-amtjtagaccel + --enable-am335xgpio + --enable-arm-jtag-ew + --enable-at91rm9200 + --enable-bcm2835gpio + --enable-buspirate + --enable-ep93xx + --enable-gw16012 + --enable-jtag_dpi + --enable-sysfsgpio + --enable-vdebug + --disable-internal-jimtcl + --disable-internal-libjaylink + --disable-parport-giveio + --disable-werror + $(use_with capstone) + $(use_enable cmsis-dap) + $(use_enable dummy) + $(use_enable ftdi openjtag) + $(use_enable ftdi presto) + $(use_enable ftdi usb-blaster) + $(use_enable jlink) + $(use_enable parport) + $(use_enable parport parport_ppdev) + $(use_enable usb aice) + $(use_enable usb armjtagew) + $(use_enable usb ftdi) + $(use_enable usb osbdm) + $(use_enable usb opendous) + $(use_enable usb rlink) + $(use_enable usb stlink) + $(use_enable usb ti-icdi) + $(use_enable usb usbprog) + $(use_enable usb usb-blaster-2) + $(use_enable usb ulink) + $(use_enable usb vsllink) + $(use_enable verbose-io verbose-jtag-io) + $(use_enable verbose-io verbose-usb-io) + $(use_enable verbose-io verbose_usb_comms) + ) + + econf "${myconf[@]}" +} + +src_install() { + default + dostrip /usr/bin + udev_dorules "${ED}"/usr/share/${PN}/contrib/*.rules +} + +pkg_postinst() { + udev_reload + + elog "To access openocd devices as user you must be in the plugdev group" +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-embedded/openocd/openocd-0.12.0-r2.ebuild b/dev-embedded/openocd/openocd-0.12.0-r2.ebuild new file mode 100644 index 000000000000..b8df175fc5e7 --- /dev/null +++ b/dev-embedded/openocd/openocd-0.12.0-r2.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools udev + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI=" https://repo.or.cz/openocd.git" +else + MY_PV="${PV/_/-}" + MY_P="${PN}-${MY_PV}" + S="${WORKDIR}"/${MY_P} + KEYWORDS="amd64 ~arm x86" + SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz" +fi + +DESCRIPTION="OpenOCD - Open On-Chip Debugger" +HOMEPAGE="https://openocd.sourceforge.io" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="capstone +cmsis-dap dummy +ftdi gpiod +jlink parport +usb verbose-io" +RESTRICT="strip" # includes non-native binaries + +RDEPEND=" + acct-group/plugdev + >=dev-lang/jimtcl-0.81:= + gpiod? ( dev-libs/libgpiod:0/2 ) + capstone? ( dev-libs/capstone ) + cmsis-dap? ( dev-libs/hidapi ) + jlink? ( >=dev-embedded/libjaylink-0.2.0 ) + usb? ( virtual/libusb:1 ) + ftdi? ( dev-embedded/libftdi:= )" + +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-0.12.0-capstone-includedir.patch" +) + +src_prepare() { + default + + AT_NO_RECURSIVE=yes eautoreconf +} + +src_configure() { + local myconf=( + --enable-amtjtagaccel + --enable-am335xgpio + --enable-arm-jtag-ew + --enable-at91rm9200 + --enable-bcm2835gpio + --enable-buspirate + --enable-ep93xx + --enable-gw16012 + --enable-jtag_dpi + --enable-sysfsgpio + --enable-vdebug + --disable-internal-jimtcl + --disable-internal-libjaylink + --disable-parport-giveio + --disable-werror + $(use_with capstone) + $(use_enable cmsis-dap) + $(use_enable dummy) + $(use_enable ftdi openjtag) + $(use_enable ftdi presto) + $(use_enable ftdi usb-blaster) + $(use_enable gpiod linuxgpiod) + $(use_enable jlink) + $(use_enable parport) + $(use_enable parport parport_ppdev) + $(use_enable usb aice) + $(use_enable usb armjtagew) + $(use_enable usb ftdi) + $(use_enable usb osbdm) + $(use_enable usb opendous) + $(use_enable usb rlink) + $(use_enable usb stlink) + $(use_enable usb ti-icdi) + $(use_enable usb usbprog) + $(use_enable usb usb-blaster-2) + $(use_enable usb ulink) + $(use_enable usb vsllink) + $(use_enable verbose-io verbose-jtag-io) + $(use_enable verbose-io verbose-usb-io) + $(use_enable verbose-io verbose_usb_comms) + ) + + econf "${myconf[@]}" +} + +src_install() { + default + dostrip /usr/bin + udev_dorules "${ED}"/usr/share/${PN}/contrib/*.rules +} + +pkg_postinst() { + udev_reload + + elog "To access openocd devices as user you must be in the plugdev group" +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-embedded/openocd/openocd-9999.ebuild b/dev-embedded/openocd/openocd-9999.ebuild new file mode 100644 index 000000000000..7eeda15d54a0 --- /dev/null +++ b/dev-embedded/openocd/openocd-9999.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools udev + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI=" + https://git.code.sf.net/p/openocd/code + https://repo.or.cz/openocd.git + https://github.com/openocd-org/openocd + " +else + MY_PV="${PV/_/-}" + MY_P="${PN}-${MY_PV}" + S="${WORKDIR}"/${MY_P} + KEYWORDS="~amd64 ~arm ~x86" + SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz" +fi + +DESCRIPTION="OpenOCD - Open On-Chip Debugger" +HOMEPAGE="https://openocd.sourceforge.io" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="capstone +cmsis-dap dummy +ftdi gpiod +jlink parport +usb verbose-io" +RESTRICT="strip" # includes non-native binaries + +RDEPEND=" + acct-group/plugdev + >=dev-lang/jimtcl-0.81:= + gpiod? ( dev-libs/libgpiod:0/2 ) + capstone? ( dev-libs/capstone ) + cmsis-dap? ( dev-libs/hidapi ) + jlink? ( >=dev-embedded/libjaylink-0.2.0 ) + usb? ( virtual/libusb:1 ) + ftdi? ( dev-embedded/libftdi:= )" + +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + AT_NO_RECURSIVE=yes eautoreconf +} + +src_configure() { + local myconf=( + --enable-amtjtagaccel + --enable-am335xgpio + --enable-arm-jtag-ew + --enable-at91rm9200 + --enable-bcm2835gpio + --enable-buspirate + --enable-ep93xx + --enable-gw16012 + --enable-jtag_dpi + --enable-sysfsgpio + --enable-vdebug + --disable-internal-jimtcl + --disable-internal-libjaylink + --disable-parport-giveio + --disable-werror + $(use_with capstone) + $(use_enable cmsis-dap) + $(use_enable dummy) + $(use_enable ftdi openjtag) + $(use_enable ftdi presto) + $(use_enable ftdi usb-blaster) + $(use_enable gpiod linuxgpiod) + $(use_enable jlink) + $(use_enable parport) + $(use_enable parport parport_ppdev) + $(use_enable usb aice) + $(use_enable usb armjtagew) + $(use_enable usb ftdi) + $(use_enable usb osbdm) + $(use_enable usb opendous) + $(use_enable usb rlink) + $(use_enable usb stlink) + $(use_enable usb ti-icdi) + $(use_enable usb usbprog) + $(use_enable usb usb-blaster-2) + $(use_enable usb ulink) + $(use_enable usb vsllink) + $(use_enable verbose-io verbose-jtag-io) + $(use_enable verbose-io verbose-usb-io) + $(use_enable verbose-io verbose_usb_comms) + ) + + econf "${myconf[@]}" +} + +src_install() { + default + dostrip /usr/bin + udev_dorules "${ED}"/usr/share/${PN}/contrib/*.rules +} + +pkg_postinst() { + udev_reload + + elog "To access openocd devices as user you must be in the plugdev group" +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-embedded/parapin/Manifest b/dev-embedded/parapin/Manifest new file mode 100644 index 000000000000..ceb8e95472ac --- /dev/null +++ b/dev-embedded/parapin/Manifest @@ -0,0 +1,2 @@ +DIST parapin-1.5.0.tgz 249552 BLAKE2B 2a6621ec21542c35dbcae48f1bb93cd36621878b3bdfcb75f3b22aaa861e730a0f9f80f0d83eb4335d7d3b4c6c471e83003da5daea6dddc87b6e3c86ef2c7229 SHA512 732a2e4145f9dc2b765ecd1fd52d56409e69f4e3dc885f10d37661ab551604b986c95466e7d45265a268f7e759f6aa65537d1a8efcdd57d2d8b0ddfd3484728d +DIST parapin-1.5.1-beta1.tgz 279115 BLAKE2B cce949828fec7654917da54be30ac6ed07baad615180adebbd12caba0c994e62ae95cc10a00c3653d23fe75afbe0721d6da901829a99a89ab355ea059c99d0f5 SHA512 3bc1a0a9fef5fd5f8efd84220e7e257a100d618d168332fe09c1331c38fc48e339bfda3f216713f454f43487fd7227036d8f1025ccc851806ae69326bfae97e0 diff --git a/dev-embedded/parapin/files/parapin-1.5.0-tc-directly.patch b/dev-embedded/parapin/files/parapin-1.5.0-tc-directly.patch new file mode 100644 index 000000000000..0289a070e2c3 --- /dev/null +++ b/dev-embedded/parapin/files/parapin-1.5.0-tc-directly.patch @@ -0,0 +1,23 @@ +diff --git a/Makefile-2.4 b/Makefile-2.4 +index b900268..9946cef 100644 +--- a/Makefile-2.4 ++++ b/Makefile-2.4 +@@ -43,9 +43,6 @@ + LINUX_HEADERS := /usr/src/linux-`uname -r`/include/ + LINUX_MODULES := /lib/modules/`uname -r`/kernel/ + +-CC := gcc +-CFLAGS := -O2 -g -Wall +- + LIBPARAPIN_OBJS := parapin.o + + EXAMPLE_DIR := examples +@@ -82,7 +79,7 @@ allinstall: install modulesinstall $(BINDINGS)-install + ##### libraries + + libparapin.a: $(LIBPARAPIN_OBJS) +- ar -cr libparapin.a $(LIBPARAPIN_OBJS) ++ $(AR) -cr libparapin.a $(LIBPARAPIN_OBJS) + + parapin.o: parapin.c parapin.h parapin-linux.h + $(CC) $(CFLAGS) -c parapin.c diff --git a/dev-embedded/parapin/metadata.xml b/dev-embedded/parapin/metadata.xml new file mode 100644 index 000000000000..83bca1eaea3f --- /dev/null +++ b/dev-embedded/parapin/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <longdescription> + Parapin makes it easy to write C code under Linux that controls individual pins on a PC parallel port. This kind of control is very useful for + electronics projects that use the PC's parallel port as a generic digital I/O interface. Parapin goes to great lengths to insulate the programmer + from the somewhat complex parallel port programming interface provided by the PC hardware, making it easy to use the parallel port for digital + I/O. By the same token, this abstraction also makes Parapin less useful in applications that need to actually use the parallel port as a parallel + port (e.g., for talking to a printer). + </longdescription> + <upstream> + <remote-id type="sourceforge">parapin</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/parapin/parapin-1.5.0-r1.ebuild b/dev-embedded/parapin/parapin-1.5.0-r1.ebuild new file mode 100644 index 000000000000..280b139a8e44 --- /dev/null +++ b/dev-embedded/parapin/parapin-1.5.0-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A parallel port pin programming library" +HOMEPAGE="https://parapin.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tgz" + +LICENSE="LGPL-2.1" +IUSE="doc" +KEYWORDS="~amd64 ~x86" +SLOT="0" + +PATCHES=( + "${FILESDIR}"/${P}-tc-directly.patch +) + +src_compile() { + tc-export AR CC + # Note 2.4 and 2.6 makefiles are identical for the targets used + emake -f Makefile-2.4 +} + +src_install() { + einstalldocs + dolib.a libparapin.a + insopts -m0444; insinto /usr/include; doins parapin.h + + if use doc; then + cd examples || die + docinto examples + dodoc *.c + fi +} diff --git a/dev-embedded/parapin/parapin-1.5.1_beta1-r1.ebuild b/dev-embedded/parapin/parapin-1.5.1_beta1-r1.ebuild new file mode 100644 index 000000000000..2c7dac56f10c --- /dev/null +++ b/dev-embedded/parapin/parapin-1.5.1_beta1-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A parallel port pin programming library" +HOMEPAGE="https://parapin.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P/_/-}.tgz" +S="${WORKDIR}/${P/_/-}" + +LICENSE="LGPL-2.1" +KEYWORDS="~amd64 ~x86" +SLOT="0" +IUSE="doc" + +PATCHES=( + "${FILESDIR}"/${PN}-1.5.0-tc-directly.patch +) + +src_compile() { + tc-export AR CC + # Note 2.4 and 2.6 makefiles are identical for the targets used + emake -f Makefile-2.4 +} + +src_install() { + einstalldocs + dolib.a libparapin.a + insopts -m0444; insinto /usr/include; doins parapin.h + + if use doc; then + cd examples || die + docinto examples + dodoc *.c + fi +} diff --git a/dev-embedded/picasm/Manifest b/dev-embedded/picasm/Manifest new file mode 100644 index 000000000000..ae814f7ff51f --- /dev/null +++ b/dev-embedded/picasm/Manifest @@ -0,0 +1 @@ +DIST picasm114.tar.bz2 35429 BLAKE2B 6d6e1093904c3cbcaf6fd40c46890257e35e7b197bec92e3728f06595b98ad6be5e2b4c4b19fe67103b871ed9f8e002edd1fae6ab59a85480789bac5a661002a SHA512 a6a8490156afe8af1fc85700890570c745c076396890491f4efe004d7dd701a324f9c7e764fcc710c8954c761f3abb4ed8e97c72ce098100192ead334b335fb7 diff --git a/dev-embedded/picasm/files/picasm-1.14-makefile.patch b/dev-embedded/picasm/files/picasm-1.14-makefile.patch new file mode 100644 index 000000000000..0ac5bacd7305 --- /dev/null +++ b/dev-embedded/picasm/files/picasm-1.14-makefile.patch @@ -0,0 +1,27 @@ +--- a/Makefile ++++ b/Makefile +@@ -5,21 +5,19 @@ + # See the file LICENSE for license terms. + # + +-DEFS=-DBUILTIN_INCLUDE1=\"/usr/local/share/picasm/include\" ++CPPFLAGS += -DBUILTIN_INCLUDE1=\"/usr/share/picasm/include\" + #DEFS=-DBUILTIN_INCLUDE1=\"/home/trossi/bin/picasm-include\" + +-CC = gcc +-CFLAGS = -Wall -Wshadow -W -Werror -O2 $(DEFS) ++CFLAGS += -Wall -Wshadow -W + RM = /bin/rm -f + + VERSION=114 + +-OBJS = picasm.o config.o token.o symtab.o expr.o \ ++OBJS = config.o token.o symtab.o expr.o \ + pic12bit.o pic14bit.o pic16bit.o \ + util.o + + picasm: $(OBJS) +- $(CC) $(CFLAGS) $(OBJS) -o $@ + + clean: + $(RM) picasm *.o examples/*.hex examples/*.lst diff --git a/dev-embedded/picasm/metadata.xml b/dev-embedded/picasm/metadata.xml new file mode 100644 index 000000000000..98ae10b3c34a --- /dev/null +++ b/dev-embedded/picasm/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> diff --git a/dev-embedded/picasm/picasm-1.14.ebuild b/dev-embedded/picasm/picasm-1.14.ebuild new file mode 100644 index 000000000000..b0ac54ba35ee --- /dev/null +++ b/dev-embedded/picasm/picasm-1.14.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +MY_PV="${PV//.}" +MY_P="${PN}${MY_PV}" + +DESCRIPTION="An assembler and disassembler for 12 and 14-bit PIC chips" +HOMEPAGE="http://www.iki.fi/trossi/pic/" +SRC_URI="http://www.iki.fi/trossi/pic/${MY_P}.tar.bz2" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 x86" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}"/${P}-makefile.patch ) + +src_configure() { + tc-export CC +} + +src_install() { + dobin picasm + dodoc picasm.txt HISTORY TODO + + insinto /usr/share/picasm/include + doins device_definitions/*.i + + docinto examples + dodoc examples/*.* + docompress -x /usr/share/doc/${PF}/examples + + docinto html + dodoc picasm.html +} diff --git a/dev-embedded/pico-sdk/Manifest b/dev-embedded/pico-sdk/Manifest new file mode 100644 index 000000000000..5692cf0f85dc --- /dev/null +++ b/dev-embedded/pico-sdk/Manifest @@ -0,0 +1,10 @@ +DIST btstack-501e6d2b86e6c92bfb9c390bcf55709938e25ac1.tar.gz 54737745 BLAKE2B 012432d83c46cf11386a51a7714ec68cca632597f7cf3376635472d90f003e83653d3b8373e08a47a4a191cca8cfaad9f55ab113352bce8003f3c93cdb599421 SHA512 4aa70c23bad0b90ad663fbe3bfb1ee49a8cda6b0a4b1178afcc29709dd00ae01ace256f6a180a1cf9ef1bc722cbe2b2bb564b046f04c844f557fa1a187287c26 +DIST cyw43-driver-1.1.0.tar.gz 1777995 BLAKE2B 5c012d580620ff799723d4efb2b0b8a3b28bfe02e305a303c43bf038258d79dbc347c03250de991f3bed5cad16addb1e7daa35e009038abb3c607d9f0521d7f0 SHA512 b974ca8ccc9f84d590310dae1f2d4eb6c6331ee9d28513ecd8c067eca7af1d23a8bb28443893d8ad8152ff6cf245da81a2522840d644a414a6f0f0fe120774e6 +DIST cyw43-driver-c1075d4bc440422cf2b2fd12c64a1f53f77660ee.tar.gz 1520548 BLAKE2B acf5da64ab755dd4279ac8865dbce425f110ad9198433b23e32203603bf08a6c045aa6dd304ee562c211d1dbd43e243f3e7749d56b7634fd8befae92e1fe6bc1 SHA512 a79b067f3a2d19f4bd025939662baa287ad7fbb848cdec69b62e0269300a6577415aaaa74082ecea33a210c5c1a2868d2be85c85cb9fc9cddf11dcad1e4d0360 +DIST lwip-STABLE-2_2_0_RELEASE.tar.gz 1592352 BLAKE2B be91fdf775bad7ec8824af7000c446a6c5eef007bd01af53eccffee4915fe9bd5436056c862e36aed7fd89133dd2e234ed74bf0389e67e19d018ba3c2688bf13 SHA512 df60b14ee50ee2ab5e3fc07844f44b9b0698cc581407a22b05a2da834a23b9a946ea46e30e373b64694999920bc06b2787c733623a459591d66f88ee3470f86b +DIST lwip-STABLE-2_2_1_RELEASE.tar.gz 1598662 BLAKE2B ebfea3ffe88235a5f5152f57aac1459ef0b74e12f6820cc04f56091b47cf6d4ba453ff4780ada287a8031e5bae424d45683bde812096a4243905c0ece0465db5 SHA512 50da620efa071b8ed0180941d0873e4cc6784d03b028ed08a717a0d3dc7212fc843686a2fe5b19275f95d770927913b401a52ef40c94eec545f78906216123df +DIST mbedtls-2.28.8.tar.bz2 3343796 BLAKE2B 1efde6698662873c40df9733bae902db4e009f3dd26a937e05707ca1a208b71675df0737b44b5895a60cfbf42f18f92dae88cba62f32b55733947b9c0481880e SHA512 c8e91ec50ab2caf1f33e907279dc30fca2a8cd97e6e531be857149589e52aeffb95b445b2a9fa674886f0071f446381da3bb8107f7e850f3390128b069ac9ea7 +DIST mbedtls-3.6.2.tar.bz2 4979769 BLAKE2B dbf34ca3cffca7a9bdb10191bd58971583ae3f2cdef3e350ccda08eae2e7b52f5fd4d1aff5582ee120b6e35e6843d7dd323ba7da5f1428c16130e5ed7c0d689e SHA512 7ab3b1ec179681949e1b0d171e04f75a605ae9ed8177cf3f6f27c401efca4aff930437ecc425c9a994d36f50ddd6f0f0dd7feeb42251128ac875b4c57fe3811b +DIST pico-sdk-2.1.1.tar.gz 2437119 BLAKE2B 3c165355221e4b3855df79cc2da28bd97143731ac2c6e4168ccfee5826d0c2b8c17f0173c6d01fcd7e396c04c95733fd107063ecda92c1f32e31cb964ec7f4ea SHA512 1a827d0783c2bf22a225dd924f95a0d766ecdb21f4f4eb4531e3c1d00c76f79d94f5fa3f97c5de84197c158508a8659f3cbe8ff4bee644c0fffc42c67a2d3102 +DIST pico-sdk-2.2.0.tar.gz 2483547 BLAKE2B 615dccfcf0a5ce89992367d13c36cbd55438aa6cfd1d5d7494d84c4a108318396febd872caa430be4c6cfe71ea5e4ed756f9f545bc845275a728f59243d1402a SHA512 25882c1fefb6ca7252ee4b8bc1c26f9816d367bd276fca371724f5254271984992b53652321f1df1d2610e846d3dcdf7170c8bb2c678fb9f8fe4d942d90862d8 +DIST tinyusb-0.18.0.tar.gz 3282996 BLAKE2B 32e20a22e6f7a705047c25773b5b404150e8f7d58fc1997b27330039307d196fd1173dbd551c57d375083e1dbd6a3f91a54229bd62e3d479313526b2857d53a8 SHA512 2fc854a32a43879af9b2ffcd934632fbf51df51c274859372548bbb049a02fbea6667060488a9cae9caf91e1ef8b047be9aab715fc04d8fed8b4c36d3fed965c diff --git a/dev-embedded/pico-sdk/metadata.xml b/dev-embedded/pico-sdk/metadata.xml new file mode 100644 index 000000000000..3cf74c237b4a --- /dev/null +++ b/dev-embedded/pico-sdk/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ljn0099@hotmail.com</email> + <name>Manuel</name> + </maintainer> + <upstream> + <remote-id type="github">raspberrypi/pico-sdk</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/pico-sdk/pico-sdk-2.1.1.ebuild b/dev-embedded/pico-sdk/pico-sdk-2.1.1.ebuild new file mode 100644 index 000000000000..d438436e49ff --- /dev/null +++ b/dev-embedded/pico-sdk/pico-sdk-2.1.1.ebuild @@ -0,0 +1,54 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Libraries and tools for C/C++ development on RP2040 and RP2350 microcontrollers." +HOMEPAGE="https://github.com/raspberrypi/pico-sdk" + +SRC_URI=" + https://github.com/raspberrypi/pico-sdk/releases/download/${PV}/${P}.tar.gz + -> ${P}.tar.gz + + https://github.com/bluekitchen/btstack/archive/501e6d2b86e6c92bfb9c390bcf55709938e25ac1.tar.gz + -> btstack-501e6d2b86e6c92bfb9c390bcf55709938e25ac1.tar.gz + + https://github.com/georgerobotics/cyw43-driver/archive/c1075d4bc440422cf2b2fd12c64a1f53f77660ee.tar.gz + -> cyw43-driver-c1075d4bc440422cf2b2fd12c64a1f53f77660ee.tar.gz + + https://github.com/lwip-tcpip/lwip/archive/refs/tags/STABLE-2_2_0_RELEASE.tar.gz + -> lwip-STABLE-2_2_0_RELEASE.tar.gz + + https://github.com/Mbed-TLS/mbedtls/releases/download/v2.28.8/mbedtls-2.28.8.tar.bz2 + -> mbedtls-2.28.8.tar.bz2 + + https://github.com/hathach/tinyusb/archive/refs/tags/0.18.0.tar.gz + -> tinyusb-0.18.0.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +src_prepare() { + default + + cp -r "${WORKDIR}"/btstack-501e6d2b86e6c92bfb9c390bcf55709938e25ac1/. "${S}/lib/btstack" || die + cp -r "${WORKDIR}"/cyw43-driver-c1075d4bc440422cf2b2fd12c64a1f53f77660ee/. "${S}/lib/cyw43-driver" || die + cp -r "${WORKDIR}"/lwip-STABLE-2_2_0_RELEASE/. "${S}/lib/lwip" || die + cp -r "${WORKDIR}"/mbedtls-2.28.8/. "${S}/lib/mbedtls" || die + cp -r "${WORKDIR}"/tinyusb-0.18.0/. "${S}/lib/tinyusb" || die +} + +src_install() { + dodir /opt/pico-sdk + cp -r "${S}/." "${D}/opt/pico-sdk/" || die + + echo "PICO_SDK_PATH=/opt/pico-sdk" > "${T}/99pico-sdk" || die + doenvd "${T}/99pico-sdk" +} + +pkg_postinst() { + elog "If you want to use the Pico SDK now, run:" + elog " source /etc/profile" +} diff --git a/dev-embedded/pico-sdk/pico-sdk-2.2.0.ebuild b/dev-embedded/pico-sdk/pico-sdk-2.2.0.ebuild new file mode 100644 index 000000000000..9b3ba915a20e --- /dev/null +++ b/dev-embedded/pico-sdk/pico-sdk-2.2.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Libraries and tools for C/C++ development on RP2040 and RP2350 microcontrollers." +HOMEPAGE="https://github.com/raspberrypi/pico-sdk" + +SRC_URI=" + https://github.com/raspberrypi/pico-sdk/releases/download/${PV}/${P}.tar.gz + -> ${P}.tar.gz + + https://github.com/bluekitchen/btstack/archive/501e6d2b86e6c92bfb9c390bcf55709938e25ac1.tar.gz + -> btstack-501e6d2b86e6c92bfb9c390bcf55709938e25ac1.tar.gz + + https://github.com/georgerobotics/cyw43-driver/archive/refs/tags/v1.1.0.tar.gz + -> cyw43-driver-1.1.0.tar.gz + + https://github.com/lwip-tcpip/lwip/archive/refs/tags/STABLE-2_2_1_RELEASE.tar.gz + -> lwip-STABLE-2_2_1_RELEASE.tar.gz + + https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.2/mbedtls-3.6.2.tar.bz2 + -> mbedtls-3.6.2.tar.bz2 + + https://github.com/hathach/tinyusb/archive/refs/tags/0.18.0.tar.gz + -> tinyusb-0.18.0.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +src_prepare() { + default + + cp -r "${WORKDIR}"/btstack-501e6d2b86e6c92bfb9c390bcf55709938e25ac1/. "${S}/lib/btstack" || die + cp -r "${WORKDIR}"/cyw43-driver-1.1.0/. "${S}/lib/cyw43-driver" || die + cp -r "${WORKDIR}"/lwip-STABLE-2_2_1_RELEASE/. "${S}/lib/lwip" || die + cp -r "${WORKDIR}"/mbedtls-3.6.2/. "${S}/lib/mbedtls" || die + cp -r "${WORKDIR}"/tinyusb-0.18.0/. "${S}/lib/tinyusb" || die +} + +src_install() { + dodir /opt/pico-sdk + cp -r "${S}/." "${D}/opt/pico-sdk/" || die + + echo "PICO_SDK_PATH=/opt/pico-sdk" > "${T}/99pico-sdk" || die + doenvd "${T}/99pico-sdk" +} + +pkg_postinst() { + elog "If you want to use the Pico SDK now, run:" + elog " source /etc/profile" +} diff --git a/dev-embedded/picotool/Manifest b/dev-embedded/picotool/Manifest new file mode 100644 index 000000000000..4fd94ed78212 --- /dev/null +++ b/dev-embedded/picotool/Manifest @@ -0,0 +1,6 @@ +DIST pico-sdk-1.4.0.tar.gz 959068 BLAKE2B 95c5e61c4d66c345daa4b8aff8e9e2cd90bcc722289ac67c1a18ce00dfa02ef7fb07512a0fdc7558f989746c215cff31979f1ad8a582e20ff2d151fdd109914f SHA512 4be28cf41e5b808a504b4c949f6c3e9fbc425beb4f838a7898bfd78925cc54e0390ff56c036bc7f60a26efac0d6c1bd811b27f7b60a1c8d7bb4750f3fa37690e +DIST pico-sdk-2.0.0.tar.gz 2345905 BLAKE2B a1360fe30a56eef6ea2e786bb3d0f2522c4d37cd2424ea08a377d3f70f681cac1650a0967c4e447e9f47c692cf0ec7f9865af78cf8f4f8d699271f390750a3a1 SHA512 ae7c470a63581503d591b7aa19281eaf75248a668d0ce266b766a2261db8584d372d4f6d52cb1a90dc8b1d5afdfee1802980c0f2819f0193d6112db934d3e575 +DIST pico-sdk-2.1.1.tar.gz 2437119 BLAKE2B 3c165355221e4b3855df79cc2da28bd97143731ac2c6e4168ccfee5826d0c2b8c17f0173c6d01fcd7e396c04c95733fd107063ecda92c1f32e31cb964ec7f4ea SHA512 1a827d0783c2bf22a225dd924f95a0d766ecdb21f4f4eb4531e3c1d00c76f79d94f5fa3f97c5de84197c158508a8659f3cbe8ff4bee644c0fffc42c67a2d3102 +DIST picotool-1.1.2.tar.gz 45282 BLAKE2B b7425ae197adef3f72aafa9450338ab1c3ddd4b1a13ff9f4847951ee3d7fd91226f780061416c0d72f963ad0afcf4a14d85c72b6199482738eb5344c8dc6563f SHA512 63e0c77865243aca0b46cb844f5eb104c762d2b38f645c75f32224b61d9768ef0ba59b55d94480559627ec4b23ad6edc49d013f90646644a5dc798090d37a257 +DIST picotool-2.0.0.tar.gz 637989 BLAKE2B aad9463f1f26ba921dc681fb784bec0e6ed9917919c12cb616b10642e359560f9b1304013a8a20dfaffe0f373b690d8527f93195212c01c76cb01439590143c8 SHA512 96808cea70a38cd108bbfe8f227d0e66167d0d0611d234e849793ec02d7cb319b065e7988c070c46488a7e99e1a2c1779f78d70782fc67fbbb81229d8e4c4ffa +DIST picotool-2.1.1.tar.gz 530728 BLAKE2B 9476b412fe32956d140cfb5973cb3546a3d93b443f433275744fd747ef2abff2efd930e50069709783bb481d804e75c045d809918d6d2a5bb7e6af942b1eab60 SHA512 f754d2948e9a12e07fdba03c979dd890b16247044fbfa537032f58b638a4bad64ee21c4b10ca15f49b508b4b1bf1c0d2d7b1547353b186baae6ea34f118504db diff --git a/dev-embedded/picotool/files/picotool-1.1.2-musl.patch b/dev-embedded/picotool/files/picotool-1.1.2-musl.patch new file mode 100644 index 000000000000..77eeda5b6b9c --- /dev/null +++ b/dev-embedded/picotool/files/picotool-1.1.2-musl.patch @@ -0,0 +1,17 @@ +https://bugs.gentoo.org/867283 +https://wiki.gentoo.org/wiki/Musl_porting_notes#cdefs.h:_No_such_file_or_directory +--- a/pico-sdk/src/host/pico_platform/include/pico/platform.h ++++ b/pico-sdk/src/host/pico_platform/include/pico/platform.h +@@ -13,7 +13,11 @@ + + #ifdef __unix__ + +-#include <sys/cdefs.h> ++#if defined __has_include ++# if __has_include (<sys/cdefs.h>) ++# include <sys/cdefs.h> ++# endif ++#endif + + #endif + diff --git a/dev-embedded/picotool/metadata.xml b/dev-embedded/picotool/metadata.xml new file mode 100644 index 000000000000..252b445833cc --- /dev/null +++ b/dev-embedded/picotool/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">raspberrypi/picotool</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/picotool/picotool-1.1.2.ebuild b/dev-embedded/picotool/picotool-1.1.2.ebuild new file mode 100644 index 000000000000..fbed611955ca --- /dev/null +++ b/dev-embedded/picotool/picotool-1.1.2.ebuild @@ -0,0 +1,42 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +SDK_PV=1.4.0 +SDK_PN=pico-sdk +SDK_P=${SDK_PN}-${SDK_PV} + +DESCRIPTION="tool for interacting with rp2040 devices and binaries" +HOMEPAGE="https://github.com/raspberrypi/picotool" +SRC_URI=" + https://github.com/raspberrypi/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/raspberrypi/${SDK_PN}/archive/refs/tags/${SDK_PV}.tar.gz -> ${SDK_P}.tar.gz +" + +# picotool (BSD) +# |- clipp (MIT) +# |- pico-sdk (BSD) +LICENSE="BSD MIT" +SLOT="0" +KEYWORDS="amd64" + +RDEPEND="virtual/libusb:1" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( "${FILESDIR}"/${PN}-1.1.2-musl.patch ) + +src_prepare() { + mv "${WORKDIR}"/${SDK_P} "${S}"/pico-sdk || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DPICO_SDK_PATH="${S}"/pico-sdk + ) + cmake_src_configure +} diff --git a/dev-embedded/picotool/picotool-2.0.0.ebuild b/dev-embedded/picotool/picotool-2.0.0.ebuild new file mode 100644 index 000000000000..acc716c5c113 --- /dev/null +++ b/dev-embedded/picotool/picotool-2.0.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +SDK_PV=2.0.0 +SDK_PN=pico-sdk +SDK_P=${SDK_PN}-${SDK_PV} + +DESCRIPTION="tool for interacting with rp2040 devices and binaries" +HOMEPAGE="https://github.com/raspberrypi/picotool" +SRC_URI=" + https://github.com/raspberrypi/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/raspberrypi/${SDK_PN}/archive/refs/tags/${SDK_PV}.tar.gz -> ${SDK_P}.tar.gz +" + +# picotool (BSD) +# |- clipp (MIT) +# |- pico-sdk (BSD) +LICENSE="BSD MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND="virtual/libusb:1" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( "${FILESDIR}"/${PN}-1.1.2-musl.patch ) + +# Binary that runs on-chip. +QA_PREBUILT="usr/share/picotool/xip_ram_perms.elf" + +src_prepare() { + mv "${WORKDIR}"/${SDK_P} "${S}"/pico-sdk || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DPICO_SDK_PATH="${S}"/pico-sdk + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + dostrip -x /usr/share/picotool/xip_ram_perms.elf +} diff --git a/dev-embedded/picotool/picotool-2.1.1.ebuild b/dev-embedded/picotool/picotool-2.1.1.ebuild new file mode 100644 index 000000000000..39e7309088b4 --- /dev/null +++ b/dev-embedded/picotool/picotool-2.1.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +SDK_PV=2.1.1 +SDK_PN=pico-sdk +SDK_P=${SDK_PN}-${SDK_PV} + +DESCRIPTION="tool for interacting with rp2040 devices and binaries" +HOMEPAGE="https://github.com/raspberrypi/picotool" +SRC_URI=" + https://github.com/raspberrypi/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/raspberrypi/${SDK_PN}/archive/refs/tags/${SDK_PV}.tar.gz -> ${SDK_P}.tar.gz +" + +# picotool (BSD) +# |- clipp (MIT) +# |- pico-sdk (BSD) +LICENSE="BSD MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND="virtual/libusb:1" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( "${FILESDIR}"/${PN}-1.1.2-musl.patch ) + +# Binary that runs on-chip. +QA_PREBUILT="usr/share/picotool/xip_ram_perms.elf" + +src_prepare() { + mv "${WORKDIR}"/${SDK_P} "${S}"/pico-sdk || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DPICO_SDK_PATH="${S}"/pico-sdk + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + dostrip -x /usr/share/picotool/xip_ram_perms.elf +} diff --git a/dev-embedded/picp/Manifest b/dev-embedded/picp/Manifest new file mode 100644 index 000000000000..de037695d1a6 --- /dev/null +++ b/dev-embedded/picp/Manifest @@ -0,0 +1 @@ +DIST picp-0.6.8.tar.gz 125303 BLAKE2B f445499fa86bc683ba253a5f9a218da6fdc72a3851557225fc91d1542c26a87ddc1926c10500c382288d71fc41beccc88a3c7c863ac7bba7251d3245c7a784ea SHA512 03b8f55f3ae69d87dc02a2df6cad718c3d9fec725eae469b9e28e411620c95e7c1f2d241110cb6a5561e8d9727da3319e2b7caaeefa7a68239009317c8df9471 diff --git a/dev-embedded/picp/files/picp-0.6.8-C99-stdbool.patch b/dev-embedded/picp/files/picp-0.6.8-C99-stdbool.patch new file mode 100644 index 000000000000..f458a5674621 --- /dev/null +++ b/dev-embedded/picp/files/picp-0.6.8-C99-stdbool.patch @@ -0,0 +1,83 @@ +--- a/atoi_base.h ++++ b/atoi_base.h +@@ -17,6 +17,8 @@ + #ifndef __ATOI_BASE_H_ + #define __ATOI_BASE_H_ + ++#include <stdbool.h> ++ + #ifdef WIN32 + #define bool int + #endif +--- a/parse.h ++++ b/parse.h +@@ -17,6 +17,8 @@ + #ifndef __PARSE_H_ + #define __PARSE_H_ + ++#include <stdbool.h> ++ + bool GetNextByte(FILE *theFile, unsigned int *address, unsigned char *data); + void InitParse(); + +--- a/picsnoop/dos/serial.h ++++ b/picsnoop/dos/serial.h +@@ -2,7 +2,7 @@ + #ifndef __SERIAL_H_
+ #define __SERIAL_H_
+
+-#define bool int
++#include <stdbool.h>
+
+ #define KEYINT int86(0x16, ®s, ®s)
+ #define KBHEAD 0x41a
+@@ -10,15 +10,12 @@ +
+
+ #ifndef FALSE
+-#define FALSE 0
++#define FALSE false
+ #endif
+ #ifndef TRUE
+-#define TRUE 1
++#define TRUE true
+ #endif
+
+-#define false FALSE
+-#define true TRUE
+-
+ #define INUM1 12 // interrupt vector for com1
+ #define INUM2 11 // interrupt vector for com2
+
+--- a/picsnoop/serial.h ++++ b/picsnoop/serial.h +@@ -2,6 +2,8 @@ + #ifndef __SERIAL_H_ + #define __SERIAL_H_ + ++#include <stdbool.h> ++ + #ifdef WIN32 + #define bool int + #endif +--- a/record.c ++++ b/record.c +@@ -49,6 +49,7 @@ + //----------------------------------------------------------------------------- + + #include <stdio.h> ++#include <stdbool.h> + + #ifdef WIN32 + #include <windows.h> +--- a/serial.h ++++ b/serial.h +@@ -17,6 +17,8 @@ + #ifndef __SERIAL_H_ + #define __SERIAL_H_ + ++#include <stdbool.h> ++ + #ifdef WIN32 + #define bool int + #endif diff --git a/dev-embedded/picp/files/picp-0.6.8-errno.patch b/dev-embedded/picp/files/picp-0.6.8-errno.patch new file mode 100644 index 000000000000..89d5d063576d --- /dev/null +++ b/dev-embedded/picp/files/picp-0.6.8-errno.patch @@ -0,0 +1,10 @@ +--- picp-0.6.8/picsnoop/picsnoop.c.orig ++++ picp-0.6.8/picsnoop/picsnoop.c +@@ -40,6 +40,7 @@ + #include <string.h> + #include <unistd.h> + #include <signal.h> ++#include <errno.h> + #include <ctype.h> + + #ifdef WIN32 diff --git a/dev-embedded/picp/files/picp-0.6.8-makefile.patch b/dev-embedded/picp/files/picp-0.6.8-makefile.patch new file mode 100644 index 000000000000..7bad31af4d88 --- /dev/null +++ b/dev-embedded/picp/files/picp-0.6.8-makefile.patch @@ -0,0 +1,87 @@ +--- a/fixchksum/Makefile ++++ b/fixchksum/Makefile +@@ -2,11 +2,9 @@ + # Makefile for fixchksum + # + +-CC=gcc + APP=fixchksum +-INCLUDES=-I. +-OPTIONS=-O2 -Wall +-CFLAGS=$(INCLUDES) $(OPTIONS) ++CPPFLAGS+=-I. ++CFLAGS+=-Wall -std=gnu99 + SRCS=fixchksum.c + OBJECTS = fixchksum.o + +@@ -17,10 +15,6 @@ + + all: $(APP) + +-$(APP): $(OBJECTS) +- $(CC) $(OBJECTS) -o $(APP) +- strip $(APP) +- + clean: + rm -f $(APP).o + rm -f $(APP) +--- a/Makefile ++++ b/Makefile +@@ -3,11 +3,9 @@ + # PIC programmer interface + # + +-CC=gcc + APP=picp +-INCLUDES=-I. +-OPTIONS=-O2 -Wall -x c++ +-CFLAGS=$(INCLUDES) $(OPTIONS) ++CPPFLAGS+=-I. ++CFLAGS+=-Wall -std=gnu99 + SRCS=main.c serial.c record.c parse.c atoi_base.c + OBJECTS = main.o serial.o record.o parse.o atoi_base.o + +@@ -19,16 +17,7 @@ + all: $(APP) convert convertshort + + $(APP): $(OBJECTS) +- $(CC) $(OBJECTS) -lstdc++ -o $(APP) +- strip $(APP) +- +-convert: convert.c +- $(CC) -O2 -Wall -o convert convert.c +- strip convert +- +-convertshort: convertshort.c +- $(CC) -O2 -Wall -o convertshort convertshort.c +- strip convertshort ++ $(CC) $(LDFLAGS) $(OBJECTS) -o $(APP) + + clean: + rm -f *.o +--- a/picsnoop/Makefile ++++ b/picsnoop/Makefile +@@ -3,12 +3,9 @@ + # + + APP=picsnoop +-CC=gcc + +-INCLUDES= +-OPTIONS=-O2 -Wall -x c++ +-CFLAGS=$(INCLUDES) $(OPTIONS) +-OBJECTS = picsnoop.o serial.o ++CFLAGS+=-Wall -std=gnu99 ++OBJECTS = serial.o + + WINCC=/usr/local/cross-tools/bin/i386-mingw32msvc-gcc + WINCFLAGS=-Wall -O2 -fomit-frame-pointer -s -I/usr/local/cross-tools/include -D_WIN32 -DWIN32 +@@ -18,8 +15,6 @@ + all : $(APP) + + $(APP) : $(OBJECTS) +- $(CC) $(OBJECTS) -lstdc++ -o $(APP) +- strip $(APP) + + clean : + rm -f *.o diff --git a/dev-embedded/picp/metadata.xml b/dev-embedded/picp/metadata.xml new file mode 100644 index 000000000000..98ae10b3c34a --- /dev/null +++ b/dev-embedded/picp/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> diff --git a/dev-embedded/picp/picp-0.6.8.ebuild b/dev-embedded/picp/picp-0.6.8.ebuild new file mode 100644 index 000000000000..491f48e79828 --- /dev/null +++ b/dev-embedded/picp/picp-0.6.8.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A commandline interface to Microchip's PICSTART+ programmer" +HOMEPAGE="http://home.pacbell.net/theposts/picmicro/" +SRC_URI="http://home.pacbell.net/theposts/picmicro/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 x86" + +PATCHES=( + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${P}-errno.patch + "${FILESDIR}"/${P}-C99-stdbool.patch +) + +src_prepare() { + default + + # remove stale binaries + rm picsnoop/{picsnoop,*.o} || die +} + +src_configure() { + tc-export CC +} + +src_compile() { + emake + emake -C picsnoop + emake -C fixchksum +} + +src_install() { + dobin picp picsnoop/picsnoop fixchksum/fixchksum + + einstalldocs + dodoc BugReports.txt HISTORY LICENSE.TXT NOTES PSCOMMANDS.TXT + + newdoc picsnoop/README.TXT PICSNOOP.txt + newdoc fixchksum/README fixchksum.txt + + docinto html + dodoc PICPmanual.html +} diff --git a/dev-embedded/picprog/Manifest b/dev-embedded/picprog/Manifest new file mode 100644 index 000000000000..e9d16992c5cc --- /dev/null +++ b/dev-embedded/picprog/Manifest @@ -0,0 +1 @@ +DIST picprog-1.9.1.tar.gz 76452 BLAKE2B 7c6c5d1eda83c9bdc2c9a3c32c97d06b983cb335d2d37e291fabce3955603adcad293934f2cf1964af1e062b800a6e392f97f80ae1dfd94c03bbc269fafb0785 SHA512 1f24c372aa149d86dd4778904f0abb782510168ce36676b820a5b675f53a7207f62cdcb374c8ec2c60fc51fdfd5780ad9f8f464365403d3d2232187dade91887 diff --git a/dev-embedded/picprog/metadata.xml b/dev-embedded/picprog/metadata.xml new file mode 100644 index 000000000000..98ae10b3c34a --- /dev/null +++ b/dev-embedded/picprog/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> diff --git a/dev-embedded/picprog/picprog-1.9.1.ebuild b/dev-embedded/picprog/picprog-1.9.1.ebuild new file mode 100644 index 000000000000..a179455eae85 --- /dev/null +++ b/dev-embedded/picprog/picprog-1.9.1.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A PIC16, PIC18 and dsPIC microcontroller programmer software for the serial port" +HOMEPAGE="http://hyvatti.fi/~jaakko/pic/picprog.html" +SRC_URI="http://hyvatti.fi/~jaakko/pic/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +src_compile() { + emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin picprog + dodoc README + docinto html + dodoc picprog.html *.png + doman picprog.1 +} diff --git a/dev-embedded/pista/Manifest b/dev-embedded/pista/Manifest new file mode 100644 index 000000000000..2bab9335563c --- /dev/null +++ b/dev-embedded/pista/Manifest @@ -0,0 +1 @@ +DIST pista-0.70.tar.gz 50454 BLAKE2B 515038a133d3c3dcbe5959020c88d6e4bc4e5a8b2bed7c6b0b226064ebde6f5fa91f0af102fe544cb4fba0d0b7e9439bdbecc4516354c6d6daeb5735c2fa72fc SHA512 23125ffff317d7c0de16de76cc572bb4a0aba125dd3b9cd7adb5adb7efe09f7c694c81046fd9ced77e595e25d417044ab3b8a7371a28f7d04c9be794d0436a7c diff --git a/dev-embedded/pista/metadata.xml b/dev-embedded/pista/metadata.xml new file mode 100644 index 000000000000..98ae10b3c34a --- /dev/null +++ b/dev-embedded/pista/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> diff --git a/dev-embedded/pista/pista-0.70.ebuild b/dev-embedded/pista/pista-0.70.ebuild new file mode 100644 index 000000000000..5c585c7fc978 --- /dev/null +++ b/dev-embedded/pista/pista-0.70.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Commandline-driven interface to PICSTART+ PIC programmer" +HOMEPAGE="http://gatling.ikk.sztaki.hu/~kissg/pd/pista/pista.html" +SRC_URI="ftp://gatling.ikk.sztaki.hu/pub/pic/pista/${P}.tar.gz + http://pista.choup.net/pub/pic/pista/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" +IUSE="" + +RDEPEND="dev-lang/perl + dev-perl/TermReadKey" +DEPEND="dev-lang/perl" + +DOCS=( README Changes Copyright doc/pista.html ) + +src_configure() { + perl Makefile.PL PREFIX=/usr || die "Running Makefile.PL failed" +} diff --git a/dev-embedded/pk2cmd/Manifest b/dev-embedded/pk2cmd/Manifest new file mode 100644 index 000000000000..5960c6c844c6 --- /dev/null +++ b/dev-embedded/pk2cmd/Manifest @@ -0,0 +1 @@ +DIST pk2cmdv1.20LinuxMacSource.tar.gz 223175 BLAKE2B b2d53763d5030341f13cb1bee534cfbed160ee4e4a839d5f900bb334f50a0ca52968fd8dc3f27e0fa8ecb47ad2b1d251881ed4646be41b5862e4fd0c452102a9 SHA512 72675eb287c1410c82ff49b4922afd28a8017b4e8517d10e77e0f0b111630f90881f778d754a47c97453f45412e965e281435d495fc70a047bd7357dd64f7b24 diff --git a/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch new file mode 100644 index 000000000000..2dfb014007f1 --- /dev/null +++ b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch @@ -0,0 +1,16 @@ +--- a/cmd_app.cpp ++++ b/cmd_app.cpp +@@ -88,7 +88,12 @@ + _tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString);
+ if (_tcslen(tempString) < 17)
+ {
+- _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
++ // Try /usr/share/pk2 first
++ _tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32);
++
++ if(access(tempString, 0))
++ // Well, that didn't work, default to the current directory
++ _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
+ }
+ }
+ if (!PicFuncs.ReadDeviceFile(tempString))
diff --git a/dev-embedded/pk2cmd/metadata.xml b/dev-embedded/pk2cmd/metadata.xml new file mode 100644 index 000000000000..bbfe78ae50b1 --- /dev/null +++ b/dev-embedded/pk2cmd/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> diff --git a/dev-embedded/pk2cmd/pk2cmd-1.20-r1.ebuild b/dev-embedded/pk2cmd/pk2cmd-1.20-r1.ebuild new file mode 100644 index 000000000000..db9537427e48 --- /dev/null +++ b/dev-embedded/pk2cmd/pk2cmd-1.20-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="An application for working with the Microchip PicKit2 PIC programmer" +HOMEPAGE="http://www.microchip.com/pickit2" +SRC_URI="http://ww1.microchip.com/downloads/en/DeviceDoc/${PN}v${PV}LinuxMacSource.tar.gz" +S="${WORKDIR}/${PN}v${PV}LinuxMacSource" + +LICENSE="MicroChip-PK2" +SLOT="0" +KEYWORDS="~amd64 ppc ppc64 ~x86" + +DEPEND="virtual/libusb:0" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-add-share-dir-for-dev-file-${PV}.patch +) + +src_prepare() { + default + + # Fix up the Makefile + sed \ + -e 's:#TARGET=linux:TARGET=linux:' \ + -e 's:DBG=-O2:DBG=:' \ + -e 's:^CFLAGS=:CFLAGS+=:' \ + -e 's:^LDFLAGS=:LDFLAGS+=:' \ + -e 's:^LIBUSB=/usr/local:LIBUSB=/usr:' \ + -e "s:^CC=g++::" \ + -i Makefile || die +} + +src_compile() { + emake CC="$(tc-getCXX)" +} + +src_install() { + # Copy the device files and PicKit2 OS + insinto /usr/share/pk2 + doins PK2DeviceFile.dat PK2V023200.hex + # Install the program + dobin pk2cmd + # Install the documentation + dodoc ReadmeForPK2CMDLinux2-6.txt usbhotplug.txt +} diff --git a/dev-embedded/platformio/Manifest b/dev-embedded/platformio/Manifest new file mode 100644 index 000000000000..ee93dda18f59 --- /dev/null +++ b/dev-embedded/platformio/Manifest @@ -0,0 +1 @@ +DIST platformio-6.1.19.gh.tar.gz 303716 BLAKE2B 3add65d4dd38efd64e152a97396ead9bc672b93b9933e91634e18a60318d7aa04defb9b95efdecf4454e407ba97f2fe1b24093e48fcb3380b4152d5f6b4cb7fa SHA512 0190401a92b2ce423ff451469ed0c31e27203e92417d08203878cc6a021dfcd014adea62d0f27c661b6a8eee7a0503a673c7b1e8e39d956173349d0ef323e731 diff --git a/dev-embedded/platformio/files/pio-6.1.19-marshmallow-4.patch b/dev-embedded/platformio/files/pio-6.1.19-marshmallow-4.patch new file mode 100644 index 000000000000..8b25a0e3321b --- /dev/null +++ b/dev-embedded/platformio/files/pio-6.1.19-marshmallow-4.patch @@ -0,0 +1,23 @@ +in marshmallow-4+ @validates accepts multiple field names, and + decorated@validates methods receive data_key as a keyword argument. + +--- a/platformio/package/manifest/schema.py ++++ b/platformio/package/manifest/schema.py +@@ -232,7 +232,7 @@ class ManifestSchema(BaseSchema): + ) + + @validates("version") +- def validate_version(self, value): ++ def validate_version(self, value, **kwargs): + try: + value = str(value) + assert "." in value +@@ -249,7 +249,7 @@ class ManifestSchema(BaseSchema): + ) from exc + + @validates("license") +- def validate_license(self, value): ++ def validate_license(self, value, **kwargs): + try: + spdx = self.load_spdx_licenses() + except requests.exceptions.RequestException as exc: diff --git a/dev-embedded/platformio/files/pio-6.1.19-starlette-1.patch b/dev-embedded/platformio/files/pio-6.1.19-starlette-1.patch new file mode 100644 index 000000000000..89d7f06caf02 --- /dev/null +++ b/dev-embedded/platformio/files/pio-6.1.19-starlette-1.patch @@ -0,0 +1,51 @@ +in starlette-1.0 on_startup (and on_shutdown) parameters have been + removed from Starlette (and Router). Code now needs to use the lifespan + parameter. + +--- a/platformio/home/run.py ++++ b/platformio/home/run.py +@@ -14,6 +14,8 @@ + + import os + from urllib.parse import urlparse ++import contextlib ++import contextvars + + import click + import uvicorn +@@ -86,18 +88,29 @@ def run_server(host, port, no_open, shutdown_timeout, home_url): + if path != "/": + routes.append(Route("/", protected_page)) + ++ no_open_var.set(no_open) ++ home_url_var.set(home_url) ++ + uvicorn.run( + Starlette( + middleware=[Middleware(ShutdownMiddleware)], + routes=routes, +- on_startup=[ +- lambda: click.echo( +- "PIO Home has been started. Press Ctrl+C to shutdown." +- ), +- lambda: None if no_open else click.launch(home_url), +- ], ++ lifespan=lifespan, + ), + host=host, + port=port, + log_level="warning", + ) ++ ++ ++no_open_var = contextvars.ContextVar('no_open') ++home_url_var = contextvars.ContextVar('home_url') ++ ++@contextlib.asynccontextmanager ++async def lifespan(app): ++ no_open = no_open_var.get() ++ home_url = home_url_var.get() ++ click.echo("PIO Home has been started. Press Ctrl+C to shutdown.") ++ if not no_open: ++ click.launch(home_url) ++ yield diff --git a/dev-embedded/platformio/metadata.xml b/dev-embedded/platformio/metadata.xml new file mode 100644 index 000000000000..4f0ad24a4f10 --- /dev/null +++ b/dev-embedded/platformio/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">platformio/platformio-core</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/platformio/platformio-6.1.19-r1.ebuild b/dev-embedded/platformio/platformio-6.1.19-r1.ebuild new file mode 100644 index 000000000000..54c050924154 --- /dev/null +++ b/dev-embedded/platformio/platformio-6.1.19-r1.ebuild @@ -0,0 +1,155 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 shell-completion udev + +DESCRIPTION="An open source ecosystem for IoT development" +HOMEPAGE="https://platformio.org/" +SRC_URI="https://github.com/platformio/platformio-core/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}"/${PN}-core-${PV} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +#TODO dev-python/requests[socks5] if proxy needed + +RDEPEND=" + $(python_gen_cond_dep ' + =dev-python/ajsonrpc-1.2*[${PYTHON_USEDEP}] + =dev-python/bottle-0.13*[${PYTHON_USEDEP}] + >=dev-python/click-8.2[${PYTHON_USEDEP}] + <dev-python/click-8.4[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + =dev-python/pyserial-3.5*[${PYTHON_USEDEP}] + >=dev-python/zeroconf-0.37[${PYTHON_USEDEP}] + =dev-python/requests-2*[${PYTHON_USEDEP}] + =dev-python/semantic-version-2.10*[${PYTHON_USEDEP}] + =dev-python/tabulate-0*[${PYTHON_USEDEP}] + dev-python/twisted[${PYTHON_USEDEP}] + dev-python/constantly[${PYTHON_USEDEP}] + >=dev-python/pyelftools-0.30[${PYTHON_USEDEP}] + <dev-python/pyelftools-1[${PYTHON_USEDEP}] + =dev-python/marshmallow-4*[${PYTHON_USEDEP}] + >=dev-python/starlette-0.21[${PYTHON_USEDEP}] + <dev-python/starlette-1.1[${PYTHON_USEDEP}] + >=dev-python/uvicorn-0.19[${PYTHON_USEDEP}] + <dev-python/uvicorn-0.50[${PYTHON_USEDEP}] + =dev-python/wsproto-1*[${PYTHON_USEDEP}] + ') + virtual/udev" +DEPEND="virtual/udev" +BDEPEND="test? ( $(python_gen_cond_dep 'dev-python/jsondiff[${PYTHON_USEDEP}]') )" + +# This list has been refined to have the individual tests which need network access +# to be disabled (or those that need a test email account). +# this list will need careful monitoring during version bumps +EPYTEST_IGNORE=( + # Requires network access + tests/commands/pkg/test_install.py + tests/commands/pkg/test_list.py + tests/commands/pkg/test_outdated.py + tests/commands/pkg/test_search.py + tests/commands/pkg/test_show.py + tests/commands/pkg/test_uninstall.py + tests/commands/pkg/test_update.py + tests/commands/test_account_org_team.py + tests/commands/test_boards.py + tests/commands/test_check.py + tests/commands/test_lib.py + tests/commands/test_lib_complex.py + tests/commands/test_platform.py + tests/commands/test_run.py + tests/commands/test_test.py + tests/misc/ino2cpp/test_ino2cpp.py + tests/misc/test_maintenance.py + tests/project/test_metadata.py + tests/test_examples.py +) + +EPYTEST_DESELECT=( + # Requires network access + tests/commands/pkg/test_exec.py::test_pkg_specified + tests/commands/pkg/test_exec.py::test_unrecognized_options + tests/commands/test_ci.py::test_ci_boards + tests/commands/test_ci.py::test_ci_build_dir + tests/commands/test_ci.py::test_ci_keep_build_dir + tests/commands/test_ci.py::test_ci_keep_build_dir_nested_src_dirs + tests/commands/test_ci.py::test_ci_keep_build_dir_single_src_dir + tests/commands/test_ci.py::test_ci_lib_and_board + tests/commands/test_ci.py::test_ci_project_conf + tests/commands/test_init.py::test_init_custom_framework + tests/commands/test_init.py::test_init_duplicated_boards + tests/commands/test_init.py::test_init_enable_auto_uploading + tests/commands/test_init.py::test_init_ide_eclipse + tests/commands/test_init.py::test_init_ide_vscode + tests/commands/test_init.py::test_init_incorrect_board + tests/commands/test_init.py::test_init_special_board + tests/misc/test_misc.py::test_api_cache + tests/misc/test_misc.py::test_ping_internet_ips + tests/package/test_manager.py::test_download + tests/package/test_manager.py::test_install_force + tests/package/test_manager.py::test_install_from_registry + tests/package/test_manager.py::test_install_lib_depndencies + tests/package/test_manager.py::test_registry + tests/package/test_manager.py::test_uninstall + tests/package/test_manager.py::test_update_with_metadata + tests/package/test_manager.py::test_update_without_metadata + tests/package/test_manifest.py::test_library_json_schema + tests/package/test_manifest.py::test_platform_json_schema + tests/project/test_config.py::test_win_core_root_dir +) + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/pio-6.1.19-marshmallow-4.patch + "${FILESDIR}"/pio-6.1.19-starlette-1.patch +) + +python_prepare_all() { + # Allow marshmallow-4* + # Allow starlette-1.0* + # Allow uvicorn-0.4* + sed \ + -e '/marshmallow/s/3\.[0-9.*]*/4.*/' \ + -e '/starlette/s/<0\.5[0-9]*/<1.1/' \ + -e '/uvicorn/s/<0\.4[0-9]*/<0.50/' \ + -i platformio/dependencies.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + epytest -k "not skip_ci" +} + +python_compile_all() { + #completions + local _PIO_COMPLETE s_type + for s_type in bash fish zsh; do + _PIO_COMPLETE=${s_type}_source "${BUILD_DIR}"/install/usr/bin/pio > "${T}"/pio.${s_type} || die + done +} + +src_install() { + distutils-r1_src_install + udev_dorules platformio/assets/system/99-platformio-udev.rules + + newbashcomp "${T}"/pio.bash pio + newfishcomp "${T}"/pio.fish pio.fish + newzshcomp "${T}"/pio.zsh _pio +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-embedded/ponyprog/Manifest b/dev-embedded/ponyprog/Manifest new file mode 100644 index 000000000000..83b9c22b6a38 --- /dev/null +++ b/dev-embedded/ponyprog/Manifest @@ -0,0 +1 @@ +DIST ponyprog-3.1.4_p20250501.tar.gz 11832067 BLAKE2B 78de11392f3790e8e7c34b1be3bd76a3a6a11606dcfc07ecd1e5acb405e03a7b06029fea11c20d699b8ef26e8670e3abfd300053c833e5d87dfd7354b04f7a1a SHA512 9c489559960188a2ddae57eb2ca55bfc4e0411cf3837ae84b92d9b2b6c419d5eeaece5d2b6acab73befd3401ee965c4da3bc52510c7145d1379dd2be6b62d408 diff --git a/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-cyrillic.patch b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-cyrillic.patch new file mode 100644 index 000000000000..4ff25a703d29 --- /dev/null +++ b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-cyrillic.patch @@ -0,0 +1,39 @@ +From 88a738338de271a8784c1fac4b213494a64b8cc4 Mon Sep 17 00:00:00 2001 +From: Eduard Kalinowski <eduard_kalinowski@yahoo.de> +Date: Fri, 9 May 2025 10:25:38 +0200 +Subject: [PATCH] Hotfix for text locations, report #43 + +See https://github.com/lancos/ponyprog/issues/43 +--- + CMakeLists.txt | 1 - + SrcPony/Translator.cpp | 5 ----- + 2 files changed, 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e46672..52db2ab 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,7 +86,6 @@ ELSE() + MESSAGE(FATAL_ERROR "-- LibUSB version ${LIBUSB_VERSION} TOO OLD! Please Install this library newer as 1.0.16") + ENDIF() + +- + # SET(APP_VERSION "3.1.4") + # + # Set the PonyProg version +diff --git a/SrcPony/Translator.cpp b/SrcPony/Translator.cpp +index 8079e59..cb1a963 100644 +--- a/SrcPony/Translator.cpp ++++ b/SrcPony/Translator.cpp +@@ -595,11 +595,6 @@ bool cTranslator::loadTranslation(const QString fname) + if (llEng == "LANGUAGE_CHARSET") + { + llEng = stream.readLine(); +-#if USE_QT_VERSION == 6 +- stream.setEncoding(QStringConverter::Latin1); +-#else +- stream.setCodec(llEng.toLatin1()); +-#endif + continue; + } + diff --git a/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-fix-build-system.patch b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-fix-build-system.patch new file mode 100644 index 000000000000..fcf46ac5b260 --- /dev/null +++ b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-fix-build-system.patch @@ -0,0 +1,71 @@ +Fix gentoo-specific build and fix some CMake warnings +Some of that merged to upstream, see +https://github.com/lancos/ponyprog/pull/44 +--- + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e46672..7d8eb67 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,16 +1,16 @@ +-PROJECT(ponyprog) +- + # Configure CMake ... +-CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR) + # CMAKE_POLICY(SET CMP0003 OLD) + # CMAKE_POLICY(SET CMP0015 OLD) + ++PROJECT(ponyprog) ++ + IF(WIN32) + CMAKE_POLICY(SET CMP0020 NEW) + ENDIF() + + # set the Qt version to 6 or 5 +-OPTION (USE_QT5 "Using of Qt5 version for compiling" ON) ++OPTION (USE_QT5 "Using of Qt5 version for compiling" OFF) + + IF(${USE_QT5}) + SET(USE_QT_VERSION 5) +@@ -45,15 +45,7 @@ OPTION (USE_DEBUGGER "Include in binary file debug information" OFF) + + OPTION (USE_PROFILER "Include in binary file profiling information" OFF) + +- +-IF(${USE_DEBUGGER}) +- SET(CMAKE_BUILD_TYPE Debug) +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -Wall") +-ELSE() +- SET(CMAKE_BUILD_TYPE Release) +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -Wall") +-ENDIF() +- ++ADD_COMPILE_OPTIONS("-Wall") + MESSAGE(STATUS "CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}") + + INCLUDE(CheckIncludeFile) +@@ -269,11 +261,12 @@ SET ( MOC_DIR temp ) + SET ( UI_HEADERS_DIR temp ) + SET ( UI_SOURCES_DIR temp ) + +-ADD_SUBDIRECTORY(qhexedit2/src) + ADD_SUBDIRECTORY(SrcPony) + +-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/qhexedit2/src/ ${CMAKE_CURRENT_SOURCE_DIR}/SrcPony/ ) ++find_library(QHexEdit_LIBRARY NAMES qhexedit) ++set(QHexEdit_LIBRARIES "${QHexEdit_LIBRARY}") + ++INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/SrcPony/ ) + + IF(${USE_QT_VERSION} MATCHES "5") + # QT5_ADD_TRANSLATION(APP_TRANSLATIONS ${TRANSLATION}) +@@ -346,7 +339,7 @@ IF(${USE_QT_VERSION} MATCHES "6") + #MESSAGE(STATUS "QT LIBRARIES: ${QT_LIBRARIES} ${Qt6Widgets_LIBRARIES} ${Qt6Multimedia_LIBRARIES} ${Qt6Xml_LIBRARIES} ${Qt6PrintSupport_LIBRARIES} ${Qt6Core_LIBRARIES}") + ENDIF() + +-TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} ${LIBFTDI_LIBRARY} ${LIBUSB_LIBRARIES}) ++TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} ${LIBFTDI_LIBRARY} ${LIBUSB_LIBRARIES} ${QHexEdit_LIBRARIES}) + + ADD_CUSTOM_TARGET (tags + COMMAND ctags -R -f tags ${CMAKE_SOURCE_DIR}/SrcPony diff --git a/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-usbwatcher-qt6.patch b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-usbwatcher-qt6.patch new file mode 100644 index 000000000000..e66405ac5ce8 --- /dev/null +++ b/dev-embedded/ponyprog/files/ponyprog-3.1.4_p20250501-usbwatcher-qt6.patch @@ -0,0 +1,41 @@ +See https://github.com/lancos/ponyprog/issues/42 +--- + +diff --git a/SrcPony/usbwatcher.h b/SrcPony/usbwatcher.h +index eeb0163..d7ab2c5 100644 +--- a/SrcPony/usbwatcher.h ++++ b/SrcPony/usbwatcher.h +@@ -51,20 +51,22 @@ class USBWatcher : public QObject + + void hotplug_notify(bool connected, quint16 vid, quint16 pid) + { ++ VidPid *vObj = new VidPid(vid, pid); + if (connected) + { +- vUSB.append(VidPid(vid, pid)); ++ vUSB.append(vObj); + emit notify(true, vid, pid); + } + else + { +- int idx = vUSB.indexOf(VidPid(vid, pid)); ++ int idx = vUSB.indexOf(vObj); + if (idx != -1) + { + vUSB.remove(idx); + } + emit notify(false, vid, pid); + } ++ delete vObj; + } + + signals: +@@ -76,7 +78,7 @@ class USBWatcher : public QObject + private: + void hotplug_deregister(); + +- QVector <VidPid> vUSB; ++ QVector <VidPid *> vUSB; + libusb_hotplug_callback_handle cbHandle; + libusb_context *usb_ctx; + QTimer *timer; diff --git a/dev-embedded/ponyprog/metadata.xml b/dev-embedded/ponyprog/metadata.xml new file mode 100644 index 000000000000..039abd0b4f50 --- /dev/null +++ b/dev-embedded/ponyprog/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="github">lancos/ponyprog</remote-id> + <remote-id type="sourceforge">ponyprog</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/ponyprog/ponyprog-3.1.4_p20250501.ebuild b/dev-embedded/ponyprog/ponyprog-3.1.4_p20250501.ebuild new file mode 100644 index 000000000000..9f94f21ff1ef --- /dev/null +++ b/dev-embedded/ponyprog/ponyprog-3.1.4_p20250501.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake udev + +EGIT_COMMIT="5a4ef795b297ed1eaf6b4d4e71b3ce7a1bb63481" + +DESCRIPTION="EEPROM and microcontroller programmer/flasher" +HOMEPAGE="https://github.com/lancos/ponyprog/" +SRC_URI="https://github.com/lancos/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${EGIT_COMMIT}" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +DEPEND=" + >=app-editors/qhexedit2-0.8.10 + <app-editors/qhexedit2-0.9.0 + dev-embedded/libftdi:1[cxx] + dev-qt/qtbase:6[gui,widgets] + dev-qt/qtmultimedia:6 + virtual/libusb:1 +" + +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-cyrillic.patch + "${FILESDIR}"/${P}-fix-build-system.patch + "${FILESDIR}"/${P}-usbwatcher-qt6.patch +) + +pkg_postinst() { + udev_reload + + elog "To use the COM port in user mode (not as root), you need to" + elog "be in the 'uucp' group." + elog + elog "To use the LPT port in user mode (not as root) you need a kernel with" + elog "ppdev, parport and parport_pc compiled in or as modules. You need the" + elog "rights to write to /dev/parport? devices." +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-embedded/powersoftplus-libftdi/Manifest b/dev-embedded/powersoftplus-libftdi/Manifest new file mode 100644 index 000000000000..a904695c9513 --- /dev/null +++ b/dev-embedded/powersoftplus-libftdi/Manifest @@ -0,0 +1 @@ +DIST powersoftplus-0.1.8-x86.tar.gz 4746235 BLAKE2B 3ae26bbb1dc924bf88ef9cf65953ce16ee3db1d4b4e4c15ec7c352dfedd37485402a201f0e6bea8909344f1f87a8aca728d8d62827ce2578c8b158157acd7c72 SHA512 13d499bcad3044ec50502026f5d61b11693c9ff5996978ff3101a705b71569749961f82855b9179d9da89a8e51c745ca5cf308ae6dbbd21242dd1d480323ba0b diff --git a/dev-embedded/powersoftplus-libftdi/files/powersoftplus-libftdi-0.1.8-LDFLAGS.patch b/dev-embedded/powersoftplus-libftdi/files/powersoftplus-libftdi-0.1.8-LDFLAGS.patch new file mode 100644 index 000000000000..642209ea0ea1 --- /dev/null +++ b/dev-embedded/powersoftplus-libftdi/files/powersoftplus-libftdi-0.1.8-LDFLAGS.patch @@ -0,0 +1,23 @@ +diff --git a/libftdi/lib_table/Makefile b/libftdi/lib_table/Makefile +index cf4316b..dd393b8 100644 +--- a/libftdi/lib_table/Makefile ++++ b/libftdi/lib_table/Makefile +@@ -1,15 +1,15 @@ + # which compiler +-CC = gcc ++CC ?= gcc + + VERSION = _RELEASE + + LIBNAME = libd2xx_table.so + +-CFLAGS = -DLINUX -D$(VERSION) ++CFLAGS += -DLINUX -D$(VERSION) + + $(LIBNAME): ftdi_table.o + +- $(CC) -Wall -shared -fPIC -o $(LIBNAME) ftdi_table.o ++ $(CC) -Wall -shared -fPIC ${LDFLAGS} -o $(LIBNAME) ftdi_table.o + + ftdi_table.o: ftdi_table.c + $(CC) -I. $(CFLAGS) -c -fPIC ftdi_table.c diff --git a/dev-embedded/powersoftplus-libftdi/metadata.xml b/dev-embedded/powersoftplus-libftdi/metadata.xml new file mode 100644 index 000000000000..85e4ed814fa2 --- /dev/null +++ b/dev-embedded/powersoftplus-libftdi/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +</pkgmetadata> diff --git a/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild b/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild new file mode 100644 index 000000000000..6a6b23ad072d --- /dev/null +++ b/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools toolchain-funcs + +MY_PN="${PN/-libftdi/}" +MY_P="${MY_PN}-${PV}" + +TABFILE="libd2xx_table.so" +TABFILEDIR="libftdi/lib_table" + +DESCRIPTION="Library which includes a table of VIDs and PIDs of Ever UPS devices" +HOMEPAGE="http://www.ever.com.pl" +SRC_URI="http://www.ever.com.pl/pl/pliki/${MY_P}-x86.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~x86" + +PATCHES=( + "${FILESDIR}/${PN}-0.1.8-LDFLAGS.patch" +) + +src_prepare() { + default + eautoreconf +} + +src_compile() { + cd "${TABFILEDIR}" || die + + # Wipe out precompiled binary + emake clean + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + ftditabfile="${TABFILEDIR}/${TABFILE}" + dolib.so ${ftditabfile} +} diff --git a/dev-embedded/probe-rs-tools/Manifest b/dev-embedded/probe-rs-tools/Manifest new file mode 100644 index 000000000000..80209a02cc65 --- /dev/null +++ b/dev-embedded/probe-rs-tools/Manifest @@ -0,0 +1,2 @@ +DIST probe-rs-tools-0.31.0-crates.tar.xz 35995692 BLAKE2B e837484cf24f3c3bf13b666f127ce396637d178884391fb9dc6459462ad177ab7e2e38bd655f2c43cb7d5fa20eefa1cbc041fbf7d2e79c2c9303a69377ba5c56 SHA512 ba16a75450688aa42edf77bc0beaa0546e74e319b8c409fb8bed6cc867ecee67d0b0ee81ea46c434aefae45c9fb7fbf0cbf0fb6e39623fd57c6aa27a1dc99ae9 +DIST probe-rs-tools-0.31.0.tar.gz 17614102 BLAKE2B 141e7ba9f97e46c96df04fd5f5be7213f239e74a78a541c3b435ad600f688d80bedad5c4fae36f79d1d68edac3180c235d1246517464d5e82db0ab54584787cb SHA512 435939aeda651ed355c3c72273318513133d8152eb7b0a0274568771719c1dbf529a6f0f52e09249e52e82cb892e3cbd9d4f8b0b79973d8d0ee8f83435700c20 diff --git a/dev-embedded/probe-rs-tools/metadata.xml b/dev-embedded/probe-rs-tools/metadata.xml new file mode 100644 index 000000000000..ee3ca81bb59d --- /dev/null +++ b/dev-embedded/probe-rs-tools/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>pinguinlars1105+gentoo@gmail.com</email> + <name>AshyPinguin</name> + </maintainer> + <upstream> + <remote-id type="github">probe-rs/probe-rs</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/probe-rs-tools/probe-rs-tools-0.31.0.ebuild b/dev-embedded/probe-rs-tools/probe-rs-tools-0.31.0.ebuild new file mode 100644 index 000000000000..b57835b57d30 --- /dev/null +++ b/dev-embedded/probe-rs-tools/probe-rs-tools-0.31.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.15.1 + +EAPI=8 +RUST_MIN_VER="1.88" + +# test crates (needs thumbv7em-none-eabi) +# CRATES=" +# panic-halt@1.0.0 +# cortex-m-rt@0.7.5 +# cortex-m-rt-macros@0.7.5 +# " +# + +inherit cargo shell-completion + +DESCRIPTION="A collection of on chip debugging tools to communicate with microchips." +HOMEPAGE="https://probe.rs" +SRC_URI=" + https://github.com/probe-rs/probe-rs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://codeberg.org/AshyPinguin/vendor-tarballs/releases/download/${P}/${P}-crates.tar.xz + ${CARGO_CRATE_URIS} +" + +S="${WORKDIR}/probe-rs-${PV}/probe-rs-tools" + +LICENSE="|| ( Apache-2.0 MIT )" +# Dependent crate licenses +LICENSE+=" + 0BSD Apache-2.0 BSD-2 BSD CDLA-Permissive-2.0 ISC MIT MPL-2.0 + Unicode-3.0 Unlicense ZLIB +" +SLOT="0" +KEYWORDS="~amd64 ~arm64" + +QA_FLAGS_IGNORED="/usr/bin/probe-rs /usr/bin/cargo-embed /usr/bin/cargo-flash" +RESTRICT=test #TODO: allow manual testing if it is possible to install a target + +src_install() { + cargo_src_install + + for i in bash fish zsh; do + SHELL="/usr/bin/${i}" "${D}/usr/bin/probe-rs" complete install --manual > "${T}/probe-rs.${i}" + done + + newbashcomp "${T}/probe-rs.bash" probe-rs + bashcomp_alias probe-rs cargo-embed cargo-flash + dofishcomp "${T}/probe-rs.fish" + newzshcomp "${T}/probe-rs.zsh" _probe-rs +} diff --git a/dev-embedded/qdl/Manifest b/dev-embedded/qdl/Manifest new file mode 100644 index 000000000000..00507a386df1 --- /dev/null +++ b/dev-embedded/qdl/Manifest @@ -0,0 +1,2 @@ +DIST qdl-2.5.tar.gz 51204 BLAKE2B c523c01c9a9d5c8902679ec76e88ea7068a4e8c0485bd5ac462fc150cc0b4029439723640eaecf7fdc547faea98760d9e108d8555ef275498291d78eeaaebeef SHA512 b42700225dd93184ae588b64de0479fc46ca51240b1c3c7fb28f27c5d49bddd12c41a8665caf447d66b66d38a7be75cec9e0cdad043240cdd106cc37e2332591 +DIST qdl-2.6.tar.gz 59999 BLAKE2B 5c4069086ba637f7c4c8da98a794e7e2fdc30c229c9e7cb35a8de1cd057a42acaec83477a9003f0a2b1f30f7107f7e99b7e49b10d29d3a353d114b5916e6cc2e SHA512 cc408faf16e531534f2ee3dc84d99f15b988ebae78ee44b45790f6db113bd98356dcb28a2a744be7d9560749b6a27310d3fd8625fad2986b6f4844c7b839a5e3 diff --git a/dev-embedded/qdl/metadata.xml b/dev-embedded/qdl/metadata.xml new file mode 100644 index 000000000000..84f0cb40d6b8 --- /dev/null +++ b/dev-embedded/qdl/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>quincyf467@protonmail.com</email> + <name>Quincy Fleming</name> + </maintainer> + <upstream> + <remote-id type="github">linux-msm/qdl</remote-id> + <doc lang="en">https://github.com/linux-msm/qdl</doc> + <bugs-to>https://github.com/linux-msm/qdl/issues</bugs-to> + </upstream> + <longdescription lang="en"> + This tool communicates with USB devices of id 05c6:9008 to upload a flash + loader and use this to flash images. + </longdescription> +</pkgmetadata> diff --git a/dev-embedded/qdl/qdl-2.5.ebuild b/dev-embedded/qdl/qdl-2.5.ebuild new file mode 100644 index 000000000000..a00078f50b97 --- /dev/null +++ b/dev-embedded/qdl/qdl-2.5.ebuild @@ -0,0 +1,46 @@ +# Copyright 2023-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Tool to communicate with Qualcomm System On a Chip bootroms" +HOMEPAGE="https://github.com/linux-msm/qdl" +SRC_URI="https://github.com/linux-msm/qdl/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-libs/libusb:1 + dev-libs/libxml2:= +" +RDEPEND="${DEPEND}" + +BDEPEND=" + sys-apps/help2man + virtual/pkgconfig +" + +src_compile() { + # $(VERSION) needs to be consistent in all make invocations + export VERSION="${PV}" + + local PKG_CONFIG="$(tc-getPKG_CONFIG)" + emake CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} $(${PKG_CONFIG} --cflags libxml-2.0 libusb-1.0 || die)" \ + LDFLAGS="${LDFLAGS} $(${PKG_CONFIG} --libs libxml-2.0 libusb-1.0 || die)" + emake manpages +} + +src_test() { + emake tests +} + +src_install() { + emake prefix="${EPREFIX}/usr" DESTDIR="${D}" install + doman *.1 + einstalldocs +} diff --git a/dev-embedded/qdl/qdl-2.6.ebuild b/dev-embedded/qdl/qdl-2.6.ebuild new file mode 100644 index 000000000000..a00078f50b97 --- /dev/null +++ b/dev-embedded/qdl/qdl-2.6.ebuild @@ -0,0 +1,46 @@ +# Copyright 2023-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Tool to communicate with Qualcomm System On a Chip bootroms" +HOMEPAGE="https://github.com/linux-msm/qdl" +SRC_URI="https://github.com/linux-msm/qdl/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-libs/libusb:1 + dev-libs/libxml2:= +" +RDEPEND="${DEPEND}" + +BDEPEND=" + sys-apps/help2man + virtual/pkgconfig +" + +src_compile() { + # $(VERSION) needs to be consistent in all make invocations + export VERSION="${PV}" + + local PKG_CONFIG="$(tc-getPKG_CONFIG)" + emake CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} $(${PKG_CONFIG} --cflags libxml-2.0 libusb-1.0 || die)" \ + LDFLAGS="${LDFLAGS} $(${PKG_CONFIG} --libs libxml-2.0 libusb-1.0 || die)" + emake manpages +} + +src_test() { + emake tests +} + +src_install() { + emake prefix="${EPREFIX}/usr" DESTDIR="${D}" install + doman *.1 + einstalldocs +} diff --git a/dev-embedded/qdl/qdl-9999.ebuild b/dev-embedded/qdl/qdl-9999.ebuild new file mode 100644 index 000000000000..c2b7c9ae0426 --- /dev/null +++ b/dev-embedded/qdl/qdl-9999.ebuild @@ -0,0 +1,29 @@ +# Copyright 2023-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit git-r3 meson + +DESCRIPTION="Tool to communicate with Qualcomm System On a Chip bootroms" +HOMEPAGE="https://github.com/linux-msm/qdl" +EGIT_REPO_URI="https://github.com/linux-msm/qdl.git" + +LICENSE="BSD" +SLOT="0" + +DEPEND=" + dev-libs/libusb:1 + dev-libs/libxml2:= +" +RDEPEND="${DEPEND}" + +BDEPEND=" + sys-apps/help2man + virtual/pkgconfig +" + +src_prepare() { + sed -i '/default_options/d' meson.build || die + default +} diff --git a/dev-embedded/raspberrypi-utils/Manifest b/dev-embedded/raspberrypi-utils/Manifest new file mode 100644 index 000000000000..3e202c1151f3 --- /dev/null +++ b/dev-embedded/raspberrypi-utils/Manifest @@ -0,0 +1,2 @@ +DIST raspberrypi-utils-0_p20240903.tar.gz 123998 BLAKE2B 4281fee7761df03b3a555d5e36f4bec1621c8402a5d5456752ab2d95482ca355e51d174f461ed8a1f89ed5d420a14d5f09872c090eccff6751d0c00ab20cf398 SHA512 96504004a1b7b541fe126d973f60321769a4b54a1b603b1d9278ba902bed7c008c2f86906dfaf30632ce75e1073b2a97e9317a799a0bc8cea255d713cb26ae67 +DIST raspberrypi-utils-0_p20260527.tar.gz 208882 BLAKE2B 646bad0fcf3ef055a0d04575a6f5db29a3f27b63ad3eeb8fe61f0f98b27279ae702462d9d7ecb0d0c9fab772f5fcdbd94949177ce199e2d243c53f3450790977 SHA512 8bec4c0039823cc8f21da52947aa37435406688ac630abf8e5ec832c99b66a056b50f40bf5a46200d9dae5f7a8069d4ffeb87c94927b73352f11e6805bc590c1 diff --git a/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-silence-kms-missing-message.patch b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-silence-kms-missing-message.patch new file mode 100644 index 000000000000..64e33fbb8591 --- /dev/null +++ b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-silence-kms-missing-message.patch @@ -0,0 +1,31 @@ +From a6c5ae5d936fc4450b138a42439baa01901eb2a3 Mon Sep 17 00:00:00 2001 +From: AshyPinguin <pinguinlars1105+gentoo@gmail.com> +Date: Thu, 28 May 2026 20:18:25 +0200 +Subject: [PATCH 1/3] fix: silence message about missing package + +A package for kmsprint (something related to kms++-utils) needs to be +added to the gentoo repo to be able to drop this patch + +Signed-off-by: AshyPinguin <pinguinlars1105+gentoo@gmail.com> +--- + raspinfo/raspinfo | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/raspinfo/raspinfo b/raspinfo/raspinfo +index 0947b8e..258c228 100755 +--- a/raspinfo/raspinfo ++++ b/raspinfo/raspinfo +@@ -15,8 +15,8 @@ display_info_drm() { + kmsprint -m + echo + kmsprint -p +- else +- echo "kmsprint is not installed. Install with: sudo apt install kms++-utils" ++ # else ++ # echo "kmsprint is not installed. Install with: sudo apt install kms++-utils" # suppressing because their isn't a package for it yet. + fi + + echo +-- +2.53.0 + diff --git a/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-silence-sections-with-missing-commands.patch b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-silence-sections-with-missing-commands.patch new file mode 100644 index 000000000000..49148ebf78bb --- /dev/null +++ b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-silence-sections-with-missing-commands.patch @@ -0,0 +1,61 @@ +From 581cc89764c84299a630e4a61a25fec15bc84bbd Mon Sep 17 00:00:00 2001 +From: AshyPinguin <pinguinlars1105+gentoo@gmail.com> +Date: Thu, 28 May 2026 20:32:55 +0200 +Subject: [PATCH 3/3] fix: don't show section with not installed commands + +This patch fixes command not found errors by not displaying the commands +if they aren't installed. + +Signed-off-by: AshyPinguin <pinguinlars1105+gentoo@gmail.com> +--- + raspinfo/raspinfo | 25 +++++++++++++++---------- + 1 file changed, 15 insertions(+), 10 deletions(-) + +diff --git a/raspinfo/raspinfo b/raspinfo/raspinfo +index 315489b..0bcd222 100755 +--- a/raspinfo/raspinfo ++++ b/raspinfo/raspinfo +@@ -273,25 +273,30 @@ echo + wifi_info + echo + +-echo "USB Information" +-echo "---------------" +-echo ++if command -v lsusb &> /dev/null; then ++ echo "USB Information" ++ echo "---------------" ++ echo + +-lsusb -t ++ lsusb -t ++ ++ echo ++fi + +-echo + echo "Display Information" + echo "-------------------" + echo + + display_info + +-echo +-echo "Audio Information" +-echo "-------------------" +-echo ++if command -v systemctl &> /dev/null || command -v aplay &> /dev/null; then ++ echo ++ echo "Audio Information" ++ echo "-------------------" ++ echo + +-audio_info ++ audio_info ++fi + + echo + echo "Firmware Configuration" +-- +2.53.0 + diff --git a/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-use-emerge-for-package-versions.patch b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-use-emerge-for-package-versions.patch new file mode 100644 index 000000000000..550f8966e0ac --- /dev/null +++ b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-use-emerge-for-package-versions.patch @@ -0,0 +1,40 @@ +From 264f59ee29208c7ceaaf9b3cd5dc4f64b900c3de Mon Sep 17 00:00:00 2001 +From: AshyPinguin <pinguinlars1105+gentoo@gmail.com> +Date: Thu, 28 May 2026 20:19:16 +0200 +Subject: [PATCH 2/3] compat: use emerge instead of apt + +Since apt isn't installed on Gentoo system, it doesn't make sense to use +apt. So this patch achieves the same but with emerge. + +Signed-off-by: AshyPinguin <pinguinlars1105+gentoo@gmail.com> +--- + raspinfo/raspinfo | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/raspinfo/raspinfo b/raspinfo/raspinfo +index 258c228..315489b 100755 +--- a/raspinfo/raspinfo ++++ b/raspinfo/raspinfo +@@ -255,12 +255,13 @@ echo + echo "Package version information" + echo "---------------------------" + +-apt-cache policy raspberrypi-ui-mods | head -2 +-apt-cache policy raspberrypi-sys-mods | head -2 +-apt-cache policy openbox | head -2 +-apt-cache policy lxpanel | head -2 +-apt-cache policy pcmanfm | head -2 +-apt-cache policy rpd-plym-splash | head -2 ++# apt-cache policy raspberrypi-ui-mods | head -2 ++# apt-cache policy raspberrypi-sys-mods | head -2 ++# apt-cache policy openbox | head -2 ++# apt-cache policy lxpanel | head -2 ++# apt-cache policy pcmanfm | head -2 ++# apt-cache policy rpd-plym-splash | head -2 ++emerge --info dev-embedded/raspberrypi-utils::gentoo | grep --color=never -A 1 "^dev-embedded/raspberrypi-utils" + + echo + echo "Networking Information" +-- +2.53.0 + diff --git a/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-werror.patch b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-werror.patch new file mode 100644 index 000000000000..ddfce08d0407 --- /dev/null +++ b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-werror.patch @@ -0,0 +1,77 @@ +https://github.com/raspberrypi/utils/pull/69 + +From 0bbef73e2f1df17c793152895cabac452a49981f Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Tue, 6 Feb 2024 21:36:08 +0000 +Subject: [PATCH] build: Only enable -Werror for debug builds + +-Werror is very unhelpful for distributions and end users as newer +compilers will raise warnings that the maintainers may not see. The +warnings should get reported upstream, but they shouldn't block users +from using the software. + +Rather than drop the flag entirely, I have enabled it only for debug +builds, e.g. -DCMAKE_BUILD_TYPE=Debug. + +Signed-off-by: James Le Cuirot <chewi@gentoo.org> +--- + dtmerge/CMakeLists.txt | 2 +- + eeptools/CMakeLists.txt | 2 +- + pinctrl/CMakeLists.txt | 2 +- + vclog/CMakeLists.txt | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/dtmerge/CMakeLists.txt b/dtmerge/CMakeLists.txt +index f63648b..357889f 100644 +--- a/dtmerge/CMakeLists.txt ++++ b/dtmerge/CMakeLists.txt +@@ -5,7 +5,7 @@ include(GNUInstallDirs) + #set project name + project(dtmerge) + +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror") ++add_compile_options(-Wall -Wextra $<$<CONFIG:Debug>:-Werror>) + + if (CMAKE_COMPILER_IS_GNUCC) + add_definitions (-ffunction-sections) +diff --git a/eeptools/CMakeLists.txt b/eeptools/CMakeLists.txt +index 3438255..90fc284 100644 +--- a/eeptools/CMakeLists.txt ++++ b/eeptools/CMakeLists.txt +@@ -5,7 +5,7 @@ include(GNUInstallDirs) + #set project name + project(eeptools) + +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror") ++add_compile_options(-Wall -Wextra $<$<CONFIG:Debug>:-Werror>) + + if (CMAKE_COMPILER_IS_GNUCC) + add_definitions (-ffunction-sections) +diff --git a/pinctrl/CMakeLists.txt b/pinctrl/CMakeLists.txt +index 2178ee4..70427f2 100644 +--- a/pinctrl/CMakeLists.txt ++++ b/pinctrl/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.10...3.27) + include(GNUInstallDirs) + +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -pedantic") ++add_compile_options(-Wall -Wextra $<$<CONFIG:Debug>:-Werror> -pedantic) + + #set project name + project(pinctrl) +diff --git a/vclog/CMakeLists.txt b/vclog/CMakeLists.txt +index 611f9dc..b7e57eb 100644 +--- a/vclog/CMakeLists.txt ++++ b/vclog/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 3.10...3.27) + +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -pedantic") ++add_compile_options(-Wall -Wextra $<$<CONFIG:Debug>:-Werror> -pedantic) + + #set project name + project(vclog) +-- +2.43.0 + diff --git a/dev-embedded/raspberrypi-utils/metadata.xml b/dev-embedded/raspberrypi-utils/metadata.xml new file mode 100644 index 000000000000..11b4d811a352 --- /dev/null +++ b/dev-embedded/raspberrypi-utils/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>chewi@gentoo.org</email> + <name>James Le Cuirot</name> + </maintainer> + <upstream> + <remote-id type="github">raspberrypi/utils</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20240903.ebuild b/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20240903.ebuild new file mode 100644 index 000000000000..db275d3a95af --- /dev/null +++ b/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20240903.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 cmake + +COMMIT="d4f8fb543a892ba65bfc608511bf582c0425aa81" + +DESCRIPTION="Raspberry Pi userspace utilities" +HOMEPAGE="https://github.com/raspberrypi/utils" +SRC_URI="https://github.com/raspberrypi/utils/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/utils-${COMMIT}" +LICENSE="BSD" +SLOT="0" +KEYWORDS="arm arm64" + +DEPEND=" + sys-apps/dtc +" + +RDEPEND=" + ${DEPEND} + dev-lang/perl + !media-libs/raspberrypi-userland + !media-libs/raspberrypi-userland-bin +" + +PATCHES=( + "${FILESDIR}"/${PN}-werror.patch +) + +src_configure() { + local mycmakeargs=( -DBUILD_SHARED_LIBS=OFF ) + cmake_src_configure +} + +src_install() { + cmake_src_install + + local SRC + rm -r "${ED}"/usr/share/bash-completion/ || die + for SRC in */*-completion.bash; do + local DEST=${SRC%-completion.bash} + newbashcomp "${SRC}" "${DEST##*/}" + done +} diff --git a/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20260527.ebuild b/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20260527.ebuild new file mode 100644 index 000000000000..ea9ce83dda45 --- /dev/null +++ b/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20260527.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 cmake optfeature + +COMMIT="ab7d6bbf90af6f63898d3c2e45cd36da50b4f40b" + +DESCRIPTION="Raspberry Pi userspace utilities" +HOMEPAGE="https://github.com/raspberrypi/utils" +SRC_URI="https://github.com/raspberrypi/utils/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/utils-${COMMIT}" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~arm ~arm64" + +DEPEND=" + sys-apps/dtc +" + +RDEPEND=" + ${DEPEND} + dev-lang/perl + !media-libs/raspberrypi-userland + !media-libs/raspberrypi-userland-bin +" + +PATCHES=( + "${FILESDIR}"/${PN}-silence-kms-missing-message.patch + "${FILESDIR}"/${PN}-silence-sections-with-missing-commands.patch + "${FILESDIR}"/${PN}-use-emerge-for-package-versions.patch +) + +src_configure() { + local mycmakeargs=( -DBUILD_SHARED_LIBS=OFF -DENABLE_WERROR=OFF ) + cmake_src_configure +} + +src_install() { + cmake_src_install + + local SRC + rm -r "${ED}"/usr/share/bash-completion/ || die + for SRC in */*-completion.bash; do + local DEST=${SRC%-completion.bash} + newbashcomp "${SRC}" "${DEST##*/}" + done +} + +pkg_postinst() { + optfeature "Sound status in raspinfo" media-sound/alsa-utils + + optfeature "USB status in raspinfo" sys-apps/usbutils +} diff --git a/dev-embedded/rauc/Manifest b/dev-embedded/rauc/Manifest new file mode 100644 index 000000000000..fa10609ffa4c --- /dev/null +++ b/dev-embedded/rauc/Manifest @@ -0,0 +1 @@ +DIST rauc-1.15.2.tar.xz 990656 BLAKE2B c21a6349ebb0e806e70137dada383eff83b0056da0a0bdc47df256dbe8bf1a3c1d9da5687ffc4d9a0428596ec5f4ba7a854024bd3e988f6b9dd62d4fa2cb44a1 SHA512 8d62e667afa34541c57e751bf939277c791112d0aec9795d5a29bff25ea31a4291a4de17b9518bd4b8702fed07fa03ff21c09be2b960627dd5de92fa41fc8993 diff --git a/dev-embedded/rauc/files/rauc-1.15.2-tests.patch b/dev-embedded/rauc/files/rauc-1.15.2-tests.patch new file mode 100644 index 000000000000..4fabdf2a3783 --- /dev/null +++ b/dev-embedded/rauc/files/rauc-1.15.2-tests.patch @@ -0,0 +1,38 @@ +From cfeab43e8c1ebbe952bca9b71fb8400a9947d229 Mon Sep 17 00:00:00 2001 +From: Kurt Kanzenbach <kurt@kmk-computers.de> +Date: Sat, 15 Aug 2020 08:45:21 +0200 +Subject: [PATCH] tests: Disable failed tests + +The network and squashfs tests won't work within portage. Disable them. + +Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> +--- + test/meson.build | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/test/meson.build ++++ b/test/meson.build +@@ -6,12 +6,10 @@ tests = [ + 'artifacts', + 'boot_raw_fallback', + 'bootchooser', +- 'bundle', + 'checksum', + 'config_file', + 'context', + 'dm', +- 'event_log', + 'hash_index', + 'install', + 'manifest', +@@ -25,10 +23,6 @@ tests = [ + 'utils', + ] + +-if get_option('network') +- tests += 'network' +-endif +- + if get_option('streaming') + tests += 'nbd' + endif diff --git a/dev-embedded/rauc/metadata.xml b/dev-embedded/rauc/metadata.xml new file mode 100644 index 000000000000..7249bdbfb53f --- /dev/null +++ b/dev-embedded/rauc/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>kurt@kmk-computers.de</email> + <name>Kurt Kanzenbach</name> + </maintainer> + <longdescription lang="en"> + RAUC is a lightweight update client that runs on your Embedded Linux device + and reliably controls the procedure of updating your device with a new + firmware revision. RAUC is also the tool on your host system that lets you + create, inspect and modify update artifacts for your device. + </longdescription> + <use> + <flag name="gpt"> + Add GPT support + </flag> + <flag name="json"> + Add JSON support + </flag> + <flag name="network"> + Add network update support + </flag> + <flag name="service"> + Add dbus service + </flag> + </use> + <upstream> + <remote-id type="github">rauc/rauc</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/rauc/rauc-1.15.2.ebuild b/dev-embedded/rauc/rauc-1.15.2.ebuild new file mode 100644 index 000000000000..9654c6fdad10 --- /dev/null +++ b/dev-embedded/rauc/rauc-1.15.2.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DOCS_BUILDER="sphinx" +DOCS_DIR="${S}/docs" + +inherit meson python-any-r1 docs + +DESCRIPTION="Lightweight update client that runs on your Embedded Linux device" +HOMEPAGE="https://rauc.io/" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="gpt json network service test" + +RESTRICT="!test? ( test )" + +BDEPEND=" + ${PYTHON_DEPS} + dev-util/gdbus-codegen + virtual/pkgconfig + doc? ( + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}] + ') + ) + test? ( + dev-libs/opensc + net-misc/casync + sys-fs/mtd-utils + sys-fs/squashfs-tools + sys-libs/libfaketime + ) +" +RDEPEND=" + dev-libs/glib:2 + dev-libs/libnl:3= + dev-libs/openssl:0= + json? ( dev-libs/json-glib ) + network? ( net-misc/curl ) + service? ( sys-apps/dbus ) +" +DEPEND=" + ${RDEPEND} +" + +PATCHES=( "${FILESDIR}/${P}-tests.patch" ) + +src_configure() { + local emesonargs=( + $(meson_feature gpt) + $(meson_feature json) + $(meson_use network) + $(meson_use network streaming) + $(meson_use service) + ) + meson_src_configure +} + +src_compile() { + meson_src_compile + docs_compile +} diff --git a/dev-embedded/rpi-eeprom/Manifest b/dev-embedded/rpi-eeprom/Manifest new file mode 100644 index 000000000000..ec911b7b1ee1 --- /dev/null +++ b/dev-embedded/rpi-eeprom/Manifest @@ -0,0 +1,12 @@ +DIST rpi-eeprom_28.10-1.debian.tar.xz 16156 BLAKE2B bd7ca73976b4cc93b9ababcc2b23f29f72f5934d47cbe88a2e31be9fe876217d28483a94d1ab810f881cf5a0aa4d2163260c08b4f568b6049c45bdf54f00892f SHA512 9c56b72409c958dbed2db6642346855a4046a15d60541c5b81cea1c2db75be7cf930c8533a1dfed6e7f522abbb26146373d10ac748d8b9b13268894e0ff1ace9 +DIST rpi-eeprom_28.10.orig.tar.gz 98480332 BLAKE2B e8189914dd7b75bd366c1f86c4e25bddc78fc845322c3bb9af43abcd6fd72d4589f188e1d826565cd13e15db8fa13c38b408fed2764736e9dd8dc73e26ced870 SHA512 9d38e9b32e5f9e54f66f73f82014b7e6576bda0421bbd1ba9cbfb4c2625dd3b7d5a7aa4a5b70e7ee79cfa66075741f4e7ef12c19171691437d2baa729b3ae30d +DIST rpi-eeprom_28.12-1.debian.tar.xz 16288 BLAKE2B ec14352a196ef67dd87f6f9f3df79b671761225e2a630875eb1c3ac7481ff7b69a9ccf6d3a5736ed88c842ff18168005c2e9f9b22443b0a2ae9a3061e3d3f5ed SHA512 bba42c449a2d6dda91a709885fe0d791ab3acd69751dcbbc30c84059bf19d2e129a44fe91e446223d0b54f13e265c7f96292fdea6d58f323e81d0c80f83eee79 +DIST rpi-eeprom_28.12.orig.tar.gz 99184104 BLAKE2B f80d413bae31525882942169c5cbef56a0b039cf34b4179f7b6bb799a419dd4c349b1648a41aff5d8035b667cc8f49e33463e8b3ca5132902a597ab2e91640bd SHA512 5315849da32ea9f02897c8a8c187f07aa11ee36b43729d1caef7781799edc21ed4d3f8684695a2a8ed9066aa9a4d1351064a69e362802ad3aef69d6ca4af5856 +DIST rpi-eeprom_28.14-1.debian.tar.xz 16516 BLAKE2B 90009c58f4eb65a8c48e9acd77829e3eb3623745bb14ce1b24e5073b6dac0e2850681395e2e9b80eaa198e6c40528281b3cc2b081abbb80a7fd7381ab8102051 SHA512 e0c8d5c87e5937eeca3c5ccf06d4dc86960ba6246f9049d5f2707d11d439d6ffac3b35270b8fac8e27a8350d97ac5236020d6ecb20142a96164f4dbd990aa091 +DIST rpi-eeprom_28.14.orig.tar.gz 101992209 BLAKE2B 70264fec2a73f6545db4971c80e70593c6c9d0cce108175b3ee53c0da4a8efcf4319e5e7635af502fa8185e31389fb9530b39f9bf1164db0e567cc8b9e0ecd12 SHA512 d3df1a4c7781c1d7535822f86edae994447186c60dc9d2177bb8bdf1227375bc2c548672260bb7656610f644fe48b97e0939b1c454a8cf1b33864ac5b159ae37 +DIST rpi-eeprom_28.15-1.debian.tar.xz 16548 BLAKE2B 59497243c063c4a756134c063c6843f830f78a4bd7f30174fbe8765956be1c5ccd478b8332887639d5d905a1cc15790980396080fbcd28c294a8dd3d87bfa67a SHA512 06b2cb09d04078ab2e3a04164692d4b59b598748516ff8168689a5251202d0c2493c466938f106512d531f44fb44e2b048009f1f2e23dd67336c7aaf053014fb +DIST rpi-eeprom_28.15.orig.tar.gz 102845622 BLAKE2B 7eef9550b9679ae2c5ec46ddd2992beb740976c75ad8940a8aa98ece8e22ed1a4caf078768703b2b86250dfd87a6018b474b56d43834c06619ffa7f846da635a SHA512 6e3028ac1c85303fbcf9cac85b8ffbb67be087843055d09ad3d3183b0250fc06c2ae4bb6e8679a7961dc4fd5eca7378f8d800cdda32a9e985a1feab3ba56f3da +DIST rpi-eeprom_28.17-1.debian.tar.xz 16696 BLAKE2B 02328c7d16d3a834f28481223bbb4a99c3c3cd6024748d7900f6b26ca4bc1309aef4cfaa13bf45d4aeb43418ca589a3080a2e57c32c3754ef8bd3a57f8cc3555 SHA512 4960b16321f812c83270f62278122d0764a2394559aa599bfa5213384efed0490070bf4112f56bd43f1c979b0d48966bf9b5c2f3629d0a045e79b6316712e461 +DIST rpi-eeprom_28.17.orig.tar.gz 104825685 BLAKE2B e54da4609192ae4fe6077973e6630fa069df52e8d01d2d78ca6c5ceed12cd0e02bcdfcc991cf563a0b740cb9be4d3f689fdf10c376dcf785a9187196d6e282ff SHA512 30555ac0e2c040464b27be44bfa7450995f6bdc503100a24d235e5373a710d8206a068a720be7ecbf40d533eb076bd68e4d9b65591766938ea10578c6814da02 +DIST rpi-eeprom_28.24-1.debian.tar.xz 17044 BLAKE2B e25e3e97ff5bc64097c17dfe2c4a4d72f05bf4df0abbc2460594dc060dad4ee0685593f33fb2c2cd6329d3318cfc4d6fa1029b376d1176bb4b550221853cf53d SHA512 4d699607b8679b802a770c872960af63d9e2a52876970b4c8027ce9b29a7989acc328e3a014a73f09e5bac8cbc4a2932a33a5bb52a806cdfb9be5f5d8c98d4e0 +DIST rpi-eeprom_28.24.orig.tar.gz 108102997 BLAKE2B 94639b4a6c563606eb14221d152712f7668f511d024053e419c74227fe6e7046b5621ce27ff3e02211f1fb653977b4e311359f7f70b708df63367f25c0261423 SHA512 db9cb2866d67e64ddd9b1c7277ad5f29883f94849a76d7a44c8fe61f3f495a9ec49a50e90874f63d98901ef3935135bf9f619ca1f0eef7e7698e5b5d8691e057 diff --git a/dev-embedded/rpi-eeprom/files/init.d_rpi-eeprom-update-1 b/dev-embedded/rpi-eeprom/files/init.d_rpi-eeprom-update-1 new file mode 100644 index 000000000000..c7570c344f39 --- /dev/null +++ b/dev-embedded/rpi-eeprom/files/init.d_rpi-eeprom-update-1 @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Set configuration in /etc/conf.d/rpi-eeprom-update + +description="Raspberry Pi 4 bootloader and VL805 USB controller updater" +command="/usr/sbin/rpi-eeprom-update" +command_args="-a" + +depend() { + need localmount +} + +stop() { + # Nothing to stop + return 0; +} diff --git a/dev-embedded/rpi-eeprom/metadata.xml b/dev-embedded/rpi-eeprom/metadata.xml new file mode 100644 index 000000000000..5522282ab0e5 --- /dev/null +++ b/dev-embedded/rpi-eeprom/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ceamac@gentoo.org</email> + <name>Viorel Munteanu</name> + </maintainer> + <upstream> + <remote-id type="github">raspberrypi/rpi-eeprom</remote-id> + </upstream> + <use> + <flag name="pi4">Install firmware files for the Raspberry Pi 4</flag> + <flag name="pi5">Install firmware files for the Raspberry Pi 5</flag> + </use> +</pkgmetadata> diff --git a/dev-embedded/rpi-eeprom/rpi-eeprom-28.10_p1-r1.ebuild b/dev-embedded/rpi-eeprom/rpi-eeprom-28.10_p1-r1.ebuild new file mode 100644 index 000000000000..80c7567d8641 --- /dev/null +++ b/dev-embedded/rpi-eeprom/rpi-eeprom-28.10_p1-r1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit python-r1 systemd + +MY_P="${PN}-$(ver_cut 1-2)" +MY_BASE_URL="https://archive.raspberrypi.org/debian/pool/main/r/${PN}/${PN}_$(ver_cut 1-2)" +DESCRIPTION="Updater for Raspberry Pi 4/5 bootloader and the VL805 USB controller" +HOMEPAGE="https://github.com/raspberrypi/rpi-eeprom/" +SRC_URI="${MY_BASE_URL}-$(ver_cut 4).debian.tar.xz + ${MY_BASE_URL}.orig.tar.gz" +S="${WORKDIR}" + +LICENSE="BSD rpi-eeprom" +SLOT="0" +KEYWORDS="-* arm arm64" +IUSE="pi4 pi5" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ^^ ( pi4 pi5 ) +" + +BDEPEND="sys-apps/help2man" +DEPEND="${PYTHON_DEPS}" +RDEPEND="${PYTHON_DEPS} + dev-embedded/raspberrypi-utils + sys-apps/flashrom + sys-apps/pciutils" + +src_prepare() { + default + sed -i \ + -e 's:/etc/default/rpi-eeprom-update:/etc/conf.d/rpi-eeprom-update:' \ + "${MY_P}/rpi-eeprom-update" || die "Failed sed on rpi-eeprom-update" + sed -i \ + -e 's:/usr/bin/rpi-eeprom-update:/usr/sbin/rpi-eeprom-update:' \ + "debian/rpi-eeprom.rpi-eeprom-update.service" || die "Failed sed on rpi-eeprom.rpi-eeprom-update.service" + sed -i \ + -e 's:/usr/lib/firmware:/lib/firmware:' \ + "${MY_P}/rpi-eeprom-update-default" || die "Failed sed on rpi-eeprom-update-default" +} + +src_configure() { + use pi4 && export BROADCOM=2711 + use pi5 && export BROADCOM=2712 +} + +src_install() { + pushd "${MY_P}" 1>/dev/null || die "Cannot change into directory ${MY_P}" + + python_scriptinto /usr/sbin + python_foreach_impl python_newscript rpi-eeprom-config rpi-eeprom-config + + dosbin rpi-eeprom-update rpi-eeprom-digest + keepdir /var/lib/raspberrypi/bootloader/backup + + for dir in default latest critical stable beta; do + insinto /lib/firmware/raspberrypi/bootloader + doins -r firmware-$BROADCOM/${dir} + done + + dodoc firmware-$BROADCOM/release-notes.md + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Bootloader EEPROM configuration tool for the Raspberry Pi 4B" \ + --output=rpi-eeprom-config.1 ./rpi-eeprom-config || die "Failed to create manpage for rpi-eeprom-config" + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Checks whether the Raspberry Pi bootloader EEPROM is \ + up-to-date and updates the EEPROM" \ + --output=rpi-eeprom-update.1 ./rpi-eeprom-update || die "Failed to create manpage for rpi-eeprom-update" + + doman rpi-eeprom-update.1 rpi-eeprom-config.1 + + newconfd rpi-eeprom-update-default rpi-eeprom-update + + popd 1>/dev/null || die + + pushd debian 1>/dev/null || die "Cannot change into directory debian" + + systemd_newunit rpi-eeprom.rpi-eeprom-update.service rpi-eeprom-update.service + newdoc changelog changelog.Debian + + popd 1>/dev/null || die + + newinitd "${FILESDIR}/init.d_rpi-eeprom-update-1" "rpi-eeprom-update" +} + +pkg_postinst() { + elog 'To have rpi-eeprom-update run at each startup, enable and start either' + elog '/etc/init.d/rpi-eeprom-update (for openrc users)' + elog 'or' + elog 'rpi-eeprom-update.service (for systemd users)' + elog '/etc/conf.d/rpi-eeprom-update contains the configuration.' + elog 'FIRMWARE_RELEASE_STATUS="critical|stable|beta" determines' + elog 'which release track you get. "critical" is recommended and the default.' +} diff --git a/dev-embedded/rpi-eeprom/rpi-eeprom-28.12_p1.ebuild b/dev-embedded/rpi-eeprom/rpi-eeprom-28.12_p1.ebuild new file mode 100644 index 000000000000..80c7567d8641 --- /dev/null +++ b/dev-embedded/rpi-eeprom/rpi-eeprom-28.12_p1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit python-r1 systemd + +MY_P="${PN}-$(ver_cut 1-2)" +MY_BASE_URL="https://archive.raspberrypi.org/debian/pool/main/r/${PN}/${PN}_$(ver_cut 1-2)" +DESCRIPTION="Updater for Raspberry Pi 4/5 bootloader and the VL805 USB controller" +HOMEPAGE="https://github.com/raspberrypi/rpi-eeprom/" +SRC_URI="${MY_BASE_URL}-$(ver_cut 4).debian.tar.xz + ${MY_BASE_URL}.orig.tar.gz" +S="${WORKDIR}" + +LICENSE="BSD rpi-eeprom" +SLOT="0" +KEYWORDS="-* arm arm64" +IUSE="pi4 pi5" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ^^ ( pi4 pi5 ) +" + +BDEPEND="sys-apps/help2man" +DEPEND="${PYTHON_DEPS}" +RDEPEND="${PYTHON_DEPS} + dev-embedded/raspberrypi-utils + sys-apps/flashrom + sys-apps/pciutils" + +src_prepare() { + default + sed -i \ + -e 's:/etc/default/rpi-eeprom-update:/etc/conf.d/rpi-eeprom-update:' \ + "${MY_P}/rpi-eeprom-update" || die "Failed sed on rpi-eeprom-update" + sed -i \ + -e 's:/usr/bin/rpi-eeprom-update:/usr/sbin/rpi-eeprom-update:' \ + "debian/rpi-eeprom.rpi-eeprom-update.service" || die "Failed sed on rpi-eeprom.rpi-eeprom-update.service" + sed -i \ + -e 's:/usr/lib/firmware:/lib/firmware:' \ + "${MY_P}/rpi-eeprom-update-default" || die "Failed sed on rpi-eeprom-update-default" +} + +src_configure() { + use pi4 && export BROADCOM=2711 + use pi5 && export BROADCOM=2712 +} + +src_install() { + pushd "${MY_P}" 1>/dev/null || die "Cannot change into directory ${MY_P}" + + python_scriptinto /usr/sbin + python_foreach_impl python_newscript rpi-eeprom-config rpi-eeprom-config + + dosbin rpi-eeprom-update rpi-eeprom-digest + keepdir /var/lib/raspberrypi/bootloader/backup + + for dir in default latest critical stable beta; do + insinto /lib/firmware/raspberrypi/bootloader + doins -r firmware-$BROADCOM/${dir} + done + + dodoc firmware-$BROADCOM/release-notes.md + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Bootloader EEPROM configuration tool for the Raspberry Pi 4B" \ + --output=rpi-eeprom-config.1 ./rpi-eeprom-config || die "Failed to create manpage for rpi-eeprom-config" + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Checks whether the Raspberry Pi bootloader EEPROM is \ + up-to-date and updates the EEPROM" \ + --output=rpi-eeprom-update.1 ./rpi-eeprom-update || die "Failed to create manpage for rpi-eeprom-update" + + doman rpi-eeprom-update.1 rpi-eeprom-config.1 + + newconfd rpi-eeprom-update-default rpi-eeprom-update + + popd 1>/dev/null || die + + pushd debian 1>/dev/null || die "Cannot change into directory debian" + + systemd_newunit rpi-eeprom.rpi-eeprom-update.service rpi-eeprom-update.service + newdoc changelog changelog.Debian + + popd 1>/dev/null || die + + newinitd "${FILESDIR}/init.d_rpi-eeprom-update-1" "rpi-eeprom-update" +} + +pkg_postinst() { + elog 'To have rpi-eeprom-update run at each startup, enable and start either' + elog '/etc/init.d/rpi-eeprom-update (for openrc users)' + elog 'or' + elog 'rpi-eeprom-update.service (for systemd users)' + elog '/etc/conf.d/rpi-eeprom-update contains the configuration.' + elog 'FIRMWARE_RELEASE_STATUS="critical|stable|beta" determines' + elog 'which release track you get. "critical" is recommended and the default.' +} diff --git a/dev-embedded/rpi-eeprom/rpi-eeprom-28.14_p1.ebuild b/dev-embedded/rpi-eeprom/rpi-eeprom-28.14_p1.ebuild new file mode 100644 index 000000000000..80c7567d8641 --- /dev/null +++ b/dev-embedded/rpi-eeprom/rpi-eeprom-28.14_p1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit python-r1 systemd + +MY_P="${PN}-$(ver_cut 1-2)" +MY_BASE_URL="https://archive.raspberrypi.org/debian/pool/main/r/${PN}/${PN}_$(ver_cut 1-2)" +DESCRIPTION="Updater for Raspberry Pi 4/5 bootloader and the VL805 USB controller" +HOMEPAGE="https://github.com/raspberrypi/rpi-eeprom/" +SRC_URI="${MY_BASE_URL}-$(ver_cut 4).debian.tar.xz + ${MY_BASE_URL}.orig.tar.gz" +S="${WORKDIR}" + +LICENSE="BSD rpi-eeprom" +SLOT="0" +KEYWORDS="-* arm arm64" +IUSE="pi4 pi5" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ^^ ( pi4 pi5 ) +" + +BDEPEND="sys-apps/help2man" +DEPEND="${PYTHON_DEPS}" +RDEPEND="${PYTHON_DEPS} + dev-embedded/raspberrypi-utils + sys-apps/flashrom + sys-apps/pciutils" + +src_prepare() { + default + sed -i \ + -e 's:/etc/default/rpi-eeprom-update:/etc/conf.d/rpi-eeprom-update:' \ + "${MY_P}/rpi-eeprom-update" || die "Failed sed on rpi-eeprom-update" + sed -i \ + -e 's:/usr/bin/rpi-eeprom-update:/usr/sbin/rpi-eeprom-update:' \ + "debian/rpi-eeprom.rpi-eeprom-update.service" || die "Failed sed on rpi-eeprom.rpi-eeprom-update.service" + sed -i \ + -e 's:/usr/lib/firmware:/lib/firmware:' \ + "${MY_P}/rpi-eeprom-update-default" || die "Failed sed on rpi-eeprom-update-default" +} + +src_configure() { + use pi4 && export BROADCOM=2711 + use pi5 && export BROADCOM=2712 +} + +src_install() { + pushd "${MY_P}" 1>/dev/null || die "Cannot change into directory ${MY_P}" + + python_scriptinto /usr/sbin + python_foreach_impl python_newscript rpi-eeprom-config rpi-eeprom-config + + dosbin rpi-eeprom-update rpi-eeprom-digest + keepdir /var/lib/raspberrypi/bootloader/backup + + for dir in default latest critical stable beta; do + insinto /lib/firmware/raspberrypi/bootloader + doins -r firmware-$BROADCOM/${dir} + done + + dodoc firmware-$BROADCOM/release-notes.md + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Bootloader EEPROM configuration tool for the Raspberry Pi 4B" \ + --output=rpi-eeprom-config.1 ./rpi-eeprom-config || die "Failed to create manpage for rpi-eeprom-config" + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Checks whether the Raspberry Pi bootloader EEPROM is \ + up-to-date and updates the EEPROM" \ + --output=rpi-eeprom-update.1 ./rpi-eeprom-update || die "Failed to create manpage for rpi-eeprom-update" + + doman rpi-eeprom-update.1 rpi-eeprom-config.1 + + newconfd rpi-eeprom-update-default rpi-eeprom-update + + popd 1>/dev/null || die + + pushd debian 1>/dev/null || die "Cannot change into directory debian" + + systemd_newunit rpi-eeprom.rpi-eeprom-update.service rpi-eeprom-update.service + newdoc changelog changelog.Debian + + popd 1>/dev/null || die + + newinitd "${FILESDIR}/init.d_rpi-eeprom-update-1" "rpi-eeprom-update" +} + +pkg_postinst() { + elog 'To have rpi-eeprom-update run at each startup, enable and start either' + elog '/etc/init.d/rpi-eeprom-update (for openrc users)' + elog 'or' + elog 'rpi-eeprom-update.service (for systemd users)' + elog '/etc/conf.d/rpi-eeprom-update contains the configuration.' + elog 'FIRMWARE_RELEASE_STATUS="critical|stable|beta" determines' + elog 'which release track you get. "critical" is recommended and the default.' +} diff --git a/dev-embedded/rpi-eeprom/rpi-eeprom-28.15_p1.ebuild b/dev-embedded/rpi-eeprom/rpi-eeprom-28.15_p1.ebuild new file mode 100644 index 000000000000..80c7567d8641 --- /dev/null +++ b/dev-embedded/rpi-eeprom/rpi-eeprom-28.15_p1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit python-r1 systemd + +MY_P="${PN}-$(ver_cut 1-2)" +MY_BASE_URL="https://archive.raspberrypi.org/debian/pool/main/r/${PN}/${PN}_$(ver_cut 1-2)" +DESCRIPTION="Updater for Raspberry Pi 4/5 bootloader and the VL805 USB controller" +HOMEPAGE="https://github.com/raspberrypi/rpi-eeprom/" +SRC_URI="${MY_BASE_URL}-$(ver_cut 4).debian.tar.xz + ${MY_BASE_URL}.orig.tar.gz" +S="${WORKDIR}" + +LICENSE="BSD rpi-eeprom" +SLOT="0" +KEYWORDS="-* arm arm64" +IUSE="pi4 pi5" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ^^ ( pi4 pi5 ) +" + +BDEPEND="sys-apps/help2man" +DEPEND="${PYTHON_DEPS}" +RDEPEND="${PYTHON_DEPS} + dev-embedded/raspberrypi-utils + sys-apps/flashrom + sys-apps/pciutils" + +src_prepare() { + default + sed -i \ + -e 's:/etc/default/rpi-eeprom-update:/etc/conf.d/rpi-eeprom-update:' \ + "${MY_P}/rpi-eeprom-update" || die "Failed sed on rpi-eeprom-update" + sed -i \ + -e 's:/usr/bin/rpi-eeprom-update:/usr/sbin/rpi-eeprom-update:' \ + "debian/rpi-eeprom.rpi-eeprom-update.service" || die "Failed sed on rpi-eeprom.rpi-eeprom-update.service" + sed -i \ + -e 's:/usr/lib/firmware:/lib/firmware:' \ + "${MY_P}/rpi-eeprom-update-default" || die "Failed sed on rpi-eeprom-update-default" +} + +src_configure() { + use pi4 && export BROADCOM=2711 + use pi5 && export BROADCOM=2712 +} + +src_install() { + pushd "${MY_P}" 1>/dev/null || die "Cannot change into directory ${MY_P}" + + python_scriptinto /usr/sbin + python_foreach_impl python_newscript rpi-eeprom-config rpi-eeprom-config + + dosbin rpi-eeprom-update rpi-eeprom-digest + keepdir /var/lib/raspberrypi/bootloader/backup + + for dir in default latest critical stable beta; do + insinto /lib/firmware/raspberrypi/bootloader + doins -r firmware-$BROADCOM/${dir} + done + + dodoc firmware-$BROADCOM/release-notes.md + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Bootloader EEPROM configuration tool for the Raspberry Pi 4B" \ + --output=rpi-eeprom-config.1 ./rpi-eeprom-config || die "Failed to create manpage for rpi-eeprom-config" + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Checks whether the Raspberry Pi bootloader EEPROM is \ + up-to-date and updates the EEPROM" \ + --output=rpi-eeprom-update.1 ./rpi-eeprom-update || die "Failed to create manpage for rpi-eeprom-update" + + doman rpi-eeprom-update.1 rpi-eeprom-config.1 + + newconfd rpi-eeprom-update-default rpi-eeprom-update + + popd 1>/dev/null || die + + pushd debian 1>/dev/null || die "Cannot change into directory debian" + + systemd_newunit rpi-eeprom.rpi-eeprom-update.service rpi-eeprom-update.service + newdoc changelog changelog.Debian + + popd 1>/dev/null || die + + newinitd "${FILESDIR}/init.d_rpi-eeprom-update-1" "rpi-eeprom-update" +} + +pkg_postinst() { + elog 'To have rpi-eeprom-update run at each startup, enable and start either' + elog '/etc/init.d/rpi-eeprom-update (for openrc users)' + elog 'or' + elog 'rpi-eeprom-update.service (for systemd users)' + elog '/etc/conf.d/rpi-eeprom-update contains the configuration.' + elog 'FIRMWARE_RELEASE_STATUS="critical|stable|beta" determines' + elog 'which release track you get. "critical" is recommended and the default.' +} diff --git a/dev-embedded/rpi-eeprom/rpi-eeprom-28.17_p1.ebuild b/dev-embedded/rpi-eeprom/rpi-eeprom-28.17_p1.ebuild new file mode 100644 index 000000000000..2dc8a1f802e8 --- /dev/null +++ b/dev-embedded/rpi-eeprom/rpi-eeprom-28.17_p1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit python-r1 systemd + +MY_P="${PN}-$(ver_cut 1-2)" +MY_BASE_URL="https://archive.raspberrypi.org/debian/pool/main/r/${PN}/${PN}_$(ver_cut 1-2)" +DESCRIPTION="Updater for Raspberry Pi 4/5 bootloader and the VL805 USB controller" +HOMEPAGE="https://github.com/raspberrypi/rpi-eeprom/" +SRC_URI="${MY_BASE_URL}-$(ver_cut 4).debian.tar.xz + ${MY_BASE_URL}.orig.tar.gz" +S="${WORKDIR}" + +LICENSE="BSD rpi-eeprom" +SLOT="0" +KEYWORDS="-* ~arm ~arm64" +IUSE="pi4 pi5" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ^^ ( pi4 pi5 ) +" + +BDEPEND="sys-apps/help2man" +DEPEND="${PYTHON_DEPS}" +RDEPEND="${PYTHON_DEPS} + dev-embedded/raspberrypi-utils + sys-apps/flashrom + sys-apps/pciutils" + +src_prepare() { + default + sed -i \ + -e 's:/etc/default/rpi-eeprom-update:/etc/conf.d/rpi-eeprom-update:' \ + "${MY_P}/rpi-eeprom-update" || die "Failed sed on rpi-eeprom-update" + sed -i \ + -e 's:/usr/bin/rpi-eeprom-update:/usr/sbin/rpi-eeprom-update:' \ + "debian/rpi-eeprom.rpi-eeprom-update.service" || die "Failed sed on rpi-eeprom.rpi-eeprom-update.service" + sed -i \ + -e 's:/usr/lib/firmware:/lib/firmware:' \ + "${MY_P}/rpi-eeprom-update-default" || die "Failed sed on rpi-eeprom-update-default" +} + +src_configure() { + use pi4 && export BROADCOM=2711 + use pi5 && export BROADCOM=2712 +} + +src_install() { + pushd "${MY_P}" 1>/dev/null || die "Cannot change into directory ${MY_P}" + + python_scriptinto /usr/sbin + python_foreach_impl python_newscript rpi-eeprom-config rpi-eeprom-config + + dosbin rpi-eeprom-update rpi-eeprom-digest + keepdir /var/lib/raspberrypi/bootloader/backup + + for dir in default latest critical stable beta; do + insinto /lib/firmware/raspberrypi/bootloader + doins -r firmware-$BROADCOM/${dir} + done + + dodoc firmware-$BROADCOM/release-notes.md + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Bootloader EEPROM configuration tool for the Raspberry Pi 4B" \ + --output=rpi-eeprom-config.1 ./rpi-eeprom-config || die "Failed to create manpage for rpi-eeprom-config" + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Checks whether the Raspberry Pi bootloader EEPROM is \ + up-to-date and updates the EEPROM" \ + --output=rpi-eeprom-update.1 ./rpi-eeprom-update || die "Failed to create manpage for rpi-eeprom-update" + + doman rpi-eeprom-update.1 rpi-eeprom-config.1 + + newconfd rpi-eeprom-update-default rpi-eeprom-update + + popd 1>/dev/null || die + + pushd debian 1>/dev/null || die "Cannot change into directory debian" + + systemd_newunit rpi-eeprom.rpi-eeprom-update.service rpi-eeprom-update.service + newdoc changelog changelog.Debian + + popd 1>/dev/null || die + + newinitd "${FILESDIR}/init.d_rpi-eeprom-update-1" "rpi-eeprom-update" +} + +pkg_postinst() { + elog 'To have rpi-eeprom-update run at each startup, enable and start either' + elog '/etc/init.d/rpi-eeprom-update (for openrc users)' + elog 'or' + elog 'rpi-eeprom-update.service (for systemd users)' + elog '/etc/conf.d/rpi-eeprom-update contains the configuration.' + elog 'FIRMWARE_RELEASE_STATUS="critical|stable|beta" determines' + elog 'which release track you get. "critical" is recommended and the default.' +} diff --git a/dev-embedded/rpi-eeprom/rpi-eeprom-28.24_p1.ebuild b/dev-embedded/rpi-eeprom/rpi-eeprom-28.24_p1.ebuild new file mode 100644 index 000000000000..2dc8a1f802e8 --- /dev/null +++ b/dev-embedded/rpi-eeprom/rpi-eeprom-28.24_p1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit python-r1 systemd + +MY_P="${PN}-$(ver_cut 1-2)" +MY_BASE_URL="https://archive.raspberrypi.org/debian/pool/main/r/${PN}/${PN}_$(ver_cut 1-2)" +DESCRIPTION="Updater for Raspberry Pi 4/5 bootloader and the VL805 USB controller" +HOMEPAGE="https://github.com/raspberrypi/rpi-eeprom/" +SRC_URI="${MY_BASE_URL}-$(ver_cut 4).debian.tar.xz + ${MY_BASE_URL}.orig.tar.gz" +S="${WORKDIR}" + +LICENSE="BSD rpi-eeprom" +SLOT="0" +KEYWORDS="-* ~arm ~arm64" +IUSE="pi4 pi5" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ^^ ( pi4 pi5 ) +" + +BDEPEND="sys-apps/help2man" +DEPEND="${PYTHON_DEPS}" +RDEPEND="${PYTHON_DEPS} + dev-embedded/raspberrypi-utils + sys-apps/flashrom + sys-apps/pciutils" + +src_prepare() { + default + sed -i \ + -e 's:/etc/default/rpi-eeprom-update:/etc/conf.d/rpi-eeprom-update:' \ + "${MY_P}/rpi-eeprom-update" || die "Failed sed on rpi-eeprom-update" + sed -i \ + -e 's:/usr/bin/rpi-eeprom-update:/usr/sbin/rpi-eeprom-update:' \ + "debian/rpi-eeprom.rpi-eeprom-update.service" || die "Failed sed on rpi-eeprom.rpi-eeprom-update.service" + sed -i \ + -e 's:/usr/lib/firmware:/lib/firmware:' \ + "${MY_P}/rpi-eeprom-update-default" || die "Failed sed on rpi-eeprom-update-default" +} + +src_configure() { + use pi4 && export BROADCOM=2711 + use pi5 && export BROADCOM=2712 +} + +src_install() { + pushd "${MY_P}" 1>/dev/null || die "Cannot change into directory ${MY_P}" + + python_scriptinto /usr/sbin + python_foreach_impl python_newscript rpi-eeprom-config rpi-eeprom-config + + dosbin rpi-eeprom-update rpi-eeprom-digest + keepdir /var/lib/raspberrypi/bootloader/backup + + for dir in default latest critical stable beta; do + insinto /lib/firmware/raspberrypi/bootloader + doins -r firmware-$BROADCOM/${dir} + done + + dodoc firmware-$BROADCOM/release-notes.md + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Bootloader EEPROM configuration tool for the Raspberry Pi 4B" \ + --output=rpi-eeprom-config.1 ./rpi-eeprom-config || die "Failed to create manpage for rpi-eeprom-config" + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Checks whether the Raspberry Pi bootloader EEPROM is \ + up-to-date and updates the EEPROM" \ + --output=rpi-eeprom-update.1 ./rpi-eeprom-update || die "Failed to create manpage for rpi-eeprom-update" + + doman rpi-eeprom-update.1 rpi-eeprom-config.1 + + newconfd rpi-eeprom-update-default rpi-eeprom-update + + popd 1>/dev/null || die + + pushd debian 1>/dev/null || die "Cannot change into directory debian" + + systemd_newunit rpi-eeprom.rpi-eeprom-update.service rpi-eeprom-update.service + newdoc changelog changelog.Debian + + popd 1>/dev/null || die + + newinitd "${FILESDIR}/init.d_rpi-eeprom-update-1" "rpi-eeprom-update" +} + +pkg_postinst() { + elog 'To have rpi-eeprom-update run at each startup, enable and start either' + elog '/etc/init.d/rpi-eeprom-update (for openrc users)' + elog 'or' + elog 'rpi-eeprom-update.service (for systemd users)' + elog '/etc/conf.d/rpi-eeprom-update contains the configuration.' + elog 'FIRMWARE_RELEASE_STATUS="critical|stable|beta" determines' + elog 'which release track you get. "critical" is recommended and the default.' +} diff --git a/dev-embedded/rpi-openocd/metadata.xml b/dev-embedded/rpi-openocd/metadata.xml new file mode 100644 index 000000000000..838745ed0c72 --- /dev/null +++ b/dev-embedded/rpi-openocd/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ljn0099@hotmail.com</email> + <name>Manuel</name> + </maintainer> + <upstream> + <remote-id type="github">raspberrypi/openocd</remote-id> + </upstream> + <use> + <flag name="capstone">Support for ARM disassembly via dev-libs/capstone</flag> + <flag name="cmsis-dap">Support for CMSIS-DAP adapter driver via dev-libs/hidapi</flag> + <flag name="dummy">Build the dummy port driver</flag> + <flag name="ftdi">Support for USB FTDI chips via dev-embedded/libftdi</flag> + <flag name="gpiod">Support for linuxgpiod driver via dev-libs/libgpiod</flag> + <flag name="jlink">Support for J-Link driver via dev-embedded/libjaylink</flag> + <flag name="parport">Support for parport JTAG devices</flag> + <flag name="verbose-io">Verbose IO and comm JTAG and USB messages</flag> + <flag name="usb">Support for the USB-based drivers</flag> + </use> +</pkgmetadata> diff --git a/dev-embedded/rpi-openocd/rpi-openocd-9999.ebuild b/dev-embedded/rpi-openocd/rpi-openocd-9999.ebuild new file mode 100644 index 000000000000..d28770dfc0ec --- /dev/null +++ b/dev-embedded/rpi-openocd/rpi-openocd-9999.ebuild @@ -0,0 +1,109 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools git-r3 udev + +DESCRIPTION="OpenOCD - Open On-Chip Debugger (Raspberry Pi Fork)" +HOMEPAGE="https://github.com/raspberrypi/openocd" + +EGIT_REPO_URI="https://github.com/raspberrypi/openocd.git" +EGIT_BRANCH="rpi-common" +EGIT_SUBMODULES=() + +LICENSE="GPL-2+" +SLOT="0" +IUSE="capstone +cmsis-dap dummy +ftdi gpiod +jlink parport +usb verbose-io" +RESTRICT="strip" + +DEPEND=" + acct-group/plugdev + >=dev-lang/jimtcl-0.79 + capstone? ( dev-libs/capstone ) + cmsis-dap? ( dev-libs/hidapi ) + ftdi? ( dev-embedded/libftdi:= ) + gpiod? ( dev-libs/libgpiod:0/2 ) + jlink? ( >=dev-embedded/libjaylink-0.2.0 ) + usb? ( virtual/libusb:1 ) +" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + AT_NO_RECURSIVE=yes eautoreconf +} + +src_configure() { + local myconf=( + --program-prefix=rpi- + --datadir=/usr/share/openocd-rpi + --infodir=/usr/share/info/rpi-openocd + --docdir=/usr/share/doc/rpi-openocd + --enable-amtjtagaccel + --enable-am335xgpio + --enable-arm-jtag-ew + --enable-at91rm9200 + --enable-bcm2835gpio + --enable-buspirate + --enable-ep93xx + --enable-gw16012 + --enable-jtag_dpi + --enable-sysfsgpio + --enable-vdebug + --disable-internal-jimtcl + --disable-internal-libjaylink + --disable-parport-giveio + --disable-werror + $(use_with capstone) + $(use_enable cmsis-dap) + $(use_enable dummy) + $(use_enable ftdi openjtag) + $(use_enable ftdi presto) + $(use_enable ftdi usb-blaster) + $(use_enable gpiod linuxgpiod) + $(use_enable jlink) + $(use_enable parport) + $(use_enable parport parport_ppdev) + $(use_enable usb aice) + $(use_enable usb armjtagew) + $(use_enable usb ftdi) + $(use_enable usb osbdm) + $(use_enable usb opendous) + $(use_enable usb rlink) + $(use_enable usb stlink) + $(use_enable usb ti-icdi) + $(use_enable usb usbprog) + $(use_enable usb usb-blaster-2) + $(use_enable usb ulink) + $(use_enable usb vsllink) + $(use_enable verbose-io verbose-jtag-io) + $(use_enable verbose-io verbose-usb-io) + $(use_enable verbose-io verbose_usb_comms) + ) + + econf "${myconf[@]}" +} + +src_install() { + default + dostrip /usr/bin + + mv "${ED}/usr/share/openocd-rpi/openocd/contrib/60-openocd.rules" \ + "${ED}/usr/share/openocd-rpi/openocd/contrib/60-openocd-rpi.rules" || die + + udev_dorules "${ED}"/usr/share/openocd-rpi/openocd/contrib/*.rules +} + +pkg_postinst() { + udev_reload + + elog "To access openocd devices as user you must be in the plugdev group" + elog "Installed as rpi-openocd" +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-embedded/sdcc/Manifest b/dev-embedded/sdcc/Manifest new file mode 100644 index 000000000000..5a7ad7765591 --- /dev/null +++ b/dev-embedded/sdcc/Manifest @@ -0,0 +1,6 @@ +DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 +DIST binutils-2.45.1.tar.xz 27962312 BLAKE2B 1ccab38659ec47f9100b61322627345fe79ebd04ed0b1e872c988edded4d292d7c9ac33d9f6ea47bf265ec823dfba60da0e84374900c15ec89e3aa9280ac020c SHA512 ea030419eba387579ab717be7e3223fc99e93b586860b06003c12489f93441640d4082736f76aa5e98233db4f46e232f536a45e471486de1f5b64e1b827c167e +DIST sdcc-doc-4.3.0.tar.bz2 1271916 BLAKE2B a8c8018990ff2ae5504253f38a9de045b8a5227a60d76604394c286cb55d11b24f3ab97ed0a11d434c0b1ccb7e5340c33872c5ff5e677130e395b396a389f532 SHA512 088dce843c9e06380a8058b5253051e2a2442655be38435f15ed6754291e75d3f6e2b1a416e4f90dd865b2d89a9e1c59a2b9ee1422096132f49f038c527bcd19 +DIST sdcc-doc-4.5.0.tar.bz2 1404904 BLAKE2B 6d48c83b698e94e721c45dc6928bc718054b6bc019f1e62104929633fb16eaad77efefd2cd827ce36a19809508d6f53c67f8f1113c7df9ab3d0ea1006d4f4fef SHA512 0591352d6ed3dd39b71ac79135da0bb37782911c400b6802ee300bc9ffd397aba7558b5d53ae0e37a0408ba686dfb548be0e2fcf9ecebb550e0f5d254789bbd8 +DIST sdcc-src-4.3.0.tar.bz2 19931677 BLAKE2B 94fc7ade96801ea6c9eb89d32b99554d27ad3d926d2d5889e91334b11d4658ccc160606cd2b1c6f3bb21bd25ea3df1dca274f40553aa8a52a73ac07764b3eaad SHA512 dabe276a0d2872bee2cdc14433f31a1e94153f9dce5a11add916ede2e76bfacf763be8e6d8134dc3aefdae29e38d3a7354626755e81e0f6db0e60c1798476f21 +DIST sdcc-src-4.5.0.tar.bz2 20298103 BLAKE2B 8f7e79224e8c0692b8bc1377dbeb9c743f959ebb83bc444a215edf20f7d8c9faece7d0898ad130d141e81256cde00a74e1263f2fd9b65df0cca379524af2f93a SHA512 46edd0456d82ebeacc6e7b2ecf5038aac38ce161dc938662c438cca9c41f73b2004589788c18a0f1dd295033c9c35c202c052b463ec7bd8c605065d440d617f4 diff --git a/dev-embedded/sdcc/files/sdcc-4.2.0-link-tinfo.patch b/dev-embedded/sdcc/files/sdcc-4.2.0-link-tinfo.patch new file mode 100644 index 000000000000..a8f4ae7565bc --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.2.0-link-tinfo.patch @@ -0,0 +1,24 @@ +Link -ltinfo for ucsim + +/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-embedded/sdcc-4.2.0/temp/cc3R2ckl.ltrans0.ltrans.o: undefined reference to symbol 'nodelay' +/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libtinfo.so.6: error adding symbols: DSO missing from command line + +--- sdcc-4.2.0.orig/sim/ucsim/configure.ac ++++ sdcc-4.2.0/sim/ucsim/configure.ac +@@ -405,14 +405,14 @@ + if test $curses_ok != yes; then + AC_CHECK_LIB(curses,nl, + curses_ok="yes" +- CURSES_LIBS="${CURSES_LIBS} -lcurses", ++ CURSES_LIBS="${CURSES_LIBS} -lcurses -ltinfo", + curses_ok="no") + fi + + if test $curses_ok != yes; then + AC_CHECK_LIB(ncurses,nl, + curses_ok="yes" +- CURSES_LIBS="${CURSES_LIBS} -lncurses", ++ CURSES_LIBS="${CURSES_LIBS} -lncurses -ltinfo", + curses_ok="no") + fi + fi diff --git a/dev-embedded/sdcc/files/sdcc-4.3.0-autoreconf-libiberty.patch b/dev-embedded/sdcc/files/sdcc-4.3.0-autoreconf-libiberty.patch new file mode 100644 index 000000000000..7383f471ca48 --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.3.0-autoreconf-libiberty.patch @@ -0,0 +1,15 @@ +Most implicit function declarations left come from the included libiberty. +Add it to eautoreconf to regenerate its tests. +https://bugs.gentoo.org/898594 + +--- a/configure.ac ++++ b/configure.ac +@@ -874,7 +874,7 @@ + test $OPT_DISABLE_PACKIHX = 0 && AC_CONFIG_SUBDIRS(support/packihx) + test $OPT_DISABLE_UCSIM = 0 && AC_CONFIG_SUBDIRS(sim/ucsim) + test $OPT_DISABLE_SDCDB = 0 && AC_CONFIG_SUBDIRS(debugger/mcs51) +-test $OPT_DISABLE_SDBINUTILS = 0 && AC_CONFIG_SUBDIRS(support/sdbinutils) ++test $OPT_DISABLE_SDBINUTILS = 0 && AC_CONFIG_SUBDIRS(support/sdbinutils support/sdbinutils/libiberty) + AC_CONFIG_FILES([doc/Makefile]) + + ####test $OPT_DISABLE_AVR = 0 && AC_CONFIG_FILES([src/avr/Makefile]) diff --git a/dev-embedded/sdcc/files/sdcc-4.3.0-fix-binutils-dependency.patch b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-binutils-dependency.patch new file mode 100644 index 000000000000..cae5ebe473ed --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-binutils-dependency.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/917114 +https://sourceforge.net/p/sdcc/support-requests/193/ + +--- sdcc/Makefile.in ++++ sdcc/Makefile.in +@@ -98,7 +98,6 @@ + ifeq ($(OPT_DISABLE_SDBINUTILS), 0) + TARGETS += sdcc-sdbinutils + PKGS += $(SDCC_SDBINUTILS) +-SDBINUTILS_BINS = sdar$(EXEEXT) sdranlib$(EXEEXT) sdnm$(EXEEXT) sdobjcopy$(EXEEXT) + SDCC_BINUTILS = sdcc-sdbinutils + endif + +@@ -142,7 +141,7 @@ + + tini: checkconf sdcc-tini + +-sdcc-libs: ${SDCC_SDBINUTILS} ++sdcc-libs: ${SDCC_BINUTILS} + for lib in $(SDCC_LIBS); do $(MAKE) -C $$lib; done + + sdcc-cc: sdcc-libs diff --git a/dev-embedded/sdcc/files/sdcc-4.3.0-fix-elf-type.patch b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-elf-type.patch new file mode 100644 index 000000000000..5dabde8e387e --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-elf-type.patch @@ -0,0 +1,12 @@ +diff '--color=auto' -uprNb sdcc-4.3.0.orig/sdas/linksrc/aslink.h sdcc-4.3.0/sdas/linksrc/aslink.h +--- sdcc-4.3.0.orig/sdas/linksrc/aslink.h 2025-05-07 15:07:20.854046196 +0300 ++++ sdcc-4.3.0/sdas/linksrc/aslink.h 2025-05-07 15:08:22.095963883 +0300 +@@ -1312,7 +1312,7 @@ extern VOID s19(int i); + extern VOID sflush(void); + + /* EEP: lkelf.c */ +-extern VOID elf(); ++extern VOID elf(int i); + + /* JCF: lkmem.c */ + extern int summary(struct area * xp); diff --git a/dev-embedded/sdcc/files/sdcc-4.3.0-fix-mkdir-autoconf-test.patch b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-mkdir-autoconf-test.patch new file mode 100644 index 000000000000..9a0be653ba28 --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-mkdir-autoconf-test.patch @@ -0,0 +1,13 @@ +Fix implicit function declaration in configure logs: mkdir +https://bugs.gentoo.org/898594 + +--- a/support/cpp/configure.ac ++++ b/support/cpp/configure.ac +@@ -2317,6 +2317,7 @@ + ################################################################################ + + # mkdir takes a single argument on some systems. ++AC_CHECK_HEADERS([sys/stat.h]) + gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG + + # File extensions diff --git a/dev-embedded/sdcc/files/sdcc-4.3.2-override-override.patch b/dev-embedded/sdcc/files/sdcc-4.3.2-override-override.patch new file mode 100644 index 000000000000..8a0e587f5f6b --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.3.2-override-override.patch @@ -0,0 +1,62 @@ +https://bugs.gentoo.org/911463 + +--- a/support/sdbinutils/config/override.m4 ++++ b/support/sdbinutils/config/override.m4 +@@ -27,27 +27,6 @@ + m4_copy_force([_AC_PREREQ], [AC_PREREQ]) + + +-dnl Ensure exactly this Autoconf version is used +-m4_ifndef([_GCC_AUTOCONF_VERSION], +- [m4_define([_GCC_AUTOCONF_VERSION], [2.69])]) +- +-dnl Test for the exact version when AC_INIT is expanded. +-dnl This allows one to update the tree in steps (for testing) +-dnl by putting +-dnl m4_define([_GCC_AUTOCONF_VERSION], [X.Y]) +-dnl in configure.ac before AC_INIT, +-dnl without rewriting this file. +-dnl Or for updating the whole tree at once with the definition above. +-AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK], +-[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]), +- m4_defn([m4_PACKAGE_VERSION]), [], +- [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])]) +-]) +-m4_define([AC_INIT], m4_defn([AC_INIT])[ +-_GCC_AUTOCONF_VERSION_CHECK +-]) +- +- + dnl Ensure we do not use a buggy M4. + m4_if(m4_index([..wi.d.], [.d.]), [-1], + [m4_fatal(m4_do([m4 with buggy strstr detected. Please install +--- a/support/cpp/config/override.m4 ++++ b/support/cpp/config/override.m4 +@@ -27,27 +27,6 @@ + m4_copy_force([_AC_PREREQ], [AC_PREREQ]) + + +-dnl Ensure exactly this Autoconf version is used +-m4_ifndef([_GCC_AUTOCONF_VERSION], +- [m4_define([_GCC_AUTOCONF_VERSION], [2.69])]) +- +-dnl Test for the exact version when AC_INIT is expanded. +-dnl This allows to update the tree in steps (for testing) +-dnl by putting +-dnl m4_define([_GCC_AUTOCONF_VERSION], [X.Y]) +-dnl in configure.ac before AC_INIT, +-dnl without rewriting this file. +-dnl Or for updating the whole tree at once with the definition above. +-AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK], +-[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]), +- m4_defn([m4_PACKAGE_VERSION]), [], +- [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])]) +-]) +-m4_define([AC_INIT], m4_defn([AC_INIT])[ +-_GCC_AUTOCONF_VERSION_CHECK +-]) +- +- + dnl Ensure we do not use a buggy M4. + m4_if(m4_index([..wi.d.], [.d.]), [-1], + [m4_fatal(m4_do([m4 with buggy strstr detected. Please install diff --git a/dev-embedded/sdcc/files/sdcc-4.5.0-c23.patch b/dev-embedded/sdcc/files/sdcc-4.5.0-c23.patch new file mode 100644 index 000000000000..0c19a6dff0fa --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.5.0-c23.patch @@ -0,0 +1,74 @@ +https://sourceforge.net/p/sdcc/code/15567/ +https://sourceforge.net/p/sdcc/bugs/3823/ + +--- sdcc/debugger/mcs51/sdcdb.c ++++ sdcc/debugger/mcs51/sdcdb.c +@@ -62,7 +62,7 @@ + int nLinkrecs = 0; + linkrec **linkrecs = NULL; /* all linkage editor records */ + context *currCtxt = NULL; +-short fullname = 0; ++bool fullname = 0; + short showfull = 0; + char userinterrupt = 0; + char nointerrupt = 0; +@@ -573,7 +573,7 @@ + { + /* for module records do */ + case MOD_REC: +- currMod = parseModule(loop->line, TRUE); ++ currMod = parseModule(loop->line, true); + currModName = currMod->name ; + + /* search the c source file and load it into buffer */ +@@ -1906,7 +1906,7 @@ + + if (strcmp(argv[i], "-fullname") == 0) + { +- fullname = TRUE; ++ fullname = true; + continue; + } + +--- sdcc/debugger/mcs51/sdcdb.h ++++ sdcc/debugger/mcs51/sdcdb.h +@@ -42,6 +42,7 @@ + #define Dprintf(f, fs) { } + #endif + ++#include <stdbool.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +@@ -57,11 +58,6 @@ + #include "src/SDCCset.h" + #include "src/SDCChasht.h" + +-#define TRUE 1 +-#define FALSE !TRUE +- +-typedef short bool; +- + #ifndef max + #define max(a,b) (a > b ? a : b) + #endif +@@ -279,7 +275,7 @@ + char *gc_strdup(const char *s); + srcLine **loadFile (char *name, int *nlines); + +-extern short fullname; ++extern bool fullname; + extern int srcMode; + extern char contsim; + char *searchDirsFname (char *); +--- sdcc/debugger/mcs51/symtab.c ++++ sdcc/debugger/mcs51/symtab.c +@@ -836,7 +836,7 @@ + mod = NULL; + if (!applyToSet(modules,moduleWithCName,mname,&mod)) + { +- mod = parseModule(mname, FALSE); ++ mod = parseModule(mname, false); + mod->c_name = alloccpy(mname,strlen(mname)); + mod->cfullname=searchDirsFname(mod->c_name); + mod->cLines = loadFile(mod->c_name,&mod->ncLines); diff --git a/dev-embedded/sdcc/files/sdcc-4.5.0-install-apps.patch b/dev-embedded/sdcc/files/sdcc-4.5.0-install-apps.patch new file mode 100644 index 000000000000..8627910e8cba --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.5.0-install-apps.patch @@ -0,0 +1,14 @@ +Upstream do not install apps (in particular serialview is missing) + +--- a/sim/ucsim/src/Makefile.in ++++ b/sim/ucsim/src/Makefile.in +@@ -61,6 +61,9 @@ + @for pkg in $(PKGS); do\ + $(MAKE) -C sims/$${pkg} install ;\ + done ++ @for app in $(APPS); do\ ++ $(MAKE) -C apps/$${app} install ;\ ++ done + + + # Deleting all the installed files diff --git a/dev-embedded/sdcc/files/sdcc-4.5.0-link-tinfo.patch b/dev-embedded/sdcc/files/sdcc-4.5.0-link-tinfo.patch new file mode 100644 index 000000000000..71de5d5db756 --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.5.0-link-tinfo.patch @@ -0,0 +1,24 @@ +Link -ltinfo for ucsim + +/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-embedded/sdcc-4.2.0/temp/cc3R2ckl.ltrans0.ltrans.o: undefined reference to symbol 'nodelay' +/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libtinfo.so.6: error adding symbols: DSO missing from command line + +--- a/sim/ucsim/src/configure.ac ++++ b/sim/ucsim/src/configure.ac +@@ -405,14 +405,14 @@ + if test $curses_ok != yes; then + AC_CHECK_LIB(curses,nl, + curses_ok="yes" +- CURSES_LIBS="${CURSES_LIBS} -lcurses", ++ CURSES_LIBS="${CURSES_LIBS} -lcurses -ltinfo", + curses_ok="no") + fi + + if test $curses_ok != yes; then + AC_CHECK_LIB(ncurses,nl, + curses_ok="yes" +- CURSES_LIBS="${CURSES_LIBS} -lncurses", ++ CURSES_LIBS="${CURSES_LIBS} -lncurses -ltinfo", + curses_ok="no") + fi + fi diff --git a/dev-embedded/sdcc/metadata.xml b/dev-embedded/sdcc/metadata.xml new file mode 100644 index 000000000000..9c0fca6ed5f3 --- /dev/null +++ b/dev-embedded/sdcc/metadata.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <longdescription> +SDCC is a retargettable, optimizing Standard C (ANSI C89, ISO C99, ISO C11) +compiler suite that targets the Intel MCS51 based microprocessors (8031, 8032, +8051, 8052, etc.), Maxim (formerly Dallas) DS80C390 variants, Freescale +(formerly Motorola) HC08 based (hc08, s08), Zilog Z80 based MCUs (Z80, Z180, +SM83, Rabbit 2000, 2000A, 3000A, TLCS-90), Padauk (pdk14, pdk15) and +STMicroelectronics STM8. Work is in progress on supporting the Padauk pdk13 and +MOS 6502 targets; Microchip PIC16 and PIC18 targets are unmaintained. SDCC can +be retargeted for other microprocessors. + </longdescription> + <upstream> + <remote-id type="sourceforge">sdcc</remote-id> + </upstream> + <use> + <flag name="boehm-gc">Enable Hans Boehm's garbage collector <pkg>dev-libs/boehm-gc</pkg></flag> + <flag name="device-lib">Enable built of devices libraries</flag> + <flag name="non-free">Enable non-free runtime library parts</flag> + <flag name="packihx">Enable Intel HEX files pack utility</flag> + <flag name="sdcdb">Enable SDCC source level debugger</flag> + <flag name="sdcpp">Enable SDCC preprocessor based on GCC cpp</flag> + <flag name="ucsim">Enable software simulator for microcontrollers</flag> + + <!-- ports in order defined by configure.ac --> + <flag name="mcs51">Add support for Intel mcs51</flag> + <flag name="z80">Add support for Zilog Z80</flag> + <flag name="z180">Add support for Zilog Z180</flag> + <flag name="r800">Add support for ASCII Corporation R800</flag> + <flag name="r2k">Add support for Rabbit 2000</flag> + <flag name="r2ka">Add support for Rabbit 2000A</flag> + <flag name="r3ka">Add support for Rabbit 3000A</flag> + <flag name="sm83">Add support for Gameboy SM83</flag> + <flag name="tlcs90">Add support for TLCS-90</flag> + <flag name="ez80-z80">Add support for EZ80-Z80</flag> + <flag name="z80n">Add support for Zilog Z80N</flag> + <flag name="ds390">Add support for Dallas DS390</flag> + <flag name="ds400">Add support for Dallas DS400</flag> + <flag name="pic14">Add support for Microchip 14 bits PICs</flag> + <flag name="pic16">Add support for Microchip 16 bits PICs</flag> + <flag name="hc08">Add support for Freescale/Motorola HC08 based</flag> + <flag name="s08">Add support for Freescale/Motorola S08</flag> + <flag name="stm8">Add support for STMicroelectronics STM8</flag> + <flag name="pdk13">Add support for PDK13</flag> + <flag name="pdk14">Add support for PDK14</flag> + <flag name="pdk15">Add support for PDK15</flag> + <flag name="pdk16">Add support for PDK16</flag> + <flag name="mos6502">Add support for MOS 6502</flag> + <flag name="mos65c02">Add support for MOS 65C02</flag> + <flag name="f8">Add support for the new F8 arch</flag> + </use> +</pkgmetadata> diff --git a/dev-embedded/sdcc/sdcc-4.3.0-r1.ebuild b/dev-embedded/sdcc/sdcc-4.3.0-r1.ebuild new file mode 100644 index 000000000000..3d98aa7f2933 --- /dev/null +++ b/dev-embedded/sdcc/sdcc-4.3.0-r1.ebuild @@ -0,0 +1,183 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +if [[ ${PV} == "9999" ]] ; then + ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc" + inherit subversion +else + BINUTILS_PV=2.41 + SRC_URI=" + https://downloads.sourceforge.net/project/${PN}/sdcc/${PV}/${PN}-src-${PV}.tar.bz2 + mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.xz + https://sourceware.org/pub/binutils/releases/binutils-${BINUTILS_PV}.tar.xz + doc? ( https://downloads.sourceforge.net/project/${PN}/sdcc-doc/${PV}/${PN}-doc-${PV}.tar.bz2 ) + " + + KEYWORDS="amd64 x86" +fi + +DESCRIPTION="Small device C compiler (for various microprocessors)" +HOMEPAGE="https://sdcc.sourceforge.net/" + +LICENSE=" + GPL-2 ZLIB + non-free? ( MicroChip-SDCC ) + packihx? ( public-domain ) +" +SLOT="0" +# in order of configure.ac's AC_DO_PORT stanzas +SDCC_PORTS=" + mcs51 + z80 z180 + r2k r2ka r3ka + sm83 + tlcs90 + ez80-z80 + z80n + ds390 ds400 + pic14 pic16 + hc08 + s08 + stm8 + pdk13 pdk14 pdk15 pdk16 + mos6502 mos65c02 +" +IUSE=" + ${SDCC_PORTS} + +boehm-gc device-lib doc non-free packihx sdcdb +sdcpp ucsim +" + +RDEPEND=" + dev-libs/boost:= + virtual/zlib:= + pic14? ( >=dev-embedded/gputils-0.13.7 ) + pic16? ( >=dev-embedded/gputils-0.13.7 ) + boehm-gc? ( dev-libs/boehm-gc:= ) + sdcdb? ( sys-libs/readline:0= ) + ucsim? ( sys-libs/ncurses:= ) +" +DEPEND=" + ${RDEPEND} + dev-util/gperf +" +PATCHES=( + "${FILESDIR}"/sdcc-4.3.2-override-override.patch + "${FILESDIR}"/sdcc-4.2.0-link-tinfo.patch + "${FILESDIR}"/${P}-fix-binutils-dependency.patch + "${FILESDIR}"/${P}-fix-mkdir-autoconf-test.patch + "${FILESDIR}"/${P}-autoreconf-libiberty.patch + "${FILESDIR}"/${P}-fix-elf-type.patch +) + +src_prepare() { + # Fix conflicting variable names between Gentoo and sdcc + find device/lib/pic{14,16} device/non-free/lib/pic{14,16} \( \ + -name 'configure.ac' -o -name 'Makefile.*' \) \ + -exec sed -i 's/\<ARCH\>/SDCC_&/g' {} + || die + find device -name 'Makefile.in' \ + -exec sed -i 's/\<PORTDIR\>/SDCC_&/g' {} + || die + # Possible alternative: Patch the following files to not pick up the + # variables from the environment: + # - lib/Makefile.in (PORTDIR ifndef/endif) + # - device/non-free/lib/pic14/Makefile.common.in (ARCH ?= 877) + # - device/non-free/lib/pic16/configure.ac (${ARCH:-18f452}) + # - device/lib/pic14/configure.ac (${ARCH:-16f877}) + # - device/lib/pic16/configure.ac (${ARCH:-18f452}) + + # Make sure timestamps don't get messed up. + [[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} + + + mkdir -p support/sdbinutils/bfd/doc || die + + # add m4 files from binutils to run autoreconf for libiberty + cp "${WORKDIR}"/binutils-${BINUTILS_PV}/libiberty/acinclude.m4 support/sdbinutils/libiberty/acinclude.m4 || die + # libiberty configure will check this file and fail if not found + cp install-sh support/sdbinutils/libiberty/ || die + # libiberty configure will fail if this was not set + export libiberty_topdir="${S}"/support/sdbinutils/libiberty + + # this does not build: https://sourceforge.net/p/sdcc/bugs/3673/ + # disable for now + sed 's:device/lib/mos65c02/Makefile::' -i configure.ac || die + + default + eautoreconf + + # Avoid 'bfd.info' rebuild with 'makeinfo': bug #705424 + # Build dependencies are: eautoreconf->Makefile.in->bfdver.texi->bfd.info + touch support/sdbinutils/bfd/doc/bfdver.texi || die + touch support/sdbinutils/bfd/doc/bfd.info || die +} + +src_configure() { + # -Werror=odr, -Werror=lto-type-mismatch + # https://bugs.gentoo.org/924691 + # https://sourceforge.net/p/sdcc/bugs/3725/ + filter-lto + + local myeconfargs=( + ac_cv_prog_STRIP=true + --without-ccache + --enable-sdbinutils + + $(use_enable ucsim) + $(use_enable device-lib) + $(use_enable packihx) + $(use_enable sdcpp) + $(use_enable sdcdb) + $(use_enable non-free) + $(use_enable boehm-gc libgc) + + $(use_enable mcs51 mcs51-port) + $(use_enable z80 z80-port) + $(use_enable z180 z180-port) + $(use_enable r2k r2k-port) + $(use_enable r2ka r2ka-port) + $(use_enable r3ka r3ka-port) + $(use_enable sm83 sm83-port) + $(use_enable tlcs90 tlcs90-port) + $(use_enable ez80-z80 ez80_z80-port) + $(use_enable z80n z80n-port) + $(use_enable ds390 ds390-port) + $(use_enable ds400 ds400-port) + $(use_enable pic14 pic14-port) + $(use_enable pic16 pic16-port) + $(use_enable hc08 hc08-port) + $(use_enable s08 s08-port) + $(use_enable stm8 stm8-port) + $(use_enable pdk13 pdk13-port) + $(use_enable pdk14 pdk14-port) + $(use_enable pdk15 pdk15-port) + $(use_enable pdk16 pdk16-port) + $(use_enable mos6502 mos6502-port) + $(use_enable mos65c02 mos65c02-port) + ) + econf "${myeconfargs[@]}" +} + +src_compile() { + default + + # Sanity check, as gputils errors/segfaults don't cause make to stop + local libs=() + use pic14 && libs+=( device/lib/build/pic14/libsdcc.lib ) + use pic16 && libs+=( device/lib/build/pic16/libsdcc.lib ) + for lib in "${libs[@]}"; do + [[ -f "${lib}" ]] || die "Failed to build ${lib}" + done +} + +src_install() { + default + dodoc doc/*.txt + find "${ED}" -type d -name .deps -exec rm -vr {} + || die + + if use doc && [[ ${PV} != "9999" ]]; then + cd "${WORKDIR}"/doc + dodoc -r * + fi +} diff --git a/dev-embedded/sdcc/sdcc-4.5.0.ebuild b/dev-embedded/sdcc/sdcc-4.5.0.ebuild new file mode 100644 index 000000000000..643cba540cee --- /dev/null +++ b/dev-embedded/sdcc/sdcc-4.5.0.ebuild @@ -0,0 +1,223 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs + +DESCRIPTION="Small device C compiler (for various microprocessors)" +HOMEPAGE="https://sdcc.sourceforge.net/" + +if [[ ${PV} == "9999" ]] ; then + ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc" + inherit subversion +else + SRC_URI=" + https://downloads.sourceforge.net/project/${PN}/sdcc/${PV}/${PN}-src-${PV}.tar.bz2 + doc? ( https://downloads.sourceforge.net/project/${PN}/sdcc-doc/${PV}/${PN}-doc-${PV}.tar.bz2 ) + " + + KEYWORDS="amd64 x86" +fi +BINUTILS_PV=2.45.1 +SRC_URI+=" + mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.xz + https://sourceware.org/pub/binutils/releases/binutils-${BINUTILS_PV}.tar.xz +" + +LICENSE=" + GPL-2 ZLIB + non-free? ( MicroChip-SDCC ) + packihx? ( public-domain ) +" +SLOT="0" +# in order of configure.ac's AC_DO_PORT stanzas +SDCC_PORTS=" + mcs51 + z80 z180 + r2k r2ka r3ka + sm83 + tlcs90 + ez80-z80 + z80n r800 + ds390 ds400 + pic14 pic16 + hc08 + s08 + stm8 + pdk13 pdk14 pdk15 pdk16 + mos6502 mos65c02 + f8 +" +IUSE=" + ${SDCC_PORTS} + +boehm-gc device-lib doc non-free packihx sdcdb +sdcpp ucsim +" + +RDEPEND=" + dev-libs/boost:= + virtual/zlib:= + pic14? ( >=dev-embedded/gputils-0.13.7 ) + pic16? ( >=dev-embedded/gputils-0.13.7 ) + boehm-gc? ( dev-libs/boehm-gc:= ) + sdcdb? ( sys-libs/readline:0= ) + ucsim? ( sys-libs/ncurses:= ) +" +DEPEND=" + ${RDEPEND} + dev-util/gperf +" +PATCHES=( + "${FILESDIR}"/sdcc-4.3.2-override-override.patch + "${FILESDIR}"/sdcc-4.5.0-link-tinfo.patch + "${FILESDIR}"/sdcc-4.3.0-fix-mkdir-autoconf-test.patch + "${FILESDIR}"/sdcc-4.3.0-autoreconf-libiberty.patch + "${FILESDIR}"/sdcc-4.3.0-fix-elf-type.patch + "${FILESDIR}"/${P}-c23.patch +) + +src_unpack() { + if [[ ${PV} == "9999" ]] ; then + subversion_src_unpack + fi + default +} + +src_prepare() { + # Fix conflicting variable names between Gentoo and sdcc + find device/lib/pic{14,16} device/non-free/lib/pic{14,16} \( \ + -name 'configure.ac' -o -name 'Makefile.*' \) \ + -exec sed -i 's/\<ARCH\>/SDCC_&/g' {} + || die + find device -name 'Makefile.in' \ + -exec sed -i 's/\<PORTDIR\>/SDCC_&/g' {} + || die + # Possible alternative: Patch the following files to not pick up the + # variables from the environment: + # - lib/Makefile.in (PORTDIR ifndef/endif) + # - device/non-free/lib/pic14/Makefile.common.in (ARCH ?= 877) + # - device/non-free/lib/pic16/configure.ac (${ARCH:-18f452}) + # - device/lib/pic14/configure.ac (${ARCH:-16f877}) + # - device/lib/pic16/configure.ac (${ARCH:-18f452}) + + # Make sure timestamps don't get messed up. + [[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} + + + mkdir -p support/sdbinutils/bfd/doc || die + + # add m4 files from binutils to run autoreconf for libiberty + cp "${WORKDIR}"/binutils-${BINUTILS_PV}/libiberty/acinclude.m4 support/sdbinutils/libiberty/acinclude.m4 || die + cp "${WORKDIR}"/binutils-${BINUTILS_PV}/config/mmap.m4 support/sdbinutils/config/mmap.m4 || die + # libiberty configure will check this file and fail if not found + cp install-sh support/sdbinutils/libiberty/ || die + # libiberty configure will fail if this was not set + export libiberty_topdir="${S}"/support/sdbinutils/libiberty + + default + + # Upstream moved sim/ucsim to sim/ucsim/src and added some wrappers in sim/ucsim. + # Now eautoreconf needs to run in sim/ucsim/src, but configure needs to run in sim/ucsim. + # Run eautoreconf manually where it is needed and leave econf do its thing. + local dirs=( + support/cpp + support/packihx + sim/ucsim/src + debugger/mcs51 + support/sdbinutils + support/sdbinutils/libiberty + device/lib/pic14 + device/non-free/lib/pic14 + device/lib/pic16 + device/non-free/lib/pic16 + ) + for i in "${dirs[@]}"; do + pushd "$i" &> /dev/null || die + AT_NOELIBTOOLIZE=yes eautoreconf + popd &> /dev/null || die + done + AT_NO_RECURSIVE=yes eautoreconf + + # Avoid 'bfd.info' rebuild with 'makeinfo': bug #705424 + # Build dependencies are: eautoreconf->Makefile.in->bfdver.texi->bfd.info + touch support/sdbinutils/bfd/doc/bfdver.texi || die + touch support/sdbinutils/bfd/doc/bfd.info || die +} + +src_configure() { + # bug #922301 + tc-export CC CPP + local myeconfargs=( + ac_cv_prog_STRIP=true + --without-ccache + --enable-sdbinutils + + $(use_enable ucsim) + + $(use_enable device-lib) + $(use_enable packihx) + $(use_enable sdcpp) + $(use_enable sdcdb) + $(use_enable non-free) + $(use_enable boehm-gc libgc) + + $(use_enable mcs51 mcs51-port) + $(use_enable z80 z80-port) + $(use_enable z180 z180-port) + $(use_enable r2k r2k-port) + $(use_enable r2ka r2ka-port) + $(use_enable r3ka r3ka-port) + $(use_enable sm83 sm83-port) + $(use_enable tlcs90 tlcs90-port) + $(use_enable ez80-z80 ez80_z80-port) + $(use_enable z80n z80n-port) + $(use_enable r800 r800-port) + $(use_enable ds390 ds390-port) + $(use_enable ds400 ds400-port) + $(use_enable pic14 pic14-port) + $(use_enable pic16 pic16-port) + $(use_enable hc08 hc08-port) + $(use_enable s08 s08-port) + $(use_enable stm8 stm8-port) + $(use_enable pdk13 pdk13-port) + $(use_enable pdk14 pdk14-port) + $(use_enable pdk15 pdk15-port) + $(use_enable pdk16 pdk16-port) + $(use_enable mos6502 mos6502-port) + $(use_enable mos65c02 mos65c02-port) + $(use_enable f8 f8-port) + ) + + # ucsim has extra sims that do not correspond to USE flags; enable them all. + if use ucsim; then + myeconfargs+=( --enable-serio ) + for i in avr st7 p1516 m6809 m6800 m68hc11 m68hc12 pblaze i8085 i8048 oisc; do + myeconfargs+=( --enable-$i-sim ) + done + fi + + econf "${myeconfargs[@]}" +} + +src_compile() { + default + + # Sanity check, as gputils errors/segfaults don't cause make to stop + local libs=() + use pic14 && libs+=( device/lib/build/pic14/libsdcc.lib ) + use pic16 && libs+=( device/lib/build/pic16/libsdcc.lib ) + for lib in "${libs[@]}"; do + [[ -f "${lib}" ]] || die "Failed to build ${lib}" + done +} + +src_install() { + default + dodoc doc/*.txt + find "${ED}" -type d -name .deps -exec rm -vr {} + || die + + # make install does not install this + use ucsim && dobin sim/ucsim/src/apps/serio.src/serialview + + if use doc && [[ ${PV} != "9999" ]]; then + cd "${WORKDIR}"/doc + dodoc -r * + fi +} diff --git a/dev-embedded/sdcc/sdcc-9999.ebuild b/dev-embedded/sdcc/sdcc-9999.ebuild new file mode 100644 index 000000000000..0329305c0727 --- /dev/null +++ b/dev-embedded/sdcc/sdcc-9999.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs + +DESCRIPTION="Small device C compiler (for various microprocessors)" +HOMEPAGE="https://sdcc.sourceforge.net/" + +if [[ ${PV} == "9999" ]] ; then + ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc" + inherit subversion +else + SRC_URI=" + https://downloads.sourceforge.net/project/${PN}/sdcc/${PV}/${PN}-src-${PV}.tar.bz2 + doc? ( https://downloads.sourceforge.net/project/${PN}/sdcc-doc/${PV}/${PN}-doc-${PV}.tar.bz2 ) + " + + KEYWORDS="~amd64 ~x86" +fi +BINUTILS_PV=2.45.1 +SRC_URI+=" + mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.xz + https://sourceware.org/pub/binutils/releases/binutils-${BINUTILS_PV}.tar.xz +" + +LICENSE=" + GPL-2 ZLIB + non-free? ( MicroChip-SDCC ) + packihx? ( public-domain ) +" +SLOT="0" +# in order of configure.ac's AC_DO_PORT stanzas +SDCC_PORTS=" + mcs51 + z80 z180 + r2k r2ka r3ka + sm83 + tlcs90 + ez80-z80 + z80n r800 + ds390 ds400 + pic14 pic16 + hc08 + s08 + stm8 + pdk13 pdk14 pdk15 pdk16 + mos6502 mos65c02 + f8 +" +IUSE=" + ${SDCC_PORTS} + +boehm-gc device-lib doc non-free packihx sdcdb +sdcpp ucsim +" + +RDEPEND=" + dev-libs/boost:= + virtual/zlib:= + pic14? ( >=dev-embedded/gputils-0.13.7 ) + pic16? ( >=dev-embedded/gputils-0.13.7 ) + boehm-gc? ( dev-libs/boehm-gc:= ) + sdcdb? ( sys-libs/readline:0= ) + ucsim? ( sys-libs/ncurses:= ) +" +DEPEND=" + ${RDEPEND} + dev-util/gperf +" +PATCHES=( + "${FILESDIR}"/sdcc-4.3.2-override-override.patch + "${FILESDIR}"/sdcc-4.5.0-link-tinfo.patch + "${FILESDIR}"/sdcc-4.3.0-fix-mkdir-autoconf-test.patch + "${FILESDIR}"/sdcc-4.3.0-autoreconf-libiberty.patch +) + +src_unpack() { + if [[ ${PV} == "9999" ]] ; then + subversion_src_unpack + fi + default +} + +src_prepare() { + # Fix conflicting variable names between Gentoo and sdcc + find device/lib/pic{14,16} device/non-free/lib/pic{14,16} \( \ + -name 'configure.ac' -o -name 'Makefile.*' \) \ + -exec sed -i 's/\<ARCH\>/SDCC_&/g' {} + || die + find device -name 'Makefile.in' \ + -exec sed -i 's/\<PORTDIR\>/SDCC_&/g' {} + || die + # Possible alternative: Patch the following files to not pick up the + # variables from the environment: + # - lib/Makefile.in (PORTDIR ifndef/endif) + # - device/non-free/lib/pic14/Makefile.common.in (ARCH ?= 877) + # - device/non-free/lib/pic16/configure.ac (${ARCH:-18f452}) + # - device/lib/pic14/configure.ac (${ARCH:-16f877}) + # - device/lib/pic16/configure.ac (${ARCH:-18f452}) + + # Make sure timestamps don't get messed up. + [[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} + + + mkdir -p support/sdbinutils/bfd/doc || die + + # add m4 files from binutils to run autoreconf for libiberty + cp "${WORKDIR}"/binutils-${BINUTILS_PV}/libiberty/acinclude.m4 support/sdbinutils/libiberty/acinclude.m4 || die + cp "${WORKDIR}"/binutils-${BINUTILS_PV}/config/mmap.m4 support/sdbinutils/config/mmap.m4 || die + # libiberty configure will check this file and fail if not found + cp install-sh support/sdbinutils/libiberty/ || die + # libiberty configure will fail if this was not set + export libiberty_topdir="${S}"/support/sdbinutils/libiberty + + default + + # Upstream moved sim/ucsim to sim/ucsim/src and added some wrappers in sim/ucsim. + # Now eautoreconf needs to run in sim/ucsim/src, but configure needs to run in sim/ucsim. + # Run eautoreconf manually where it is needed and leave econf do its thing. + local dirs=( + support/cpp + support/packihx + sim/ucsim/src + debugger/mcs51 + support/sdbinutils + support/sdbinutils/libiberty + device/lib/pic14 + device/non-free/lib/pic14 + device/lib/pic16 + device/non-free/lib/pic16 + ) + for i in "${dirs[@]}"; do + pushd "$i" &> /dev/null || die + AT_NOELIBTOOLIZE=yes eautoreconf + popd &> /dev/null || die + done + AT_NO_RECURSIVE=yes eautoreconf + + # Avoid 'bfd.info' rebuild with 'makeinfo': bug #705424 + # Build dependencies are: eautoreconf->Makefile.in->bfdver.texi->bfd.info + touch support/sdbinutils/bfd/doc/bfdver.texi || die + touch support/sdbinutils/bfd/doc/bfd.info || die +} + +src_configure() { + # bug #922301 + tc-export CC CPP + local myeconfargs=( + ac_cv_prog_STRIP=true + --without-ccache + --enable-sdbinutils + + $(use_enable ucsim) + + $(use_enable device-lib) + $(use_enable packihx) + $(use_enable sdcpp) + $(use_enable sdcdb) + $(use_enable non-free) + $(use_enable boehm-gc libgc) + + $(use_enable mcs51 mcs51-port) + $(use_enable z80 z80-port) + $(use_enable z180 z180-port) + $(use_enable r2k r2k-port) + $(use_enable r2ka r2ka-port) + $(use_enable r3ka r3ka-port) + $(use_enable sm83 sm83-port) + $(use_enable tlcs90 tlcs90-port) + $(use_enable ez80-z80 ez80_z80-port) + $(use_enable z80n z80n-port) + $(use_enable r800 r800-port) + $(use_enable ds390 ds390-port) + $(use_enable ds400 ds400-port) + $(use_enable pic14 pic14-port) + $(use_enable pic16 pic16-port) + $(use_enable hc08 hc08-port) + $(use_enable s08 s08-port) + $(use_enable stm8 stm8-port) + $(use_enable pdk13 pdk13-port) + $(use_enable pdk14 pdk14-port) + $(use_enable pdk15 pdk15-port) + $(use_enable pdk16 pdk16-port) + $(use_enable mos6502 mos6502-port) + $(use_enable mos65c02 mos65c02-port) + $(use_enable f8 f8-port) + ) + + # ucsim has extra sims that do not correspond to USE flags; enable them all. + if use ucsim; then + myeconfargs+=( --enable-serio ) + for i in avr st7 p1516 m6809 m6800 m68hc11 m68hc12 pblaze i8085 i8048 oisc; do + myeconfargs+=( --enable-$i-sim ) + done + fi + + econf "${myeconfargs[@]}" +} + +src_compile() { + default + + # Sanity check, as gputils errors/segfaults don't cause make to stop + local libs=() + use pic14 && libs+=( device/lib/build/pic14/libsdcc.lib ) + use pic16 && libs+=( device/lib/build/pic16/libsdcc.lib ) + for lib in "${libs[@]}"; do + [[ -f "${lib}" ]] || die "Failed to build ${lib}" + done +} + +src_install() { + default + dodoc doc/*.txt + find "${ED}" -type d -name .deps -exec rm -vr {} + || die + + # make install does not install this + use ucsim && dobin sim/ucsim/src/apps/serio.src/serialview + + if use doc && [[ ${PV} != "9999" ]]; then + cd "${WORKDIR}"/doc + dodoc -r * + fi +} diff --git a/dev-embedded/smdk-dltool/Manifest b/dev-embedded/smdk-dltool/Manifest new file mode 100644 index 000000000000..742f0ba6ae25 --- /dev/null +++ b/dev-embedded/smdk-dltool/Manifest @@ -0,0 +1 @@ +DIST smdk-tools-v0.20.tar.gz 5170 BLAKE2B c414938ff98155dd16f64378a5c3524bb2fd7e21b074cb6e656ffc2aa5b7b8cc8cbe27600472a8ef20570818e253f63f1b1460784200aaf0a4fb321f79b0cfdc SHA512 2b0fd113bc9e6e6c07ad4163d404bffa8044150a2da55a8903192b9dcbead5e31d97a9315b561526f0cb2a65e415f34941bea0db3ac40e73048901fe95ff3a17 diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch new file mode 100644 index 000000000000..f2864b012a27 --- /dev/null +++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch @@ -0,0 +1,66 @@ +From ed9e5da97fdb40082aca7acbdce5286b530fb2ba Mon Sep 17 00:00:00 2001 +From: Maurus Cuelenaere <mcuelenaere@gmail.com> +Date: Mon, 11 Jan 2010 01:55:34 +0100 +Subject: [PATCH] Add S3C64xx support + +Author: unknown +URL: http://dev.odroid.com/frs/download.php/22/Linux-dltool.tar.gz +--- + dltool.c | 19 ++++++++++++++----- + 1 files changed, 14 insertions(+), 5 deletions(-) + +diff --git a/dltool.c b/dltool.c +index 4e2d238..e76e607 100644 +--- a/dltool.c ++++ b/dltool.c +@@ -26,6 +26,8 @@ char *dl_file = "download.dat"; + char *dl_udev = NULL; + char *dl_ubus = NULL; + ++int ep_out = 0; ++ + #define DBG(x) if (debug) { printf x; } + + void write_u32(unsigned char *dp, unsigned long val) +@@ -120,9 +122,15 @@ int verify_device(struct usb_device *dev) + DBG(("\t=> idVendor %x\n", dev->descriptor.idVendor)); + DBG(("\t=> idProduct %x\n", dev->descriptor.idProduct)); + +- if (dev->descriptor.idVendor == 0x5345 && +- dev->descriptor.idProduct == 0x1234) ++ if (dev->descriptor.idVendor == 0x5345 && dev->descriptor.idProduct == 0x1234) { ++ ep_out = 3; ++ return 1; ++ } ++ else if(dev->descriptor.idVendor == 0x4e8 && dev->descriptor.idProduct == 0x1234){ ++ printf("S3C64XX Detected!\n"); ++ ep_out = 2; + return 1; ++ } + + return 0; + } +@@ -180,9 +188,9 @@ int main(int argc, char **argv) + usb_dev_handle *devh; + int ret; + +- printf("SMDK42XX USB Download Tool\n"); ++ printf("SMDK42XX,S3C64XX USB Download Tool\n"); + printf("Version 0.20 (c) 2004,2005,2006" +- "Ben Dooks <ben-linux@fluff.org>\n"); ++ " Ben Dooks <ben-linux@fluff.org>\n"); + printf("\n"); + + while (1) { +@@ -309,7 +317,8 @@ int main(int argc, char **argv) + write_header(dl_data, dl_addr, dl_size); + calc_cksum(dl_data, dl_size); + +- ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000); ++ //ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000); ++ ret = usb_bulk_write(devh, ep_out, (void *)dl_data, dl_size, 5*1000*1000); + printf("=> usb_bulk_write() returned %d\n", ret); + + if (ret != dl_size) { +-- +1.7.0.4 diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch new file mode 100644 index 000000000000..9b7162d77cd5 --- /dev/null +++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch @@ -0,0 +1,20 @@ +respect env build settings + +--- a/Makefile ++++ b/Makefile +@@ -7,8 +7,13 @@ + + .PHONY: clean + +-dltool: dltool.c +- $(CC) -O2 -Wall -g -lusb -o smdk-usbdl dltool.c ++CFLAGS ?= -O2 -g ++CFLAGS += -Wall ++PKG_CONFIG ?= pkg-config ++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb) ++LDLIBS = $(shell $(PKG_CONFIG) --libs libusb) ++ ++all: dltool + + clean: + -rm smdk-usbdl diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch new file mode 100644 index 000000000000..15afd1380984 --- /dev/null +++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch @@ -0,0 +1,359 @@ +migrate to libusb-1 by me (Mike Frysinger) + +workaround kernel/libusb transfer sizes by Julius Werner + +--- a/Makefile ++++ b/Makefile +@@ -10,8 +10,8 @@ + CFLAGS ?= -O2 -g + CFLAGS += -Wall + PKG_CONFIG ?= pkg-config +-CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb) +-LDLIBS = $(shell $(PKG_CONFIG) --libs libusb) ++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0) ++LDLIBS = $(shell $(PKG_CONFIG) --libs libusb-1.0) + + all: dltool + +--- a/dltool.c ++++ b/dltool.c +@@ -7,15 +7,25 @@ + + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/param.h> + + #include <stdlib.h> + #include <string.h> + #include <stdio.h> + #include <getopt.h> + #include <fcntl.h> ++#include <errno.h> ++#include <unistd.h> + + +-#include <usb.h> ++#include <libusb.h> ++ ++/* The kernel USB layer is restrictive in the max size in a single URB. ++ * When we exceed that, the kernel throws ENOMEM, but the libusb layer ++ * doesn't handle things gracefully. So manually split up into chunks ++ * ourselves so we can avoid that failure case. ++ */ ++#define CHUNKSIZE (1 << 18) + + unsigned int debug = 0; + unsigned long dl_addr = 0x30000000L; +@@ -23,12 +33,22 @@ unsigned long dl_size = 0L; + unsigned char *dl_data = NULL; + + char *dl_file = "download.dat"; +-char *dl_udev = NULL; +-char *dl_ubus = NULL; ++libusb_context *ctx = NULL; ++libusb_device_handle *devh = NULL; + + int ep_out = 0; + + #define DBG(x) if (debug) { printf x; } ++#define err(fmt, args...) \ ++ do { \ ++ if (devh) \ ++ libusb_close(devh); \ ++ if (ctx) \ ++ libusb_exit(ctx); \ ++ fprintf(stderr, "dltool: " fmt "\n", ## args); \ ++ exit(1); \ ++ } while (0) ++#define errp(fmt, args...) err(fmt ": %s", ## args, strerror(errno)) + + void write_u32(unsigned char *dp, unsigned long val) + { +@@ -108,25 +128,30 @@ void calc_cksum(unsigned char *data, ssize_t len) + cp[1] = cksum >> 8; + } + +-int verify_device(struct usb_device *dev) ++int verify_device(libusb_device *dev) + { ++ struct libusb_device_descriptor desc; ++ ++ if (libusb_get_device_descriptor(dev, &desc)) ++ return 0; ++ + DBG(("dev %p: configurations %d\n", +- dev, dev->descriptor.bNumConfigurations)); ++ dev, desc.bNumConfigurations)); + +- if (dev->descriptor.bNumConfigurations != 1) ++ if (desc.bNumConfigurations != 1) + return 0; + +- DBG(("\t=> bLength %d\n", dev->descriptor.bLength)); +- DBG(("\t=> bType %d\n", dev->descriptor.bDescriptorType)); +- DBG(("\t=> bcdUSB %x\n", dev->descriptor.bcdUSB)); +- DBG(("\t=> idVendor %x\n", dev->descriptor.idVendor)); +- DBG(("\t=> idProduct %x\n", dev->descriptor.idProduct)); ++ DBG(("\t=> bLength %d\n", desc.bLength)); ++ DBG(("\t=> bType %d\n", desc.bDescriptorType)); ++ DBG(("\t=> bcdUSB %x\n", desc.bcdUSB)); ++ DBG(("\t=> idVendor %x\n", desc.idVendor)); ++ DBG(("\t=> idProduct %x\n", desc.idProduct)); + +- if (dev->descriptor.idVendor == 0x5345 && dev->descriptor.idProduct == 0x1234) { ++ if (desc.idVendor == 0x5345 && desc.idProduct == 0x1234) { + ep_out = 3; + return 1; + } +- else if(dev->descriptor.idVendor == 0x4e8 && dev->descriptor.idProduct == 0x1234){ ++ else if(desc.idVendor == 0x4e8 && desc.idProduct == 0x1234){ + printf("S3C64XX Detected!\n"); + ep_out = 2; + return 1; +@@ -173,6 +198,12 @@ struct option long_opts[] = { + .val = 'x', + }, + { ++ .name = "help", ++ .has_arg = 0, ++ .flag = NULL, ++ .val = 'h', ++ }, ++ { + .name = NULL + } + }; +@@ -181,12 +212,14 @@ int flg_show = 0; + + int main(int argc, char **argv) + { +- struct usb_bus *bus, *busp; +- struct usb_device *result = NULL; +- struct usb_device *found = NULL; ++ ssize_t num_devs, i; ++ libusb_device **list; ++ libusb_device *found; ++ int dl_ubus = -1; ++ int dl_udev = -1; ++ uint8_t bus_num, dev_num; + unsigned long fsize; +- usb_dev_handle *devh; +- int ret; ++ int ret, transferred; + + printf("SMDK42XX,S3C64XX USB Download Tool\n"); + printf("Version 0.20 (c) 2004,2005,2006" +@@ -197,7 +230,7 @@ int main(int argc, char **argv) + int index = 0; + int c; + +- c = getopt_long(argc, argv, "a:b:d:f:s", long_opts, &index); ++ c = getopt_long(argc, argv, "a:b:d:f:shx", long_opts, &index); + + DBG(("option index %d\n",c )); + +@@ -218,117 +251,134 @@ int main(int argc, char **argv) + break; + + case 'b': +- dl_ubus = optarg; ++ dl_ubus = atoi(optarg); + break; + + case 'd': +- dl_udev = optarg; ++ dl_udev = atoi(optarg); + break; + + case 'x': + debug = 1; ++ break; ++ ++ case 'h': ++ puts( ++ "Usage: dltool [options]\n" ++ "\n" ++ "-a <download addr>\n" ++ "-b <bus #>\n" ++ "-d <dev #>\n" ++ "-f <file>\n" ++ "-s Show found devices\n" ++ "-x Enable debug\n" ++ ); ++ return 0; + } + } + +- usb_init(); +- usb_find_busses(); +- usb_find_devices(); +- +- bus = usb_get_busses(); +- +- DBG(("usb_get_busses: %p\n", bus)); +- +- for (busp = bus; busp != NULL; busp = busp->next) { +- struct usb_device *dev; +- +- DBG(("bus %p: dirname %s\n", busp, busp->dirname)); +- +- if (dl_ubus) { +- if (strcmp(busp->dirname, dl_ubus) != 0) +- continue; +- } ++ ret = libusb_init(&ctx); ++ if (ret) ++ errp("could not initialize usb stack"); + +- for (dev = busp->devices; dev != NULL; dev = dev->next) { +- DBG(("dev %p filename %s\n", dev, dev->filename)); ++ bus_num = dev_num = 0; ++ found = NULL; ++ num_devs = libusb_get_device_list(ctx, &list); ++ for (i = 0; i < num_devs; ++i) { ++ libusb_device *dev = list[i]; ++ bus_num = libusb_get_bus_number(dev); ++ dev_num = libusb_get_device_address(dev); + +- if (!verify_device(dev)) +- continue; ++ DBG(("bus %u; dev %u (%p)\n", bus_num, dev_num, dev)); + +- if (flg_show) { +- printf("bus %s: device %s\n", +- busp->dirname, dev->filename); +- continue; +- } ++ if (dl_ubus >= 0 && bus_num != dl_ubus) ++ continue; + +- found = dev; ++ if (!verify_device(dev)) ++ continue; + +- if (dl_udev) { +- if (strcmp(dev->filename, dl_udev) == 0) { +- result = dev; +- break; +- } +- } ++ if (flg_show) { ++ printf("bus %u: device %u\n", bus_num, dev_num); ++ continue; + } + +- if (result != NULL) +- break; ++ if (dl_udev >= 0 && dev_num != dl_udev) ++ continue; ++ ++ found = dev; ++ break; + } + + if (flg_show) + return 0; + +- DBG(("device %p, found %p\n", result, found)); ++ DBG(("found %p\n", found)); + +- if (result == NULL && found != NULL) +- result = found; +- +- if (result == NULL) { +- fprintf(stderr, "failed to find device\n"); +- return 1; +- } ++ if (found == NULL) ++ err("failed to find device\n"); + +- printf("=> found device: bus %s, dev %s\n", +- result->bus->dirname, result->filename); ++ printf("=> found device: bus %u, dev %u\n", ++ bus_num, dev_num); + + dl_data = load_file(dl_file, &dl_size, &fsize); +- if (dl_data == NULL) { +- printf("failed to load %s\n", dl_file); +- return 1; +- } ++ if (dl_data == NULL) ++ errp("failed to load %s", dl_file); + + printf("=> loaded %ld bytes from %s\n", fsize, dl_file); + +- devh = usb_open(result); +- if (devh == NULL) { +- perror("usb_open"); +- return 1; +- } ++ ret = libusb_open(found, &devh); ++ if (ret == 0) { ++ /* ++ * Seems to break some recovery modes :( ++ * http://crosbug.com/26083 ++ * These fail: ++ * smdk-dltool -a 0x02021400 -f bl1.bin ++ * smdk-dltool -a 0x02023400 -f bl2.bin ++ */ ++#if 0 ++ uint8_t configuration; ++ struct libusb_config_descriptor *config; ++ libusb_get_active_config_descriptor(found, &config); ++ configuration = config->bConfigurationValue; ++ libusb_free_config_descriptor(config); ++ libusb_set_configuration(devh, configuration); ++#endif ++ } else ++ errp("libusb_open"); + + DBG(("claim interface\n")); + +- if (usb_claim_interface(devh, 0) < 0) { +- perror("usb_claim_interface"); +- usb_close(devh); +- return 1; +- } ++ ret = libusb_claim_interface(devh, 0); ++ if (ret) ++ errp("libusb_claim_interface"); + + printf("=> Downloading %ld bytes to 0x%08lx\n", dl_size, dl_addr); + + write_header(dl_data, dl_addr, dl_size); + calc_cksum(dl_data, dl_size); + +- //ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000); +- ret = usb_bulk_write(devh, ep_out, (void *)dl_data, dl_size, 5*1000*1000); +- printf("=> usb_bulk_write() returned %d\n", ret); +- +- if (ret != dl_size) { +- printf("failed to write %ld bytes\n", dl_size); ++ transferred = 0; ++ while (transferred < dl_size) { ++ int actual, expected = MIN(dl_size - transferred, CHUNKSIZE); ++ ret = libusb_bulk_transfer(devh, ep_out, dl_data + transferred, ++ expected, &actual, 5 * 1000 * 1000); ++ printf("=> usb_bulk_write(%d) returned %d, wrote %d\n", ++ expected, ret, actual); ++ transferred += actual; ++ ++ if (ret || (expected != actual)) { ++ printf("failed to write %ld bytes (wrote %d): %s\n", ++ dl_size, transferred, strerror(errno)); ++ ret = 1; ++ break; ++ } + } + + free(dl_data); + +- usb_release_interface(devh, 0); +- usb_close(devh); ++ libusb_release_interface(devh, 0); ++ libusb_close(devh); ++ libusb_exit(ctx); + +- return 0; ++ return ret; + } diff --git a/dev-embedded/smdk-dltool/metadata.xml b/dev-embedded/smdk-dltool/metadata.xml new file mode 100644 index 000000000000..98ae10b3c34a --- /dev/null +++ b/dev-embedded/smdk-dltool/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +</pkgmetadata> diff --git a/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild b/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild new file mode 100644 index 000000000000..2f9139eec71b --- /dev/null +++ b/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Tool to communicate with Samsung SMDK boards" +HOMEPAGE="http://www.fluff.org/ben/smdk/tools/" +SRC_URI="http://www.fluff.org/ben/smdk/tools/downloads/smdk-tools-v${PV}.tar.gz" + +# Email sent to author on 2012-01-18 querying about license +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="~amd64 ~x86" +RESTRICT="mirror bindist" + +RDEPEND="virtual/libusb:1" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +S="${WORKDIR}/releases/smdk-tools-v${PV}/dltool" + +PATCHES=( + "${FILESDIR}"/${P}-add-S3C64xx-support.patch + "${FILESDIR}"/${P}-build.patch + "${FILESDIR}"/${P}-libusb-1.0-r1.patch +) + +src_configure() { + tc-export CC PKG_CONFIG +} + +src_install() { + newbin dltool smdk-usbdl + dodoc readme.txt +} diff --git a/dev-embedded/squareline-studio/Manifest b/dev-embedded/squareline-studio/Manifest new file mode 100644 index 000000000000..c0d738f3c9d3 --- /dev/null +++ b/dev-embedded/squareline-studio/Manifest @@ -0,0 +1,2 @@ +DIST squareline-studio-1.6.0.zip 178390461 BLAKE2B 9b6f16bfba7a0f0b12884208842306e84c5ae873fde91c65624c975a29f2166cb7aa4e2f774e266f7ebde593c9bd5c549e3717cf6903bd72a2eb74652ed34a28 SHA512 1c442bd1d92935b0154089196b7f7069c5aacce055c9e2b121a4cee55483b0567146d97d932fdd7e9b993212881f72f80e29754585e14acdb4f2429593105e2d +DIST squareline-studio-1.6.1.zip 180438276 BLAKE2B 65d8362ca4b4496489702b63e5157237a0aa5b61f15be784d9ccd4647b78340f8f9693828219f5e101a33d65c859b658a348bef81c268aa0e1a104e04b4cafb8 SHA512 de09dfcecee3a4f9a00cc2507fc6faab9d8cb0c6e439fd8186adaff2fbf72c4f591d520dee1e0204552addb6454c694f6e74b1d30e88d8b88c4f0fe5ff0170a0 diff --git a/dev-embedded/squareline-studio/metadata.xml b/dev-embedded/squareline-studio/metadata.xml new file mode 100644 index 000000000000..572adf1125b5 --- /dev/null +++ b/dev-embedded/squareline-studio/metadata.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>vowstar@gmail.com</email> + <name>Huang Rui</name> + </maintainer> + <longdescription lang="en"> + Next generation UI editor for individuals and professionals to design + and develop beautiful UIs for your embedded devices quickly and easily. + SquareLine Studio is specially developed for designers so as to + implement their plans in the most efficient way and to take the most off + the programmers' shoulders. SquareLine Studio uses the fully open source + LVGL UI library which makes it possible to control the whole project + because there is no Lib file generated code set. Meanwhile, it gives + great performance on low performance devices. + SquareLine Studio supports exporting C and MicroPyton source code. + If you don't need the low level C programming, you can create your + project in the simplyfied version of the well-known and commonly used + Python scripting language, MicroPython. The advantage of MicroPython + compared to C programming is that it can process commands in real time. + For instance if we would like to add a button to the screen of a project + running on a device, we should send the Add button command to the system + so as to make the button appear immediately on the device. + </longdescription> + <longdescription lang="zh"> + 下一代的UI编辑器,适用于个人和专业人士,可以快速、轻松地为您的嵌入式设备 + 设计和开发美观的用户界面。SquareLine Studio是专门为设计师开发的,以便以 + 最高效的方式实现他们的计划,同时尽量减轻程序员的负担。SquareLine Studio + 使用完全开源的LVGL UI库,这使得可以控制整个项目,因为不会生成Lib文件 + 编码集。同时,它在低性能的设备上表现出色。 + SquareLine Studio支持导出C和MicroPython源代码。如果您不需要低级C编程, + 您可以使用众所周知且常用的Python脚本语言的简化版本MicroPython创建您的 + 项目。与C编程相比,MicroPython的优势是它可以实时处理命令。例如,如果我们 + 想在运行在设备上的项目的屏幕上添加一个按钮,我们应该向系统发送添加按钮的 + 命令,以便立即在设备上显示该按钮。 + </longdescription> +</pkgmetadata> diff --git a/dev-embedded/squareline-studio/squareline-studio-1.6.0.ebuild b/dev-embedded/squareline-studio/squareline-studio-1.6.0.ebuild new file mode 100644 index 000000000000..aeda59ccf31b --- /dev/null +++ b/dev-embedded/squareline-studio/squareline-studio-1.6.0.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +MY_PV="$(ver_rs 1- '_')" + +inherit desktop xdg + +DESCRIPTION="Visual drag-and-drop UI editor for LVGL" +HOMEPAGE="https://squareline.io" +SRC_URI=" + https://static.squareline.io/downloads/SquareLine_Studio_Linux_v${MY_PV}.zip -> ${P}.zip +" +S="${WORKDIR}" + +LICENSE="all-rights-reserved" +SLOT="0/${PV}" +KEYWORDS="-* ~amd64" + +BDEPEND=" + app-arch/unzip +" + +QA_PREBUILT="*" + +src_install() { + # desktop entry + sed "s|__folder__|/opt/${P}|g" squareline_studio.desktop.template > "${P}.desktop" || die + # install + insinto "/opt/${P}" + doins -r * + for x in $(find .) ; do + # Fix python script permissions + [[ "${x: -3}" == ".py" ]] && fperms 0755 "/opt/${P}/${x}" + # Use \x7fELF header to separate ELF executables and libraries + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] && fperms 0755 "/opt/${P}/${x}" + done + domenu "${P}.desktop" + dosym ../../opt/"${P}"/"SquareLine_Studio.x86_64" /usr/bin/"${P}" +} diff --git a/dev-embedded/squareline-studio/squareline-studio-1.6.1.ebuild b/dev-embedded/squareline-studio/squareline-studio-1.6.1.ebuild new file mode 100644 index 000000000000..aeda59ccf31b --- /dev/null +++ b/dev-embedded/squareline-studio/squareline-studio-1.6.1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +MY_PV="$(ver_rs 1- '_')" + +inherit desktop xdg + +DESCRIPTION="Visual drag-and-drop UI editor for LVGL" +HOMEPAGE="https://squareline.io" +SRC_URI=" + https://static.squareline.io/downloads/SquareLine_Studio_Linux_v${MY_PV}.zip -> ${P}.zip +" +S="${WORKDIR}" + +LICENSE="all-rights-reserved" +SLOT="0/${PV}" +KEYWORDS="-* ~amd64" + +BDEPEND=" + app-arch/unzip +" + +QA_PREBUILT="*" + +src_install() { + # desktop entry + sed "s|__folder__|/opt/${P}|g" squareline_studio.desktop.template > "${P}.desktop" || die + # install + insinto "/opt/${P}" + doins -r * + for x in $(find .) ; do + # Fix python script permissions + [[ "${x: -3}" == ".py" ]] && fperms 0755 "/opt/${P}/${x}" + # Use \x7fELF header to separate ELF executables and libraries + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] && fperms 0755 "/opt/${P}/${x}" + done + domenu "${P}.desktop" + dosym ../../opt/"${P}"/"SquareLine_Studio.x86_64" /usr/bin/"${P}" +} diff --git a/dev-embedded/srecord/Manifest b/dev-embedded/srecord/Manifest new file mode 100644 index 000000000000..17b2764be1e8 --- /dev/null +++ b/dev-embedded/srecord/Manifest @@ -0,0 +1 @@ +DIST srecord-1.64.tar.gz 942513 BLAKE2B 5bd4e8706f2499968930883e624b3dc7f8f061e8d697584b63a8792d111fd51e37b198fd81a81d8ede6f7eeb42860e83e86a0abeb0856e4cb5847d3db2d30382 SHA512 f96f2d9cd2c475d040c0474a35a17ebca2f0fb737856cdafe1227758a3e52176e4ab3e8577520c21e75e468d74fa98695128c02120734b6e92d8573e76af50b3 diff --git a/dev-embedded/srecord/files/srecord-1.57-libtool.patch b/dev-embedded/srecord/files/srecord-1.57-libtool.patch new file mode 100644 index 000000000000..d1195726a3d2 --- /dev/null +++ b/dev-embedded/srecord/files/srecord-1.57-libtool.patch @@ -0,0 +1,70 @@ +--- srecord-1.57.orig/etc/configure.ac ++++ srecord-1.57/etc/configure.ac +@@ -29,6 +29,10 @@ + AC_CHECK_FUNCS(snprintf vsnprintf) + AC_CHECK_LIB(gcrypt, gcry_md_open) + ++top_builddir=`pwd` ++AC_SUBST(top_builddir) ++LT_INIT ++ + dnl + dnl Make sure Boost is installed. + dnl +@@ -119,46 +123,6 @@ + operating system has a libgcrypt that supports WHIRLPOOL.]) + AC_MSG_RESULT(yes),AC_MSG_RESULT(no))dnl + +-dnl! +-dnl! Now look for libtool. +-dnl! +-AC_CHECK_PROGS(LIBTOOL, libtool) +-if test -z "$LIBTOOL" +-then +- AC_MSG_RESULT([ +- You must have GNU Libtool installed to build srecord. +- Homepage: http://www.gnu.org/software/libtool/]) +- OK=no +- if apt-get --version > /dev/null 2> /dev/null; then +- AC_MSG_RESULT([ +- The following command may be used to install it: +- sudo apt-get install libtool +- ]) +- OK=yes +- fi +- if yum --version > /dev/null 2> /dev/null; then +- AC_MSG_RESULT([ +- The following command may be used to install it: +- sudo yum install libtool +- ]) +- OK=yes +- fi +- if pkg_info -a > /dev/null 2> /dev/null; then +- AC_MSG_RESULT([ +- The following command may be used to install it: +- sudo pkg_add -r libtool +- ]) +- OK=yes +- fi +- if test "$OK" != "yes"; then +- AC_MSG_RESULT([ +- If you are using a package based install, you will need the +- libtool package. +- ]) +- fi +- exit 1 +-fi +- + dnl + dnl If the soelim program exists, and understands the -I option, + dnl arrange for the Makefile to install the .ps files from the +--- srecord-1.57.orig/Makefile.in ++++ srecord-1.57/Makefile.in +@@ -35,6 +35,7 @@ + # + # directory containing the source + # ++top_builddir = @top_builddir@ + srcdir = @srcdir@ + VPATH = @srcdir@ + diff --git a/dev-embedded/srecord/metadata.xml b/dev-embedded/srecord/metadata.xml new file mode 100644 index 000000000000..cbfe232e0112 --- /dev/null +++ b/dev-embedded/srecord/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">srecord</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/srecord/srecord-1.64-r1.ebuild b/dev-embedded/srecord/srecord-1.64-r1.ebuild new file mode 100644 index 000000000000..7935906b2276 --- /dev/null +++ b/dev-embedded/srecord/srecord-1.64-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="A collection of powerful tools for manipulating EPROM load files" +HOMEPAGE="https://srecord.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="static-libs test" +RESTRICT="!test? ( test )" + +RDEPEND="dev-libs/libgcrypt:0" +DEPEND="${RDEPEND} + app-text/ghostscript-gpl + dev-libs/boost + sys-apps/groff + test? ( app-arch/sharutils )" + +PATCHES=( "${FILESDIR}"/${PN}-1.57-libtool.patch ) + +src_prepare() { + default + + cp etc/configure.ac "${S}" + eautoreconf +} + +src_configure() { + econf $(use_enable static-libs static) +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die + + mv "${ED}/usr/share/doc/${PN}" "${ED}/usr/share/doc/${PF}" +} diff --git a/dev-embedded/stlink/Manifest b/dev-embedded/stlink/Manifest new file mode 100644 index 000000000000..a3889a797435 --- /dev/null +++ b/dev-embedded/stlink/Manifest @@ -0,0 +1 @@ +DIST stlink-1.8.0.tar.gz 257240 BLAKE2B 93977a0f1700b70b7fd8e17ef6ab2d636323665e4f98e5753ced1fce9de79b0cc3a47a5db973c39ce1ec1d1ecb7dbd2bfb91b4e41ee895d65fa4907136eba9dd SHA512 49245a4b0aeb926dd71ec4260b707d900318fe68e3a36e2e5543587fefb4886a9ff0ff42e0e12a8e727a5d4e9c7b4ce13989ca4d963842dbf960065e5fa0c968 diff --git a/dev-embedded/stlink/files/stlink-1.8.0-werror.patch b/dev-embedded/stlink/files/stlink-1.8.0-werror.patch new file mode 100644 index 000000000000..e008282dbc92 --- /dev/null +++ b/dev-embedded/stlink/files/stlink-1.8.0-werror.patch @@ -0,0 +1,12 @@ +diff '--color=auto' -urN stlink-1.8.0.orig/cmake/modules/c_flags.cmake stlink-1.8.0/cmake/modules/c_flags.cmake +--- a/cmake/modules/c_flags.cmake 2025-04-03 19:45:45.311368396 +0300 ++++ b:wq/cmake/modules/c_flags.cmake 2025-04-03 19:45:58.947322298 +0300 +@@ -44,8 +44,3 @@ + add_cflag_if_supported("-fPIC") + endif() + +-if (${CMAKE_BUILD_TYPE} MATCHES "Debug") +- add_cflag_if_supported("-ggdb") +-else () +- add_cflag_if_supported("-Werror") +-endif() diff --git a/dev-embedded/stlink/metadata.xml b/dev-embedded/stlink/metadata.xml new file mode 100644 index 000000000000..34f42ecf020c --- /dev/null +++ b/dev-embedded/stlink/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>alexxy@gentoo.org</email> + <name>Alexey Shvetsov</name> + </maintainer> +</pkgmetadata> diff --git a/dev-embedded/stlink/stlink-1.8.0.ebuild b/dev-embedded/stlink/stlink-1.8.0.ebuild new file mode 100644 index 000000000000..62ad049c9894 --- /dev/null +++ b/dev-embedded/stlink/stlink-1.8.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit udev xdg cmake + +DESCRIPTION="stm32 discovery line linux programmer" +HOMEPAGE="https://github.com/texane/stlink" +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/texane/stlink.git" + inherit git-r3 +else + SRC_URI="https://github.com/texane/stlink/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="BSD" +SLOT="0" + +RDEPEND=" + virtual/libusb:1 + >=dev-libs/glib-2.32.0:2 + x11-libs/gtk+:3" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( "${FILESDIR}/${P}-werror.patch" ) + +src_configure() { + local mycmakeargs=( + -DSTLINK_UDEV_RULES_DIR="$(get_udevdir)"/rules.d + -DSTLINK_MODPROBED_DIR="${EPREFIX}/etc/modprobe.d" + -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF + ) + + cmake_src_configure +} diff --git a/dev-embedded/stlink/stlink-9999.ebuild b/dev-embedded/stlink/stlink-9999.ebuild new file mode 100644 index 000000000000..e937418ed74f --- /dev/null +++ b/dev-embedded/stlink/stlink-9999.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit udev xdg cmake + +DESCRIPTION="stm32 discovery line linux programmer" +HOMEPAGE="https://github.com/texane/stlink" +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/texane/stlink.git" + inherit git-r3 +else + SRC_URI="https://github.com/texane/stlink/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="BSD" +SLOT="0" + +RDEPEND="virtual/libusb:1 + >=dev-libs/glib-2.32.0:2 + x11-libs/gtk+:3" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_configure() { + local mycmakeargs=( + -DSTLINK_UDEV_RULES_DIR="$(get_udevdir)"/rules.d + -DSTLINK_MODPROBED_DIR="${EPREFIX}/etc/modprobe.d" + -DSTLINK_STATIC_LIB=OFF + -DLIB_INSTALL_DIR:PATH="$(get_libdir)" + ) + + cmake_src_configure +} diff --git a/dev-embedded/stm32flash/Manifest b/dev-embedded/stm32flash/Manifest new file mode 100644 index 000000000000..85abfecea490 --- /dev/null +++ b/dev-embedded/stm32flash/Manifest @@ -0,0 +1 @@ +DIST stm32flash-0.7.tar.gz 380166 BLAKE2B 98522968072821e3cf110e62486a3b9ee90ac6c7e600f6633acbfac904024390157743f0895cae181fc9b20f4f14dc5b833c36e02de4adbfc644c797abd12d63 SHA512 328254dd043dc707cf8c3edf8ddd4a9441c85d9cb2ca1682bcb3f5301d526b04ed6fb335e72a94e3d26341f18bef45968bf321f0ffeb80eaa0c3add6701349ff diff --git a/dev-embedded/stm32flash/metadata.xml b/dev-embedded/stm32flash/metadata.xml new file mode 100644 index 000000000000..8748497326f9 --- /dev/null +++ b/dev-embedded/stm32flash/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="sourceforge">stm32flash</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/stm32flash/stm32flash-0.7.ebuild b/dev-embedded/stm32flash/stm32flash-0.7.ebuild new file mode 100644 index 000000000000..63bbf5e706da --- /dev/null +++ b/dev-embedded/stm32flash/stm32flash-0.7.ebuild @@ -0,0 +1,12 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +DESCRIPTION="Open source flash program for STM32 using the ST serial bootloader" +HOMEPAGE="https://sourceforge.net/projects/stm32flash/" +SRC_URI="https://downloads.sourceforge.net/project/${PN}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" diff --git a/dev-embedded/sunxi-tools/Manifest b/dev-embedded/sunxi-tools/Manifest new file mode 100644 index 000000000000..4879231ae41a --- /dev/null +++ b/dev-embedded/sunxi-tools/Manifest @@ -0,0 +1,2 @@ +DIST sunxi-tools-1.4.2-test.zip 890565 BLAKE2B c24bafde5f049eca61962faf71d9928eb6340c48d619484f6dad1a6d7c1b9dc6f23d0f3f9b3e7847efd68004e70b44b9637d27bec8a97e6e3772b4003f3d25db SHA512 7763d60094f990e42bf57ae3e72f19dfb52cc6573777bf8c9a01bc5c1598505b067645f88b04955ae2b0f9456140e6bcb8eab31526e6e94fa28e826a80da7172 +DIST sunxi-tools-1.4.2.tar.gz 84090 BLAKE2B b3261855eb9a18025c19829e343e3e2e7097dc4e267a60fdcf39cd2e9bfa57580267a77846a576ea5fc04a07fd6ba90b1223a8c644c933879dc7aa766ba36210 SHA512 633bc1752ae11799ce0bae347b52296792d28265a2260e173727847e1f457b767e88d02ae547bb55a2bb05e1eb552ba4406985ae105a1712a9fa30852ae293e8 diff --git a/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-fix-strncpy-compiler-warning.patch b/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-fix-strncpy-compiler-warning.patch new file mode 100644 index 000000000000..a255e61f3f01 --- /dev/null +++ b/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-fix-strncpy-compiler-warning.patch @@ -0,0 +1,42 @@ +From 0825d9aaa6078ef283390662004797a9a1d939f3 Mon Sep 17 00:00:00 2001 +From: Andre Przywara <andre.przywara@arm.com> +Date: Wed, 15 Dec 2021 23:04:14 +0000 +Subject: [PATCH 1/2] nandpart: fix strncpy compiler warning + +More recent versions of GCC warns about the usage of strncpy in +nandpart.c: we actually only (need to) copy the stub string part of the +magic string, without the terminating NUL character. This is fine in +our particular case, but raises the compiler's eyebrows: +=================== +nand-part.c: In function '_get_mbr': +nand-part.c:93:4: warning: 'strncpy' output truncated before terminating + nul copying 8 bytes from a string of the same length + [-Wstringop-truncation] + 93 | strncpy((char *)mbr->magic, MBR_MAGIC, 8); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=================== + +Switch to the more fitting memcpy() here to avoid the warning. + +Signed-off-by: Andre Przywara <andre.przywara@arm.com> +Reported-by: slange-dev +--- + nand-part.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/nand-part.c b/nand-part.c +index a0d46c5..af2169d 100644 +--- a/nand-part.c ++++ b/nand-part.c +@@ -90,7 +90,7 @@ static MBR *_get_mbr(int fd, int mbr_num, int force) + printf("check partition table copy %d: ", mbr_num); + printmbrheader(mbr); + if (force) { +- strncpy((char *)mbr->magic, MBR_MAGIC, 8); ++ memcpy(mbr->magic, MBR_MAGIC, 8); + mbr->version = MBR_VERSION; + return mbr; + } +-- +2.32.0 + diff --git a/dev-embedded/sunxi-tools/metadata.xml b/dev-embedded/sunxi-tools/metadata.xml new file mode 100644 index 000000000000..b6a0100ff814 --- /dev/null +++ b/dev-embedded/sunxi-tools/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="github">linux-sunxi/sunxi-tools</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/sunxi-tools/sunxi-tools-1.4.2.ebuild b/dev-embedded/sunxi-tools/sunxi-tools-1.4.2.ebuild new file mode 100644 index 000000000000..7e47831f7c38 --- /dev/null +++ b/dev-embedded/sunxi-tools/sunxi-tools-1.4.2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit toolchain-funcs + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/linux-sunxi/sunxi-tools" + PROPERTIES="test_network" + RESTRICT="test" + RDEPEND="sys-apps/dtc + virtual/zlib:=" +else + KEYWORDS="amd64" + # We need this as zip, it is used during src_test + SRC_URI="https://github.com/linux-sunxi/sunxi-tools/archive/v${PV}.tar.gz -> ${P}.tar.gz + test? ( https://github.com/linux-sunxi/sunxi-boards/archive/bc7410fed9e5d9b31cd1d6ae90462d06b513660e.zip \ + -> ${P}-test.zip )" + RESTRICT="!test? ( test )" + + PATCHES=( + "${FILESDIR}/${PN}-1.4.1-fix-strncpy-compiler-warning.patch" + ) +fi + +DESCRIPTION="A collection of command line tools for ARM devices with Allwinner SoCs" +HOMEPAGE="https://linux-sunxi.org/Main_Page" + +LICENSE="GPL-2" +SLOT="0" +IUSE="test" + +RDEPEND+=" acct-group/plugdev + virtual/libusb:1 + virtual/udev" + +DEPEND="${RDEPEND} +" + +BDEPEND="virtual/pkgconfig + test? ( app-arch/unzip )" + +src_unpack() { + if [[ ${PV} = *9999* ]]; then + git-r3_src_unpack + else + unpack ${P}.tar.gz + # No need to unpack testdata twice + fi +} + +src_prepare() { + default + + if [[ ${PV} != *9999* ]] && use test; then + cp "${DISTDIR}/${P}-test.zip" "${S}/tests/sunxi-boards.zip" || die + sed -i 's$sunxi-boards-master$sunxi-boards-bc7410fed9e5d9b31cd1d6ae90462d06b513660e$' tests/Makefile || die + sed -i 's|^coverage:.*|coverage: $(BOARDS_DIR)/README|' tests/Makefile || die + fi +} + +src_compile() { + tc-export PKG_CONFIG + + emake LIBUSB_CFLAGS="$(${PKG_CONFIG} --cflags libusb-1.0)" \ + LIBUSB_LIBS="$(${PKG_CONFIG} --libs libusb-1.0)" \ + CC="$(tc-getCC)" tools misc +} + +src_install() { + dobin bin2fex fex2bin phoenix_info sunxi-nand-image-builder + newbin sunxi-bootinfo bootinfo + newbin sunxi-fel fel + newbin sunxi-fexc fexc + newbin sunxi-nand-part nand-part +} diff --git a/dev-embedded/sunxi-tools/sunxi-tools-9999.ebuild b/dev-embedded/sunxi-tools/sunxi-tools-9999.ebuild new file mode 100644 index 000000000000..261b1776b3d3 --- /dev/null +++ b/dev-embedded/sunxi-tools/sunxi-tools-9999.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit toolchain-funcs + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/linux-sunxi/sunxi-tools" + PROPERTIES="test_network" + RESTRICT="test" + RDEPEND="sys-apps/dtc + virtual/zlib:=" +else + KEYWORDS="~amd64" + # We need this as zip, it is used during src_test + SRC_URI="https://github.com/linux-sunxi/sunxi-tools/archive/v${PV}.tar.gz -> ${P}.tar.gz + test? ( https://github.com/linux-sunxi/sunxi-boards/archive/bc7410fed9e5d9b31cd1d6ae90462d06b513660e.zip \ + -> ${P}-test.zip )" + RESTRICT="!test? ( test )" + + PATCHES=( + "${FILESDIR}/${PN}-1.4.1-fix-strncpy-compiler-warning.patch" + ) +fi + +DESCRIPTION="A collection of command line tools for ARM devices with Allwinner SoCs" +HOMEPAGE="https://linux-sunxi.org/Main_Page" + +LICENSE="GPL-2" +SLOT="0" +IUSE="test" + +RDEPEND+=" acct-group/plugdev + virtual/libusb:1 + virtual/udev" + +DEPEND="${RDEPEND} +" + +BDEPEND="virtual/pkgconfig + test? ( app-arch/unzip )" + +src_unpack() { + if [[ ${PV} = *9999* ]]; then + git-r3_src_unpack + else + unpack ${P}.tar.gz + # No need to unpack testdata twice + fi +} + +src_prepare() { + default + + if [[ ${PV} != *9999* ]] && use test; then + cp "${DISTDIR}/${P}-test.zip" "${S}/tests/sunxi-boards.zip" || die + sed -i 's$sunxi-boards-master$sunxi-boards-bc7410fed9e5d9b31cd1d6ae90462d06b513660e$' tests/Makefile || die + sed -i 's|^coverage:.*|coverage: $(BOARDS_DIR)/README|' tests/Makefile || die + fi +} + +src_compile() { + tc-export PKG_CONFIG + + emake LIBUSB_CFLAGS="$(${PKG_CONFIG} --cflags libusb-1.0)" \ + LIBUSB_LIBS="$(${PKG_CONFIG} --libs libusb-1.0)" \ + CC="$(tc-getCC)" tools misc +} + +src_install() { + dobin bin2fex fex2bin phoenix_info sunxi-nand-image-builder + newbin sunxi-bootinfo bootinfo + newbin sunxi-fel fel + newbin sunxi-fexc fexc + newbin sunxi-nand-part nand-part +} diff --git a/dev-embedded/u-boot-tools/Manifest b/dev-embedded/u-boot-tools/Manifest new file mode 100644 index 000000000000..dddf6589185c --- /dev/null +++ b/dev-embedded/u-boot-tools/Manifest @@ -0,0 +1,3 @@ +DIST u-boot-2024.01.tar.bz2 19926911 BLAKE2B c62a22f56276426917b0db508ad7dc82efa4fe7be14c5e7d79ecdea172b2b383981b7e65b7e920b196d0162a17fb362ef97a8d758a1b30e509e3c66748d2c106 SHA512 45bd093ba3bda23e43cdde83d8656c1ee1348ac2886ecff1fee475f101ac4965a5be6565408fa5b990c723f3fdc833edfca60a719f735a43040cd14a1b59a88b +DIST u-boot-2025.01.tar.bz2 32890299 BLAKE2B fc25edd7079de9ef803508b1686b6ac1778e637325a38d9fcb5ba66c875a31132456b6ee429200284a0ba48802db50ea33267dafe066b89481eff3c11882d763 SHA512 e22202b568f90de15e4e20317e13d68ce106256eadeeae5017241cdd4a1d133cdfd14297b403c7391bf65d022061ad4e1cbe862c480fddbd13f97b756305f188 +DIST u-boot-tools-2024.01-fix-invalid-escape-sequence.patch 1285 BLAKE2B ad0af975b59794f21a44472a1f1b4542e75e478d51e649a6c339a4af9963cb4b822e6eba6819cbd3d35c09f3c33f1995288ef296e07466a427cf1f0dd0a399e1 SHA512 8675c267ca5a234924bdf8fc03dcaf75501cf86ac7a9b2e7fbc7982b9620e8863af289c124c5e91cccee58cc116b4d2798be745dedc1b28099a143f3464ad4d6 diff --git a/dev-embedded/u-boot-tools/files/u-boot-tools-2025.01-no-bundled-dtc.patch b/dev-embedded/u-boot-tools/files/u-boot-tools-2025.01-no-bundled-dtc.patch new file mode 100644 index 000000000000..33cd6731ee19 --- /dev/null +++ b/dev-embedded/u-boot-tools/files/u-boot-tools-2025.01-no-bundled-dtc.patch @@ -0,0 +1,27 @@ +Don't attempt to build the bundled dtc as we're not going to use it, +and it would require dtc[python] too anyway. +--- a/Makefile ++++ b/Makefile +@@ -594,7 +594,7 @@ else + # Carefully list dependencies so we do not try to build scripts twice + # in parallel + PHONY += scripts +-scripts: scripts_basic scripts_dtc include/config/auto.conf ++scripts: scripts_basic include/config/auto.conf + $(Q)$(MAKE) $(build)=$(@) + + ifeq ($(dot-config),1) +@@ -2057,11 +2057,11 @@ endif + + ifneq ($(dtstree),) + +-%.dtb: prepare3 scripts_dtc ++%.dtb: prepare3 + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + + PHONY += dtbs dtbs_install +-dtbs: prepare3 scripts_dtc ++dtbs: prepare3 + $(Q)$(MAKE) $(build)=$(dtstree) + + dtbs_install: diff --git a/dev-embedded/u-boot-tools/metadata.xml b/dev-embedded/u-boot-tools/metadata.xml new file mode 100644 index 000000000000..3f0bca1137e1 --- /dev/null +++ b/dev-embedded/u-boot-tools/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <use> + <flag name="envtools">Build only the target-side environment tools</flag> + </use> +</pkgmetadata> diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r2.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r2.ebuild new file mode 100644 index 000000000000..ef729c46f5ea --- /dev/null +++ b/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r2.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="u-boot-${PV/_/-}" +DESCRIPTION="utilities for working with Das U-Boot" +HOMEPAGE="https://www.denx.de/wiki/U-Boot/WebHome" +SRC_URI=" + https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2 + https://github.com/u-boot/u-boot/commit/88b9b9c44c859bdd9bb227e2fdbc4cbf686c3343.patch + -> u-boot-tools-2024.01-fix-invalid-escape-sequence.patch +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86" +IUSE="envtools" + +RDEPEND=" + dev-libs/openssl:= + net-libs/gnutls:= + sys-apps/dtc[python] + sys-apps/util-linux:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/swig + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig +" + +PATCHES=( + # https://github.com/u-boot/u-boot/pull/489 + "${DISTDIR}"/u-boot-tools-2024.01-fix-invalid-escape-sequence.patch +) + +src_prepare() { + default + sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ + scripts/kconfig/{g,m,n,q}conf-cfg.sh \ + scripts/kconfig/Makefile \ + tools/Makefile || die +} + +src_configure() { + tc-export AR BUILD_CC CC PKG_CONFIG + tc-export_build_env +} + +src_compile() { + # Unset a few KBUILD variables. Bug #540476 + unset KBUILD_OUTPUT KBUILD_SRC + + local myemakeargs=( + V=1 + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}"' $(HOSTCPPFLAGS)' + HOSTLDFLAGS="${BUILD_LDFLAGS}" + ) + + emake "${myemakeargs[@]}" tools-only_defconfig + + emake "${myemakeargs[@]}" \ + NO_SDL=1 \ + HOSTSTRIP=: \ + STRIP=: \ + CONFIG_ENV_OVERWRITE=y \ + $(usex envtools envtools tools-all) +} + +src_test() { :; } + +src_install() { + cd tools || die + + if ! use envtools; then + dobin dumpimage fdtgrep gen_eth_addr img2srec mkeficapsule mkenvimage mkimage + fi + + dobin env/fw_printenv + + dosym fw_printenv /usr/bin/fw_setenv + + insinto /etc + doins env/fw_env.config + + doman ../doc/mkimage.1 +} diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r3.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r3.ebuild new file mode 100644 index 000000000000..d58691bd9cf0 --- /dev/null +++ b/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r3.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="u-boot-${PV/_/-}" +DESCRIPTION="utilities for working with Das U-Boot" +HOMEPAGE="https://www.denx.de/wiki/U-Boot/WebHome" +SRC_URI=" + https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2 + https://github.com/u-boot/u-boot/commit/88b9b9c44c859bdd9bb227e2fdbc4cbf686c3343.patch + -> u-boot-tools-2024.01-fix-invalid-escape-sequence.patch +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="envtools" + +RDEPEND=" + dev-libs/openssl:= + net-libs/gnutls:= + sys-apps/dtc[python] + sys-apps/util-linux:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/swig + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig +" + +PATCHES=( + # https://github.com/u-boot/u-boot/pull/489 + "${DISTDIR}"/u-boot-tools-2024.01-fix-invalid-escape-sequence.patch +) + +src_prepare() { + default + sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ + scripts/kconfig/{g,m,n,q}conf-cfg.sh \ + scripts/kconfig/Makefile \ + tools/Makefile || die + sed -i -e 's/cross_tools: tools/& envtools /' "${S}/Makefile" +} + +src_configure() { + tc-export AR BUILD_CC CC PKG_CONFIG + tc-export_build_env +} + +src_compile() { + # Unset a few KBUILD variables. Bug #540476 + unset KBUILD_OUTPUT KBUILD_SRC + + if [[ ${CBUILD} != ${CHOST} ]] ; then + local myemakeargs=( + CROSS_COMPILE="${CHOST}"- + CROSS_BUILD=y + ) + local maketarget=$(usex envtools envtools cross_tools) + else + local myemakeargs=( + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' + HOSTLDFLAGS="${LDFLAGS}" + ) + local maketarget=$(usex envtools envtools tools-all) + fi + + myemakeargs+=( + V=1 + ) + + emake "${myemakeargs[@]}" tools-only_defconfig + + emake "${myemakeargs[@]}" \ + NO_SDL=1 \ + HOSTSTRIP=: \ + STRIP=: \ + CONFIG_ENV_OVERWRITE=y \ + "${maketarget}" +} + +src_test() { :; } + +src_install() { + cd tools || die + + if ! use envtools; then + dobin dumpimage fdtgrep img2srec mkeficapsule mkenvimage mkimage + fi + + if [[ ${CBUILD} == ${CHOST} ]]; then + dobin gen_eth_addr + fi + + dobin env/fw_printenv + + dosym fw_printenv /usr/bin/fw_setenv + + insinto /etc + doins env/fw_env.config + + doman ../doc/mkimage.1 +} diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r2.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r2.ebuild new file mode 100644 index 000000000000..50bb0d3033eb --- /dev/null +++ b/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r2.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="u-boot-${PV/_/-}" +DESCRIPTION="utilities for working with Das U-Boot" +HOMEPAGE="https://www.denx.de/wiki/U-Boot/WebHome" +SRC_URI=" + https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2 +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86" +IUSE="envtools" + +RDEPEND=" + dev-libs/openssl:= + net-libs/gnutls:= + >=sys-apps/dtc-1.4.6 + sys-apps/util-linux:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/swig + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-2025.01-no-bundled-dtc.patch +) + +src_prepare() { + default + sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ + scripts/kconfig/{g,m,n,q}conf-cfg.sh \ + scripts/kconfig/Makefile \ + tools/Makefile || die +} + +src_configure() { + tc-export AR BUILD_CC CC PKG_CONFIG + tc-export_build_env +} + +src_compile() { + # Unset a few KBUILD variables. Bug #540476 + unset KBUILD_OUTPUT KBUILD_SRC + + local myemakeargs=( + V=1 + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}"' $(HOSTCPPFLAGS)' + HOSTLDFLAGS="${BUILD_LDFLAGS}" + DTC="dtc" + # Provided by sys-apps/dtc[python] + NO_PYTHON=1 + ) + + emake "${myemakeargs[@]}" tools-only_defconfig + emake "${myemakeargs[@]}" \ + NO_SDL=1 \ + HOSTSTRIP=: \ + STRIP=: \ + CONFIG_ENV_OVERWRITE=y \ + $(usex envtools envtools tools-all) +} + +src_test() { :; } + +src_install() { + cd tools || die + + if ! use envtools; then + dobin dumpimage fdtgrep gen_eth_addr img2srec mkeficapsule mkenvimage mkimage + fi + + dobin env/fw_printenv + + dosym fw_printenv /usr/bin/fw_setenv + + insinto /etc + doins env/fw_env.config + + doman ../doc/mkimage.1 +} diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r3.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r3.ebuild new file mode 100644 index 000000000000..6f739854c3a9 --- /dev/null +++ b/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r3.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="u-boot-${PV/_/-}" +DESCRIPTION="utilities for working with Das U-Boot" +HOMEPAGE="https://www.denx.de/wiki/U-Boot/WebHome" +SRC_URI=" + https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2 +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="envtools" + +RDEPEND=" + dev-libs/openssl:= + net-libs/gnutls:= + >=sys-apps/dtc-1.4.6 + sys-apps/util-linux:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/swig + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-2025.01-no-bundled-dtc.patch +) + +src_prepare() { + default + sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ + scripts/kconfig/{g,m,n,q}conf-cfg.sh \ + scripts/kconfig/Makefile \ + tools/Makefile || die + sed -i -e 's/cross_tools: tools/& envtools /' "${S}/Makefile" +} + +src_configure() { + tc-export AR BUILD_CC CC PKG_CONFIG + tc-export_build_env +} + +src_compile() { + # Unset a few KBUILD variables. Bug #540476 + unset KBUILD_OUTPUT KBUILD_SRC + + if [[ ${CBUILD} != ${CHOST} ]] ; then + local myemakeargs=( + CROSS_COMPILE="${CHOST}"- + CROSS_BUILD=y + ) + local maketarget=$(usex envtools envtools cross_tools) + else + local myemakeargs=( + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' + HOSTLDFLAGS="${LDFLAGS}" + ) + local maketarget=$(usex envtools envtools tools-all) + fi + + myemakeargs+=( + V=1 + DTC="dtc" + # Provided by sys-apps/dtc[python] + NO_PYTHON=1 + ) + + emake "${myemakeargs[@]}" tools-only_defconfig + emake "${myemakeargs[@]}" \ + NO_SDL=1 \ + HOSTSTRIP=: \ + STRIP=: \ + CONFIG_ENV_OVERWRITE=y \ + "${maketarget}" +} + +src_test() { :; } + +src_install() { + cd tools || die + + if ! use envtools; then + dobin dumpimage fdtgrep img2srec mkeficapsule mkenvimage mkimage + fi + + if [[ ${CBUILD} == ${CHOST} ]]; then + dobin gen_eth_addr + fi + + dobin env/fw_printenv + + dosym fw_printenv /usr/bin/fw_setenv + + insinto /etc + doins env/fw_env.config + + doman ../doc/mkimage.1 +} diff --git a/dev-embedded/uisp/Manifest b/dev-embedded/uisp/Manifest new file mode 100644 index 000000000000..747fd9973b27 --- /dev/null +++ b/dev-embedded/uisp/Manifest @@ -0,0 +1 @@ +DIST uisp-20050207.tar.gz 166745 BLAKE2B a99bd0d39a053797d3dee0a4390d0ffcca014bed465ba2aea3e99022fff8c3f5f4dbe96a0e33422ffcfa33621d94f42d37dac17862fd25e7902b3bf79aa90692 SHA512 1dd62d97c2a459abaed4ce60302e7153564d0fd87689c40d175757549fe8e797749fd2f76c6c02bcb85e56600d7e4c790c396dc2b56e152ead486df8e1bc2fe7 diff --git a/dev-embedded/uisp/files/uisp-20050207-autotools.patch b/dev-embedded/uisp/files/uisp-20050207-autotools.patch new file mode 100644 index 000000000000..824ccf3b2b57 --- /dev/null +++ b/dev-embedded/uisp/files/uisp-20050207-autotools.patch @@ -0,0 +1,35 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -44,20 +44,8 @@ + MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure src/config-h.in \ + src/stamp-h.in $(AUX_DIST) + +-install_aux_files = AUTHORS COPYING INSTALL CHANGES CHANGES.old TODO \ ++dist_doc_DATA = AUTHORS CHANGES CHANGES.old TODO \ + ChangeLog ChangeLog-2003 ChangeLog-2002 + +-DOC_INST_DIR = $(DESTDIR)$(datadir)/doc/uisp-$(VERSION) +- +-install-data-local: +- $(mkinstalldirs) $(DOC_INST_DIR) +- for file in $(install_aux_files) ; do \ +- echo " $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$$file"; \ +- $(INSTALL_DATA) $(srcdir)/$$file $(DOC_INST_DIR)/$$file; \ +- done +- +-uninstall-local: +- rm -rf $(DOC_INST_DIR) +- + dist-hook: uisp.spec + cp uisp.spec $(distdir)/uisp.spec +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -31,7 +31,7 @@ + # Turn on all warnings and consider them errors. This kinda forces you to have + # to use gcc, but I'd rather have all warnings eliminated. + +-AM_CXXFLAGS = -Wall -Werror ++AM_CXXFLAGS = -Wall + + bin_PROGRAMS = uisp + uisp_SOURCES = \ diff --git a/dev-embedded/uisp/files/uisp-20050207-clang.patch b/dev-embedded/uisp/files/uisp-20050207-clang.patch new file mode 100644 index 000000000000..c08943b9d9b1 --- /dev/null +++ b/dev-embedded/uisp/files/uisp-20050207-clang.patch @@ -0,0 +1,84 @@ +--- a/src/AvrAtmel.C ++++ b/src/AvrAtmel.C +@@ -185,7 +185,7 @@ + + void TAvrAtmel::SetAddress(TAddr addr){ + apc_address = addr; +- TByte setAddr [3] = { 'A', (addr>>8)&0xff, addr&0xff}; ++ TByte setAddr [3] = { 'A', static_cast<TByte>((addr>>8)&0xff), static_cast<TByte>(addr&0xff)}; + Send(setAddr, 3, 1); + CheckResponse(setAddr [0]); + } +@@ -294,7 +294,7 @@ + if (flush_buffer){WriteProgramMemoryPage();} + } + +- TByte wrF [2] = { (addr&1)?'C':'c', byte }; ++ TByte wrF [2] = { static_cast<TByte>((addr&1)?'C':'c'), byte }; + + if (apc_address!=(addr>>1) || apc_autoinc==false) SetAddress (addr>>1); + if (wrF[0]=='C') apc_address++; +@@ -346,7 +346,7 @@ + */ + void TAvrAtmel::WriteOldFuseBits (TByte val) + { +- TByte buf[5] = {'.', 0xac, (val & 0x1f) | 0xa0, 0x00, 0xd2 }; ++ TByte buf[5] = {'.', 0xac, static_cast<TByte>((val & 0x1f) | 0xa0), 0x00, 0xd2 }; + Info (2, "Write fuse high bits: %02x\n", (int)val); + Send (buf, 5, 2); + CheckResponse (buf[1]); +@@ -423,7 +423,7 @@ + } + + void TAvrAtmel::WriteLockBits(TByte bits){ +- TByte lockTarget [2] = { 'l', 0xF9 | ((bits << 1) & 0x06) }; ++ TByte lockTarget [2] = { 'l', static_cast<TByte>(0xF9 | ((bits << 1) & 0x06)) }; + Send (lockTarget, 2, 1); + CheckResponse(lockTarget [0]); + Info(1, "Writing lock bits ...\nReinitializing device\n"); +--- a/src/AvrDummy.C ++++ b/src/AvrDummy.C +@@ -81,12 +81,12 @@ + TAvrDummy::GetPartInfo(TAddr addr) + { + if (at89) { +- TByte info [4] = { 0x28, addr & 0x1f, 0, 0 }; ++ TByte info [4] = { 0x28, static_cast<TByte>(addr & 0x1f), 0, 0 }; + Send(info, 4); + return info[3]; + } + +- TByte info [4] = { 0x30, 0, addr, 0 }; ++ TByte info [4] = { 0x30, 0, static_cast<TByte>(addr), 0 }; + Send(info, 4); + return info[3]; + } +@@ -289,7 +289,7 @@ + void + TAvrDummy::WriteOldFuseBits(TByte val) + { +- TByte oldfuse[4] = { 0xAC, (val & 0x1F) | 0xA0, 0, 0xD2 }; ++ TByte oldfuse[4] = { 0xAC, static_cast<TByte>((val & 0x1F) | 0xA0), 0, 0xD2 }; + Send(oldfuse, 4); + } + +@@ -533,7 +533,7 @@ + { + /* This handles both old (byte 2, bits 1-2) + and new (byte 4, bits 0-5) devices. */ +- TByte lock[4] = { 0xAC, 0xF9 | ((bits << 1) & 0x06), 0xFF, bits }; ++ TByte lock[4] = { 0xAC, static_cast<TByte>(0xF9 | ((bits << 1) & 0x06)), 0xFF, bits }; + TByte rbits; + + if (at89) +--- a/src/Stk500.C ++++ b/src/Stk500.C +@@ -518,7 +518,7 @@ + + TByte TStk500::ReadCalFuseBits(int addr) + { +- TByte cmd[] = { 0x38, 0x00, addr, 0x00 }; ++ TByte cmd[] = { 0x38, 0x00, static_cast<TByte>(addr), 0x00 }; + + return UniversalCmd(cmd); + } diff --git a/dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch b/dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch new file mode 100644 index 000000000000..dad337b740a7 --- /dev/null +++ b/dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch @@ -0,0 +1,29 @@ +diff -Nura uisp-20050207/src/Avr.C uisp-20050207+mega-48-88-168/src/Avr.C +--- uisp-20050207/src/Avr.C 2005-02-07 19:55:08.000000000 -0300 ++++ uisp-20050207+mega-48-88-168/src/Avr.C 2005-06-28 17:11:15.000000000 -0300 +@@ -77,7 +77,7 @@ + /* no longer in production? -> use 8515, 8535 instead */ + { "AT90S4414", 0x92, 0x01, 4096, 0, 256, 4000, 4000, AVR_2313 }, + { "AT90S4434", 0x92, 0x02, 4096, 0, 256, 4000, 4000, AVR_8535 }, +- { "ATmega48", 0x92, 0x05, 4096, 0, 256, 4000, 4000, AVR_M163 }, ++ { "ATmega48", 0x92, 0x05, 4096, 32, 256, 2000, 1500, AVR_M163 }, + + { "AT90S8515", 0x93, 0x01, 8192, 0, 512, 4000, 4000, AVR_2313 }, + { "AT90S8535", 0x93, 0x03, 8192, 0, 512, 4000, 4000, AVR_8535 }, +@@ -90,7 +90,7 @@ + { "ATmega8515", 0x93, 0x06, 8192, 64, 512, 4500, 9000, AVR_M163 }, + { "ATmega8", 0x93, 0x07, 8192, 64, 512, 4500, 9000, AVR_M163 }, + { "ATmega8535", 0x93, 0x08, 8192, 64, 512, 4500, 9000, AVR_M163 }, +- { "ATmega88", 0x93, 0x0a, 8192, 64, 512, 4000, 4000, AVR_M163 }, ++ { "ATmega88", 0x93, 0x0a, 8192, 64, 512, 2000, 1500, AVR_M163 }, + + #if 0 + /* 12V parallel programming only; here just for the evidence */ +@@ -101,6 +101,7 @@ + { "ATmega163", 0x94, 0x02, 16384, 128, 512, 15000, 3800, AVR_M163 }, + { "ATmega16", 0x94, 0x03, 16384, 128, 512, 4500, 9000, AVR_M163 }, + { "ATmega162", 0x94, 0x04, 16384, 128, 512, 4500, 9000, AVR_M128 }, ++ { "ATmega168", 0x94, 0x06, 16384, 128, 512, 2000, 1500, AVR_M163 }, + { "ATmega169", 0x94, 0x05, 16384, 128, 512, 4500, 9000, AVR_M128 }, + + { "ATmega323", 0x95, 0x01, 32768, 128, 1024, 15000, 3800, AVR_M163 }, diff --git a/dev-embedded/uisp/metadata.xml b/dev-embedded/uisp/metadata.xml new file mode 100644 index 000000000000..e7bfe1daed8f --- /dev/null +++ b/dev-embedded/uisp/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <upstream> + <remote-id type="savannah-nongnu">uisp</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/uisp/uisp-20050207-r1.ebuild b/dev-embedded/uisp/uisp-20050207-r1.ebuild new file mode 100644 index 000000000000..3db55410303d --- /dev/null +++ b/dev-embedded/uisp/uisp-20050207-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Tool for programming AVR microcontroller through the parallel port" +HOMEPAGE="https://savannah.nongnu.org/projects/uisp" +SRC_URI="https://savannah.nongnu.org/download/uisp/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +PATCHES=( + "${FILESDIR}"/${P}-autotools.patch + "${FILESDIR}"/${P}-mega-48-88-168.patch + "${FILESDIR}"/${P}-clang.patch +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + default + dodoc -r doc/. +} diff --git a/dev-embedded/upslug2/Manifest b/dev-embedded/upslug2/Manifest new file mode 100644 index 000000000000..50fa107d455b --- /dev/null +++ b/dev-embedded/upslug2/Manifest @@ -0,0 +1 @@ +DIST upslug2-11.tar.gz 129619 BLAKE2B fd29b7d238f559be8469b4a5f818d9488ee89aef21303981020b5a8526c0537b707beae9b7ccef11c2a6398507dfefd98880d2f5e9ca5e8394b621b5e2d0f207 SHA512 6814a237387b60aa20cc26bbd7ff9e886510d627849b13097e7473aa38501810b1d1871cfdc4f5a44eea2b375c3b58b1e59dcfd5b39178de33600b2a0aa94117 diff --git a/dev-embedded/upslug2/metadata.xml b/dev-embedded/upslug2/metadata.xml new file mode 100644 index 000000000000..9ea6cf98a4cb --- /dev/null +++ b/dev-embedded/upslug2/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <maintainer type="project"> + <email>arm@gentoo.org</email> + <name>ARM architecture team</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">nslu</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/upslug2/upslug2-11.ebuild b/dev-embedded/upslug2/upslug2-11.ebuild new file mode 100644 index 000000000000..a9b7a438147f --- /dev/null +++ b/dev-embedded/upslug2/upslug2-11.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="util for flashing NSLU2 machines remotely" +HOMEPAGE="http://www.nslu2-linux.org/wiki/Main/UpSlug2" +SRC_URI="https://downloads.sourceforge.net/nslu/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 ~arm x86" + +src_configure() { + econf --sbindir "${EPREFIX}"/usr/bin +} + +src_install() { + default + fperms 4711 /usr/bin/upslug2 +} diff --git a/dev-embedded/urjtag/Manifest b/dev-embedded/urjtag/Manifest new file mode 100644 index 000000000000..6799f1ccf0d8 --- /dev/null +++ b/dev-embedded/urjtag/Manifest @@ -0,0 +1 @@ +DIST urjtag-2021.03.tar.xz 1208440 BLAKE2B 68d0f0ec15c25ef351e0523eea21c18e723871032a046d31c031809a2774b0b8339b0b5d1a6f11a681ab3d3074b7f5f4fcd819fa7de1fdcac5f20ab39c6a40dd SHA512 baf203e556d1d41437539d3f5c018b35fbb496f71391c2bec2786ffa47bff33d38654b3e7d106e38bcf36d075d86fc02b18eaaf634cdb65e2840ff50ca0da8b2 diff --git a/dev-embedded/urjtag/files/urjtag-2021.03-fix-python-setup.patch b/dev-embedded/urjtag/files/urjtag-2021.03-fix-python-setup.patch new file mode 100644 index 000000000000..c6206fefee2e --- /dev/null +++ b/dev-embedded/urjtag/files/urjtag-2021.03-fix-python-setup.patch @@ -0,0 +1,14 @@ +Subject: [PATCH] python: replace distutils with setuptools + +distutils is deprecated for sometime and it was removed in python 3.12. + +--- a/bindings/python/setup.py.in 2018-03-24 20:27:41.000000000 +0800 ++++ b/bindings/python/setup.py.in 2023-08-06 10:31:12.932358441 +0800 +@@ -1,6 +1,6 @@ + # python extension setup script for urjtag + +-from distutils.core import setup, Extension ++from setuptools import setup, Extension + + libraries = ['urjtag'] + libraries.extend( w.replace('-l', '') for w in "@LIBFTDI_LIBS@ @FTD2XXLIB@ @LIBUSB_LIBS@ @LIBINTL@".split() if w.replace('-l', '') not in libraries ) diff --git a/dev-embedded/urjtag/metadata.xml b/dev-embedded/urjtag/metadata.xml new file mode 100644 index 000000000000..2ce3bba27d55 --- /dev/null +++ b/dev-embedded/urjtag/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <use> + <flag name="ftd2xx">Enable support for USB FTDI chips via <pkg>dev-embedded/libftd2xx</pkg></flag> + <flag name="ftdi">Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag> + </use> + <upstream> + <remote-id type="sourceforge">urjtag</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-embedded/urjtag/urjtag-2021.03.ebuild b/dev-embedded/urjtag/urjtag-2021.03.ebuild new file mode 100644 index 000000000000..b4a06530d68d --- /dev/null +++ b/dev-embedded/urjtag/urjtag-2021.03.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit python-r1 + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://git.code.sf.net/p/urjtag/git" + inherit git-r3 autotools + S="${WORKDIR}/${P}/${PN}" +else + SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${P}.tar.xz" + KEYWORDS="amd64 ppc ~sparc x86" +fi + +DESCRIPTION="Tool for communicating over JTAG with flash chips, CPUs, and many more" +HOMEPAGE="https://urjtag.sourceforge.io/" + +LICENSE="GPL-2" +SLOT="0" + +IUSE="ftdi ftd2xx python readline usb" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="ftdi? ( dev-embedded/libftdi:1 ) + ftd2xx? ( dev-embedded/libftd2xx ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:= ) + usb? ( virtual/libusb:1 )" +RDEPEND="${DEPEND}" +BDEPEND=" + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2021.03-fix-python-setup.patch" +) + +src_prepare() { + default + + if [[ ${PV} == "9999" ]] ; then + mkdir -p m4 || die + eautopoint + eautoreconf + fi +} + +src_configure() { + econf \ + --disable-werror \ + --disable-python \ + $(use_with readline) \ + $(use_with ftdi libftdi) \ + $(use_with ftd2xx) \ + $(use_with usb libusb 1.0) +} + +src_compile() { + use python && python_copy_sources + + emake +} + +src_install() { + default + + if use python; then + installation() { + cd bindings/python || die + ln -s "${S}"/src/.libs ../../src/.libs || die + "${EPYTHON}" setup.py install \ + --root="${D}" \ + --prefix="${EPREFIX}/usr" || die + } + python_foreach_impl run_in_build_dir installation + python_foreach_impl python_optimize + fi + + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-embedded/urjtag/urjtag-9999.ebuild b/dev-embedded/urjtag/urjtag-9999.ebuild new file mode 100644 index 000000000000..0eefd10dfc3b --- /dev/null +++ b/dev-embedded/urjtag/urjtag-9999.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +inherit python-r1 + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://git.code.sf.net/p/urjtag/git" + inherit git-r3 autotools + S="${WORKDIR}/${P}/${PN}" +else + SRC_URI="https://downloads.sourceforge.net/urjtag/${P}.tar.xz" + KEYWORDS="~amd64 ~ppc ~sparc ~x86" +fi + +DESCRIPTION="Tool for communicating over JTAG with flash chips, CPUs, and many more" +HOMEPAGE="https://urjtag.sourceforge.io/" + +LICENSE="GPL-2" +SLOT="0" + +IUSE="ftdi ftd2xx python readline usb" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="ftdi? ( dev-embedded/libftdi:1 ) + ftd2xx? ( dev-embedded/libftd2xx ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:= ) + usb? ( virtual/libusb:1 )" +RDEPEND="${DEPEND}" +BDEPEND=" + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2021.03-fix-python-setup.patch" +) + +src_prepare() { + default + + if [[ ${PV} == "9999" ]] ; then + mkdir -p m4 || die + eautopoint + eautoreconf + fi +} + +src_configure() { + econf \ + --disable-werror \ + --disable-python \ + $(use_with readline) \ + $(use_with ftdi libftdi) \ + $(use_with ftd2xx) \ + $(use_with usb libusb 1.0) +} + +src_compile() { + use python && python_copy_sources + + emake +} + +src_install() { + default + + if use python; then + installation() { + cd bindings/python || die + ln -s "${S}"/src/.libs ../../src/.libs || die + "${EPYTHON}" setup.py install \ + --root="${D}" \ + --prefix="${EPREFIX}/usr" || die + } + python_foreach_impl run_in_build_dir installation + python_foreach_impl python_optimize + fi + + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-embedded/usbprog/Manifest b/dev-embedded/usbprog/Manifest new file mode 100644 index 000000000000..a414fc739e61 --- /dev/null +++ b/dev-embedded/usbprog/Manifest @@ -0,0 +1 @@ +DIST usbprog-0.3.0_p20140828.tar.gz 4216305 BLAKE2B 65ea08a9f937f70842af5d4bcb0a3256f539bdba36854a51c25458e8b32aa12ea80342f4cb597148f78a50d440d3af91e67e39ca60e54340bbf75fa679cf52e0 SHA512 31d9d551452305dc495caf0e44823c929d7bd25a9a2dec0fec8e1efaa70736dc45cf45607cf7a655aa4201854bcb19d6e6266ba901d6a51eec7d6b5cbfb5a2db diff --git a/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828-cmake4-qt6.patch b/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828-cmake4-qt6.patch new file mode 100644 index 000000000000..930aaf652ad7 --- /dev/null +++ b/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828-cmake4-qt6.patch @@ -0,0 +1,230 @@ +Source: https://github.com/bwalle/usbprog-tools/pull/1 + +... but squashed for Gentoo's purpose. + +From b5728831447d97eda7de4424ef7eb455318942f2 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Wed, 5 Nov 2025 20:14:45 +0100 +Subject: [PATCH 1/4] Bump CMake minimum to 3.16 + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c16d2cf..c5d3957 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,6 +16,8 @@ + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + # 02110-1301, USA. + # ++cmake_minimum_required(VERSION 3.16) ++ + project(usbprog CXX C) + + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) +@@ -24,10 +26,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) + # Configuration + # + +-cmake_minimum_required(VERSION 2.6) +-if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 3.0) +- cmake_policy(SET CMP0028 NEW) +-endif () + set (PACKAGE_STRING "usbprog") + set (PACKAGE_VERSION "0.3.0") + include_directories(${CMAKE_SOURCE_DIR}) +-- +2.51.2 + + +From 2e7b5825012244a90d989709f3735c8d8f419ce3 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Wed, 5 Nov 2025 20:28:11 +0100 +Subject: [PATCH 2/4] Use auto for QDomDocument::setContent() result + +It is QDomDocument::ParseResult in >=Qt-6.5. + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + usbprog/firmwarepool.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usbprog/firmwarepool.cc b/usbprog/firmwarepool.cc +index 5ed44d2..35cce2f 100644 +--- a/usbprog/firmwarepool.cc ++++ b/usbprog/firmwarepool.cc +@@ -428,7 +428,7 @@ void Firmwarepool::readIndex() + if (!file.open(QIODevice::ReadOnly)) + throw core::ParseError("Couldn't open " + filename); + +- bool success = doc.setContent(&file); ++ auto success = doc.setContent(&file); + file.close(); + if (!success) + throw core::ParseError("Unable to parse '" + filename + "'"); +-- +2.51.2 + + +From bf992a89fa948f78298b080348ce14c5d444fc57 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Wed, 5 Nov 2025 20:29:50 +0100 +Subject: [PATCH 3/4] Port from QTime to QElapsedTimer + +It is obsolete in Qt 5.15 + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + gui/qtsleeper.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gui/qtsleeper.cc b/gui/qtsleeper.cc +index bdd8d03..a089cc5 100644 +--- a/gui/qtsleeper.cc ++++ b/gui/qtsleeper.cc +@@ -15,7 +15,7 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + #include <QApplication> +-#include <QTime> ++#include <QElapsedTimer> + + #include <usbprog-core/debug.h> + +@@ -29,7 +29,7 @@ namespace gui { + void QtSleeper::sleep(int ms) + { + USBPROG_DEBUG_DBG("Qtsleeper: sleep %d ms", ms); +- QTime t; ++ QElapsedTimer t; + t.start(); + + while (t.elapsed() < ms) +-- +2.51.2 + + +From 2bbe71747dc1b5de1ef3441eb7ac9c90803c8156 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Wed, 5 Nov 2025 20:17:09 +0100 +Subject: [PATCH 4/4] CMake: Port to Qt6, drop USE_QT5 (dropping option to + build w/ Qt4) + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 38 +++++++------------------------------- + gui/CMakeLists.txt | 12 ++---------- + usbprog/CMakeLists.txt | 6 +----- + 3 files changed, 10 insertions(+), 46 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c5d3957..d9955c4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,7 +32,6 @@ include_directories(${CMAKE_SOURCE_DIR}) + include_directories(${CMAKE_BINARY_DIR}) + + option(BUILD_GUI "Build the Qt GUI" ON) +-option(USE_QT5 "Use Qt5 instead of Qt4" OFF) + option(BUILD_ONLY_CORE "Builds only the usbprog-core lib and a simple CLI program (has no library dependencies apart from libusb" OFF) + option(USE_LEGACY_LIBUSB "Ignore the fact that libusb-1.0 is present and look for legacy libusb 0.1" OFF) + +@@ -93,35 +92,13 @@ set (EXTRA_LIBS ${EXTRA_LIBS} ${LIBUSB_LIBRARIES}) + + if (NOT BUILD_ONLY_CORE) + +- if (USE_QT5) +- +- find_package(Qt5Core) +- find_package(Qt5Network) +- find_package(Qt5Xml) +- set(EXTRA_LIBS ${EXTRA_LIBS} Qt5::Core Qt5::Network Qt5::Xml) +- if (BUILD_GUI) +- find_package(Qt5Widgets) +- set(EXTRA_LIBS ${EXTRA_LIBS} Qt5::Widgets) +- endif (BUILD_GUI) +- +- else (USE_QT5) +- +- # Qt4 +- include(FindQt4) +- if (BUILD_GUI) +- set(Qt_Components QtCore QtGui QtXml QtNetwork QtMain) +- else (BUILD_GUI) +- set(Qt_Components QtCore QtXml QtNetwork QtMain) +- endif (BUILD_GUI) +- +- find_package(Qt4 4.4.3 COMPONENTS ${Qt_Components} REQUIRED) +- include(${QT_USE_FILE}) +- set(EXTRA_LIBS ${EXTRA_LIBS} ${QT_LIBRARIES}) +- if (NOT QT4_FOUND) +- message(FATAL_ERROR "Qt4 not found. You can set the USE_QT5 option to try to find Qt5") +- endif (NOT QT4_FOUND) +- +- endif (USE_QT5) ++ find_package(Qt6 REQUIRED COMPONENTS Core Network Xml) ++ set(EXTRA_LIBS ${EXTRA_LIBS} Qt6::Core Qt6::Network Qt6::Xml) ++ if (BUILD_GUI) ++ find_package(Qt6Gui REQUIRED) ++ find_package(Qt6Widgets REQUIRED) ++ set(EXTRA_LIBS ${EXTRA_LIBS} Qt6::Gui Qt6::Widgets) ++ endif () + + # libbw + +@@ -180,7 +157,6 @@ add_subdirectory(udev) + + message(STATUS "Build only the core parts : ${BUILD_ONLY_CORE}") + message(STATUS "Building with GUI : ${BUILD_GUI}") +-message(STATUS "Building with Qt5 : ${USE_QT5}") + message(STATUS "Building manpages : ${BUILD_MANPAGE}") + + # vim: set sw=4 ts=4 et: +diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt +index d9a0b21..4c74e6a 100644 +--- a/gui/CMakeLists.txt ++++ b/gui/CMakeLists.txt +@@ -49,18 +49,10 @@ if (BUILD_GUI) + set(QtApp_RCCS usbprog.qrc) + + # generate rules for building source files from the resources +- if (USE_QT5) +- qt5_add_resources(usbprog_gui_RCC_SRCS usbprog.qrc) +- else (USE_QT5) +- qt4_add_resources(usbprog_gui_RCC_SRCS usbprog.qrc) +- endif (USE_QT5) ++ qt_add_resources(usbprog_gui_RCC_SRCS usbprog.qrc) + + # generate rules for building source files that moc generates +- if (USE_QT5) +- qt5_wrap_cpp(usbprog_gui_MOC_SRCS ${usbprog_gui_MOCS}) +- else (USE_QT5) +- qt4_wrap_cpp(usbprog_gui_MOC_SRCS ${usbprog_gui_MOCS}) +- endif (USE_QT5) ++ qt_wrap_cpp(usbprog_gui_MOC_SRCS ${usbprog_gui_MOCS}) + + # build sources, moc'd sources, and rcc'd sources + add_executable(usbprog-gui WIN32 +diff --git a/usbprog/CMakeLists.txt b/usbprog/CMakeLists.txt +index 1899d46..df183fb 100644 +--- a/usbprog/CMakeLists.txt ++++ b/usbprog/CMakeLists.txt +@@ -35,11 +35,7 @@ else () + set(libusbprog_SRCS ${libusbprog_SRCS} sysinfo_posix.cpp) + endif () + +-if (USE_QT5) +- qt5_wrap_cpp(libusbprog_MOC_SRCS ${libusbprog_MOCS}) +-else (USE_QT5) +- qt4_wrap_cpp(libusbprog_MOC_SRCS ${libusbprog_MOCS}) +-endif (USE_QT5) ++qt_wrap_cpp(libusbprog_MOC_SRCS ${libusbprog_MOCS}) + add_library(libusbprog STATIC ${libusbprog_SRCS} ${libusbprog_MOC_SRCS}) + target_link_libraries(libusbprog libusbprog-core ${EXTRA_LIBS}) + +-- +2.51.2 + diff --git a/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828_versions.xml.patch b/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828_versions.xml.patch new file mode 100644 index 000000000000..dd3a002d825a --- /dev/null +++ b/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828_versions.xml.patch @@ -0,0 +1,28 @@ +From 031cc8495ef5008e744bc3bf1e970e894083d1a1 Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> +Date: Mon, 26 Jul 2021 19:50:25 +0300 +Subject: [PATCH] Replace URL for versions.xml + +Replace versions.xml URL to +http://www.aaabbb.de/FirmwareUsbprog/versions.xml as only one viable +source for firmwares. +--- + usbprog/usbprog.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usbprog/usbprog.h b/usbprog/usbprog.h +index 38d069e..35dc86b 100644 +--- a/usbprog/usbprog.h ++++ b/usbprog/usbprog.h +@@ -26,7 +26,7 @@ namespace usbprog { + + /* Preprocessor definitions {{{ */ + +-#define DEFAULT_INDEX_URL "http://www.ixbat.de/usbprog/versions.xml" ++#define DEFAULT_INDEX_URL "http://www.aaabbb.de/FirmwareUsbprog/versions.xml" + #define AUTO_NOT_UPDATE_TIME 10 + + /* }}} */ +-- +2.31.1 + diff --git a/dev-embedded/usbprog/metadata.xml b/dev-embedded/usbprog/metadata.xml new file mode 100644 index 000000000000..98fa0b02b3a9 --- /dev/null +++ b/dev-embedded/usbprog/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> +</maintainer> +<upstream> + <remote-id type="github">bwalle/usbprog-tools</remote-id> +</upstream> +</pkgmetadata> diff --git a/dev-embedded/usbprog/usbprog-0.3.0_p20140828-r3.ebuild b/dev-embedded/usbprog/usbprog-0.3.0_p20140828-r3.ebuild new file mode 100644 index 000000000000..e4cf59934fa0 --- /dev/null +++ b/dev-embedded/usbprog/usbprog-0.3.0_p20140828-r3.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +COMMIT="293d559bac55f7c7130ea2769c703c68a19d62c2" +inherit cmake readme.gentoo-r1 + +DESCRIPTION="flashtool for the multi purpose programming adapter usbprog" +HOMEPAGE="https://github.com/bwalle/usbprog-tools https://www.aaabbb.de/FirmwareUsbprog/FirmwareUsbprog_en.php" +SRC_URI="https://github.com/bwalle/usbprog-tools/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/usbprog-tools-${COMMIT}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+gui minimal" + +RDEPEND=" + !minimal? ( + gui? ( dev-qt/qtbase:6[widgets] ) + dev-qt/qtbase:6[network,xml] + sys-libs/ncurses:= + sys-libs/readline:= + ) + virtual/libusb:1 +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${P}_versions.xml.patch" + "${FILESDIR}/${P}-cmake4-qt6.patch" # bug #965714 +) + +DOC_CONTENTS=" +Please visit http://www.aaabbb.de/FirmwareUsbprog/FirmwareUsbprog_en.php +for additional info. +" + +src_configure() { + local mycmakeargs=( + -DBUILD_ONLY_CORE=$(usex minimal) + -DBUILD_GUI=$(usex gui) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/dev-embedded/xa/Manifest b/dev-embedded/xa/Manifest new file mode 100644 index 000000000000..9035856a1422 --- /dev/null +++ b/dev-embedded/xa/Manifest @@ -0,0 +1 @@ +DIST xa-2.4.1.tar.gz 208553 BLAKE2B 86092d2a215d141f76bb8a31861f20e5124f2ec7125a5649b9b28a86e727d5f201826581c38aea8693d16692d8be13103a917c1152980d6a4764555751af7dac SHA512 aaec796bec362ab253abc33320cb36ef879fa661c2091c7e3b2ce96ccc56063c59335fb7eb1d6a3de9486ab8973cbbc71c445e1ef816572a55a1338ffed19dc0 diff --git a/dev-embedded/xa/files/xa-2.4.1-make.patch b/dev-embedded/xa/files/xa-2.4.1-make.patch new file mode 100644 index 000000000000..c4fd2f667584 --- /dev/null +++ b/dev-embedded/xa/files/xa-2.4.1-make.patch @@ -0,0 +1,28 @@ +https://bugs.gentoo.org/722600 +--- a/Makefile ++++ b/Makefile +@@ -4,2 +3,0 @@ +-CC = gcc +-LD = gcc +@@ -8,2 +5,0 @@ +-CFLAGS = -O2 -g +-LDFLAGS = -lc +@@ -32 +28 @@ +-all: killxa xa uncpk ++all: xa uncpk +@@ -38 +34 @@ +- (cd src && LD=${LD} CC="${CC} ${CFLAGS}" ${MAKE}) ++ (cd src && ${MAKE}) +@@ -44 +40 @@ +- (cd misc && CC="${CC} ${CFLAGS}" ${MAKE}) ++ (cd misc && ${MAKE}) +--- a/misc/Makefile ++++ b/misc/Makefile +@@ -5 +5 @@ +-CFLAGS = -O2 -g ++CFLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +--- a/src/Makefile ++++ b/src/Makefile +@@ -12 +12 @@ +- ${LD} -o ../xa ${OBJ} ${LDFLAGS} ++ ${CC} ${LDFLAGS} -o ../xa ${OBJ} diff --git a/dev-embedded/xa/metadata.xml b/dev-embedded/xa/metadata.xml new file mode 100644 index 000000000000..b00b8b403b6d --- /dev/null +++ b/dev-embedded/xa/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <longdescription> + xa is a high-speed, two-pass portable cross-assembler. It + understands mnemonics and generates code for NMOS 6502s (such as + 6502A, 6504, 6507, 6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s + (65C02 and Rockwell R65C02) and the 65816. + </longdescription> +</pkgmetadata> diff --git a/dev-embedded/xa/xa-2.4.1.ebuild b/dev-embedded/xa/xa-2.4.1.ebuild new file mode 100644 index 000000000000..8c7876bee858 --- /dev/null +++ b/dev-embedded/xa/xa-2.4.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="High-speed, two-pass portable 6502 cross-assembler" +HOMEPAGE="https://www.floodgap.com/retrotech/xa/" +SRC_URI="https://www.floodgap.com/retrotech/xa/dists/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 x86" + +PATCHES=( + "${FILESDIR}"/${PN}-2.4.1-make.patch +) + +src_configure() { + tc-export CC +} + +src_test() { + emake -j1 test +} + +src_install() { + emake DESTDIR="${ED}"/usr install + einstalldocs +} diff --git a/dev-embedded/zmac/Manifest b/dev-embedded/zmac/Manifest new file mode 100644 index 000000000000..a9595b5f8667 --- /dev/null +++ b/dev-embedded/zmac/Manifest @@ -0,0 +1 @@ +DIST zmac13.zip 82067 BLAKE2B 8f15cc17d92ed8bdfc16504c2c958db1f158cf8cceda6aba01e626342961975c68e41321349c95721053b1d10f07373b76385ebf9c1b74dd70f69c5d6fd82b70 SHA512 84c1206e3abf19809ab4358c0b5d46771cdcfdeb4ded14aa39d81ca7f9d3780ca1917823bd06f49ee9fafaaa079bdbe8b614ce842d44181f55d4287515a187a2 diff --git a/dev-embedded/zmac/metadata.xml b/dev-embedded/zmac/metadata.xml new file mode 100644 index 000000000000..f0bdcbd0fe98 --- /dev/null +++ b/dev-embedded/zmac/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>ulm@gentoo.org</email> +</maintainer> +<longdescription> + zmac is a Z80 macro cross-assembler. It has all the features you'd expect. + It assembles the specified input file and produces raw binary output. + (It can optionally produce CP/M-style Intel hex format.) By default it + also produces a nicely-formatted listing of the m/c alongside the source. + + As well as normal Z80 programs, zmac lets you write 8080 programs in Z80 + assembly. +</longdescription> +</pkgmetadata> diff --git a/dev-embedded/zmac/zmac-1.3-r2.ebuild b/dev-embedded/zmac/zmac-1.3-r2.ebuild new file mode 100644 index 000000000000..d3e157fb8f83 --- /dev/null +++ b/dev-embedded/zmac/zmac-1.3-r2.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=9 + +inherit toolchain-funcs + +DESCRIPTION="Z80 macro cross-assembler" +HOMEPAGE="https://www.tim-mann.org/trs80resources.html" +SRC_URI="https://www.tim-mann.org/trs80/${PN}${PV//.}.zip" +S="${WORKDIR}" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +BDEPEND="app-arch/unzip" + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" +} + +src_install() { + dobin zmac + doman zmac.1 + dodoc ChangeLog MAXAM NEWS README +} |
