2019-07-20 19:01:46 +00:00
|
|
|
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="2018 The Rust Project Developers"
|
|
|
|
LICENSE="MIT"
|
|
|
|
REVISION="1"
|
|
|
|
|
|
|
|
case "$effectiveTargetArchitecture" in
|
|
|
|
x86)
|
|
|
|
SOURCE_URI="http://dl.rust-on-haiku.com/dist/$portVersion/rust-$portVersion-i686-unknown-haiku.tar.xz"
|
|
|
|
CHECKSUM_SHA256="dde7b555a8f1783f38cbef4b545900099888ba1425286ba22202c4d5e8edf915"
|
|
|
|
SOURCE_DIR="rust-$portVersion-i686-unknown-haiku"
|
|
|
|
;;
|
|
|
|
x86_64)
|
|
|
|
SOURCE_URI="http://dl.rust-on-haiku.com/dist/$portVersion/rust-$portVersion-x86_64-unknown-haiku.tar.xz"
|
|
|
|
CHECKSUM_SHA256="fe55db32128248eb4c80c8fe976429d0ea2a64de76fc180274025ad86997b808"
|
|
|
|
SOURCE_DIR="rust-$portVersion-x86_64-unknown-haiku"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
SOURCE_URI="http://dl.rust-on-haiku.com/dist/$portVersion/rustc-$portVersion-src.tar.xz"
|
|
|
|
CHECKSUM_SHA256="18bd0e3c99f93a86542fa9a229cd69f44e5721115281952d1f85787dd21bb4d7"
|
|
|
|
SOURCE_DIR="rustc-$portVersion-src"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2021-09-15 19:40:18 +00:00
|
|
|
ARCHITECTURES="all !x86_gcc2 ?x86"
|
2019-07-20 19:01:46 +00:00
|
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
DISABLE_SOURCE_PACKAGE=yes
|
|
|
|
|
|
|
|
cargoVersion="0.37.0"
|
|
|
|
rlsVersion="1.36.0"
|
|
|
|
rustfmtVersion="1.2.2"
|
|
|
|
clippyVersion="0.0.212"
|
|
|
|
|
|
|
|
PROVIDES="
|
|
|
|
rust_bin$secondaryArchSuffix = $portVersion
|
|
|
|
cmd:rustc$secondaryArchSuffix = $portVersion
|
|
|
|
cmd:rustdoc$secondaryArchSuffix = $portVersion
|
|
|
|
cmd:rustfmt$secondaryArchSuffix = $portVersion
|
|
|
|
cmd:rust_gdb$secondaryArchSuffix = $portVersion
|
|
|
|
cmd:rust_lldb$secondaryArchSuffix = $portVersion
|
|
|
|
cmd:cargo$secondaryArchSuffix = $cargoVersion
|
|
|
|
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
|
|
|
|
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
|
|
|
|
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
|
|
|
|
cmd:rls$secondaryArchSuffix = $rlsVersion
|
|
|
|
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 clippy-driver rls rust-gdb \
|
|
|
|
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
|
|
|
|
}
|