67 lines
2.1 KiB
Bash
67 lines
2.1 KiB
Bash
# Template file for 'racket'
|
|
pkgname=racket
|
|
version=8.6
|
|
revision=1
|
|
archs="aarch64* armv6* armv7* i686* x86_64*"
|
|
wrksrc="${pkgname}-${version}" # needed below
|
|
build_wrksrc=src
|
|
build_style=gnu-configure
|
|
configure_args="--enable-useprefix --enable-curses"
|
|
make_build_args="CC_FOR_BUILD=cc"
|
|
hostmakedepends="liberation-fonts-ttf"
|
|
makedepends="gtk+3-devel liblz4-devel ncurses-devel sqlite-devel zlib-devel"
|
|
depends="gtk+3 libssl1.1"
|
|
short_desc="Multi-paradigm programming language in the Lisp-Scheme family"
|
|
maintainer="Andrea Brancaleoni <abc@pompel.me>"
|
|
license="LGPL-3.0-only, MIT"
|
|
homepage="http://racket-lang.org/"
|
|
distfiles="http://mirror.racket-lang.org/installers/${version}/${pkgname}-${version}-src.tgz"
|
|
checksum=2eff3e97bc7a10cfa0320da9b07f0d488653b0b5b8490322c82f384ae0fa1a28
|
|
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"
|
|
|
|
# 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() {
|
|
(
|
|
cd ${_chezscheme_path}/ChezScheme
|
|
|
|
# If this builds the wrong arch, Racket's automatic
|
|
# arch detection for the ChezScheme build has failed.
|
|
# See <Racket sourcedir>/src/ChezScheme/IMPLEMENTATION.md "Build System"
|
|
# and <Racket sourcedir>/src/ChezScheme/s/cmacros.ss "define-machine-types"
|
|
# for the "machine-type" variable that needs to be passed to rktboot/main.rkt
|
|
racket rktboot/main.rkt
|
|
# Make sure Chez builds natively
|
|
env CC="gcc" \
|
|
AR="ar" \
|
|
ARFLAGS="rc" \
|
|
RANLIB="ranlib" \
|
|
CFLAGS="-m${XBPS_WORDSIZE} -O2 -D_REENTRANT -pthread" \
|
|
-LDFLAGS="-Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib -rdynamic" \
|
|
./configure --disable-curses --disable-x11
|
|
make
|
|
)
|
|
}
|
|
fi
|
|
|
|
post_install() {
|
|
vlicense LICENSE-libscheme.txt
|
|
vlicense LICENSE-MIT.txt
|
|
}
|
|
|
|
racket-doc_package() {
|
|
short_desc+=" - documentation"
|
|
depends="racket>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/share/doc/racket
|
|
}
|
|
}
|