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: 52dd00be775e689f55a987baebccc462
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}-date_time = %{version}-%{release}
56 Requires: %{name}-filesystem = %{version}-%{release}
57 Requires: %{name}-graph = %{version}-%{release}
58 Requires: %{name}-program_options = %{version}-%{release}
59 Requires: %{name}-regex = %{version}-%{release}
60 Requires: %{name}-signals = %{version}-%{release}
61 Requires: %{name}-system = %{version}-%{release}
62 Requires: %{name}-test = %{version}-%{release}
63 Requires: %{name}-thread = %{version}-%{release}
64 Requires: %{name}-wave = %{version}-%{release}
65 Requires: libstdc++-devel
66 Obsoletes: boost-any-devel
67 Obsoletes: boost-array-devel
69 Obsoletes: boost-bind-devel
70 Obsoletes: boost-call_traits-devel
71 Obsoletes: boost-compatibility-devel
72 Obsoletes: boost-compose-devel
73 Obsoletes: boost-compressed_pair-devel
74 Obsoletes: boost-concept_check-devel
75 Obsoletes: boost-conversion-devel
76 Obsoletes: boost-crc-devel
77 Obsoletes: boost-date_time-devel
78 Obsoletes: boost-filesystem-devel
79 Obsoletes: boost-graph-devel
80 Obsoletes: boost-mem_fn-devel
81 Obsoletes: boost-mpl-devel
82 Obsoletes: boost-preprocessor-devel
83 Obsoletes: boost-program_options-devel
84 Obsoletes: boost-ref-devel
85 Obsoletes: boost-regex-devel
86 Obsoletes: boost-signals-devel
87 Obsoletes: boost-spirit-devel
88 Obsoletes: boost-statechart-devel
89 Obsoletes: boost-static_assert-devel
90 Obsoletes: boost-test-devel
91 Obsoletes: boost-thread-devel
92 Obsoletes: boost-tr1-devel
93 Obsoletes: boost-type_traits-devel
94 Obsoletes: boost-typeof-devel
95 Obsoletes: boost-uBLAS-devel
96 Obsoletes: boost-utility-devel
97 Obsoletes: boost-wave-devel
98 Obsoletes: boost-xpressive-devel
101 Header files for the Boost C++ libraries.
103 %description devel -l pl.UTF-8
104 Pliki nagłówkowe bibliotek C++ Boost.
107 Summary: Static version of base Boost C++ libraries
108 Summary(pl.UTF-8): Statyczne wersje podstawowych bibliotek C++ Boost
109 Group: Development/Libraries
110 Requires: %{name}-devel = %{version}-%{release}
111 Obsoletes: boost-static < 1.33
114 Static version of base Boost C++ libraries.
116 %description static -l pl.UTF-8
117 Statyczne wersje podstawowych bibliotek C++ Boost.
120 Summary: Boost.Python library
121 Summary(pl.UTF-8): biblioteka Boost.Python
123 %pyrequires_eq python
126 Use the Boost Python Library to quickly and easily export a C++
127 library to Python such that the Python interface is very similar to
128 the C++ interface. It is designed to be minimally intrusive on your
129 C++ design. In most cases, you should not have to alter your C++
130 classes in any way in order to use them with Boost.Python. The system
131 should simply ``reflect'' your C++ classes and functions into Python.
133 %description python -l pl.UTF-8
134 Biblioteka Boost Python służy do szybkiego i prostego eksportu
135 biblioteki C++ do Pythona, tak że interfejs Pythona jest bardzo
136 podobny do interfejsu C++. Biblioteka jest zaprojektowana tak, żeby
137 narzucać jak najmniej wymagań dotyczących konstrukcjii C++. W
138 większości przypadków nie trzeba w ogóle zmieniać własnych klas C++,
139 żeby używać ich z Boost.Python. System powinien po prostu ,,odbić''
140 klasy C++ i funkcje do Pythona.
142 %package python-devel
143 Summary: Boost.Python development headers
144 Summary(pl.UTF-8): Pliki nagłówkowe dla Boost.Python
145 Group: Development/Libraries
146 Requires: %{name}-devel = %{version}-%{release}
147 Requires: %{name}-python = %{version}-%{release}
149 %description python-devel
150 Headers for the Boost.Python library.
152 %description python-devel -l pl.UTF-8
153 Pliki nagłówkowe dla biblioteki Boost.Python.
155 %package python-static
156 Summary: Static version of Boost.Python library
157 Summary(pl.UTF-8): Statyczna wersja biblioteki Boost.Python
158 Group: Development/Libraries
159 Requires: %{name}-python-devel = %{version}-%{release}
161 %description python-static
162 Static version of Boost.Python library.
164 %description python-static -l pl.UTF-8
165 Statyczna wersja biblioteki Boost.Python.
168 Summary: Useful time utilities
169 Summary(pl.UTF-8): Przydatne funkcje związane z czasem
171 Obsoletes: boost < 1.33
174 Useful time utilities.
176 %description chrono -l pl.UTF-8
177 Przydatne funkcje związane z czasem.
180 Summary: Date-Time library
181 Summary(pl.UTF-8): Biblioteka daty-czasu
183 Obsoletes: boost < 1.33
185 %description date_time
186 A set of date-time libraries.
188 %description date_time -l pl.UTF-8
189 Zbiór bibliotek daty-czasu.
192 Summary: Portable paths, iteration over directories, and other useful filesystem operations
193 Summary(pl.UTF-8): Przenośne ścieżki, iteracje katalogów i inne użyteczne operacje na systemie plików
195 Requires: %{name}-system = %{version}-%{release}
196 Obsoletes: boost < 1.33
198 %description filesystem
199 The boost::filesystem library provides portable facilities to query
200 and manipulate paths, files, and directories.
202 %description filesystem -l pl.UTF-8
203 Przenośna biblioteka boost::filesystem dostarcza ułatwienia w
204 operacjach na ścieżkach, plikach i katalogach.
207 Summary: General purpose, generic C++ library for graph data structures and graph algorithms
208 Summary(pl.UTF-8): Biblioteka ogólnego przeznaczenia w C++ dla struktur danych typu grafy oraz algorytmów związanych z grafami
212 The boost::graph library provides portable facilities to operate on
213 graph data structures using graph algorithms.
215 %description graph -l pl.UTF-8
216 Przenośna biblioteka boost::graph dostarcza ułatwienia w operacjach na
217 strukturach danych typu graf za pomocą algorytmów związanych z
221 Summary: Provide localization and Unicode handling tools for C++
222 Summary(pl.UTF-8): Narzędzia do obsługi lokalizacji i Unikodu w C++
226 Provide localization and Unicode handling tools for C++.
228 %description locale -l pl.UTF-8
229 Narzędzia do obsługi lokalizacji i Unikodu w C++.
231 %package program_options
232 Summary: Access to program options, via conventional methods such as command line and config file
233 Summary(pl.UTF-8): Dostęp do opcji programu za pomocą typowych metod, jak linia poleceń i plik konfiguracyjny
236 %description program_options
237 The program_options library allows program developers to obtain
238 program options, that is (name, value) pairs from the user, via
239 conventional methods such as command line and config file.
241 %description program_options -l pl.UTF-8
242 Biblioteka program_options umożliwia uzyskanie od użytkownika opcji
243 programu, czyli par (nazwa, wartość), za pomocą typowych metod, takich
244 jak linia poleceń, czy plik konfiguracyjny.
247 Summary: Boost C++ regular expressions library
248 Summary(pl.UTF-8): Biblioteka wyrażeń regularnych Boost C++
252 Shared library for Boost C++ regular expressions.
254 %description regex -l pl.UTF-8
255 Biblioteka współdzielona do obsługi wyrażeń regularnych w C++.
258 Summary: Signals & slots callback implementation
259 Summary(pl.UTF-8): Implementacja sygnałów i slotów
261 Obsoletes: boost < 1.33
264 The boost::signals library is an implementation of a signals and slots
267 %description signals -l pl.UTF-8
268 Biblioteka boost::signals jest implementacją systemu sygnałów i
272 Summary: Support for getting system specific error codes
273 Summary(pl.UTF-8): Wsparcie dla pobierania specyficznych dla systemu kodów błędów
277 The Boost System library provides simple, light-weight error_code
278 objects that encapsulate system-specific error code values, yet also
279 provide access to more abstract and portable error conditions objects.
281 %description system -l pl.UTF-8
282 Biblioteka Boost System udostępnia proste, lekkie obiekty error_code
283 obudowujące wartości kodów błędów specyficznych dla systemu, dając
284 jednocześnie dostęp do bardziej abstrakcyjnych i przenośnych obiektów
288 Summary: Support for program testing and execution monitoring
289 Summary(pl.UTF-8): Wsparcie dla testowania i monitorowania programu
291 Obsoletes: boost < 1.33
294 Support for simple program testing, full unit testing, and for program
295 execution monitoring.
297 %description test -l pl.UTF-8
298 Wsparcie dla prostego testowania programu, pełnego testowania i
299 monitorowania wykonania programu.
302 Summary: Event timer, progress timer, and progress display classes
303 Summary(pl.UTF-8): Klasy do obsługi pomiarów czasu, postępu i wyświetlania postępu
305 Obsoletes: boost < 1.33
308 Event timer, progress timer, and progress display classes.
310 %description timer -l pl.UTF-8
311 Klasy do obsługi pomiarów czasu, postępu i wyświetlania postępu.
314 Summary: Portable C++ threads library
315 Summary(pl.UTF-8): Przenośna biblioteka wątków C++
317 Obsoletes: boost < 1.33
320 Portable C++ threads library - shared library.
322 %description thread -l pl.UTF-8
323 Przenośna biblioteka wątków dla C++ - biblioteka dzielona.
326 Summary: Boost.Wave - a standard compliant C++ preprocessor library
327 Summary(pl.UTF-8): Boost.Wave - zgodna ze standardem biblioteka preprocesora C++
328 Group: Development/Libraries
331 Boost.Wave - a standard compliant C++ preprocessor library.
333 %description wave -l pl.UTF-8
334 Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
337 Summary: Boost C++ Library documentation
338 Summary(pl.UTF-8): Dokumentacja dla biblioteki Boost C++
340 Requires: %{name}-devel = %{version}-%{release}
343 Documentation for the Boost C++ Library.
345 %description doc -l pl.UTF-8
346 Dokumentacja dla biblioteki Boost C++.
349 %setup -q -n %{name}_%{fver}
352 # - don't know how to pass it through (b)jam -s (no way?)
353 # due to oversophisticated build flags system.
354 # - pass -fPIC due to <shared-linkable> removal.
355 %{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
357 # cleanup -g switch to avoid override debuginfocflags.
358 %{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
359 # link against shared expat library.
360 %{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
362 cat << EOF > tools/build/v2/user-config.jam
363 using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
368 PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
369 PYTHON_ROOT=%{_prefix}
374 EXPAT_INCLUDE=%{_includedir} \
375 EXPAT_LIBPATH=%{_libdir} \
376 ICU_PATH=%{_prefix} \
377 ./bootstrap.sh --prefix=%{_prefix}
380 variant=release debug-symbols=on inlining=on link=static,shared threading=multi
383 rm -rf $RPM_BUILD_ROOT
384 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
386 cp -rf boost $RPM_BUILD_ROOT%{_includedir}
388 install -p stage/lib/lib*.a $RPM_BUILD_ROOT%{_libdir}
389 install -p stage/lib/lib*.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
390 cp -a stage/lib/lib*.so $RPM_BUILD_ROOT%{_libdir}
393 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
395 # as the documentation doesn't completely reside in a directory of its
396 # own, we need to find out ourselves... this looks for HTML files and
397 # then collects everything linked from those. this is certainly quite
398 # unoptimized wrt mkdir calls, but does it really matter?
400 for i in $(find -type f -name '*.htm*'); do
401 # bjam docu is included in the boost-jam RPM
402 if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
403 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/${i%/*}
404 for LINKED in `%{__perl} - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
408 # rewrite links from boost/* to %{_includedir}/boost/* and
409 # ignore external links as well as document-internal ones.
410 # HTML files are also ignored as they get installed anyway.
411 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
413 (my $file = $link) =~ s/\#.*//;
419 open OUT, ">@ARGV[1]";
423 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
424 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
426 $in_link = /href|src=\s*$/;
429 TARGET=${i%/*}/$LINKED
430 # ignore non-existant linked files
431 if test -f $TARGET; then
432 install -D -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
440 rm -rf $RPM_BUILD_ROOT
442 %post -p /sbin/ldconfig
443 %postun -p /sbin/ldconfig
445 %post chrono -p /sbin/ldconfig
446 %postun chrono -p /sbin/ldconfig
448 %post date_time -p /sbin/ldconfig
449 %postun date_time -p /sbin/ldconfig
451 %post filesystem -p /sbin/ldconfig
452 %postun filesystem -p /sbin/ldconfig
454 %post graph -p /sbin/ldconfig
455 %postun graph -p /sbin/ldconfig
457 %post locale -p /sbin/ldconfig
458 %postun locale -p /sbin/ldconfig
460 %post python -p /sbin/ldconfig
461 %postun python -p /sbin/ldconfig
463 %post program_options -p /sbin/ldconfig
464 %postun program_options -p /sbin/ldconfig
466 %post regex -p /sbin/ldconfig
467 %postun regex -p /sbin/ldconfig
469 %post signals -p /sbin/ldconfig
470 %postun signals -p /sbin/ldconfig
472 %post system -p /sbin/ldconfig
473 %postun system -p /sbin/ldconfig
475 %post test -p /sbin/ldconfig
476 %postun test -p /sbin/ldconfig
478 %post timer -p /sbin/ldconfig
479 %postun timer -p /sbin/ldconfig
481 %post thread -p /sbin/ldconfig
482 %postun thread -p /sbin/ldconfig
484 %post wave -p /sbin/ldconfig
485 %postun wave -p /sbin/ldconfig
488 %defattr(644,root,root,755)
489 %attr(755,root,root) %{_libdir}/libboost_iostreams.so.*.*.*
490 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
491 %attr(755,root,root) %{_libdir}/libboost_random.so.*.*.*
492 %attr(755,root,root) %{_libdir}/libboost_serialization.so.*.*.*
493 %attr(755,root,root) %{_libdir}/libboost_wserialization.so.*.*.*
496 %defattr(644,root,root,755)
497 %attr(755,root,root) %{_libdir}/libboost_chrono.so
498 %attr(755,root,root) %{_libdir}/libboost_date_time.so
499 %attr(755,root,root) %{_libdir}/libboost_filesystem.so
500 %attr(755,root,root) %{_libdir}/libboost_graph.so
501 %attr(755,root,root) %{_libdir}/libboost_iostreams.so
502 %attr(755,root,root) %{_libdir}/libboost_locale.so
503 %attr(755,root,root) %{_libdir}/libboost_math_*.so
504 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor.so
505 %attr(755,root,root) %{_libdir}/libboost_program_options.so
506 %attr(755,root,root) %{_libdir}/libboost_regex.so
507 %attr(755,root,root) %{_libdir}/libboost_random.so
508 %attr(755,root,root) %{_libdir}/libboost_serialization.so
509 %attr(755,root,root) %{_libdir}/libboost_signals.so
510 %attr(755,root,root) %{_libdir}/libboost_system.so
511 %attr(755,root,root) %{_libdir}/libboost_thread.so
512 %attr(755,root,root) %{_libdir}/libboost_timer.so
513 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework.so
514 %attr(755,root,root) %{_libdir}/libboost_wave.so
515 %attr(755,root,root) %{_libdir}/libboost_wserialization.so
517 %exclude %{_includedir}/boost/python
518 %exclude %{_includedir}/boost/python.hpp
521 %defattr(644,root,root,755)
522 %{_libdir}/libboost_chrono.a
523 %{_libdir}/libboost_date_time.a
524 %{_libdir}/libboost_exception.a
525 %{_libdir}/libboost_filesystem.a
526 %{_libdir}/libboost_graph.a
527 %{_libdir}/libboost_iostreams.a
528 %{_libdir}/libboost_locale.a
529 %{_libdir}/libboost_math_*.a
530 %{_libdir}/libboost_prg_exec_monitor.a
531 %{_libdir}/libboost_program_options.a
532 %{_libdir}/libboost_random.a
533 %{_libdir}/libboost_regex.a
534 %{_libdir}/libboost_serialization.a
535 %{_libdir}/libboost_signals.a
536 %{_libdir}/libboost_system.a
537 %{_libdir}/libboost_test_exec_monitor.a
538 %{_libdir}/libboost_timer.a
539 %{_libdir}/libboost_thread.a
540 %{_libdir}/libboost_unit_test_framework.a
541 %{_libdir}/libboost_wave.a
542 %{_libdir}/libboost_wserialization.a
546 %defattr(644,root,root,755)
547 %attr(755,root,root) %{_libdir}/libboost_python.so.*.*.*
550 %defattr(644,root,root,755)
551 %attr(755,root,root) %{_libdir}/libboost_python.so
552 %{_includedir}/boost/python
553 %{_includedir}/boost/python.hpp
556 %defattr(644,root,root,755)
557 %{_libdir}/libboost_python.a
561 %defattr(644,root,root,755)
562 %attr(755,root,root) %{_libdir}/libboost_chrono.so.*.*.*
565 %defattr(644,root,root,755)
566 %attr(755,root,root) %{_libdir}/libboost_date_time.so.*.*.*
569 %defattr(644,root,root,755)
570 %attr(755,root,root) %{_libdir}/libboost_filesystem.so.*.*.*
573 %defattr(644,root,root,755)
574 %attr(755,root,root) %{_libdir}/libboost_graph.so.*.*.*
577 %defattr(644,root,root,755)
578 %attr(755,root,root) %{_libdir}/libboost_locale.so.*.*.*
580 %files program_options
581 %defattr(644,root,root,755)
582 %attr(755,root,root) %{_libdir}/libboost_program_options.so.*.*.*
585 %defattr(644,root,root,755)
586 %attr(755,root,root) %{_libdir}/libboost_regex.so.*.*.*
589 %defattr(644,root,root,755)
590 %attr(755,root,root) %{_libdir}/libboost_signals.so.*.*.*
593 %defattr(644,root,root,755)
594 %attr(755,root,root) %{_libdir}/libboost_system.so.*.*.*
597 %defattr(644,root,root,755)
598 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor.so.*.*.*
599 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework.so.*.*.*
602 %defattr(644,root,root,755)
603 %attr(755,root,root) %{_libdir}/libboost_timer.so.*.*.*
606 %defattr(644,root,root,755)
607 %attr(755,root,root) %{_libdir}/libboost_thread.so.*.*.*
610 %defattr(644,root,root,755)
611 %attr(755,root,root) %{_libdir}/libboost_wave.so.*.*.*
614 %defattr(644,root,root,755)
615 %{_docdir}/%{name}-%{version}