# $Id: PKGBUILD 53597 2009-10-02 22:21:43Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgname=apr
pkgver=1.3.9
pkgrel=1
pkgdesc="The Apache Portable Runtime"
arch=('i686' 'x86_64')
url="http://apr.apache.org/"
depends=('util-linux-ng>=2.16')
options=('!libtool')
license=('APACHE')
source=("http://www.apache.org/dist/apr/apr-${pkgver}.tar.bz2")
md5sums=('7138ac64d4458eeeaa9b9aefa4e6e51b')

build() {
  cd "${srcdir}/apr-${pkgver}"
  export apr_cv_epoll_create1=no
  export apr_cv_dup3=no
  export apr_cv_accept4=no
  export apr_cv_sock_cloexec=no

  ./configure --prefix=/usr --includedir=/usr/include/apr-1 \
    --with-installbuilddir=/usr/share/apr-1/build \
    --enable-nonportable-atomics \
    --with-devrandom=/dev/urandom || return 1
  make || return 1
  make DESTDIR="${pkgdir}" install || return 1
}
