ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.37
Committed: Tue May 13 17:07:02 2008 UTC (16 years, 11 months ago) by ratnik
Branch: MAIN
CVS Tags: MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, T0Mon_100518_1, T0Mon_100503_1, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, T0Mon_100216_1, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, T0Mon_100127_1, T0Mon_091111_1, T0Mon_090828_1, T0Mon_090822_1, T0Mon_090715_1, T0Mon_090612_1, T0Mon_090611_1, T0Mon_090610_1, T0Mon_090601_1, T0Mon_090527_2, T0Mon_090527_1, T0Mon_090522_1, T0Mon_090519_2, T0Mon_090519_1, T0Mon_090517_1, T0Mon_090516_1, T0Mon_090515_4, T0Mon_090515_3, T0Mon_090515_2, T0Mon_090515_1, T0Mon_090510_1, T0Mon_090406_1, T0Mon_090326_1, T0Mon_090325_1, CMSSW_2_2_6_HLT_ONLINE1, nr090319_for226hltonl1, CMSSW_2_2_6_HLT_ONLINE, T0Mon_090318_1, T0Mon_090315_1, CMSSW_2_2_6_onlpatch1_ONLINE, CMSSW_2_2_6_ONLINE, nr090307for226_onlpatch1, nr090306onl226_tkonlsw_too_new, T0Mon_090303_1, testofc, T0Mon_081107_1, T0Mon_081105_1, PRODAGENT_0_12_2, CMSSW_2_1_9_ONLINE, T0Mon_080926_1, T0Mon_080920_2, T0Mon_080920_1, T0Mon_080916_2, T0Mon_080905_1, T0Mon_080905_01, T0Mon_080902_2, T0Mon_080902_1, T0Mon_080824_1, T0Mon_080823_1, CMSSW_2_1_4_ONLINE1, buildset_V2_8, CMSSW_2_1_1_ONLINE1, CMSSW_2_1_0_ONLINE1, nr080806_for210onl, CMSSW_2_0_10_ONLINE1, nr080714_forCRAB, nr080624_for21x, nr080623_for21x, CMSSW_2_0_8_ONLINE1-cms2, CMSSW_2_0_8_ONLINE1, SiteDB_030608_1, SiteDB_300508_1, nr080529_onl_cmsBuild, nr080528_onl_cmsBuild, SiteDB_280508_1
Changes since 1.36: +5 -3 lines
Log Message:
Changes for building online release with cmsBuild:
 * fixed linkgccver: work around inconsistent format for gccver in
   cmsBuild.
 * checking online_release flag is replaced by check if cmsplatf is
   "slc4onl_ia32_gcc346".

File Contents

# User Rev Content
1 ratnik 1.36 ### RPM external boost 1.34.1-CMS21
2 elmer 1.17 %define boostver _%(echo %realversion | tr . _)
3 ratnik 1.31 Source: http://internap.dl.sourceforge.net/sourceforge/%{n}/%{n}%{boostver}.tar.gz
4 argiro 1.1
5 ratnik 1.25 Requires: boost-build python bz2lib
6 ratnik 1.37 %if "%cmsplatf" != "slc4onl_ia32_gcc346"
7 ratnik 1.25 Requires: zlib
8     %endif
9    
10 argiro 1.1 %prep
11     %setup -n %{n}%{boostver}
12    
13     %build
14     # Note that some targets will fail to build (the test programs have
15     # missing symbols), causing darwin to fail to link and bjam to return
16     # an error. So ignore the exit code from bjam on darwin to avoid
17     # RPM falsely detecting a problem.
18 ratnik 1.25 PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
19 argiro 1.1 PR="PYTHON_ROOT=$PYTHON_ROOT"
20 ratnik 1.25
21 elmer 1.17 # The following line assumes a version of the form x.y.z-XXXX, where the
22     # "-XXXX" part represents some CMS rebuild of version x.y.z
23     BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
24 ratnik 1.25 BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
25    
26 ratnik 1.37 %if "%cmsplatf" != "slc4onl_ia32_gcc346"
27 eulisse 1.8 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
28     ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
29    
30 argiro 1.1 case $(uname) in
31 elmer 1.33 Darwin ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
32 dlange 1.22 * ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
33 argiro 1.1 esac
34 ratnik 1.25 %else
35     bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
36     %endif
37 argiro 1.1
38     %install
39 ratnik 1.37
40     linkgccver=%(echo %gccver | tr -d . | perl -pe 's/^(\d\d).*/$1/')
41    
42 eulisse 1.6 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
43 argiro 1.1 case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
44 dlange 1.20 #no debug libs...
45     #mkdir -p %i/lib/debug
46     mkdir %i/lib
47     #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
48 elmer 1.33 # Perhaps the following could be done with a wildcard for the darwin/gcc dir
49     case $(uname) in
50     Darwin )
51     (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp {} %i/lib/. \;)
52     ;;
53     * )
54     (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp {} %i/lib/. \;)
55     ;;
56     esac
57 eulisse 1.7 find boost -name '*.[hi]*' -print |
58 argiro 1.1 while read f; do
59     mkdir -p %i/include/$(dirname $f)
60     install -c $f %i/include/$f
61     done
62     find libs -name '*.py' -print |
63     while read f; do
64     mkdir -p %i/lib/$(dirname $f)
65     install -c $f %i/lib/$f
66     done
67     [ $(uname) = Darwin ] &&
68 elmer 1.33 for f in %i/lib/*.$so %i/lib/*.$so; do
69 argiro 1.1 install_name_tool -id $f $f
70     done
71 eulisse 1.6
72 ratnik 1.19 # Do all manipulation with files before creating symbolic links:
73     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
74 elmer 1.33 #strip %i/lib/*.$so
75 ratnik 1.19
76 ratnik 1.31
77     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
78     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
79     (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/.%{realversion}$//"); done)
80     (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/-$boost_abi//" | sed "s/.%{realversion}$//"); done)
81 dlange 1.34 (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/-$boost_abi//" | sed "s/.%{realversion}$//" | sed "s/gcc$linkgccver/gcc/"); done)
82 dlange 1.20 #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
83     #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
84 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
85 ratnik 1.16
86 muzaffar 1.21 # SCRAM ToolBox toolfile
87     mkdir -p %i/etc/scram.d
88     # boost toolfile
89     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
90     <doc type=BuildSystem::ToolDoc version=1.0>
91     <Tool name=boost version=%v>
92     <info url="http://www.boost.org"></info>
93     <lib name=boost_thread-gcc-mt>
94     <lib name=boost_signals-gcc-mt>
95     <Client>
96     <Environment name=BOOST_BASE default="%i"></Environment>
97     <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
98     <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
99     </Client>
100     <use name=sockets>
101 dlange 1.22 <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
102     <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
103 muzaffar 1.21 </Tool>
104     EOF_TOOLFILE
105    
106     # boost_filesystem toolfile
107     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
108     <doc type=BuildSystem::ToolDoc version=1.0>
109     <Tool name=boost_filesystem version=%v>
110     <info url="http://www.boost.org"></info>
111     <lib name=boost_filesystem-gcc-mt>
112     <use name=boost>
113     </Tool>
114     EOF_TOOLFILE
115    
116     # boost_program_options toolfile
117     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
118     <doc type=BuildSystem::ToolDoc version=1.0>
119     <Tool name=boost_program_options version=%v>
120     <info url="http://www.boost.org"></info>
121     <lib name=boost_program_options-gcc-mt>
122     <use name=boost>
123     </Tool>
124     EOF_TOOLFILE
125    
126     # boost_python toolfile
127     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
128     <doc type=BuildSystem::ToolDoc version=1.0>
129     <Tool name=boost_python version=%v>
130     <info url="http://www.boost.org"></info>
131     <lib name=boost_python-gcc-mt>
132     <Client>
133     <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
134     <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
135     <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
136     <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
137     </Client>
138     <use name=elementtree>
139     <use name=gccxml>
140     <use name=python>
141     </Tool>
142     EOF_TOOLFILE
143    
144     # boost_regex toolfile
145     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
146     <doc type=BuildSystem::ToolDoc version=1.0>
147     <Tool name=boost_regex version=%v>
148     <info url="http://www.boost.org"></info>
149     <lib name=boost_regex-gcc-mt>
150     <use name=boost>
151     </Tool>
152     EOF_TOOLFILE
153    
154     # boost_signals toolfile
155     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
156     <doc type=BuildSystem::ToolDoc version=1.0>
157     <Tool name=boost_signals version=%v>
158     <info url="http://www.boost.org"></info>
159     <lib name=boost_signals-gcc-mt>
160     <use name=boost>
161     </Tool>
162     EOF_TOOLFILE
163    
164     %post
165     %{relocateConfig}etc/scram.d/boost
166     %{relocateConfig}etc/scram.d/boost_filesystem
167     %{relocateConfig}etc/scram.d/boost_program_options
168     %{relocateConfig}etc/scram.d/boost_python
169     %{relocateConfig}etc/scram.d/boost_regex
170     %{relocateConfig}etc/scram.d/boost_signals