[arch-commits] Commit in (7 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Mar 14 17:03:28 UTC 2015
Date: Saturday, March 14, 2015 @ 18:03:28
Author: foutrelis
Revision: 233802
Add new llvm35 package
Added:
llvm35/
llvm35/repos/
llvm35/trunk/
llvm35/trunk/PKGBUILD
llvm35/trunk/llvm-3.5.0-force-link-pass.o.patch
llvm35/trunk/llvm-Config-config.h
llvm35/trunk/llvm-Config-llvm-config.h
------------------------------------+
PKGBUILD | 141 +++++++++++++++++++++++++++++++++++
llvm-3.5.0-force-link-pass.o.patch | 28 ++++++
llvm-Config-config.h | 9 ++
llvm-Config-llvm-config.h | 9 ++
4 files changed, 187 insertions(+)
Added: llvm35/trunk/PKGBUILD
===================================================================
--- llvm35/trunk/PKGBUILD (rev 0)
+++ llvm35/trunk/PKGBUILD 2015-03-14 17:03:28 UTC (rev 233802)
@@ -0,0 +1,141 @@
+# $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>
+
+# This package is meant to be used for compiling packages that haven't been
+# ported to LLVM 3.6 yet. Such packages may depend on llvm35-libs but not on
+# llvm35 which isn't co-installable with the regular LLVM 3.6 packages.
+
+pkgname=('llvm35' 'llvm35-libs')
+pkgver=3.5.1
+pkgrel=0
+arch=('i686' 'x86_64')
+url="http://llvm.org/"
+license=('custom:University of Illinois/NCSA Open Source License')
+makedepends=('libffi' 'python2' 'python-sphinx')
+options=('staticlibs')
+source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
+ llvm-3.5.0-force-link-pass.o.patch
+ llvm-Config-config.h
+ llvm-Config-llvm-config.h)
+sha256sums=('bf3275d2d7890015c8d8f5e6f4f882f8cf3bf51967297ebe74111d6d8b53be15'
+ 'SKIP'
+ '5702053503d49448598eda1b8dc8c263f0df9ad7486833273e3987b5dec25a19'
+ '312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3'
+ '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
+validpgpkeys=('11E521D646982372EB577A1F8F0871F202119294')
+
+prepare() {
+ cd "$srcdir/llvm-$pkgver.src"
+
+ # 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
+
+ # Fix build with GCC 4.9 (patch from Debian)
+ # http://llvm.org/bugs/show_bug.cgi?id=20067
+ patch -Np1 -i ../llvm-3.5.0-force-link-pass.o.patch
+}
+
+build() {
+ cd "$srcdir/llvm-$pkgver.src"
+
+ # Apply strip option to configure
+ _optimized_switch="enable"
+ [[ $(check_option strip) == n ]] && _optimized_switch="disable"
+
+ # 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-libffi \
+ --enable-targets=all \
+ --disable-expensive-checks \
+ --disable-debug-runtime \
+ --disable-assertions \
+ --with-binutils-include=/usr/include \
+ --with-python=/usr/bin/python2 \
+ --$_optimized_switch-optimized
+
+ make REQUIRES_RTTI=1
+ make -C docs -f Makefile.sphinx man
+ make -C docs -f Makefile.sphinx html
+}
+
+package_llvm() {
+ pkgdesc="Low Level Virtual Machine"
+ depends=("llvm35-libs=$pkgver-$pkgrel" 'perl')
+ provides=("llvm=$pkgver")
+ conflicts=('llvm')
+
+ cd "$srcdir/llvm-$pkgver.src"
+
+ make DESTDIR="$pkgdir" install
+
+ # The runtime library goes into llvm35-libs
+ mv -f "$pkgdir/usr/lib/libLLVM-$pkgver.so" "$srcdir/"
+ mv -f "$pkgdir/usr/lib/libLLVM-${pkgver%.*}.so" "$srcdir/"
+
+ # Fix permissions of static libs
+ chmod -x "$pkgdir"/usr/lib/*.a
+
+ # Get rid of example Hello transformation
+ rm "$pkgdir"/usr/lib/*LLVMHello.*
+
+ # 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"
+
+ 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 library)"
+ depends=('gcc-libs' 'zlib' 'libffi' 'ncurses')
+
+ install -d "$pkgdir/usr/lib"
+ cp -P \
+ "$srcdir/libLLVM-$pkgver.so" \
+ "$srcdir/libLLVM-${pkgver%.*}.so" \
+ "$pkgdir/usr/lib/"
+
+ install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
Property changes on: llvm35/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: llvm35/trunk/llvm-3.5.0-force-link-pass.o.patch
===================================================================
--- llvm35/trunk/llvm-3.5.0-force-link-pass.o.patch (rev 0)
+++ llvm35/trunk/llvm-3.5.0-force-link-pass.o.patch 2015-03-14 17:03:28 UTC (rev 233802)
@@ -0,0 +1,28 @@
+Index: llvm-toolchain-snapshot-3.5~svn211313/tools/bugpoint/Makefile
+===================================================================
+--- llvm-toolchain-snapshot-3.5~svn211313.orig/tools/bugpoint/Makefile
++++ llvm-toolchain-snapshot-3.5~svn211313/tools/bugpoint/Makefile
+@@ -12,6 +12,9 @@ TOOLNAME := bugpoint
+ LINK_COMPONENTS := asmparser instrumentation scalaropts ipo linker bitreader \
+ bitwriter irreader vectorize objcarcopts codegen
+
++# Crappy workaround to make sure it links correctly.
++LLVMLibsOptions := ../../lib/IR/Release*/Pass.o
++
+ # Support plugins.
+ NO_DEAD_STRIP := 1
+
+Index: llvm-toolchain-snapshot-3.5~svn211313/tools/opt/Makefile
+===================================================================
+--- llvm-toolchain-snapshot-3.5~svn211313.orig/tools/opt/Makefile
++++ llvm-toolchain-snapshot-3.5~svn211313/tools/opt/Makefile
+@@ -10,7 +10,9 @@
+ LEVEL := ../..
+ TOOLNAME := opt
+ LINK_COMPONENTS := bitreader bitwriter asmparser irreader instrumentation scalaropts objcarcopts ipo vectorize all-targets codegen
++# Crappy workaround to make sure it links correctly.
+
++LLVMLibsOptions := ../../lib/IR/Release*/Pass.o
+ # Support plugins.
+ NO_DEAD_STRIP := 1
+
Added: llvm35/trunk/llvm-Config-config.h
===================================================================
--- llvm35/trunk/llvm-Config-config.h (rev 0)
+++ llvm35/trunk/llvm-Config-config.h 2015-03-14 17:03:28 UTC (rev 233802)
@@ -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
Added: llvm35/trunk/llvm-Config-llvm-config.h
===================================================================
--- llvm35/trunk/llvm-Config-llvm-config.h (rev 0)
+++ llvm35/trunk/llvm-Config-llvm-config.h 2015-03-14 17:03:28 UTC (rev 233802)
@@ -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