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.41 by eulisse, Thu Feb 12 13:14:59 2009 UTC vs.
Revision 1.45 by muzaffar, Thu Jun 18 16:02:47 2009 UTC

# Line 1 | Line 1
1   ### RPM external boost 1.38.0
2   %define boostver _%(echo %realversion | tr . _)
3   Source: http://internap.dl.sourceforge.net/sourceforge/%{n}/%{n}%{boostver}.tar.gz
4 + %define online %(case %cmsplatf in *onl_*_*) echo true ;; esac)
5  
6   Requires: boost-build python bz2lib
7 < %if "%cmsplatf" != "slc4onl_ia32_gcc346"
7 > %if "%online" != "true"
8   Requires: zlib
9   %endif
10  
# Line 23 | Line 24 | PR="PYTHON_ROOT=$PYTHON_ROOT"
24   BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
25   BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
26  
27 < %if "%cmsplatf" != "slc4onl_ia32_gcc346"
27 > %if "%online" != "true"
28   ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
29   ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
30  
# Line 36 | Line 37 | bjam %makeprocesses -s$PR -s$PV -s$BZ2LI
37   %endif
38  
39   %install
39
40 linkgccver=%(echo %gccver | tr -d . | perl -pe 's/^(\d\d).*/$1/')
41
42 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
40   case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
41   #no debug libs...
42   #mkdir -p %i/lib/debug
43   mkdir %i/lib
44   #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
45   # Perhaps the following could be done with a wildcard for the darwin/gcc dir
46 < case $(uname) in
47 <  Darwin )
46 > case %cmsplatf in
47 >  osx*)
48      (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp  {} %i/lib/. \;)
49      ;;
50 <   * )
50 >  * )
51      (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp  {} %i/lib/. \;)
52      ;;
53   esac
54 +
55   find boost -name '*.[hi]*' -print |
56    while read f; do
57      mkdir -p %i/include/$(dirname $f)
# Line 64 | Line 62 | find libs -name '*.py' -print |
62      mkdir -p %i/lib/$(dirname $f)
63      install -c $f %i/lib/$f
64    done
67 [ $(uname) = Darwin ] &&
68  for f in %i/lib/*.$so %i/lib/*.$so; do
69    install_name_tool -id $f $f
70  done
65  
66   # Do all manipulation with files before creating symbolic links:
67   perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
68   #strip %i/lib/*.$so
69  
70 + for l in `find %i/lib -name "*.$so.*"`
71 + do
72 +  ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
73 + done
74  
77 #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
78 #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
79 (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/.%{realversion}$//"); done)
80 (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/-$boost_abi//" | sed "s/.%{realversion}$//"); done)
81 (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/-$boost_abi//" | sed "s/.%{realversion}$//" | sed "s/gcc$linkgccver/gcc/"); done)
82 #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
83 #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
75   (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
76  
77   getLibName()
78   {
79 <  libname=`find %i/lib -name "libboost_$1*mt*" -exec basename {} \;`
79 >  libname=`find %i/lib -name "libboost_$1*mt*.$so" -exec basename {} \;`
80    echo $libname | sed -e 's|[.][^-]*$||;s|^lib||'
81   }
82  
83   export BOOST_THREAD_LIB=`getLibName thread`
84   export BOOST_SIGNALS_LIB=`getLibName signals`
85   export BOOST_FILESYSTEM_LIB=`getLibName filesystem`
86 + export BOOST_SYSTEM_LIB=`getLibName system`
87   export BOOST_PROGRAM_OPTIONS_LIB=`getLibName program_options`
88   export BOOST_PYTHON_LIB=`getLibName python`
89   export BOOST_REGEX_LIB=`getLibName regex`
# Line 122 | Line 114 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
114   <Tool name=boost_filesystem version=%v>
115   <info url="http://www.boost.org"></info>
116   <lib name="@BOOST_FILESYSTEM_LIB@">
117 + <use name=boost_system>
118 + <use name=boost>
119 + </Tool>
120 + EOF_TOOLFILE
121 +
122 + # boost_system toolfile
123 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_system
124 + <doc type=BuildSystem::ToolDoc version=1.0>
125 + <Tool name=boost_system version=%v>
126 + <info url="http://www.boost.org"></info>
127 + <lib name="@BOOST_SYSTEM_LIB@">
128   <use name=boost>
129   </Tool>
130   EOF_TOOLFILE

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines