ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.28
Committed: Fri Nov 2 22:21:10 2007 UTC (17 years, 5 months ago) by elmer
Branch: MAIN
CVS Tags: pe20071103e-ports, pe20071103d-ports, pe20071103c-ports, pe20071103b-ports, pe20071103a-ports
Changes since 1.27: +2 -3 lines
Log Message:
Update boost to version 1.34.1
Update boost-build to version 2.0-m12
Update download URL's for booth

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