blob: 94d509968512234307713fbf5881b8769a2a4e74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# $Id: PKGBUILD 59028 2011-11-20 20:24:08Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Ondrej Jirman <megous@megous.com>
pkgname=mingw32-gcc-base
pkgver=4.6.1
_w32apiver=3.17
_runtimever=3.20
_uprel=2
_upw32rel=1
pkgrel=2
arch=(i686 x86_64)
pkgdesc="A C cross-compiler for building Windows executables on Linux"
depends=(mingw32-binutils)
makedepends=(p7zip mingw32-runtime mingw32-w32api)
conflicts=(mingw32-gcc)
options=(!strip)
license=(GPL LGPL)
url="http://mingw.sf.net"
source=(gcc-$pkgver-${_uprel}-mingw32-src.tar.lzma::http://downloads.sourceforge.net/project/mingw/MinGW/Base/gcc/Version4/gcc-$pkgver-${_uprel}/gcc-$pkgver-${_uprel}-mingw32-src.tar.lzma
http://downloads.sourceforge.net/project/mingw/MinGW/Base/w32api/w32api-${_w32apiver}/w32api-${_w32apiver}-${_upw32rel}-mingw32-src.tar.lzma
http://downloads.sourceforge.net/project/mingw/MinGW/Base/mingw-rt/mingwrt-${_runtimever}/mingwrt-${_runtimever}-mingw32-src.tar.gz
gcc-1-mingw-float.patch)
md5sums=('f8b09b7e51223e1ae1c1e466af3ac82e'
'89e5800096aa334009f98e7c1743d825'
'26c0886cc60729b94956cc6d81cd076c'
'2407123c35c0aa92ee5ffc27decca9a7')
build()
{
if [ $NOEXTRACT -ne 1 ]; then
# prepare headers
mkdir -p $srcdir/mingw/include/
cp -r $srcdir/w32api-${_w32apiver}-${_upw32rel}-mingw32/include/* \
$srcdir/mingwrt-${_runtimever}-mingw32/include/* \
$srcdir/mingw/include/
unset CFLAGS CXXFLAGS
# tar xJf gcc-$pkgver-${_uprel}-mingw32-src.tar.xz
cd $srcdir
tar xjf gcc-$pkgver-${_uprel}-mingw32-src/gcc-$pkgver.tar.bz2
patch -d $srcdir/gcc-$pkgver -Np1 < $srcdir/gcc-1-mingw-float.patch
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-build-sysroot=$srcdir \
--with-headers=$srcdir/include
else
cd $srcdir/build
fi
make
make install DESTDIR=$pkgdir
cd $pkgdir
rm -rf usr/bin/i486-mingw32-{gcov,gccbug,gcc-*} \
usr/{include,lib/libiberty.a} usr/i486-mingw32 \
usr/share/{info,man} 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
}
|