updated on Wed Jan 11 20:01:35 UTC 2012
[aur-mirror.git] / gcc-snapshot / PKGBUILD
blobaef5ce2be4a13597384452d7705e4f3197c75d9b
1 # Maintainer: Allan McRae <allan@archlinux.org>
3 pkgname=gcc-snapshot
4 _ver=4.7
5 _snapshot=20111112 
6 pkgver=${_ver}.${_snapshot}
7 pkgrel=1
8 pkgdesc="The GNU Compiler Collection developmental snapshot"
9 arch=('i686' 'x86_64')
10 license=('GPL3' 'LGPL' 'custom')
11 url="http://gcc.gnu.org"
12 depends=('glibc' 'binutils' 'gmp' 'mpfr' 'libmpc' 'ppl' 'isl' 'cloog')
13 makedepends=('flex' 'bison')
14 options=('!libtool')
15 source=(ftp://gcc.gnu.org/pub/gcc/snapshots/${_ver}-${_snapshot}/gcc-${_ver}-${_snapshot}.tar.bz2
16         gcc_pure64.patch)
17 md5sums=('05789643db88f8e037958b6b313f89fb'
18          'ced48436c1b3c981d721a829f1094de1')
20 build()
22   # add ada,fortran,go,objc,obj-c++ as wanted
23   # additional languages not tested... leave a comment about conflicts
24   _languages="c,c++,lto"
26   cd ${srcdir}/gcc-${_ver}-${_snapshot}
28   # Do not install libiberty
29   sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
31   # Do not run fixincludes
32   sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
34   if [ "${CARCH}" = "x86_64" ]; then
35     patch -Np1 -i ${srcdir}/gcc_pure64.patch
36   fi
38   cd ${srcdir}
39   mkdir gcc-build && cd gcc-build
41   ${srcdir}/gcc-${_ver}-${_snapshot}/configure --prefix=/usr \
42       --libdir=/usr/lib --libexecdir=/usr/lib \
43       --mandir=/usr/share/man --infodir=/usr/share/info \
44       --datadir=/usr/share/gcc-${_ver} \
45       --with-bugurl=http://aur.archlinux.org/packages.php?ID=16045 \
46       --enable-languages=${_languages} \
47       --enable-shared --enable-threads=posix \
48       --with-system-zlib --enable-__cxa_atexit \
49       --disable-libunwind-exceptions --enable-clocale=gnu \
50       --enable-gnu-unique-object --enable-linker-build-id \
51       --with-ppl --enable-cloog-backend=isl \
52       --enable-lto --enable-gold --enable-ld=default \
53       --enable-plugin --with-plugin-ld=ld.gold \
54       --with-linker-hash-style=gnu \
55       --disable-multilib --disable-libssp --disable-libstdcxx-pch \
56       --enable-checking=release --disable-werror \
57       --program-suffix=-${_ver} --enable-version-specific-runtime-libs
59   make
62 package()
64   cd ${srcdir}/gcc-build
66   make -j1 DESTDIR=${pkgdir} install
68   # deal with conflicting man and info pages
69   rm ${pkgdir}/usr/share/man/man7/{fsf-funding,gfdl,gpl}.7
70   for i in $pkgdir/usr/share/info/*; do
71     mv $i ${i//.info}-${_ver}.info
72   done
74   install -Dm644 ${srcdir}/gcc-${_ver}-${_snapshot}/COPYING.RUNTIME \
75     ${pkgdir}/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION