summaryrefslogtreecommitdiff
path: root/dev-lang/micropython/micropython-1.11.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-lang/micropython/micropython-1.11.ebuild
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-lang/micropython/micropython-1.11.ebuild')
-rw-r--r--dev-lang/micropython/micropython-1.11.ebuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-lang/micropython/micropython-1.11.ebuild b/dev-lang/micropython/micropython-1.11.ebuild
new file mode 100644
index 000000000000..0c8219f76706
--- /dev/null
+++ b/dev-lang/micropython/micropython-1.11.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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"
+RESTRICT="!test? ( 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() {
+ 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
+}