racket: add support for musl

Closes: #12721
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2018-04-07 12:48:12 +02:00
parent ae0d5d318d
commit 501da27f0f
No known key found for this signature in database
GPG Key ID: 6764EC32352D0647
2 changed files with 42 additions and 11 deletions

View File

@ -0,0 +1,26 @@
This patch fixes error:
env XFORM_USE_PRECOMP=xsrc/precomp.h ../racketcgc -cqu ./xform.rkt --setup . --depends --cpp "gcc -E -I./.. -I./../include -I./../../rktio -I../../rktio -Os -fomit-frame-pointer -pthread -DUSE_SENORA_GC -DMZ_USES_SHARED_LIB " --keep-lines -o xsrc/future.c ./../src/future.c
Error [GCING] 234 in ./../src/bool.c: Function mz_long_double_eqv declared __xform_nongcing__, but includes a function call at __FLOAT_BITS.
Error [GCING] 270 in ./../src/bool.c: Function double_eqv declared __xform_nongcing__, but includes a function call at __FLOAT_BITS.
xform: Errors converting
context...:
src/racket/gc2/xform-collects/compiler/priva...:8:2: xform
src/racket/gc2/xform-collects/xform/xform-mo...: [running body]
src/racket/gc2/xform.rkt: [running body]
Resources:
* https://github.com/racket/racket/issues/1638
* https://github.com/NixOS/nixpkgs/pull/31017
* https://github.com/racket/racket/pull/1886
--- collects/compiler/private/xform.rkt
--- collects/compiler/private/xform.rkt
@@ -924,6 +924,7 @@
|GetStdHandle| |__CFStringMakeConstantString|
_vswprintf_c
malloc strdup
+ __FLOAT_BITS __DOUBLE_BITS ; musl
scheme_make_small_bignum scheme_make_small_rational scheme_make_small_complex))
(define non-functions-table

View File

@ -1,7 +1,7 @@
# Template file for 'racket'
pkgname=racket
version=6.12
revision=1
revision=2
build_style=gnu-configure
build_wrksrc=src
hostmakedepends="gsfonts"
@ -14,22 +14,27 @@ homepage="http://racket-lang.org/"
distfiles="http://mirror.racket-lang.org/installers/$version/$pkgname-$version-src.tgz"
checksum=655e052847c53e7c64ab9ad2247860c7b9abe2c4b0966474f0375127fff58c33
nostrip=yes
only_for_archs="i686 x86_64 armv5tel armv6l armv7l aarch64"
configure_args="--disable-docs"
if [ "$CROSS_BUILD" ]; then
configure_args+=" --enable-racket=/usr/bin/racket"
hostmakedepends+=" racket"
fi
case "$XBPS_TARGET_MACHINE" in
*-musl)
makedepends+=" libucontext-devel";;
esac
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl)
export CFLAGS+=" -D_GNU_SOURCE"
export LIBS+=" -lucontext"
;;
esac
}
post_install() {
vlicense COPYING-libscheme.txt
}
racket-doc_package() {
noarch=yes
short_desc+=" -- documentation"
depends="racket>=${version}_${revision}"
pkg_install() {
vmove usr/share/doc/racket
}
}