summaryrefslogtreecommitdiff
path: root/dev-lang/micropython/micropython-1.11.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-lang/micropython/micropython-1.11.ebuild
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-lang/micropython/micropython-1.11.ebuild')
-rw-r--r--dev-lang/micropython/micropython-1.11.ebuild30
1 files changed, 21 insertions, 9 deletions
diff --git a/dev-lang/micropython/micropython-1.11.ebuild b/dev-lang/micropython/micropython-1.11.ebuild
index 0c8219f76706..bdf54e45b9ee 100644
--- a/dev-lang/micropython/micropython-1.11.ebuild
+++ b/dev-lang/micropython/micropython-1.11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -19,17 +19,29 @@ DEPEND="
virtual/libffi
virtual/pkgconfig"
-PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-prevent-stripping.patch"
+ "${FILESDIR}/${P}-exclude-float-parse-tests.patch"
+)
+
+src_prepare() {
+ default
-src_compile() {
cd ports/unix || die
- # 1) don't die on compiler warnings
+ # 1) don't die on compiler warning
# 2) remove /usr/local prefix references in favour of /usr
- sed -i \
- -e 's#-Werror##g;' \
+ # 3) enforce our CFLAGS
+ # 4) enforce our LDFLAGS
+ sed -e 's#-Werror##g;' \
-e 's#\/usr\/local#\/usr#g;' \
- Makefile || die
+ -e "s#^CFLAGS = \(.*\)#CFLAGS = \1 ${CFLAGS}#g" \
+ -e "s#^LDFLAGS = \(.*\)#LDFLAGS = \1 ${LDFLAGS}#g" \
+ -i Makefile || die "can't patch Makefile"
+}
+
+src_compile() {
+ cd ports/unix || die
emake CC="$(tc-getCC)" axtls
emake CC="$(tc-getCC)"
@@ -37,12 +49,12 @@ src_compile() {
src_test() {
cd ports/unix || die
- emake test
+ emake CC="$(tc-getCC)" test
}
src_install() {
pushd ports/unix > /dev/null || die
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install
+ emake CC="$(tc-getCC)" DESTDIR="${D}" install
popd > /dev/null || die
# remove .git files