summaryrefslogtreecommitdiff
path: root/dev-lang/micropython/micropython-1.9.4.ebuild
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/micropython/micropython-1.9.4.ebuild
parent8bad3f6dca7b79f0ceedf8e95f924f7155cbc5ea (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/micropython/micropython-1.9.4.ebuild')
-rw-r--r--dev-lang/micropython/micropython-1.9.4.ebuild54
1 files changed, 54 insertions, 0 deletions
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
+}