PKGBUILDs/community/mingw32-gcc-base/PKGBUILD
2009-10-09 21:15:33 -05:00

65 lines
1.9 KiB
Bash

# $Id: PKGBUILD 1536 2009-08-25 13:40:09Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Ondrej Jirman <megous@megous.com>
pkgname=mingw32-gcc-base
pkgver=4.4.0
_w32apiver=3.12
_runtimever=3.16
pkgrel=1
arch=(i686 x86_64)
pkgdesc="A C cross-compiler for building Windows executables on Linux"
depends=(mingw32-binutils)
makedepends=(p7zip)
conflicts=(mingw32-gcc)
options=(!strip force)
license=(GPL LGPL)
url="http://mingw.sf.net"
source=(http://downloads.sourceforge.net/project/mingw/GCC%20Version%204/Current%20Release_%20gcc-$pkgver/gcc-$pkgver-src.tar.bz2
http://switch.dl.sf.net/sourceforge/mingw/w32api-${_w32apiver}-mingw32-src.tar.gz
http://switch.dl.sf.net/sourceforge/mingw/mingwrt-${_runtimever}-mingw32-src.tar.gz)
md5sums=('cf5d787bee57f38168b74d65a7c0e6fd'
'8bdf1dd20e13bba8a0f81a422f8f3757'
'd56a0712cd4c70a46c27fc20b92ea2c3')
build()
{
# prepare headers
mkdir -p $srcdir/include/
cp -r $srcdir/w32api-${_w32apiver}-mingw32/include/* \
$srcdir/mingwrt-${_runtimever}-mingw32/include/* \
$srcdir/include/
unset CFLAGS CXXFLAGS
mkdir -p $srcdir/build
cd $srcdir/build
chmod ugo+x $srcdir/gcc-$pkgver/configure
chmod ugo+x $srcdir/gcc-$pkgver/move-if-change
$srcdir/gcc-$pkgver/configure \
--target=i486-mingw32 \
--host=$CHOST \
--build=$CHOST \
--prefix=/usr \
--enable-languages=c \
--enable-sjlj-exceptions \
--enable-hash-synchronization \
--disable-nls \
--disable-shared \
--disable-libssp \
--disable-libgomp \
--with-headers=$srcdir/include \
|| return 1
make || return 1
make install DESTDIR=$pkgdir || return 1
cd $pkgdir
rm -rf usr/bin/i486-mingw32-{gcov,gccbug,gcc-*} \
usr/{include,info,man,lib/libiberty.a} usr/i486-mingw32
strip usr/bin/*
strip usr/libexec/gcc/i486-mingw32/$pkgver/{cc1*,collect2}
i486-mingw32-strip -g usr/lib/gcc/i486-mingw32/$pkgver/*.a
}