polyml: fix lint, clean up, simplify, add libffi-devel outside x86

This commit is contained in:
q66 2021-05-07 01:25:30 +02:00
parent 3a3cd3a291
commit c8ece55a32
1 changed files with 18 additions and 21 deletions

View File

@ -1,33 +1,30 @@
# Template file for 'polyml'
pkgname=polyml
version=5.8.2
revision=1
revision=2
build_style=gnu-configure
configure_args="--enable-shared"
makedepends="gmp-devel"
short_desc="Poly/ML Standard ML (SML) implementation"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="LGPL-2.1-or-later"
homepage="http://www.polyml.org/"
distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz"
checksum=310b0ba748a50f38e99de7f65ba990bc4b4f4b0123ad76aba4c44d7cd1ed9277
conflicts="mesa-demos>=0" # /usr/bin/poly
nocross=yes
case "$XBPS_TARGET_MACHINE" in
i686-musl|x86_64-musl)
i686*|x86_64*)
# musl doesn't allow writing to .rodata and .text during
# relocation, but polyexport.o contains DT_TEXTREL
# since libpolyml/elfexport.cpp only creates absolute
# relocations. Drop PIE and do relocations at link time.
nopie=yes;;
i686*|x86_64*) ;;
*) configure_args+=" --disable-native-codegeneration" ;;
esac
makedepends="gmp-devel"
conflicts="mesa-demos>=0" # /usr/bin/poly
short_desc="The Poly/ML Standard ML (SML) implementation"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="LGPL-2.1"
homepage="http://www.polyml.org/"
distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz"
checksum=310b0ba748a50f38e99de7f65ba990bc4b4f4b0123ad76aba4c44d7cd1ed9277
nocross=yes
# broken on musl ppc and big endian ppc
case "$XBPS_TARGET_MACHINE" in
ppc64le) ;;
ppc*) broken="Segmentation Fault";;
[ "$XBPS_TARGET_LIBC" = "musl" ] && nopie=yes
;;
*) makedepends+=" libffi-devel";;
esac
# Since this is a compiler, no -devel package.
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
broken="crashes"
fi