mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 16:54:36 +08:00
52 lines
1.7 KiB
Bash
52 lines
1.7 KiB
Bash
# Originally imported from Arch Linux with
|
|
# Arch Maintainer: Alexander Rødseth <rodseth@gmail.com>
|
|
# Arch Contributor: Daniel Micay <danielmicay@gmail.com>
|
|
|
|
pkgname=rust
|
|
pkgver=1.19.0
|
|
pkgrel=1
|
|
arch=('x86_64')
|
|
pkgdesc='Systems programming language focused on safety, speed and concurrency'
|
|
url='https://www.rust-lang.org/'
|
|
license=('MIT' 'Apache')
|
|
depends=('gcc-libs' 'llvm-libs')
|
|
makedepends=('rust' 'cargo' 'libffi' 'perl' 'python2' 'curl' 'jemalloc' 'llvm')
|
|
optdepends=('cargo')
|
|
source=("http://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"
|
|
0001-librustc_llvm-build-Force-link-against-libffi.patch
|
|
bootstrap-config.toml)
|
|
sha256sums=('15231f5053fb72ad82be91f5abfd6aa60cb7898c5089e4f1ac5910a731090c51'
|
|
'563529da8e02f575ddde7247d5fc5350d74031daa54743b86d075f3c45ae2713'
|
|
'2e3d80165bb31ca8116e301cffd9a01a406d8de3571eec842c57e0a2f527b040')
|
|
install="$pkgname.install"
|
|
options=('staticlibs' '!strip' '!emptydirs')
|
|
|
|
prepare() {
|
|
cd "rustc-$pkgver-src"
|
|
|
|
patch -p1 <"$srcdir"/0001-librustc_llvm-build-Force-link-against-libffi.patch
|
|
cp "$srcdir"/bootstrap-config.toml config.toml
|
|
}
|
|
|
|
build() {
|
|
cd "rustc-$pkgver-src"
|
|
|
|
msg2 "Run build under x.py"
|
|
python2 ./x.py build
|
|
}
|
|
|
|
package() {
|
|
cd "rustc-$pkgver-src"
|
|
|
|
DESTDIR="$pkgdir" python2 ./x.py install
|
|
|
|
install -Dm644 LICENSE-APACHE \
|
|
"$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
|
|
install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
|
|
|
|
cd "$pkgdir/usr/lib"
|
|
rm rustlib/{components,manifest-rustc,rust-installer-version}
|
|
ln -sf rustlib/$CARCH-unknown-linux-gnu/lib/*.so .
|
|
rm rustlib/uninstall.sh # remove uninstall.sh, pacman manages the files anyway
|
|
}
|