From 38ea8f4f87e49d3a0c554b40842e5764a2a8ca24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 28 Oct 2022 20:27:19 +0700 Subject: [PATCH] racket: do not define function conditionally --- srcpkgs/racket/template | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) 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