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.23 by elmer, Fri Sep 21 21:05:54 2007 UTC vs.
Revision 1.49 by lat, Sat Oct 31 21:48:38 2009 UTC

# Line 1 | Line 1
1 < ### RPM external boost 1.33.1-CMS3q
2 < # Patches and build fudging by Lassi A. Tuura <lat@iki.fi> (FIXME: contribute to boost)
1 > ### RPM external boost 1.40.0
2   %define boostver _%(echo %realversion | tr . _)
3 < Requires: boost-build python bz2lib zlib
4 < Source: http://dl.sourceforge.net/sourceforge/%n/%{n}%{boostver}.tar.gz
3 > Source: http://internap.dl.sourceforge.net/sourceforge/%{n}/%{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}
# Line 12 | Line 17 | Source: http://dl.sourceforge.net/source
17   # missing symbols), causing darwin to fail to link and bjam to return
18   # an error.  So ignore the exit code from bjam on darwin to avoid
19   # RPM falsely detecting a problem.
20 + PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
21   PR="PYTHON_ROOT=$PYTHON_ROOT"
22 < #PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*$//')"
22 >
23   # The following line assumes a version of the form x.y.z-XXXX, where the
24   # "-XXXX" part represents some CMS rebuild of version x.y.z
19 PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
25   BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
21 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
26   BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
27 +
28 + %if "%online" != "true"
29 + ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
30   ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
31  
32   case $(uname) in
33 <  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
33 >  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
34    * )       bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
35   esac
36 + %else
37 + bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
38 + %endif
39  
40   %install
31 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
41   case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
42   #no debug libs...
43   #mkdir -p %i/lib/debug
44   mkdir %i/lib
45   #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
46 < (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp  {} %i/lib/. \;)
46 > # Perhaps the following could be done with a wildcard for the darwin/gcc dir
47 > case %cmsplatf in
48 >  osx*)
49 >    (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp  {} %i/lib/. \;)
50 >    ;;
51 >  * )
52 >    (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp  {} %i/lib/. \;)
53 >    ;;
54 > esac
55 >
56   find boost -name '*.[hi]*' -print |
57    while read f; do
58      mkdir -p %i/include/$(dirname $f)
# Line 45 | Line 63 | find libs -name '*.py' -print |
63      mkdir -p %i/lib/$(dirname $f)
64      install -c $f %i/lib/$f
65    done
48 [ $(uname) = Darwin ] &&
49  for f in %i/lib/*.$so %i/lib/debug/*.$so; do
50    install_name_tool -id $f $f
51  done
66  
67   # Do all manipulation with files before creating symbolic links:
68   perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
69 < strip %i/lib/*.$so
69 > #strip %i/lib/*.$so
70 >
71 > for l in `find %i/lib -name "*.$so.*"`
72 > do
73 >  ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
74 > done
75  
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.%realversion ; 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.%realversion; done)
76   (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
77  
78 + getLibName()
79 + {
80 +  libname=`find %i/lib -name "libboost_$1.$so" -exec basename {} \;`
81 +  echo $libname | sed -e 's|[.][^-]*$||;s|^lib||'
82 + }
83 +
84 + export BOOST_THREAD_LIB=`getLibName thread`
85 + export BOOST_SIGNALS_LIB=`getLibName signals`
86 + export BOOST_FILESYSTEM_LIB=`getLibName filesystem`
87 + export BOOST_SYSTEM_LIB=`getLibName system`
88 + export BOOST_PROGRAM_OPTIONS_LIB=`getLibName program_options`
89 + export BOOST_PYTHON_LIB=`getLibName python`
90 + export BOOST_REGEX_LIB=`getLibName regex`
91 + export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
92 +
93   # SCRAM ToolBox toolfile
94   mkdir -p %i/etc/scram.d
95   # boost toolfile
# Line 67 | Line 97 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
97   <doc type=BuildSystem::ToolDoc version=1.0>
98   <Tool name=boost version=%v>
99   <info url="http://www.boost.org"></info>
100 < <lib name=boost_thread-gcc-mt>
101 < <lib name=boost_signals-gcc-mt>
100 > <lib name="@BOOST_THREAD_LIB@">
101 > <lib name="@BOOST_SIGNALS_LIB@">
102   <Client>
103   <Environment name=BOOST_BASE default="%i"></Environment>
104   <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
# Line 85 | Line 115 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
115   <doc type=BuildSystem::ToolDoc version=1.0>
116   <Tool name=boost_filesystem version=%v>
117   <info url="http://www.boost.org"></info>
118 < <lib name=boost_filesystem-gcc-mt>
118 > <lib name="@BOOST_FILESYSTEM_LIB@">
119 > <use name=boost_system>
120 > <use name=boost>
121 > </Tool>
122 > EOF_TOOLFILE
123 >
124 > # boost_system toolfile
125 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_system
126 > <doc type=BuildSystem::ToolDoc version=1.0>
127 > <Tool name=boost_system version=%v>
128 > <info url="http://www.boost.org"></info>
129 > <lib name="@BOOST_SYSTEM_LIB@">
130   <use name=boost>
131   </Tool>
132   EOF_TOOLFILE
# Line 95 | Line 136 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
136   <doc type=BuildSystem::ToolDoc version=1.0>
137   <Tool name=boost_program_options version=%v>
138   <info url="http://www.boost.org"></info>
139 < <lib name=boost_program_options-gcc-mt>
139 > <lib name="@BOOST_PROGRAM_OPTIONS_LIB@">
140   <use name=boost>
141   </Tool>
142   EOF_TOOLFILE
# Line 105 | Line 146 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
146   <doc type=BuildSystem::ToolDoc version=1.0>
147   <Tool name=boost_python version=%v>
148   <info url="http://www.boost.org"></info>
149 < <lib name=boost_python-gcc-mt>
149 > <lib name="@BOOST_PYTHON_LIB@">
150   <Client>
151   <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
152 < <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
152 > <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python@PYTHONV@/site-packages/Pyste/pyste.py"></Environment>
153   <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
154   <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
155   </Client>
# Line 123 | Line 164 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
164   <doc type=BuildSystem::ToolDoc version=1.0>
165   <Tool name=boost_regex version=%v>
166   <info url="http://www.boost.org"></info>
167 < <lib name=boost_regex-gcc-mt>
167 > <lib name="@BOOST_REGEX_LIB@">
168   <use name=boost>
169   </Tool>
170   EOF_TOOLFILE
# Line 133 | Line 174 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
174   <doc type=BuildSystem::ToolDoc version=1.0>
175   <Tool name=boost_signals version=%v>
176   <info url="http://www.boost.org"></info>
177 < <lib name=boost_signals-gcc-mt>
177 > <lib name="@BOOST_SIGNALS_LIB@">
178   <use name=boost>
179   </Tool>
180   EOF_TOOLFILE
181  
182 + perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*
183 +
184   %post
185   %{relocateConfig}etc/scram.d/boost
186   %{relocateConfig}etc/scram.d/boost_filesystem

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines