Browse Source

lang/micropython: Add port from upstream

master
Bernhard Fröhlich 3 months ago
parent
commit
edcd050818
Signed by: Bernhard Froehlich <decke@bluelife.at> GPG Key ID: 4DD88C3F9F3B8333
3 changed files with 56 additions and 0 deletions
  1. 50
    0
      lang/micropython/Makefile
  2. 2
    0
      lang/micropython/distinfo
  3. 4
    0
      lang/micropython/pkg-descr

+ 50
- 0
lang/micropython/Makefile View File

@@ -0,0 +1,50 @@
# $FreeBSD: head/lang/micropython/Makefile 498476 2019-04-09 14:04:49Z sunpoet $

PORTNAME= micropython
PORTVERSION= 1.5.1
DISTVERSIONPREFIX= v
PORTREVISION= 3
CATEGORIES= lang python

MAINTAINER= ports@FreeBSD.org
COMMENT= Implementation of the Python language for microcontrollers

LICENSE= MIT

LIB_DEPENDS= libffi.so:devel/libffi

USES= gmake pkgconfig python:3.4+,build readline shebangfix

USE_GITHUB= yes

PLIST_FILES= bin/micropython

BROKEN_armv6= fails to assemble: error: invalid operand for instruction
BROKEN_armv7= fails to assemble: error: invalid operand for instruction

WRKSRC_SUBDIR= unix

SHEBANG_FILES= ../tools/make-frozen.py
MAKE_ARGS+= V=1
MAKE_ENV+= PYTHON=${PYTHON_CMD} CFLAGS_EXTRA="${CPPFLAGS} ${CFLAGS}"
TEST_TARGET= test

post-patch:
@${REINPLACE_CMD} -e 's|-Werror||;/^COPT =/d; \
s|ls -1 -v|ls -1|' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|re_exec|mp_re_exec|' \
${WRKSRC}/../extmod/modure.c
@${REINPLACE_CMD} -e 's|AS =|AS ?=|;s|LD =|LD ?=|; \
s|CC =|CC ?=|;s|PYTHON =|PYTHON ?=|' \
${WRKSRC}/../py/mkenv.mk
@${REINPLACE_CMD} -e 's|libc\.so\.6|libc\.so\.7|;' \
${WRKSRC}/../tests/unix/ffi_callback.py \
${WRKSRC}/../tests/unix/ffi_float.py

do-install:
${INSTALL_PROGRAM} ${WRKSRC}/micropython ${STAGEDIR}${PREFIX}/bin

pre-test:
@${RM} ${WRKSRC}/../tests/basics/memoryerror.py

.include <bsd.port.mk>

+ 2
- 0
lang/micropython/distinfo View File

@@ -0,0 +1,2 @@
SHA256 (micropython-micropython-v1.5.1_GH0.tar.gz) = 95cc34089a1e40a992065ff9c9b67c121674c3bd6136a50882054fcac27485c2
SIZE (micropython-micropython-v1.5.1_GH0.tar.gz) = 6635550

+ 4
- 0
lang/micropython/pkg-descr View File

@@ -0,0 +1,4 @@
Micro Python is a lean and fast implementation of the Python 3 programming
language that is optimised to run on a microcontroller.

WWW: https://www.micropython.org/

Loading…
Cancel
Save