mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
* This is just the cross-compiled version of rust, rather than a native build. However, it should hopefully be sufficient for building rust natively.
124 lines
4.1 KiB
Bash
124 lines
4.1 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.21-dev-haiku/rustc-1.21.0-dev-x86_64-unknown-haiku.tar.xz"
|
|
SOURCE_URI_2="https://github.com/jessicah/rust/releases/download/1.21-dev-haiku/rust-std-1.21.0-dev-x86_64-unknown-haiku.tar.xz"
|
|
SOURCE_URI_3="https://github.com/jessicah/rust/releases/download/1.21-dev-haiku/cargo-0.22.0-dev-x86_64-unknown-haiku.tar.xz"
|
|
|
|
CHECKSUM_SHA256="2c6135f322fb521067acc40f4f01728ecd012d684b1237c09a1b22674fe4579e"
|
|
CHECKSUM_SHA256_2="129646a32aeb1bf41bcd7d55962efcd5c11d54356ac00631b92e339811a41b6e"
|
|
CHECKSUM_SHA256_3="56a34202e477eca718026abcd73d09cfc061efdd3a33f912e8c1f1d2871711eb"
|
|
|
|
SOURCE_DIR="rustc-1.21.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.21.0-dev-x86_64-unknown-haiku
|
|
./install.sh --prefix=$prefix --sysconfdir=$sysconfDir --bindir=$binDir \
|
|
--libdir=$libDir --mandir=$manDir --docdir=$developDocDir
|
|
cd $sourceDir3/cargo-0.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
|
|
}
|