Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/, dev-lang/micropython/files/
Date: Wed, 27 Nov 2019 22:48:31
Message-Id: 1574894705.c262bf1a925bea1d43a1731722bdb21861086f2e.monsieurp@gentoo
1 commit: c262bf1a925bea1d43a1731722bdb21861086f2e
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 27 22:41:50 2019 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 27 22:45:05 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c262bf1a
7
8 dev-lang/micropython: version bump.
9
10 Courtesy of Mike Auty <ikelos <AT> gentoo.org>.
11
12 Closes: https://bugs.gentoo.org/700362
13 Package-Manager: Portage-2.3.79, Repoman-2.3.16
14 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
15
16 dev-lang/micropython/Manifest | 1 +
17 .../files/micropython-1.11-prevent-stripping.patch | 26 +++++++++++
18 dev-lang/micropython/micropython-1.11.ebuild | 52 ++++++++++++++++++++++
19 3 files changed, 79 insertions(+)
20
21 diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
22 index 0b69931fbe1..688bf57b4ed 100644
23 --- a/dev-lang/micropython/Manifest
24 +++ b/dev-lang/micropython/Manifest
25 @@ -1,2 +1,3 @@
26 +DIST micropython-1.11.tar.gz 23010708 BLAKE2B 8deb29f2a27b8299f62c8c3d332654889e610ddc6854dc38c6cf7504c89f2f9cbbacccdc2d8e471d96b8bb28bbb920fe7ec1b8fd49b14209924262f54687c3c1 SHA512 255860e56bf51c4f35a00cf66fff3ee37fbef1e0d674af6ed580367d8b3d2d60fb88609a675e8f322fd466a23006e38078b67edd6f306e639d6be12abb2972d2
27 DIST micropython-1.9.3.tar.gz 17311734 BLAKE2B 31ebdedc402af53b205a854aa61b59c694cc893c7f80e4b84196c5d44527545f442628938b7dd923ed9086a79e00ff899682548115224613e888eb8a37dd5ae3 SHA512 1b4358913ed78df66314c9a62636c7b8d086c731459e3bee1fab8695286dc03b6ec7594b2f9b8105e2a6d62190d95c6ad5351fb64c666c1ea54b9535193ee8a8
28 DIST micropython-1.9.4.tar.gz 18957648 BLAKE2B bc4dc4ef6623adbda64c9e03137860a7b9ce7d2d181434cb993438752ec39a4ea7cf7cf7a14736c57bdc2ea9c3f856b0dbe2d92fc0e1cbef99112427583ad665 SHA512 9995c983c93fb1280e60d7c52a10930a6a3de8d589a0f4264a9a4a4fede7c37e27ed4871c4c9092aec3fb33028064beb8c5eb19b7956e8f0c5d3b2a82ffa9932
29
30 diff --git a/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch
31 new file mode 100644
32 index 00000000000..7b78b6fb9f6
33 --- /dev/null
34 +++ b/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch
35 @@ -0,0 +1,26 @@
36 +diff --git a/py/mkenv.mk b/py/mkenv.mk
37 +index 46eedf9..2f3f3ca 100644
38 +--- a/py/mkenv.mk
39 ++++ b/py/mkenv.mk
40 +@@ -52,7 +52,6 @@ CXX = $(CROSS_COMPILE)g++
41 + LD = $(CROSS_COMPILE)ld
42 + OBJCOPY = $(CROSS_COMPILE)objcopy
43 + SIZE = $(CROSS_COMPILE)size
44 +-STRIP = $(CROSS_COMPILE)strip
45 + AR = $(CROSS_COMPILE)ar
46 + ifeq ($(MICROPY_FORCE_32BIT),1)
47 + CC += -m32
48 +diff --git a/py/mkrules.mk b/py/mkrules.mk
49 +index 4e4fdef..149b337 100644
50 +--- a/py/mkrules.mk
51 ++++ b/py/mkrules.mk
52 +@@ -133,9 +133,6 @@ $(PROG): $(OBJ)
53 + # Do not pass COPT here - it's *C* compiler optimizations. For example,
54 + # we may want to compile using Thumb, but link with non-Thumb libc.
55 + $(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
56 +-ifndef DEBUG
57 +- $(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
58 +-endif
59 + $(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)
60 +
61 + clean: clean-prog
62
63 diff --git a/dev-lang/micropython/micropython-1.11.ebuild b/dev-lang/micropython/micropython-1.11.ebuild
64 new file mode 100644
65 index 00000000000..d1f7d57db77
66 --- /dev/null
67 +++ b/dev-lang/micropython/micropython-1.11.ebuild
68 @@ -0,0 +1,52 @@
69 +# Copyright 1999-2019 Gentoo Authors
70 +# Distributed under the terms of the GNU General Public License v2
71 +
72 +EAPI=6
73 +
74 +inherit toolchain-funcs
75 +
76 +DESCRIPTION="Python implementation for microcontrollers"
77 +HOMEPAGE="https://github.com/micropython/micropython"
78 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
79 +
80 +KEYWORDS="~amd64 ~x86"
81 +LICENSE="MIT"
82 +SLOT="0"
83 +IUSE="test"
84 +
85 +DEPEND="
86 + virtual/libffi
87 + virtual/pkgconfig"
88 +
89 +PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
90 +
91 +src_compile() {
92 + cd ports/unix || die
93 +
94 + # 1) don't die on compiler warnings
95 + # 2) remove /usr/local prefix references in favour of /usr
96 + sed -i \
97 + -e 's#-Werror##g;' \
98 + -e 's#\/usr\/local#\/usr#g;' \
99 + Makefile || die
100 +
101 + emake CC="$(tc-getCC)" axtls
102 + emake CC="$(tc-getCC)"
103 +}
104 +
105 +src_test() {
106 + cd ports/unix || die
107 + emake test
108 +}
109 +
110 +src_install() {
111 + pushd ports/unix > /dev/null || die
112 + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install
113 + popd > /dev/null || die
114 +
115 + # remove .git files
116 + find tools -type f -name '.git*' -exec rm {} \; || die
117 +
118 + dodoc -r tools
119 + einstalldocs
120 +}