diff options
author | Iru Cai | 2018-11-23 01:32:57 +0800 |
---|---|---|
committer | Iru Cai | 2018-11-23 01:52:10 +0800 |
commit | bfac4641d0170a4897ad4707db30514ab77fbd1e (patch) | |
tree | 77d2cb9cbc2e12eea05d22cd62f55cb7a36afb39 | |
download | aur-bfac4641d0170a4897ad4707db30514ab77fbd1e.tar.gz |
init
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | openssl.patch | 11 |
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f7bb50e2bd5f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = rust-mrustc + pkgdesc = Rust built with mrustc + pkgver = 1.19.0 + pkgrel = 1 + url = https://github.com/thepowersgang/mrustc + arch = x86_64 + license = MIT + depends = mrustc-git + provides = rust=$pkgver + source = https://static.rust-lang.org/dist/rustc-1.19.0-src.tar.gz + source = openssl.patch + sha256sums = 15231f5053fb72ad82be91f5abfd6aa60cb7898c5089e4f1ac5910a731090c51 + sha256sums = 44d51a440ec2a0a052a64088fcbc95ccf6af62ea73feb76cc7269e2d0ff8f206 + +pkgname = rust-mrustc + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b83d518e77e5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: vimacs <https://vimacs.lcpu.club> + +pkgname=rust-mrustc +pkgver=1.19.0 +pkgrel=1 +pkgdesc='Rust built with mrustc' +arch=('x86_64') +url='https://github.com/thepowersgang/mrustc' +license=('MIT') +depends=('mrustc-git') +makedepends=() +provides=('rust=$pkgver') +conflicts=() +source=("https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz" 'openssl.patch') +sha256sums=('15231f5053fb72ad82be91f5abfd6aa60cb7898c5089e4f1ac5910a731090c51' + '44d51a440ec2a0a052a64088fcbc95ccf6af62ea73feb76cc7269e2d0ff8f206') + +build() { + WORK="$srcdir/rust-mrustc" + mkdir -p "$WORK" + mv "$srcdir/rustc-$pkgver-src" "$WORK" + cp -r /usr/share/mrustc/run_rustc "$WORK" + cd "$WORK" + + cd rustc-1.19.0-src + patch -p1 -i "$srcdir/openssl.patch" + + # lli doesn't build, remove it + sed -i '/lli/d' src/llvm/tools/LLVMBuild.txt + rm -rf src/llvm/tools/lli + + cd .. + + make -f /usr/share/mrustc/minicargo.mk output/rustc output/cargo + make -C run_rustc +} + +package() { + cp -r "$srcdir/rust-mrustc/run_rustc/prefix/"{bin,lib} "$pkgdir/" +} diff --git a/openssl.patch b/openssl.patch new file mode 100644 index 000000000000..c626fed073fb --- /dev/null +++ b/openssl.patch @@ -0,0 +1,11 @@ +--- a/src/vendor/openssl-sys/build.rs ++++ b/src/vendor/openssl-sys/build.rs +@@ -254,8 +254,6 @@ + RUST_LIBRESSL_250 + #elif defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20500000 + RUST_LIBRESSL_OLD +-#elif OPENSSL_VERSION_NUMBER >= 0x10101000 +-RUST_OPENSSL_NEW + #elif OPENSSL_VERSION_NUMBER >= 0x10100000 + RUST_OPENSSL_110 + #elif OPENSSL_VERSION_NUMBER >= 0x10002000 |