diff --git a/srcpkgs/racket/template b/srcpkgs/racket/template index a6f280081cb..230f6c6e13a 100644 --- a/srcpkgs/racket/template +++ b/srcpkgs/racket/template @@ -21,17 +21,22 @@ nostrip=yes patch_args="-Np2" if [ "$CROSS_BUILD" ]; then - _chezscheme_path="${XBPS_BUILDDIR}/${wrksrc}/${build_wrksrc}" - - configure_args+=" --enable-racket=/usr/bin/racket - --enable-scheme=${_chezscheme_path}" hostmakedepends+=" racket sqlite-devel" +fi +pre_configure() { + if [ "$CROSS_BUILD" ]; then + configure_args+=" --enable-racket=/usr/bin/racket + --enable-scheme=${wrksrc}/src" + fi +} + +pre_build() { # Build ChezScheme for the host so we can use it to build Racket # Using "--enable-racket=auto" above selects the wrong compiler toolchain - pre_build() { + if [ "$CROSS_BUILD" ]; then ( - cd ${_chezscheme_path}/ChezScheme + cd ChezScheme # If this builds the wrong arch, Racket's automatic # arch detection for the ChezScheme build has failed. @@ -49,8 +54,8 @@ if [ "$CROSS_BUILD" ]; then ./configure --disable-curses --disable-x11 make ) - } -fi + fi +} post_install() { vlicense LICENSE-libscheme.txt