void-packages/srcpkgs/micropython/template

38 lines
1.1 KiB
Bash

# Template file for 'micropython'
pkgname=micropython
version=1.23.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 <orphan@voidlinux.org>"
license="MIT"
homepage="https://micropython.org/"
distfiles="https://github.com/micropython/micropython/releases/download/v${version}/micropython-${version}.tar.xz"
checksum=0ab283c2fc98d466c1ff26692bee46abaeeab55d488a36fc3cb6372cb8fb390d
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
}