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: a17281fd88c48e0d866e1a12deecbcc0
19 Patch0: %{name}-climits.patch
20 Patch1: %{name}-link.patch
21 Patch2: %{name}-ticket-2499.patch
22 Patch3: %{name}-gcc.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.
262 %description system -l pl.UTF-8
263 Biblioteka Boost System udostępnia proste, lekkie obiekty error_code
264 obudowujące wartości kodów błędów specyficznych dla systemu, dając
265 jednocześnie dostęp do bardziej abstrakcyjnych i przenośnych obiektów
269 Summary: Support for program testing and execution monitoring
270 Summary(pl.UTF-8): Wsparcie dla testowania i monitorowania programu
272 Obsoletes: boost < 1.33
275 Support for simple program testing, full unit testing, and for program
276 execution monitoring.
278 %description test -l pl.UTF-8
279 Wsparcie dla prostego testowania programu, pełnego testowania i
280 monitorowania wykonania programu.
283 Summary: Portable C++ threads library
284 Summary(pl.UTF-8): Przenośna biblioteka wątków C++
286 Obsoletes: boost < 1.33
289 Portable C++ threads library - shared library.
291 %description thread -l pl.UTF-8
292 Przenośna biblioteka wątków dla C++ - biblioteka dzielona.
295 Summary: Boost.Wave - a standard compliant C++ preprocessor library
296 Summary(pl.UTF-8): Boost.Wave - zgodna ze standardem biblioteka preprocesora C++
297 Group: Development/Libraries
300 Boost.Wave - a standard compliant C++ preprocessor library.
302 %description wave -l pl.UTF-8
303 Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
306 Summary: Boost C++ Library documentation
307 Summary(pl.UTF-8): Dokumentacja dla biblioteki Boost C++
309 Requires: %{name}-devel = %{version}-%{release}
312 Documentation for the Boost C++ Library.
314 %description doc -l pl.UTF-8
315 Dokumentacja dla biblioteki Boost C++.
318 %setup -q -n %{name}_%{_fver}
324 # - don't know how to pass it through (b)jam -s (no way?)
325 # due to oversophisticated build flags system.
326 # - pass -fPIC due to <shared-linkable> removal.
327 %{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
329 # cleanup -g switch to avoid override debuginfocflags.
330 %{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
331 # link against shared expat library.
332 %{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
335 # -pthread gcc parameter doesn't add _REENTRANT to cpp macros on alpha (only)
336 # don't know, is it gcc bug or intentional omission?
337 # anyway, boost check of -D_REENTRANT in its headers, so it's needed here
338 %{__perl} -pi -e 's/(CFLAGS.*-pthread)/$1 -D_REENTRANT/' tools/build/v1/gcc-tools.jam
341 cat << EOF > tools/build/v2/user-config.jam
342 using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
347 PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
348 PYTHON_ROOT=%{_prefix}
353 EXPAT_INCLUDE=%{_includedir} \
354 EXPAT_LIBPATH=%{_libdir} \
355 ICU_PATH=%{_prefix} \
358 variant=release debug-symbols=on inlining=on link=static,shared threading=multi
361 rm -rf $RPM_BUILD_ROOT
362 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
364 cp -rf boost $RPM_BUILD_ROOT%{_includedir}
366 install bin.v2/libs/*/build/gcc-*/release/debug-symbols-on/inlining-on/link-static/threading-multi/lib*.a $RPM_BUILD_ROOT%{_libdir}
367 install bin.v2/libs/*/build/gcc-*/release/debug-symbols-on/inlining-on/threading-multi/lib*.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
369 # create symlinks without -gccXX-mt-* things in names
370 for f in $RPM_BUILD_ROOT%{_libdir}/*.so.*.*.*; do
371 [ -f "$f" ] || continue
373 soname=$(basename "$f" | sed -e 's#-gcc..-mt-.*#.so#g')
374 ln -s "$f" "$RPM_BUILD_ROOT%{_libdir}/$soname"
376 for f in $RPM_BUILD_ROOT%{_libdir}/*.a; do
377 [ -f "$f" ] || continue
379 soname=$(basename "$f" | sed -e 's#-gcc..-mt-.*#.a#g')
380 ln -s "$f" "$RPM_BUILD_ROOT%{_libdir}/$soname"
384 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
386 # as the documentation doesn't completely reside in a directory of its
387 # own, we need to find out ourselves... this looks for HTML files and
388 # then collects everything linked from those. this is certainly quite
389 # unoptimized wrt mkdir calls, but does it really matter?
391 for i in $(find -type f -name '*.htm*'); do
392 # bjam docu is included in the boost-jam RPM
393 if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
394 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/${i%/*}
395 for LINKED in `%{__perl} - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
399 # rewrite links from boost/* to %{_includedir}/boost/* and
400 # ignore external links as well as document-internal ones.
401 # HTML files are also ignored as they get installed anyway.
402 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
404 (my $file = $link) =~ s/\#.*//;
410 open OUT, ">@ARGV[1]";
414 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
415 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
417 $in_link = /href|src=\s*$/;
420 TARGET=${i%/*}/$LINKED
421 # ignore non-existant linked files
422 if test -f $TARGET; then
423 install -D -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
431 rm -rf $RPM_BUILD_ROOT
433 %post -p /sbin/ldconfig
434 %postun -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 python -p /sbin/ldconfig
446 %postun python -p /sbin/ldconfig
448 %post program_options -p /sbin/ldconfig
449 %postun program_options -p /sbin/ldconfig
451 %post regex -p /sbin/ldconfig
452 %postun regex -p /sbin/ldconfig
454 %post signals -p /sbin/ldconfig
455 %postun signals -p /sbin/ldconfig
457 %post system -p /sbin/ldconfig
458 %postun system -p /sbin/ldconfig
460 %post test -p /sbin/ldconfig
461 %postun test -p /sbin/ldconfig
463 %post wave -p /sbin/ldconfig
464 %postun wave -p /sbin/ldconfig
466 %post thread -p /sbin/ldconfig
467 %postun thread -p /sbin/ldconfig
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_libdir}/libboost_iostreams*.so.*.*.*
472 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
473 %attr(755,root,root) %{_libdir}/libboost_serialization*.so.*.*.*
474 %attr(755,root,root) %{_libdir}/libboost_wserialization*.so.*.*.*
477 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_libdir}/libboost_date_time*.so
480 %attr(755,root,root) %{_libdir}/libboost_filesystem*.so
481 %attr(755,root,root) %{_libdir}/libboost_graph*.so
482 %attr(755,root,root) %{_libdir}/libboost_iostreams*.so
483 %attr(755,root,root) %{_libdir}/libboost_math_*.so
484 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor*.so
485 %attr(755,root,root) %{_libdir}/libboost_program_options*.so
486 %attr(755,root,root) %{_libdir}/libboost_regex*.so
487 %attr(755,root,root) %{_libdir}/libboost_serialization*.so
488 %attr(755,root,root) %{_libdir}/libboost_signals*.so
489 %attr(755,root,root) %{_libdir}/libboost_system*.so
490 %attr(755,root,root) %{_libdir}/libboost_thread*.so
491 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework*.so
492 %attr(755,root,root) %{_libdir}/libboost_wave*.so
493 %attr(755,root,root) %{_libdir}/libboost_wserialization*.so
496 %defattr(644,root,root,755)
497 %{_libdir}/libboost_date_time*.a
498 %{_libdir}/libboost_filesystem*.a
499 %{_libdir}/libboost_grap*.a
500 %{_libdir}/libboost_iostreams*.a
501 %{_libdir}/libboost_math_*.a
502 %{_libdir}/libboost_prg_exec_monitor*.a
503 %{_libdir}/libboost_program_options*.a
504 %{_libdir}/libboost_regex*.a
505 %{_libdir}/libboost_serialization*.a
506 %{_libdir}/libboost_signals*.a
507 %{_libdir}/libboost_system*.a
508 %{_libdir}/libboost_test_exec_monitor*.a
509 %{_libdir}/libboost_thread*.a
510 %{_libdir}/libboost_unit_test_framework*.a
511 %{_libdir}/libboost_wave*.a
512 %{_libdir}/libboost_wserialization*.a
516 %defattr(644,root,root,755)
517 %attr(755,root,root) %{_libdir}/libboost_python*.so.*.*.*
520 %defattr(644,root,root,755)
521 %attr(755,root,root) %{_libdir}/libboost_python*.so
522 %{_includedir}/boost/python
523 %{_includedir}/boost/python.hpp
526 %defattr(644,root,root,755)
527 %{_libdir}/libboost_python*.a
531 %defattr(644,root,root,755)
532 %attr(755,root,root) %{_libdir}/libboost_date_time*.so.*.*.*
535 %defattr(644,root,root,755)
536 %attr(755,root,root) %{_libdir}/libboost_filesystem*.so.*.*.*
539 %defattr(644,root,root,755)
540 %attr(755,root,root) %{_libdir}/libboost_graph*.so.*.*.*
542 %files program_options
543 %defattr(644,root,root,755)
544 %attr(755,root,root) %{_libdir}/libboost_program_options*.so.*.*.*
547 %defattr(644,root,root,755)
548 %attr(755,root,root) %{_libdir}/libboost_regex*.so.*.*.*
551 %defattr(644,root,root,755)
552 %attr(755,root,root) %{_libdir}/libboost_signals*.so.*.*.*
555 %defattr(644,root,root,755)
556 %attr(755,root,root) %{_libdir}/libboost_system*.so.*.*.*
559 %defattr(644,root,root,755)
560 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor*.so.*.*.*
561 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework*.so.*.*.*
564 %defattr(644,root,root,755)
565 %attr(755,root,root) %{_libdir}/libboost_thread*.so.*.*.*
568 %defattr(644,root,root,755)
569 %attr(755,root,root) %{_libdir}/libboost_wave*.so.*.*.*
572 %defattr(644,root,root,755)
573 %{_docdir}/%{name}-%{version}