ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.16
Committed: Fri Jun 22 20:03:46 2007 UTC (17 years, 10 months ago) by ratnik
Branch: MAIN
CVS Tags: ge20070629, ge20070625
Changes since 1.15: +12 -6 lines
Log Message:
Temporary rename version to x.y.z-lite to avoid overwriting boost distribution.
This will be used for building FWLITE, and eventually adopted into the
new CMS configuration.

File Contents

# User Rev Content
1 ratnik 1.16 ### RPM external boost 1.33.1-lite
2 argiro 1.1 # Patches and build fudging by Lassi A. Tuura <lat@iki.fi> (FIXME: contribute to boost)
3 ratnik 1.16 # define boostver -%v <-- for 1.30.2
4     %define realversion %(echo %v | cut -d- -f1)
5     %define boostver _%(echo %{realversion} | 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 ratnik 1.16 #Patch: boost
9 argiro 1.1
10     %prep
11     %setup -n %{n}%{boostver}
12 ratnik 1.16 #%patch
13 argiro 1.1
14     %build
15     # Note that some targets will fail to build (the test programs have
16     # missing symbols), causing darwin to fail to link and bjam to return
17     # an error. So ignore the exit code from bjam on darwin to avoid
18     # RPM falsely detecting a problem.
19     PR="PYTHON_ROOT=$PYTHON_ROOT"
20     PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*$//')"
21 ratnik 1.16 BZ2LIBR="BZ2LIB_LIBPATH=$BZ2LIB_ROOT/lib"
22 eulisse 1.8 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
23 ratnik 1.16 BZ2LIBI="BZ2LIB_INCLUDE=$BZ2LIB_ROOT/include"
24 eulisse 1.8 ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
25    
26 argiro 1.1 case $(uname) in
27 eulisse 1.8 Darwin ) bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
28     * ) bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
29 argiro 1.1 esac
30    
31     %install
32 eulisse 1.6 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
33 argiro 1.1 case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
34     mkdir -p %i/lib/debug
35     (cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
36     (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp {} %i/lib \;)
37 eulisse 1.7 find boost -name '*.[hi]*' -print |
38 argiro 1.1 while read f; do
39     mkdir -p %i/include/$(dirname $f)
40     install -c $f %i/include/$f
41     done
42     find libs -name '*.py' -print |
43     while read f; do
44     mkdir -p %i/lib/$(dirname $f)
45     install -c $f %i/lib/$f
46     done
47     [ $(uname) = Darwin ] &&
48     for f in %i/lib/*.$so %i/lib/debug/*.$so; do
49     install_name_tool -id $f $f
50     done
51 eulisse 1.6
52 ratnik 1.16
53 ratnik 1.14 # Do all manipulation with files before creating symbolic links:
54     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
55     strip %i/lib/*.$so %i/lib/debug/*.$so
56    
57 argiro 1.1 (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
58 ratnik 1.16 (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%{realversion} ; done)
59 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)
60 ratnik 1.16 (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%{realversion}; done)
61 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
62 ratnik 1.16