103 lines
3.5 KiB
Bash
103 lines
3.5 KiB
Bash
# Template file for 'rust-bootstrap'
|
|
pkgname=rust-bootstrap
|
|
version=1.78.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="
|
|
8ba9c213e5daaf08a13c5787a4ea0d7ae8d1e7004126de2b8dc6a6dcd798becd
|
|
9e5e02311853354c1540e1b4da6c1686616cea9d3a233c033023f36d950977c0"
|
|
;;
|
|
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="
|
|
3994971e5923716d54e4b574ce238f04c4e20cda03990670f7cc3f87d36e5499
|
|
95aece42a336f237c5bac5c5d9aca051b7f0bd3e6a64fb3c5828e6d0d3af2e8c"
|
|
;;
|
|
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="
|
|
82bbe731cde3d323147b34aaf5ed2251b70ade44b96a69b5d93b8968d7af96ea
|
|
f2c30e43184b050f56cc2ac98af0752a881f104c08456731a9cd9e21d9f7dfb5"
|
|
;;
|
|
# 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*
|
|
}
|