From 6fbdd2899f39266e458531dcffefb85b9ce8d1b9 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 25 Dec 2012 02:32:08 -0800 Subject: Tue Dec 25 02:27:55 PST 2012 --- multilib-staging/lib32-libphobos-ldc/PKGBUILD | 60 ++++++++++++++++++++++ ...m-IRBuilder.h-include-when-using-LLVM-3.2.patch | 25 +++++++++ 2 files changed, 85 insertions(+) create mode 100644 multilib-staging/lib32-libphobos-ldc/PKGBUILD create mode 100644 multilib-staging/lib32-libphobos-ldc/fix-llvm-IRBuilder.h-include-when-using-LLVM-3.2.patch (limited to 'multilib-staging') 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 +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 +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 + -- cgit v1.2.3-54-g00ecf