summaryrefslogtreecommitdiff
path: root/dev-lang/micropython
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/micropython')
-rw-r--r--dev-lang/micropython/Manifest5
-rw-r--r--dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch12
-rw-r--r--dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch22
-rw-r--r--dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch22
-rw-r--r--dev-lang/micropython/micropython-1.11.ebuild30
5 files changed, 35 insertions, 56 deletions
diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index 1360f435a741..deaa3b9ad8a1 100644
--- a/dev-lang/micropython/Manifest
+++ b/dev-lang/micropython/Manifest
@@ -1,6 +1,5 @@
+AUX micropython-1.11-exclude-float-parse-tests.patch 571 BLAKE2B e231ab697dcefdcc05a0e44063def130b6f79536a8d416ddd3a400e4effe0f499343ca0cb45388fbfe3426e0e8ea79fad3acd7a10e07199d32d78af04d1defe6 SHA512 2721316002052534537def580b1f7b0c42fc2fdbd36fd82c2f9c5cd6f504ad17a6e0a9e9aca4f7f0270b6f4f60cfdf70b8fb69c62ac291d1eb24d1ebfedbe539
AUX micropython-1.11-prevent-stripping.patch 827 BLAKE2B e4da5582029c800dd166104a36834e23c20826af3f9988a85f1b29c1ac8c82fe762ddfde9a83a0a8b45ab07ab7cfed89ebab9a7a35c7276d292b51f003665c9e SHA512 366abdba975f9f7a54c1e0882414744b0b216fb6d9a4ce4c2022c7bedd3c31349a3652b751c4b3157584de9e0490e5435c17c20f9d453b1aa4eecd62f716ab07
-AUX micropython-1.9.3-prevent-stripping.patch 787 BLAKE2B c050420f5dae60edb93c63b504fdbe047a8c9ed56c543ffde817c86a6fd9a53efeb8561c69823186121a5727fbf29b8474eac223398fa7ee43c825e50745c6fd SHA512 5e7fa7481f4bfab15a041bbccf452d5d6fe5a5c1cd8cfae2e5ec3475d84decacc0b9c0631766582173fc4cda82d78e2370e402f95d5989e13bf3adbdaf39add4
-AUX micropython-1.9.4-prevent-stripping.patch 787 BLAKE2B 6e92c4fdfd44b89d1fad69c056dbab1493d9dc45c4223cfd2f011254db72400c6ac9a62afe84f54c301a86abd92deb56866dc25e2f1bf8af74edf308b15eb29f SHA512 8f994394f42d7fed5fa35b62c01c37ebea3b487c029d659134a263ef8d65e1ec17bec755fdf57cde2f234969bc4f7f4ab30858562d7f8cdb2bc6cb819ba2ae0d
DIST micropython-1.11.tar.gz 23010708 BLAKE2B 8deb29f2a27b8299f62c8c3d332654889e610ddc6854dc38c6cf7504c89f2f9cbbacccdc2d8e471d96b8bb28bbb920fe7ec1b8fd49b14209924262f54687c3c1 SHA512 255860e56bf51c4f35a00cf66fff3ee37fbef1e0d674af6ed580367d8b3d2d60fb88609a675e8f322fd466a23006e38078b67edd6f306e639d6be12abb2972d2
-EBUILD micropython-1.11.ebuild 1099 BLAKE2B 1899b0063ccb85b383deeacb0a6cf2cf5ef785eaf5e9c3bd7ac2981805d475ddf31c58274887858c4aa3731fb68f8b6e7a70fb29b158aafe3ae9b0a235e9a2ef SHA512 02ff5c432ffeb1b4e11b30df00abe107513a7e52f6d9b5a1b242ce55037b8b989e2d151012bb105336b6fd8e563de308fa52dd02b38caf3599eb433790ceda36
+EBUILD micropython-1.11.ebuild 1377 BLAKE2B 5152ad5ac74b2f791a002368eed17d494625f147eab2cd50bf86914e54c1d59a21668803db5c80d0925f40f86d487e78b27188a129554cd2e46888c2673642e7 SHA512 02d5e85301661cad17d979027373c830beb2b9f933612f2b13095b9825db75bd8196a28a56e586dcd02b6de02c1a3828d24175f466dc5618773329a7371466eb
MISC metadata.xml 1347 BLAKE2B c121e2eafde4ab3c49a352ab96ffbcc042ecddb5a765f3192589a41f5b3bc5f92e6a6f1a58df21ef2812424aac94e6cd579cfe1d29b4dd16983048768f1694ed SHA512 e8dd8f7cc3d0c570da6b9982596e39891e78e302581dbc0601d622831f976f16b9e9f78d7e0b55ae58ed3c81c3e7113a4217ca1671cdd8929f0b34b4647efc3a
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
new file mode 100644
index 000000000000..6d81661790e9
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch
@@ -0,0 +1,12 @@
+--- 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.9.3-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch
deleted file mode 100644
index 5ae7299f9f9c..000000000000
--- a/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- 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
-@@ -132,9 +132,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/files/micropython-1.9.4-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch
deleted file mode 100644
index a130b72b6131..000000000000
--- a/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- 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.11.ebuild b/dev-lang/micropython/micropython-1.11.ebuild
index 0c8219f76706..bdf54e45b9ee 100644
--- a/dev-lang/micropython/micropython-1.11.ebuild
+++ b/dev-lang/micropython/micropython-1.11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -19,17 +19,29 @@ DEPEND="
virtual/libffi
virtual/pkgconfig"
-PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-prevent-stripping.patch"
+ "${FILESDIR}/${P}-exclude-float-parse-tests.patch"
+)
+
+src_prepare() {
+ default
-src_compile() {
cd ports/unix || die
- # 1) don't die on compiler warnings
+ # 1) don't die on compiler warning
# 2) remove /usr/local prefix references in favour of /usr
- sed -i \
- -e 's#-Werror##g;' \
+ # 3) enforce our CFLAGS
+ # 4) enforce our LDFLAGS
+ sed -e 's#-Werror##g;' \
-e 's#\/usr\/local#\/usr#g;' \
- Makefile || die
+ -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)"
@@ -37,12 +49,12 @@ src_compile() {
src_test() {
cd ports/unix || die
- emake test
+ emake CC="$(tc-getCC)" test
}
src_install() {
pushd ports/unix > /dev/null || die
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install
+ emake CC="$(tc-getCC)" DESTDIR="${D}" install
popd > /dev/null || die
# remove .git files