-
-
Save therealromster/848b6505ebbf3cdc6e998bbb9197c689 to your computer and use it in GitHub Desktop.
rust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: A safe, concurrent, practical language by Mozilla. | |
# URL: http://www.rust-lang.org/ | |
# Packager: Danny Rawlins, crux at romster dot me | |
# Maintainer: Danny Rawlins, crux at romster dot me | |
# Depends on: jemalloc libffi llvm | |
# Optional: ccache | |
name=rust | |
version=1.18.0 | |
release=1 | |
source=(https://static.rust-lang.org/dist/${name}c-$version-src.tar.gz) | |
build() { | |
cd ${name}c-$version-src | |
[ -e '/usr/bin/ccache' ] && PKGMK_RUST+=' --enable-ccache' | |
#[ -e '/usr/bin/rustc' ] && PKGMK_RUST+=' --enable-local-rust' | |
[ "$(lvm-config --shared-mode)" = 'dynamic' ] && PKGMK_RUST+=' --enable-llvm-link-shared' | |
./configure ${PKGMK_RUST} \ | |
--prefix=/usr \ | |
--release-channel=stable \ | |
--llvm-root=/usr \ | |
--disable-codegen-tests \ | |
--disable-docs \ | |
--jemalloc-root=/usr/lib \ | |
--enable-ccache | |
export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" | |
/usr/bin/python ./x.py build --verbose | |
make DESTDIR=$PKG install | |
rm -r $PKG/usr/lib/rustlib/{components,manifest-rustc,rust-installer-version} | |
rm -r $PKG/usr/share/doc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment