ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.29
Committed: Sun Nov 4 05:49:37 2007 UTC (17 years, 5 months ago) by elmer
Branch: MAIN
CVS Tags: CMSSW_1_8_4, pe20080405-for184, CMSSW_1_8_3, pe20080326-for183, pe20080325-for183, CMSSW_1_8_2, pe20080324-for182, nr080320a, CMSSW_1_8_1, pe20080314-for181, CMSSW_1_8_0, pe20080304a-for180, pe20080303a-for18X, CMSSW_1_8_0_pre10, pe20080226-for180p10, pe20080220a-for18X, CMSSW_1_8_0_pre9, nr080215g491p01dbg, CMSSW_2_0_0_pre1, CMSSW_1_8_0_pre8, dl080202, pe20080126-for180p8, CMSSW_1_8_0_pre7, pe20080122a-for180p7, pe20080120a-for180p7, pe20080117b-for180p7, pe20080117-for180p7, CMSSW_1_8_0_pre6, NR080108_geant491-dbg-global, sm20080101a-newscram, pe20071127-ports, pe20071226c-for180p6, pe20071226b-for180p6, pe20071226a-for180p6, ge20071224, ge20071223, ge20071221, pe20071220b-for180p6, ge20071220, pe20071220-for180p6, ge20071217, CMSSW_1_8_0_pre5, pe20071216-for180p5, ge20071216, CMSSW_1_8_0_pre4-vg330, ge20071213, ge20071212-perfreport, ge20071212, ge20071211, ge20071210a, ge20071210, pe20071207-for180p4g491c3, NR071206_geant491cand3-global, ge20071207, pe20071206-for180test1, CMSSW_1_8_0_pre4-412, CMSSW_1_8_0_pre4, pe20071205b-for180p4-412, pe20071205b-for180p4, pe20071205-for180p4, ge20071205, CMSSW_1_8_0_pre3a-412, ge20071203, pe20071202-for180p3a-gcc412, CMSSW_1_8_0_pre3a, pe20071201b-for180p3a, pe20071201-for180p3a, V00-06-08, ge20071128, pe20071130-for180p3, pe20071129-for180p3, ge20071127a-leopard, ge20071127-leopard, pe20071127a-ports-412, ge20071126-new-bootstrap, CMSSW_1_8_0_pre2, CMSSW_1_8_0_pre0-amd64, CMSSW_1_8_0_pre0, pe20071123e-ports-412, pe20071123d-ports-412, pe20071123c-ports-422, pe20071123c-ports-412, pe20071123c-ports, pe20071123b-ports-422, pe20071123b-ports-412, pe20071123b-ports, pe20071123a-ports-422, pe20071123a-ports-412, pe20071123a-ports, ge20071122-new-bootstrap, pe20071121a-ports-422, pe20071121a-ports-412, pe20071121a-ports, pe20071112c-ports-422, pe20071112c-ports-412, pe20071112c-ports, pe20071112b-ports-412, pe20071112b-ports, pe20071112a-ports, pe20071105c-ports, pe20071105b-ports, pe20071105a-ports
Changes since 1.28: +8 -3 lines
Log Message:
Updates to install properly the libraries for boost version 1.34.1,
including creation of the whole mess of symlinks

File Contents

# User Rev Content
1 elmer 1.28 ### RPM external boost 1.34.1-CMS18
2 elmer 1.17 %define boostver _%(echo %realversion | tr . _)
3 elmer 1.29 %define gccver %(echo $GCC_VERSION | cut -d. -f1,2 | sed -e 's/\.//')
4 elmer 1.28 Source: http://internap.dl.sourceforge.net/sourceforge/%{n}/%{n}%{boostver}.tar.gz
5 argiro 1.1
6 ratnik 1.25 Requires: boost-build python bz2lib
7     %if "%{?online_release:set}" != "set"
8     Requires: zlib
9     %endif
10    
11 argiro 1.1 %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 ratnik 1.25 PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
20 argiro 1.1 PR="PYTHON_ROOT=$PYTHON_ROOT"
21 ratnik 1.25
22 elmer 1.17 # 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 ratnik 1.25 BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
26    
27     %if "%{?online_release:set}" != "set"
28 eulisse 1.8 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
29     ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
30    
31 argiro 1.1 case $(uname) in
32 dlange 1.22 Darwin ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
33     * ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
34 argiro 1.1 esac
35 ratnik 1.25 %else
36     bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
37     %endif
38 argiro 1.1
39     %install
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.29 (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp {} %i/lib/. \;)
47 eulisse 1.7 find boost -name '*.[hi]*' -print |
48 argiro 1.1 while read f; do
49     mkdir -p %i/include/$(dirname $f)
50     install -c $f %i/include/$f
51     done
52     find libs -name '*.py' -print |
53     while read f; do
54     mkdir -p %i/lib/$(dirname $f)
55     install -c $f %i/lib/$f
56     done
57     [ $(uname) = Darwin ] &&
58     for f in %i/lib/*.$so %i/lib/debug/*.$so; do
59     install_name_tool -id $f $f
60     done
61 eulisse 1.6
62 ratnik 1.19 # Do all manipulation with files before creating symbolic links:
63     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
64 dlange 1.20 strip %i/lib/*.$so
65 ratnik 1.19
66 elmer 1.29
67     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
68     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
69     (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/.%{realversion}$//"); done)
70     (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)
71     (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%{gccver}/gcc/"); done)
72 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)
73     #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
74 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
75 ratnik 1.16
76 muzaffar 1.21 # SCRAM ToolBox toolfile
77     mkdir -p %i/etc/scram.d
78     # boost toolfile
79     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
80     <doc type=BuildSystem::ToolDoc version=1.0>
81     <Tool name=boost version=%v>
82     <info url="http://www.boost.org"></info>
83     <lib name=boost_thread-gcc-mt>
84     <lib name=boost_signals-gcc-mt>
85     <Client>
86     <Environment name=BOOST_BASE default="%i"></Environment>
87     <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
88     <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
89     </Client>
90     <use name=sockets>
91 dlange 1.22 <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
92     <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
93 muzaffar 1.21 </Tool>
94     EOF_TOOLFILE
95    
96     # boost_filesystem toolfile
97     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
98     <doc type=BuildSystem::ToolDoc version=1.0>
99     <Tool name=boost_filesystem version=%v>
100     <info url="http://www.boost.org"></info>
101     <lib name=boost_filesystem-gcc-mt>
102     <use name=boost>
103     </Tool>
104     EOF_TOOLFILE
105    
106     # boost_program_options toolfile
107     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
108     <doc type=BuildSystem::ToolDoc version=1.0>
109     <Tool name=boost_program_options version=%v>
110     <info url="http://www.boost.org"></info>
111     <lib name=boost_program_options-gcc-mt>
112     <use name=boost>
113     </Tool>
114     EOF_TOOLFILE
115    
116     # boost_python toolfile
117     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
118     <doc type=BuildSystem::ToolDoc version=1.0>
119     <Tool name=boost_python version=%v>
120     <info url="http://www.boost.org"></info>
121     <lib name=boost_python-gcc-mt>
122     <Client>
123     <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
124     <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
125     <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
126     <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
127     </Client>
128     <use name=elementtree>
129     <use name=gccxml>
130     <use name=python>
131     </Tool>
132     EOF_TOOLFILE
133    
134     # boost_regex toolfile
135     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
136     <doc type=BuildSystem::ToolDoc version=1.0>
137     <Tool name=boost_regex version=%v>
138     <info url="http://www.boost.org"></info>
139     <lib name=boost_regex-gcc-mt>
140     <use name=boost>
141     </Tool>
142     EOF_TOOLFILE
143    
144     # boost_signals toolfile
145     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
146     <doc type=BuildSystem::ToolDoc version=1.0>
147     <Tool name=boost_signals version=%v>
148     <info url="http://www.boost.org"></info>
149     <lib name=boost_signals-gcc-mt>
150     <use name=boost>
151     </Tool>
152     EOF_TOOLFILE
153    
154     %post
155     %{relocateConfig}etc/scram.d/boost
156     %{relocateConfig}etc/scram.d/boost_filesystem
157     %{relocateConfig}etc/scram.d/boost_program_options
158     %{relocateConfig}etc/scram.d/boost_python
159     %{relocateConfig}etc/scram.d/boost_regex
160     %{relocateConfig}etc/scram.d/boost_signals