updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / gcc43 / PKGBUILD
blob63900ef8f5f5f5962ee868cd3e1bf8d67fd7ef20
1 # Maintainer: Carson Reynolds <carson@k2.t.u-tokyo.ac.jp>
3 pkgname=gcc43
4 _ver=4.3
5 pkgver=4.3.4
6 pkgrel=3
7 pkgdesc="The GNU Compiler Collection"
8 arch=('i686' 'x86_64')
9 license=('GPL' 'LGPL')
10 url="http://gcc.gnu.org"
11 depends=('glibc' 'gmp' 'mpfr')
12 makedepends=('flex' 'bison')
13 options=('!libtool')
15 source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc,java}-${pkgver}.tar.bz2
16         gcc_pure64.patch
17         gcc-hash-style-both.patch
18         buildfix_new_bison.patch)
20 md5sums=('575b3220bb8e7060939c429fc8608d22'
21          'd526e34eec101b8c69254ed5215b6d41'
22          '3e702a563d97bb2806dd81739c22806d'
23          '37ba6440062ddf9bab43e6ae660c890b'
24          'dd41be44634d39d145cdb715cde39be6'
25          '4030ee1c08dd1e843c0225b772360e76'
26          'bb420bc84b1104455b7230b1cd4b96c2'
27          '6895f128e905bfcb26e328899235e553')
29 build() {
30   cd ${srcdir}/gcc-${pkgver}
31   # Don't install libiberty
32   sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
34   if [ "${CARCH}" = "x86_64" ]; then
35     patch -Np1 -i ../gcc_pure64.patch || return 1
36   fi
37   patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch || return 1
38   patch -Np0 -i ${srcdir}/buildfix_new_bison.patch || return 1
40   echo ${pkgver} > gcc/BASE-VER
42   # Don't run fixincludes
43   sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
45   mkdir build
46   cd build
47   ../configure --prefix=/usr --enable-shared \
48       --enable-languages=c,c++ \
49       --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info \
50       --enable-__cxa_atexit  --disable-multilib --libdir=/usr/lib \
51       --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch \
52       --with-tune=generic \
53       --disable-werror --enable-checking=release \
54       --program-suffix=-${_ver} --enable-version-specific-runtime-libs
55   make || return 1
56   make -j1 DESTDIR=${pkgdir} install || return 1
58   # Lazy way of dealing with conflicting man and info pages...
59   rm -rf ${pkgdir}/usr/share
61   # Create links for gcc-4.3 build environment (useful for CUDA)
62   mkdir -p $pkgdir/opt/gcc-4.3
63   ln -s /usr/bin/gcc-4.3 $pkgdir/opt/gcc-4.3/gcc
64   ln -s /usr/bin/g++-4.3 $pkgdir/opt/gcc-4.3/g++