1 |
argiro |
1.2 |
### RPM external boost 1.32.0
|
2 |
argiro |
1.1 |
# 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 |
argiro |
1.2 |
Source: http://dl.sourceforge.net/sourceforge/%n/%{n}%{boostver}.tar.gz
|
7 |
|
|
#Patch: boost
|
8 |
argiro |
1.1 |
|
9 |
|
|
%prep
|
10 |
|
|
%setup -n %{n}%{boostver}
|
11 |
argiro |
1.2 |
#%patch
|
12 |
argiro |
1.1 |
|
13 |
|
|
%build
|
14 |
|
|
# 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.
|
18 |
|
|
PR="PYTHON_ROOT=$PYTHON_ROOT"
|
19 |
|
|
PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*$//')"
|
20 |
|
|
case $(uname) in
|
21 |
|
|
Darwin ) bjam -s$PR -s$PV -sTOOLS=darwin || true ;;
|
22 |
|
|
* ) bjam -s$PR -s$PV -sTOOLS=gcc ;;
|
23 |
|
|
esac
|
24 |
|
|
|
25 |
|
|
%install
|
26 |
|
|
boost_abi=$(echo %boostver | sed 's/^_//; s/_[0-9]*$//')
|
27 |
|
|
case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
|
28 |
|
|
mkdir -p %i/lib/debug
|
29 |
|
|
(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
|
30 |
|
|
(cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp {} %i/lib \;)
|
31 |
|
|
find boost -name '*.h' -o -name '*.hpp' -print |
|
32 |
|
|
while read f; do
|
33 |
|
|
mkdir -p %i/include/$(dirname $f)
|
34 |
|
|
install -c $f %i/include/$f
|
35 |
|
|
done
|
36 |
|
|
find libs -name '*.py' -print |
|
37 |
|
|
while read f; do
|
38 |
|
|
mkdir -p %i/lib/$(dirname $f)
|
39 |
|
|
install -c $f %i/lib/$f
|
40 |
|
|
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
|
45 |
|
|
(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
|
46 |
|
|
(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
|