[arch-commits] Commit in llvm/trunk (PKGBUILD)
Evangelos Foutras
foutrelis at nymeria.archlinux.org
Mon Jan 6 22:12:15 UTC 2014
Date: Monday, January 6, 2014 @ 23:12:15
Author: foutrelis
Revision: 203260
upgpkg: llvm 3.4-1
- New upstream release
- New split package: clang-tools-extra
- Include Python bindings to libclang (FS#32707)
Modified:
llvm/trunk/PKGBUILD
----------+
PKGBUILD | 78 +++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 53 insertions(+), 25 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-01-06 22:09:23 UTC (rev 203259)
+++ PKGBUILD 2014-01-06 22:12:15 UTC (rev 203260)
@@ -9,8 +9,9 @@
# Contributor: Roberto Alsina <ralsina at kde.org>
# Contributor: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
-pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'clang' 'clang-analyzer')
-pkgver=3.3
+pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'clang' 'clang-analyzer'
+ 'clang-tools-extra')
+pkgver=3.4
pkgrel=1
arch=('i686' 'x86_64')
url="http://llvm.org/"
@@ -18,40 +19,41 @@
makedepends=('libffi' 'python2' 'ocaml' 'python-sphinx')
options=('staticlibs')
source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.gz
- http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.gz
+ http://llvm.org/releases/$pkgver/clang-$pkgver.src.tar.gz
+ http://llvm.org/releases/$pkgver/clang-tools-extra-$pkgver.src.tar.gz
http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.gz
clang-3.3-use-gold-linker.patch
llvm-Config-config.h
llvm-Config-llvm-config.h)
-sha256sums=('68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578'
- 'b1b55de4ab3a57d3e0331a83e0284610191c77d924e3446498d9113d08dfb996'
- '0e2f3180d6316e6c43f064fdd406c5c6515e682c5f31c57c28335b68c7525423'
+sha256sums=('25a5612d692c48481b9b397e2b55f4870e447966d66c96d655241702d44a2628'
+ '22a9780db3b85a7f2eb9ea1f7f6e00da0249e3d12851e8dea0f62f1783242b1b'
+ 'ba85187551ae97fe1c8ab569903beae5ff0900e21233e5eb5389f6ceab1028b4'
+ 'f37c89b1383ce462d47537a0245ac798600887a9be9f63073e16b79ed536ab5c'
'8240adda155d7961eeb5d07ed50ead10cb7125f70283dff7f1c9fee9df3cea09'
'312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3'
'597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
prepare() {
- cd "$srcdir/llvm-$pkgver.src"
+ cd "$srcdir/llvm-$pkgver"
# At the present, clang must reside inside the LLVM source code tree to build
# See http://llvm.org/bugs/show_bug.cgi?id=4840
- mv "$srcdir/cfe-$pkgver.src" tools/clang
+ mv "$srcdir/clang-$pkgver" tools/clang
- mv "$srcdir/compiler-rt-$pkgver.src" projects/compiler-rt
+ mv "$srcdir/clang-tools-extra-$pkgver" tools/clang/tools/extra
+ mv "$srcdir/compiler-rt-$pkgver" projects/compiler-rt
+
# Fix docs installation directory
sed -i 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
Makefile.config.in
- # Fix insecure rpath (http://bugs.archlinux.org/task/14017)
- sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules
-
# Make -flto work; use ld.gold instead of the default linker
patch -d tools/clang -Np1 -i "$srcdir/clang-3.3-use-gold-linker.patch"
}
build() {
- cd "$srcdir/llvm-$pkgver.src"
+ cd "$srcdir/llvm-$pkgver"
# Apply strip option to configure
_optimized_switch="enable"
@@ -68,7 +70,6 @@
--enable-shared \
--enable-libffi \
--enable-targets=all \
- --enable-experimental-targets=R600 \
--disable-expensive-checks \
--disable-debug-runtime \
--disable-assertions \
@@ -86,7 +87,7 @@
pkgdesc="Low Level Virtual Machine"
depends=("llvm-libs=$pkgver-$pkgrel" 'perl')
- cd "$srcdir/llvm-$pkgver.src"
+ cd "$srcdir/llvm-$pkgver"
# We move the clang directory out of the tree so it won't get installed and
# then we bring it back in for the clang package
@@ -140,11 +141,11 @@
package_llvm-libs() {
pkgdesc="Low Level Virtual Machine (runtime library)"
- depends=('gcc-libs' 'zlib' 'libffi')
+ depends=('gcc-libs' 'zlib' 'libffi' 'ncurses')
install -D "$srcdir/libLLVM-$pkgver.so" "$pkgdir/usr/lib/libLLVM-$pkgver.so"
- install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+ install -Dm644 "$srcdir/llvm-$pkgver/LICENSE.TXT" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
@@ -152,7 +153,7 @@
pkgdesc="OCaml bindings for LLVM"
depends=("llvm=$pkgver-$pkgrel" 'ocaml')
- cd "$srcdir/llvm-$pkgver.src"
+ cd "$srcdir/llvm-$pkgver"
install -d "$pkgdir"/{usr/lib,usr/share/doc/llvm}
cp -r "$srcdir/ocaml" "$pkgdir/usr/lib"
@@ -161,7 +162,7 @@
# Remove execute bit from static libraries
chmod -x "$pkgdir"/usr/lib/ocaml/libllvm*.a
- install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/llvm-ocaml/LICENSE"
+ install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_clang() {
@@ -171,10 +172,16 @@
# Fix installation path for clang docs
sed -i 's:$(PROJ_prefix)/share/doc/llvm:$(PROJ_prefix)/share/doc/clang:' \
- "$srcdir/llvm-$pkgver.src/Makefile.config"
+ "$srcdir/llvm-$pkgver/Makefile.config"
- cd "$srcdir/llvm-$pkgver.src/tools/clang"
+ cd "$srcdir/llvm-$pkgver/tools/clang"
+
+ # We move the extra tools directory out of the tree so it won't get
+ # installed and then we bring it back in for the clang-tools-extra package
+ mv tools/extra "$srcdir"
+
make DESTDIR="$pkgdir" install
+ mv "$srcdir/extra" tools/
# Fix permissions of static libs
chmod -x "$pkgdir"/usr/lib/*.a
@@ -181,13 +188,19 @@
# Revert the path change in case we want to do a repackage later
sed -i 's:$(PROJ_prefix)/share/doc/clang:$(PROJ_prefix)/share/doc/llvm:' \
- "$srcdir/llvm-$pkgver.src/Makefile.config"
+ "$srcdir/llvm-$pkgver/Makefile.config"
# Install html docs
cp -r docs/_build/html/* "$pkgdir/usr/share/doc/$pkgname/html/"
rm -r "$pkgdir/usr/share/doc/$pkgname/html/_sources"
- install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/clang/LICENSE"
+ # Install Python bindings
+ install -d "$pkgdir/usr/lib/python2.7/site-packages"
+ cp -r bindings/python/clang "$pkgdir/usr/lib/python2.7/site-packages/"
+ python2 -m compileall "$pkgdir/usr/lib/python2.7/site-packages/clang"
+ python2 -O -m compileall "$pkgdir/usr/lib/python2.7/site-packages/clang"
+
+ install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_clang-analyzer() {
@@ -195,7 +208,7 @@
url="http://clang-analyzer.llvm.org/"
depends=("clang=$pkgver-$pkgrel" 'python2')
- cd "$srcdir/llvm-$pkgver.src/tools/clang"
+ cd "$srcdir/llvm-$pkgver/tools/clang"
install -d "$pkgdir"/usr/{bin,lib/clang-analyzer}
for _tool in scan-{build,view}; do
@@ -222,7 +235,22 @@
python2 -m compileall "$pkgdir/usr/lib/clang-analyzer"
python2 -O -m compileall "$pkgdir/usr/lib/clang-analyzer"
- install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/clang-analyzer/LICENSE"
+ install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
+package_clang-tools-extra() {
+ pkgdesc="Extra tools built using Clang's tooling APIs"
+ url="http://clang.llvm.org/"
+ depends=("clang=$pkgver-$pkgrel")
+
+ cd "$srcdir/llvm-$pkgver/tools/clang/tools/extra"
+
+ make DESTDIR="$pkgdir" install
+
+ # Fix permissions of static libs
+ chmod -x "$pkgdir"/usr/lib/*.a
+
+ install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list