summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Alexander Bariz2018-01-20 13:52:26 +0000
committerRalph Alexander Bariz2018-01-20 13:52:26 +0000
commitac0259efff1179e9e7901ce38738108e548b6e59 (patch)
tree32722b576dc7f5667cdde7df76a03e04be9f15ae
downloadaur-ac0259efff1179e9e7901ce38738108e548b6e59.tar.gz
ldc 1.6.0 prebuild (tested on raspberry pi 3
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD88
-rwxr-xr-xldc2.conf18
3 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bcbfea2d7dda
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = ldc-armv7h
+ pkgdesc = A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2
+ pkgver = 1.6.0
+ pkgrel = 1
+ epoch = 1
+ url = https://github.com/ldc-developers/ldc
+ arch = armv7h
+ groups = dlang
+ groups = dlang-ldc
+ license = BSD
+ conflicts = ldc
+ conflicts = liblphobos
+ source = https://github.com/ldc-developers/ldc/releases/download/v1.6.0/ldc2-1.6.0-linux-armhf.tar.xz
+ source = ldc2.conf
+ md5sums = 7b4ee4abb90a8d30df27e86f4b0b829b
+ md5sums = 5d66934872d5242eaa56b10678fa932c
+
+pkgname = ldc-armv7h
+ depends = liblphobos-armv7h
+ depends = llvm-libs
+ provides = d-compiler=
+ backup = etc/ldc2.conf
+
+pkgname = liblphobos-armv7h
+ provides = d-runtime
+ provides = d-stdlib
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b6a53dc89529
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,88 @@
+# Maintainer: Ralph Alexander Bariz <ralph.bariz at protonmail.ch>
+
+pkgname=('ldc-armv7h' 'liblphobos-armv7h')
+groups=('dlang' 'dlang-ldc')
+conflicts=('ldc' 'liblphobos')
+pkgver=1.6.0
+epoch=1
+pkgrel=1
+pkgdesc="A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2"
+arch=('armv7h')
+url="https://github.com/ldc-developers/ldc"
+license=('BSD')
+makedepends=()
+
+source=("https://github.com/ldc-developers/ldc/releases/download/v1.6.0/ldc2-1.6.0-linux-armhf.tar.xz"
+ "ldc2.conf")
+md5sums=('7b4ee4abb90a8d30df27e86f4b0b829b'
+ '5d66934872d5242eaa56b10678fa932c')
+_pkgdir="ldc2-1.6.0-linux-armhf"
+
+package_ldc-armv7h() {
+ depends=('liblphobos-armv7h' 'llvm-libs')
+ backup=('etc/ldc2.conf')
+ provides=("d-compiler=${dmd_fe_ver}")
+
+ #cd "${srcdir}/${_pkgdir}/etc"
+ install -D "ldc2.conf" "${pkgdir}/etc/ldc2.conf"
+
+ cd "${srcdir}/${_pkgdir}/etc/bash_completion.d"
+ install -D "ldc2" "${pkgdir}/etc/bash_completion.d/ldc2"
+
+ cd "${srcdir}/${_pkgdir}/bin"
+ # relink to libtinfo.so.6
+ sed -i -e 's/libtinfo.so.5/libtinfo.so.6/g' ldc-build-runtime
+ sed -i -e 's/libtinfo.so.5/libtinfo.so.6/g' ldc-profdata
+ sed -i -e 's/libtinfo.so.5/libtinfo.so.6/g' ldc-prune-cache
+ sed -i -e 's/libtinfo.so.5/libtinfo.so.6/g' ldc2
+ sed -i -e 's/libtinfo.so.5/libtinfo.so.6/g' ldmd2
+
+ install -D "ldc-build-runtime" "${pkgdir}/usr/bin/ldc-build-runtime"
+ install -D "ldc-profdata" "${pkgdir}/usr/bin/ldc-profdata"
+ install -D "ldc-prune-cache" "${pkgdir}/usr/bin/ldc-prune-cache"
+ install -D "ldc2" "${pkgdir}/usr/bin/ldc2"
+ install -D "ldmd2" "${pkgdir}/usr/bin/ldmd2"
+
+ cd "${srcdir}/${_pkgdir}/lib"
+ install -D "LLVMgold-ldc.so" "${pkgdir}/usr/lib/LLVMgold-ldc.so"
+
+ cd "${srcdir}/${_pkgdir}"
+ install -D "LICENSE" "${pkgdir}/usr/share/licenses/ldc/LICENSE"
+
+ # creating symlinks
+ cd "${pkgdir}/etc/bash_completion.d"
+ ln -s ldc2 ldc
+
+ cd ${pkgdir}/usr/bin
+ ln -s ldc2 ldc
+ ln -s ldmd2 ldmd
+}
+
+package_liblphobos-armv7h() {
+ provides=('d-runtime' 'd-stdlib')
+
+ cd "${srcdir}/${_pkgdir}"
+
+ provides=('d-runtime' 'd-stdlib')
+
+ cd "${srcdir}/${_pkgdir}/lib"
+ install -D "libdruntime-ldc-debug.a" "${pkgdir}/usr/lib/libdruntime-ldc-debug.a"
+ install -D "libdruntime-ldc.a" "${pkgdir}/usr/lib/libdruntime-ldc.a"
+ install -D "libldc-jit-rt.a" "${pkgdir}/usr/lib/libldc-jit-rt.a"
+ install -D "libldc-jit.so" "${pkgdir}/usr/lib/libldc-jit.so"
+ install -D "libldc-jit.so.1.6.0" "${pkgdir}/usr/lib/libldc-jit.so.1.6.0"
+ install -D "libldc-profile-rt.a" "${pkgdir}/usr/lib/libldc-profile-rt.a"
+ install -D "libphobos2-ldc-debug.a" "${pkgdir}/usr/lib/libphobos2-ldc-debug.a"
+ install -D "libphobos2-ldc.a" "${pkgdir}/usr/lib/libphobos2-ldc.a"
+
+ cd "${srcdir}/${_pkgdir}/import"
+ mkdir -p "${pkgdir}/usr/include/dlang/ldc/"
+ cp -adr --preserve=mode -t "${pkgdir}/usr/include/dlang/ldc/" *
+ chown -R root:root "${pkgdir}/usr/include/dlang/ldc/"
+
+ cd "${srcdir}/${_pkgdir}"
+ install -D "LICENSE" "${pkgdir}/usr/share/licenses/liblphobos/LICENSE"
+
+}
+
+
diff --git a/ldc2.conf b/ldc2.conf
new file mode 100755
index 000000000000..e8cf1ebafe93
--- /dev/null
+++ b/ldc2.conf
@@ -0,0 +1,18 @@
+// See comments in driver/config.d in ldc source tree for grammar description of
+// this config file.
+
+// The default group is required
+default:
+{
+ // default switches injected before all explicit command-line switches
+ switches = [
+ "-I/usr/include/dlang/ldc/ldc",
+ "-I/usr/include/dlang/ldc",
+ "-defaultlib=phobos2-ldc,druntime-ldc",
+ "-debuglib=phobos2-ldc-debug,druntime-ldc-debug"
+ ];
+ // default switches appended after all explicit command-line switches
+ post-switches = [
+ "-L-L/usr/lib",
+ ];
+};