ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.8
Committed: Fri Apr 28 14:52:36 2006 UTC (19 years ago) by eulisse
Branch: MAIN
CVS Tags: CRABSERVER_TEST_BUILD_V4, CRABSERVER_TEST_BUILD_V3, CRABSERVER_TEST_BUILD_V2, CRABSERVER_TEST_BUILD_V1, forCRABSERVER104test, forCRABSERVER103, PRODAGENT_0_10_12_V10, PRODAGENT_0_10_12_V9, PRODAGENT_0_10_12_V8, PRODAGENT_0_10_12_V7, PRODAGENT_0_10_12_V6, PRODAGENT_0_10_12_V5, PRODAGENT_0_10_12_V4, forCS102pre4, PRODAGENT_0_10_12_V3, PRODAGENT_0_10_12_V2, PRODAGENT_0_10_12, PRODAGENT_0_10_3, PRODAGENT_0_10_3_20080521, PRODAGENT_0_8_3_SL4, forPA070pre3-slc3, forPA070pre3-slc4, forPA070pre3-slc, forPA061, forPA060pre7-slc4, forPA060pre3, forDBS106, forPA050pre3, WEBTOOLS_CONFIG_1_pre2, WEBTOOLS_CONFIG_1_pre1, forPA030, forPA020, PR_0_5_4, PR_0_5_0, PR_0_4_21, PRODREQUEST_0_4_0, PR0_3_13, PR0_3_12, PR0-3-11, forPR034, forPR033, forPIL116, forPR032, forPR030, forPR020, forPA011, forPR010, forPA010, af20060928, ProdAgent_pa17, phedex_2_3_series, forLCG_44, forCMSSW_0_8_0_pre2, V00-01-02, V00-01-2, V00-01-01, V00-01-00, V00-00-11, V00-00-10, V00-00-09, V00-00-08, V00-00-07, V00-00-06, V00-00-05, V00-00-04, V00-00-03, V00-00-02, V00-00-01
Changes since 1.7: +11 -3 lines
Log Message:
Now it compiles using our version of bz2lib and zlib.
Dependency on /usr/bin/python removed.

File Contents

# User Rev Content
1 eulisse 1.5 ### RPM external boost 1.33.1
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 eulisse 1.8 Requires: boost-build python bz2lib zlib
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 eulisse 1.8 BZ2LIBR="BZ2LIB_LIBPATH=$BZ2LIB_ROOT/lib"
21     ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
22     BZ2LIBI="BZ2LIB_INCLUDE=$BZ2LIB_ROOT/include"
23     ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
24    
25 argiro 1.1 case $(uname) in
26 eulisse 1.8 Darwin ) bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
27     * ) bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
28 argiro 1.1 esac
29    
30     %install
31 eulisse 1.6 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
32 argiro 1.1 case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
33     mkdir -p %i/lib/debug
34     (cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
35     (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp {} %i/lib \;)
36 eulisse 1.7 find boost -name '*.[hi]*' -print |
37 argiro 1.1 while read f; do
38     mkdir -p %i/include/$(dirname $f)
39     install -c $f %i/include/$f
40     done
41     find libs -name '*.py' -print |
42     while read f; do
43     mkdir -p %i/lib/$(dirname $f)
44     install -c $f %i/lib/$f
45     done
46     [ $(uname) = Darwin ] &&
47     for f in %i/lib/*.$so %i/lib/debug/*.$so; do
48     install_name_tool -id $f $f
49     done
50 eulisse 1.6
51 argiro 1.1 (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
52 eulisse 1.3 (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%v ; done)
53 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)
54 eulisse 1.3 (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%v; done)
55 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
56 eulisse 1.8
57     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
58