ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
(Generate patch)

Comparing COMP/CMSDIST/boost.spec (file contents):
Revision 1.6 by eulisse, Wed Apr 12 08:58:41 2006 UTC vs.
Revision 1.51 by dsr, Wed Jan 13 21:16:47 2010 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines