updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / mingw-w64-binutils-git / PKGBUILD
blobfd990af4362e681b0457690226cc365468eaea44
1 # Maintainer: rubenvb vanboxem <dottie> ruben <attie> gmail <dottie> com
2 pkgname=mingw-w64-binutils-git
3 pkgver=2.22.51
4 pkgrel=1
5 pkgdesc="Cross binutils for the MinGW-w64 cross-compiler"
6 arch=('i686' 'x86_64')
7 url="http://www.gnu.org/software/binutils"
8 license=('GPL')
9 groups=('mingw-w64')
10 depends=('zlib')
11 makedepends=('git')
12 #checkdepends=('dejagnu') # Windows executables could run on Arch through bin_mft and Wine
13 optdepends=()
14 provides=('mingw-w64-binutils')
15 conflicts=()
16 replaces=()
17 backup=()
18 options=('!libtool' '!emptydirs')
19 source=()
20 md5sums=()
22 _gitroot=git://repo.or.cz/binutils.git
23 _gitname=binutils
25 _targets="i686-w64-mingw32 x86_64-w64-mingw32"
27 build() {
28   cd "$srcdir"
29   msg "Connecting to GIT server...."
31   if [[ -d "$_gitname" ]]; then
32     cd "$_gitname" && git pull origin
33     msg "The local files are updated."
34   else
35     git clone "$_gitroot" "$_gitname"
36   fi
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 \
51         --target=${_target}\
52         --infodir=$pkgdir/usr/share/info/${_target} \
53         --enable-lto --enable-plugins \
54         --disable-multilib --disable-nls
55      make
56   done
59 package() {
60   for _target in ${_targets}; do 
61     cd ${srcdir}/${_gitname}-build-${_target}
62     make prefix=${pkgdir}/usr install
63   done