aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZee Eichel <zee@dracos-linux.org>2019-05-14 11:19:15 +0700
committerZee Eichel <zee@dracos-linux.org>2019-05-14 11:19:15 +0700
commit5fd64ab7e3a69cf84afd99ccadfb76c9b24fce7e (patch)
tree09e7ca1a4da119d51855aa1815eb047bc716d9e6
parentf4cc094757ea49a9469c3d1d6a400b1ca72c5bc8 (diff)
downloaddemit.extra-git.repo-5fd64ab7e3a69cf84afd99ccadfb76c9b24fce7e.tar.gz
demit.extra-git.repo-5fd64ab7e3a69cf84afd99ccadfb76c9b24fce7e.tar.bz2
demit.extra-git.repo-5fd64ab7e3a69cf84afd99ccadfb76c9b24fce7e.zip
add rustc
-rw-r--r--gdk-pixbuf/PKGBUILD (renamed from gdk-pixbuf/pkgbuild-gdk-pixbuf.sh)0
-rw-r--r--rustc/PKGBUILD57
-rw-r--r--rustc/rustc.install22
3 files changed, 79 insertions, 0 deletions
diff --git a/gdk-pixbuf/pkgbuild-gdk-pixbuf.sh b/gdk-pixbuf/PKGBUILD
index 7d74593..7d74593 100644
--- a/gdk-pixbuf/pkgbuild-gdk-pixbuf.sh
+++ b/gdk-pixbuf/PKGBUILD
diff --git a/rustc/PKGBUILD b/rustc/PKGBUILD
new file mode 100644
index 0000000..0adefa9
--- /dev/null
+++ b/rustc/PKGBUILD
@@ -0,0 +1,57 @@
+#Maintainer: Zee Eichel <zee@dracos-linux.org>
+
+pkgname=rustc
+pkgver=1.32.0
+pkgrel=1
+pkgdesc="An Programer to safe, concurrent, practical language"
+arch=('x86_64')
+url="https://static.rust-lang.org/"
+license=('BSD')
+depends=('curl' 'libssh2' 'cmake')
+makedepends=('python2')
+source=("https://static.rust-lang.org/dist/rustc-1.32.0-src.tar.gz")
+sha256sums=('4c594c7712a0e7e8eae6526c464bf6ea1d82f77b4f61717c3fc28fb27ba2224a')
+
+prepare() {
+ cd "$pkgname"-"$pkgver"-src
+ mkdir -pv $pkgdir/opt/rustc &&
+ ln -svfin rustc-1.32.0 $pkgdir/opt/rustc
+
+cat << EOF > config.toml
+# see config.toml.example for more possible options
+[llvm]
+ninja = true
+targets = "X86"
+experimental-targets = ""
+
+[build]
+docs = false
+extended = true
+
+[install]
+prefix = "/opt/rustc-1.32.0"
+docdir = "share/doc/rustc-1.32.0"
+
+[rust]
+channel = "stable"
+rpath = false
+codegen-tests = false
+backtrace-on-ice = true
+EOF
+}
+
+build() {
+ cd "$pkgname"-"$pkgver"-src
+ export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &&
+ python3 ./x.py build --exclude src/tools/miri
+}
+
+package() {
+ cd "$pkgname"-"$pkgver"-src
+ export LIBSSH2_SYS_USE_PKG_CONFIG=1 &&
+ DESTDIR=${srcdir}/install python3 ./x.py install &&
+ unset LIBSSH2_SYS_USE_PKG_CONFIG
+ chown -R root:root install &&
+ cp -a install/* $pkgdir/
+ install=rustc.install
+}
diff --git a/rustc/rustc.install b/rustc/rustc.install
new file mode 100644
index 0000000..98437ae
--- /dev/null
+++ b/rustc/rustc.install
@@ -0,0 +1,22 @@
+post_install() {
+
+cat >> /etc/ld.so.conf << EOF
+/opt/rustc/lib
+EOF
+
+ldconfig
+
+cat > /etc/profile.d/rustc.sh << "EOF"
+# Begin /etc/profile.d/rustc.sh
+
+pathprepend /opt/rustc/bin PATH
+
+# End /etc/profile.d/rustc.sh
+EOF
+}
+
+post_remove() {
+sed -i '/rustc/d' /etc/ld.so.conf
+ldconfig
+rm -rf /etc/profile.d/rustc.sh
+}