# Template file for 'micropython' pkgname=micropython version=1.21.0 revision=1 build_wrksrc=ports/unix hostmakedepends="pkg-config python3" makedepends="libffi-devel" short_desc="Python implementation for microcontrollers and constrained systems" maintainer="Orphaned " license="MIT" homepage="https://micropython.org/" distfiles="https://github.com/micropython/micropython/releases/download/v${version}/micropython-${version}.tar.xz" checksum=abd2152613559d3f44728668346e78be9d93458133a03b700baf222c322fd4d5 case "$XBPS_TARGET_MACHINE" in arm*-musl) nopie=yes ;; # building with PIE creates text relocations in the binary ppc*) broken="missing nlr_push" ;; esac if [ "$XBPS_TARGET_LIBC" = "musl" ]; then makedepends+=" musl-legacy-compat" fi pre_configure() { vsed -i 's|-Werror||;/^COPT =/d' Makefile } do_build() { CFLAGS= make -C ../../mpy-cross V=1 CFLAGS_EXTRA=${HOST_CFLAGS} STRIP= ${makejobs} make V=1 CC=${CC} CFLAGS_EXTRA="${CFLAGS}" \ LDFLAGS_EXTRA="${LDFLAGS}" STRIP= ${makejobs} all } do_install() { vbin build-standard/micropython vlicense ../../LICENSE }