Apply patch for [CVE-2012-2677][boost] ordered_malloc() overflow
[external/boost.git] / packaging / boost.spec
1 Name: boost
2 Summary: The Boost C++ Libraries
3 Version: 1.46.1
4 Release: 5
5 License: Boost
6 URL: http://www.boost.org/
7 Group: System/Libraries
8 Source: boost-1.46.1.tar.gz
9 Obsoletes: boost-doc <= 1.30.2
10 Obsoletes: boost-python <= 1.30.2
11 Provides: boost-doc = %{version}-%{release}
12
13 # boost is an "umbrella" package that pulls in all other boost components
14 Requires: boost-program-options = %{version}-%{release}
15 Requires: boost-thread = %{version}-%{release}
16 Requires: boost-test = %{version}-%{release}
17 Requires: boost-filesystem = %{version}-%{release}
18 Requires: boost-system = %{version}-%{release}
19
20 BuildRequires: libstdc++-devel
21 BuildRequires: bzip2-libs
22 BuildRequires: bzip2-devel
23 BuildRequires: zlib-devel
24 BuildRequires: python-devel
25 BuildRequires: libicu-devel
26 BuildRequires: chrpath
27
28 %bcond_with tests
29 %bcond_with docs_generated
30 #%define sonamever 5
31
32 %description
33 Boost provides free peer-reviewed portable C++ source libraries.  The
34 emphasis is on libraries which work well with the C++ Standard
35 Library, in the hopes of establishing "existing practice" for
36 extensions and providing reference implementations so that the Boost
37 libraries are suitable for eventual standardization. (Some of the
38 libraries have already been proposed for inclusion in the C++
39 Standards Committee's upcoming C++ Standard Library Technical Report.)
40
41 %package program-options
42 Summary:  Runtime component of boost program_options library
43 Group: System/Libraries
44 Provides: libboost_program_options.so.%{version}
45
46 %description program-options
47
48 Runtime support of boost program options library, which allows program
49 developers to obtain (name, value) pairs from the user, via
50 conventional methods such as command line and config file.
51
52 %package thread
53 Summary: Runtime component of boost thread library
54 Group: System/Libraries
55 Provides: libboost_thread.so.%{version}
56
57 %description thread
58
59 Runtime component Boost.Thread library, which provides classes and
60 functions for managing multiple threads of execution, and for
61 synchronizing data between the threads or providing separate copies of
62 data specific to individual threads.
63
64
65 %package system
66 Summary:  Runtime component of boost system library
67 Group: System/Libraries
68 Provides: libboost_system.so.%{version}
69
70 %description system
71
72 Runtime component Boost. System library, which provides simple, light-weight
73 error_code objects that encapsulate system-specific error code values,
74 yet also provide access to more abstract and portable error conditions via
75 error_condition objects.
76
77 %package filesystem
78 Summary:  Runtime component of boost filesystem library
79 Group: System/Libraries
80 Provides: libboost_filesystem.so.%{version}
81
82 %description filesystem
83
84 Runtime component Boost. FileSystem library, which provides facilities
85 to manipulate files and directories, and the paths that identify them.
86
87
88 %package devel
89 Summary: The Boost C++ headers and shared development libraries
90 Group: Development/Libraries
91 Requires: boost = %{version}-%{release}
92 Requires: boost-program-options = %{version}-%{release}
93 Requires: boost-thread = %{version}-%{release}
94 Provides: boost-system = %{version}-%{release}
95 Provides: boost-filesystem = %{version}-%{release}
96 Provides: boost-devel = %{version}-%{release}
97
98 %description devel
99 Headers and shared object symlinks for the Boost C++ libraries.
100
101 %package static
102 Summary: The Boost C++ static development libraries
103 Group: Development/Libraries
104 Requires: boost-devel = %{version}-%{release}
105 Obsoletes: boost-devel-static < 1.34.1-14
106 Provides: boost-devel-static = %{version}-%{release}
107
108 %description static
109 Static Boost C++ libraries.
110
111 %package test
112 Summary:  Runtime component of boost program_options library
113 Group: System/Libraries
114 Provides: libboost_test.so.%{version}
115
116 %description test
117
118 Boost Test
119
120 %package doc
121 Summary: The Boost C++ html docs
122 Group: Documentation
123 Provides: boost-python-docs = %{version}-%{release}
124
125 %description doc
126 HTML documentation files for Boost C++ libraries.
127
128 %prep
129 %setup -q
130 #%setup -q -n %{name}_1_46_1
131
132 #%patch0 -p0
133 #sed 's/_FEDORA_OPT_FLAGS/%{optflags}/' %{PATCH1} | %{__patch} -p0 --fuzz=0
134 #%patch2 -p0
135 #sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH3} | %{__patch} -p0 --fuzz=0
136 #%patch4 -p0
137 #%patch5 -p0
138 #%patch6 -p0
139 #%patch7 -p0
140
141 %build
142 BOOST_ROOT=`pwd`
143 export BOOST_ROOT
144
145 BOOST_LIBS="program_options,thread,system,filesystem,test"
146
147 # build make tools, ie bjam, necessary for building libs, docs, and testing
148 #(cd tools/jam/src && ./build.sh)
149 ./bootstrap.sh --with-libraries=$BOOST_LIBS
150 BJAM=`find . -name bjam -a -type f`
151 ./bjam
152
153 #CONFIGURE_FLAGS="--with-toolset=gcc"
154 #PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
155 #PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION"
156 #REGEX_FLAGS="--with-icu"
157 #./bootstrap.sh $CONFIGURE_FLAGS $PYTHON_FLAGS $REGEX_FLAGS
158
159 #%ifarch %{arm}
160 #LONGDOUBLE="--disable-long-double"
161 #%else
162 #LONGDOUBLE=""
163 #%endif
164
165 #BUILD_VARIANTS="variant=release threading=single,multi debug-symbols=on"
166 #BUILD_FLAGS="-d2 --layout=system $BUILD_VARIANTS $LONGDOUBLE"
167 #$BJAM $BUILD_FLAGS %{?_smp_mflags} stage
168
169 # build docs, requires a network connection for docbook XSLT stylesheets
170 #%if %{with docs_generated}
171 #cd ./doc
172 #chmod +x ../tools/boostbook/setup_boostbook.sh
173 #../tools/boostbook/setup_boostbook.sh
174 #USER_CFG=$BOOST_ROOT/tools/build/v2/user-config.jam
175 #$BOOST_ROOT/$BJAM --v2 -sICU_PATH=/usr --user-config=$USER_CFG html
176 #cd ..
177 #%endif
178 #
179 #%check
180 #%if %{with tests}
181 #echo "<p>" `uname -a` "</p>" > status/regression_comment.html
182 #echo "" >> status/regression_comment.html
183 #echo "<p>" `g++ --version` "</p>" >> status/regression_comment.html
184 #echo "" >> status/regression_comment.html
185 #
186 #cd tools/regression/build
187 ##$BOOST_ROOT/$BJAM
188 #cd ../test
189 ##python ./test.py
190 #cd ../../..
191 #
192 #results1=status/cs-`uname`.html
193 #results2=status/cs-`uname`-links.html
194 #email=benjamin.kosnik@gmail.com
195 #if [ -f $results1 ] && [ -f $results2 ]; then
196 #  echo "sending results starting"
197 #  testdate=`date +%Y%m%d`
198 #  testarch=`uname -m`
199 #  results=boost-results-$testdate-$testarch.tar.bz2
200 #  tar -cvf boost-results-$testdate-$testarch.tar $results1 $results2
201 #  bzip2 -f boost-results-$testdate-$testarch.tar 
202 #  echo | mutt -s "$testdate boost regression $testarch" -a $results $email 
203 #  echo "sending results finished"
204 #else
205 #  echo "error sending results"
206 #fi
207 #%endif
208
209 %install
210 rm -rf $RPM_BUILD_ROOT
211 mkdir -p $RPM_BUILD_ROOT%{_libdir}
212 mkdir -p $RPM_BUILD_ROOT%{_includedir}
213 mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
214
215 # install lib
216 for i in `find stage -type f -name \*.a`; do
217   NAME=`basename $i`;
218   install -p -m 0644 $i $RPM_BUILD_ROOT%{_libdir}/$NAME;
219 done;
220 for i in `find stage \( -type f -o -type l \) -name \*.so*`; do
221   NAME=`basename $i`;
222   install -p -m 0644 $i $RPM_BUILD_ROOT%{_libdir}/$NAME;
223   strip $RPM_BUILD_ROOT%{_libdir}/$NAME;
224 #  SONAME=$i.%{sonamever};
225 #  VNAME=$i.%{version};
226 #  base=`basename $i`;
227 #  NAMEbase=$base;
228 #  SONAMEbase=$base.%{sonamever};
229 #  VNAMEbase=$base.%{version};
230 #  mv $i $VNAME;
231 #
232 #  # remove rpath
233 #  chrpath --delete $VNAME;
234 #
235 #  ln -s $VNAMEbase $SONAME;
236 #  ln -s $VNAMEbase $NAME;
237 #  install -p -m 755 $VNAME $RPM_BUILD_ROOT%{_libdir}/$VNAMEbase;
238 #
239 #  mv $SONAME $RPM_BUILD_ROOT%{_libdir}/$SONAMEbase;
240 #  mv $NAME $RPM_BUILD_ROOT%{_libdir}/$NAMEbase;
241 done;
242
243 # install include files
244 find %{name} -type d | while read a; do
245   mkdir -p $RPM_BUILD_ROOT%{_includedir}/$a
246   find $a -mindepth 1 -maxdepth 1 -type f \
247   | xargs -r install -m 644 -p -t $RPM_BUILD_ROOT%{_includedir}/$a
248 done
249
250 # install doc files
251 DOCPATH=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
252 find libs doc more -type f \( -name \*.htm -o -name \*.html \) \
253     | sed -n '/\//{s,/[^/]*$,,;p}' \
254     | sort -u > tmp-doc-directories
255 sed "s:^:$DOCPATH:" tmp-doc-directories | xargs -r mkdir -p
256 cat tmp-doc-directories | while read a; do
257     find $a -mindepth 1 -maxdepth 1 -name \*.htm\* \
258     | xargs install -m 644 -p -t $DOCPATH$a
259 done
260 rm tmp-doc-directories
261 install -p -m 644 -t $DOCPATH LICENSE_1_0.txt index.htm
262
263 # remove scripts used to generate include files
264 find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec rm {} \;
265
266 %clean
267 rm -rf $RPM_BUILD_ROOT
268
269 %post -p /sbin/ldconfig
270
271 %postun -p /sbin/ldconfig
272
273
274 %post program-options -p /sbin/ldconfig
275
276 %postun program-options -p /sbin/ldconfig
277
278
279 %post thread -p /sbin/ldconfig
280
281 %postun thread -p /sbin/ldconfig
282
283
284 %post system -p /sbin/ldconfig
285
286 %postun system -p /sbin/ldconfig
287
288
289 %post filesystem -p /sbin/ldconfig
290
291 %postun filesystem -p /sbin/ldconfig
292
293
294 %post doc -p /sbin/ldconfig
295
296 %postun doc -p /sbin/ldconfig
297
298
299 %post devel -p /sbin/ldconfig
300
301 %postun devel -p /sbin/ldconfig
302
303
304 %post static -p /sbin/ldconfig
305
306 %postun static -p /sbin/ldconfig
307
308
309 %post test -p /sbin/ldconfig
310
311 %postun test -p /sbin/ldconfig
312
313
314 %files
315
316 %files program-options
317 %defattr(-, root, root, -)
318 %{_libdir}/libboost_program_options*.so.%{version}
319
320 %files thread
321 %defattr(-, root, root, -)
322 %{_libdir}/libboost_thread*.so.%{version}
323
324 %files system
325 %defattr(-, root, root, -)
326 %{_libdir}/libboost_system*.so.%{version}
327
328 %files filesystem
329 %defattr(-, root, root, -)
330 %{_libdir}/libboost_filesystem*.so.%{version}
331
332 %files doc
333 %defattr(-, root, root, -)
334 %doc %{_docdir}/%{name}-%{version}
335
336 %files devel
337 %defattr(-, root, root, -)
338 %{_includedir}/boost
339 %{_libdir}/*.so
340
341 %files static
342 %defattr(-, root, root, -)
343 %{_libdir}/*.a
344
345 %files test
346 %defattr(-, root, root, -)
347 %{_libdir}/libboost_unit_test_framework*.so.%{version}
348 %{_libdir}/libboost_prg_exec_monitor*.so.%{version}