mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Rust: Add version 1.62.0 (#7012)
This commit is contained in:
committed by
GitHub
parent
fb79e697d3
commit
58ec5631ec
100
dev-lang/rust_bin/rust_bin-1.62.0.recipe
Normal file
100
dev-lang/rust_bin/rust_bin-1.62.0.recipe
Normal file
@@ -0,0 +1,100 @@
|
||||
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="2022 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="ffb3c79d114c575f837181ab47b739ee6891decbfd7689d86f226f829d1a2582"
|
||||
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="c8d3124e839ea8c14017b48abe46585afc634982fa507fc899f93db5ca0ee969"
|
||||
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="c7c0b8fbcfbe2d2c79a7b228c52bbf02ad38b924731ffc1d8173411502f37501"
|
||||
SOURCE_DIR="rustc-$portVersion-src"
|
||||
;;
|
||||
esac
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
DISABLE_SOURCE_PACKAGE=yes
|
||||
|
||||
cargoVersion="0.63.0"
|
||||
rustfmtVersion="1.4.38"
|
||||
clippyVersion="0.1.62"
|
||||
|
||||
PROVIDES="
|
||||
rust_bin$secondaryArchSuffix = $portVersion
|
||||
cmd:rustc$secondaryArchSuffix = $portVersion
|
||||
cmd:rustdoc$secondaryArchSuffix = $portVersion
|
||||
cmd:rustfmt$secondaryArchSuffix = $portVersion
|
||||
cmd:rust_demangler$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:clippy_driver$secondaryArchSuffix = $clippyVersion
|
||||
cmd:rustfmt = $rustfmtVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libssh2$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 \
|
||||
rust-demangler 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
|
||||
}
|
||||
43
dev-lang/rust_wasm_bin/rust_wasm_bin-1.62.0.recipe
Normal file
43
dev-lang/rust_wasm_bin/rust_wasm_bin-1.62.0.recipe
Normal file
@@ -0,0 +1,43 @@
|
||||
SUMMARY="Wasm target for the Rust compiler"
|
||||
DESCRIPTION="Adds support for the wasm32-unknown-unknown target for Rust."
|
||||
HOMEPAGE="https://www.rust-lang.org/"
|
||||
COPYRIGHT="2021 The Rust Project Developers"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://dl.rust-on-haiku.com/dist/$portVersion/rust-std-$portVersion-wasm32-unknown-unknown.tar.xz"
|
||||
CHECKSUM_SHA256="e9348cb7fa7ac4675cd821d7e3d3965c6c9e446183fc6cef2ec9b9e4210ec9e6"
|
||||
SOURCE_DIR="rust-std-$portVersion-wasm32-unknown-unknown"
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
DISABLE_SOURCE_PACKAGE=yes
|
||||
PROVIDES="
|
||||
rust_wasm_bin$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
rust_bin$secondaryArchSuffix == $portVersion
|
||||
"
|
||||
|
||||
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
|
||||
|
||||
# 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
|
||||
}
|
||||
Reference in New Issue
Block a user