]> git.pld-linux.org Git - packages/boost.git/blob - boost.spec
- use user-defined CXXFLAGS
[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.37.0
14 Release:        2
15 License:        Boost Software License and others
16 Group:          Libraries
17 Source0:        http://dl.sourceforge.net/boost/%{name}_%{_fver}.tar.bz2
18 # Source0-md5:  8d9f990bfb7e83769fa5f1d6f065bc92
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-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
101
102 %description devel
103 Header files for the Boost C++ libraries.
104
105 %description devel -l pl.UTF-8
106 Pliki nagłówkowe bibliotek C++ Boost.
107
108 %package static
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
114
115 %description static
116 Static version of base Boost C++ libraries.
117
118 %description static -l pl.UTF-8
119 Statyczne wersje podstawowych bibliotek C++ Boost.
120
121 %package python
122 Summary:        Boost.Python library
123 Summary(pl.UTF-8):      biblioteka Boost.Python
124 Group:          Libraries
125 %pyrequires_eq  python
126
127 %description 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.
134
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.
143
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}
150
151 %description python-devel
152 Headers for the Boost.Python library.
153
154 %description python-devel -l pl.UTF-8
155 Pliki nagłówkowe dla biblioteki Boost.Python.
156
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}
162
163 %description python-static
164 Static version of Boost.Python library.
165
166 %description python-static -l pl.UTF-8
167 Statyczna wersja biblioteki Boost.Python.
168
169 %package date_time
170 Summary:        Date-Time library
171 Summary(pl.UTF-8):      Biblioteka daty-czasu
172 Group:          Libraries
173 Obsoletes:      boost < 1.33
174
175 %description date_time
176 A set of date-time libraries.
177
178 %description date_time -l pl.UTF-8
179 Zbiór bibliotek daty-czasu.
180
181 %package filesystem
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
184 Group:          Libraries
185 Requires:       %{name}-system = %{version}-%{release}
186 Obsoletes:      boost < 1.33
187
188 %description filesystem
189 The boost::filesystem library provides portable facilities to query
190 and manipulate paths, files, and directories.
191
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.
195
196 %package graph
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
199 Group:          Libraries
200
201 %description graph
202 The boost::graph library provides portable facilities to operate on
203 graph data structures using graph algorithms.
204
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
208 grafami.
209
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
213 Group:          Libraries
214
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.
219
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.
224
225 %package regex
226 Summary:        Boost C++ regular expressions library
227 Summary(pl.UTF-8):      Biblioteka wyrażeń regularnych Boost C++
228 Group:          Libraries
229
230 %description regex
231 Shared library for Boost C++ regular expressions.
232
233 %description regex -l pl.UTF-8
234 Biblioteka wyrażeń regularnych dla C++, biblioteki dzielone.
235
236 %package signals
237 Summary:        Signals & slots callback implementation
238 Summary(pl.UTF-8):      Implementacja sygnałów i slotów
239 Group:          Libraries
240 Obsoletes:      boost < 1.33
241
242 %description signals
243 The boost::signals library is an implementation of a signals and slots
244 system.
245
246 %description signals -l pl.UTF-8
247 Biblioteka boost::signals jest implementacją systemu sygnałów i
248 slotów.
249
250 %package system
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
253 Group:          Libraries
254
255 %description system
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.
259
260 %package test
261 Summary:        Support for program testing and execution monitoring
262 Summary(pl.UTF-8):      Wsparcie dla testowania i monitorowania programu
263 Group:          Libraries
264 Obsoletes:      boost < 1.33
265
266 %description test
267 Support for simple program testing, full unit testing, and for program
268 execution monitoring.
269
270 %description test -l pl.UTF-8
271 Wsparcie dla prostego testowania programu, pełnego testowania i
272 monitorowania wykonania programu.
273
274 %package thread
275 Summary:        Portable C++ threads library
276 Summary(pl.UTF-8):      Przenośna biblioteka wątków C++
277 Group:          Libraries
278 Obsoletes:      boost < 1.33
279
280 %description thread
281 Portable C++ threads library - shared library.
282
283 %description thread -l pl.UTF-8
284 Przenośna biblioteka wątków dla C++ - biblioteka dzielona.
285
286 %package wave
287 Summary:        Boost.Wave - a standard compliant C++ preprocessor library
288 Summary(pl.UTF-8):      Boost.Wave - zgodna ze standardem biblioteka preprocesora C++
289 Group:          Development/Libraries
290
291 %description wave
292 Boost.Wave - a standard compliant C++ preprocessor library.
293
294 %description wave -l pl.UTF-8
295 Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
296
297 %package doc
298 Summary:        Boost C++ Library documentation
299 Summary(pl.UTF-8):      Dokumentacja dla biblioteki Boost C++
300 Group:          Documentation
301 Requires:       %{name}-devel = %{version}-%{release}
302
303 %description doc
304 Documentation for the Boost C++ Library.
305
306 %description doc -l pl.UTF-8
307 Dokumentacja dla biblioteki Boost C++.
308
309 %prep
310 %setup -q -n %{name}_%{_fver}
311 %patch0 -p1
312 %patch1 -p1
313 %patch2 -p1
314
315 # - don't know how to pass it through (b)jam -s (no way?)
316 #   due to oversophisticated build flags system.
317 # - pass -fPIC due to <shared-linkable> removal.
318 %{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
319
320 # cleanup -g switch to avoid override debuginfocflags.
321 %{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
322 # link against shared expat library.
323 %{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
324
325 %ifarch alpha
326 # -pthread gcc parameter doesn't add _REENTRANT to cpp macros on alpha (only)
327 # don't know, is it gcc bug or intentional omission?
328 # anyway, boost check of -D_REENTRANT in its headers, so it's needed here
329 %{__perl} -pi -e 's/(CFLAGS.*-pthread)/$1 -D_REENTRANT/' tools/build/v1/gcc-tools.jam
330 %endif
331
332 cat << EOF > tools/build/v2/user-config.jam
333 using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
334 EOF
335
336 %build
337 %if %{with python}
338 PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
339 PYTHON_ROOT=%{_prefix}
340 %else
341 PYTHON_ROOT=
342 PYTHON_VERSION=
343 %endif
344 EXPAT_INCLUDE=%{_includedir} \
345 EXPAT_LIBPATH=%{_libdir} \
346 ICU_PATH=%{_prefix} \
347 bjam \
348         -d2 --toolset=gcc \
349         variant=release debug-symbols=on inlining=on link=static,shared threading=multi
350
351 %install
352 rm -rf $RPM_BUILD_ROOT
353 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
354
355 cp -rf boost $RPM_BUILD_ROOT%{_includedir}
356
357 install bin.v2/libs/*/build/gcc-*/release/debug-symbols-on/inlining-on/link-static/threading-multi/lib*.a $RPM_BUILD_ROOT%{_libdir}
358 install bin.v2/libs/*/build/gcc-*/release/debug-symbols-on/inlining-on/threading-multi/lib*.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
359
360 # create symlinks without -gccXX-mt-* things in names
361 for f in $RPM_BUILD_ROOT%{_libdir}/*.so.*.*.*; do
362         [ -f "$f" ] || continue
363         f=$(basename "$f")
364         soname=$(basename "$f" | sed -e 's#-gcc..-mt-.*#.so#g')
365         ln -s "$f" "$RPM_BUILD_ROOT%{_libdir}/$soname"
366 done
367 for f in $RPM_BUILD_ROOT%{_libdir}/*.a; do
368         [ -f "$f" ] || continue
369         f=$(basename "$f")
370         soname=$(basename "$f" | sed -e 's#-gcc..-mt-.*#.a#g')
371         ln -s "$f" "$RPM_BUILD_ROOT%{_libdir}/$soname"
372 done
373
374 # documentation
375 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}
376
377 # as the documentation doesn't completely reside in a directory of its
378 # own, we need to find out ourselves... this looks for HTML files and
379 # then collects everything linked from those.  this is certainly quite
380 # unoptimized wrt mkdir calls, but does it really matter?
381 installdocs() {
382 for i in $(find -type f -name '*.htm*'); do
383         # bjam docu is included in the boost-jam RPM
384         if test "`echo $i | sed 's,jam_src,,'`" = "$i"; then
385                 install -d $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/${i%/*}
386                 for LINKED in `%{__perl} - $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i <<'EOT'
387                         sub rewrite_link
388                         {
389                                 my $link = shift;
390                                 # rewrite links from boost/* to %{_includedir}/boost/* and
391                                 # ignore external links as well as document-internal ones.
392                                 # HTML files are also ignored as they get installed anyway.
393                                 if (!($link =~ s,^(?:../)*boost/,%{_includedir}/boost/,) && !($link =~ m,(?:^[^/]+:|^\#|\.html?(?:$|\#)),))
394                                 {
395                                         (my $file = $link) =~ s/\#.*//;
396                                         print "$file\n";
397                                 }
398                                 $link;
399                         }
400                         open IN, @ARGV[0];
401                         open OUT, ">@ARGV[1]";
402                         my $in_link;
403                         while (<IN>)
404                         {
405                                 $in_link and s/^\s*"([^"> ]*)"/'"' . rewrite_link($1) . '"'/e;
406                                 s/(href|src)="([^"> ]*)"/"$1=\"" . rewrite_link($2) . '"'/eig;
407                                 print OUT;
408                                 $in_link = /href|src=\s*$/;
409                         }
410 EOT`; do
411                         TARGET=${i%/*}/$LINKED
412                         # ignore non-existant linked files
413                         if test -f $TARGET; then
414                                 install -D -m 644 $TARGET $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$TARGET
415                         fi
416                 done
417         fi
418 done
419 }; installdocs
420
421 %clean
422 rm -rf $RPM_BUILD_ROOT
423
424 %post   -p /sbin/ldconfig
425 %postun -p /sbin/ldconfig
426
427 %post   date_time -p /sbin/ldconfig
428 %postun date_time -p /sbin/ldconfig
429
430 %post   filesystem -p /sbin/ldconfig
431 %postun filesystem -p /sbin/ldconfig
432
433 %post   graph -p /sbin/ldconfig
434 %postun graph -p /sbin/ldconfig
435
436 %post   python -p /sbin/ldconfig
437 %postun python -p /sbin/ldconfig
438
439 %post   program_options -p /sbin/ldconfig
440 %postun program_options -p /sbin/ldconfig
441
442 %post   regex -p /sbin/ldconfig
443 %postun regex -p /sbin/ldconfig
444
445 %post   signals -p /sbin/ldconfig
446 %postun signals -p /sbin/ldconfig
447
448 %post   system -p /sbin/ldconfig
449 %postun system -p /sbin/ldconfig
450
451 %post   test -p /sbin/ldconfig
452 %postun test -p /sbin/ldconfig
453
454 %post   wave -p /sbin/ldconfig
455 %postun wave -p /sbin/ldconfig
456
457 %post   thread -p /sbin/ldconfig
458 %postun thread -p /sbin/ldconfig
459
460 %files
461 %defattr(644,root,root,755)
462 %attr(755,root,root) %{_libdir}/libboost_iostreams*.so.*.*.*
463 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
464 %attr(755,root,root) %{_libdir}/libboost_serialization*.so.*.*.*
465 %attr(755,root,root) %{_libdir}/libboost_wserialization*.so.*.*.*
466
467 %files devel
468 %defattr(644,root,root,755)
469 %{_includedir}/boost
470 %attr(755,root,root) %{_libdir}/libboost_date_time*.so
471 %attr(755,root,root) %{_libdir}/libboost_filesystem*.so
472 %attr(755,root,root) %{_libdir}/libboost_graph*.so
473 %attr(755,root,root) %{_libdir}/libboost_iostreams*.so
474 %attr(755,root,root) %{_libdir}/libboost_math_*.so
475 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor*.so
476 %attr(755,root,root) %{_libdir}/libboost_program_options*.so
477 %attr(755,root,root) %{_libdir}/libboost_regex*.so
478 %attr(755,root,root) %{_libdir}/libboost_serialization*.so
479 %attr(755,root,root) %{_libdir}/libboost_signals*.so
480 %attr(755,root,root) %{_libdir}/libboost_system*.so
481 %attr(755,root,root) %{_libdir}/libboost_thread*.so
482 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework*.so
483 %attr(755,root,root) %{_libdir}/libboost_wave*.so
484 %attr(755,root,root) %{_libdir}/libboost_wserialization*.so
485
486 %files static
487 %defattr(644,root,root,755)
488 %{_libdir}/libboost_date_time*.a
489 %{_libdir}/libboost_filesystem*.a
490 %{_libdir}/libboost_grap*.a
491 %{_libdir}/libboost_iostreams*.a
492 %{_libdir}/libboost_math_*.a
493 %{_libdir}/libboost_prg_exec_monitor*.a
494 %{_libdir}/libboost_program_options*.a
495 %{_libdir}/libboost_regex*.a
496 %{_libdir}/libboost_serialization*.a
497 %{_libdir}/libboost_signals*.a
498 %{_libdir}/libboost_system*.a
499 %{_libdir}/libboost_test_exec_monitor*.a
500 %{_libdir}/libboost_thread*.a
501 %{_libdir}/libboost_unit_test_framework*.a
502 %{_libdir}/libboost_wave*.a
503 %{_libdir}/libboost_wserialization*.a
504
505 %if %{with python}
506 %files python
507 %defattr(644,root,root,755)
508 %attr(755,root,root) %{_libdir}/libboost_python*.so.*.*.*
509
510 %files python-devel
511 %defattr(644,root,root,755)
512 %attr(755,root,root) %{_libdir}/libboost_python*.so
513 %{_includedir}/boost/python
514 %{_includedir}/boost/python.hpp
515
516 %files python-static
517 %defattr(644,root,root,755)
518 %{_libdir}/libboost_python*.a
519 %endif
520
521 %files date_time
522 %defattr(644,root,root,755)
523 %attr(755,root,root) %{_libdir}/libboost_date_time*.so.*.*.*
524
525 %files filesystem
526 %defattr(644,root,root,755)
527 %attr(755,root,root) %{_libdir}/libboost_filesystem*.so.*.*.*
528
529 %files graph
530 %defattr(644,root,root,755)
531 %attr(755,root,root) %{_libdir}/libboost_graph*.so.*.*.*
532
533 %files program_options
534 %defattr(644,root,root,755)
535 %attr(755,root,root) %{_libdir}/libboost_program_options*.so.*.*.*
536
537 %files regex
538 %defattr(644,root,root,755)
539 %attr(755,root,root) %{_libdir}/libboost_regex*.so.*.*.*
540
541 %files signals
542 %defattr(644,root,root,755)
543 %attr(755,root,root) %{_libdir}/libboost_signals*.so.*.*.*
544
545 %files system
546 %defattr(644,root,root,755)
547 %attr(755,root,root) %{_libdir}/libboost_system*.so.*.*.*
548
549 %files test
550 %defattr(644,root,root,755)
551 %attr(755,root,root) %{_libdir}/libboost_prg_exec_monitor*.so.*.*.*
552 %attr(755,root,root) %{_libdir}/libboost_unit_test_framework*.so.*.*.*
553
554 %files thread
555 %defattr(644,root,root,755)
556 %attr(755,root,root) %{_libdir}/libboost_thread*.so.*.*.*
557
558 %files wave
559 %defattr(644,root,root,755)
560 %attr(755,root,root) %{_libdir}/libboost_wave*.so.*.*.*
561
562 %files doc
563 %defattr(644,root,root,755)
564 %{_docdir}/%{name}-%{version}
This page took 0.107961 seconds and 4 git commands to generate.