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

Laurent Carlier lcarlier at archlinux.org
Fri Mar 6 22:20:29 UTC 2015


    Date: Friday, March 6, 2015 @ 23:20:29
  Author: lcarlier
Revision: 128843

archrelease: copy trunk to multilib-staging-x86_64

Added:
  lib32-llvm/repos/multilib-staging-x86_64/
  lib32-llvm/repos/multilib-staging-x86_64/PKGBUILD
    (from rev 128842, lib32-llvm/trunk/PKGBUILD)

----------+
 PKGBUILD |  159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 159 insertions(+)

Copied: lib32-llvm/repos/multilib-staging-x86_64/PKGBUILD (from rev 128842, lib32-llvm/trunk/PKGBUILD)
===================================================================
--- multilib-staging-x86_64/PKGBUILD	                        (rev 0)
+++ multilib-staging-x86_64/PKGBUILD	2015-03-06 22:20:29 UTC (rev 128843)
@@ -0,0 +1,159 @@
+# $Id$
+# Maintainer: Evangelos Foutras <foutrelis at gmail.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=('lib32-llvm' 'lib32-llvm-libs' 'lib32-clang')
+pkgver=3.6.0
+pkgrel=1
+arch=('x86_64')
+url="http://llvm.org/"
+license=('custom:University of Illinois/NCSA Open Source License')
+makedepends=('lib32-libffi' 'lib32-zlib' 'python2' '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/compiler-rt-$pkgver.src.tar.xz{,.sig})
+sha256sums=('b39a69e501b49e8f73ff75c9ad72313681ee58d6f430bfad4d81846fe92eb9ce'
+            'SKIP'
+            'be0e69378119fe26f0f2f74cffe82b7c26da840c9733fe522ed3c1b66b11082d'
+            'SKIP'
+            '7f49fb79e5adcdce7dddaf973f1db130228dfb19e37a99a7f5365a6948b26b11'
+            'SKIP')
+validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D')
+
+prepare() {
+  cd "$srcdir/llvm-$pkgver.src"
+
+  mv "$srcdir/cfe-$pkgver.src" tools/clang
+  mv "$srcdir/compiler-rt-$pkgver.src" projects/compiler-rt
+
+  # Fix installation directories, ./configure doesn't seem to set them right
+  sed -i -e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib32:' \
+         -e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
+    Makefile.config.in
+  sed -i '/ActiveLibDir = ActivePrefix/s:lib:lib32:' \
+    tools/llvm-config/llvm-config.cpp
+  sed -i 's:LLVM_LIBDIR="${prefix}/lib":LLVM_LIBDIR="${prefix}/lib32":' \
+    autoconf/configure.ac \
+    configure
+
+  # Fix source file permissions
+  # http://llvm.org/bugs/show_bug.cgi?id=22742
+  chmod -R u=rwX,go=rX "$srcdir/llvm-$pkgver.src"
+}
+
+build() {
+  cd "$srcdir/llvm-$pkgver.src"
+
+  export CC="gcc -m32"
+  export CXX="g++ -m32"
+  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+
+  # 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)"
+
+  # We had to force host and target to get
+  # a proper triplet reported by llvm
+
+  ./configure \
+    --prefix=/usr \
+    --libdir=/usr/lib32 \
+    --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 \
+    --build=i686-pc-linux-gnu \
+    --host=i686-pc-linux-gnu \
+    --$_optimized_switch-optimized
+
+  make REQUIRES_RTTI=1
+}
+
+package_lib32-llvm() {
+  pkgdesc="Low Level Virtual Machine (32-bit)"
+  depends=('lib32-llvm-libs' 'llvm')
+
+  cd "$srcdir/llvm-$pkgver.src"
+
+  make DESTDIR="$pkgdir" install
+
+  # The runtime library goes into lib32-llvm-libs
+  mv "$pkgdir/usr/lib32/libLLVM-$pkgver.so" "$srcdir/"
+  mv "$pkgdir/usr/lib32/libLLVM-${pkgver%.*}.so" "$srcdir/"
+
+  # Fix permissions of static libs
+  chmod -x "$pkgdir"/usr/lib32/*.a
+
+  mv "$pkgdir/usr/bin/llvm-config" "$pkgdir/usr/lib32/llvm-config"
+
+  # Get rid of example Hello transformation
+  rm "$pkgdir"/usr/lib32/*LLVMHello.*
+
+  # Symlink LLVMgold.so from /usr/lib32/bfd-plugins
+  # https://bugs.archlinux.org/task/28479
+  install -d "$pkgdir/usr/lib32/bfd-plugins"
+  ln -s ../LLVMgold.so "$pkgdir/usr/lib32/bfd-plugins/LLVMgold.so"
+
+  mv "$pkgdir"/usr/include/llvm/Config/*config.h "$pkgdir/"
+  rm -rf "$pkgdir"/usr/{bin,include,share/{doc,man,llvm}}
+  
+  # remove conflicting clang files
+  rm -r "$pkgdir"/usr/lib
+  rm "$pkgdir"/usr/lib32/libclang*
+  
+  install -d "$pkgdir/usr/include/llvm/Config"
+  mv "$pkgdir/config.h" "$pkgdir/usr/include/llvm/Config/config-32.h"
+  mv "$pkgdir/llvm-config.h" "$pkgdir/usr/include/llvm/Config/llvm-config-32.h"
+
+  mkdir "$pkgdir"/usr/bin
+  mv "$pkgdir/usr/lib32/llvm-config" "$pkgdir/usr/bin/llvm-config32"
+
+  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lib32-llvm-libs() {
+  pkgdesc="Low Level Virtual Machine (runtime library)(32-bit) "
+  depends=('lib32-libffi' 'lib32-zlib' 'lib32-gcc-libs')
+
+  cd "$srcdir"
+
+  install -d "$pkgdir/usr/lib32"
+  cp -P libLLVM-$pkgver.so libLLVM-${pkgver%.*}.so "$pkgdir/usr/lib32/"
+
+  install -Dm644 llvm-$pkgver.src/LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lib32-clang() {
+  pkgdesc="C language family frontend for LLVM"
+  url="http://clang.llvm.org/"
+  depends=("lib32-llvm=$pkgver-$pkgrel" 'clang' 'gcc-multilib')
+
+  cd "$srcdir/llvm-$pkgver.src/tools/clang"
+
+  make DESTDIR="$pkgdir" install
+
+  mv -v "$pkgdir"/usr/lib/* "$pkgdir"/usr/lib32/
+  rm -r "$pkgdir"/usr/{bin,include,lib,share}
+  
+  # Fix permissions of static libs
+  chmod -x "$pkgdir"/usr/lib32/*.a
+
+  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+



More information about the arch-commits mailing list