103 lines
3.5 KiB
Bash
103 lines
3.5 KiB
Bash
# Template file for 'rust-bootstrap'
|
|
pkgname=rust-bootstrap
|
|
version=1.73.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="
|
|
3d98a27c50ae79de7c7956506d649e169312e76b4fc2314a975b45ebd1dea5b9
|
|
c46936bf3c921c90593b6ea77a08b1ec8b240c8184b287fd89fea636ac437b25"
|
|
;;
|
|
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="
|
|
14f383eb4d6e65ce01cc99f2c5cf5a78744239f29704f72fe84f11095af779f5
|
|
96efb163a57b400152c357be0ea3a0dd902b56cc0df662b9ac951403c7c7b15b"
|
|
;;
|
|
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="
|
|
e885398a10f5f4697dfb2b4e399bf9a0805ee8c11b9f9365ba4d803fef34d779
|
|
c89f5164edffbda4a21212c1e74260021634bda43fbe6d5e4fe9f7e85a79320c"
|
|
;;
|
|
# 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*
|
|
}
|