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
170 Obsoletes: boost < 1.33
173 Useful time utilities.
176 Summary: Date-Time library
177 Summary(pl.UTF-8): Biblioteka daty-czasu
179 Obsoletes: boost < 1.33
181 %description date_time
182 A set of date-time libraries.
184 %description date_time -l pl.UTF-8
185 Zbiór bibliotek daty-czasu.
188 Summary: Portable paths, iteration over directories, and other useful filesystem operations
189 Summary(pl.UTF-8): Przenośne ścieżki, iteracje katalogów i inne użyteczne operacje na systemie plików
191 Requires: %{name}-system = %{version}-%{release}
192 Obsoletes: boost < 1.33
194 %description filesystem
195 The boost::filesystem library provides portable facilities to query
196 and manipulate paths, files, and directories.
198 %description filesystem -l pl.UTF-8
199 Przenośna biblioteka boost::filesystem dostarcza ułatwienia w
200 operacjach na ścieżkach, plikach i katalogach.
203 Summary: General purpose, generic C++ library for graph data structures and graph algorithms
204 Summary(pl.UTF-8): Biblioteka ogólnego przeznaczenia w C++ dla struktur danych typu grafy oraz algorytmów związanych z grafami
208 The boost::graph library provides portable facilities to operate on
209 graph data structures using graph algorithms.
211 %description graph -l pl.UTF-8
212 Przenośna biblioteka boost::graph dostarcza ułatwienia w operacjach na
213 strukturach danych typu graf za pomocą algorytmów związanych z
217 Summary: Provide localization and Unicode handling tools for C++
221 Provide localization and Unicode handling tools for C++.
223 %package program_options
224 Summary: Access to program options, via conventional methods such as command line and config file
225 Summary(pl.UTF-8): Dostęp do opcji programu za pomocą typowych metod, jak linia poleceń i plik konfiguracyjny
228 %description program_options
229 The program_options library allows program developers to obtain
230 program options, that is (name, value) pairs from the user, via
231 conventional methods such as command line and config file.
233 %description program_options -l pl.UTF-8
234 Biblioteka program_options umożliwia uzyskanie od użytkownika opcji
235 programu, czyli par (nazwa, wartość), za pomocą typowych metod, takich
236 jak linia poleceń, czy plik konfiguracyjny.
239 Summary: Boost C++ regular expressions library
240 Summary(pl.UTF-8): Biblioteka wyrażeń regularnych Boost C++
244 Shared library for Boost C++ regular expressions.
246 %description regex -l pl.UTF-8
247 Biblioteka wyrażeń regularnych dla C++, biblioteki dzielone.
250 Summary: Signals & slots callback implementation
251 Summary(pl.UTF-8): Implementacja sygnałów i slotów
253 Obsoletes: boost < 1.33
256 The boost::signals library is an implementation of a signals and slots
259 %description signals -l pl.UTF-8
260 Biblioteka boost::signals jest implementacją systemu sygnałów i
264 Summary: Support for getting system specific error codes
265 Summary(pl.UTF-8): Wsparcie dla pobierania specyficznych dla systemu kodów błędów
269 The Boost System library provides simple, light-weight error_code
270 objects that encapsulate system-specific error code values, yet also
271 provide access to more abstract and portable error conditions objects.
273 %description system -l pl.UTF-8
274 Biblioteka Boost System udostępnia proste, lekkie obiekty error_code
275 obudowujące wartości kodów błędów specyficznych dla systemu, dając
276 jednocześnie dostęp do bardziej abstrakcyjnych i przenośnych obiektów
280 Summary: Support for program testing and execution monitoring
281 Summary(pl.UTF-8): Wsparcie dla testowania i monitorowania programu
283 Obsoletes: boost < 1.33
286 Support for simple program testing, full unit testing, and for program
287 execution monitoring.
289 %description test -l pl.UTF-8
290 Wsparcie dla prostego testowania programu, pełnego testowania i
291 monitorowania wykonania programu.
294 Summary: Event timer, progress timer, and progress display classes
296 Obsoletes: boost < 1.33
299 Event timer, progress timer, and progress display classes.
302 Summary: Portable C++ threads library
303 Summary(pl.UTF-8): Przenośna biblioteka wątków C++
305 Obsoletes: boost < 1.33
308 Portable C++ threads library - shared library.
310 %description thread -l pl.UTF-8
311 Przenośna biblioteka wątków dla C++ - biblioteka dzielona.
314 Summary: Boost.Wave - a standard compliant C++ preprocessor library
315 Summary(pl.UTF-8): Boost.Wave - zgodna ze standardem biblioteka preprocesora C++
316 Group: Development/Libraries
319 Boost.Wave - a standard compliant C++ preprocessor library.
321 %description wave -l pl.UTF-8
322 Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
325 Summary: Boost C++ Library documentation
326 Summary(pl.UTF-8): Dokumentacja dla biblioteki Boost C++
328 Requires: %{name}-devel = %{version}-%{release}
331 Documentation for the Boost C++ Library.
333 %description doc -l pl.UTF-8
334 Dokumentacja dla biblioteki Boost C++.
337 %setup -q -n %{name}_%{fver}
340 # - don't know how to pass it through (b)jam -s (no way?)
341 # due to oversophisticated build flags system.
342 # - pass -fPIC due to <shared-linkable> removal.
343 %{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
345 # cleanup -g switch to avoid override debuginfocflags.
346 %{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
347 # link against shared expat library.
348 %{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
350 cat << EOF > tools/build/v2/user-config.jam
351 using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
356 PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
357 PYTHON_ROOT=%{_prefix}
362 EXPAT_INCLUDE=%{_includedir} \
363 EXPAT_LIBPATH=%{_libdir} \
364 ICU_PATH=%{_prefix} \
365 ./bootstrap.sh --prefix=%{_prefix}
368 variant=release debug-symbols=on inlining=on link=static,shared threading=multi
371 rm -rf $RPM_BUILD_ROOT
372 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
374 cp -rf boost $RPM_BUILD_ROOT%{_includedir}
376 install -p stage/lib/lib*.a $RPM_BUILD_ROOT%{_libdir}
377 install -p stage/lib/lib*.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
378 cp -a stage/lib/lib*.so $RPM_BUILD_ROOT%{_libdir}
381 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
383 # as the documentation doesn't completely reside in a directory of its
384 # own, we need to find out ourselves... this looks for HTML files and
385 # then collects everything linked from those. this is certainly quite
386 # unoptimized wrt mkdir calls, but does it really matter?
388 for i in $(find -type f -name '*.htm*'); do
389 # bjam docu is included in the boost-jam RPM
390 if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
391 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/${i%/*}
392 for LINKED in `%{__perl} - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
396 # rewrite links from boost/* to %{_includedir}/boost/* and
397 # ignore external links as well as document-internal ones.
398 # HTML files are also ignored as they get installed anyway.
399 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
401 (my $file = $link) =~ s/\#.*//;
407 open OUT, ">@ARGV[1]";
411 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
412 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
414 $in_link = /href|src=\s*$/;
417 TARGET=${i%/*}/$LINKED
418 # ignore non-existant linked files
419 if test -f $TARGET; then
420 install -D -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
428 rm -rf $RPM_BUILD_ROOT
430 %post -p /sbin/ldconfig
431 %postun -p /sbin/ldconfig
433 %post chrono -p /sbin/ldconfig
434 %postun chrono -p /sbin/ldconfig
436 %post date_time -p /sbin/ldconfig
437 %postun date_time -p /sbin/ldconfig
439 %post filesystem -p /sbin/ldconfig
440 %postun filesystem -p /sbin/ldconfig
442 %post graph -p /sbin/ldconfig
443 %postun graph -p /sbin/ldconfig
445 %post locale -p /sbin/ldconfig
446 %postun locale -p /sbin/ldconfig
448 %post python -p /sbin/ldconfig
449 %postun python -p /sbin/ldconfig
451 %post program_options -p /sbin/ldconfig
452 %postun program_options -p /sbin/ldconfig
454 %post regex -p /sbin/ldconfig
455 %postun regex -p /sbin/ldconfig
457 %post signals -p /sbin/ldconfig
458 %postun signals -p /sbin/ldconfig
460 %post system -p /sbin/ldconfig
461 %postun system -p /sbin/ldconfig
463 %post test -p /sbin/ldconfig
464 %postun test -p /sbin/ldconfig
466 %post wave -p /sbin/ldconfig
467 %postun wave -p /sbin/ldconfig
469 %post timer -p /sbin/ldconfig
470 %postun timer -p /sbin/ldconfig
472 %post thread -p /sbin/ldconfig
473 %postun thread -p /sbin/ldconfig
476 %defattr(644,root,root,755)
477 %attr(755,root,root) %{_libdir}/libboost_iostreams.so.*.*.*
478 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
479 %attr(755,root,root) %{_libdir}/libboost_random.so.*.*.*
480 %attr(755,root,root) %{_libdir}/libboost_serialization.so.*.*.*
481 %attr(755,root,root) %{_libdir}/libboost_wserialization.so.*.*.*
484 %defattr(644,root,root,755)
485 %attr(755,root,root) %{_libdir}/libboost_chrono.so
486 %attr(755,root,root) %{_libdir}/libboost_date_time.so
487 %attr(755,root,root) %{_libdir}/libboost_filesystem.so
488 %attr(755,root,root) %{_libdir}/libboost_graph.so
489 %attr(755,root,root) %{_libdir}/libboost_iostreams.so
490 %attr(755,root,root) %{_libdir}/libboost_locale.so
491 %attr(755,root,root) %{_libdir}/libboost_math_*.so
492 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor.so
493 %attr(755,root,root) %{_libdir}/libboost_program_options.so
494 %attr(755,root,root) %{_libdir}/libboost_regex.so
495 %attr(755,root,root) %{_libdir}/libboost_random.so
496 %attr(755,root,root) %{_libdir}/libboost_serialization.so
497 %attr(755,root,root) %{_libdir}/libboost_signals.so
498 %attr(755,root,root) %{_libdir}/libboost_system.so
499 %attr(755,root,root) %{_libdir}/libboost_thread.so
500 %attr(755,root,root) %{_libdir}/libboost_timer.so
501 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework.so
502 %attr(755,root,root) %{_libdir}/libboost_wave.so
503 %attr(755,root,root) %{_libdir}/libboost_wserialization.so
505 %exclude %{_includedir}/boost/python
506 %exclude %{_includedir}/boost/python.hpp
509 %defattr(644,root,root,755)
510 %{_libdir}/libboost_chrono.a
511 %{_libdir}/libboost_date_time.a
512 %{_libdir}/libboost_exception.a
513 %{_libdir}/libboost_filesystem.a
514 %{_libdir}/libboost_graph.a
515 %{_libdir}/libboost_iostreams.a
516 %{_libdir}/libboost_locale.a
517 %{_libdir}/libboost_math_*.a
518 %{_libdir}/libboost_prg_exec_monitor.a
519 %{_libdir}/libboost_program_options.a
520 %{_libdir}/libboost_random.a
521 %{_libdir}/libboost_regex.a
522 %{_libdir}/libboost_serialization.a
523 %{_libdir}/libboost_signals.a
524 %{_libdir}/libboost_system.a
525 %{_libdir}/libboost_test_exec_monitor.a
526 %{_libdir}/libboost_timer.a
527 %{_libdir}/libboost_thread.a
528 %{_libdir}/libboost_unit_test_framework.a
529 %{_libdir}/libboost_wave.a
530 %{_libdir}/libboost_wserialization.a
534 %defattr(644,root,root,755)
535 %attr(755,root,root) %{_libdir}/libboost_python.so.*.*.*
538 %defattr(644,root,root,755)
539 %attr(755,root,root) %{_libdir}/libboost_python.so
540 %{_includedir}/boost/python
541 %{_includedir}/boost/python.hpp
544 %defattr(644,root,root,755)
545 %{_libdir}/libboost_python.a
549 %defattr(644,root,root,755)
550 %attr(755,root,root) %{_libdir}/libboost_chrono.so.*.*.*
553 %defattr(644,root,root,755)
554 %attr(755,root,root) %{_libdir}/libboost_date_time.so.*.*.*
557 %defattr(644,root,root,755)
558 %attr(755,root,root) %{_libdir}/libboost_filesystem.so.*.*.*
561 %defattr(644,root,root,755)
562 %attr(755,root,root) %{_libdir}/libboost_graph.so.*.*.*
565 %defattr(644,root,root,755)
566 %attr(755,root,root) %{_libdir}/libboost_locale.so.*.*.*
568 %files program_options
569 %defattr(644,root,root,755)
570 %attr(755,root,root) %{_libdir}/libboost_program_options.so.*.*.*
573 %defattr(644,root,root,755)
574 %attr(755,root,root) %{_libdir}/libboost_regex.so.*.*.*
577 %defattr(644,root,root,755)
578 %attr(755,root,root) %{_libdir}/libboost_signals.so.*.*.*
581 %defattr(644,root,root,755)
582 %attr(755,root,root) %{_libdir}/libboost_system.so.*.*.*
585 %defattr(644,root,root,755)
586 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor.so.*.*.*
587 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework.so.*.*.*
590 %defattr(644,root,root,755)
591 %attr(755,root,root) %{_libdir}/libboost_timer.so.*.*.*
594 %defattr(644,root,root,755)
595 %attr(755,root,root) %{_libdir}/libboost_thread.so.*.*.*
598 %defattr(644,root,root,755)
599 %attr(755,root,root) %{_libdir}/libboost_wave.so.*.*.*
602 %defattr(644,root,root,755)
603 %{_docdir}/%{name}-%{version}