mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 21:30:08 +02:00
129 lines
4.5 KiB
Bash
129 lines
4.5 KiB
Bash
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="http://www.rust-lang.org/"
|
|
LICENSE="MIT"
|
|
COPYRIGHT="2015, The Rust Project Developers"
|
|
REVISION="1"
|
|
ARCHITECTURES="!x86_gcc2 !x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="!x86"
|
|
|
|
SOURCE_URI="https://github.com/jessicah/rust/releases/download/1.22-dev-haiku/rustc-1.22.0-dev-x86_64-unknown-haiku.tar.xz"
|
|
SOURCE_URI_2="https://github.com/jessicah/rust/releases/download/1.22-dev-haiku/rust-std-1.22.0-dev-x86_64-unknown-haiku.tar.xz"
|
|
SOURCE_URI_3="https://github.com/jessicah/rust/releases/download/1.22-dev-haiku/cargo-0.23.0-dev-x86_64-unknown-haiku.tar.xz"
|
|
SOURCE_URI_4="https://github.com/jessicah/rust/releases/download/1.22-dev-haiku/rust-docs-1.22.0-dev-x86_64-unknown-haiku.tar.xz"
|
|
|
|
CHECKSUM_SHA256="6ba49f6616049886ac84be0a061f7a6847bff377403f335a1ff9204e72f3f174"
|
|
CHECKSUM_SHA256_2="a313c1b519647acabb9eb4b046d733f7936e6a9a0fe9adde96daf5e2d29acd42"
|
|
CHECKSUM_SHA256_3="a4a14b5316f3132fdbaee011cb76f54936492a08342fc9e37f1eba9e6eb66342"
|
|
CHECKSUM_SHA256_4="1973286081c9f5614ba254c719fec9f84ccb7c487fdf633c40c5c7a7437d2647"
|
|
|
|
SOURCE_DIR="rustc-1.22.0-dev-x86_64-unknown-haiku"
|
|
|
|
PROVIDES="
|
|
rust$secondaryArchSuffix = $portVersion compat >= 1.21
|
|
cargo$secondaryArchSuffix = $portVersion compat >= 1.21
|
|
cmd:rustc = $portVersion
|
|
cmd:rustdoc = $portVersion
|
|
cmd:rust_gdb = $portVersion
|
|
cmd:rust_lldb = $portVersion
|
|
cmd:cargo = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
rust_runtime$secondaryArchSuffix == $portVersion base
|
|
lib:libcrypto
|
|
lib:libcurl
|
|
lib:libgit2
|
|
lib:libllvm_4.0
|
|
lib:libssh2
|
|
lib:libssl
|
|
"
|
|
PROVIDES_runtime="
|
|
rust_runtime$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES_runtime="
|
|
haiku$secondaryArchSuffix
|
|
lib:libllvm_4.0
|
|
"
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:grep
|
|
cmd:sed
|
|
cmd:tar
|
|
xz_utils$secondaryArchSuffix
|
|
"
|
|
|
|
GLOBAL_WRITABLE_FILES="settings/bash_completion.d/cargo auto-merge"
|
|
|
|
INSTALL()
|
|
{
|
|
cd $sourceDir
|
|
./install.sh --prefix=$prefix --sysconfdir=$sysconfDir --bindir=$binDir \
|
|
--libdir=$libDir --mandir=$manDir --docdir=$developDocDir
|
|
cd $sourceDir2/rust-std-1.22.0-dev-x86_64-unknown-haiku
|
|
./install.sh --prefix=$prefix --sysconfdir=$sysconfDir --bindir=$binDir \
|
|
--libdir=$libDir --mandir=$manDir --docdir=$developDocDir
|
|
cd $sourceDir3/cargo-0.23.0-dev-x86_64-unknown-haiku
|
|
./install.sh --prefix=$prefix --sysconfdir=$sysconfDir --bindir=$binDir \
|
|
--libdir=$libDir --mandir=$manDir --docdir=$developDocDir
|
|
cd $sourceDir4/rust-docs-1.22.0-dev-x86_64-unknown-haiku
|
|
./install.sh --prefix=$prefix --sysconfdir=$sysconfDir --bindir=$binDir \
|
|
--libdir=$libDir --mandir=$manDir --docdir=$developDocDir
|
|
|
|
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
|
|
# do create a link in $prefix/lib as that is where rustc expects things to live
|
|
mkdir -p $developLibDir
|
|
mv $libDir/rustlib $developLibDir
|
|
cd $libDir
|
|
ln -s ../$relativeDevelopLibDir/rustlib rustlib
|
|
|
|
# remove cruft left in share
|
|
rm -rf $prefix/share
|
|
|
|
# clean out unneccesary files created by the rust installer
|
|
rm $developLibDir/rustlib/components
|
|
rm $developLibDir/rustlib/install.log
|
|
rm $developLibDir/rustlib/manifest-*
|
|
rm $developLibDir/rustlib/rust-installer-version
|
|
rm $developLibDir/rustlib/uninstall.sh
|
|
|
|
# set up the runtime package
|
|
packageEntries runtime \
|
|
$libDir/libarena-*.so \
|
|
$libDir/libfmt_macros-*.so \
|
|
$libDir/libgraphviz-*.so \
|
|
$libDir/libproc_macro-*.so \
|
|
$libDir/librustc_allocator-*.so \
|
|
$libDir/librustc_back-*.so \
|
|
$libDir/librustc_borrowck-*.so \
|
|
$libDir/librustc_const_eval-*.so \
|
|
$libDir/librustc_const_math-*.so \
|
|
$libDir/librustc_data_structures-*.so \
|
|
$libDir/librustc_driver-*.so \
|
|
$libDir/librustc_errors-*.so \
|
|
$libDir/librustc_incremental-*.so \
|
|
$libDir/librustc_lint-*.so \
|
|
$libDir/librustc_llvm-*.so \
|
|
$libDir/librustc_metadata-*.so \
|
|
$libDir/librustc_mir-*.so \
|
|
$libDir/librustc_passes-*.so \
|
|
$libDir/librustc_platform_intrinsics-*.so \
|
|
$libDir/librustc_plugin-*.so \
|
|
$libDir/librustc_privacy-*.so \
|
|
$libDir/librustc_resolve-*.so \
|
|
$libDir/librustc_save_analysis-*.so \
|
|
$libDir/librustc_trans_utils-*.so \
|
|
$libDir/librustc_trans-*.so \
|
|
$libDir/librustc_typeck-*.so \
|
|
$libDir/librustc-*.so \
|
|
$libDir/libserialize-*.so \
|
|
$libDir/libstd-*.so \
|
|
$libDir/libsyntax_ext-*.so \
|
|
$libDir/libsyntax_pos-*.so \
|
|
$libDir/libsyntax-*.so \
|
|
$libDir/libterm-*.so \
|
|
$libDir/libtest-*.so
|
|
}
|