ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.10
Committed: Wed Apr 18 23:46:01 2007 UTC (18 years ago) by ratnik
Branch: MAIN
CVS Tags: pe20070428a-ports, pe20070423b-ports, pe20070423a-ports
Changes since 1.9: +2 -0 lines
Log Message:
Changes for building  externals in 64/32 mode: added gcc-wrapper .

File Contents

# User Rev Content
1 eulisse 1.5 ### RPM external boost 1.33.1
2 ratnik 1.10 Requires: gcc-wrapper
3 argiro 1.1 # Patches and build fudging by Lassi A. Tuura <lat@iki.fi> (FIXME: contribute to boost)
4     # define boostver -%v <-- for 1.30.2
5     %define boostver _%(echo %v | tr . _)
6 eulisse 1.8 Requires: boost-build python bz2lib zlib
7 argiro 1.2 Source: http://dl.sourceforge.net/sourceforge/%n/%{n}%{boostver}.tar.gz
8     #Patch: boost
9 argiro 1.1
10     %prep
11     %setup -n %{n}%{boostver}
12 argiro 1.2 #%patch
13 argiro 1.1
14     %build
15 ratnik 1.10 ## IMPORT gcc-wrapper
16 argiro 1.1 # 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.
20     PR="PYTHON_ROOT=$PYTHON_ROOT"
21     PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*$//')"
22 eulisse 1.8 BZ2LIBR="BZ2LIB_LIBPATH=$BZ2LIB_ROOT/lib"
23     ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
24     BZ2LIBI="BZ2LIB_INCLUDE=$BZ2LIB_ROOT/include"
25     ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
26    
27 argiro 1.1 case $(uname) in
28 eulisse 1.8 Darwin ) bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
29     * ) bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
30 argiro 1.1 esac
31    
32     %install
33 eulisse 1.6 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
34 argiro 1.1 case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
35     mkdir -p %i/lib/debug
36     (cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
37     (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp {} %i/lib \;)
38 eulisse 1.7 find boost -name '*.[hi]*' -print |
39 argiro 1.1 while read f; do
40     mkdir -p %i/include/$(dirname $f)
41     install -c $f %i/include/$f
42     done
43     find libs -name '*.py' -print |
44     while read f; do
45     mkdir -p %i/lib/$(dirname $f)
46     install -c $f %i/lib/$f
47     done
48     [ $(uname) = Darwin ] &&
49     for f in %i/lib/*.$so %i/lib/debug/*.$so; do
50     install_name_tool -id $f $f
51     done
52 eulisse 1.6
53 argiro 1.1 (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
54 eulisse 1.3 (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%v ; done)
55 argiro 1.1 (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
56 eulisse 1.3 (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%v; done)
57 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
58 eulisse 1.8
59     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
60    
61 eulisse 1.9 #
62     #