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.35 by ratnik, Tue Apr 8 13:22:41 2008 UTC vs.
Revision 1.45 by muzaffar, Thu Jun 18 16:02:47 2009 UTC

# Line 1 | Line 1
1 < ### RPM external boost 1.34.1-CMS20
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 "%{?online_release:set}" != "set"
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 "%{?online_release:set}" != "set"
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 linkgccver=%(echo %gccver | cut -d. -f1,2 | sed -e 's/\.//')
40 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 62 | Line 62 | find libs -name '*.py' -print |
62      mkdir -p %i/lib/$(dirname $f)
63      install -c $f %i/lib/$f
64    done
65 [ $(uname) = Darwin ] &&
66  for f in %i/lib/*.$so %i/lib/*.$so; do
67    install_name_tool -id $f $f
68  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  
75 #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
76 #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
77 (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/.%{realversion}$//"); done)
78 (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)
79 (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)
80 #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
81 #(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*.$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`
90 +
91   # SCRAM ToolBox toolfile
92   mkdir -p %i/etc/scram.d
93   # boost toolfile
# Line 88 | Line 95 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
95   <doc type=BuildSystem::ToolDoc version=1.0>
96   <Tool name=boost version=%v>
97   <info url="http://www.boost.org"></info>
98 < <lib name=boost_thread-gcc-mt>
99 < <lib name=boost_signals-gcc-mt>
98 > <lib name="@BOOST_THREAD_LIB@">
99 > <lib name="@BOOST_SIGNALS_LIB@">
100   <Client>
101   <Environment name=BOOST_BASE default="%i"></Environment>
102   <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
# Line 106 | Line 113 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
113   <doc type=BuildSystem::ToolDoc version=1.0>
114   <Tool name=boost_filesystem version=%v>
115   <info url="http://www.boost.org"></info>
116 < <lib name=boost_filesystem-gcc-mt>
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
# Line 116 | Line 134 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
134   <doc type=BuildSystem::ToolDoc version=1.0>
135   <Tool name=boost_program_options version=%v>
136   <info url="http://www.boost.org"></info>
137 < <lib name=boost_program_options-gcc-mt>
137 > <lib name="@BOOST_PROGRAM_OPTIONS_LIB@">
138   <use name=boost>
139   </Tool>
140   EOF_TOOLFILE
# Line 126 | Line 144 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
144   <doc type=BuildSystem::ToolDoc version=1.0>
145   <Tool name=boost_python version=%v>
146   <info url="http://www.boost.org"></info>
147 < <lib name=boost_python-gcc-mt>
147 > <lib name="@BOOST_PYTHON_LIB@">
148   <Client>
149   <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
150   <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
# Line 144 | Line 162 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
162   <doc type=BuildSystem::ToolDoc version=1.0>
163   <Tool name=boost_regex version=%v>
164   <info url="http://www.boost.org"></info>
165 < <lib name=boost_regex-gcc-mt>
165 > <lib name="@BOOST_REGEX_LIB@">
166   <use name=boost>
167   </Tool>
168   EOF_TOOLFILE
# Line 154 | Line 172 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
172   <doc type=BuildSystem::ToolDoc version=1.0>
173   <Tool name=boost_signals version=%v>
174   <info url="http://www.boost.org"></info>
175 < <lib name=boost_signals-gcc-mt>
175 > <lib name="@BOOST_SIGNALS_LIB@">
176   <use name=boost>
177   </Tool>
178   EOF_TOOLFILE
179  
180 + perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*
181 +
182   %post
183   %{relocateConfig}etc/scram.d/boost
184   %{relocateConfig}etc/scram.d/boost_filesystem

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines