ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/valgrind.spec
Revision: 1.18
Committed: Wed Dec 26 17:39:15 2007 UTC (17 years, 4 months ago) by elmer
Branch: MAIN
CVS Tags: pe20080117b-for180p7, pe20080117-for180p7, CMSSW_1_8_0_pre6, pe20071127-ports, pe20071226c-for180p6
Changes since 1.17: +1 -1 lines
Log Message:
Update to 3.3.0-CMS18a, will be included in configuration CMS_151f (along
with a glimpse update)

File Contents

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