1 |
< |
### RPM external boost 1.38.0 |
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 flase;; esac) |
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" |
13 |
|
%setup -n %{n}%{boostver} |
14 |
|
|
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. |
16 |
|
PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')" |
17 |
|
PR="PYTHON_ROOT=$PYTHON_ROOT" |
18 |
|
|
26 |
|
ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include" |
27 |
|
|
28 |
|
case $(uname) in |
29 |
< |
Darwin ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;; |
30 |
< |
* ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -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 -sTOOLS=gcc |
33 |
> |
bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI toolset=gcc stage |
34 |
|
%endif |
35 |
|
|
36 |
|
%install |
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 |
< |
# Perhaps the following could be done with a wildcard for the darwin/gcc dir |
47 |
< |
case %cmsplatf in |
48 |
< |
osx*) |
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 |
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 |
65 |
|
|
66 |
|
getLibName() |
67 |
|
{ |
68 |
< |
libname=`find %i/lib -name "libboost_$1*mt*.$so" -exec basename {} \;` |
68 |
> |
libname=`find %i/lib -name "libboost_$1.$so" -exec basename {} \;` |
69 |
|
echo $libname | sed -e 's|[.][^-]*$||;s|^lib||' |
70 |
|
} |
71 |
|
|
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 |
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/python2.4/site-packages/Pyste/pyste.py"></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> |
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 |
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 |