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.45 by muzaffar, Thu Jun 18 16:02:47 2009 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.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" != "true"
8 > Requires: zlib
9 > %endif
10  
11   %prep
12   %setup -n %{n}%{boostver}
11 #%patch
13  
14   %build
15   # Note that some targets will fail to build (the test programs have
16   # missing symbols), causing darwin to fail to link and bjam to return
17   # an error.  So ignore the exit code from bjam on darwin to avoid
18   # RPM falsely detecting a problem.
19 + PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
20   PR="PYTHON_ROOT=$PYTHON_ROOT"
21 < PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*$//')"
21 >
22 > # The following line assumes a version of the form x.y.z-XXXX, where the
23 > # "-XXXX" part represents some CMS rebuild of version x.y.z
24 > BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
25 > BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
26 >
27 > %if "%online" != "true"
28 > ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
29 > ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
30 >
31   case $(uname) in
32 <  Darwin )  bjam -s$PR -s$PV -sTOOLS=darwin || true ;;
33 <  * )       bjam -s$PR -s$PV -sTOOLS=gcc ;;
32 >  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
33 >  * )       bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
34   esac
35 + %else
36 + bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
37 + %endif
38  
39   %install
26 boost_abi=$(echo %boostver | sed 's/^_//; s/_[0-9]*$//')
40   case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
41 < mkdir -p %i/lib/debug
42 < (cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
43 < (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp {} %i/lib \;)
44 < find boost -name '*.h' -o -name '*.hpp' -print |
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 %cmsplatf in
47 >  osx*)
48 >    (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp  {} %i/lib/. \;)
49 >    ;;
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)
58      install -c $f %i/include/$f
# Line 38 | 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/debug/*.$so; do
67 <    install_name_tool -id $f $f
68 <  done
69 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
70 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%v ; done)
71 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
72 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%v; 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/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
94 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
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_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>
103 > <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
104 > </Client>
105 > <use name=sockets>
106 > <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
107 > <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
108 > </Tool>
109 > EOF_TOOLFILE
110 >
111 > # boost_filesystem toolfile
112 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
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_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
131 >
132 > # boost_program_options toolfile
133 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
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_LIB@">
138 > <use name=boost>
139 > </Tool>
140 > EOF_TOOLFILE
141 >
142 > # boost_python toolfile
143 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
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_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>
151 > <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
152 > <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
153 > </Client>
154 > <use name=elementtree>
155 > <use name=gccxml>
156 > <use name=python>
157 > </Tool>
158 > EOF_TOOLFILE
159 >
160 > # boost_regex toolfile
161 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
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_LIB@">
166 > <use name=boost>
167 > </Tool>
168 > EOF_TOOLFILE
169 >
170 > # boost_signals toolfile
171 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
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_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
185 > %{relocateConfig}etc/scram.d/boost_program_options
186 > %{relocateConfig}etc/scram.d/boost_python
187 > %{relocateConfig}etc/scram.d/boost_regex
188 > %{relocateConfig}etc/scram.d/boost_signals

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines