103 lines
3.5 KiB
Bash
103 lines
3.5 KiB
Bash
# Template file for 'rust-bootstrap'
|
|
pkgname=rust-bootstrap
|
|
version=1.69.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="
|
|
788ff61555857680d5ea7cf76023f74a7f4820dd1c26abf76536561d4de3cbe6
|
|
bef330af5bfb381a01349186e05402983495a3e2d4d1c35723a8443039d19a2d"
|
|
;;
|
|
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="
|
|
70e97ab5b9600328b977268fc92ca4aa53064e4e97468df35215d4396e509279
|
|
4c95739e6f0f1d4defd937f6d60360b566e051dfb2fa71879d0f9751392f3709"
|
|
;;
|
|
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="
|
|
7d9e64850a79292d2cda6f4464dfd67d2cbd22ac8c7f3e170291396ef8be8041
|
|
29d98c004629ab536bd2461f715f26ddce3b0f0212db85939c7bc66a8d234b2d"
|
|
;;
|
|
# 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*
|
|
}
|