3 # - think about building MPI.
4 # - split shared libs from core package into -iostreams/-serialization.
7 %bcond_without python # without boost-python support
9 %define _fver %(echo %{version} | tr . _)
10 Summary: The Boost C++ Libraries
11 Summary(pl.UTF-8): Biblioteki C++ "Boost"
15 License: Boost Software License and others
17 Source0: http://dl.sourceforge.net/boost/%{name}_%{_fver}.tar.bz2
18 # Source0-md5: 8d9f990bfb7e83769fa5f1d6f065bc92
19 Patch0: %{name}-climits.patch
20 Patch1: %{name}-link.patch
21 Patch2: %{name}-ticket-2499.patch
22 Patch3: %{name}-gcc43.patch
23 URL: http://www.boost.org/
24 BuildRequires: boost-jam >= 3.1.12
25 BuildRequires: bzip2-devel
26 BuildRequires: expat-devel
27 BuildRequires: libicu-devel
28 BuildRequires: libstdc++-devel
29 BuildRequires: perl-base
30 %{?with_python:BuildRequires: python-devel >= 2.2}
31 BuildRequires: rpm-pythonprov
32 BuildRequires: zlib-devel
33 BuildConflicts: gcc = 5:3.3.1
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 The Boost web site provides free peer-reviewed portable C++ source
38 libraries. The emphasis is on libraries which work well with the C++
39 Standard Library. One goal is to establish "existing practice" and
40 provide reference implementations so that the Boost libraries are
41 suitable for eventual standardization. Some of the libraries have
42 already been proposed for inclusion in the C++ Standards Committee's
43 upcoming C++ Standard Library Technical Report.
45 %description -l pl.UTF-8
46 Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
47 kodem źródłowym. Nacisk położono na biblioteki, które dobrze
48 współpracują ze standardową biblioteką C++. Celem jest ustanowienie
49 "istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
50 "Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
51 już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
52 Raporcie Technicznym Biblioteki Standardowej C++
55 Summary: Boost C++ development headers
56 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek C++ Boost
57 Group: Development/Libraries
58 Requires: %{name} = %{version}-%{release}
59 Requires: %{name}-date_time = %{version}-%{release}
60 Requires: %{name}-filesystem = %{version}-%{release}
61 Requires: %{name}-graph = %{version}-%{release}
62 Requires: %{name}-program_options = %{version}-%{release}
63 Requires: %{name}-regex = %{version}-%{release}
64 Requires: %{name}-signals = %{version}-%{release}
65 Requires: %{name}-system = %{version}-%{release}
66 Requires: %{name}-test = %{version}-%{release}
67 Requires: %{name}-thread = %{version}-%{release}
68 Requires: %{name}-wave = %{version}-%{release}
69 Requires: libstdc++-devel
70 Obsoletes: boost-any-devel
71 Obsoletes: boost-array-devel
73 Obsoletes: boost-bind-devel
74 Obsoletes: boost-call_traits-devel
75 Obsoletes: boost-compatibility-devel
76 Obsoletes: boost-compose-devel
77 Obsoletes: boost-compressed_pair-devel
78 Obsoletes: boost-concept_check-devel
79 Obsoletes: boost-conversion-devel
80 Obsoletes: boost-crc-devel
81 Obsoletes: boost-date_time-devel
82 Obsoletes: boost-filesystem-devel
83 Obsoletes: boost-graph-devel
84 Obsoletes: boost-mem_fn-devel
85 Obsoletes: boost-mpl-devel
86 Obsoletes: boost-preprocessor-devel
87 Obsoletes: boost-program_options-devel
88 Obsoletes: boost-ref-devel
89 Obsoletes: boost-regex-devel
90 Obsoletes: boost-signals-devel
91 Obsoletes: boost-spirit-devel
92 Obsoletes: boost-statechart-devel
93 Obsoletes: boost-static_assert-devel
94 Obsoletes: boost-test-devel
95 Obsoletes: boost-thread-devel
96 Obsoletes: boost-tr1-devel
97 Obsoletes: boost-type_traits-devel
98 Obsoletes: boost-typeof-devel
99 Obsoletes: boost-uBLAS-devel
100 Obsoletes: boost-utility-devel
101 Obsoletes: boost-wave-devel
102 Obsoletes: boost-xpressive-devel
105 Header files for the Boost C++ libraries.
107 %description devel -l pl.UTF-8
108 Pliki nagłówkowe bibliotek C++ Boost.
111 Summary: Static version of base Boost C++ libraries
112 Summary(pl.UTF-8): Statyczne wersje podstawowych bibliotek C++ Boost
113 Group: Development/Libraries
114 Requires: %{name}-devel = %{version}-%{release}
115 Obsoletes: boost-static < 1.33
118 Static version of base Boost C++ libraries.
120 %description static -l pl.UTF-8
121 Statyczne wersje podstawowych bibliotek C++ Boost.
124 Summary: Boost.Python library
125 Summary(pl.UTF-8): biblioteka Boost.Python
127 %pyrequires_eq python
130 Use the Boost Python Library to quickly and easily export a C++
131 library to Python such that the Python interface is very similar to
132 the C++ interface. It is designed to be minimally intrusive on your
133 C++ design. In most cases, you should not have to alter your C++
134 classes in any way in order to use them with Boost.Python. The system
135 should simply ``reflect'' your C++ classes and functions into Python.
137 %description python -l pl.UTF-8
138 Biblioteka Boost Python służy do szybkiego i prostego eksportu
139 biblioteki C++ do Pythona, tak że interfejs Pythona jest bardzo
140 podobny do interfejsu C++. Biblioteka jest zaprojektowana tak, żeby
141 narzucać jak najmniej wymagań dotyczących konstrukcjii C++. W
142 większości przypadków nie trzeba w ogóle zmieniać własnych klas C++,
143 żeby używać ich z Boost.Python. System powinien po prostu ,,odbić''
144 klasy C++ i funkcje do Pythona.
146 %package python-devel
147 Summary: Boost.Python development headers
148 Summary(pl.UTF-8): Pliki nagłówkowe dla Boost.Python
149 Group: Development/Libraries
150 Requires: %{name}-devel = %{version}-%{release}
151 Requires: %{name}-python = %{version}-%{release}
153 %description python-devel
154 Headers for the Boost.Python library.
156 %description python-devel -l pl.UTF-8
157 Pliki nagłówkowe dla biblioteki Boost.Python.
159 %package python-static
160 Summary: Static version of Boost.Python library
161 Summary(pl.UTF-8): Statyczna wersja biblioteki Boost.Python
162 Group: Development/Libraries
163 Requires: %{name}-python-devel = %{version}-%{release}
165 %description python-static
166 Static version of Boost.Python library.
168 %description python-static -l pl.UTF-8
169 Statyczna wersja biblioteki Boost.Python.
172 Summary: Date-Time library
173 Summary(pl.UTF-8): Biblioteka daty-czasu
175 Obsoletes: boost < 1.33
177 %description date_time
178 A set of date-time libraries.
180 %description date_time -l pl.UTF-8
181 Zbiór bibliotek daty-czasu.
184 Summary: Portable paths, iteration over directories, and other useful filesystem operations
185 Summary(pl.UTF-8): Przenośne ścieżki, iteracje katalogów i inne użyteczne operacje na systemie plików
187 Requires: %{name}-system = %{version}-%{release}
188 Obsoletes: boost < 1.33
190 %description filesystem
191 The boost::filesystem library provides portable facilities to query
192 and manipulate paths, files, and directories.
194 %description filesystem -l pl.UTF-8
195 Przenośna biblioteka boost::filesystem dostarcza ułatwienia w
196 operacjach na ścieżkach, plikach i katalogach.
199 Summary: General purpose, generic C++ library for graph data structures and graph algorithms
200 Summary(pl.UTF-8): Biblioteka ogólnego przeznaczenia w C++ dla struktur danych typu grafy oraz algorytmów związanych z grafami
204 The boost::graph library provides portable facilities to operate on
205 graph data structures using graph algorithms.
207 %description graph -l pl.UTF-8
208 Przenośna biblioteka boost::graph dostarcza ułatwienia w operacjach na
209 strukturach danych typu graf za pomocą algorytmów związanych z
212 %package program_options
213 Summary: Access to program options, via conventional methods such as command line and config file
214 Summary(pl.UTF-8): Dostęp do opcji programu za pomocą typowych metod, jak linia poleceń i plik konfiguracyjny
217 %description program_options
218 The program_options library allows program developers to obtain
219 program options, that is (name, value) pairs from the user, via
220 conventional methods such as command line and config file.
222 %description program_options -l pl.UTF-8
223 Biblioteka program_options umożliwia uzyskanie od użytkownika opcji
224 programu, czyli par (nazwa, wartość), za pomocą typowych metod, takich
225 jak linia poleceń, czy plik konfiguracyjny.
228 Summary: Boost C++ regular expressions library
229 Summary(pl.UTF-8): Biblioteka wyrażeń regularnych Boost C++
233 Shared library for Boost C++ regular expressions.
235 %description regex -l pl.UTF-8
236 Biblioteka wyrażeń regularnych dla C++, biblioteki dzielone.
239 Summary: Signals & slots callback implementation
240 Summary(pl.UTF-8): Implementacja sygnałów i slotów
242 Obsoletes: boost < 1.33
245 The boost::signals library is an implementation of a signals and slots
248 %description signals -l pl.UTF-8
249 Biblioteka boost::signals jest implementacją systemu sygnałów i
253 Summary: Support for getting system specific error codes
254 Summary(pl.UTF-8): Wsparcie dla pobierania specyficznych dla systemu kodów błędów
258 The Boost System library provides simple, light-weight error_code
259 objects that encapsulate system-specific error code values, yet also
260 provide access to more abstract and portable error conditions objects.
263 Summary: Support for program testing and execution monitoring
264 Summary(pl.UTF-8): Wsparcie dla testowania i monitorowania programu
266 Obsoletes: boost < 1.33
269 Support for simple program testing, full unit testing, and for program
270 execution monitoring.
272 %description test -l pl.UTF-8
273 Wsparcie dla prostego testowania programu, pełnego testowania i
274 monitorowania wykonania programu.
277 Summary: Portable C++ threads library
278 Summary(pl.UTF-8): Przenośna biblioteka wątków C++
280 Obsoletes: boost < 1.33
283 Portable C++ threads library - shared library.
285 %description thread -l pl.UTF-8
286 Przenośna biblioteka wątków dla C++ - biblioteka dzielona.
289 Summary: Boost.Wave - a standard compliant C++ preprocessor library
290 Summary(pl.UTF-8): Boost.Wave - zgodna ze standardem biblioteka preprocesora C++
291 Group: Development/Libraries
294 Boost.Wave - a standard compliant C++ preprocessor library.
296 %description wave -l pl.UTF-8
297 Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
300 Summary: Boost C++ Library documentation
301 Summary(pl.UTF-8): Dokumentacja dla biblioteki Boost C++
303 Requires: %{name}-devel = %{version}-%{release}
306 Documentation for the Boost C++ Library.
308 %description doc -l pl.UTF-8
309 Dokumentacja dla biblioteki Boost C++.
312 %setup -q -n %{name}_%{_fver}
318 # - don't know how to pass it through (b)jam -s (no way?)
319 # due to oversophisticated build flags system.
320 # - pass -fPIC due to <shared-linkable> removal.
321 %{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
323 # cleanup -g switch to avoid override debuginfocflags.
324 %{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
325 # link against shared expat library.
326 %{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
329 # -pthread gcc parameter doesn't add _REENTRANT to cpp macros on alpha (only)
330 # don't know, is it gcc bug or intentional omission?
331 # anyway, boost check of -D_REENTRANT in its headers, so it's needed here
332 %{__perl} -pi -e 's/(CFLAGS.*-pthread)/$1 -D_REENTRANT/' tools/build/v1/gcc-tools.jam
335 cat << EOF > tools/build/v2/user-config.jam
336 using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
341 PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
342 PYTHON_ROOT=%{_prefix}
347 EXPAT_INCLUDE=%{_includedir} \
348 EXPAT_LIBPATH=%{_libdir} \
349 ICU_PATH=%{_prefix} \
352 variant=release debug-symbols=on inlining=on link=static,shared threading=multi
355 rm -rf $RPM_BUILD_ROOT
356 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
358 cp -rf boost $RPM_BUILD_ROOT%{_includedir}
360 install bin.v2/libs/*/build/gcc-*/release/debug-symbols-on/inlining-on/link-static/threading-multi/lib*.a $RPM_BUILD_ROOT%{_libdir}
361 install bin.v2/libs/*/build/gcc-*/release/debug-symbols-on/inlining-on/threading-multi/lib*.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
363 # create symlinks without -gccXX-mt-* things in names
364 for f in $RPM_BUILD_ROOT%{_libdir}/*.so.*.*.*; do
365 [ -f "$f" ] || continue
367 soname=$(basename "$f" | sed -e 's#-gcc..-mt-.*#.so#g')
368 ln -s "$f" "$RPM_BUILD_ROOT%{_libdir}/$soname"
370 for f in $RPM_BUILD_ROOT%{_libdir}/*.a; do
371 [ -f "$f" ] || continue
373 soname=$(basename "$f" | sed -e 's#-gcc..-mt-.*#.a#g')
374 ln -s "$f" "$RPM_BUILD_ROOT%{_libdir}/$soname"
378 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
380 # as the documentation doesn't completely reside in a directory of its
381 # own, we need to find out ourselves... this looks for HTML files and
382 # then collects everything linked from those. this is certainly quite
383 # unoptimized wrt mkdir calls, but does it really matter?
385 for i in $(find -type f -name '*.htm*'); do
386 # bjam docu is included in the boost-jam RPM
387 if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
388 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/${i%/*}
389 for LINKED in `%{__perl} - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
393 # rewrite links from boost/* to %{_includedir}/boost/* and
394 # ignore external links as well as document-internal ones.
395 # HTML files are also ignored as they get installed anyway.
396 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
398 (my $file = $link) =~ s/\#.*//;
404 open OUT, ">@ARGV[1]";
408 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
409 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
411 $in_link = /href|src=\s*$/;
414 TARGET=${i%/*}/$LINKED
415 # ignore non-existant linked files
416 if test -f $TARGET; then
417 install -D -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
425 rm -rf $RPM_BUILD_ROOT
427 %post -p /sbin/ldconfig
428 %postun -p /sbin/ldconfig
430 %post date_time -p /sbin/ldconfig
431 %postun date_time -p /sbin/ldconfig
433 %post filesystem -p /sbin/ldconfig
434 %postun filesystem -p /sbin/ldconfig
436 %post graph -p /sbin/ldconfig
437 %postun graph -p /sbin/ldconfig
439 %post python -p /sbin/ldconfig
440 %postun python -p /sbin/ldconfig
442 %post program_options -p /sbin/ldconfig
443 %postun program_options -p /sbin/ldconfig
445 %post regex -p /sbin/ldconfig
446 %postun regex -p /sbin/ldconfig
448 %post signals -p /sbin/ldconfig
449 %postun signals -p /sbin/ldconfig
451 %post system -p /sbin/ldconfig
452 %postun system -p /sbin/ldconfig
454 %post test -p /sbin/ldconfig
455 %postun test -p /sbin/ldconfig
457 %post wave -p /sbin/ldconfig
458 %postun wave -p /sbin/ldconfig
460 %post thread -p /sbin/ldconfig
461 %postun thread -p /sbin/ldconfig
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_libdir}/libboost_iostreams*.so.*.*.*
466 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
467 %attr(755,root,root) %{_libdir}/libboost_serialization*.so.*.*.*
468 %attr(755,root,root) %{_libdir}/libboost_wserialization*.so.*.*.*
471 %defattr(644,root,root,755)
473 %attr(755,root,root) %{_libdir}/libboost_date_time*.so
474 %attr(755,root,root) %{_libdir}/libboost_filesystem*.so
475 %attr(755,root,root) %{_libdir}/libboost_graph*.so
476 %attr(755,root,root) %{_libdir}/libboost_iostreams*.so
477 %attr(755,root,root) %{_libdir}/libboost_math_*.so
478 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor*.so
479 %attr(755,root,root) %{_libdir}/libboost_program_options*.so
480 %attr(755,root,root) %{_libdir}/libboost_regex*.so
481 %attr(755,root,root) %{_libdir}/libboost_serialization*.so
482 %attr(755,root,root) %{_libdir}/libboost_signals*.so
483 %attr(755,root,root) %{_libdir}/libboost_system*.so
484 %attr(755,root,root) %{_libdir}/libboost_thread*.so
485 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework*.so
486 %attr(755,root,root) %{_libdir}/libboost_wave*.so
487 %attr(755,root,root) %{_libdir}/libboost_wserialization*.so
490 %defattr(644,root,root,755)
491 %{_libdir}/libboost_date_time*.a
492 %{_libdir}/libboost_filesystem*.a
493 %{_libdir}/libboost_grap*.a
494 %{_libdir}/libboost_iostreams*.a
495 %{_libdir}/libboost_math_*.a
496 %{_libdir}/libboost_prg_exec_monitor*.a
497 %{_libdir}/libboost_program_options*.a
498 %{_libdir}/libboost_regex*.a
499 %{_libdir}/libboost_serialization*.a
500 %{_libdir}/libboost_signals*.a
501 %{_libdir}/libboost_system*.a
502 %{_libdir}/libboost_test_exec_monitor*.a
503 %{_libdir}/libboost_thread*.a
504 %{_libdir}/libboost_unit_test_framework*.a
505 %{_libdir}/libboost_wave*.a
506 %{_libdir}/libboost_wserialization*.a
510 %defattr(644,root,root,755)
511 %attr(755,root,root) %{_libdir}/libboost_python*.so.*.*.*
514 %defattr(644,root,root,755)
515 %attr(755,root,root) %{_libdir}/libboost_python*.so
516 %{_includedir}/boost/python
517 %{_includedir}/boost/python.hpp
520 %defattr(644,root,root,755)
521 %{_libdir}/libboost_python*.a
525 %defattr(644,root,root,755)
526 %attr(755,root,root) %{_libdir}/libboost_date_time*.so.*.*.*
529 %defattr(644,root,root,755)
530 %attr(755,root,root) %{_libdir}/libboost_filesystem*.so.*.*.*
533 %defattr(644,root,root,755)
534 %attr(755,root,root) %{_libdir}/libboost_graph*.so.*.*.*
536 %files program_options
537 %defattr(644,root,root,755)
538 %attr(755,root,root) %{_libdir}/libboost_program_options*.so.*.*.*
541 %defattr(644,root,root,755)
542 %attr(755,root,root) %{_libdir}/libboost_regex*.so.*.*.*
545 %defattr(644,root,root,755)
546 %attr(755,root,root) %{_libdir}/libboost_signals*.so.*.*.*
549 %defattr(644,root,root,755)
550 %attr(755,root,root) %{_libdir}/libboost_system*.so.*.*.*
553 %defattr(644,root,root,755)
554 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor*.so.*.*.*
555 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework*.so.*.*.*
558 %defattr(644,root,root,755)
559 %attr(755,root,root) %{_libdir}/libboost_thread*.so.*.*.*
562 %defattr(644,root,root,755)
563 %attr(755,root,root) %{_libdir}/libboost_wave*.so.*.*.*
566 %defattr(644,root,root,755)
567 %{_docdir}/%{name}-%{version}