blob: b42d83c86403fea09dcc784292f8334f3bfc8d87 (
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
81
82
83
84
|
# $Id: PKGBUILD 45471 2011-04-22 05:36:00Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Ondrej Jirman <megous@megous.com>
pkgname=mingw32-gcc
pkgver=4.5.2
pkgrel=3
arch=(i686 x86_64 mips64el)
pkgdesc="A C and C++ cross-compilers for building Windows executables on Linux"
depends=(mingw32-runtime mingw32-binutils mingw32-w32api libmpc elfutils gmp)
replaces=(mingw32-gcc-base)
provides=(mingw32-gcc-base)
options=(!strip)
url="http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GCC/Version4/"
license=(GPL LGPL)
source=(gcc-$pkgver-1-mingw32-src.tar.xz::http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/gcc-$pkgver-1/gcc-$pkgver-1-mingw32-src.tar.lzma)
md5sums=('6df4174d78285ec58910f86217b8acb1')
build()
{
[ $NOEXTRACT -eq 1 ] || tar xJf gcc-$pkgver-1-mingw32-src.tar.xz
[ $NOEXTRACT -eq 1 ] || tar xjf gcc-$pkgver.tar.bz2
mkdir -p $srcdir/build
cd $srcdir/build
unset CFLAGS CXXFLAGS
chmod ugo+x $srcdir/gcc-$pkgver/configure
chmod ugo+x $srcdir/gcc-$pkgver/move-if-change
msg "gcc"
[ -f Makefile ] || $srcdir/gcc-$pkgver/configure \
--target=i486-mingw32 \
--host=$CHOST \
--build=$CHOST \
--prefix=/usr \
--enable-languages=c,c++ \
--enable-shared \
--enable-sjlj-exceptions \
--enable-hash-synchronization \
--disable-nls \
--disable-libssp
make
make install DESTDIR=$pkgdir
msg "libgcc"
make -j1 -C i486-mingw32/libgcc DESTDIR=${pkgdir} libgcc_eh.a install
msg "libstdc++"
make -j1 -C i486-mingw32/libstdc++-v3 DESTDIR=${pkgdir} install
# msg "libgomp"
# mkdir -p i486-mingw32/libgomp
# cd i486-mingw32/libgomp
# [ -f Makefile ] || $srcdir/gcc-$pkgver/configure \
# --target=i486-mingw32 \
# --host=$CHOST \
# --build=$CHOST \
# --prefix=/usr \
# --enable-languages=c,c++ \
# --enable-shared \
# --enable-sjlj-exceptions \
# --enable-hash-synchronization \
# --disable-nls \
# --disable-libssp
# make -j1 DESTDIR=$pkgdir all install
msg "fixes"
mkdir -p $pkgdir/usr/i486-mingw32/bin/
mv $pkgdir/usr/bin/*.dll $pkgdir/usr/i486-mingw32/bin/
mv $pkgdir/*.dll $pkgdir/usr/i486-mingw32/bin/
cd $pkgdir
rm -rf usr/bin/i486-mingw32-{gcov,gccbug,gcc-*} \
usr/{include,lib/libiberty.a} \
usr/share/{info,man} \
usr/share/gcc-$pkgver/python
strip usr/bin/*
strip usr/libexec/gcc/i486-mingw32/$pkgver/{cc1*,collect2}
i486-mingw32-strip -g usr/lib/gcc/i486-mingw32/$pkgver/*.a
}
|