From 89c6c06b8c42107dd231687a1012354e7d3039fc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 26 Nov 2017 11:42:28 +0000 Subject: gentoo resync : 26.11.2017 --- dev-lang/micropython/Manifest | 4 ++ .../micropython-1.9.3-prevent-stripping.patch | 22 +++++++++ dev-lang/micropython/metadata.xml | 30 ++++++++++++ dev-lang/micropython/micropython-1.9.3.ebuild | 54 ++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 dev-lang/micropython/Manifest create mode 100644 dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch create mode 100644 dev-lang/micropython/metadata.xml create mode 100644 dev-lang/micropython/micropython-1.9.3.ebuild (limited to 'dev-lang/micropython') diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest new file mode 100644 index 000000000000..1deee78b872d --- /dev/null +++ b/dev-lang/micropython/Manifest @@ -0,0 +1,4 @@ +AUX micropython-1.9.3-prevent-stripping.patch 787 BLAKE2B c050420f5dae60edb93c63b504fdbe047a8c9ed56c543ffde817c86a6fd9a53efeb8561c69823186121a5727fbf29b8474eac223398fa7ee43c825e50745c6fd SHA512 5e7fa7481f4bfab15a041bbccf452d5d6fe5a5c1cd8cfae2e5ec3475d84decacc0b9c0631766582173fc4cda82d78e2370e402f95d5989e13bf3adbdaf39add4 +DIST micropython-1.9.3.tar.gz 17311734 BLAKE2B 31ebdedc402af53b205a854aa61b59c694cc893c7f80e4b84196c5d44527545f442628938b7dd923ed9086a79e00ff899682548115224613e888eb8a37dd5ae3 SHA512 1b4358913ed78df66314c9a62636c7b8d086c731459e3bee1fab8695286dc03b6ec7594b2f9b8105e2a6d62190d95c6ad5351fb64c666c1ea54b9535193ee8a8 +EBUILD micropython-1.9.3.ebuild 1158 BLAKE2B 1d452bdf85783135f6bb2c4e0d2f6cd297d863d00eef8003dcc9f5710e0b03194828df751a205b1c6069506c509685189a66083b27324c3f1ca9c64a06297596 SHA512 1eef495d618817b0023c13b4bd7606ddec09f4ad32e6beffe3bc418549781b53d92340af90a39e3995f8decc9454b9221b2b048ec713e01fec7c1fc058ca8744 +MISC metadata.xml 1347 BLAKE2B c121e2eafde4ab3c49a352ab96ffbcc042ecddb5a765f3192589a41f5b3bc5f92e6a6f1a58df21ef2812424aac94e6cd579cfe1d29b4dd16983048768f1694ed SHA512 e8dd8f7cc3d0c570da6b9982596e39891e78e302581dbc0601d622831f976f16b9e9f78d7e0b55ae58ed3c81c3e7113a4217ca1671cdd8929f0b34b4647efc3a diff --git a/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch new file mode 100644 index 000000000000..5ae7299f9f9c --- /dev/null +++ b/dev-lang/micropython/files/micropython-1.9.3-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 +@@ -132,9 +132,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/metadata.xml b/dev-lang/micropython/metadata.xml new file mode 100644 index 000000000000..e644fcc0141c --- /dev/null +++ b/dev-lang/micropython/metadata.xml @@ -0,0 +1,30 @@ + + + + + monsieurp@gentoo.org + Patrice Clement + + + python@gentoo.org + Python + + + micropython/micropython + + +The MicroPython project aims to put an implementation of Python 3.x on +microcontrollers and small embedded systems. +MicroPython implements the entire Python 3.4 syntax (including exceptions, +with, yield from, etc., and additionally async/await keywords from Python 3.5). +The following core datatypes are provided: str (including basic Unicode +support), bytes, bytearray, tuple, list, dict, set, frozenset, array.array, +collections.namedtuple, classes and instances. Builtin modules include sys, +time, and struct, etc. Select ports have support for _thread module +(multithreading). Note that only a subset of Python 3 functionality is +implemented for the data types and modules. +MicroPython can execute scripts in textual source form or from precompiled +bytecode, in both cases either from an on-device filesystem or "frozen" into +the MicroPython executable. + + 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 +} -- cgit v1.2.3