updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / llvm-gcc / PKGBUILD
blob3cd8ee0e9e1bf01471f5734cf539691d5691905c
1 # Maintainer: Thomas Dziedzic < gostrc at gmail >
2 # Contributor: Sebastien Binet <binet@lblbox>
4 pkgname=llvm-gcc
5 pkgver=2.8
6 pkgrel=1
7 pkgdesc='Low Level Virtual Machine with the GCC front-end.'
8 arch=('i686' 'x86_64')
9 url='http://llvm.org'
10 license=('custom:University of Illinois/NCSA Open Source License')
11 depends=('llvm')
12 makedepends=('libffi' 'python' 'ocaml')
13 conflicts=('llvm-gcc-svn')
14 source=("http://llvm.org/releases/${pkgver}/llvm-${pkgver}.tgz" 
15         "http://llvm.org/releases/${pkgver}/llvm-gcc-4.2-${pkgver}.source.tgz")
16 md5sums=('220d361b4d17051ff4bb21c64abe05ba'
17          'e5b0569f5f018086c62201d87e161154')
19 build() {
20   cd llvm-${pkgver}
21   
22   # --sysconfdir to configure apparently isn't enough ...
23 #  sed -i 's:$(PROJ_prefix)/etc/llvm:/etc/llvm:' Makefile.config.in
25   ./configure \
26     --prefix=/usr \
27     --sysconfdir=/etc \
28     --enable-libffi
29   
30   
31 #  make ENABLE_OPTIMIZED=$_llvm_optimized
32 #  make ENABLE_OPTIMIZED=$_llvm_optimized DESTDIR=$pkgdir install
33   make
35   # now the llvm-gcc part...
36   LLVM_GCC_SRC=llvm-gcc-4.2-${pkgver}.source
37   LLVM_OBJ_DIR=${srcdir}/llvm-${pkgver}
38   cd $srcdir/$LLVM_GCC_SRC
39   
40   BUILDOPTIONS=LLVM_VERSION_INFO=${pkgver}
42   # Don't install libiberty
43   sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
45   # Don't run fixincludes
46 #  sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
47         
48   # For some reason this is used by default - remove it
49 #  rm GNUmakefile
51   cd ${srcdir}
53   rm -rf gcc-build
54   mkdir gcc-build
55   cd gcc-build
57   ../${LLVM_GCC_SRC}/configure \
58     --prefix=/usr \
59     --program-prefix=llvm- \
60     --enable-llvm=$LLVM_OBJ_DIR \
61     --enable-languages=c,c++ \
62     --disable-shared \
63     --disable-multilib \
64     --with-tune=generic \
65     --enable-threads=posix \
66     --enable-__cxa_atexit \
67     --libdir=/usr/lib \
68     --libexecdir=/usr/lib \
69     --enable-clocale=gnu \
70     --disable-libstdcxx-pch
72   make $BUILDOPTIONS
75 package () {
76   cd gcc-build
78   make DESTDIR=${pkgdir} install
80   rm -f ${startdir}/pkg/usr/lib/lib{stdc++,supc++,gcc_s}.*
81   #rm -f ${startdir}/pkg/usr/share/locale/*/LC_MESSAGES/libstdc++.mo
82   rm -rf ${startdir}/pkg/usr/share/locale
83   rm -rf ${startdir}/pkg/usr/man/man7