ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.36
Committed: Mon Apr 14 03:40:16 2008 UTC (17 years ago) by ratnik
Branch: MAIN
CVS Tags: zx20080509, pe20080508-testcvs, dl080505, CMSSW_2_0_4_ONLINE1, dl080425_for21x, nr080425for204onl1, CMSSW_2_0_0_ONLINE2, nrnr080424for200onl2, CMSSW_2_0_3_ONLINE1, nr080421for203onl, CMSSW_2_0_0_ONLINE1, nr080413
Changes since 1.35: +1 -1 lines
Log Message:
Updated for CMSSW_2_0_0_ONLINE1 build

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     %if "%{?online_release:set}" != "set"
7     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     %if "%{?online_release:set}" != "set"
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 dlange 1.34 linkgccver=%(echo %gccver | cut -d. -f1,2 | sed -e 's/\.//')
40 eulisse 1.6 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
41 argiro 1.1 case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
42 dlange 1.20 #no debug libs...
43     #mkdir -p %i/lib/debug
44     mkdir %i/lib
45     #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
46 elmer 1.33 # Perhaps the following could be done with a wildcard for the darwin/gcc dir
47     case $(uname) in
48     Darwin )
49     (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp {} %i/lib/. \;)
50     ;;
51     * )
52     (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp {} %i/lib/. \;)
53     ;;
54     esac
55 eulisse 1.7 find boost -name '*.[hi]*' -print |
56 argiro 1.1 while read f; do
57     mkdir -p %i/include/$(dirname $f)
58     install -c $f %i/include/$f
59     done
60     find libs -name '*.py' -print |
61     while read f; do
62     mkdir -p %i/lib/$(dirname $f)
63     install -c $f %i/lib/$f
64     done
65     [ $(uname) = Darwin ] &&
66 elmer 1.33 for f in %i/lib/*.$so %i/lib/*.$so; do
67 argiro 1.1 install_name_tool -id $f $f
68     done
69 eulisse 1.6
70 ratnik 1.19 # Do all manipulation with files before creating symbolic links:
71     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
72 elmer 1.33 #strip %i/lib/*.$so
73 ratnik 1.19
74 ratnik 1.31
75     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
76     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
77     (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/.%{realversion}$//"); done)
78     (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)
79 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)
80 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)
81     #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
82 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
83 ratnik 1.16
84 muzaffar 1.21 # SCRAM ToolBox toolfile
85     mkdir -p %i/etc/scram.d
86     # boost toolfile
87     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
88     <doc type=BuildSystem::ToolDoc version=1.0>
89     <Tool name=boost version=%v>
90     <info url="http://www.boost.org"></info>
91     <lib name=boost_thread-gcc-mt>
92     <lib name=boost_signals-gcc-mt>
93     <Client>
94     <Environment name=BOOST_BASE default="%i"></Environment>
95     <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
96     <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
97     </Client>
98     <use name=sockets>
99 dlange 1.22 <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
100     <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
101 muzaffar 1.21 </Tool>
102     EOF_TOOLFILE
103    
104     # boost_filesystem toolfile
105     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
106     <doc type=BuildSystem::ToolDoc version=1.0>
107     <Tool name=boost_filesystem version=%v>
108     <info url="http://www.boost.org"></info>
109     <lib name=boost_filesystem-gcc-mt>
110     <use name=boost>
111     </Tool>
112     EOF_TOOLFILE
113    
114     # boost_program_options toolfile
115     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
116     <doc type=BuildSystem::ToolDoc version=1.0>
117     <Tool name=boost_program_options version=%v>
118     <info url="http://www.boost.org"></info>
119     <lib name=boost_program_options-gcc-mt>
120     <use name=boost>
121     </Tool>
122     EOF_TOOLFILE
123    
124     # boost_python toolfile
125     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
126     <doc type=BuildSystem::ToolDoc version=1.0>
127     <Tool name=boost_python version=%v>
128     <info url="http://www.boost.org"></info>
129     <lib name=boost_python-gcc-mt>
130     <Client>
131     <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
132     <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
133     <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
134     <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
135     </Client>
136     <use name=elementtree>
137     <use name=gccxml>
138     <use name=python>
139     </Tool>
140     EOF_TOOLFILE
141    
142     # boost_regex toolfile
143     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
144     <doc type=BuildSystem::ToolDoc version=1.0>
145     <Tool name=boost_regex version=%v>
146     <info url="http://www.boost.org"></info>
147     <lib name=boost_regex-gcc-mt>
148     <use name=boost>
149     </Tool>
150     EOF_TOOLFILE
151    
152     # boost_signals toolfile
153     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
154     <doc type=BuildSystem::ToolDoc version=1.0>
155     <Tool name=boost_signals version=%v>
156     <info url="http://www.boost.org"></info>
157     <lib name=boost_signals-gcc-mt>
158     <use name=boost>
159     </Tool>
160     EOF_TOOLFILE
161    
162     %post
163     %{relocateConfig}etc/scram.d/boost
164     %{relocateConfig}etc/scram.d/boost_filesystem
165     %{relocateConfig}etc/scram.d/boost_program_options
166     %{relocateConfig}etc/scram.d/boost_python
167     %{relocateConfig}etc/scram.d/boost_regex
168     %{relocateConfig}etc/scram.d/boost_signals