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.41 by eulisse, Thu Feb 12 13:14:59 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.38.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 >
5 > Requires: boost-build python bz2lib
6 > %if "%cmsplatf" != "slc4onl_ia32_gcc346"
7 > Requires: zlib
8 > %endif
9  
10   %prep
11   %setup -n %{n}%{boostver}
# Line 12 | Line 15 | Source: http://dl.sourceforge.net/source
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
19 PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
23   BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
21 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
24   BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
25 +
26 + %if "%cmsplatf" != "slc4onl_ia32_gcc346"
27 + ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
28   ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
29  
30   case $(uname) in
31 <  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
31 >  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
32    * )       bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
33   esac
34 + %else
35 + bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
36 + %endif
37  
38   %install
39 +
40 + linkgccver=%(echo %gccver | tr -d . | perl -pe 's/^(\d\d).*/$1/')
41 +
42   boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
43   case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
44   #no debug libs...
45   #mkdir -p %i/lib/debug
46   mkdir %i/lib
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/. \;)
48 > # Perhaps the following could be done with a wildcard for the darwin/gcc dir
49 > case $(uname) in
50 >  Darwin )
51 >    (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp  {} %i/lib/. \;)
52 >    ;;
53 >   * )
54 >    (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp  {} %i/lib/. \;)
55 >    ;;
56 > esac
57   find boost -name '*.[hi]*' -print |
58    while read f; do
59      mkdir -p %i/include/$(dirname $f)
# Line 46 | Line 65 | find libs -name '*.py' -print |
65      install -c $f %i/lib/$f
66    done
67   [ $(uname) = Darwin ] &&
68 <  for f in %i/lib/*.$so %i/lib/debug/*.$so; do
68 >  for f in %i/lib/*.$so %i/lib/*.$so; do
69      install_name_tool -id $f $f
70    done
71  
72   # Do all manipulation with files before creating symbolic links:
73   perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
74 < strip %i/lib/*.$so
74 > #strip %i/lib/*.$so
75  
76 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
77 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
76 >
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)
84   (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
85  
86 + getLibName()
87 + {
88 +  libname=`find %i/lib -name "libboost_$1*mt*" -exec basename {} \;`
89 +  echo $libname | sed -e 's|[.][^-]*$||;s|^lib||'
90 + }
91 +
92 + export BOOST_THREAD_LIB=`getLibName thread`
93 + export BOOST_SIGNALS_LIB=`getLibName signals`
94 + export BOOST_FILESYSTEM_LIB=`getLibName filesystem`
95 + export BOOST_PROGRAM_OPTIONS_LIB=`getLibName program_options`
96 + export BOOST_PYTHON_LIB=`getLibName python`
97 + export BOOST_REGEX_LIB=`getLibName regex`
98 +
99   # SCRAM ToolBox toolfile
100   mkdir -p %i/etc/scram.d
101   # boost toolfile
# Line 67 | Line 103 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
103   <doc type=BuildSystem::ToolDoc version=1.0>
104   <Tool name=boost version=%v>
105   <info url="http://www.boost.org"></info>
106 < <lib name=boost_thread-gcc-mt>
107 < <lib name=boost_signals-gcc-mt>
106 > <lib name="@BOOST_THREAD_LIB@">
107 > <lib name="@BOOST_SIGNALS_LIB@">
108   <Client>
109   <Environment name=BOOST_BASE default="%i"></Environment>
110   <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
# Line 85 | Line 121 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
121   <doc type=BuildSystem::ToolDoc version=1.0>
122   <Tool name=boost_filesystem version=%v>
123   <info url="http://www.boost.org"></info>
124 < <lib name=boost_filesystem-gcc-mt>
124 > <lib name="@BOOST_FILESYSTEM_LIB@">
125   <use name=boost>
126   </Tool>
127   EOF_TOOLFILE
# Line 95 | Line 131 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
131   <doc type=BuildSystem::ToolDoc version=1.0>
132   <Tool name=boost_program_options version=%v>
133   <info url="http://www.boost.org"></info>
134 < <lib name=boost_program_options-gcc-mt>
134 > <lib name="@BOOST_PROGRAM_OPTIONS_LIB@">
135   <use name=boost>
136   </Tool>
137   EOF_TOOLFILE
# Line 105 | Line 141 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
141   <doc type=BuildSystem::ToolDoc version=1.0>
142   <Tool name=boost_python version=%v>
143   <info url="http://www.boost.org"></info>
144 < <lib name=boost_python-gcc-mt>
144 > <lib name="@BOOST_PYTHON_LIB@">
145   <Client>
146   <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
147   <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
# Line 123 | Line 159 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
159   <doc type=BuildSystem::ToolDoc version=1.0>
160   <Tool name=boost_regex version=%v>
161   <info url="http://www.boost.org"></info>
162 < <lib name=boost_regex-gcc-mt>
162 > <lib name="@BOOST_REGEX_LIB@">
163   <use name=boost>
164   </Tool>
165   EOF_TOOLFILE
# Line 133 | Line 169 | cat << \EOF_TOOLFILE >%i/etc/scram.d/boo
169   <doc type=BuildSystem::ToolDoc version=1.0>
170   <Tool name=boost_signals version=%v>
171   <info url="http://www.boost.org"></info>
172 < <lib name=boost_signals-gcc-mt>
172 > <lib name="@BOOST_SIGNALS_LIB@">
173   <use name=boost>
174   </Tool>
175   EOF_TOOLFILE
176  
177 + perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*
178 +
179   %post
180   %{relocateConfig}etc/scram.d/boost
181   %{relocateConfig}etc/scram.d/boost_filesystem

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines