From 59075f0265483f32e9ac4c67ba9e69cb019ba044 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 Apr 2011 04:18:44 +0000 Subject: Fri Apr 8 04:18:44 UTC 2011 --- community/llvm/PKGBUILD | 43 +++++++++++--------------------- community/llvm/cindexer-clang-path.patch | 10 ++++++++ 2 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 community/llvm/cindexer-clang-path.patch (limited to 'community/llvm') diff --git a/community/llvm/PKGBUILD b/community/llvm/PKGBUILD index 7a80e112b..54bece439 100644 --- a/community/llvm/PKGBUILD +++ b/community/llvm/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 39503 2011-02-11 00:00:17Z foutrelis $ +# $Id: PKGBUILD 44403 2011-04-07 11:36:47Z foutrelis $ # Maintainer: Evangelos Foutras # Contributor: Sebastian Nowicki # Contributor: Devin Cofer @@ -9,26 +9,21 @@ # Contributor: Gerardo Exequiel Pozzi pkgname=('llvm' 'llvm-ocaml' 'clang' 'clang-analyzer') -pkgver=2.8 -pkgrel=5 +pkgver=2.9 +_gcc_ver=4.5.2 +pkgrel=1 arch=('i686' 'x86_64') url="http://llvm.org/" license=('custom:University of Illinois/NCSA Open Source License') -makedepends=('gcc-libs' 'libffi' 'python2' 'ocaml') +makedepends=('gcc-libs' 'libffi' 'python2' 'ocaml' "gcc=$_gcc_ver") source=(http://llvm.org/releases/$pkgver/$pkgname-$pkgver.tgz http://llvm.org/releases/$pkgver/clang-$pkgver.tgz - cpp-headers.patch clang-plugin-loader-registry.patch - clang-2.8-cindexer-clang-path.patch - llvm-2.8-alignOf.patch - clang-2.8-alignOf.patch) -md5sums=('220d361b4d17051ff4bb21c64abe05ba' - '10e14c901fc3728eecbd5b829e011b59' - 'a5cd48e42dbab68d4c0169802c8ae55b' + cindexer-clang-path.patch) +md5sums=('793138412d2af2c7c7f54615f8943771' + '634de18d04b7a4ded19ec4c17d23cfca' '02c23b4aaca3445b8bf39fddb2f9906e' - '338d254d6745568ebdcbe4e20b0057d5' - 'd923655d211191d77c4437b9c1bfa851' - '742a1a13cfdc1cb0a76b8bc3b19b190e') + '87a7162dbe99e9ffce6c40bd09f5f4f0') build() { cd "$srcdir/$pkgname-$pkgver" @@ -50,19 +45,12 @@ build() { # Fix insecure rpath (http://bugs.archlinux.org/task/14017) sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules - # Update hardcoded path to C++ header files - patch -d tools/clang -Np1 -i "$srcdir/cpp-headers.patch" - # Get the correct list of symbols to export # See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-April/008559.html patch -Np1 -i "$srcdir/clang-plugin-loader-registry.patch" - # Fix C++0x name clashes (https://bugs.archlinux.org/task/22296) - patch -Np0 -i "$srcdir/llvm-2.8-alignOf.patch" - patch -d tools/clang -Np0 -i "$srcdir/clang-2.8-alignOf.patch" - # Fix clang path in CIndexer.cpp (https://bugs.archlinux.org/task/22799) - patch -d tools/clang -Np1 -i "$srcdir/clang-2.8-cindexer-clang-path.patch" + patch -d tools/clang -Np0 -i "$srcdir/cindexer-clang-path.patch" # Apply strip option to configure _optimize_flag="--enable-optimize" @@ -71,16 +59,15 @@ build() { # Include location of libffi headers in CPPFLAGS export CPPFLAGS="$CPPFLAGS $(pkg-config --cflags libffi)" - # Well, this is supposed to be the final release - sed -i 's/2.8rc/2.8/g' configure - ./configure --prefix=/usr --libdir=/usr/lib/llvm --sysconfdir=/etc \ --enable-shared --enable-libffi \ --enable-bindings=ocaml --enable-targets=all \ --disable-expensive-checks --disable-debug-runtime \ --disable-assertions --with-binutils-include=/usr/include \ - $_optimize_flag - make + $_optimize_flag \ + --with-cxx-include-root=/usr/include/c++/$_gcc_ver \ + --with-cxx-include-arch=$CHOST + make REQUIRES_RTTI=1 } package_llvm() { @@ -143,7 +130,7 @@ package_clang() { url="http://clang.llvm.org/" # It looks like clang still needs GCC to assemble and link object files # See http://old.nabble.com/%22clang--v%22-shows-a-GCC-call-td28378453.html - depends=("llvm=$pkgver-$pkgrel" 'gcc=4.5.2') + depends=("llvm=$pkgver-$pkgrel" "gcc=$_gcc_ver") # Fix installation path for clang docs sed -i 's:$(PROJ_prefix)/share/doc/llvm:$(PROJ_prefix)/share/doc/clang:' \ diff --git a/community/llvm/cindexer-clang-path.patch b/community/llvm/cindexer-clang-path.patch new file mode 100644 index 000000000..ddaab690e --- /dev/null +++ b/community/llvm/cindexer-clang-path.patch @@ -0,0 +1,10 @@ +--- tools/libclang/CIndexer.cpp.orig 2011-04-07 13:08:24.000000000 +0300 ++++ tools/libclang/CIndexer.cpp 2011-04-07 13:11:52.224884642 +0300 +@@ -80,6 +80,7 @@ std::string CIndexer::getClangResourcesP + + // We now have the CIndex directory, locate clang relative to it. + LibClangPath.eraseComponent(); ++ LibClangPath.eraseComponent(); + #endif + + LibClangPath.appendComponent("clang"); -- cgit v1.2.3-54-g00ecf