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://downloads.sourceforge.net/boost/%{name}_%{fver}.tar.bz2
18 # Source0-md5: 4b6bd483b692fd138aef84ed2c8eb679
19 Patch0: %{name}-link.patch
20 URL: http://www.boost.org/
21 BuildRequires: bzip2-devel
22 BuildRequires: expat-devel
23 BuildRequires: libicu-devel
24 BuildRequires: libstdc++-devel
25 BuildRequires: perl-base
26 %{?with_python:BuildRequires: python-devel >= 2.2}
27 BuildRequires: rpm-pythonprov
28 BuildRequires: zlib-devel
29 BuildConflicts: gcc = 5:3.3.1
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 The Boost web site provides free peer-reviewed portable C++ source
34 libraries. The emphasis is on libraries which work well with the C++
35 Standard Library. One goal is to establish "existing practice" and
36 provide reference implementations so that the Boost libraries are
37 suitable for eventual standardization. Some of the libraries have
38 already been proposed for inclusion in the C++ Standards Committee's
39 upcoming C++ Standard Library Technical Report.
41 %description -l pl.UTF-8
42 Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
43 kodem źródłowym. Nacisk położono na biblioteki, które dobrze
44 współpracują ze standardową biblioteką C++. Celem jest ustanowienie
45 "istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
46 "Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
47 już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
48 Raporcie Technicznym Biblioteki Standardowej C++.
51 Summary: Boost C++ development headers
52 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek C++ Boost
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
55 Requires: %{name}-chrono = %{version}-%{release}
56 Requires: %{name}-context = %{version}-%{release}
57 Requires: %{name}-date_time = %{version}-%{release}
58 Requires: %{name}-filesystem = %{version}-%{release}
59 Requires: %{name}-graph = %{version}-%{release}
60 Requires: %{name}-locale = %{version}-%{release}
61 Requires: %{name}-program_options = %{version}-%{release}
62 Requires: %{name}-regex = %{version}-%{release}
63 Requires: %{name}-signals = %{version}-%{release}
64 Requires: %{name}-system = %{version}-%{release}
65 Requires: %{name}-test = %{version}-%{release}
66 Requires: %{name}-thread = %{version}-%{release}
67 Requires: %{name}-timer = %{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: Useful time utilities
173 Summary(pl.UTF-8): Przydatne funkcje związane z czasem
175 Obsoletes: boost < 1.33
178 Useful time utilities.
180 %description chrono -l pl.UTF-8
181 Przydatne funkcje związane z czasem.
184 Summary: Boost.Context - context switching library
185 Summary(pl.UTF-8): Boost.Context - biblioteka do zmiany kontekstu
189 Boost.Context - context switching library, providing a sort of
190 cooperative multitasking on a single thread.
192 %description context -l pl.UTF-8
193 Boost.Context - biblioteka do zmiany kontekstu, zapewniająca pewną
194 wielozadaniowość kooperatywnąw ramach pojedynczego wątku.
197 Summary: Date-Time library
198 Summary(pl.UTF-8): Biblioteka daty-czasu
200 Obsoletes: boost < 1.33
202 %description date_time
203 A set of date-time libraries.
205 %description date_time -l pl.UTF-8
206 Zbiór bibliotek daty-czasu.
209 Summary: Portable paths, iteration over directories, and other useful filesystem operations
210 Summary(pl.UTF-8): Przenośne ścieżki, iteracje katalogów i inne użyteczne operacje na systemie plików
212 Requires: %{name}-system = %{version}-%{release}
213 Obsoletes: boost < 1.33
215 %description filesystem
216 The boost::filesystem library provides portable facilities to query
217 and manipulate paths, files, and directories.
219 %description filesystem -l pl.UTF-8
220 Przenośna biblioteka boost::filesystem dostarcza ułatwienia w
221 operacjach na ścieżkach, plikach i katalogach.
224 Summary: General purpose, generic C++ library for graph data structures and graph algorithms
225 Summary(pl.UTF-8): Biblioteka ogólnego przeznaczenia w C++ dla struktur danych typu grafy oraz algorytmów związanych z grafami
229 The boost::graph library provides portable facilities to operate on
230 graph data structures using graph algorithms.
232 %description graph -l pl.UTF-8
233 Przenośna biblioteka boost::graph dostarcza ułatwienia w operacjach na
234 strukturach danych typu graf za pomocą algorytmów związanych z
238 Summary: Provide localization and Unicode handling tools for C++
239 Summary(pl.UTF-8): Narzędzia do obsługi lokalizacji i Unikodu w C++
243 Provide localization and Unicode handling tools for C++.
245 %description locale -l pl.UTF-8
246 Narzędzia do obsługi lokalizacji i Unikodu w C++.
248 %package program_options
249 Summary: Access to program options, via conventional methods such as command line and config file
250 Summary(pl.UTF-8): Dostęp do opcji programu za pomocą typowych metod, jak linia poleceń i plik konfiguracyjny
253 %description program_options
254 The program_options library allows program developers to obtain
255 program options, that is (name, value) pairs from the user, via
256 conventional methods such as command line and config file.
258 %description program_options -l pl.UTF-8
259 Biblioteka program_options umożliwia uzyskanie od użytkownika opcji
260 programu, czyli par (nazwa, wartość), za pomocą typowych metod, takich
261 jak linia poleceń, czy plik konfiguracyjny.
264 Summary: Boost C++ regular expressions library
265 Summary(pl.UTF-8): Biblioteka wyrażeń regularnych Boost C++
269 Shared library for Boost C++ regular expressions.
271 %description regex -l pl.UTF-8
272 Biblioteka współdzielona do obsługi wyrażeń regularnych w C++.
275 Summary: Signals & slots callback implementation
276 Summary(pl.UTF-8): Implementacja sygnałów i slotów
278 Obsoletes: boost < 1.33
281 The boost::signals library is an implementation of a signals and slots
284 %description signals -l pl.UTF-8
285 Biblioteka boost::signals jest implementacją systemu sygnałów i
289 Summary: Support for getting system specific error codes
290 Summary(pl.UTF-8): Wsparcie dla pobierania specyficznych dla systemu kodów błędów
294 The Boost System library provides simple, light-weight error_code
295 objects that encapsulate system-specific error code values, yet also
296 provide access to more abstract and portable error conditions objects.
298 %description system -l pl.UTF-8
299 Biblioteka Boost System udostępnia proste, lekkie obiekty error_code
300 obudowujące wartości kodów błędów specyficznych dla systemu, dając
301 jednocześnie dostęp do bardziej abstrakcyjnych i przenośnych obiektów
305 Summary: Support for program testing and execution monitoring
306 Summary(pl.UTF-8): Wsparcie dla testowania i monitorowania programu
308 Obsoletes: boost < 1.33
311 Support for simple program testing, full unit testing, and for program
312 execution monitoring.
314 %description test -l pl.UTF-8
315 Wsparcie dla prostego testowania programu, pełnego testowania i
316 monitorowania wykonania programu.
319 Summary: Portable C++ threads library
320 Summary(pl.UTF-8): Przenośna biblioteka wątków C++
322 Obsoletes: boost < 1.33
325 Portable C++ threads library - shared library.
327 %description thread -l pl.UTF-8
328 Przenośna biblioteka wątków dla C++ - biblioteka dzielona.
331 Summary: Event timer, progress timer, and progress display classes
332 Summary(pl.UTF-8): Klasy do obsługi pomiarów czasu, postępu i wyświetlania postępu
334 Obsoletes: boost < 1.33
337 Event timer, progress timer, and progress display classes.
339 %description timer -l pl.UTF-8
340 Klasy do obsługi pomiarów czasu, postępu i wyświetlania postępu.
343 Summary: Boost.Wave - a standard compliant C++ preprocessor library
344 Summary(pl.UTF-8): Boost.Wave - zgodna ze standardem biblioteka preprocesora C++
345 Group: Development/Libraries
348 Boost.Wave - a standard compliant C++ preprocessor library.
350 %description wave -l pl.UTF-8
351 Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
354 Summary: Boost C++ Library documentation
355 Summary(pl.UTF-8): Dokumentacja dla biblioteki Boost C++
357 Requires: %{name}-devel = %{version}-%{release}
360 Documentation for the Boost C++ Library.
362 %description doc -l pl.UTF-8
363 Dokumentacja dla biblioteki Boost C++.
366 %setup -q -n %{name}_%{fver}
369 # - don't know how to pass it through (b)jam -s (no way?)
370 # due to oversophisticated build flags system.
371 # - pass -fPIC due to <shared-linkable> removal.
372 %{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
374 # cleanup -g switch to avoid override debuginfocflags.
375 %{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
376 # link against shared expat library.
377 %{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
379 cat << EOF > tools/build/v2/user-config.jam
380 using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
385 PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
386 PYTHON_ROOT=%{_prefix}
391 EXPAT_INCLUDE=%{_includedir} \
392 EXPAT_LIBPATH=%{_libdir} \
393 ICU_PATH=%{_prefix} \
394 ./bootstrap.sh --prefix=%{_prefix}
397 variant=release debug-symbols=on inlining=on link=static,shared threading=multi
400 rm -rf $RPM_BUILD_ROOT
401 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
403 cp -rf boost $RPM_BUILD_ROOT%{_includedir}
405 install -p stage/lib/lib*.a $RPM_BUILD_ROOT%{_libdir}
406 install -p stage/lib/lib*.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
407 cp -a stage/lib/lib*.so $RPM_BUILD_ROOT%{_libdir}
410 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
412 # as the documentation doesn't completely reside in a directory of its
413 # own, we need to find out ourselves... this looks for HTML files and
414 # then collects everything linked from those. this is certainly quite
415 # unoptimized wrt mkdir calls, but does it really matter?
417 for i in $(find -type f -name '*.htm*'); do
418 # bjam docu is included in the boost-jam RPM
419 if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
420 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/${i%/*}
421 for LINKED in `%{__perl} - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
425 # rewrite links from boost/* to %{_includedir}/boost/* and
426 # ignore external links as well as document-internal ones.
427 # HTML files are also ignored as they get installed anyway.
428 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
430 (my $file = $link) =~ s/\#.*//;
436 open OUT, ">@ARGV[1]";
440 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
441 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
443 $in_link = /href|src=\s*$/;
446 TARGET=${i%/*}/$LINKED
447 # ignore non-existant linked files
448 if test -f $TARGET; then
449 install -D -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
457 rm -rf $RPM_BUILD_ROOT
459 %post -p /sbin/ldconfig
460 %postun -p /sbin/ldconfig
462 %post chrono -p /sbin/ldconfig
463 %postun chrono -p /sbin/ldconfig
465 %post context -p /sbin/ldconfig
466 %postun context -p /sbin/ldconfig
468 %post date_time -p /sbin/ldconfig
469 %postun date_time -p /sbin/ldconfig
471 %post filesystem -p /sbin/ldconfig
472 %postun filesystem -p /sbin/ldconfig
474 %post graph -p /sbin/ldconfig
475 %postun graph -p /sbin/ldconfig
477 %post locale -p /sbin/ldconfig
478 %postun locale -p /sbin/ldconfig
480 %post python -p /sbin/ldconfig
481 %postun python -p /sbin/ldconfig
483 %post program_options -p /sbin/ldconfig
484 %postun program_options -p /sbin/ldconfig
486 %post regex -p /sbin/ldconfig
487 %postun regex -p /sbin/ldconfig
489 %post signals -p /sbin/ldconfig
490 %postun signals -p /sbin/ldconfig
492 %post system -p /sbin/ldconfig
493 %postun system -p /sbin/ldconfig
495 %post test -p /sbin/ldconfig
496 %postun test -p /sbin/ldconfig
498 %post thread -p /sbin/ldconfig
499 %postun thread -p /sbin/ldconfig
501 %post timer -p /sbin/ldconfig
502 %postun timer -p /sbin/ldconfig
504 %post wave -p /sbin/ldconfig
505 %postun wave -p /sbin/ldconfig
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/libboost_iostreams.so.*.*.*
510 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
511 %attr(755,root,root) %{_libdir}/libboost_random.so.*.*.*
512 %attr(755,root,root) %{_libdir}/libboost_serialization.so.*.*.*
513 %attr(755,root,root) %{_libdir}/libboost_wserialization.so.*.*.*
516 %defattr(644,root,root,755)
517 %attr(755,root,root) %{_libdir}/libboost_chrono.so
518 %attr(755,root,root) %{_libdir}/libboost_context.so
519 %attr(755,root,root) %{_libdir}/libboost_date_time.so
520 %attr(755,root,root) %{_libdir}/libboost_filesystem.so
521 %attr(755,root,root) %{_libdir}/libboost_graph.so
522 %attr(755,root,root) %{_libdir}/libboost_iostreams.so
523 %attr(755,root,root) %{_libdir}/libboost_locale.so
524 %attr(755,root,root) %{_libdir}/libboost_math_*.so
525 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor.so
526 %attr(755,root,root) %{_libdir}/libboost_program_options.so
527 %attr(755,root,root) %{_libdir}/libboost_regex.so
528 %attr(755,root,root) %{_libdir}/libboost_random.so
529 %attr(755,root,root) %{_libdir}/libboost_serialization.so
530 %attr(755,root,root) %{_libdir}/libboost_signals.so
531 %attr(755,root,root) %{_libdir}/libboost_system.so
532 %attr(755,root,root) %{_libdir}/libboost_thread.so
533 %attr(755,root,root) %{_libdir}/libboost_timer.so
534 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework.so
535 %attr(755,root,root) %{_libdir}/libboost_wave.so
536 %attr(755,root,root) %{_libdir}/libboost_wserialization.so
538 %exclude %{_includedir}/boost/python
539 %exclude %{_includedir}/boost/python.hpp
542 %defattr(644,root,root,755)
543 %{_libdir}/libboost_chrono.a
544 %{_libdir}/libboost_context.a
545 %{_libdir}/libboost_date_time.a
546 %{_libdir}/libboost_exception.a
547 %{_libdir}/libboost_filesystem.a
548 %{_libdir}/libboost_graph.a
549 %{_libdir}/libboost_iostreams.a
550 %{_libdir}/libboost_locale.a
551 %{_libdir}/libboost_math_*.a
552 %{_libdir}/libboost_prg_exec_monitor.a
553 %{_libdir}/libboost_program_options.a
554 %{_libdir}/libboost_random.a
555 %{_libdir}/libboost_regex.a
556 %{_libdir}/libboost_serialization.a
557 %{_libdir}/libboost_signals.a
558 %{_libdir}/libboost_system.a
559 %{_libdir}/libboost_test_exec_monitor.a
560 %{_libdir}/libboost_timer.a
561 %{_libdir}/libboost_thread.a
562 %{_libdir}/libboost_unit_test_framework.a
563 %{_libdir}/libboost_wave.a
564 %{_libdir}/libboost_wserialization.a
568 %defattr(644,root,root,755)
569 %attr(755,root,root) %{_libdir}/libboost_python.so.*.*.*
572 %defattr(644,root,root,755)
573 %attr(755,root,root) %{_libdir}/libboost_python.so
574 %{_includedir}/boost/python
575 %{_includedir}/boost/python.hpp
578 %defattr(644,root,root,755)
579 %{_libdir}/libboost_python.a
583 %defattr(644,root,root,755)
584 %attr(755,root,root) %{_libdir}/libboost_chrono.so.*.*.*
587 %defattr(644,root,root,755)
588 %attr(755,root,root) %{_libdir}/libboost_context.so.*.*.*
591 %defattr(644,root,root,755)
592 %attr(755,root,root) %{_libdir}/libboost_date_time.so.*.*.*
595 %defattr(644,root,root,755)
596 %attr(755,root,root) %{_libdir}/libboost_filesystem.so.*.*.*
599 %defattr(644,root,root,755)
600 %attr(755,root,root) %{_libdir}/libboost_graph.so.*.*.*
603 %defattr(644,root,root,755)
604 %attr(755,root,root) %{_libdir}/libboost_locale.so.*.*.*
606 %files program_options
607 %defattr(644,root,root,755)
608 %attr(755,root,root) %{_libdir}/libboost_program_options.so.*.*.*
611 %defattr(644,root,root,755)
612 %attr(755,root,root) %{_libdir}/libboost_regex.so.*.*.*
615 %defattr(644,root,root,755)
616 %attr(755,root,root) %{_libdir}/libboost_signals.so.*.*.*
619 %defattr(644,root,root,755)
620 %attr(755,root,root) %{_libdir}/libboost_system.so.*.*.*
623 %defattr(644,root,root,755)
624 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor.so.*.*.*
625 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework.so.*.*.*
628 %defattr(644,root,root,755)
629 %attr(755,root,root) %{_libdir}/libboost_thread.so.*.*.*
632 %defattr(644,root,root,755)
633 %attr(755,root,root) %{_libdir}/libboost_timer.so.*.*.*
636 %defattr(644,root,root,755)
637 %attr(755,root,root) %{_libdir}/libboost_wave.so.*.*.*
640 %defattr(644,root,root,755)
641 %{_docdir}/%{name}-%{version}