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.13 by elmer, Tue May 22 10:24:07 2007 UTC vs.
Revision 1.39 by elmer, Tue Jan 27 15:30:45 2009 UTC

# Line 1 | Line 1
1 < ### RPM external boost 1.33.1-XXXX
2 < # Patches and build fudging by Lassi A. Tuura <lat@iki.fi> (FIXME: contribute to boost)
1 > ### RPM external boost 1.37.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 > Patch0: boost-1.37.0-gccxml-intrinsics
5 >
6 > Requires: boost-build python bz2lib
7 > %if "%cmsplatf" != "slc4onl_ia32_gcc346"
8 > Requires: zlib
9 > %endif
10  
11   %prep
12   %setup -n %{n}%{boostver}
13 + %patch0 -p1
14  
15   %build
16   # Note that some targets will fail to build (the test programs have
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
25   BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
18 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
26   BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
27 +
28 + %if "%cmsplatf" != "slc4onl_ia32_gcc346"
29 + ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
30   ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
31  
32   case $(uname) in
33 <  Darwin )  bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
34 <  * )       bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
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
41 +
42 + linkgccver=%(echo %gccver | tr -d . | perl -pe 's/^(\d\d).*/$1/')
43 +
44   boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
45   case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
46 < mkdir -p %i/lib/debug
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 \;)
46 > #no debug libs...
47 > #mkdir -p %i/lib/debug
48 > mkdir %i/lib
49 > #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
50 > # Perhaps the following could be done with a wildcard for the darwin/gcc dir
51 > case $(uname) in
52 >  Darwin )
53 >    (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp  {} %i/lib/. \;)
54 >    ;;
55 >   * )
56 >    (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp  {} %i/lib/. \;)
57 >    ;;
58 > esac
59   find boost -name '*.[hi]*' -print |
60    while read f; do
61      mkdir -p %i/include/$(dirname $f)
# Line 41 | Line 67 | find libs -name '*.py' -print |
67      install -c $f %i/lib/$f
68    done
69   [ $(uname) = Darwin ] &&
70 <  for f in %i/lib/*.$so %i/lib/debug/*.$so; do
70 >  for f in %i/lib/*.$so %i/lib/*.$so; do
71      install_name_tool -id $f $f
72    done
73  
74 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
49 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
50 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
51 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
52 < (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
53 <
74 > # Do all manipulation with files before creating symbolic links:
75   perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
76 + #strip %i/lib/*.$so
77 +
78 +
79 + #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
80 + #(cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
81 + (cd %i/lib; for f in lib*-$boost_abi.$so.%{realversion}; do ln -s $f $(echo $f | sed "s/.%{realversion}$//"); done)
82 + (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)
83 + (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)
84 + #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
85 + #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
86 + (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
87  
88 + # SCRAM ToolBox toolfile
89 + mkdir -p %i/etc/scram.d
90 + # boost toolfile
91 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
92 + <doc type=BuildSystem::ToolDoc version=1.0>
93 + <Tool name=boost version=%v>
94 + <info url="http://www.boost.org"></info>
95 + <lib name=boost_thread-gcc-mt>
96 + <lib name=boost_signals-gcc-mt>
97 + <Client>
98 + <Environment name=BOOST_BASE default="%i"></Environment>
99 + <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
100 + <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
101 + </Client>
102 + <use name=sockets>
103 + <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
104 + <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
105 + </Tool>
106 + EOF_TOOLFILE
107 +
108 + # boost_filesystem toolfile
109 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
110 + <doc type=BuildSystem::ToolDoc version=1.0>
111 + <Tool name=boost_filesystem version=%v>
112 + <info url="http://www.boost.org"></info>
113 + <lib name=boost_filesystem-gcc-mt>
114 + <use name=boost>
115 + </Tool>
116 + EOF_TOOLFILE
117 +
118 + # boost_program_options toolfile
119 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
120 + <doc type=BuildSystem::ToolDoc version=1.0>
121 + <Tool name=boost_program_options version=%v>
122 + <info url="http://www.boost.org"></info>
123 + <lib name=boost_program_options-gcc-mt>
124 + <use name=boost>
125 + </Tool>
126 + EOF_TOOLFILE
127 +
128 + # boost_python toolfile
129 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
130 + <doc type=BuildSystem::ToolDoc version=1.0>
131 + <Tool name=boost_python version=%v>
132 + <info url="http://www.boost.org"></info>
133 + <lib name=boost_python-gcc-mt>
134 + <Client>
135 + <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
136 + <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
137 + <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
138 + <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
139 + </Client>
140 + <use name=elementtree>
141 + <use name=gccxml>
142 + <use name=python>
143 + </Tool>
144 + EOF_TOOLFILE
145 +
146 + # boost_regex toolfile
147 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
148 + <doc type=BuildSystem::ToolDoc version=1.0>
149 + <Tool name=boost_regex version=%v>
150 + <info url="http://www.boost.org"></info>
151 + <lib name=boost_regex-gcc-mt>
152 + <use name=boost>
153 + </Tool>
154 + EOF_TOOLFILE
155 +
156 + # boost_signals toolfile
157 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
158 + <doc type=BuildSystem::ToolDoc version=1.0>
159 + <Tool name=boost_signals version=%v>
160 + <info url="http://www.boost.org"></info>
161 + <lib name=boost_signals-gcc-mt>
162 + <use name=boost>
163 + </Tool>
164 + EOF_TOOLFILE
165 +
166 + %post
167 + %{relocateConfig}etc/scram.d/boost
168 + %{relocateConfig}etc/scram.d/boost_filesystem
169 + %{relocateConfig}etc/scram.d/boost_program_options
170 + %{relocateConfig}etc/scram.d/boost_python
171 + %{relocateConfig}etc/scram.d/boost_regex
172 + %{relocateConfig}etc/scram.d/boost_signals

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines