freebsd-ports/lang/micropython/Makefile
Kai Knoblich 31d9698334 lang/micropython: Update to 1.17
* Switch to GCC because building with Clang leads to a broken
  "mpy-cross" binary, which segfaults if issued with several parameters
  during build.

* REINPLACE_CMD should not be used to replace static content, hence
  convert those occurrences into patches.

* Also update pkg-descr and sort variables a bit according to the PHB.

Reviewed by:	decke (earlier revision)
Approved by:	kai (python, maintainer)
Differential Revision:	https://reviews.freebsd.org/D31855
2021-09-09 11:10:17 +02:00

45 lines
1.2 KiB
Makefile

PORTNAME= micropython
PORTVERSION= 1.17
DISTVERSIONPREFIX= v
CATEGORIES= lang python
MAINTAINER= python@FreeBSD.org
COMMENT= Implementation of the Python language for microcontrollers
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN_armv6= fails to assemble: error: invalid operand for instruction
BROKEN_armv7= fails to assemble: error: invalid operand for instruction
LIB_DEPENDS= libffi.so:devel/libffi
USES= gmake pkgconfig python:,build
USE_GCC= yes
USE_GITHUB= yes
GH_TUPLE= micropython:axtls:531cab9:axtls \
pfalcon:berkeley-db-1.xx:35aaec4:bdb
MAKE_ARGS+= CC=${CC} CPP="${CC} -E" V=1
MAKE_ENV+= CFLAGS_EXTRA="${CPPFLAGS} ${CFLAGS} -Wno-float-conversion" COPT=""
# With aarch64 (QEMU) the float_parse and the float_parse_doubleprec tests
# fail as they give a different output.
TEST_TARGET= test
BINARY_ALIAS= python3=${PYTHON_CMD}
BUILD_WRKSRC= ${WRKSRC}/ports/unix
TEST_WRKSRC= ${WRKSRC}/ports/unix
PLIST_FILES= bin/micropython
post-extract:
@${RM} -r ${WRKSRC}/lib/axtls ${WRKSRC}/lib/berkeley-db-1.xx
@${RLN} ${WRKSRC_axtls} ${WRKSRC}/lib/axtls
@${RLN} ${WRKSRC_bdb} ${WRKSRC}/lib/berkeley-db-1.xx
do-install:
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/micropython ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>