ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/valgrind.spec
Revision: 1.16
Committed: Wed Dec 12 14:09:06 2007 UTC (17 years, 4 months ago) by elmer
Branch: MAIN
Changes since 1.15: +2 -1 lines
Log Message:
Update to version 3.3.0 (I think that both of our patches, made on 3.2.3)
are still needed and they should apply correctly via 'patch'.

File Contents

# User Rev Content
1 elmer 1.16 ### RPM external valgrind 3.3.0-CMS18
2 elmer 1.10 ## BUILDIF case $(uname):$(uname -m) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) true ;; * ) false ;; esac
3 sashby 1.7 %define realversion %(echo %v | cut -d- -f1)
4     Source: http://www.valgrind.org/downloads/%{n}-%{realversion}.tar.bz2
5 elmer 1.16 # These two patches (originally from version 3.2.3) should still work in 3.3.0
6 muzaffar 1.9 Patch1: valgrind-vg323-p2-global
7     Patch2: valgrind-vg323-p2-dump
8 sashby 1.7
9     %prep
10     %setup -n %n-%realversion
11 muzaffar 1.9 %patch1 -p0
12     %patch2 -p0
13 sashby 1.7 # CMS patch for segment sizes:
14     perl -p -i -e 's!VG_N_SEGMENTS 5000!VG_N_SEGMENTS 20000!; s!VG_N_SEGNAMES 1000!VG_N_SEGNAMES 4000!; s!VG_MAX_SEGNAMELEN 1000!VG_MAX_SEGNAMELEN 4000!' coregrind/m_aspacemgr/aspacemgr.c;
15    
16     pwd
17    
18 eulisse 1.2 %build
19     ./configure --prefix=%i
20     make %makeprocesses
21 eulisse 1.4 %install
22     make install
23     perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' $(grep -r -e "^#!.*perl.*" %i | cut -d: -f 1)
24 elmer 1.8 # I don't see how to make perl options work nicely with env, so drop the -w
25     # in these two scripts
26     perl -p -i -e 's|perl -w|perl|' %i/bin/callgrind_annotate
27     perl -p -i -e 's|perl -w|perl|' %i/bin/callgrind_control
28 muzaffar 1.14
29     # SCRAM ToolBox toolfile
30     mkdir -p %i/etc/scram.d
31     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
32     <Tool name=valgrind version=%v>
33     <Client>
34     <Environment name=VALGRIND_BASE default="%i"></Environment>
35     <Environment name=INCLUDE default="$VALGRIND_BASE/include"></Environment>
36     </Client>
37     <Runtime name=PATH value="$VALGRIND_BASE/bin" type=path>
38     <Runtime name=VALGRIND_LIB value="$VALGRIND_BASE/lib/valgrind">
39     </Tool>
40     EOF_TOOLFILE
41    
42     %post
43     %{relocateConfig}etc/scram.d/%n