ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
(Generate patch)

Comparing COMP/CMSDIST/boost.spec (file contents):
Revision 1.6 by eulisse, Wed Apr 12 08:58:41 2006 UTC vs.
Revision 1.65 by eulisse, Thu Sep 1 08:47:30 2011 UTC

# Line 1 | Line 1
1 < ### RPM external boost 1.33.1
2 < # 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 < Source: http://dl.sourceforge.net/sourceforge/%n/%{n}%{boostver}.tar.gz
7 < #Patch: boost
1 > ### RPM external boost 1.47.0
2 > %define boostver _%(echo %realversion | tr . _)
3 > Source: http://switch.dl.sourceforge.net/project/%{n}/%{n}/%{v}/%{n}%{boostver}.tar.gz
4 > %define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac)
5 >
6 > Requires: python bz2lib
7 > %if "%online" != "true"
8 > Requires: zlib
9 > %endif
10  
11   %prep
12   %setup -n %{n}%{boostver}
13 < #%patch
13 > perl -p -i -e 's/-no-cpp-precomp//' tools/build/v2/tools/darwin.jam \
14 >                                    tools/build/v2/tools/darwin.py
15  
16   %build
17 < # Note that some targets will fail to build (the test programs have
18 < # missing symbols), causing darwin to fail to link and bjam to return
19 < # 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 ;;
17 > case %cmsos in
18 >  osx*) TOOLSET=darwin ;;
19 >  *) TOOLSET=gcc ;;
20   esac
21  
22 + pushd tools/build/v2
23 +
24 + sh bootstrap.sh $TOOLSET
25 + popd
26 +
27 + PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
28 + PR="PYTHON_ROOT=$PYTHON_ROOT"
29 +
30 + # The following line assumes a version of the form x.y.z-XXXX, where the
31 + # "-XXXX" part represents some CMS rebuild of version x.y.z
32 + BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
33 + BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
34 +
35 + if [ ! X%online = "Xtrue" ]
36 + then
37 +  ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
38 +  ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
39 + fi
40 +
41 + tools/build/v2/bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI ${ZLIBR+-s$ZLIBR} ${ZLIBI+-s$ZLIBI} toolset=$TOOLSET stage
42 +
43   %install
44 < boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
45 < case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
46 < mkdir -p %i/lib/debug
47 < (cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
48 < (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp {} %i/lib \;)
49 < find boost -name '*.h' -o -name '*.hpp' -print |
50 <  while read f; do
51 <    mkdir -p %i/include/$(dirname $f)
52 <    install -c $f %i/include/$f
53 <  done
54 < find libs -name '*.py' -print |
55 <  while read f; do
56 <    mkdir -p %i/lib/$(dirname $f)
57 <    install -c $f %i/lib/$f
58 <  done
59 < [ $(uname) = Darwin ] &&
60 <  for f in %i/lib/*.$so %i/lib/debug/*.$so; do
61 <    install_name_tool -id $f $f
62 <  done
63 <
64 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
65 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%v ; done)
66 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
67 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%v; done)
68 < (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
44 > case %cmsos in osx*) so=dylib ;; *) so=so ;; esac
45 > mkdir -p %i/lib %i/include
46 > # copy files around in their final location.
47 > # We use tar to reduce the number of processes required
48 > # and because we need to build the build hierarchy for
49 > # the files that we are copying.
50 > pushd stage/lib
51 >  find . -name "*.$so*" -type f | tar cf - -T - | (cd %i/lib; tar xfp -)
52 > popd
53 > find boost -name '*.[hi]*' | tar cf - -T - | ( cd %i/include; tar xfp -)
54 >
55 > for l in `find %i/lib -name "*.$so.*"`
56 > do
57 >  ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
58 > done
59 >
60 > pushd libs/python/pyste/install
61 >  python setup.py install --prefix=%i
62 > popd
63 >
64 > # Do all manipulation with files before creating symbolic links:
65 > perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin -type f)
66 >
67 > # Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
68 > mkdir -p %i/etc/profile.d
69 > : > %i/etc/profile.d/dependencies-setup.sh
70 > : > %i/etc/profile.d/dependencies-setup.csh
71 > for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
72 >  root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
73 >  if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
74 >    echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
75 >    echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
76 >  fi
77 > done
78 >
79 > %post
80 > %{relocateConfig}etc/profile.d/dependencies-setup.*sh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines