Skip to content
Permalink
Browse files

lang/micropython: Add port from upstream

  • Loading branch information
decke committed May 14, 2019
1 parent 38203d8 commit edcd05081808353e328ed01a43e8d4ff02801410
Showing 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
@@ -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>
@@ -0,0 +1,2 @@
SHA256 (micropython-micropython-v1.5.1_GH0.tar.gz) = 95cc34089a1e40a992065ff9c9b67c121674c3bd6136a50882054fcac27485c2
SIZE (micropython-micropython-v1.5.1_GH0.tar.gz) = 6635550
@@ -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/

0 comments on commit edcd050

Please sign in to comment.
You can’t perform that action at this time.