Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 27th, 2013  |  syntax: Bash  |  size: 2.37 KB  |  views: 77  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: rubenvb vanboxem <dottie> ruben <attie> gmail <dottie> com
  2. pkgname=mingw-w64-gcc
  3. pkgver=4.7.2
  4. pkgrel=1
  5. pkgdesc="Cross GCC for the MinGW-w64 cross-compiler"
  6. arch=('i686' 'x86_64')
  7. url="http://gcc.gnu.org"
  8. license=('GPL' 'LGPL' 'FDL' 'custom')
  9. groups=('mingw-w64-toolchain' 'mingw-w64')
  10. depends=('zlib' 'libmpc' 'ppl' 'cloog' 'mingw-w64-crt' 'mingw-w64-binutils' 'mingw-w64-winpthreads')
  11. makedepends=('mingw-w64-headers-bootstrap' 'gcc-ada='${pkgver})
  12. #checkdepends=('dejagnu') # Windows executables could run on Arch through bin_mft and Wine
  13. optdepends=()
  14. provides=('mingw-w64-gcc-base')
  15. conflicts=('mingw-w64-gcc-base')
  16. replaces=()
  17. backup=()
  18. options=('!strip' '!libtool' '!emptydirs' '!buildflags')
  19. source=("ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2"
  20.         'gcc-4.7.0-cloog-0.17.patch'
  21.         'texinfo_archlinux.patch')
  22. md5sums=('cc308a0891e778cfda7a151ab8a6e762'
  23.          '488f11cf9822d110dde4a12add1d6e03'
  24.          'fd8ad575187cbe3ef896c39fd6635505')
  25.  
  26. _targets="i686-w64-mingw32 x86_64-w64-mingw32"
  27.  
  28. build() {
  29.   cd ${srcdir}/gcc-${pkgver}
  30.  
  31.   #do not install libiberty
  32.   sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
  33.  
  34.   # compatibility with latest cloog
  35.   patch -Np1 -i ${srcdir}/gcc-4.7.0-cloog-0.17.patch
  36.   patch -Np1 -i ${srcdir}/texinfo_archlinux.patch
  37.  
  38.   echo ${pkgver} > gcc/BASE-VER
  39.  
  40.   for _target in ${_targets}; do
  41.     mkdir -p ${srcdir}/gcc-build-${_target} && cd ${srcdir}/gcc-build-${_target}
  42.    
  43.     ${srcdir}/gcc-${pkgver}/configure --prefix=/usr \
  44.         --target=${_target} \
  45.         --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada \
  46.         --enable-shared --enable-static \
  47.         --enable-threads=win32 --enable-fully-dynamic-string \
  48.         --with-system-zlib --with-ppl --enable-cloog-backend=isl \
  49.         --enable-lto --enable-sjlj-exceptions --enable-libgomp \
  50.         --disable-nls \
  51.         --disable-multilib --enable-checking=release
  52.     make all
  53.   done
  54. }
  55.  
  56. package() {
  57.   for _target in ${_targets}; do
  58.     cd ${srcdir}/gcc-build-${_target}
  59.     make DESTDIR=${pkgdir} install
  60.     ${_target}-strip ${pkgdir}/usr/${_target}/lib/*.dll
  61.     strip ${pkgdir}/usr/bin/${_target}-*
  62.     strip ${pkgdir}/usr/libexec/gcc/${_target}/${pkgver}/{cc1*,collect2,gnat1,f951,lto*}
  63.   done
  64.   strip ${pkgdir}/usr/bin/*
  65.   # remove unnecessary files
  66.   rm -r ${pkgdir}/usr/share
  67. }
clone this paste RAW Paste Data