ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.22
Committed: Sun Sep 16 20:30:06 2007 UTC (17 years, 7 months ago) by dlange
Branch: MAIN
CVS Tags: CMSSW_1_7_0_pre5, dl070926t2, dl070926, ap-20070926, CMSSW_1_7_0_pre4, dl070921t2, dl070921, dl070920
Changes since 1.21: +5 -3 lines
Log Message:
add fwlite envvars to boost and clhep specs. Also add -jN option to boost using usual makeprocesses option

File Contents

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