summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/micropython')
-rw-r--r--dev-lang/micropython/Manifest2
-rw-r--r--dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch12
-rw-r--r--dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch26
-rw-r--r--dev-lang/micropython/files/micropython-1.17-exclude-float-parse-tests.patch11
-rw-r--r--dev-lang/micropython/files/micropython-1.17-gcc13-build-fix.patch62
-rw-r--r--dev-lang/micropython/files/micropython-1.17-prevent-stripping.patch12
-rw-r--r--dev-lang/micropython/metadata.xml11
-rw-r--r--dev-lang/micropython/micropython-1.17.ebuild (renamed from dev-lang/micropython/micropython-1.11.ebuild)11
8 files changed, 94 insertions, 53 deletions
diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index 1ac72acd2024..74304d0b18d1 100644
--- a/dev-lang/micropython/Manifest
+++ b/dev-lang/micropython/Manifest
@@ -1 +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/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 000000000000..8f44d31fd96f
--- /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-gcc13-build-fix.patch b/dev-lang/micropython/files/micropython-1.17-gcc13-build-fix.patch
new file mode 100644
index 000000000000..306db8d9caa8
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.17-gcc13-build-fix.patch
@@ -0,0 +1,62 @@
+https://github.com/micropython/micropython/pull/11402
+https://github.com/micropython/micropython/commit/32572439984e5640c6af46fbe7c27400c30112ce
+
+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/files/micropython-1.17-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.17-prevent-stripping.patch
new file mode 100644
index 000000000000..1c5380ed883b
--- /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/metadata.xml b/dev-lang/micropython/metadata.xml
index e644fcc0141c..a4ace3158923 100644
--- a/dev-lang/micropython/metadata.xml
+++ b/dev-lang/micropython/metadata.xml
@@ -1,14 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>monsieurp@gentoo.org</email>
- <name>Patrice Clement</name>
- </maintainer>
- <maintainer type="project">
- <email>python@gentoo.org</email>
- <name>Python</name>
- </maintainer>
+ <!-- maintainer-needed -->
<upstream>
<remote-id type="github">micropython/micropython</remote-id>
</upstream>
diff --git a/dev-lang/micropython/micropython-1.11.ebuild b/dev-lang/micropython/micropython-1.17.ebuild
index 218dea6ed460..16620cf90890 100644
--- a/dev-lang/micropython/micropython-1.11.ebuild
+++ b/dev-lang/micropython/micropython-1.17.ebuild
@@ -1,27 +1,28 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+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.gz"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm64 ~x86"
LICENSE="MIT"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
- dev-libs/libffi
+ dev-libs/libffi:=
virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/${P}-prevent-stripping.patch"
"${FILESDIR}/${P}-exclude-float-parse-tests.patch"
+ "${FILESDIR}/${P}-gcc13-build-fix.patch"
)
src_prepare() {