ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.44
Committed: Tue May 19 09:01:04 2009 UTC (15 years, 11 months ago) by andreasp
Branch: MAIN
CVS Tags: CMSSW_3_1_6, bhFor316v0, CMSSW_3_1_5, apFor333v0_sl5igcc4, apFor333v0_sl4igcc4, apFor333v0, bhFor315v0, bhFor314v0, pe20091109a-for33X-slc4-gcc345, CMSSW_3_4_0_pre5-slc5-gcc434, CMSSW_3_4_0_pre5-slc4-gcc432, CMSSW_3_4_0_pre4-slc4-gcc432, CMSSW_3_4_0_pre5-slc4_gcc432, dl091106, CMSSW_3_3_2_FWLITE-slc5-gcc434, apFor332fwlv1, apFor332fwlv1-slc5-gcc434, apFor332fwlv0, eskFor340p4, CMSSW_3_3_2-slc5-gcc434, CMSSW_3_3_2-slc4-gcc432, CMSSW_3_3_2, apFor332v0_sl4igcc4, apFor332v0_sl5igcc4, apFor332v0, CMSSW_3_4_0_pre3, eskFor340p3, apFor331fwlv1-slc5gcc434, apFor331fwlv1, apFor331fwlv0, CMSSW_3_3_1-slc5-gcc434, CMSSW_3_3_1-slc4-gcc432, CMSSW_3_3_1, pe20091022a-ports, pe20091022a-ports5, pe20091022a-for33X, pe20091021a-ports5, pe20091021a-ports, pe20091021a-for33X, CMSSW_3_4_0_pre2-432, CMSSW_3_4_0_pre1-432, CMSSW_3_4_0_pre2, pe20091018a-ports5, ge20091019, sm340p2, CMSSW_3_2_8, ge20091015-comp-bootstrap, CMSSW_3_3_0-slc5, CMSSW_3_3_0-432, CMSSW_3_3_0, eskFor328, apFor330v0, pe20091009a-for33X, pe20091008d-ports5, pe20091008d-ports, pe20091008d-for33X, pe20091008c-ports5, ge20091008-fix-rpm-relocation, CMSSW_3_4_0_pre1, pe20091008b-ports5, pe20091008a-ports5, ge20091010-bootstrap, pe20091006e-ports5, ge20091006-bootstrap-3, pe20091006d-ports5, ge20091006-bootstrap-2, CMSSW_3_3_0_pre6-432, pe20091006c-ports5, ge20091006, pe20091006b-ports5, pe20091006a-ports5, pe20091006a-ports, pe20091006a-for33X, CMSSW_3_1_4, CMSSW_3_3_0_pre6, apFor330pre6v0, pe20090929a-ports, pe20090929a-for33X, ge20090929-amd64, ge20090929-ia32, ap20090929a-ports, ap20090929a-for33X, ap20090929-for33X, CMSSW_3_3_0_pre5-432, CMSSW_3_3_0_pre5, apFor330pre5v0, pe20090925a-ports, pe20090925a-for33X, pe20090924b-for33X, pe20090924a-ports, pe20090924a-for33X, CMSSW_3_1_3, pe20090923b-for33X, pe20090923b-ports, pe20090923a-ports, pe20090923a-for33X, pe20090922e-ports, pe20090922e-for33X, pe20090922d-ports, pe20090922c-ports, pe20090922c-for33X, pe20090922b-ports, pe20090922a-ports, pe20090922a-for33X, ge20090922-ports, CMSSW_3_2_7, pe20090921d-ports, pe20090921d-for33X, ge20090921-ports, pe20090921c-ports, pe20090921c-for33X, pe20090921b-for33X, pe20090921a-ports, CMSSW_3_3_0_pre4, apFor330pre4v0, eskFor327, pe20090918a-ports, pe20090912a-ports-xdaq, pe20090911a-ports-xdaq, CMSSW_3_3_0_pre3, apFor330pre3v0, pe20090907a-ports, pe20090907a-for33X, CMSSW_3_3_0_pre2, apFor330pre2v1, apFor330pre2v0, CMSSW_3_2_6, pe20090904a-ports, pe20090904a-for33X, pe20090903b-for33X, eskFor326, pe20090903b-ports, pe20090903a-ports, pe20090903-for33X, CMSSW_3_3_0_pre1, esk090827, pe20090827a-ports, pe20090827a-33X, pe20090826a-33X, pe20090826a-ports, CMSSW_3_2_5, smFor325v0, eskFor325, CMSSW_3_2_4_patch1, CMSSW_3_2_4, sm324p1a, CMSSW_3_2_3, apFor323v1, apFor323v0, DQMGUI_5_0_2, DQMGUI_5_0_1, DQMGUI_5_0_0, CMSSW_3_2_2_patch2, apFor322patch2v0, CMSSW_3_2_2_patch1, apFor322pa1v0, CMSSW_3_2_2, CMSSW_3_1_2, CMSSW_3_2_1-432, apFor322v0, dl090723, pe20090722b-31Xports-432, pe20090722a-31Xports-432, CMSSW_3_2_1, apFor321v0, apFor320onlv0, CMSSW_3_2_0, apFor320v1, apFor320v0, CMSSW_3_1_1_patch1, sm090716a_off, CMSSW_3_1_1_reallyThisTime, CMSSW_3_1_1, dl090707, pe20090707c-31Xports-432, pe20090707b-31Xports-432, pe20090707a-31Xports-432, pe20090706b-31Xports-432, pe20090706a-31Xports-432, CMSSW_3_1_0_patch1, pe20090701a-31Xports-432, CMSSW_3_1_0, CMSSW_3_1_0_pre11, dl090623, CMSSW_3_1_0_pre10-432, pe20090616a-31Xports-432, pe20090615a-31Xports-432, CMSSW_3_1_0_pre10, dl090611, pe20090611c-31Xports-432, pe20090611b-31Xports-432, pe20090611a-31Xports-432, pe20090610d-31Xports-432, pe20090610c-31Xports-432, pe20090610b-31Xports-432, pe20090610a-31Xports-432, pe20090604a-31Xports-432, pe20090526a-31Xports-432, pe20090525b-31Xports-432, ap20090520-osx105, ap20090519-osx105
Changes since 1.43: +12 -0 lines
Log Message:
updates for building on mac os x 10.5 (leopard)

File Contents

# Content
1 ### RPM external boost 1.38.0
2 %define boostver _%(echo %realversion | tr . _)
3 Source: http://internap.dl.sourceforge.net/sourceforge/%{n}/%{n}%{boostver}.tar.gz
4
5 Requires: boost-build python bz2lib
6 %if "%cmsplatf" == "slc4onl_ia32_gcc346"
7 %else
8 Requires: zlib
9 %endif
10
11 %prep
12 %setup -n %{n}%{boostver}
13
14 %build
15 # Note that some targets will fail to build (the test programs have
16 # missing symbols), causing darwin to fail to link and bjam to return
17 # an error. So ignore the exit code from bjam on darwin to avoid
18 # RPM falsely detecting a problem.
19 PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
20 PR="PYTHON_ROOT=$PYTHON_ROOT"
21
22 # The following line assumes a version of the form x.y.z-XXXX, where the
23 # "-XXXX" part represents some CMS rebuild of version x.y.z
24 BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
25 BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
26
27 %if "%cmsplatf" != "slc4onl_ia32_gcc346"
28 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
29 ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
30
31 case $(uname) in
32 Darwin ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
33 * ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
34 esac
35 %else
36 bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
37 %endif
38
39 %install
40 case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
41 #no debug libs...
42 #mkdir -p %i/lib/debug
43 mkdir %i/lib
44 #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
45 # Perhaps the following could be done with a wildcard for the darwin/gcc dir
46 case %cmsplatf in
47 osx*)
48 (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp {} %i/lib/. \;)
49 ;;
50 * )
51 (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp {} %i/lib/. \;)
52 ;;
53 esac
54
55 find boost -name '*.[hi]*' -print |
56 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
66 # Do all manipulation with files before creating symbolic links:
67 perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
68 #strip %i/lib/*.$so
69
70 for l in `find %i/lib -name "*.$so.*"`
71 do
72 ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
73 done
74
75 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
76
77 getLibName()
78 {
79 libname=`find %i/lib -name "libboost_$1*mt*.$so" -exec basename {} \;`
80 echo $libname | sed -e 's|[.][^-]*$||;s|^lib||'
81 }
82
83 export BOOST_THREAD_LIB=`getLibName thread`
84 export BOOST_SIGNALS_LIB=`getLibName signals`
85 export BOOST_FILESYSTEM_LIB=`getLibName filesystem`
86 export BOOST_SYSTEM_LIB=`getLibName system`
87 export BOOST_PROGRAM_OPTIONS_LIB=`getLibName program_options`
88 export BOOST_PYTHON_LIB=`getLibName python`
89 export BOOST_REGEX_LIB=`getLibName regex`
90
91 # SCRAM ToolBox toolfile
92 mkdir -p %i/etc/scram.d
93 # boost toolfile
94 cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
95 <doc type=BuildSystem::ToolDoc version=1.0>
96 <Tool name=boost version=%v>
97 <info url="http://www.boost.org"></info>
98 <lib name="@BOOST_THREAD_LIB@">
99 <lib name="@BOOST_SIGNALS_LIB@">
100 <Client>
101 <Environment name=BOOST_BASE default="%i"></Environment>
102 <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
103 <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
104 </Client>
105 <use name=sockets>
106 <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
107 <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
108 </Tool>
109 EOF_TOOLFILE
110
111 # boost_filesystem toolfile
112 cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
113 <doc type=BuildSystem::ToolDoc version=1.0>
114 <Tool name=boost_filesystem version=%v>
115 <info url="http://www.boost.org"></info>
116 <lib name="@BOOST_FILESYSTEM_LIB@">
117 <use name=boost_system>
118 <use name=boost>
119 </Tool>
120 EOF_TOOLFILE
121
122 # boost_system toolfile
123 cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_system
124 <doc type=BuildSystem::ToolDoc version=1.0>
125 <Tool name=boost_system version=%v>
126 <info url="http://www.boost.org"></info>
127 <lib name="@BOOST_SYSTEM_LIB@">
128 <use name=boost>
129 </Tool>
130 EOF_TOOLFILE
131
132 # boost_program_options toolfile
133 cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
134 <doc type=BuildSystem::ToolDoc version=1.0>
135 <Tool name=boost_program_options version=%v>
136 <info url="http://www.boost.org"></info>
137 <lib name="@BOOST_PROGRAM_OPTIONS_LIB@">
138 <use name=boost>
139 </Tool>
140 EOF_TOOLFILE
141
142 # boost_python toolfile
143 cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
144 <doc type=BuildSystem::ToolDoc version=1.0>
145 <Tool name=boost_python version=%v>
146 <info url="http://www.boost.org"></info>
147 <lib name="@BOOST_PYTHON_LIB@">
148 <Client>
149 <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
150 <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
151 <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
152 <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
153 </Client>
154 <use name=elementtree>
155 <use name=gccxml>
156 <use name=python>
157 </Tool>
158 EOF_TOOLFILE
159
160 # boost_regex toolfile
161 cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
162 <doc type=BuildSystem::ToolDoc version=1.0>
163 <Tool name=boost_regex version=%v>
164 <info url="http://www.boost.org"></info>
165 <lib name="@BOOST_REGEX_LIB@">
166 <use name=boost>
167 </Tool>
168 EOF_TOOLFILE
169
170 # boost_signals toolfile
171 cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
172 <doc type=BuildSystem::ToolDoc version=1.0>
173 <Tool name=boost_signals version=%v>
174 <info url="http://www.boost.org"></info>
175 <lib name="@BOOST_SIGNALS_LIB@">
176 <use name=boost>
177 </Tool>
178 EOF_TOOLFILE
179
180 perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*
181
182 %post
183 %{relocateConfig}etc/scram.d/boost
184 %{relocateConfig}etc/scram.d/boost_filesystem
185 %{relocateConfig}etc/scram.d/boost_program_options
186 %{relocateConfig}etc/scram.d/boost_python
187 %{relocateConfig}etc/scram.d/boost_regex
188 %{relocateConfig}etc/scram.d/boost_signals