24b9f273e6
Major changes since 1.3.1: - new builtins, ujson, uheapq, ubinascii modules - new memoryview and compile builtins - improvements for eval and exec - array slice assignment support - basix regex support - x86 support for the native emitter - many other fixes and improvements Changelogs: https://github.com/micropython/micropython/release
55 lines
1.3 KiB
Makefile
55 lines
1.3 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= micropython
|
|
PORTVERSION= 1.4.0
|
|
CATEGORIES= lang python
|
|
|
|
MAINTAINER= mva@FreeBSD.org
|
|
COMMENT= Implementation of the Python language for microcontrollers
|
|
|
|
LICENSE= MIT
|
|
|
|
LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi
|
|
|
|
USES= gmake pkgconfig python:3,build readline shebangfix
|
|
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= micropython
|
|
GH_PROJECT= micropython
|
|
GH_TAGNAME= v1.4
|
|
|
|
PLIST_FILES= bin/micropython
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-1.4/unix
|
|
|
|
SHEBANG_FILES= ../py/py-version.sh
|
|
bash_CMD?= /bin/sh
|
|
MAKE_ARGS+= V=1
|
|
MAKE_ENV+= PYTHON=${PYTHON_CMD} CFLAGS_EXTRA="${CPPFLAGS} ${CFLAGS}"
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${OSVERSION} < 1000024
|
|
# Our default GCC 4.2.1 build can't handle some quirks correctly.
|
|
# Use an up to date version for FreeBSD releases, which use GCC
|
|
# as default compiler
|
|
USE_GCC= yes
|
|
.endif
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e 's|-Werror||;/^COPT =/d' ${WRKSRC}/Makefile
|
|
@${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
|
|
|
|
regression-test: build
|
|
${RM} ${WRKSRC}/../tests/basics/memoryerror.py
|
|
cd ${WRKSRC} && ${MAKE_CMD} test
|
|
|
|
.include <bsd.port.post.mk>
|