archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libstdc++5 / repos / extra-x86_64 / PKGBUILD
blobe5ac39fd803d0697bf2a91d92cb431a3af97397c
1 # Maintainer: Jan de Groot <jgc@archlinux.org>
3 pkgname=libstdc++5
4 pkgver=3.3.6
5 pkgrel=7
6 pkgdesc="GNU Standard C++ library version 3"
7 arch=('x86_64')
8 url="https://gcc.gnu.org"
9 license=('GPL' 'LGPL')
10 depends=('gcc-libs')
11 makedepends=('binutils' 'gcc')
12 options=('!makeflags')
13 source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2
14         gcc-3.4.3-no_multilib_amd64.patch
15         gcc-3.4.6-ucontext.patch
16         siginfo.patch)
17 md5sums=('18c52e6fb8966b7700665dca289d077f'
18          '6b3d00b8d079805be1b895f7f6ce47a0'
19          '8504bb22dae9d49e8b6d70d7e6910f1b'
20          '982ec78eed2887657189aefbe0c642d0'
21          'bf36b281a9fc81f624f31f2623a3ad0e')
23 prepare() {
24   cd gcc-$pkgver
26   patch -Np1 -i $srcdir/gcc-3.4.3-no_multilib_amd64.patch
27   patch -Np1 -i $srcdir/gcc-3.4.6-ucontext.patch
28   
29   # fix build issue with recent gcc
30   sed -i "s#O_CREAT#O_CREAT, 0666#" gcc/collect2.c
32   # No fixincludes
33   sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
35   patch -Np0 -i ../siginfo.patch
37   mkdir ../gcc-build
40 build(){
41   export CFLAGS="-march=${CARCH/_/-} -O2"
42   export CXXFLAGS="-march=${CARCH/_/-} -O2"
43   unset CPPFLAGS
45   cd gcc-build
46   CPP=/usr/bin/cpp ../gcc-${pkgver}/configure --prefix=/usr --enable-shared \
47       --enable-languages=c++ --enable-threads=posix --enable-__cxa_atexit \
48       --disable-multilib --libdir=/usr/lib
49   make all-target-libstdc++-v3 BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O"
52 package() {
53   cd ${srcdir}/gcc-build
54   make DESTDIR=${pkgdir} install-target-libstdc++-v3
56   # Remove includefiles and libs provided by gcc
57   rm -rf ${pkgdir}/usr/{include,share/locale}
58   rm -f ${pkgdir}/usr/lib/*.a
59   rm -f ${pkgdir}/usr/lib/libstdc++.so