summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2021-10-25 14:39:50 +0200
committerPatrice Clement <monsieurp@gentoo.org>2021-10-25 14:44:11 +0200
commitc144107d5e946d6f7fcf2af60f0b6386f4f88e43 (patch)
tree0dc850b046e4835dbf752bc34a06f2552051cb93 /dev-lang/micropython
parentdev-lang/tcc: add musl/uclibc support (diff)
downloadgentoo-c144107d5e946d6f7fcf2af60f0b6386f4f88e43.tar.gz
gentoo-c144107d5e946d6f7fcf2af60f0b6386f4f88e43.tar.bz2
gentoo-c144107d5e946d6f7fcf2af60f0b6386f4f88e43.zip
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@gentoo.org>
Diffstat (limited to 'dev-lang/micropython')
-rw-r--r--dev-lang/micropython/Manifest1
-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-prevent-stripping.patch12
-rw-r--r--dev-lang/micropython/micropython-1.17.ebuild65
4 files changed, 89 insertions, 0 deletions
diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index 1ac72acd2024..e6e1460bf548 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 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-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/micropython-1.17.ebuild b/dev-lang/micropython/micropython-1.17.ebuild
new file mode 100644
index 000000000000..ce87e6721415
--- /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
+}