public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/files/, dev-lang/micropython/
@ 2018-05-22 21:41 Patrice Clement
  0 siblings, 0 replies; 5+ messages in thread
From: Patrice Clement @ 2018-05-22 21:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f032e1dfe1c78f473d8fb54d04a9dab173f9e9c7
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Tue May 22 21:41:02 2018 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue May 22 21:41:27 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f032e1df

dev-lang/micropython: version bump.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-lang/micropython/Manifest                      |  1 +
 .../micropython-1.9.4-prevent-stripping.patch      | 22 +++++++++
 dev-lang/micropython/micropython-1.9.4.ebuild      | 54 ++++++++++++++++++++++
 3 files changed, 77 insertions(+)

diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index 5b5ef6cd2f5..0b69931fbe1 100644
--- a/dev-lang/micropython/Manifest
+++ b/dev-lang/micropython/Manifest
@@ -1 +1,2 @@
 DIST micropython-1.9.3.tar.gz 17311734 BLAKE2B 31ebdedc402af53b205a854aa61b59c694cc893c7f80e4b84196c5d44527545f442628938b7dd923ed9086a79e00ff899682548115224613e888eb8a37dd5ae3 SHA512 1b4358913ed78df66314c9a62636c7b8d086c731459e3bee1fab8695286dc03b6ec7594b2f9b8105e2a6d62190d95c6ad5351fb64c666c1ea54b9535193ee8a8
+DIST micropython-1.9.4.tar.gz 18957648 BLAKE2B bc4dc4ef6623adbda64c9e03137860a7b9ce7d2d181434cb993438752ec39a4ea7cf7cf7a14736c57bdc2ea9c3f856b0dbe2d92fc0e1cbef99112427583ad665 SHA512 9995c983c93fb1280e60d7c52a10930a6a3de8d589a0f4264a9a4a4fede7c37e27ed4871c4c9092aec3fb33028064beb8c5eb19b7956e8f0c5d3b2a82ffa9932

diff --git a/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch
new file mode 100644
index 00000000000..a130b72b613
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch
@@ -0,0 +1,22 @@
+--- a/py/mkenv.mk	2017-11-25 09:52:30.921836372 +0000
++++ a/py/mkenv.mk	2017-11-25 09:52:35.257861233 +0000
+@@ -50,7 +50,6 @@
+ LD = $(CROSS_COMPILE)ld
+ OBJCOPY = $(CROSS_COMPILE)objcopy
+ SIZE = $(CROSS_COMPILE)size
+-STRIP = $(CROSS_COMPILE)strip
+ AR = $(CROSS_COMPILE)ar
+ ifeq ($(MICROPY_FORCE_32BIT),1)
+ CC += -m32
+--- a/py/mkrules.mk	2017-11-25 09:53:13.107078063 +0000
++++ a/py/mkrules.mk	2017-11-25 09:53:31.898185592 +0000
+@@ -129,9 +129,6 @@
+ # Do not pass COPT here - it's *C* compiler optimizations. For example,
+ # we may want to compile using Thumb, but link with non-Thumb libc.
+ 	$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
+-ifndef DEBUG
+-	$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
+-endif
+ 	$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)
+ 
+ clean: clean-prog

diff --git a/dev-lang/micropython/micropython-1.9.4.ebuild b/dev-lang/micropython/micropython-1.9.4.ebuild
new file mode 100644
index 00000000000..95899e4fd9b
--- /dev/null
+++ b/dev-lang/micropython/micropython-1.9.4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Python implementation for microcontrollers"
+HOMEPAGE="https://github.com/micropython/micropython"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+
+DEPEND="
+	virtual/libffi
+	virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
+
+src_compile() {
+	cd ports/unix || die
+
+	# 1) don't die on compiler warnings
+	# 2) remove /usr/local prefix references in favour of /usr
+	sed -i \
+		-e 's#-Werror##g;' \
+		-e 's#\/usr\/local#\/usr#g;' \
+		Makefile || die
+	emake CC="$(tc-getCC)" axtls
+	emake CC="$(tc-getCC)"
+}
+
+src_test() {
+	# TODO: find out why these tests fail
+	rm -v tests/stress/recursive_iternext* || die
+
+	cd ports/unix || die
+	emake test
+}
+
+src_install() {
+	pushd ports/unix > /dev/null || die
+	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install
+	popd > /dev/null || die
+
+	# remove .git files
+	find tools -type f -name '.git*' -exec rm {} \; || die
+
+	dodoc -r tools
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/files/, dev-lang/micropython/
@ 2021-10-25 12:44 Patrice Clement
  0 siblings, 0 replies; 5+ messages in thread
From: Patrice Clement @ 2021-10-25 12:44 UTC (permalink / raw
  To: gentoo-commits

commit:     c144107d5e946d6f7fcf2af60f0b6386f4f88e43
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 25 12:39:50 2021 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon Oct 25 12:44:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c144107d

dev-lang/micropython: version bump.

EAPI 7 version bump the ebuild whilst at it.

Closes: https://bugs.gentoo.org/820086
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 dev-lang/micropython/Manifest                      |  1 +
 ...icropython-1.17-exclude-float-parse-tests.patch | 11 ++++
 .../files/micropython-1.17-prevent-stripping.patch | 12 ++++
 dev-lang/micropython/micropython-1.17.ebuild       | 65 ++++++++++++++++++++++
 4 files changed, 89 insertions(+)

diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index 1ac72acd202..e6e1460bf54 100644
--- a/dev-lang/micropython/Manifest
+++ b/dev-lang/micropython/Manifest
@@ -1 +1,2 @@
 DIST micropython-1.11.tar.gz 23010708 BLAKE2B 8deb29f2a27b8299f62c8c3d332654889e610ddc6854dc38c6cf7504c89f2f9cbbacccdc2d8e471d96b8bb28bbb920fe7ec1b8fd49b14209924262f54687c3c1 SHA512 255860e56bf51c4f35a00cf66fff3ee37fbef1e0d674af6ed580367d8b3d2d60fb88609a675e8f322fd466a23006e38078b67edd6f306e639d6be12abb2972d2
+DIST micropython-1.17.tar.xz 56606868 BLAKE2B a6338d173de646764c1573ebabdb9818746a479fd2dd618f9be9955881e3829c4d89da4602934e71655734ec1c6f2150a6ac2c54a5fed9bee998905a00d5c6ea SHA512 8074214040e35ae1ca99721ec442f4cef70fa03380b7662016c55cb3acff9178fc54140c0d818c9581389b4daaade142ecf75b65a2919c666a50255423a39a54

diff --git a/dev-lang/micropython/files/micropython-1.17-exclude-float-parse-tests.patch b/dev-lang/micropython/files/micropython-1.17-exclude-float-parse-tests.patch
new file mode 100644
index 00000000000..8f44d31fd96
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.17-exclude-float-parse-tests.patch
@@ -0,0 +1,11 @@
+--- a/tests/run-tests.py	2021-10-25 12:25:48.422212212 -0000
++++ b/tests/run-tests.py	2021-10-25 12:26:01.382135667 -0000
+@@ -521,6 +521,8 @@
+             "micropython/opt_level_lineno.py"
+         )  # native doesn't have proper traceback info
+         skip_tests.add("micropython/schedule.py")  # native code doesn't check pending events
++    skip_tests.add("float/float_parse_doubleprec.py")
++    skip_tests.add("float/float_parse.py")
+ 
+     def run_one_test(test_file):
+         test_file = test_file.replace("\\", "/")

diff --git a/dev-lang/micropython/files/micropython-1.17-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.17-prevent-stripping.patch
new file mode 100644
index 00000000000..1c5380ed883
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.17-prevent-stripping.patch
@@ -0,0 +1,12 @@
+--- a/py/mkrules.mk	2021-10-25 12:30:13.723695503 -0000
++++ b/py/mkrules.mk	2021-10-25 12:30:18.460327366 -0000
+@@ -198,9 +198,6 @@
+ # Do not pass COPT here - it's *C* compiler optimizations. For example,
+ # we may want to compile using Thumb, but link with non-Thumb libc.
+ 	$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
+-ifndef DEBUG
+-	$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $@
+-endif
+ 	$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $@
+ 
+ clean: clean-prog

diff --git a/dev-lang/micropython/micropython-1.17.ebuild b/dev-lang/micropython/micropython-1.17.ebuild
new file mode 100644
index 00000000000..ce87e672141
--- /dev/null
+++ b/dev-lang/micropython/micropython-1.17.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Python implementation for microcontrollers"
+HOMEPAGE="https://github.com/micropython/micropython"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	dev-libs/libffi:=
+	virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}/${P}-prevent-stripping.patch"
+	"${FILESDIR}/${P}-exclude-float-parse-tests.patch"
+)
+
+src_prepare() {
+	default
+
+	cd ports/unix || die
+
+	# 1) don't die on compiler warning
+	# 2) remove /usr/local prefix references in favour of /usr
+	# 3) enforce our CFLAGS
+	# 4) enforce our LDFLAGS
+	sed -e 's#-Werror##g;' \
+		-e 's#\/usr\/local#\/usr#g;' \
+		-e "s#^CFLAGS = \(.*\)#CFLAGS = \1 ${CFLAGS}#g" \
+		-e "s#^LDFLAGS = \(.*\)#LDFLAGS = \1 ${LDFLAGS}#g" \
+		-i Makefile || die "can't patch Makefile"
+}
+
+src_compile() {
+	cd ports/unix || die
+
+	emake CC="$(tc-getCC)" axtls
+	emake CC="$(tc-getCC)"
+}
+
+src_test() {
+	cd ports/unix || die
+	emake CC="$(tc-getCC)" test
+}
+
+src_install() {
+	pushd ports/unix > /dev/null || die
+	emake CC="$(tc-getCC)" DESTDIR="${D}" install
+	popd > /dev/null || die
+
+	# remove .git files
+	find tools -type f -name '.git*' -exec rm {} \; || die
+
+	dodoc -r tools
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/files/, dev-lang/micropython/
@ 2022-08-29 18:39 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-08-29 18:39 UTC (permalink / raw
  To: gentoo-commits

commit:     317434e07e6f785b6857d504cbd6225c688f1c21
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 28 14:44:54 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 18:39:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=317434e0

dev-lang/micropython: drop 1.11-r1, EAPI-6--

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-lang/micropython/Manifest                      |  1 -
 ...icropython-1.11-exclude-float-parse-tests.patch | 12 ----
 .../files/micropython-1.11-prevent-stripping.patch | 26 ---------
 dev-lang/micropython/micropython-1.11-r1.ebuild    | 65 ----------------------
 4 files changed, 104 deletions(-)

diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index e6e1460bf548..74304d0b18d1 100644
--- a/dev-lang/micropython/Manifest
+++ b/dev-lang/micropython/Manifest
@@ -1,2 +1 @@
-DIST micropython-1.11.tar.gz 23010708 BLAKE2B 8deb29f2a27b8299f62c8c3d332654889e610ddc6854dc38c6cf7504c89f2f9cbbacccdc2d8e471d96b8bb28bbb920fe7ec1b8fd49b14209924262f54687c3c1 SHA512 255860e56bf51c4f35a00cf66fff3ee37fbef1e0d674af6ed580367d8b3d2d60fb88609a675e8f322fd466a23006e38078b67edd6f306e639d6be12abb2972d2
 DIST micropython-1.17.tar.xz 56606868 BLAKE2B a6338d173de646764c1573ebabdb9818746a479fd2dd618f9be9955881e3829c4d89da4602934e71655734ec1c6f2150a6ac2c54a5fed9bee998905a00d5c6ea SHA512 8074214040e35ae1ca99721ec442f4cef70fa03380b7662016c55cb3acff9178fc54140c0d818c9581389b4daaade142ecf75b65a2919c666a50255423a39a54

diff --git a/dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch b/dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch
deleted file mode 100644
index 6d81661790e9..000000000000
--- a/dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/tests/run-tests	2020-06-09 13:09:24.239121947 -0000
-+++ b/tests/run-tests	2020-06-09 13:09:57.315476363 -0000
-@@ -377,6 +377,9 @@
-         skip_tests.add('micropython/heapalloc_traceback.py') # because native doesn't have proper traceback info
-         skip_tests.add('micropython/schedule.py') # native code doesn't check pending events
- 
-+    skip_tests.add('float/float_parse.py')
-+    skip_tests.add('float/float_parse_doubleprec.py')
-+    # these two tests fail for some reason.
-     for test_file in tests:
-         test_file = test_file.replace('\\', '/')
- 

diff --git a/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch
deleted file mode 100644
index 7b78b6fb9f60..000000000000
--- a/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/py/mkenv.mk b/py/mkenv.mk
-index 46eedf9..2f3f3ca 100644
---- a/py/mkenv.mk
-+++ b/py/mkenv.mk
-@@ -52,7 +52,6 @@ CXX = $(CROSS_COMPILE)g++
- LD = $(CROSS_COMPILE)ld
- OBJCOPY = $(CROSS_COMPILE)objcopy
- SIZE = $(CROSS_COMPILE)size
--STRIP = $(CROSS_COMPILE)strip
- AR = $(CROSS_COMPILE)ar
- ifeq ($(MICROPY_FORCE_32BIT),1)
- CC += -m32
-diff --git a/py/mkrules.mk b/py/mkrules.mk
-index 4e4fdef..149b337 100644
---- a/py/mkrules.mk
-+++ b/py/mkrules.mk
-@@ -133,9 +133,6 @@ $(PROG): $(OBJ)
- # Do not pass COPT here - it's *C* compiler optimizations. For example,
- # we may want to compile using Thumb, but link with non-Thumb libc.
- 	$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
--ifndef DEBUG
--	$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
--endif
- 	$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)
- 
- clean: clean-prog

diff --git a/dev-lang/micropython/micropython-1.11-r1.ebuild b/dev-lang/micropython/micropython-1.11-r1.ebuild
deleted file mode 100644
index 57a5d6bee6a3..000000000000
--- a/dev-lang/micropython/micropython-1.11-r1.ebuild
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs
-
-DESCRIPTION="Python implementation for microcontrollers"
-HOMEPAGE="https://github.com/micropython/micropython"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
-
-KEYWORDS="~amd64 ~x86"
-LICENSE="MIT"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
-	dev-libs/libffi:=
-	virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}/${P}-prevent-stripping.patch"
-	"${FILESDIR}/${P}-exclude-float-parse-tests.patch"
-)
-
-src_prepare() {
-	default
-
-	cd ports/unix || die
-
-	# 1) don't die on compiler warning
-	# 2) remove /usr/local prefix references in favour of /usr
-	# 3) enforce our CFLAGS
-	# 4) enforce our LDFLAGS
-	sed -e 's#-Werror##g;' \
-		-e 's#\/usr\/local#\/usr#g;' \
-		-e "s#^CFLAGS = \(.*\)#CFLAGS = \1 ${CFLAGS}#g" \
-		-e "s#^LDFLAGS = \(.*\)#LDFLAGS = \1 ${LDFLAGS}#g" \
-		-i Makefile || die "can't patch Makefile"
-}
-
-src_compile() {
-	cd ports/unix || die
-
-	emake CC="$(tc-getCC)" axtls
-	emake CC="$(tc-getCC)"
-}
-
-src_test() {
-	cd ports/unix || die
-	emake CC="$(tc-getCC)" test
-}
-
-src_install() {
-	pushd ports/unix > /dev/null || die
-	emake CC="$(tc-getCC)" DESTDIR="${D}" install
-	popd > /dev/null || die
-
-	# remove .git files
-	find tools -type f -name '.git*' -exec rm {} \; || die
-
-	dodoc -r tools
-	einstalldocs
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/files/, dev-lang/micropython/
@ 2024-01-20 13:33 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-01-20 13:33 UTC (permalink / raw
  To: gentoo-commits

commit:     f28f669cfbdc20cb94f4d32e8441e996ddda8384
Author:     Kristaps Kaupe <kristaps <AT> blogiem <DOT> lv>
AuthorDate: Sun Jan 14 16:34:25 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 20 13:30:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f28f669c

dev-lang/micropython: Fix building with GCC13

Closes: https://bugs.gentoo.org/916499
Closes: https://bugs.gentoo.org/895156
Signed-off-by: Kristaps Kaupe <kristaps <AT> blogiem.lv>
Closes: https://github.com/gentoo/gentoo/pull/34801
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/micropython-1.17-gcc13-build-fix.patch   | 59 ++++++++++++++++++++++
 dev-lang/micropython/micropython-1.17.ebuild       |  1 +
 2 files changed, 60 insertions(+)

diff --git a/dev-lang/micropython/files/micropython-1.17-gcc13-build-fix.patch b/dev-lang/micropython/files/micropython-1.17-gcc13-build-fix.patch
new file mode 100644
index 000000000000..d791227a9a3c
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.17-gcc13-build-fix.patch
@@ -0,0 +1,59 @@
+From f1c6cb7725960487195daa5c5c196fd8d3563811 Mon Sep 17 00:00:00 2001
+From: Damien George <damien@micropython.org>
+Date: Wed, 3 May 2023 15:23:24 +1000
+Subject: [PATCH] py/stackctrl: Add gcc pragmas to ignore dangling-pointer
+ warning.
+
+This warning became apparent in gcc 13.
+
+Signed-off-by: Damien George <damien@micropython.org>
+---
+ py/stackctrl.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/py/stackctrl.c b/py/stackctrl.c
+index c2f3adb5eedc..c2566ebad92b 100644
+--- a/py/stackctrl.c
++++ b/py/stackctrl.c
+@@ -28,8 +28,15 @@
+ #include "py/stackctrl.h"
+ 
+ void mp_stack_ctrl_init(void) {
++    #if __GNUC__ >= 13
++    #pragma GCC diagnostic push
++    #pragma GCC diagnostic ignored "-Wdangling-pointer"
++    #endif
+     volatile int stack_dummy;
+     MP_STATE_THREAD(stack_top) = (char *)&stack_dummy;
++    #if __GNUC__ >= 13
++    #pragma GCC diagnostic pop
++    #endif
+ }
+ 
+ void mp_stack_set_top(void *top) {
+
+From 32572439984e5640c6af46fbe7c27400c30112ce Mon Sep 17 00:00:00 2001
+From: Damien George <damien@micropython.org>
+Date: Tue, 7 Mar 2023 14:46:22 +1100
+Subject: [PATCH] mpy-cross/main: Fix return type of mp_import_stat.
+
+Fixes issue #10951.
+
+Signed-off-by: Damien George <damien@micropython.org>
+---
+ mpy-cross/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mpy-cross/main.c b/mpy-cross/main.c
+index 13bb17b13dba..8a4dd5bcbed5 100644
+--- a/mpy-cross/main.c
++++ b/mpy-cross/main.c
+@@ -344,7 +344,7 @@ int main(int argc, char **argv) {
+     return main_(argc, argv);
+ }
+ 
+-uint mp_import_stat(const char *path) {
++mp_import_stat_t mp_import_stat(const char *path) {
+     (void)path;
+     return MP_IMPORT_STAT_NO_EXIST;
+ }

diff --git a/dev-lang/micropython/micropython-1.17.ebuild b/dev-lang/micropython/micropython-1.17.ebuild
index 352bc9cfea11..16620cf90890 100644
--- a/dev-lang/micropython/micropython-1.17.ebuild
+++ b/dev-lang/micropython/micropython-1.17.ebuild
@@ -22,6 +22,7 @@ DEPEND="
 PATCHES=(
 	"${FILESDIR}/${P}-prevent-stripping.patch"
 	"${FILESDIR}/${P}-exclude-float-parse-tests.patch"
+	"${FILESDIR}/${P}-gcc13-build-fix.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/files/, dev-lang/micropython/
@ 2024-07-26  7:40 Joonas Niilola
  0 siblings, 0 replies; 5+ messages in thread
From: Joonas Niilola @ 2024-07-26  7:40 UTC (permalink / raw
  To: gentoo-commits

commit:     b932ffe8e0c938200d104c096112986cf0f49683
Author:     Daniella Kicsak <nosqrt <AT> outlook <DOT> com>
AuthorDate: Thu Jun 20 12:42:16 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Jul 26 07:40:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b932ffe8

dev-lang/micropython: add 1.23.0

Signed-off-by: Daniella Kicsak <nosqrt <AT> outlook.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-lang/micropython/Manifest                      |  1 +
 .../files/micropython-1.23.0-gcc13-build-fix.patch | 11 ++++
 dev-lang/micropython/micropython-1.23.0.ebuild     | 73 ++++++++++++++++++++++
 3 files changed, 85 insertions(+)

diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index 74304d0b18d1..16e444cbe41a 100644
--- a/dev-lang/micropython/Manifest
+++ b/dev-lang/micropython/Manifest
@@ -1 +1,2 @@
 DIST micropython-1.17.tar.xz 56606868 BLAKE2B a6338d173de646764c1573ebabdb9818746a479fd2dd618f9be9955881e3829c4d89da4602934e71655734ec1c6f2150a6ac2c54a5fed9bee998905a00d5c6ea SHA512 8074214040e35ae1ca99721ec442f4cef70fa03380b7662016c55cb3acff9178fc54140c0d818c9581389b4daaade142ecf75b65a2919c666a50255423a39a54
+DIST micropython-1.23.0.tar.xz 85748224 BLAKE2B 3fca138bbe9a676c671812625ac374e82c3c91bb41db32557747ea4d28941de92be80bbf2e642f9094427dbcf6ee285c63ddad66510287074edb716017599384 SHA512 16f065bbbed1469587597193e7131ed9278ca2b22c8614098b5c79060f853db2a5a38ffe85688126cee86a5cb110d74840f50be4b009a687d7d310b54de2b2b5

diff --git a/dev-lang/micropython/files/micropython-1.23.0-gcc13-build-fix.patch b/dev-lang/micropython/files/micropython-1.23.0-gcc13-build-fix.patch
new file mode 100644
index 000000000000..bf418bcd7421
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.23.0-gcc13-build-fix.patch
@@ -0,0 +1,11 @@
+--- a/py/mkrules.mk	2024-06-09 04:22:17.760512031 +1000
++++ b/py/mkrules.mk	2024-06-09 21:02:24.926427912 +1000
+@@ -234,9 +234,6 @@
+ # we may want to compile using Thumb, but link with non-Thumb libc.
+ 	$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
+ ifndef DEBUG
+-ifdef STRIP
+-	$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $@
+-endif
+ endif
+ 	$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $@

diff --git a/dev-lang/micropython/micropython-1.23.0.ebuild b/dev-lang/micropython/micropython-1.23.0.ebuild
new file mode 100644
index 000000000000..740c69961ef7
--- /dev/null
+++ b/dev-lang/micropython/micropython-1.23.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Python implementation for microcontrollers"
+HOMEPAGE="https://github.com/micropython/micropython"
+SRC_URI="https://micropython.org/resources/source/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	dev-libs/libffi:=
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-gcc13-build-fix.patch"
+)
+
+src_prepare() {
+	default
+	cd ports/unix || die
+
+	# 1) don't die on compiler warning
+	# 2) remove /usr/local prefix references in favour of /usr
+	# 3) enforce our CFLAGS
+	# 4) enforce our LDFLAGS
+	sed -e 's#-Werror##g;' \
+		-e 's#\/usr\/local#\/usr#g;' \
+		-e "s#^CFLAGS = \(.*\)#CFLAGS = \1 ${CFLAGS}#g" \
+		-e "s#^LDFLAGS = \(.*\)#LDFLAGS = \1 ${LDFLAGS}#g" \
+		-i Makefile || die "can't patch Makefile"
+}
+
+src_compile() {
+	# Build the cross-compiler first. Build fails without this.
+	einfo ""
+	einfo "Building the mpy-crosscompiler."
+	einfo ""
+	cd "${S}/mpy-cross" || die
+	emake CC="$(tc-getCC)"
+
+	# Finally, build the unix port.
+	einfo ""
+	einfo "Building the micropython unix port."
+	einfo ""
+	cd "${S}/ports/unix" || die
+	emake CC="$(tc-getCC)"
+}
+
+src_test() {
+	cd ports/unix || die
+	emake CC="$(tc-getCC)" test
+}
+
+src_install() {
+	pushd ports/unix > /dev/null || die
+	emake CC="$(tc-getCC)" DESTDIR="${D}" install
+	popd > /dev/null || die
+
+	# remove .git files
+	find tools -type f -name '.git*' -exec rm {} \; || die
+
+	dodoc -r tools
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-26  7:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-29 18:39 [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/files/, dev-lang/micropython/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2024-07-26  7:40 Joonas Niilola
2024-01-20 13:33 Sam James
2021-10-25 12:44 Patrice Clement
2018-05-22 21:41 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox