ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.39
Committed: Tue Jan 27 15:30:45 2009 UTC (16 years, 3 months ago) by elmer
Branch: MAIN
CVS Tags: T0M_0_0_5, pe20090216a-30Xports-432, WEBTOOLS-APPS_20090209_64bit, zx20090209, WEBTOOLS-APPS_20090206, T0M_0_0_4, T0M_0_0_3, WEBTOOLS-APPS_20090203_1, WEBTOOLS-APPS_20090203, T0M_0_0_2, zx20090201, pe20090127c-30Xports-432, pe20090127b-30Xports-432
Changes since 1.38: +2 -0 lines
Log Message:
Apply boost-1.37.0-gccxml-intrinsics

File Contents

# User Rev Content
1 elmer 1.38 ### RPM external boost 1.37.0
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 elmer 1.39 Patch0: boost-1.37.0-gccxml-intrinsics
5 argiro 1.1
6 ratnik 1.25 Requires: boost-build python bz2lib
7 ratnik 1.37 %if "%cmsplatf" != "slc4onl_ia32_gcc346"
8 ratnik 1.25 Requires: zlib
9     %endif
10    
11 argiro 1.1 %prep
12     %setup -n %{n}%{boostver}
13 elmer 1.39 %patch0 -p1
14 argiro 1.1
15     %build
16     # Note that some targets will fail to build (the test programs have
17     # missing symbols), causing darwin to fail to link and bjam to return
18     # an error. So ignore the exit code from bjam on darwin to avoid
19     # RPM falsely detecting a problem.
20 ratnik 1.25 PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
21 argiro 1.1 PR="PYTHON_ROOT=$PYTHON_ROOT"
22 ratnik 1.25
23 elmer 1.17 # The following line assumes a version of the form x.y.z-XXXX, where the
24     # "-XXXX" part represents some CMS rebuild of version x.y.z
25     BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
26 ratnik 1.25 BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
27    
28 ratnik 1.37 %if "%cmsplatf" != "slc4onl_ia32_gcc346"
29 eulisse 1.8 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
30     ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
31    
32 argiro 1.1 case $(uname) in
33 elmer 1.33 Darwin ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
34 dlange 1.22 * ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
35 argiro 1.1 esac
36 ratnik 1.25 %else
37     bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
38     %endif
39 argiro 1.1
40     %install
41 ratnik 1.37
42     linkgccver=%(echo %gccver | tr -d . | perl -pe 's/^(\d\d).*/$1/')
43    
44 eulisse 1.6 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
45 argiro 1.1 case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
46 dlange 1.20 #no debug libs...
47     #mkdir -p %i/lib/debug
48     mkdir %i/lib
49     #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
50 elmer 1.33 # Perhaps the following could be done with a wildcard for the darwin/gcc dir
51     case $(uname) in
52     Darwin )
53     (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp {} %i/lib/. \;)
54     ;;
55     * )
56     (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp {} %i/lib/. \;)
57     ;;
58     esac
59 eulisse 1.7 find boost -name '*.[hi]*' -print |
60 argiro 1.1 while read f; do
61     mkdir -p %i/include/$(dirname $f)
62     install -c $f %i/include/$f
63     done
64     find libs -name '*.py' -print |
65     while read f; do
66     mkdir -p %i/lib/$(dirname $f)
67     install -c $f %i/lib/$f
68     done
69     [ $(uname) = Darwin ] &&
70 elmer 1.33 for f in %i/lib/*.$so %i/lib/*.$so; do
71 argiro 1.1 install_name_tool -id $f $f
72     done
73 eulisse 1.6
74 ratnik 1.19 # Do all manipulation with files before creating symbolic links:
75     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
76 elmer 1.33 #strip %i/lib/*.$so
77 ratnik 1.19
78 ratnik 1.31
79     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
80     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
81     (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/.%{realversion}$//"); done)
82     (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)
83 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)
84 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)
85     #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
86 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
87 ratnik 1.16
88 muzaffar 1.21 # SCRAM ToolBox toolfile
89     mkdir -p %i/etc/scram.d
90     # boost toolfile
91     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
92     <doc type=BuildSystem::ToolDoc version=1.0>
93     <Tool name=boost version=%v>
94     <info url="http://www.boost.org"></info>
95     <lib name=boost_thread-gcc-mt>
96     <lib name=boost_signals-gcc-mt>
97     <Client>
98     <Environment name=BOOST_BASE default="%i"></Environment>
99     <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
100     <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
101     </Client>
102     <use name=sockets>
103 dlange 1.22 <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
104     <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
105 muzaffar 1.21 </Tool>
106     EOF_TOOLFILE
107    
108     # boost_filesystem toolfile
109     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
110     <doc type=BuildSystem::ToolDoc version=1.0>
111     <Tool name=boost_filesystem version=%v>
112     <info url="http://www.boost.org"></info>
113     <lib name=boost_filesystem-gcc-mt>
114     <use name=boost>
115     </Tool>
116     EOF_TOOLFILE
117    
118     # boost_program_options toolfile
119     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
120     <doc type=BuildSystem::ToolDoc version=1.0>
121     <Tool name=boost_program_options version=%v>
122     <info url="http://www.boost.org"></info>
123     <lib name=boost_program_options-gcc-mt>
124     <use name=boost>
125     </Tool>
126     EOF_TOOLFILE
127    
128     # boost_python toolfile
129     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
130     <doc type=BuildSystem::ToolDoc version=1.0>
131     <Tool name=boost_python version=%v>
132     <info url="http://www.boost.org"></info>
133     <lib name=boost_python-gcc-mt>
134     <Client>
135     <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
136     <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
137     <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
138     <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
139     </Client>
140     <use name=elementtree>
141     <use name=gccxml>
142     <use name=python>
143     </Tool>
144     EOF_TOOLFILE
145    
146     # boost_regex toolfile
147     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
148     <doc type=BuildSystem::ToolDoc version=1.0>
149     <Tool name=boost_regex version=%v>
150     <info url="http://www.boost.org"></info>
151     <lib name=boost_regex-gcc-mt>
152     <use name=boost>
153     </Tool>
154     EOF_TOOLFILE
155    
156     # boost_signals toolfile
157     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
158     <doc type=BuildSystem::ToolDoc version=1.0>
159     <Tool name=boost_signals version=%v>
160     <info url="http://www.boost.org"></info>
161     <lib name=boost_signals-gcc-mt>
162     <use name=boost>
163     </Tool>
164     EOF_TOOLFILE
165    
166     %post
167     %{relocateConfig}etc/scram.d/boost
168     %{relocateConfig}etc/scram.d/boost_filesystem
169     %{relocateConfig}etc/scram.d/boost_program_options
170     %{relocateConfig}etc/scram.d/boost_python
171     %{relocateConfig}etc/scram.d/boost_regex
172     %{relocateConfig}etc/scram.d/boost_signals