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 |
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 |