# $Id$
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

# NOTE: requires rebuilt with each new gcc version

# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
#  - noautobuild, !distcc
#  - removed multilib stuff
#  - patch for armv7h tests

noautobuild=1

pkgname=libtool
pkgver=2.4.4
pkgrel=2.1
pkgdesc="A generic library support script"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libtool"
license=('GPL')
groups=('base-devel')
depends=('sh' 'tar' 'glibc')
makedepends=('gcc')
provides=("libltdl=$pkgver")
conflicts=('libltdl')
replaces=('libltdl')
install=libtool.install
options=('!distcc')
source=(ftp://ftp.gnu.org/pub/gnu/libtool/${pkgname}-${pkgver}.tar.xz{,.sig}
        armv7h-nopic.patch)
md5sums=('51bf400de3354687d68dfa2392506b7e'
         'SKIP'
         '8a1fdc77814fa5db3fc4d6a888d0cd89')
validpgpkeys=('CFE2BE707B538E8B26757D84151308092983D606')

prepare() {
  cd ${srcdir}/${pkgbase}-${pkgver}
  patch -p1 -i ../armv7h-nopic.patch
}

build() {
  cd ${srcdir}/${pkgbase}-${pkgver}
  ./configure --prefix=/usr lt_cv_sys_lib_dlsearch_path_spec="/lib /usr/lib"
  make
}

check() {
  cd ${srcdir}/${pkgbase}-${pkgver}
  make check
}

package() {
  cd ${srcdir}/${pkgbase}-${pkgver}
  make DESTDIR=${pkgdir} install
}