diff options
author | root <root@rshg054.dnsready.net> | 2012-12-25 02:32:08 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-12-25 02:32:08 -0800 |
commit | 6fbdd2899f39266e458531dcffefb85b9ce8d1b9 (patch) | |
tree | 7d290e717ddd4dab90362a017be197c551dd2ae0 /multilib-staging | |
parent | 6003fa8908f984a4696fade78b69a8803eabcc6c (diff) |
Tue Dec 25 02:27:55 PST 2012
Diffstat (limited to 'multilib-staging')
-rw-r--r-- | multilib-staging/lib32-libphobos-ldc/PKGBUILD | 60 | ||||
-rw-r--r-- | multilib-staging/lib32-libphobos-ldc/fix-llvm-IRBuilder.h-include-when-using-LLVM-3.2.patch | 25 |
2 files changed, 85 insertions, 0 deletions
diff --git a/multilib-staging/lib32-libphobos-ldc/PKGBUILD b/multilib-staging/lib32-libphobos-ldc/PKGBUILD new file mode 100644 index 000000000..aa67ac275 --- /dev/null +++ b/multilib-staging/lib32-libphobos-ldc/PKGBUILD @@ -0,0 +1,60 @@ +# $Id: PKGBUILD 72029 2012-06-06 11:58:40Z svenstaro $ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +pkgname=lib32-libphobos-ldc +pkgver=20121225 +pkgrel=1 +pkgdesc="libphobos for ldc (32-bit)" +arch=('x86_64') +url="http://www.dsource.org/projects/ldc" +license=('BSD') +depends=('llvm' 'libconfig') +makedepends=('git' 'cmake') +source=(fix-llvm-IRBuilder.h-include-when-using-LLVM-3.2.patch) +md5sums=('0dacd8e4b8f88030c107dbb2a35bcc42') + +_gitroot=git://github.com/ldc-developers/ldc.git +_gitname=ldc +_gitbranch=master + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [[ -d "$_gitname" ]]; then + cd "$_gitname" && git pull origin + msg "The local files are updated." + else + git clone --branch "$_gitbranch" "$_gitroot" "$_gitname" + fi + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_gitname-build" + git clone --recursive "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd "$srcdir/$_gitname-build" + + # llvm/Support/IRBuilder.h was relocated in LLVM 3.2 + patch -Np1 -i "$srcdir/fix-llvm-IRBuilder.h-include-when-using-LLVM-3.2.patch" + + mkdir build && cd build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINCLUDE_INSTALL_DIR=/usr/include/d/std-ldc \ + -DMULTILIB=ON \ + .. + make +} + +package() { + cd "$srcdir/$_gitname-build" + + cd build + make DESTDIR=$pkgdir install + cd .. + + # We don't want anything but the 32-bit libs + rm -rf $pkgdir/usr/{share,lib,include,bin} $pkgdir/etc + + install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} diff --git a/multilib-staging/lib32-libphobos-ldc/fix-llvm-IRBuilder.h-include-when-using-LLVM-3.2.patch b/multilib-staging/lib32-libphobos-ldc/fix-llvm-IRBuilder.h-include-when-using-LLVM-3.2.patch new file mode 100644 index 000000000..f5977e4a4 --- /dev/null +++ b/multilib-staging/lib32-libphobos-ldc/fix-llvm-IRBuilder.h-include-when-using-LLVM-3.2.patch @@ -0,0 +1,25 @@ +From 984207e348fe9ef1444cbec897cb8c429859a9c0 Mon Sep 17 00:00:00 2001 +From: Evangelos Foutras <evangelos@foutrelis.com> +Date: Tue, 25 Dec 2012 04:55:30 +0200 +Subject: [PATCH] Fix llvm/IRBuilder.h include when using LLVM 3.2 + +--- + gen/passes/GarbageCollect2Stack.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gen/passes/GarbageCollect2Stack.cpp b/gen/passes/GarbageCollect2Stack.cpp +index f20bdd4..9927615 100644 +--- a/gen/passes/GarbageCollect2Stack.cpp ++++ b/gen/passes/GarbageCollect2Stack.cpp +@@ -27,7 +27,7 @@ + #include "llvm/Intrinsics.h" + #include "llvm/Support/CallSite.h" + #include "llvm/Support/CommandLine.h" +-#if LDC_LLVM_VER >= 303 ++#if LDC_LLVM_VER >= 302 + #include "llvm/IRBuilder.h" + #else + #include "llvm/Support/IRBuilder.h" +-- +1.8.0.2 + |