core/rust/PKGBUILD

49 lines
1.5 KiB
Bash
Raw Normal View History

2015-07-05 00:12:42 +08:00
# Originally imported from Arch Linux with
# Arch Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Arch Contributor: Daniel Micay <danielmicay@gmail.com>
pkgname=rust
2017-04-28 08:35:23 +08:00
pkgver=1.17.0
2015-09-21 19:27:04 +08:00
pkgrel=1
2015-07-08 17:32:14 +08:00
arch=('x86_64')
2015-07-05 00:12:42 +08:00
pkgdesc='Systems programming language focused on safety, speed and concurrency'
2017-03-06 07:25:22 +08:00
url='https://www.rust-lang.org/'
2015-07-05 00:12:42 +08:00
license=('MIT' 'Apache')
2017-03-06 07:25:22 +08:00
depends=('gcc-libs' 'llvm-libs')
2017-04-28 08:35:23 +08:00
makedepends=('rust' 'cargo' 'libffi' 'perl' 'python2' 'curl' 'jemalloc' 'llvm')
2017-03-21 15:25:22 +08:00
optdepends=('cargo')
2017-04-28 08:35:23 +08:00
source=("http://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz")
sha256sums=('4baba3895b75f2492df6ce5a28a916307ecd1c088dc1fd02dbfa8a8e86174f87')
2015-07-05 00:12:42 +08:00
install="$pkgname.install"
2017-03-06 07:25:22 +08:00
options=('staticlibs' '!strip' '!emptydirs')
2015-07-05 00:12:42 +08:00
build() {
2017-03-06 07:25:22 +08:00
cd "rustc-$pkgver-src"
./configure --prefix=/usr \
--release-channel=stable \
--llvm-root=/usr \
--disable-codegen-tests \
2017-04-28 08:35:23 +08:00
--jemalloc-root=/usr/lib \
--enable-local-rust
2017-03-06 07:25:22 +08:00
export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"
2015-07-05 00:12:42 +08:00
2017-03-21 15:25:22 +08:00
python2 ./x.py build --verbose
2015-07-05 00:12:42 +08:00
}
package() {
2017-03-06 07:25:22 +08:00
cd "rustc-$pkgver-src"
2015-07-05 00:12:42 +08:00
make DESTDIR="$pkgdir" 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
2015-07-05 00:12:42 +08:00
}