diff options
author | Patrice Clement <monsieurp@gentoo.org> | 2017-11-25 12:48:39 +0100 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2017-11-25 12:51:05 +0100 |
commit | c3fe6df715e7869f381212fec2899587def57f07 (patch) | |
tree | 1a525ace1793e3ded697644f3963df18cec701ea /dev-lang/micropython/micropython-1.9.3.ebuild | |
parent | net-analyzer/tcpreen: stable for amd64. (diff) | |
download | gentoo-c3fe6df715e7869f381212fec2899587def57f07.tar.gz gentoo-c3fe6df715e7869f381212fec2899587def57f07.tar.bz2 gentoo-c3fe6df715e7869f381212fec2899587def57f07.zip |
dev-lang/micropython: new package.
The MicroPython project aims to put an implementation of Python 3.x on
microcontrollers and small embedded systems.
Package-Manager: Portage-2.3.13, Repoman-2.3.3
Diffstat (limited to 'dev-lang/micropython/micropython-1.9.3.ebuild')
-rw-r--r-- | dev-lang/micropython/micropython-1.9.3.ebuild | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-lang/micropython/micropython-1.9.3.ebuild b/dev-lang/micropython/micropython-1.9.3.ebuild new file mode 100644 index 000000000000..672087758df5 --- /dev/null +++ b/dev-lang/micropython/micropython-1.9.3.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2017 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() { + # XXX: find out why these tests fail + rm -v tests/misc/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 +} |