mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Rust: add version 1.54.0 (#6107)
This commit is contained in:
committed by
GitHub
parent
18a5cdae58
commit
02fefe9f73
101
dev-lang/rust_bin/rust_bin-1.54.0.recipe
Normal file
101
dev-lang/rust_bin/rust_bin-1.54.0.recipe
Normal file
@@ -0,0 +1,101 @@
|
||||
SUMMARY="Modern and safe systems programming language"
|
||||
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
|
||||
prevents almost all crashes*, and eliminates data races."
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
COPYRIGHT="2021 The Rust Project Developers"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
|
||||
case "$effectiveTargetArchitecture" in
|
||||
x86)
|
||||
SOURCE_URI="https://dl.rust-on-haiku.com/dist/$portVersion/rust-$portVersion-i686-unknown-haiku.tar.xz"
|
||||
CHECKSUM_SHA256="758ac74b79bc43f35c139e45f0f6b9bcd53b62ef1d75f59dd4570e228662196b"
|
||||
SOURCE_DIR="rust-$portVersion-i686-unknown-haiku"
|
||||
;;
|
||||
x86_64)
|
||||
SOURCE_URI="https://dl.rust-on-haiku.com/dist/$portVersion/rust-$portVersion-x86_64-unknown-haiku.tar.xz"
|
||||
CHECKSUM_SHA256="605415e749cd33a7e05287b738098c755ccbb412e639317eb48b886afb89622e"
|
||||
SOURCE_DIR="rust-$portVersion-x86_64-unknown-haiku"
|
||||
;;
|
||||
*)
|
||||
SOURCE_URI="https://dl.rust-on-haiku.com/dist/$portVersion/rustc-$portVersion-src.tar.xz"
|
||||
CHECKSUM_SHA256="f9fa7af9603be9b50d3a3cbea69015792d4ef879518acc3f403e3bce8b5844c8"
|
||||
SOURCE_DIR="rustc-$portVersion-src"
|
||||
;;
|
||||
esac
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
DISABLE_SOURCE_PACKAGE=yes
|
||||
|
||||
cargoVersion="0.55.0"
|
||||
rustfmtVersion="1.4.37"
|
||||
clippyVersion="0.1.54"
|
||||
|
||||
PROVIDES="
|
||||
rust_bin$secondaryArchSuffix = $portVersion
|
||||
cmd:rustc$secondaryArchSuffix = $portVersion
|
||||
cmd:rustdoc$secondaryArchSuffix = $portVersion
|
||||
cmd:rustfmt$secondaryArchSuffix = $portVersion
|
||||
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
|
||||
cmd:rust_gdb$secondaryArchSuffix = $portVersion
|
||||
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
|
||||
cmd:rust_lldb$secondaryArchSuffix = $portVersion
|
||||
cmd:cargo$secondaryArchSuffix = $cargoVersion
|
||||
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
|
||||
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
|
||||
cmd:cargo_miri$secondaryArchSuffix = $portVersion
|
||||
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
|
||||
cmd:miri$secondaryArchSuffix = $portVersion
|
||||
cmd:rustfmt = $rustfmtVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS="
|
||||
rust$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
|
||||
installDir="$prefix/$relativeInstallDir"
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
./install.sh \
|
||||
--prefix=$installDir \
|
||||
--docdir=$developDocDir \
|
||||
--mandir=$manDir \
|
||||
--sysconfdir=$dataDir \
|
||||
--disable-ldconfig
|
||||
|
||||
# move zsh data to the datadir
|
||||
mv $installDir/share/zsh $dataDir
|
||||
rm -rf $installDir/share
|
||||
|
||||
# clean out unneccesary files created by the rust installer
|
||||
rm $installDir/lib/rustlib/components
|
||||
rm $installDir/lib/rustlib/install.log
|
||||
rm $installDir/lib/rustlib/manifest-*
|
||||
rm $installDir/lib/rustlib/rust-installer-version
|
||||
rm $installDir/lib/rustlib/uninstall.sh
|
||||
|
||||
# link the binaries in $binDir
|
||||
mkdir -p $binDir
|
||||
for f in cargo cargo-clippy cargo-fmt cargo-miri clippy-driver miri \
|
||||
rust-analyzer rust-gdb rust-gdbgui rust-lldb rustc rustdoc \
|
||||
rustfmt; do
|
||||
symlinkRelative -sfn $installDir/bin/$f $binDir
|
||||
done
|
||||
|
||||
# make sure runtime_loader can find the libraries in the lib dir relative
|
||||
# to the binaries
|
||||
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
|
||||
}
|
||||
Reference in New Issue
Block a user