[arch-commits] Commit in llvm/repos (10 files)

Evangelos Foutras foutrelis at archlinux.org
Mon Jul 13 17:50:56 UTC 2015


    Date: Monday, July 13, 2015 @ 19:50:56
  Author: foutrelis
Revision: 242170

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  llvm/repos/testing-i686/
  llvm/repos/testing-i686/PKGBUILD
    (from rev 242169, llvm/trunk/PKGBUILD)
  llvm/repos/testing-i686/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch
    (from rev 242169, llvm/trunk/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch)
  llvm/repos/testing-i686/llvm-Config-config.h
    (from rev 242169, llvm/trunk/llvm-Config-config.h)
  llvm/repos/testing-i686/llvm-Config-llvm-config.h
    (from rev 242169, llvm/trunk/llvm-Config-llvm-config.h)
  llvm/repos/testing-x86_64/
  llvm/repos/testing-x86_64/PKGBUILD
    (from rev 242169, llvm/trunk/PKGBUILD)
  llvm/repos/testing-x86_64/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch
    (from rev 242169, llvm/trunk/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch)
  llvm/repos/testing-x86_64/llvm-Config-config.h
    (from rev 242169, llvm/trunk/llvm-Config-config.h)
  llvm/repos/testing-x86_64/llvm-Config-llvm-config.h
    (from rev 242169, llvm/trunk/llvm-Config-llvm-config.h)

------------------------------------------------------------+
 testing-i686/PKGBUILD                                      |  322 +++++++++++
 testing-i686/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch   |   30 +
 testing-i686/llvm-Config-config.h                          |    9 
 testing-i686/llvm-Config-llvm-config.h                     |    9 
 testing-x86_64/PKGBUILD                                    |  322 +++++++++++
 testing-x86_64/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch |   30 +
 testing-x86_64/llvm-Config-config.h                        |    9 
 testing-x86_64/llvm-Config-llvm-config.h                   |    9 
 8 files changed, 740 insertions(+)

Copied: llvm/repos/testing-i686/PKGBUILD (from rev 242169, llvm/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2015-07-13 17:50:56 UTC (rev 242170)
@@ -0,0 +1,322 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
+# Contributor: Sebastian Nowicki <sebnow at gmail.com>
+# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
+# Contributor: Tobias Kieslich <tobias at justdreams.de>
+# Contributor: Geoffroy Carrier <geoffroy.carrier at aur.archlinux.org>
+# Contributor: Tomas Lindquist Olsen <tomas at famolsen.dk>
+# Contributor: Roberto Alsina <ralsina at kde.org>
+# Contributor: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
+
+pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'lldb' 'clang' 'clang-analyzer'
+         'clang-tools-extra')
+pkgver=3.6.2
+pkgrel=1
+_ocaml_ver=4.02.1
+arch=('i686' 'x86_64')
+url="http://llvm.org/"
+license=('custom:University of Illinois/NCSA Open Source License')
+makedepends=('libffi' 'python2' "ocaml=$_ocaml_ver" 'python-sphinx' 'chrpath'
+             'ocaml-ctypes' 'ocaml-findlib' 'libedit' 'swig')
+# Use gcc-multilib to build 32-bit compiler-rt libraries on x86_64 (FS#41911)
+makedepends_x86_64=('gcc-multilib')
+options=('staticlibs')
+source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
+        http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
+        http://llvm.org/releases/$pkgver/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
+        http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig}
+        http://llvm.org/releases/$pkgver/lldb-$pkgver.src.tar.xz{,.sig}
+        llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch
+        llvm-Config-config.h
+        llvm-Config-llvm-config.h)
+sha256sums=('f60dc158bfda6822de167e87275848969f0558b3134892ff54fced87e4667b94'
+            'SKIP'
+            'ae9180466a23acb426d12444d866b266ff2289b266064d362462e44f8d4699f3'
+            'SKIP'
+            '6a0ec627d398f501ddf347060f7a2ccea4802b2494f1d4fd7bda3e0442d04feb'
+            'SKIP'
+            '0f2ff37d80a64575fecd8cf0d5c50f7ac1f837ddf700d1855412bb7547431d87'
+            'SKIP'
+            '940dc96b64919b7dbf32c37e0e1d1fc88cc18e1d4b3acf1e7dfe5a46eb6523a9'
+            'SKIP'
+            '7e62bd5dd1ae5755a63abab692ae366186be392104e232e6b3a10a4ea5807283'
+            '312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3'
+            '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
+validpgpkeys=('11E521D646982372EB577A1F8F0871F202119294')
+
+prepare() {
+  cd "$srcdir/llvm-$pkgver.src"
+
+  # 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-tools-extra-$pkgver.src" tools/clang/tools/extra
+
+  mv "$srcdir/compiler-rt-$pkgver.src" projects/compiler-rt
+
+  mv "$srcdir/lldb-$pkgver.src" tools/lldb
+
+  # Fix docs installation directory
+  sed -i 's:$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
+    Makefile.config.in
+
+  # Fix definition of LLVM_CMAKE_DIR in LLVMConfig.cmake
+  sed -i '/@LLVM_CONFIG_CMAKE_DIR@/s:$(PROJ_cmake):$(PROJ_prefix)/share/llvm/cmake:' \
+    cmake/modules/Makefile
+
+  # Use Python 2
+  find tools/lldb -name Makefile -exec sed -i 's/python-config/python2-config/' {} +
+  sed -i 's|/usr/bin/env python|&2|' \
+    tools/lldb/scripts/Python/{build-swig-Python,finish-swig-Python-LLDB}.sh
+
+  # Fix docs/Makefile to use ocamlfind
+  # http://llvm.org/bugs/show_bug.cgi?id=22737
+  patch -Np1 -i ../llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch
+}
+
+build() {
+  cd "$srcdir/llvm-$pkgver.src"
+
+  # Include location of libffi headers in CPPFLAGS
+  CPPFLAGS+=" $(pkg-config --cflags libffi)"
+
+  # Force the use of GCC instead of clang
+  CC=gcc CXX=g++ \
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --enable-shared \
+    --enable-optimized \
+    --enable-libffi \
+    --enable-targets=all \
+    --enable-bindings=ocaml \
+    --disable-assertions \
+    --with-binutils-include=/usr/include \
+    --with-python=/usr/bin/python2
+
+  make REQUIRES_RTTI=1
+  make -C docs -f Makefile.sphinx man
+  make -C docs -f Makefile.sphinx html
+  make -C tools/clang/docs -f Makefile.sphinx html
+}
+
+package_llvm() {
+  pkgdesc="Low Level Virtual Machine"
+  depends=("llvm-libs=$pkgver-$pkgrel" 'perl')
+
+  cd "$srcdir/llvm-$pkgver.src"
+
+  # 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
+  mv tools/clang "$srcdir/"
+
+  # Same for lldb
+  mv tools/lldb "$srcdir/"
+
+  # -j1 is due to race conditions during the installation of the OCaml bindings
+  make -j1 DESTDIR="$pkgdir" install
+  mv "$srcdir/clang" tools
+  mv "$srcdir/lldb" tools
+
+  # The runtime libraries go into llvm-libs
+  mv -f "$pkgdir/usr/lib/libLLVM-$pkgver.so" "$srcdir/"
+  mv -f "$pkgdir/usr/lib/libLLVM-${pkgver%.*}.so" "$srcdir/"
+  mv -f "$pkgdir"/usr/lib/{LLVMgold,libLTO,BugpointPasses}.so "$srcdir/"
+
+  # OCaml bindings go to a separate package
+  rm -rf "$srcdir"/{ocaml,ocamldoc}
+  mv "$pkgdir"/usr/{lib/ocaml,share/doc/llvm/ocamldoc} "$srcdir"
+
+  # Fix permissions of static libs
+  chmod -x "$pkgdir"/usr/lib/*.a
+
+  # Get rid of example Hello transformation
+  rm "$pkgdir"/usr/lib/*LLVMHello.*
+
+  if [[ $CARCH == x86_64 ]]; then
+    # Needed for multilib (https://bugs.archlinux.org/task/29951)
+    # Header stubs are taken from Fedora
+    for _header in config llvm-config; do
+      mv "$pkgdir/usr/include/llvm/Config/$_header"{,-64}.h
+      cp "$srcdir/llvm-Config-$_header.h" \
+        "$pkgdir/usr/include/llvm/Config/$_header.h"
+    done
+  fi
+
+  # Install man pages
+  install -d "$pkgdir/usr/share/man/man1"
+  cp docs/_build/man/*.1 "$pkgdir/usr/share/man/man1/"
+
+  # 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/$pkgname/LICENSE"
+}
+
+package_llvm-libs() {
+  pkgdesc="Low Level Virtual Machine (runtime libraries)"
+  depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses')
+
+  install -d "$pkgdir/usr/lib"
+  cp -P \
+    "$srcdir/libLLVM-$pkgver.so" \
+    "$srcdir/libLLVM-${pkgver%.*}.so" \
+    "$srcdir"/{LLVMgold,libLTO,BugpointPasses}.so \
+    "$pkgdir/usr/lib/"
+
+  # Symlink LLVMgold.so from /usr/lib/bfd-plugins
+  # https://bugs.archlinux.org/task/28479
+  install -d "$pkgdir/usr/lib/bfd-plugins"
+  ln -s ../LLVMgold.so "$pkgdir/usr/lib/bfd-plugins/LLVMgold.so"
+
+  install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_llvm-ocaml() {
+  pkgdesc="OCaml bindings for LLVM"
+  depends=("llvm=$pkgver-$pkgrel" "ocaml=$_ocaml_ver" 'ocaml-ctypes')
+
+  cd "$srcdir/llvm-$pkgver.src"
+
+  install -d "$pkgdir"/{usr/lib,usr/share/doc/llvm}
+  cp -r "$srcdir/ocaml" "$pkgdir/usr/lib"
+  cp -r "$srcdir/ocamldoc" "$pkgdir/usr/share/doc/llvm"
+
+  # Remove execute bit from static libraries
+  chmod -x "$pkgdir"/usr/lib/ocaml/libllvm*.a
+
+  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lldb() {
+  pkgdesc="Next generation, high-performance debugger"
+  url="http://lldb.llvm.org/"
+  depends=("llvm-libs=$pkgver-$pkgrel" 'libedit' 'python2')
+
+  cd "$srcdir/llvm-$pkgver.src/tools/lldb"
+
+  make DESTDIR="$pkgdir" install
+
+  # Fix permissions of static libs
+  chmod -x "$pkgdir"/usr/lib/*.a
+
+  # Remove insecure rpath
+  chrpath -d "$pkgdir"/usr/bin/*
+
+  # Compile Python scripts
+  python2 -m compileall "$pkgdir/usr/lib/python2.7/site-packages/lldb"
+  python2 -O -m compileall "$pkgdir/usr/lib/python2.7/site-packages/lldb"
+
+  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_clang() {
+  pkgdesc="C language family frontend for LLVM"
+  url="http://clang.llvm.org/"
+  depends=("llvm-libs=$pkgver-$pkgrel" 'gcc')
+
+  # 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"
+
+  cd "$srcdir/llvm-$pkgver.src/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
+
+  # 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"
+
+  # Install html docs
+  cp -r docs/_build/html/* "$pkgdir/usr/share/doc/$pkgname/html/"
+  rm -r "$pkgdir/usr/share/doc/$pkgname/html/_sources"
+
+  # 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 clang-format editor integration files (FS#38485)
+  # Destination paths are copied from clang-format/CMakeLists.txt
+  install -d "$pkgdir/usr/share/$pkgname"
+  (
+    cd tools/clang-format
+    cp \
+      clang-format-diff.py \
+      clang-format-sublime.py \
+      clang-format.el \
+      clang-format.py \
+      "$pkgdir/usr/share/$pkgname/"
+    cp git-clang-format "$pkgdir/usr/bin/"
+    sed -i 's|/usr/bin/env python|&2|' \
+      "$pkgdir/usr/bin/git-clang-format" \
+      "$pkgdir/usr/share/$pkgname/clang-format-diff.py"
+  )
+
+  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_clang-analyzer() {
+  pkgdesc="A source code analysis framework"
+  url="http://clang-analyzer.llvm.org/"
+  depends=("clang=$pkgver-$pkgrel" 'python2')
+
+  cd "$srcdir/llvm-$pkgver.src/tools/clang"
+
+  install -d "$pkgdir"/usr/{bin,lib/clang-analyzer}
+  for _tool in scan-{build,view}; do
+    cp -r tools/$_tool "$pkgdir/usr/lib/clang-analyzer/"
+    ln -s /usr/lib/clang-analyzer/$_tool/$_tool "$pkgdir/usr/bin/"
+  done
+
+  # scan-build looks for clang within the same directory
+  ln -s /usr/bin/clang "$pkgdir/usr/lib/clang-analyzer/scan-build/"
+
+  # Relocate man page
+  install -d "$pkgdir/usr/share/man/man1"
+  mv "$pkgdir/usr/lib/clang-analyzer/scan-build/scan-build.1" \
+    "$pkgdir/usr/share/man/man1/"
+
+  # Use Python 2
+  sed -i \
+    -e 's|env python$|&2|' \
+    -e 's|/usr/bin/python$|&2|' \
+    "$pkgdir/usr/lib/clang-analyzer/scan-view/scan-view" \
+    "$pkgdir/usr/lib/clang-analyzer/scan-build/set-xcode-analyzer"
+
+  # Compile Python scripts
+  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/$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.src/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:

Copied: llvm/repos/testing-i686/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch (from rev 242169, llvm/trunk/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch)
===================================================================
--- testing-i686/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch	                        (rev 0)
+++ testing-i686/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch	2015-07-13 17:50:56 UTC (rev 242170)
@@ -0,0 +1,30 @@
+diff -upr llvm-3.6.0.src.orig/docs/Makefile llvm-3.6.0.src/docs/Makefile
+--- llvm-3.6.0.src.orig/docs/Makefile	2014-10-29 00:45:25.000000000 +0200
++++ llvm-3.6.0.src/docs/Makefile	2015-02-28 10:12:35.647351241 +0200
+@@ -41,7 +41,7 @@ install_targets := install-html
+ ifeq ($(ENABLE_DOXYGEN),1)
+ install_targets += install-doxygen
+ endif
+-ifdef OCAMLDOC
++ifdef OCAMLFIND
+ ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD)))
+ install_targets += install-ocamldoc
+ endif
+@@ -49,7 +49,7 @@ endif
+ install-local:: $(install_targets)
+ 
+ generated_targets := doxygen
+-ifdef OCAMLDOC
++ifdef OCAMLFIND
+ generated_targets += ocamldoc
+ endif
+ 
+@@ -120,7 +120,7 @@ regen-ocamldoc:
+ 	$(Verb) $(MAKE) -C $(LEVEL)/bindings/ocaml ocamldoc
+ 	$(Verb) $(MKDIR) $(PROJ_OBJ_DIR)/ocamldoc/html
+ 	$(Verb) \
+-		$(OCAMLDOC) -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \
++		$(OCAMLFIND) ocamldoc -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \
+ 		`$(FIND) $(LEVEL)/bindings/ocaml -name "*.odoc" \
+ 		         -path "*/$(BuildMode)/*.odoc" -exec echo -load '{}' ';'`
+ 

Copied: llvm/repos/testing-i686/llvm-Config-config.h (from rev 242169, llvm/trunk/llvm-Config-config.h)
===================================================================
--- testing-i686/llvm-Config-config.h	                        (rev 0)
+++ testing-i686/llvm-Config-config.h	2015-07-13 17:50:56 UTC (rev 242170)
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "config-32.h"
+#elif __WORDSIZE == 64
+#include "config-64.h"
+#else
+#error "Unknown word size"
+#endif

Copied: llvm/repos/testing-i686/llvm-Config-llvm-config.h (from rev 242169, llvm/trunk/llvm-Config-llvm-config.h)
===================================================================
--- testing-i686/llvm-Config-llvm-config.h	                        (rev 0)
+++ testing-i686/llvm-Config-llvm-config.h	2015-07-13 17:50:56 UTC (rev 242170)
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "llvm-config-32.h"
+#elif __WORDSIZE == 64
+#include "llvm-config-64.h"
+#else
+#error "Unknown word size"
+#endif

Copied: llvm/repos/testing-x86_64/PKGBUILD (from rev 242169, llvm/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2015-07-13 17:50:56 UTC (rev 242170)
@@ -0,0 +1,322 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
+# Contributor: Sebastian Nowicki <sebnow at gmail.com>
+# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
+# Contributor: Tobias Kieslich <tobias at justdreams.de>
+# Contributor: Geoffroy Carrier <geoffroy.carrier at aur.archlinux.org>
+# Contributor: Tomas Lindquist Olsen <tomas at famolsen.dk>
+# Contributor: Roberto Alsina <ralsina at kde.org>
+# Contributor: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
+
+pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'lldb' 'clang' 'clang-analyzer'
+         'clang-tools-extra')
+pkgver=3.6.2
+pkgrel=1
+_ocaml_ver=4.02.1
+arch=('i686' 'x86_64')
+url="http://llvm.org/"
+license=('custom:University of Illinois/NCSA Open Source License')
+makedepends=('libffi' 'python2' "ocaml=$_ocaml_ver" 'python-sphinx' 'chrpath'
+             'ocaml-ctypes' 'ocaml-findlib' 'libedit' 'swig')
+# Use gcc-multilib to build 32-bit compiler-rt libraries on x86_64 (FS#41911)
+makedepends_x86_64=('gcc-multilib')
+options=('staticlibs')
+source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
+        http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
+        http://llvm.org/releases/$pkgver/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
+        http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig}
+        http://llvm.org/releases/$pkgver/lldb-$pkgver.src.tar.xz{,.sig}
+        llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch
+        llvm-Config-config.h
+        llvm-Config-llvm-config.h)
+sha256sums=('f60dc158bfda6822de167e87275848969f0558b3134892ff54fced87e4667b94'
+            'SKIP'
+            'ae9180466a23acb426d12444d866b266ff2289b266064d362462e44f8d4699f3'
+            'SKIP'
+            '6a0ec627d398f501ddf347060f7a2ccea4802b2494f1d4fd7bda3e0442d04feb'
+            'SKIP'
+            '0f2ff37d80a64575fecd8cf0d5c50f7ac1f837ddf700d1855412bb7547431d87'
+            'SKIP'
+            '940dc96b64919b7dbf32c37e0e1d1fc88cc18e1d4b3acf1e7dfe5a46eb6523a9'
+            'SKIP'
+            '7e62bd5dd1ae5755a63abab692ae366186be392104e232e6b3a10a4ea5807283'
+            '312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3'
+            '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
+validpgpkeys=('11E521D646982372EB577A1F8F0871F202119294')
+
+prepare() {
+  cd "$srcdir/llvm-$pkgver.src"
+
+  # 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-tools-extra-$pkgver.src" tools/clang/tools/extra
+
+  mv "$srcdir/compiler-rt-$pkgver.src" projects/compiler-rt
+
+  mv "$srcdir/lldb-$pkgver.src" tools/lldb
+
+  # Fix docs installation directory
+  sed -i 's:$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
+    Makefile.config.in
+
+  # Fix definition of LLVM_CMAKE_DIR in LLVMConfig.cmake
+  sed -i '/@LLVM_CONFIG_CMAKE_DIR@/s:$(PROJ_cmake):$(PROJ_prefix)/share/llvm/cmake:' \
+    cmake/modules/Makefile
+
+  # Use Python 2
+  find tools/lldb -name Makefile -exec sed -i 's/python-config/python2-config/' {} +
+  sed -i 's|/usr/bin/env python|&2|' \
+    tools/lldb/scripts/Python/{build-swig-Python,finish-swig-Python-LLDB}.sh
+
+  # Fix docs/Makefile to use ocamlfind
+  # http://llvm.org/bugs/show_bug.cgi?id=22737
+  patch -Np1 -i ../llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch
+}
+
+build() {
+  cd "$srcdir/llvm-$pkgver.src"
+
+  # Include location of libffi headers in CPPFLAGS
+  CPPFLAGS+=" $(pkg-config --cflags libffi)"
+
+  # Force the use of GCC instead of clang
+  CC=gcc CXX=g++ \
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --enable-shared \
+    --enable-optimized \
+    --enable-libffi \
+    --enable-targets=all \
+    --enable-bindings=ocaml \
+    --disable-assertions \
+    --with-binutils-include=/usr/include \
+    --with-python=/usr/bin/python2
+
+  make REQUIRES_RTTI=1
+  make -C docs -f Makefile.sphinx man
+  make -C docs -f Makefile.sphinx html
+  make -C tools/clang/docs -f Makefile.sphinx html
+}
+
+package_llvm() {
+  pkgdesc="Low Level Virtual Machine"
+  depends=("llvm-libs=$pkgver-$pkgrel" 'perl')
+
+  cd "$srcdir/llvm-$pkgver.src"
+
+  # 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
+  mv tools/clang "$srcdir/"
+
+  # Same for lldb
+  mv tools/lldb "$srcdir/"
+
+  # -j1 is due to race conditions during the installation of the OCaml bindings
+  make -j1 DESTDIR="$pkgdir" install
+  mv "$srcdir/clang" tools
+  mv "$srcdir/lldb" tools
+
+  # The runtime libraries go into llvm-libs
+  mv -f "$pkgdir/usr/lib/libLLVM-$pkgver.so" "$srcdir/"
+  mv -f "$pkgdir/usr/lib/libLLVM-${pkgver%.*}.so" "$srcdir/"
+  mv -f "$pkgdir"/usr/lib/{LLVMgold,libLTO,BugpointPasses}.so "$srcdir/"
+
+  # OCaml bindings go to a separate package
+  rm -rf "$srcdir"/{ocaml,ocamldoc}
+  mv "$pkgdir"/usr/{lib/ocaml,share/doc/llvm/ocamldoc} "$srcdir"
+
+  # Fix permissions of static libs
+  chmod -x "$pkgdir"/usr/lib/*.a
+
+  # Get rid of example Hello transformation
+  rm "$pkgdir"/usr/lib/*LLVMHello.*
+
+  if [[ $CARCH == x86_64 ]]; then
+    # Needed for multilib (https://bugs.archlinux.org/task/29951)
+    # Header stubs are taken from Fedora
+    for _header in config llvm-config; do
+      mv "$pkgdir/usr/include/llvm/Config/$_header"{,-64}.h
+      cp "$srcdir/llvm-Config-$_header.h" \
+        "$pkgdir/usr/include/llvm/Config/$_header.h"
+    done
+  fi
+
+  # Install man pages
+  install -d "$pkgdir/usr/share/man/man1"
+  cp docs/_build/man/*.1 "$pkgdir/usr/share/man/man1/"
+
+  # 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/$pkgname/LICENSE"
+}
+
+package_llvm-libs() {
+  pkgdesc="Low Level Virtual Machine (runtime libraries)"
+  depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses')
+
+  install -d "$pkgdir/usr/lib"
+  cp -P \
+    "$srcdir/libLLVM-$pkgver.so" \
+    "$srcdir/libLLVM-${pkgver%.*}.so" \
+    "$srcdir"/{LLVMgold,libLTO,BugpointPasses}.so \
+    "$pkgdir/usr/lib/"
+
+  # Symlink LLVMgold.so from /usr/lib/bfd-plugins
+  # https://bugs.archlinux.org/task/28479
+  install -d "$pkgdir/usr/lib/bfd-plugins"
+  ln -s ../LLVMgold.so "$pkgdir/usr/lib/bfd-plugins/LLVMgold.so"
+
+  install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_llvm-ocaml() {
+  pkgdesc="OCaml bindings for LLVM"
+  depends=("llvm=$pkgver-$pkgrel" "ocaml=$_ocaml_ver" 'ocaml-ctypes')
+
+  cd "$srcdir/llvm-$pkgver.src"
+
+  install -d "$pkgdir"/{usr/lib,usr/share/doc/llvm}
+  cp -r "$srcdir/ocaml" "$pkgdir/usr/lib"
+  cp -r "$srcdir/ocamldoc" "$pkgdir/usr/share/doc/llvm"
+
+  # Remove execute bit from static libraries
+  chmod -x "$pkgdir"/usr/lib/ocaml/libllvm*.a
+
+  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lldb() {
+  pkgdesc="Next generation, high-performance debugger"
+  url="http://lldb.llvm.org/"
+  depends=("llvm-libs=$pkgver-$pkgrel" 'libedit' 'python2')
+
+  cd "$srcdir/llvm-$pkgver.src/tools/lldb"
+
+  make DESTDIR="$pkgdir" install
+
+  # Fix permissions of static libs
+  chmod -x "$pkgdir"/usr/lib/*.a
+
+  # Remove insecure rpath
+  chrpath -d "$pkgdir"/usr/bin/*
+
+  # Compile Python scripts
+  python2 -m compileall "$pkgdir/usr/lib/python2.7/site-packages/lldb"
+  python2 -O -m compileall "$pkgdir/usr/lib/python2.7/site-packages/lldb"
+
+  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_clang() {
+  pkgdesc="C language family frontend for LLVM"
+  url="http://clang.llvm.org/"
+  depends=("llvm-libs=$pkgver-$pkgrel" 'gcc')
+
+  # 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"
+
+  cd "$srcdir/llvm-$pkgver.src/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
+
+  # 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"
+
+  # Install html docs
+  cp -r docs/_build/html/* "$pkgdir/usr/share/doc/$pkgname/html/"
+  rm -r "$pkgdir/usr/share/doc/$pkgname/html/_sources"
+
+  # 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 clang-format editor integration files (FS#38485)
+  # Destination paths are copied from clang-format/CMakeLists.txt
+  install -d "$pkgdir/usr/share/$pkgname"
+  (
+    cd tools/clang-format
+    cp \
+      clang-format-diff.py \
+      clang-format-sublime.py \
+      clang-format.el \
+      clang-format.py \
+      "$pkgdir/usr/share/$pkgname/"
+    cp git-clang-format "$pkgdir/usr/bin/"
+    sed -i 's|/usr/bin/env python|&2|' \
+      "$pkgdir/usr/bin/git-clang-format" \
+      "$pkgdir/usr/share/$pkgname/clang-format-diff.py"
+  )
+
+  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_clang-analyzer() {
+  pkgdesc="A source code analysis framework"
+  url="http://clang-analyzer.llvm.org/"
+  depends=("clang=$pkgver-$pkgrel" 'python2')
+
+  cd "$srcdir/llvm-$pkgver.src/tools/clang"
+
+  install -d "$pkgdir"/usr/{bin,lib/clang-analyzer}
+  for _tool in scan-{build,view}; do
+    cp -r tools/$_tool "$pkgdir/usr/lib/clang-analyzer/"
+    ln -s /usr/lib/clang-analyzer/$_tool/$_tool "$pkgdir/usr/bin/"
+  done
+
+  # scan-build looks for clang within the same directory
+  ln -s /usr/bin/clang "$pkgdir/usr/lib/clang-analyzer/scan-build/"
+
+  # Relocate man page
+  install -d "$pkgdir/usr/share/man/man1"
+  mv "$pkgdir/usr/lib/clang-analyzer/scan-build/scan-build.1" \
+    "$pkgdir/usr/share/man/man1/"
+
+  # Use Python 2
+  sed -i \
+    -e 's|env python$|&2|' \
+    -e 's|/usr/bin/python$|&2|' \
+    "$pkgdir/usr/lib/clang-analyzer/scan-view/scan-view" \
+    "$pkgdir/usr/lib/clang-analyzer/scan-build/set-xcode-analyzer"
+
+  # Compile Python scripts
+  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/$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.src/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:

Copied: llvm/repos/testing-x86_64/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch (from rev 242169, llvm/trunk/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch)
===================================================================
--- testing-x86_64/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch	                        (rev 0)
+++ testing-x86_64/llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch	2015-07-13 17:50:56 UTC (rev 242170)
@@ -0,0 +1,30 @@
+diff -upr llvm-3.6.0.src.orig/docs/Makefile llvm-3.6.0.src/docs/Makefile
+--- llvm-3.6.0.src.orig/docs/Makefile	2014-10-29 00:45:25.000000000 +0200
++++ llvm-3.6.0.src/docs/Makefile	2015-02-28 10:12:35.647351241 +0200
+@@ -41,7 +41,7 @@ install_targets := install-html
+ ifeq ($(ENABLE_DOXYGEN),1)
+ install_targets += install-doxygen
+ endif
+-ifdef OCAMLDOC
++ifdef OCAMLFIND
+ ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD)))
+ install_targets += install-ocamldoc
+ endif
+@@ -49,7 +49,7 @@ endif
+ install-local:: $(install_targets)
+ 
+ generated_targets := doxygen
+-ifdef OCAMLDOC
++ifdef OCAMLFIND
+ generated_targets += ocamldoc
+ endif
+ 
+@@ -120,7 +120,7 @@ regen-ocamldoc:
+ 	$(Verb) $(MAKE) -C $(LEVEL)/bindings/ocaml ocamldoc
+ 	$(Verb) $(MKDIR) $(PROJ_OBJ_DIR)/ocamldoc/html
+ 	$(Verb) \
+-		$(OCAMLDOC) -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \
++		$(OCAMLFIND) ocamldoc -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \
+ 		`$(FIND) $(LEVEL)/bindings/ocaml -name "*.odoc" \
+ 		         -path "*/$(BuildMode)/*.odoc" -exec echo -load '{}' ';'`
+ 

Copied: llvm/repos/testing-x86_64/llvm-Config-config.h (from rev 242169, llvm/trunk/llvm-Config-config.h)
===================================================================
--- testing-x86_64/llvm-Config-config.h	                        (rev 0)
+++ testing-x86_64/llvm-Config-config.h	2015-07-13 17:50:56 UTC (rev 242170)
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "config-32.h"
+#elif __WORDSIZE == 64
+#include "config-64.h"
+#else
+#error "Unknown word size"
+#endif

Copied: llvm/repos/testing-x86_64/llvm-Config-llvm-config.h (from rev 242169, llvm/trunk/llvm-Config-llvm-config.h)
===================================================================
--- testing-x86_64/llvm-Config-llvm-config.h	                        (rev 0)
+++ testing-x86_64/llvm-Config-llvm-config.h	2015-07-13 17:50:56 UTC (rev 242170)
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "llvm-config-32.h"
+#elif __WORDSIZE == 64
+#include "llvm-config-64.h"
+#else
+#error "Unknown word size"
+#endif



More information about the arch-commits mailing list