]> git.pld-linux.org Git - packages/boost.git/blob - boost.spec
- updated to 1.38.0.
[packages/boost.git] / boost.spec
1 #
2 # TODO:
3 #       - think about building MPI.
4 #       - split shared libs from core package into -iostreams/-serialization.
5 #
6 # Conditional build:
7 %bcond_without  python  # without boost-python support
8 #
9 %define         _fver   %(echo %{version} | tr . _)
10 Summary:        The Boost C++ Libraries
11 Summary(pl.UTF-8):      Biblioteki C++ "Boost"
12 Name:           boost
13 Version:        1.38.0
14 Release:        1
15 License:        Boost Software License and others
16 Group:          Libraries
17 Source0:        http://dl.sourceforge.net/boost/%{name}_%{_fver}.tar.bz2
18 # Source0-md5:  5eca2116d39d61382b8f8235915cb267
19 Patch0:         %{name}-climits.patch
20 Patch1:         %{name}-link.patch
21 Patch2:         %{name}-ticket-2499.patch
22 URL:            http://www.boost.org/
23 BuildRequires:  boost-jam >= 3.1.12
24 BuildRequires:  bzip2-devel
25 BuildRequires:  expat-devel
26 BuildRequires:  libicu-devel
27 BuildRequires:  libstdc++-devel
28 BuildRequires:  perl-base
29 %{?with_python:BuildRequires:   python-devel >= 2.2}
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  zlib-devel
32 BuildConflicts: gcc = 5:3.3.1
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 The Boost web site provides free peer-reviewed portable C++ source
37 libraries. The emphasis is on libraries which work well with the C++
38 Standard Library. One goal is to establish "existing practice" and
39 provide reference implementations so that the Boost libraries are
40 suitable for eventual standardization. Some of the libraries have
41 already been proposed for inclusion in the C++ Standards Committee's
42 upcoming C++ Standard Library Technical Report.
43
44 %description -l pl.UTF-8
45 Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
46 kodem źródłowym. Nacisk położono na biblioteki, które dobrze
47 współpracują ze standardową biblioteką C++. Celem jest ustanowienie
48 "istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
49 "Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
50 już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
51 Raporcie Technicznym Biblioteki Standardowej C++
52
53 %package devel
54 Summary:        Boost C++ development headers
55 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek C++ Boost
56 Group:          Development/Libraries
57 Requires:       %{name} = %{version}-%{release}
58 Requires:       %{name}-date_time = %{version}-%{release}
59 Requires:       %{name}-filesystem = %{version}-%{release}
60 Requires:       %{name}-graph = %{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}-wave = %{version}-%{release}
68 Requires:       libstdc++-devel
69 Obsoletes:      boost-any-devel
70 Obsoletes:      boost-array-devel
71 Obsoletes:      boost-asio
72 Obsoletes:      boost-bind-devel
73 Obsoletes:      boost-call_traits-devel
74 Obsoletes:      boost-compatibility-devel
75 Obsoletes:      boost-compose-devel
76 Obsoletes:      boost-compressed_pair-devel
77 Obsoletes:      boost-concept_check-devel
78 Obsoletes:      boost-conversion-devel
79 Obsoletes:      boost-crc-devel
80 Obsoletes:      boost-date_time-devel
81 Obsoletes:      boost-filesystem-devel
82 Obsoletes:      boost-graph-devel
83 Obsoletes:      boost-mem_fn-devel
84 Obsoletes:      boost-mpl-devel
85 Obsoletes:      boost-preprocessor-devel
86 Obsoletes:      boost-program_options-devel
87 Obsoletes:      boost-ref-devel
88 Obsoletes:      boost-regex-devel
89 Obsoletes:      boost-signals-devel
90 Obsoletes:      boost-spirit-devel
91 Obsoletes:      boost-statechart-devel
92 Obsoletes:      boost-static_assert-devel
93 Obsoletes:      boost-test-devel
94 Obsoletes:      boost-thread-devel
95 Obsoletes:      boost-tr1-devel
96 Obsoletes:      boost-type_traits-devel
97 Obsoletes:      boost-typeof-devel
98 Obsoletes:      boost-uBLAS-devel
99 Obsoletes:      boost-utility-devel
100 Obsoletes:      boost-wave-devel
101 Obsoletes:      boost-xpressive-devel
102
103 %description devel
104 Header files for the Boost C++ libraries.
105
106 %description devel -l pl.UTF-8
107 Pliki nagłówkowe bibliotek C++ Boost.
108
109 %package static
110 Summary:        Static version of base Boost C++ libraries
111 Summary(pl.UTF-8):      Statyczne wersje podstawowych bibliotek C++ Boost
112 Group:          Development/Libraries
113 Requires:       %{name}-devel = %{version}-%{release}
114 Obsoletes:      boost-static < 1.33
115
116 %description static
117 Static version of base Boost C++ libraries.
118
119 %description static -l pl.UTF-8
120 Statyczne wersje podstawowych bibliotek C++ Boost.
121
122 %package python
123 Summary:        Boost.Python library
124 Summary(pl.UTF-8):      biblioteka Boost.Python
125 Group:          Libraries
126 %pyrequires_eq  python
127
128 %description python
129 Use the Boost Python Library to quickly and easily export a C++
130 library to Python such that the Python interface is very similar to
131 the C++ interface. It is designed to be minimally intrusive on your
132 C++ design. In most cases, you should not have to alter your C++
133 classes in any way in order to use them with Boost.Python. The system
134 should simply ``reflect'' your C++ classes and functions into Python.
135
136 %description python -l pl.UTF-8
137 Biblioteka Boost Python służy do szybkiego i prostego eksportu
138 biblioteki C++ do Pythona, tak że interfejs Pythona jest bardzo
139 podobny do interfejsu C++. Biblioteka jest zaprojektowana tak, żeby
140 narzucać jak najmniej wymagań dotyczących konstrukcjii C++. W
141 większości przypadków nie trzeba w ogóle zmieniać własnych klas C++,
142 żeby używać ich z Boost.Python. System powinien po prostu ,,odbić''
143 klasy C++ i funkcje do Pythona.
144
145 %package python-devel
146 Summary:        Boost.Python development headers
147 Summary(pl.UTF-8):      Pliki nagłówkowe dla Boost.Python
148 Group:          Development/Libraries
149 Requires:       %{name}-devel = %{version}-%{release}
150 Requires:       %{name}-python = %{version}-%{release}
151
152 %description python-devel
153 Headers for the Boost.Python library.
154
155 %description python-devel -l pl.UTF-8
156 Pliki nagłówkowe dla biblioteki Boost.Python.
157
158 %package python-static
159 Summary:        Static version of Boost.Python library
160 Summary(pl.UTF-8):      Statyczna wersja biblioteki Boost.Python
161 Group:          Development/Libraries
162 Requires:       %{name}-python-devel = %{version}-%{release}
163
164 %description python-static
165 Static version of Boost.Python library.
166
167 %description python-static -l pl.UTF-8
168 Statyczna wersja biblioteki Boost.Python.
169
170 %package date_time
171 Summary:        Date-Time library
172 Summary(pl.UTF-8):      Biblioteka daty-czasu
173 Group:          Libraries
174 Obsoletes:      boost < 1.33
175
176 %description date_time
177 A set of date-time libraries.
178
179 %description date_time -l pl.UTF-8
180 Zbiór bibliotek daty-czasu.
181
182 %package filesystem
183 Summary:        Portable paths, iteration over directories, and other useful filesystem operations
184 Summary(pl.UTF-8):      Przenośne ścieżki, iteracje katalogów i inne użyteczne operacje na systemie plików
185 Group:          Libraries
186 Requires:       %{name}-system = %{version}-%{release}
187 Obsoletes:      boost < 1.33
188
189 %description filesystem
190 The boost::filesystem library provides portable facilities to query
191 and manipulate paths, files, and directories.
192
193 %description filesystem -l pl.UTF-8
194 Przenośna biblioteka boost::filesystem dostarcza ułatwienia w
195 operacjach na ścieżkach, plikach i katalogach.
196
197 %package graph
198 Summary:        General purpose, generic C++ library for graph data structures and graph algorithms
199 Summary(pl.UTF-8):      Biblioteka ogólnego przeznaczenia w C++ dla struktur danych typu grafy oraz algorytmów związanych z grafami
200 Group:          Libraries
201
202 %description graph
203 The boost::graph library provides portable facilities to operate on
204 graph data structures using graph algorithms.
205
206 %description graph -l pl.UTF-8
207 Przenośna biblioteka boost::graph dostarcza ułatwienia w operacjach na
208 strukturach danych typu graf za pomocą algorytmów związanych z
209 grafami.
210
211 %package program_options
212 Summary:        Access to program options, via conventional methods such as command line and config file
213 Summary(pl.UTF-8):      Dostęp do opcji programu za pomocą typowych metod, jak linia poleceń i plik konfiguracyjny
214 Group:          Libraries
215
216 %description program_options
217 The program_options library allows program developers to obtain
218 program options, that is (name, value) pairs from the user, via
219 conventional methods such as command line and config file.
220
221 %description program_options -l pl.UTF-8
222 Biblioteka program_options umożliwia uzyskanie od użytkownika opcji
223 programu, czyli par (nazwa, wartość), za pomocą typowych metod, takich
224 jak linia poleceń, czy plik konfiguracyjny.
225
226 %package regex
227 Summary:        Boost C++ regular expressions library
228 Summary(pl.UTF-8):      Biblioteka wyrażeń regularnych Boost C++
229 Group:          Libraries
230
231 %description regex
232 Shared library for Boost C++ regular expressions.
233
234 %description regex -l pl.UTF-8
235 Biblioteka wyrażeń regularnych dla C++, biblioteki dzielone.
236
237 %package signals
238 Summary:        Signals & slots callback implementation
239 Summary(pl.UTF-8):      Implementacja sygnałów i slotów
240 Group:          Libraries
241 Obsoletes:      boost < 1.33
242
243 %description signals
244 The boost::signals library is an implementation of a signals and slots
245 system.
246
247 %description signals -l pl.UTF-8
248 Biblioteka boost::signals jest implementacją systemu sygnałów i
249 slotów.
250
251 %package system
252 Summary:        Support for getting system specific error codes
253 Summary(pl.UTF-8):      Wsparcie dla pobierania specyficznych dla systemu kodów błędów
254 Group:          Libraries
255
256 %description system
257 The Boost System library provides simple, light-weight error_code
258 objects that encapsulate system-specific error code values, yet also
259 provide access to more abstract and portable error conditions objects.
260
261 %package test
262 Summary:        Support for program testing and execution monitoring
263 Summary(pl.UTF-8):      Wsparcie dla testowania i monitorowania programu
264 Group:          Libraries
265 Obsoletes:      boost < 1.33
266
267 %description test
268 Support for simple program testing, full unit testing, and for program
269 execution monitoring.
270
271 %description test -l pl.UTF-8
272 Wsparcie dla prostego testowania programu, pełnego testowania i
273 monitorowania wykonania programu.
274
275 %package thread
276 Summary:        Portable C++ threads library
277 Summary(pl.UTF-8):      Przenośna biblioteka wątków C++
278 Group:          Libraries
279 Obsoletes:      boost < 1.33
280
281 %description thread
282 Portable C++ threads library - shared library.
283
284 %description thread -l pl.UTF-8
285 Przenośna biblioteka wątków dla C++ - biblioteka dzielona.
286
287 %package wave
288 Summary:        Boost.Wave - a standard compliant C++ preprocessor library
289 Summary(pl.UTF-8):      Boost.Wave - zgodna ze standardem biblioteka preprocesora C++
290 Group:          Development/Libraries
291
292 %description wave
293 Boost.Wave - a standard compliant C++ preprocessor library.
294
295 %description wave -l pl.UTF-8
296 Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
297
298 %package doc
299 Summary:        Boost C++ Library documentation
300 Summary(pl.UTF-8):      Dokumentacja dla biblioteki Boost C++
301 Group:          Documentation
302 Requires:       %{name}-devel = %{version}-%{release}
303
304 %description doc
305 Documentation for the Boost C++ Library.
306
307 %description doc -l pl.UTF-8
308 Dokumentacja dla biblioteki Boost C++.
309
310 %prep
311 %setup -q -n %{name}_%{_fver}
312 %patch0 -p1
313 %patch1 -p1
314 %patch2 -p1
315
316 # - don't know how to pass it through (b)jam -s (no way?)
317 #   due to oversophisticated build flags system.
318 # - pass -fPIC due to <shared-linkable> removal.
319 %{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
320
321 # cleanup -g switch to avoid override debuginfocflags.
322 %{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
323 # link against shared expat library.
324 %{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
325
326 %ifarch alpha
327 # -pthread gcc parameter doesn't add _REENTRANT to cpp macros on alpha (only)
328 # don't know, is it gcc bug or intentional omission?
329 # anyway, boost check of -D_REENTRANT in its headers, so it's needed here
330 %{__perl} -pi -e 's/(CFLAGS.*-pthread)/$1 -D_REENTRANT/' tools/build/v1/gcc-tools.jam
331 %endif
332
333 cat << EOF > tools/build/v2/user-config.jam
334 using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
335 EOF
336
337 %build
338 %if %{with python}
339 PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
340 PYTHON_ROOT=%{_prefix}
341 %else
342 PYTHON_ROOT=
343 PYTHON_VERSION=
344 %endif
345 EXPAT_INCLUDE=%{_includedir} \
346 EXPAT_LIBPATH=%{_libdir} \
347 ICU_PATH=%{_prefix} \
348 bjam \
349         -d2 --toolset=gcc \
350         variant=release debug-symbols=on inlining=on link=static,shared threading=multi
351
352 %install
353 rm -rf $RPM_BUILD_ROOT
354 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
355
356 cp -rf boost $RPM_BUILD_ROOT%{_includedir}
357
358 install bin.v2/libs/*/build/gcc-*/release/debug-symbols-on/inlining-on/link-static/threading-multi/lib*.a $RPM_BUILD_ROOT%{_libdir}
359 install bin.v2/libs/*/build/gcc-*/release/debug-symbols-on/inlining-on/threading-multi/lib*.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
360
361 # create symlinks without -gccXX-mt-* things in names
362 for f in $RPM_BUILD_ROOT%{_libdir}/*.so.*.*.*; do
363         [ -f "$f" ] || continue
364         f=$(basename "$f")
365         soname=$(basename "$f" | sed -e 's#-gcc..-mt-.*#.so#g')
366         ln -s "$f" "$RPM_BUILD_ROOT%{_libdir}/$soname"
367 done
368 for f in $RPM_BUILD_ROOT%{_libdir}/*.a; do
369         [ -f "$f" ] || continue
370         f=$(basename "$f")
371         soname=$(basename "$f" | sed -e 's#-gcc..-mt-.*#.a#g')
372         ln -s "$f" "$RPM_BUILD_ROOT%{_libdir}/$soname"
373 done
374
375 # documentation
376 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
377
378 # as the documentation doesn't completely reside in a directory of its
379 # own, we need to find out ourselves... this looks for HTML files and
380 # then collects everything linked from those.  this is certainly quite
381 # unoptimized wrt mkdir calls, but does it really matter?
382 installdocs() {
383 for i in $(find -type f -name '*.htm*'); do
384         # bjam docu is included in the boost-jam RPM
385         if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
386                 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/${i%/*}
387                 for LINKED in `%{__perl} - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
388                         sub rewrite_link
389                         {
390                                 my $link = shift;
391                                 # rewrite links from boost/* to %{_includedir}/boost/* and
392                                 # ignore external links as well as document-internal ones.
393                                 # HTML files are also ignored as they get installed anyway.
394                                 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
395                                 {
396                                         (my $file = $link) =~ s/\#.*//;
397                                         print "$file\n";
398                                 }
399                                 $link;
400                         }
401                         open IN, @ARGV[0];
402                         open OUT, ">@ARGV[1]";
403                         my $in_link;
404                         while (<IN>)
405                         {
406                                 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
407                                 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
408                                 print OUT;
409                                 $in_link = /href|src=\s*$/;
410                         }
411 EOT`; do
412                         TARGET=${i%/*}/$LINKED
413                         # ignore non-existant linked files
414                         if test -f $TARGET; then
415                                 install -D -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
416                         fi
417                 done
418         fi
419 done
420 }; installdocs
421
422 %clean
423 rm -rf $RPM_BUILD_ROOT
424
425 %post   -p /sbin/ldconfig
426 %postun -p /sbin/ldconfig
427
428 %post   date_time -p /sbin/ldconfig
429 %postun date_time -p /sbin/ldconfig
430
431 %post   filesystem -p /sbin/ldconfig
432 %postun filesystem -p /sbin/ldconfig
433
434 %post   graph -p /sbin/ldconfig
435 %postun graph -p /sbin/ldconfig
436
437 %post   python -p /sbin/ldconfig
438 %postun python -p /sbin/ldconfig
439
440 %post   program_options -p /sbin/ldconfig
441 %postun program_options -p /sbin/ldconfig
442
443 %post   regex -p /sbin/ldconfig
444 %postun regex -p /sbin/ldconfig
445
446 %post   signals -p /sbin/ldconfig
447 %postun signals -p /sbin/ldconfig
448
449 %post   system -p /sbin/ldconfig
450 %postun system -p /sbin/ldconfig
451
452 %post   test -p /sbin/ldconfig
453 %postun test -p /sbin/ldconfig
454
455 %post   wave -p /sbin/ldconfig
456 %postun wave -p /sbin/ldconfig
457
458 %post   thread -p /sbin/ldconfig
459 %postun thread -p /sbin/ldconfig
460
461 %files
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/libboost_iostreams*.so.*.*.*
464 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
465 %attr(755,root,root) %{_libdir}/libboost_serialization*.so.*.*.*
466 %attr(755,root,root) %{_libdir}/libboost_wserialization*.so.*.*.*
467
468 %files devel
469 %defattr(644,root,root,755)
470 %{_includedir}/boost
471 %attr(755,root,root) %{_libdir}/libboost_date_time*.so
472 %attr(755,root,root) %{_libdir}/libboost_filesystem*.so
473 %attr(755,root,root) %{_libdir}/libboost_graph*.so
474 %attr(755,root,root) %{_libdir}/libboost_iostreams*.so
475 %attr(755,root,root) %{_libdir}/libboost_math_*.so
476 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor*.so
477 %attr(755,root,root) %{_libdir}/libboost_program_options*.so
478 %attr(755,root,root) %{_libdir}/libboost_regex*.so
479 %attr(755,root,root) %{_libdir}/libboost_serialization*.so
480 %attr(755,root,root) %{_libdir}/libboost_signals*.so
481 %attr(755,root,root) %{_libdir}/libboost_system*.so
482 %attr(755,root,root) %{_libdir}/libboost_thread*.so
483 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework*.so
484 %attr(755,root,root) %{_libdir}/libboost_wave*.so
485 %attr(755,root,root) %{_libdir}/libboost_wserialization*.so
486
487 %files static
488 %defattr(644,root,root,755)
489 %{_libdir}/libboost_date_time*.a
490 %{_libdir}/libboost_filesystem*.a
491 %{_libdir}/libboost_grap*.a
492 %{_libdir}/libboost_iostreams*.a
493 %{_libdir}/libboost_math_*.a
494 %{_libdir}/libboost_prg_exec_monitor*.a
495 %{_libdir}/libboost_program_options*.a
496 %{_libdir}/libboost_regex*.a
497 %{_libdir}/libboost_serialization*.a
498 %{_libdir}/libboost_signals*.a
499 %{_libdir}/libboost_system*.a
500 %{_libdir}/libboost_test_exec_monitor*.a
501 %{_libdir}/libboost_thread*.a
502 %{_libdir}/libboost_unit_test_framework*.a
503 %{_libdir}/libboost_wave*.a
504 %{_libdir}/libboost_wserialization*.a
505
506 %if %{with python}
507 %files python
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/libboost_python*.so.*.*.*
510
511 %files python-devel
512 %defattr(644,root,root,755)
513 %attr(755,root,root) %{_libdir}/libboost_python*.so
514 %{_includedir}/boost/python
515 %{_includedir}/boost/python.hpp
516
517 %files python-static
518 %defattr(644,root,root,755)
519 %{_libdir}/libboost_python*.a
520 %endif
521
522 %files date_time
523 %defattr(644,root,root,755)
524 %attr(755,root,root) %{_libdir}/libboost_date_time*.so.*.*.*
525
526 %files filesystem
527 %defattr(644,root,root,755)
528 %attr(755,root,root) %{_libdir}/libboost_filesystem*.so.*.*.*
529
530 %files graph
531 %defattr(644,root,root,755)
532 %attr(755,root,root) %{_libdir}/libboost_graph*.so.*.*.*
533
534 %files program_options
535 %defattr(644,root,root,755)
536 %attr(755,root,root) %{_libdir}/libboost_program_options*.so.*.*.*
537
538 %files regex
539 %defattr(644,root,root,755)
540 %attr(755,root,root) %{_libdir}/libboost_regex*.so.*.*.*
541
542 %files signals
543 %defattr(644,root,root,755)
544 %attr(755,root,root) %{_libdir}/libboost_signals*.so.*.*.*
545
546 %files system
547 %defattr(644,root,root,755)
548 %attr(755,root,root) %{_libdir}/libboost_system*.so.*.*.*
549
550 %files test
551 %defattr(644,root,root,755)
552 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor*.so.*.*.*
553 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework*.so.*.*.*
554
555 %files thread
556 %defattr(644,root,root,755)
557 %attr(755,root,root) %{_libdir}/libboost_thread*.so.*.*.*
558
559 %files wave
560 %defattr(644,root,root,755)
561 %attr(755,root,root) %{_libdir}/libboost_wave*.so.*.*.*
562
563 %files doc
564 %defattr(644,root,root,755)
565 %{_docdir}/%{name}-%{version}
This page took 0.075182 seconds and 4 git commands to generate.