-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathboost.spec
2101 lines (1642 loc) · 68.4 KB
/
boost.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Support for documentation installation As the %%doc macro erases the
# target directory ($RPM_BUILD_ROOT%%{_docdir}/%%{name}), manually
# installed documentation must be saved into a temporary dedicated
# directory.
# XXX note that as of rpm 4.9.1, this shouldn't be necessary anymore.
# We should be able to install directly.
%define boost_docdir __tmp_docdir
%define boost_examplesdir __tmp_examplesdir
%ifarch ppc64le
%bcond_with mpich
%else
%bcond_without mpich
%endif
%ifarch s390 s390x ppc64le
# No OpenMPI support on these arches
%bcond_with openmpi
%else
%bcond_without openmpi
%endif
%ifnarch %{ix86} x86_64 %{arm}
# Avoid using Boost.Context on non-x86 arches. s390 is not
# supported at all and there were _syntax errors_ in PPC code. This
# should be enabled on a case-by-case basis as the arches are tested
# and fixed.
%bcond_with context
%else
%bcond_without context
%endif
%bcond_without python3
Name: boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.54.0
%define version_enc 1_54_0
Release: 14%{?dist}
License: Boost and MIT and Python
%define toplev_dirname %{name}_%{version_enc}
URL: http://www.boost.org
Group: System Environment/Libraries
Source0: http://downloads.sourceforge.net/%{name}/%{toplev_dirname}.tar.bz2
Source1: ver.py
Source2: libboost_thread.so
# From the version 13 of Fedora, the Boost libraries are delivered
# with sonames equal to the Boost version (e.g., 1.41.0).
%define sonamever %{version}
# boost is an "umbrella" package that pulls in all other boost
# components, except for MPI and Python 3 sub-packages. Those are
# special in that they are rarely necessary, and it's not a big burden
# to have interested parties install them explicitly.
Requires: boost-atomic = %{version}-%{release}
Requires: boost-chrono = %{version}-%{release}
%if %{with context}
Requires: boost-context = %{version}-%{release}
%endif
Requires: boost-date-time = %{version}-%{release}
Requires: boost-filesystem = %{version}-%{release}
Requires: boost-graph = %{version}-%{release}
Requires: boost-iostreams = %{version}-%{release}
Requires: boost-locale = %{version}-%{release}
Requires: boost-log = %{version}-%{release}
Requires: boost-math = %{version}-%{release}
Requires: boost-program-options = %{version}-%{release}
Requires: boost-python = %{version}-%{release}
Requires: boost-random = %{version}-%{release}
Requires: boost-regex = %{version}-%{release}
Requires: boost-serialization = %{version}-%{release}
Requires: boost-signals = %{version}-%{release}
Requires: boost-system = %{version}-%{release}
Requires: boost-test = %{version}-%{release}
Requires: boost-thread = %{version}-%{release}
Requires: boost-timer = %{version}-%{release}
Requires: boost-wave = %{version}-%{release}
BuildRequires: m4
BuildRequires: libstdc++-devel%{?_isa}
BuildRequires: bzip2-devel%{?_isa}
BuildRequires: zlib-devel%{?_isa}
BuildRequires: python-devel%{?_isa}
%if %{with python3}
BuildRequires: python3-devel%{?_isa}
%endif
BuildRequires: libicu-devel%{?_isa}
# https://svn.boost.org/trac/boost/ticket/6150
Patch4: boost-1.50.0-fix-non-utf8-files.patch
# Add a manual page for bjam, based on the on-line documentation:
# http://www.boost.org/boost-build2/doc/html/bbv2/overview.html
Patch5: boost-1.48.0-add-bjam-man-page.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=781859
# The following tickets have yet to be fixed by upstream.
# https://svn.boost.org/trac/boost/ticket/6413
# https://svn.boost.org/trac/boost/ticket/8849
Patch9: boost-1.53.0-attribute.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=828856
# https://bugzilla.redhat.com/show_bug.cgi?id=828857
Patch15: boost-1.50.0-pool.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=977098
# https://svn.boost.org/trac/boost/ticket/8731
Patch18: boost-1.54.0-__GLIBC_HAVE_LONG_LONG.patch
# Upstream patches posted as release notes:
# http://www.boost.org/users/history/version_1_54_0.html
Patch19: 001-coroutine.patch
Patch20: 002-date-time.patch
Patch21: 003-log.patch
# https://svn.boost.org/trac/boost/ticket/8826
Patch22: boost-1.54.0-context-execstack.patch
# https://svn.boost.org/trac/boost/ticket/8844
Patch23: boost-1.54.0-bind-static_assert.patch
# https://svn.boost.org/trac/boost/ticket/8847
Patch24: boost-1.54.0-concept-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/5637
Patch25: boost-1.54.0-mpl-print.patch
# https://svn.boost.org/trac/boost/ticket/8859
Patch26: boost-1.54.0-static_warning-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8855
Patch27: boost-1.54.0-math-unused_typedef.patch
Patch28: boost-1.54.0-math-unused_typedef-2.patch
# https://svn.boost.org/trac/boost/ticket/8853
Patch31: boost-1.54.0-tuple-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8854
Patch32: boost-1.54.0-random-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8856
Patch33: boost-1.54.0-date_time-unused_typedef.patch
Patch34: boost-1.54.0-date_time-unused_typedef-2.patch
# https://svn.boost.org/trac/boost/ticket/8870
Patch35: boost-1.54.0-spirit-unused_typedef.patch
Patch36: boost-1.54.0-spirit-unused_typedef-2.patch
# https://svn.boost.org/trac/boost/ticket/8871
Patch37: boost-1.54.0-numeric-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8872
Patch38: boost-1.54.0-multiprecision-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8874
Patch42: boost-1.54.0-unordered-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8876
Patch43: boost-1.54.0-algorithm-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8877
Patch44: boost-1.54.0-graph-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8878
Patch45: boost-1.54.0-locale-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8879
Patch46: boost-1.54.0-property_tree-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8880
Patch47: boost-1.54.0-xpressive-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8881
Patch48: boost-1.54.0-mpi-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8888
Patch49: boost-1.54.0-python-unused_typedef.patch
# https://svn.boost.org/trac/boost/ticket/8941
Patch50: boost-1.54.0-lexical_cast-int128.patch
# https://svn.boost.org/trac/boost/ticket/9038
Patch51: boost-1.54.0-pool-test_linking.patch
# https://svn.boost.org/trac/boost/ticket/9037
Patch52: boost-1.54.0-thread-cond_variable_shadow.patch
# This was already fixed upstream, so no tracking bug.
Patch53: boost-1.54.0-pool-max_chunks_shadow.patch
# https://svn.boost.org/trac/boost/ticket/9041
Patch54: boost-1.54.0-thread-link_atomic.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1002578
# https://svn.boost.org/trac/boost/ticket/9065
Patch55: boost-1.54.0-interprocess-atomic_cas32-ppc.patch
%bcond_with tests
%bcond_with docs_generated
%description
Boost provides free peer-reviewed portable C++ source libraries. The
emphasis is on libraries which work well with the C++ Standard
Library, in the hopes of establishing "existing practice" for
extensions and providing reference implementations so that the Boost
libraries are suitable for eventual standardization. (Some of the
libraries have already been included in the C++ 2011 standard and
others have been proposed to the C++ Standards Committee for inclusion
in future standards.)
%package atomic
Summary: Run-Time component of boost atomic library
Group: System Environment/Libraries
%description atomic
Run-Time support for Boost.Atomic, a library that provides atomic data
types and operations on these data types, as well as memory ordering
constraints required for coordinating multiple threads through atomic
variables.
%package chrono
Summary: Run-Time component of boost chrono library
Group: System Environment/Libraries
Requires: boost-system = %{version}-%{release}
%description chrono
Run-Time support for Boost.Chrono, a set of useful time utilities.
%if %{with context}
%package context
Summary: Run-Time component of boost context switching library
Group: System Environment/Libraries
%description context
Run-Time support for Boost.Context, a foundational library that
provides a sort of cooperative multitasking on a single thread.
%endif
%package date-time
Summary: Run-Time component of boost date-time library
Group: System Environment/Libraries
%description date-time
Run-Time support for Boost Date Time, set of date-time libraries based
on generic programming concepts.
%package filesystem
Summary: Run-Time component of boost filesystem library
Group: System Environment/Libraries
Requires: boost-system = %{version}-%{release}
%description filesystem
Run-Time support for the Boost Filesystem Library, which provides
portable facilities to query and manipulate paths, files, and
directories.
%package graph
Summary: Run-Time component of boost graph library
Group: System Environment/Libraries
Requires: boost-regex = %{version}-%{release}
%description graph
Run-Time support for the BGL graph library. BGL interface and graph
components are generic, in the same sense as the the Standard Template
Library (STL).
%package iostreams
Summary: Run-Time component of boost iostreams library
Group: System Environment/Libraries
%description iostreams
Run-Time support for Boost.IOStreams, a framework for defining streams,
stream buffers and i/o filters.
%package locale
Summary: Run-Time component of boost locale library
Group: System Environment/Libraries
Requires: boost-chrono = %{version}-%{release}
Requires: boost-system = %{version}-%{release}
Requires: boost-thread = %{version}-%{release}
%description locale
Run-Time support for Boost.Locale, a set of localization and Unicode
handling tools.
%package log
Summary: Run-Time component of boost logging library
Group: System Environment/Libraries
%description log
Boost.Log library aims to make logging significantly easier for the
application developer. It provides a wide range of out-of-the-box
tools along with public interfaces for extending the library.
%package math
Summary: Math functions for boost TR1 library
Group: System Environment/Libraries
%description math
Run-Time support for C99 and C++ TR1 C-style Functions from math
portion of Boost.TR1.
%package program-options
Summary: Run-Time component of boost program_options library
Group: System Environment/Libraries
%description program-options
Run-Time support of boost program options library, which allows program
developers to obtain (name, value) pairs from the user, via
conventional methods such as command line and configuration file.
%package python
Summary: Run-Time component of boost python library
Group: System Environment/Libraries
%description python
The Boost Python Library is a framework for interfacing Python and
C++. It allows you to quickly and seamlessly expose C++ classes
functions and objects to Python, and vice versa, using no special
tools -- just your C++ compiler. This package contains run-time
support for Boost Python Library.
%if %{with python3}
%package python3
Summary: Run-Time component of boost python library for Python 3
Group: System Environment/Libraries
%description python3
The Boost Python Library is a framework for interfacing Python and
C++. It allows you to quickly and seamlessly expose C++ classes
functions and objects to Python, and vice versa, using no special
tools -- just your C++ compiler. This package contains run-time
support for Boost Python Library compiled for Python 3.
%package python3-devel
Summary: Shared object symbolic links for Boost.Python 3
Group: System Environment/Libraries
Requires: boost-python3 = %{version}-%{release}
Requires: boost-devel = %{version}-%{release}
%description python3-devel
Shared object symbolic links for Python 3 variant of Boost.Python.
%endif
%package random
Summary: Run-Time component of boost random library
Group: System Environment/Libraries
%description random
Run-Time support for boost random library.
%package regex
Summary: Run-Time component of boost regular expression library
Group: System Environment/Libraries
%description regex
Run-Time support for boost regular expression library.
%package serialization
Summary: Run-Time component of boost serialization library
Group: System Environment/Libraries
%description serialization
Run-Time support for serialization for persistence and marshaling.
%package signals
Summary: Run-Time component of boost signals and slots library
Group: System Environment/Libraries
%description signals
Run-Time support for managed signals & slots callback implementation.
%package system
Summary: Run-Time component of boost system support library
Group: System Environment/Libraries
%description system
Run-Time component of Boost operating system support library, including
the diagnostics support that will be part of the C++0x standard
library.
%package test
Summary: Run-Time component of boost test library
Group: System Environment/Libraries
%description test
Run-Time support for simple program testing, full unit testing, and for
program execution monitoring.
%package thread
Summary: Run-Time component of boost thread library
Group: System Environment/Libraries
Requires: boost-system = %{version}-%{release}
%description thread
Run-Time component Boost.Thread library, which provides classes and
functions for managing multiple threads of execution, and for
synchronizing data between the threads or providing separate copies of
data specific to individual threads.
%package timer
Summary: Run-Time component of boost timer library
Group: System Environment/Libraries
Requires: boost-chrono = %{version}-%{release}
Requires: boost-system = %{version}-%{release}
%description timer
"How long does my C++ code take to run?"
The Boost Timer library answers that question and does so portably,
with as little as one #include and one additional line of code.
%package wave
Summary: Run-Time component of boost C99/C++ pre-processing library
Group: System Environment/Libraries
Requires: boost-chrono = %{version}-%{release}
Requires: boost-date-time = %{version}-%{release}
Requires: boost-filesystem = %{version}-%{release}
Requires: boost-system = %{version}-%{release}
Requires: boost-thread = %{version}-%{release}
%description wave
Run-Time support for the Boost.Wave library, a Standards conforming,
and highly configurable implementation of the mandated C99/C++
pre-processor functionality.
%package devel
Summary: The Boost C++ headers and shared development libraries
Group: Development/Libraries
Requires: boost = %{version}-%{release}
Provides: boost-python-devel = %{version}-%{release}
Requires: libicu-devel%{?_isa}
# Odeint was shipped in Fedora 18, but later became part of Boost.
# Note we also obsolete odeint-doc down there.
# https://bugzilla.redhat.com/show_bug.cgi?id=892850
Provides: odeint = 2.2-5
Obsoletes: odeint < 2.2-5
Provides: odeint-devel = 2.2-5
Obsoletes: odeint-devel < 2.2-5
%description devel
Headers and shared object symbolic links for the Boost C++ libraries.
%package static
Summary: The Boost C++ static development libraries
Group: Development/Libraries
Requires: boost-devel = %{version}-%{release}
Obsoletes: boost-devel-static < 1.34.1-14
Provides: boost-devel-static = %{version}-%{release}
%description static
Static Boost C++ libraries.
%package doc
Summary: HTML documentation for the Boost C++ libraries
Group: Documentation
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
BuildArch: noarch
%endif
Provides: boost-python-docs = %{version}-%{release}
# See the description above.
Provides: odeint-doc = 2.2-5
Obsoletes: odeint-doc < 2.2-5
%description doc
This package contains the documentation in the HTML format of the Boost C++
libraries. The documentation provides the same content as that on the Boost
web page (http://www.boost.org/doc/libs/1_40_0).
%package examples
Summary: Source examples for the Boost C++ libraries
Group: Documentation
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
BuildArch: noarch
%endif
Requires: boost-devel = %{version}-%{release}
%description examples
This package contains example source files distributed with boost.
%if %{with openmpi}
%package openmpi
Summary: Run-Time component of Boost.MPI library
Group: System Environment/Libraries
Requires: openmpi
BuildRequires: openmpi-devel
Requires: boost-serialization = %{version}-%{release}
%description openmpi
Run-Time support for Boost.MPI-OpenMPI, a library providing a clean C++
API over the OpenMPI implementation of MPI.
%package openmpi-devel
Summary: Shared library symbolic links for Boost.MPI
Group: System Environment/Libraries
Requires: boost-devel = %{version}-%{release}
Requires: boost-openmpi = %{version}-%{release}
Requires: boost-openmpi-python = %{version}-%{release}
Requires: boost-graph-openmpi = %{version}-%{release}
%description openmpi-devel
Devel package for Boost.MPI-OpenMPI, a library providing a clean C++
API over the OpenMPI implementation of MPI.
%package openmpi-python
Summary: Python run-time component of Boost.MPI library
Group: System Environment/Libraries
Requires: boost-openmpi = %{version}-%{release}
Requires: boost-python = %{version}-%{release}
Requires: boost-serialization = %{version}-%{release}
%description openmpi-python
Python support for Boost.MPI-OpenMPI, a library providing a clean C++
API over the OpenMPI implementation of MPI.
%package graph-openmpi
Summary: Run-Time component of parallel boost graph library
Group: System Environment/Libraries
Requires: boost-openmpi = %{version}-%{release}
Requires: boost-serialization = %{version}-%{release}
%description graph-openmpi
Run-Time support for the Parallel BGL graph library. The interface and
graph components are generic, in the same sense as the the Standard
Template Library (STL). This libraries in this package use OpenMPI
back-end to do the parallel work.
%endif
%if %{with mpich}
%package mpich
Summary: Run-Time component of Boost.MPI library
Group: System Environment/Libraries
Requires: mpich
BuildRequires: mpich-devel
Requires: boost-serialization = %{version}-%{release}
Provides: %{name}-mpich2 = %{version}-%{release}
Obsoletes: %{name}-mpich2 < 1.53.0-9
%description mpich
Run-Time support for Boost.MPI-MPICH, a library providing a clean C++
API over the MPICH implementation of MPI.
%package mpich-devel
Summary: Shared library symbolic links for Boost.MPI
Group: System Environment/Libraries
Requires: boost-devel = %{version}-%{release}
Requires: boost-mpich = %{version}-%{release}
Requires: boost-mpich-python = %{version}-%{release}
Requires: boost-graph-mpich = %{version}-%{release}
Provides: %{name}-mpich2-devel = %{version}-%{release}
Obsoletes: %{name}-mpich2-devel < 1.53.0-9
%description mpich-devel
Devel package for Boost.MPI-MPICH, a library providing a clean C++
API over the MPICH implementation of MPI.
%package mpich-python
Summary: Python run-time component of Boost.MPI library
Group: System Environment/Libraries
Requires: boost-mpich = %{version}-%{release}
Requires: boost-python = %{version}-%{release}
Requires: boost-serialization = %{version}-%{release}
Provides: %{name}-mpich2-python = %{version}-%{release}
Obsoletes: %{name}-mpich2-python < 1.53.0-9
%description mpich-python
Python support for Boost.MPI-MPICH, a library providing a clean C++
API over the MPICH implementation of MPI.
%package graph-mpich
Summary: Run-Time component of parallel boost graph library
Group: System Environment/Libraries
Requires: boost-mpich = %{version}-%{release}
Requires: boost-serialization = %{version}-%{release}
Provides: %{name}-graph-mpich2 = %{version}-%{release}
Obsoletes: %{name}-graph-mpich2 < 1.53.0-9
%description graph-mpich
Run-Time support for the Parallel BGL graph library. The interface and
graph components are generic, in the same sense as the the Standard
Template Library (STL). This libraries in this package use MPICH
back-end to do the parallel work.
%endif
%package build
Summary: Cross platform build system for C++ projects
Group: Development/Tools
Requires: boost-jam
BuildArch: noarch
%description build
Boost.Build is an easy way to build C++ projects, everywhere. You name
your pieces of executable and libraries and list their sources. Boost.Build
takes care about compiling your sources with the right options,
creating static and shared libraries, making pieces of executable, and other
chores -- whether you're using GCC, MSVC, or a dozen more supported
C++ compilers -- on Windows, OSX, Linux and commercial UNIX systems.
%package jam
Summary: A low-level build tool
Group: Development/Tools
%description jam
Boost.Jam (BJam) is the low-level build engine tool for Boost.Build.
Historically, Boost.Jam is based on on FTJam and on Perforce Jam but has grown
a number of significant features and is now developed independently
%prep
%setup -q -n %{toplev_dirname}
%patch4 -p1
%patch5 -p1
%patch9 -p1
%patch15 -p0
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p0
%patch26 -p1
%patch27 -p1
%patch28 -p0
%patch31 -p0
%patch32 -p0
%patch33 -p0
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch45 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p0
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch55 -p1
# At least python2_version needs to be a macro so that it's visible in
# %%install as well.
%global python2_version %(/usr/bin/python2 %{SOURCE1})
%if %{with python3}
%global python3_version %(/usr/bin/python3 %{SOURCE1})
%global python3_abiflags %(/usr/bin/python3-config --abiflags)
%endif
%build
: PYTHON2_VERSION=%{python2_version}
%if %{with python3}
: PYTHON3_VERSION=%{python3_version}
: PYTHON3_ABIFLAGS=%{python3_abiflags}
%endif
cat >> ./tools/build/v2/user-config.jam << EOF
# There are many strict aliasing warnings, and it's not feasible to go
# through them all at this time.
using gcc : : : <compileflags>-fno-strict-aliasing ;
using mpi ;
%if %{with python3}
# This _adds_ extra python version. It doesn't replace whatever
# python 2.X is default on the system.
using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}%{python3_abiflags} ;
%endif
EOF
./bootstrap.sh --with-toolset=gcc --with-icu
# N.B. When we build the following with PCH, parts of boost (math
# library in particular) end up being built second time during
# installation. Unsure why that is, but all sub-builds need to be
# built with pch=off to avoid this.
#
# The "python=2.*" bit tells jam that we want to _also_ build 2.*, not
# just 3.*. When omitted, it just builds for python 3 twice, once
# calling the library libboost_python and once libboost_python3. I
# assume this is for backward compatibility for apps that are used to
# linking against -lboost_python, for when 2->3 transition is
# eventually done.
echo ============================= build serial ==================
./b2 -d+2 -q %{?_smp_mflags} \
--without-mpi --without-graph_parallel --build-dir=serial \
%if !%{with context}
--without-context --without-coroutine \
%endif
variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} stage
# See boost-1.54.0-thread-link_atomic.patch for where this file comes
# from.
if [ $(find serial -type f -name has_atomic_flag_lockfree \
-print -quit | wc -l) -ne 0 ]; then
DEF=D
else
DEF=U
fi
m4 -${DEF}HAS_ATOMIC_FLAG_LOCKFREE -DVERSION=%{version} \
%{SOURCE2} > $(basename %{SOURCE2})
# Build MPI parts of Boost with OpenMPI support
%if %{with openmpi} || %{with mpich}
# First, purge all modules so that user environment doesn't conflict
# with the build.
module purge ||:
%endif
# N.B. python=2.* here behaves differently: it exactly selects a
# version that we want to build against. Boost MPI is not portable to
# Python 3 due to API changes in Python, so this suits us.
%if %{with openmpi}
%{_openmpi_load}
echo ============================= build $MPI_COMPILER ==================
./b2 -d+2 -q %{?_smp_mflags} \
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} stage
%{_openmpi_unload}
export PATH=/bin${PATH:+:}$PATH
%endif
# Build MPI parts of Boost with MPICH support
%if %{with mpich}
%{_mpich_load}
echo ============================= build $MPI_COMPILER ==================
./b2 -d+2 -q %{?_smp_mflags} \
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} stage
%{_mpich_unload}
export PATH=/bin${PATH:+:}$PATH
%endif
echo ============================= build Boost.Build ==================
(cd tools/build/v2
./bootstrap.sh --with-toolset=gcc)
%check
:
%install
rm -rf $RPM_BUILD_ROOT
cd %{_builddir}/%{toplev_dirname}
%if %{with openmpi} || %{with mpich}
# First, purge all modules so that user environment doesn't conflict
# with the build.
module purge ||:
%endif
%if %{with openmpi}
%{_openmpi_load}
# XXX We want to extract this from RPM flags
# b2 instruction-set=i686 etc.
echo ============================= install $MPI_COMPILER ==================
./b2 -q %{?_smp_mflags} \
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} stage
# Remove generic parts of boost that were built for dependencies.
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
%{_openmpi_unload}
export PATH=/bin${PATH:+:}$PATH
%endif
%if %{with mpich}
%{_mpich_load}
echo ============================= install $MPI_COMPILER ==================
./b2 -q %{?_smp_mflags} \
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} stage
# Remove generic parts of boost that were built for dependencies.
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
%{_mpich_unload}
export PATH=/bin${PATH:+:}$PATH
%endif
echo ============================= install serial ==================
./b2 -d+2 -q %{?_smp_mflags} \
--without-mpi --without-graph_parallel --build-dir=serial \
%if !%{with context}
--without-context --without-coroutine \
%endif
--prefix=$RPM_BUILD_ROOT%{_prefix} \
--libdir=$RPM_BUILD_ROOT%{_libdir} \
variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} install
# Override DSO symlink with a linker script. See the linker script
# itself for details of why we need to do this.
[ -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so ] # Must be present
rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so
install -p -m 644 $(basename %{SOURCE2}) $RPM_BUILD_ROOT%{_libdir}/
echo ============================= install Boost.Build ==================
(cd tools/build/v2
./b2 --prefix=$RPM_BUILD_ROOT%{_prefix} install
# Fix some permissions
chmod -x $RPM_BUILD_ROOT%{_datadir}/boost-build/build/alias.py
chmod +x $RPM_BUILD_ROOT%{_datadir}/boost-build/tools/doxproc.py
# We don't want to distribute this
rm -f $RPM_BUILD_ROOT%{_bindir}/b2
# Not a real file
rm -f $RPM_BUILD_ROOT%{_datadir}/boost-build/build/project.ann.py
# Empty file
rm -f $RPM_BUILD_ROOT%{_datadir}/boost-build/tools/doxygen/windows-paths-check.hpp
# Install the manual page
%{__install} -p -m 644 doc/bjam.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/bjam.1
)
# Install documentation files (HTML pages) within the temporary place
echo ============================= install documentation ==================
# Prepare the place to temporary store the generated documentation
rm -rf %{boost_docdir} && %{__mkdir_p} %{boost_docdir}/html
DOCPATH=%{boost_docdir}
DOCREGEX='.*\.\(html?\|css\|png\|gif\)'
find libs doc more -type f -regex $DOCREGEX \
| sed -n '/\//{s,/[^/]*$,,;p}' \
| sort -u > tmp-doc-directories
sed "s:^:$DOCPATH/:" tmp-doc-directories \
| xargs -P 0 --no-run-if-empty %{__install} -d
cat tmp-doc-directories | while read tobeinstalleddocdir; do
find $tobeinstalleddocdir -mindepth 1 -maxdepth 1 -regex $DOCREGEX \
| xargs -P 0 %{__install} -p -m 644 -t $DOCPATH/$tobeinstalleddocdir
done
rm -f tmp-doc-directories
%{__install} -p -m 644 -t $DOCPATH LICENSE_1_0.txt index.htm index.html boost.png rst.css boost.css
echo ============================= install examples ==================
# Fix a few non-standard issues (DOS and/or non-UTF8 files)
sed -i -e 's/\r//g' libs/geometry/example/ml02_distance_strategy.cpp
sed -i -e 's/\r//g' libs/geometry/example/ml02_distance_strategy.vcproj
for tmp_doc_file in flyweight/example/Jamfile.v2 \
format/example/sample_new_features.cpp multi_index/example/Jamfile.v2 \
multi_index/example/hashed.cpp serialization/example/demo_output.txt \
test/example/cla/wide_string.cpp
do
mv libs/${tmp_doc_file} libs/${tmp_doc_file}.iso8859
iconv -f ISO8859-1 -t UTF8 < libs/${tmp_doc_file}.iso8859 > libs/${tmp_doc_file}
touch -r libs/${tmp_doc_file}.iso8859 libs/${tmp_doc_file}
rm -f libs/${tmp_doc_file}.iso8859
done
# Prepare the place to temporary store the examples
rm -rf %{boost_examplesdir} && mkdir -p %{boost_examplesdir}/html
EXAMPLESPATH=%{boost_examplesdir}
find libs -type d -name example -exec find {} -type f \; \
| sed -n '/\//{s,/[^/]*$,,;p}' \
| sort -u > tmp-doc-directories
sed "s:^:$EXAMPLESPATH/:" tmp-doc-directories \
| xargs -P 0 --no-run-if-empty %{__install} -d
rm -f tmp-doc-files-to-be-installed && touch tmp-doc-files-to-be-installed
cat tmp-doc-directories | while read tobeinstalleddocdir
do
find $tobeinstalleddocdir -mindepth 1 -maxdepth 1 -type f \
>> tmp-doc-files-to-be-installed
done
cat tmp-doc-files-to-be-installed | while read tobeinstalledfiles
do
if test -s $tobeinstalledfiles
then
tobeinstalleddocdir=`dirname $tobeinstalledfiles`
%{__install} -p -m 644 -t $EXAMPLESPATH/$tobeinstalleddocdir $tobeinstalledfiles
fi
done
rm -f tmp-doc-files-to-be-installed
rm -f tmp-doc-directories
%{__install} -p -m 644 -t $EXAMPLESPATH LICENSE_1_0.txt
%clean
rm -rf $RPM_BUILD_ROOT
# MPI subpackages don't need the ldconfig magic. They are hidden by
# default, in MPI back-end-specific directory, and only show to the
# user after the relevant environment module has been loaded.
# rpmlint will report that as errors, but it is fine.
%post atomic -p /sbin/ldconfig
%postun atomic -p /sbin/ldconfig
%post chrono -p /sbin/ldconfig
%postun chrono -p /sbin/ldconfig
%if %{with context}
%post context -p /sbin/ldconfig
%postun context -p /sbin/ldconfig
%endif
%post date-time -p /sbin/ldconfig
%postun date-time -p /sbin/ldconfig
%post filesystem -p /sbin/ldconfig
%postun filesystem -p /sbin/ldconfig
%post graph -p /sbin/ldconfig
%postun graph -p /sbin/ldconfig
%post iostreams -p /sbin/ldconfig
%postun iostreams -p /sbin/ldconfig
%post locale -p /sbin/ldconfig
%postun locale -p /sbin/ldconfig
%post log -p /sbin/ldconfig
%postun log -p /sbin/ldconfig
%post math -p /sbin/ldconfig
%postun math -p /sbin/ldconfig
%post program-options -p /sbin/ldconfig
%postun program-options -p /sbin/ldconfig
%post python -p /sbin/ldconfig
%postun python -p /sbin/ldconfig
%post random -p /sbin/ldconfig
%postun random -p /sbin/ldconfig
%post regex -p /sbin/ldconfig
%postun regex -p /sbin/ldconfig