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.3 by eulisse, Wed Feb 22 12:43:55 2006 UTC vs.
Revision 1.64 by eulisse, Thu Sep 1 08:46:57 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines