1 # Maintainer: rubenvb vanboxem <dottie> ruben <attie> gmail <dottie> com
2 pkgname=mingw-w64-binutils-git
5 pkgdesc="Cross binutils for the MinGW-w64 cross-compiler"
7 url="http://www.gnu.org/software/binutils"
12 #checkdepends=('dejagnu') # Windows executables could run on Arch through bin_mft and Wine
14 provides=('mingw-w64-binutils')
18 options=('!libtool' '!emptydirs')
22 _gitroot=git://repo.or.cz/binutils.git
25 _targets="i686-w64-mingw32 x86_64-w64-mingw32"
29 msg "Connecting to GIT server...."
31 if [[ -d "$_gitname" ]]; then
32 cd "$_gitname" && git pull origin
33 msg "The local files are updated."
35 git clone "$_gitroot" "$_gitname"
38 msg "GIT checkout done or server timeout"
39 msg "Starting build..."
41 msg "Preparing build directory"
43 cd "$srcdir/$_gitname"
44 #do not install libiberty
45 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
47 for _target in $_targets; do
48 msg "Building ${_target} cross binutils"
49 mkdir -p "$srcdir/$_gitname-build-${_target}" && cd "$srcdir/$_gitname-build-${_target}"
50 $srcdir/$_gitname/configure --prefix=/usr \
52 --infodir=$pkgdir/usr/share/info/${_target} \
53 --enable-lto --enable-plugins \
54 --disable-multilib --disable-nls
60 for _target in ${_targets}; do
61 cd ${srcdir}/${_gitname}-build-${_target}
62 make prefix=${pkgdir}/usr install