summaryrefslogtreecommitdiff
path: root/extra/valgrind/PKGBUILD
blob: 0772fc3e44b83831f489d96d8f1bc11de66ecf67 (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
# $Id: PKGBUILD 110184 2011-02-17 12:26:47Z allan $
# Maintainer: Dan McGee <dan@archlinux.org>
# Maintainer: Allan McRae <allan@archlinux.org>

pkgname=valgrind
pkgver=3.6.1
pkgrel=1
pkgdesc="A tool to help find memory-management problems in programs"
arch=('i686' 'x86_64')
license=('GPL')
url="http://valgrind.org/"
depends=('glibc>=2.13' 'glibc<2.14' 'perl')
makedepends=('gdb')
options=('!emptydirs')
source=(http://valgrind.org/downloads/${pkgname}-${pkgver}.tar.bz2
        glibc-patch-version.patch)    
md5sums=('2c3aa122498baecc9d69194057ca88f5'
         'b657f0ebdde3d9aefc9fd16f9e653702')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  # make sure our CFLAGS are respected
  sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.in

  # prevent need to rebuild with glibc patch level version bumps
  patch -Np1 -i ${srcdir}/glibc-patch-version.patch

  if [ "${CARCH}" = "x86_64" ]; then
    ./configure --prefix=/usr --mandir=/usr/share/man --enable-only64bit
  else
    ./configure --prefix=/usr --mandir=/usr/share/man
  fi
  make
}

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