updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / gcc34 / PKGBUILD
blobb4ab53e018bf3b4df347f50a1b8082cc6d020a7f
1 # $Id$
2 # Maintainer: Jan de Groot <jgc@archlinux.org>
3 pkgname=gcc34
4 pkgver=3.4.6
5 pkgrel=2
6 pkgdesc="The GNU Compiler Collection"
7 arch=(i686 x86_64)
8 url="http://gcc.gnu.org"
9 license=('GPL') # with exception, per fsf.org
10 depends=('libstdc++5' 'gcc-libs')
11 options=('!libtool')
12 source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 \
13         gcc-localeversion.patch
14         gcc-3.3-pure64.patch)
15 md5sums=('5324ace5145b12afd9ca867af7ec084d'
16          'ef81fd74bc9fd964120af47243a1360f'
17          'e93d6f49b254dc2879a4e181603599b0'
18          'eb834abd7620a5f11492ee2c243b8346')
20 build() {
21   if ! locale -a | grep ^de_DE; then
22     echo "You need the de_DE locale to build gcc."
23     return 1
24   fi
26   export CFLAGS="${CFLAGS/-mtune=generic/}"
27   export CXXFLAGS="${CXXFLAGS/-mtune=generic/}"
29   cd ${startdir}/src/gcc-${pkgver}
31   patch -Np0 -i ${startdir}/src/gcc-localeversion.patch || return 1
33   if [ "${CARCH}" = "x86_64" ]; then
34     patch -Np1 -i ../gcc-3.3-pure64.patch || return 1
35   fi
37   # Don't run fixincludes
38   sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
39   # Don't install libiberty
40   sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
42   mkdir ../gcc-build
43   cd ../gcc-build
44   ../gcc-${pkgver}/configure --prefix=/usr --enable-shared \
45       --enable-languages=c,c++ --enable-threads=posix \
46       --mandir=/usr/share/man --libexecdir=/usr/lib \
47       --enable-__cxa_atexit  --disable-multilib --libdir=/usr/lib \
48       --enable-clocale=gnu --program-suffix=-3.4
50   make bootstrap || return 1
51   make -j1 DESTDIR=${startdir}/pkg install || return 1
53   rm -f ${startdir}/pkg/usr/lib/lib{stdc++,supc++,gcc_s}.*
54   rm -f ${startdir}/pkg/usr/share/locale/*/LC_MESSAGES/libstdc++.mo
55   rm -rf ${startdir}/pkg/usr/share/man/man7