summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2018-05-22 23:41:02 +0200
committerPatrice Clement <monsieurp@gentoo.org>2018-05-22 23:41:27 +0200
commitf032e1dfe1c78f473d8fb54d04a9dab173f9e9c7 (patch)
tree441d1c89302dce9521cab5f85666c38b59a2c4d5 /dev-lang
parentnet-misc/whois: Removed old. (diff)
downloadgentoo-f032e1dfe1c78f473d8fb54d04a9dab173f9e9c7.tar.gz
gentoo-f032e1dfe1c78f473d8fb54d04a9dab173f9e9c7.tar.bz2
gentoo-f032e1dfe1c78f473d8fb54d04a9dab173f9e9c7.zip
dev-lang/micropython: version bump.
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/micropython/Manifest1
-rw-r--r--dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch22
-rw-r--r--dev-lang/micropython/micropython-1.9.4.ebuild54
3 files changed, 77 insertions, 0 deletions
diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index 5b5ef6cd2f53..0b69931fbe10 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 000000000000..a130b72b6131
--- /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 000000000000..95899e4fd9b4
--- /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
+}