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.2 by argiro, Fri Feb 10 14:18:09 2006 UTC vs.
Revision 1.33 by elmer, Mon Dec 31 18:07:11 2007 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.34.1-CMS19
2 > %define boostver _%(echo %realversion | tr . _)
3 > %define gccver %(echo $GCC_VERSION | cut -d. -f1,2 | sed -e 's/\.//')
4 > Source: http://internap.dl.sourceforge.net/sourceforge/%{n}/%{n}%{boostver}.tar.gz
5 >
6 > Requires: boost-build python bz2lib
7 > %if "%{?online_release:set}" != "set"
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_release:set}" != "set"
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
40 < boost_abi=$(echo %boostver | sed 's/^_//; s/_[0-9]*$//')
40 > boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
41   case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
42 < mkdir -p %i/lib/debug
43 < (cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
44 < (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp {} %i/lib \;)
45 < find boost -name '*.h' -o -name '*.hpp' -print |
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 > # Perhaps the following could be done with a wildcard for the darwin/gcc dir
47 > case $(uname) in
48 >  Darwin )
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 > 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 39 | Line 63 | find libs -name '*.py' -print |
63      install -c $f %i/lib/$f
64    done
65   [ $(uname) = Darwin ] &&
66 <  for f in %i/lib/*.$so %i/lib/debug/*.$so; do
66 >  for f in %i/lib/*.$so %i/lib/*.$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/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
69 >
70 > # Do all manipulation with files before creating symbolic links:
71 > perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
72 > #strip %i/lib/*.$so
73 >
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%{gccver}/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)
82 > (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
83 >
84 > # SCRAM ToolBox toolfile
85 > mkdir -p %i/etc/scram.d
86 > # boost toolfile
87 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
88 > <doc type=BuildSystem::ToolDoc version=1.0>
89 > <Tool name=boost version=%v>
90 > <info url="http://www.boost.org"></info>
91 > <lib name=boost_thread-gcc-mt>
92 > <lib name=boost_signals-gcc-mt>
93 > <Client>
94 > <Environment name=BOOST_BASE default="%i"></Environment>
95 > <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
96 > <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
97 > </Client>
98 > <use name=sockets>
99 > <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
100 > <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
101 > </Tool>
102 > EOF_TOOLFILE
103 >
104 > # boost_filesystem toolfile
105 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
106 > <doc type=BuildSystem::ToolDoc version=1.0>
107 > <Tool name=boost_filesystem version=%v>
108 > <info url="http://www.boost.org"></info>
109 > <lib name=boost_filesystem-gcc-mt>
110 > <use name=boost>
111 > </Tool>
112 > EOF_TOOLFILE
113 >
114 > # boost_program_options toolfile
115 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
116 > <doc type=BuildSystem::ToolDoc version=1.0>
117 > <Tool name=boost_program_options version=%v>
118 > <info url="http://www.boost.org"></info>
119 > <lib name=boost_program_options-gcc-mt>
120 > <use name=boost>
121 > </Tool>
122 > EOF_TOOLFILE
123 >
124 > # boost_python toolfile
125 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
126 > <doc type=BuildSystem::ToolDoc version=1.0>
127 > <Tool name=boost_python version=%v>
128 > <info url="http://www.boost.org"></info>
129 > <lib name=boost_python-gcc-mt>
130 > <Client>
131 > <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
132 > <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
133 > <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
134 > <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
135 > </Client>
136 > <use name=elementtree>
137 > <use name=gccxml>
138 > <use name=python>
139 > </Tool>
140 > EOF_TOOLFILE
141 >
142 > # boost_regex toolfile
143 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
144 > <doc type=BuildSystem::ToolDoc version=1.0>
145 > <Tool name=boost_regex version=%v>
146 > <info url="http://www.boost.org"></info>
147 > <lib name=boost_regex-gcc-mt>
148 > <use name=boost>
149 > </Tool>
150 > EOF_TOOLFILE
151 >
152 > # boost_signals toolfile
153 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
154 > <doc type=BuildSystem::ToolDoc version=1.0>
155 > <Tool name=boost_signals version=%v>
156 > <info url="http://www.boost.org"></info>
157 > <lib name=boost_signals-gcc-mt>
158 > <use name=boost>
159 > </Tool>
160 > EOF_TOOLFILE
161 >
162 > %post
163 > %{relocateConfig}etc/scram.d/boost
164 > %{relocateConfig}etc/scram.d/boost_filesystem
165 > %{relocateConfig}etc/scram.d/boost_program_options
166 > %{relocateConfig}etc/scram.d/boost_python
167 > %{relocateConfig}etc/scram.d/boost_regex
168 > %{relocateConfig}etc/scram.d/boost_signals

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines