added extra/valgrind

This commit is contained in:
Kevin Mihelich 2012-06-06 16:28:35 -04:00
parent 5dd1831b32
commit db71e7cae9
3 changed files with 116 additions and 0 deletions

47
extra/valgrind/PKGBUILD Normal file
View file

@ -0,0 +1,47 @@
# $Id: PKGBUILD 145920 2012-01-04 01:26:04Z allan $
# Maintainer: Dan McGee <dan@archlinux.org>
# Maintainer: Allan McRae <allan@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to fix building on armv5
pkgname=valgrind
pkgver=3.7.0
pkgrel=2.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.15' 'glibc<2.16' 'perl')
makedepends=('gdb')
options=('!emptydirs')
source=(http://valgrind.org/downloads/${pkgname}-${pkgver}.tar.bz2
valgrind-3.7.0-glibc-2.15.patch
alarm.patch)
md5sums=('a855fda56edf05614f099dca316d1775'
'f534b79b358cdced0319b375aafde4d5')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -Np1 -i ${srcdir}/valgrind-3.7.0-glibc-2.15.patch
[ "${CARCH}" = "arm" ] && patch -Np1 -i ${srcdir}/alarm.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
}
md5sums=('a855fda56edf05614f099dca316d1775'
'f534b79b358cdced0319b375aafde4d5'
'7bf89df97efe2ab34efcc8ee8e33ddd7')
md5sums=('a855fda56edf05614f099dca316d1775'
'f534b79b358cdced0319b375aafde4d5'
'09895dece4b831ceb80285c2175ae937')

View file

@ -0,0 +1,39 @@
--- valgrind.orig/configure
+++ valgrind/configure
@@ -5279,7 +5279,7 @@
ARCH_MAX="s390x"
;;
- armv7*)
+ arm*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${host_cpu})" >&5
$as_echo "ok (${host_cpu})" >&6; }
ARCH_MAX="arm"
Description: Make valgrind believe it's cross compiled so that it builds on armel
Origin: vendor
Author: Pierre Habouzit <madcoder@debian.org>
Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
Last-Update: 2012-05-10
--- valgrind.orig/configure
+++ valgrind/configure
@@ -5133,7 +5133,7 @@
| head -n 1 \
| $SED 's/i686-apple-darwin10//' \
| $SED 's/i686-apple-darwin11//' \
- | $SED 's/^[^0-9]*\([0-9.]*\).*$/\1/'`
+ | $SED 's/^[^ ]* [^0-9]*\([0-9.]*\).*$/\1/'`
is_clang="notclang"
if test "x`${CC} --version | head -n 1 | $SED 's/\(clang\) version.*/\1/'`" = "xclang" ; then
--- valgrind.orig/configure.in
+++ valgrind/configure.in
@@ -109,7 +109,7 @@
| head -n 1 \
| $SED 's/i686-apple-darwin10//' \
| $SED 's/i686-apple-darwin11//' \
- | $SED 's/^[^0-9]*\([0-9.]*\).*$/\1/'`]
+ | $SED 's/^[^ ]* [^0-9]*\([0-9.]*\).*$/\1/'`]
is_clang="notclang"
if test "x`${CC} --version | head -n 1 | $SED 's/\(clang\) version.*/\1/'`" = "xclang" ; then

View file

@ -0,0 +1,30 @@
diff -Naur valgrind-3.7.0-orig/configure valgrind-3.7.0/configure
--- valgrind-3.7.0-orig/configure 2011-11-05 21:24:39.000000000 +1000
+++ valgrind-3.7.0/configure 2011-12-27 15:43:54.832120449 +1000
@@ -6402,6 +6402,17 @@
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.15)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.15 family" >&5
+$as_echo "2.15 family" >&6; }
+
+$as_echo "#define GLIBC_2_15 1" >>confdefs.h
+
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
+
darwin)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
$as_echo "Darwin" >&6; }
@@ -6422,7 +6433,7 @@
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
$as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
- as_fn_error "Valgrind requires glibc version 2.2 - 2.14" "$LINENO" 5
+ as_fn_error "Valgrind requires glibc version 2.2 - 2.15" "$LINENO" 5
as_fn_error "or Darwin libc" "$LINENO" 5
;;
esac