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: 7375679575f4c8db605d426fc721d506
19 Patch0: %{name}-link.patch
20 Patch1: %{name}-bjam-workaround.patch
21 URL: http://www.boost.org/
22 BuildRequires: boost-jam >= 3.1.18
23 BuildRequires: bzip2-devel
24 BuildRequires: expat-devel
25 BuildRequires: libicu-devel
26 BuildRequires: libstdc++-devel
27 BuildRequires: perl-base
28 %{?with_python:BuildRequires: python-devel >= 2.2}
29 BuildRequires: rpm-pythonprov
30 BuildRequires: zlib-devel
31 BuildConflicts: gcc = 5:3.3.1
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 The Boost web site provides free peer-reviewed portable C++ source
36 libraries. The emphasis is on libraries which work well with the C++
37 Standard Library. One goal is to establish "existing practice" and
38 provide reference implementations so that the Boost libraries are
39 suitable for eventual standardization. Some of the libraries have
40 already been proposed for inclusion in the C++ Standards Committee's
41 upcoming C++ Standard Library Technical Report.
43 %description -l pl.UTF-8
44 Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
45 kodem źródłowym. Nacisk położono na biblioteki, które dobrze
46 współpracują ze standardową biblioteką C++. Celem jest ustanowienie
47 "istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
48 "Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
49 już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
50 Raporcie Technicznym Biblioteki Standardowej C++.
53 Summary: Boost C++ development headers
54 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek C++ Boost
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
57 Requires: %{name}-date_time = %{version}-%{release}
58 Requires: %{name}-filesystem = %{version}-%{release}
59 Requires: %{name}-graph = %{version}-%{release}
60 Requires: %{name}-program_options = %{version}-%{release}
61 Requires: %{name}-regex = %{version}-%{release}
62 Requires: %{name}-signals = %{version}-%{release}
63 Requires: %{name}-system = %{version}-%{release}
64 Requires: %{name}-test = %{version}-%{release}
65 Requires: %{name}-thread = %{version}-%{release}
66 Requires: %{name}-wave = %{version}-%{release}
67 Requires: libstdc++-devel
68 Obsoletes: boost-any-devel
69 Obsoletes: boost-array-devel
71 Obsoletes: boost-bind-devel
72 Obsoletes: boost-call_traits-devel
73 Obsoletes: boost-compatibility-devel
74 Obsoletes: boost-compose-devel
75 Obsoletes: boost-compressed_pair-devel
76 Obsoletes: boost-concept_check-devel
77 Obsoletes: boost-conversion-devel
78 Obsoletes: boost-crc-devel
79 Obsoletes: boost-date_time-devel
80 Obsoletes: boost-filesystem-devel
81 Obsoletes: boost-graph-devel
82 Obsoletes: boost-mem_fn-devel
83 Obsoletes: boost-mpl-devel
84 Obsoletes: boost-preprocessor-devel
85 Obsoletes: boost-program_options-devel
86 Obsoletes: boost-ref-devel
87 Obsoletes: boost-regex-devel
88 Obsoletes: boost-signals-devel
89 Obsoletes: boost-spirit-devel
90 Obsoletes: boost-statechart-devel
91 Obsoletes: boost-static_assert-devel
92 Obsoletes: boost-test-devel
93 Obsoletes: boost-thread-devel
94 Obsoletes: boost-tr1-devel
95 Obsoletes: boost-type_traits-devel
96 Obsoletes: boost-typeof-devel
97 Obsoletes: boost-uBLAS-devel
98 Obsoletes: boost-utility-devel
99 Obsoletes: boost-wave-devel
100 Obsoletes: boost-xpressive-devel
103 Header files for the Boost C++ libraries.
105 %description devel -l pl.UTF-8
106 Pliki nagłówkowe bibliotek C++ Boost.
109 Summary: Static version of base Boost C++ libraries
110 Summary(pl.UTF-8): Statyczne wersje podstawowych bibliotek C++ Boost
111 Group: Development/Libraries
112 Requires: %{name}-devel = %{version}-%{release}
113 Obsoletes: boost-static < 1.33
116 Static version of base Boost C++ libraries.
118 %description static -l pl.UTF-8
119 Statyczne wersje podstawowych bibliotek C++ Boost.
122 Summary: Boost.Python library
123 Summary(pl.UTF-8): biblioteka Boost.Python
125 %pyrequires_eq python
128 Use the Boost Python Library to quickly and easily export a C++
129 library to Python such that the Python interface is very similar to
130 the C++ interface. It is designed to be minimally intrusive on your
131 C++ design. In most cases, you should not have to alter your C++
132 classes in any way in order to use them with Boost.Python. The system
133 should simply ``reflect'' your C++ classes and functions into Python.
135 %description python -l pl.UTF-8
136 Biblioteka Boost Python służy do szybkiego i prostego eksportu
137 biblioteki C++ do Pythona, tak że interfejs Pythona jest bardzo
138 podobny do interfejsu C++. Biblioteka jest zaprojektowana tak, żeby
139 narzucać jak najmniej wymagań dotyczących konstrukcjii C++. W
140 większości przypadków nie trzeba w ogóle zmieniać własnych klas C++,
141 żeby używać ich z Boost.Python. System powinien po prostu ,,odbić''
142 klasy C++ i funkcje do Pythona.
144 %package python-devel
145 Summary: Boost.Python development headers
146 Summary(pl.UTF-8): Pliki nagłówkowe dla Boost.Python
147 Group: Development/Libraries
148 Requires: %{name}-devel = %{version}-%{release}
149 Requires: %{name}-python = %{version}-%{release}
151 %description python-devel
152 Headers for the Boost.Python library.
154 %description python-devel -l pl.UTF-8
155 Pliki nagłówkowe dla biblioteki Boost.Python.
157 %package python-static
158 Summary: Static version of Boost.Python library
159 Summary(pl.UTF-8): Statyczna wersja biblioteki Boost.Python
160 Group: Development/Libraries
161 Requires: %{name}-python-devel = %{version}-%{release}
163 %description python-static
164 Static version of Boost.Python library.
166 %description python-static -l pl.UTF-8
167 Statyczna wersja biblioteki Boost.Python.
170 Summary: Date-Time library
171 Summary(pl.UTF-8): Biblioteka daty-czasu
173 Obsoletes: boost < 1.33
175 %description date_time
176 A set of date-time libraries.
178 %description date_time -l pl.UTF-8
179 Zbiór bibliotek daty-czasu.
182 Summary: Portable paths, iteration over directories, and other useful filesystem operations
183 Summary(pl.UTF-8): Przenośne ścieżki, iteracje katalogów i inne użyteczne operacje na systemie plików
185 Requires: %{name}-system = %{version}-%{release}
186 Obsoletes: boost < 1.33
188 %description filesystem
189 The boost::filesystem library provides portable facilities to query
190 and manipulate paths, files, and directories.
192 %description filesystem -l pl.UTF-8
193 Przenośna biblioteka boost::filesystem dostarcza ułatwienia w
194 operacjach na ścieżkach, plikach i katalogach.
197 Summary: General purpose, generic C++ library for graph data structures and graph algorithms
198 Summary(pl.UTF-8): Biblioteka ogólnego przeznaczenia w C++ dla struktur danych typu grafy oraz algorytmów związanych z grafami
202 The boost::graph library provides portable facilities to operate on
203 graph data structures using graph algorithms.
205 %description graph -l pl.UTF-8
206 Przenośna biblioteka boost::graph dostarcza ułatwienia w operacjach na
207 strukturach danych typu graf za pomocą algorytmów związanych z
210 %package program_options
211 Summary: Access to program options, via conventional methods such as command line and config file
212 Summary(pl.UTF-8): Dostęp do opcji programu za pomocą typowych metod, jak linia poleceń i plik konfiguracyjny
215 %description program_options
216 The program_options library allows program developers to obtain
217 program options, that is (name, value) pairs from the user, via
218 conventional methods such as command line and config file.
220 %description program_options -l pl.UTF-8
221 Biblioteka program_options umożliwia uzyskanie od użytkownika opcji
222 programu, czyli par (nazwa, wartość), za pomocą typowych metod, takich
223 jak linia poleceń, czy plik konfiguracyjny.
226 Summary: Boost C++ regular expressions library
227 Summary(pl.UTF-8): Biblioteka wyrażeń regularnych Boost C++
231 Shared library for Boost C++ regular expressions.
233 %description regex -l pl.UTF-8
234 Biblioteka wyrażeń regularnych dla C++, biblioteki dzielone.
237 Summary: Signals & slots callback implementation
238 Summary(pl.UTF-8): Implementacja sygnałów i slotów
240 Obsoletes: boost < 1.33
243 The boost::signals library is an implementation of a signals and slots
246 %description signals -l pl.UTF-8
247 Biblioteka boost::signals jest implementacją systemu sygnałów i
251 Summary: Support for getting system specific error codes
252 Summary(pl.UTF-8): Wsparcie dla pobierania specyficznych dla systemu kodów błędów
256 The Boost System library provides simple, light-weight error_code
257 objects that encapsulate system-specific error code values, yet also
258 provide access to more abstract and portable error conditions objects.
260 %description system -l pl.UTF-8
261 Biblioteka Boost System udostępnia proste, lekkie obiekty error_code
262 obudowujące wartości kodów błędów specyficznych dla systemu, dając
263 jednocześnie dostęp do bardziej abstrakcyjnych i przenośnych obiektów
267 Summary: Support for program testing and execution monitoring
268 Summary(pl.UTF-8): Wsparcie dla testowania i monitorowania programu
270 Obsoletes: boost < 1.33
273 Support for simple program testing, full unit testing, and for program
274 execution monitoring.
276 %description test -l pl.UTF-8
277 Wsparcie dla prostego testowania programu, pełnego testowania i
278 monitorowania wykonania programu.
281 Summary: Portable C++ threads library
282 Summary(pl.UTF-8): Przenośna biblioteka wątków C++
284 Obsoletes: boost < 1.33
287 Portable C++ threads library - shared library.
289 %description thread -l pl.UTF-8
290 Przenośna biblioteka wątków dla C++ - biblioteka dzielona.
293 Summary: Boost.Wave - a standard compliant C++ preprocessor library
294 Summary(pl.UTF-8): Boost.Wave - zgodna ze standardem biblioteka preprocesora C++
295 Group: Development/Libraries
298 Boost.Wave - a standard compliant C++ preprocessor library.
300 %description wave -l pl.UTF-8
301 Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
304 Summary: Boost C++ Library documentation
305 Summary(pl.UTF-8): Dokumentacja dla biblioteki Boost C++
307 Requires: %{name}-devel = %{version}-%{release}
310 Documentation for the Boost C++ Library.
312 %description doc -l pl.UTF-8
313 Dokumentacja dla biblioteki Boost C++.
316 %setup -q -n %{name}_%{fver}
320 # - don't know how to pass it through (b)jam -s (no way?)
321 # due to oversophisticated build flags system.
322 # - pass -fPIC due to <shared-linkable> removal.
323 %{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
325 # cleanup -g switch to avoid override debuginfocflags.
326 %{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
327 # link against shared expat library.
328 %{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
330 cat << EOF > tools/build/v2/user-config.jam
331 using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
336 PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
337 PYTHON_ROOT=%{_prefix}
342 EXPAT_INCLUDE=%{_includedir} \
343 EXPAT_LIBPATH=%{_libdir} \
344 ICU_PATH=%{_prefix} \
347 variant=release debug-symbols=on inlining=on link=static,shared threading=multi
350 rm -rf $RPM_BUILD_ROOT
351 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
353 cp -rf boost $RPM_BUILD_ROOT%{_includedir}
355 install -p stage/lib/lib*.a $RPM_BUILD_ROOT%{_libdir}
356 install -p stage/lib/lib*.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
357 cp -a stage/lib/lib*.so $RPM_BUILD_ROOT%{_libdir}
360 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
362 # as the documentation doesn't completely reside in a directory of its
363 # own, we need to find out ourselves... this looks for HTML files and
364 # then collects everything linked from those. this is certainly quite
365 # unoptimized wrt mkdir calls, but does it really matter?
367 for i in $(find -type f -name '*.htm*'); do
368 # bjam docu is included in the boost-jam RPM
369 if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
370 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/${i%/*}
371 for LINKED in `%{__perl} - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
375 # rewrite links from boost/* to %{_includedir}/boost/* and
376 # ignore external links as well as document-internal ones.
377 # HTML files are also ignored as they get installed anyway.
378 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
380 (my $file = $link) =~ s/\#.*//;
386 open OUT, ">@ARGV[1]";
390 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
391 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
393 $in_link = /href|src=\s*$/;
396 TARGET=${i%/*}/$LINKED
397 # ignore non-existant linked files
398 if test -f $TARGET; then
399 install -D -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
407 rm -rf $RPM_BUILD_ROOT
409 %post -p /sbin/ldconfig
410 %postun -p /sbin/ldconfig
412 %post date_time -p /sbin/ldconfig
413 %postun date_time -p /sbin/ldconfig
415 %post filesystem -p /sbin/ldconfig
416 %postun filesystem -p /sbin/ldconfig
418 %post graph -p /sbin/ldconfig
419 %postun graph -p /sbin/ldconfig
421 %post python -p /sbin/ldconfig
422 %postun python -p /sbin/ldconfig
424 %post program_options -p /sbin/ldconfig
425 %postun program_options -p /sbin/ldconfig
427 %post regex -p /sbin/ldconfig
428 %postun regex -p /sbin/ldconfig
430 %post signals -p /sbin/ldconfig
431 %postun signals -p /sbin/ldconfig
433 %post system -p /sbin/ldconfig
434 %postun system -p /sbin/ldconfig
436 %post test -p /sbin/ldconfig
437 %postun test -p /sbin/ldconfig
439 %post wave -p /sbin/ldconfig
440 %postun wave -p /sbin/ldconfig
442 %post thread -p /sbin/ldconfig
443 %postun thread -p /sbin/ldconfig
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/libboost_iostreams.so.*.*.*
448 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
449 %attr(755,root,root) %{_libdir}/libboost_random.so.*.*.*
450 %attr(755,root,root) %{_libdir}/libboost_serialization.so.*.*.*
451 %attr(755,root,root) %{_libdir}/libboost_wserialization.so.*.*.*
454 %defattr(644,root,root,755)
455 %attr(755,root,root) %{_libdir}/libboost_date_time.so
456 %attr(755,root,root) %{_libdir}/libboost_filesystem.so
457 %attr(755,root,root) %{_libdir}/libboost_graph.so
458 %attr(755,root,root) %{_libdir}/libboost_iostreams.so
459 %attr(755,root,root) %{_libdir}/libboost_math_*.so
460 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor.so
461 %attr(755,root,root) %{_libdir}/libboost_program_options.so
462 %attr(755,root,root) %{_libdir}/libboost_regex.so
463 %attr(755,root,root) %{_libdir}/libboost_random.so
464 %attr(755,root,root) %{_libdir}/libboost_serialization.so
465 %attr(755,root,root) %{_libdir}/libboost_signals.so
466 %attr(755,root,root) %{_libdir}/libboost_system.so
467 %attr(755,root,root) %{_libdir}/libboost_thread.so
468 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework.so
469 %attr(755,root,root) %{_libdir}/libboost_wave.so
470 %attr(755,root,root) %{_libdir}/libboost_wserialization.so
472 %exclude %{_includedir}/boost/python
473 %exclude %{_includedir}/boost/python.hpp
476 %defattr(644,root,root,755)
477 %{_libdir}/libboost_date_time.a
478 %{_libdir}/libboost_filesystem.a
479 %{_libdir}/libboost_graph.a
480 %{_libdir}/libboost_iostreams.a
481 %{_libdir}/libboost_math_*.a
482 %{_libdir}/libboost_prg_exec_monitor.a
483 %{_libdir}/libboost_program_options.a
484 %{_libdir}/libboost_random.a
485 %{_libdir}/libboost_regex.a
486 %{_libdir}/libboost_serialization.a
487 %{_libdir}/libboost_signals.a
488 %{_libdir}/libboost_system.a
489 %{_libdir}/libboost_test_exec_monitor.a
490 %{_libdir}/libboost_thread.a
491 %{_libdir}/libboost_unit_test_framework.a
492 %{_libdir}/libboost_wave.a
493 %{_libdir}/libboost_wserialization.a
497 %defattr(644,root,root,755)
498 %attr(755,root,root) %{_libdir}/libboost_python.so.*.*.*
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/libboost_python.so
503 %{_includedir}/boost/python
504 %{_includedir}/boost/python.hpp
507 %defattr(644,root,root,755)
508 %{_libdir}/libboost_python.a
512 %defattr(644,root,root,755)
513 %attr(755,root,root) %{_libdir}/libboost_date_time.so.*.*.*
516 %defattr(644,root,root,755)
517 %attr(755,root,root) %{_libdir}/libboost_filesystem.so.*.*.*
520 %defattr(644,root,root,755)
521 %attr(755,root,root) %{_libdir}/libboost_graph.so.*.*.*
523 %files program_options
524 %defattr(644,root,root,755)
525 %attr(755,root,root) %{_libdir}/libboost_program_options.so.*.*.*
528 %defattr(644,root,root,755)
529 %attr(755,root,root) %{_libdir}/libboost_regex.so.*.*.*
532 %defattr(644,root,root,755)
533 %attr(755,root,root) %{_libdir}/libboost_signals.so.*.*.*
536 %defattr(644,root,root,755)
537 %attr(755,root,root) %{_libdir}/libboost_system.so.*.*.*
540 %defattr(644,root,root,755)
541 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor.so.*.*.*
542 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework.so.*.*.*
545 %defattr(644,root,root,755)
546 %attr(755,root,root) %{_libdir}/libboost_thread.so.*.*.*
549 %defattr(644,root,root,755)
550 %attr(755,root,root) %{_libdir}/libboost_wave.so.*.*.*
553 %defattr(644,root,root,755)
554 %{_docdir}/%{name}-%{version}