ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.33
Committed: Mon Dec 31 18:07:11 2007 UTC (17 years, 3 months ago) by elmer
Branch: MAIN
CVS Tags: dl080225intbld, ge20080225-nightlies, ge20080225-fixed-bootstrap, pe20080221a-ports-412, pe20080221a-ports, pe20080220a-ports-412, pe20080220a-ports, ge20080219, COMP_NIGHTLY_INIT_V1, ge20080215, pe20080214a-ports-for190p9-412, pe20080214a-ports-for190p9, pe20080211a-ports-for190p9-412, pe20080211a-ports-for190p9, COMP_NIGHTLY_20080211, pe20080207c-ports-for190p8-412, pe20080207c-ports-for190p8, pe20080207b-ports-lcg54pre2-412, pe20080207b-ports-lcg54pre2, pe20080207a-ports-lcg54pre2-412, pe20080207a-ports-lcg54pre2, pe20080206b-ports-lcg54pre2-412, pe20080206b-ports-lcg54pre2, pe20080206a-ports-lcg54pre2-412, pe20080206a-ports-lcg54pre2, pe20080205c-ports-lcg54pre2-412, pe20080205c-ports-lcg54pre2, pe20080205b-ports-lcg54pre2-412, pe20080205b-ports-lcg54pre2, pe20080205a-ports-lcg54pre2-412, pe20080205a-ports-lcg54pre2, pe20080204a-ports-lcg54pre2-412, pe20080204a-ports-lcg54pre2, pe20080127a-ports-lcg54pre2-412, pe20080127a-ports-lcg54pre2, pe20080125a-ports-lcg54pre2-412, pe20080125a-ports-lcg54pre2, pe20080125a-ports-lcg54-412, pe20080125a-ports-lcg54, pe20080123a-ports-412, pe20080123a-ports, pe20080120a-ports-412, pe20080120a-ports, pe20080119a-ports-412, pe20080119a-ports, pe20080118g-ports-412, pe20080118g-ports, pe20080118f-ports-412, pe20080118f-ports, nr_pe20080118e-ports-onl, pe20080118e-ports-412, pe20080118e-ports, pe20080118d-ports-412, pe20080118d-ports, pe20080118c-ports, pe20080118b-ports, pe20080118a-ports, pe20080111b-ports, pe20080111a-ports, pe20080110b-ports, pe20080110a-ports, pe20080109a-ports, pe20080108c-ports, ge20080108-wt, pe20080108b-ports, pe20080108a-ports, pe20080105a-ports, pe20080104a-ports, pe20080103a-ports-gcc422, pe20080103a-ports, pe20070103a-ports, pe20080101a-ports
Changes since 1.32: +12 -4 lines
Log Message:
Updates for Darwin for boost 1.34.1 (the "strip" command during the install
was dropped for all platforms as part of this. I'm not sure why it was still
there, but perhaps we'll have to look at it again.)
bjam, what a piece of crap.

File Contents

# User Rev Content
1 elmer 1.32 ### RPM external boost 1.34.1-CMS19
2 elmer 1.17 %define boostver _%(echo %realversion | tr . _)
3 ratnik 1.31 %define gccver %(echo $GCC_VERSION | cut -d. -f1,2 | sed -e 's/\.//')
4     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 elmer 1.33 Darwin ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
33 dlange 1.22 * ) 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.33 # Perhaps the following could be done with a wildcard for the darwin/gcc dir
47     case $(uname) in
48     Darwin )
49     (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp {} %i/lib/. \;)
50     ;;
51     * )
52     (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp {} %i/lib/. \;)
53     ;;
54     esac
55 eulisse 1.7 find boost -name '*.[hi]*' -print |
56 argiro 1.1 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     [ $(uname) = Darwin ] &&
66 elmer 1.33 for f in %i/lib/*.$so %i/lib/*.$so; do
67 argiro 1.1 install_name_tool -id $f $f
68     done
69 eulisse 1.6
70 ratnik 1.19 # Do all manipulation with files before creating symbolic links:
71     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
72 elmer 1.33 #strip %i/lib/*.$so
73 ratnik 1.19
74 ratnik 1.31
75     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
76     #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
77     (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/.%{realversion}$//"); done)
78     (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)
79     (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)
80 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)
81     #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
82 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
83 ratnik 1.16
84 muzaffar 1.21 # SCRAM ToolBox toolfile
85     mkdir -p %i/etc/scram.d
86     # boost toolfile
87     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
88     <doc type=BuildSystem::ToolDoc version=1.0>
89     <Tool name=boost version=%v>
90     <info url="http://www.boost.org"></info>
91     <lib name=boost_thread-gcc-mt>
92     <lib name=boost_signals-gcc-mt>
93     <Client>
94     <Environment name=BOOST_BASE default="%i"></Environment>
95     <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
96     <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
97     </Client>
98     <use name=sockets>
99 dlange 1.22 <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
100     <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
101 muzaffar 1.21 </Tool>
102     EOF_TOOLFILE
103    
104     # boost_filesystem toolfile
105     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
106     <doc type=BuildSystem::ToolDoc version=1.0>
107     <Tool name=boost_filesystem version=%v>
108     <info url="http://www.boost.org"></info>
109     <lib name=boost_filesystem-gcc-mt>
110     <use name=boost>
111     </Tool>
112     EOF_TOOLFILE
113    
114     # boost_program_options toolfile
115     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
116     <doc type=BuildSystem::ToolDoc version=1.0>
117     <Tool name=boost_program_options version=%v>
118     <info url="http://www.boost.org"></info>
119     <lib name=boost_program_options-gcc-mt>
120     <use name=boost>
121     </Tool>
122     EOF_TOOLFILE
123    
124     # boost_python toolfile
125     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
126     <doc type=BuildSystem::ToolDoc version=1.0>
127     <Tool name=boost_python version=%v>
128     <info url="http://www.boost.org"></info>
129     <lib name=boost_python-gcc-mt>
130     <Client>
131     <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
132     <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
133     <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
134     <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
135     </Client>
136     <use name=elementtree>
137     <use name=gccxml>
138     <use name=python>
139     </Tool>
140     EOF_TOOLFILE
141    
142     # boost_regex toolfile
143     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
144     <doc type=BuildSystem::ToolDoc version=1.0>
145     <Tool name=boost_regex version=%v>
146     <info url="http://www.boost.org"></info>
147     <lib name=boost_regex-gcc-mt>
148     <use name=boost>
149     </Tool>
150     EOF_TOOLFILE
151    
152     # boost_signals toolfile
153     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
154     <doc type=BuildSystem::ToolDoc version=1.0>
155     <Tool name=boost_signals version=%v>
156     <info url="http://www.boost.org"></info>
157     <lib name=boost_signals-gcc-mt>
158     <use name=boost>
159     </Tool>
160     EOF_TOOLFILE
161    
162     %post
163     %{relocateConfig}etc/scram.d/boost
164     %{relocateConfig}etc/scram.d/boost_filesystem
165     %{relocateConfig}etc/scram.d/boost_program_options
166     %{relocateConfig}etc/scram.d/boost_python
167     %{relocateConfig}etc/scram.d/boost_regex
168     %{relocateConfig}etc/scram.d/boost_signals