103 lines
3.5 KiB
Bash
103 lines
3.5 KiB
Bash
# Template file for 'rust-bootstrap'
|
|
pkgname=rust-bootstrap
|
|
version=1.76.0
|
|
revision=1
|
|
short_desc="Rust programming language bootstrap toolchain"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="MIT, Apache-2.0"
|
|
homepage="https://www.rust-lang.org/"
|
|
conflicts="rust>=0"
|
|
lib32disabled=yes
|
|
nostrip=yes
|
|
repository=bootstrap
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
depends="libexecinfo-devel"
|
|
fi
|
|
|
|
_bootstrap_url="https://static.rust-lang.org/dist"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64*|i686) ;;
|
|
# See srcpkgs/rust-bootstrap/files/generating-distfiles.md for details
|
|
*) _bootstrap_url="https://repo-default.voidlinux.org/distfiles";;
|
|
esac
|
|
|
|
# hardcode platform triplets
|
|
# because this info isn't avaialble here without hacky workarounds
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686)
|
|
distfiles="
|
|
${_bootstrap_url}/rustc-${version}-i686-unknown-linux-gnu.tar.xz
|
|
${_bootstrap_url}/rust-std-${version}-i686-unknown-linux-gnu.tar.xz"
|
|
checksum="
|
|
e52ff92c605284b049e88912343a0f1c9c4cef7cc4a501d4e8f1ab9e4d9b1d7e
|
|
78fb0859beb4f18af7227af3f09f0218169ca38c7751865e40d78d697ca190fc"
|
|
;;
|
|
x86_64)
|
|
distfiles="
|
|
${_bootstrap_url}/rustc-${version}-x86_64-unknown-linux-gnu.tar.xz
|
|
${_bootstrap_url}/rust-std-${version}-x86_64-unknown-linux-gnu.tar.xz"
|
|
checksum="
|
|
9fadfcf71bc6a0ddfd026b9624163faf1c5689dd4a1f7cc1f857167ade4aa6eb
|
|
e41150b52d923a3bbe166c4ecc5719f56576274b0d034d764768aee279ae2063"
|
|
;;
|
|
x86_64-musl)
|
|
distfiles="
|
|
${_bootstrap_url}/rustc-${version}-x86_64-unknown-linux-musl.tar.xz
|
|
${_bootstrap_url}/rust-std-${version}-x86_64-unknown-linux-musl.tar.xz"
|
|
checksum="
|
|
3669762d7ee90d06bc3b532e15fc29e7918b40b85c93ea314b98d6cad18f435b
|
|
995bda2aeff09ecbda9a1892a6c47beb087e99c9be924dc8fa6416f6813f4edc"
|
|
;;
|
|
# placeholders for user-supplied distfiles
|
|
ppc64le)
|
|
distfiles="
|
|
${_bootstrap_url}/rustc-${version}-powerpc64le-unknown-linux-gnu.tar.xz
|
|
${_bootstrap_url}/rust-std-${version}-powerpc64le-unknown-linux-gnu.tar.xz"
|
|
checksum="
|
|
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
|
|
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
|
|
;;
|
|
ppc64le-musl)
|
|
distfiles="
|
|
${_bootstrap_url}/rustc-${version}-powerpc64le-unknown-linux-musl.tar.xz
|
|
${_bootstrap_url}/rust-std-${version}-powerpc64le-unknown-linux-musl.tar.xz"
|
|
checksum="
|
|
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
|
|
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
|
|
;;
|
|
ppc64)
|
|
distfiles="
|
|
${_bootstrap_url}/rustc-${version}-powerpc64-unknown-linux-gnu.tar.xz
|
|
${_bootstrap_url}/rust-std-${version}-powerpc64-unknown-linux-gnu.tar.xz"
|
|
checksum="
|
|
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
|
|
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
|
|
;;
|
|
ppc)
|
|
distfiles="
|
|
${_bootstrap_url}/rustc-${version}-powerpc-unknown-linux-gnu.tar.xz
|
|
${_bootstrap_url}/rust-std-${version}-powerpc-unknown-linux-gnu.tar.xz"
|
|
checksum="
|
|
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
|
|
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
|
|
;;
|
|
*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
|
|
esac
|
|
|
|
do_install() {
|
|
for d in *; do
|
|
cd $d
|
|
./install.sh --prefix=/usr --destdir="${DESTDIR}"
|
|
cd ..
|
|
done
|
|
|
|
vlicense rustc-${version}-${RUST_TARGET}/COPYRIGHT
|
|
vlicense rustc-${version}-${RUST_TARGET}/LICENSE-APACHE
|
|
vlicense rustc-${version}-${RUST_TARGET}/LICENSE-MIT
|
|
|
|
rm -rf ${DESTDIR}/usr/share/doc/rust
|
|
rm -f ${DESTDIR}/usr/lib/rustlib/${RUST_TARGET}/bin/rust-ll*
|
|
}
|