Browse Source

libboost-1.60.0-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@10357 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 8 years ago
parent
commit
65a8d19f94
1 changed files with 631 additions and 219 deletions
  1. 631 219
      lib/libb/libboost/libboost-vl.spec

+ 631 - 219
lib/libb/libboost/libboost-vl.spec

@@ -1,5 +1,19 @@
+# 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.
+%global boost_docdir __tmp_docdir
+%global boost_examplesdir __tmp_examplesdir
+
+%bcond_without context
+%bcond_without python3
+%bcond_with mpich
+%bcond_with openmpi
+
 %define major 1
-%define minor 54
+%define minor 60
 %define teeny 0
 %define tarname boost
 %define lnkver %{major}_%{minor}
@@ -21,13 +35,18 @@ Name: libboost
 Version: %{major}.%{minor}.%{teeny}
 Release: 1%{?_dist_release}
 Source0: http://downloads.sourceforge.net/%{tarname}/%{tarname}_%{pkgver}.tar.bz2
-Source1: user-config.jam
+Source1: ver.py
+Source2: libboost_thread.so
 License: distributable
 Group: System Environment/Libraries
 URL: http://www.boost.org/
 
 BuildRequires: python-devel apache2-devel bzip2-devel zlib-devel libicu-devel
 BuildRequires: libaio-devel lam
+BuildRequires: libquadmath-devel
+%if %{with python3}
+BuildRequires: python3-devel
+%endif
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
 # https://svn.boost.org/trac/boost/ticket/6150
@@ -37,107 +56,33 @@ Patch4: boost-1.50.0-fix-non-utf8-files.patch
 # 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/6701
+Patch15: boost-1.58.0-pool.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
+Patch25: boost-1.57.0-mpl-print.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
+Patch36: boost-1.57.0-spirit-unused_typedef.patch
 
 # https://svn.boost.org/trac/boost/ticket/9038
-Patch51: boost-1.54.0-pool-test_linking.patch
+Patch51: boost-1.58.0-pool-test_linking.patch
 
-# https://svn.boost.org/trac/boost/ticket/9037
-Patch52: boost-1.54.0-thread-cond_variable_shadow.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1102667
+Patch61: boost-1.57.0-python-libpython_dep.patch
+Patch62: boost-1.57.0-python-abi_letters.patch
+Patch63: boost-1.55.0-python-test-PyImport_AppendInittab.patch
 
-# This was already fixed upstream, so no tracking bug.
-Patch53: boost-1.54.0-pool-max_chunks_shadow.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1190039
+Patch65: boost-1.57.0-build-optflags.patch
 
-# https://svn.boost.org/trac/boost/ticket/9041
-Patch54: boost-1.54.0-thread-link_atomic.patch
+# Prevent gcc.jam from setting -m32 or -m64.
+Patch68: boost-1.58.0-address-model.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
+# https://bugzilla.redhat.com/show_bug.cgi?id=1262444
+Patch81: boost-1.59-test-fenv.patch
 
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -190,42 +135,40 @@ Requires: %{name}-system = %{version}-%{release}
 
 Run-Time support for Boost.Chrono, a set of useful time utilities.
 
+%package container
+Summary: Run-Time component of boost container library
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description container
+
+Boost.Container library implements several well-known containers,
+including STL containers. The aim of the library is to offers advanced
+features not present in standard containers or to offer the latest
+standard draft features for compilers that comply with C++03.
+
 %if %{with context}
 %package context
 Summary: Run-Time component of boost context switching library
 Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
 
 %description context
 
 Run-Time support for Boost.Context, a foundational library that
 provides a sort of cooperative multitasking on a single thread.
-%endif
-
-%package devel
-Summary: Header files and libraries for developing apps which will use %{name}
-Summary(ja): %{name}の開発に必要なヘッダファイル及びライブラリ
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-The %{name}-devel package contains the header files and libraries needed
-to develop programs that use the Boost library.
 
-%description devel -l ja
-%{name}-devel パッケージは Boost ライブラリを使うプログラムの開発に必要な
-ヘッダファイルやライブラリを含んでいます。
-
-%package doc
-Summary: Documents of %{name}
-Summary(ja): %{name}のドキュメント
-Group: Applications/Documentation
+%package coroutine
+Summary: Run-Time component of boost coroutine library
+Group: System Environment/Libraries
 Requires: %{name} = %{version}-%{release}
 
-%description doc
-The %{name}-doc package contains the documents about the boost library.
+%description coroutine
+Run-Time support for Boost.Coroutine, a library that provides
+generalized subroutines which allow multiple entry points for
+suspending and resuming execution.
 
-%description doc -l ja
-%{name}-doc パッケージは Boost ライブラリについてのドキュメントを含んでいます。
+%endif
 
 %package date-time
 Summary: Set of data-time libralies in %{name}
@@ -235,6 +178,14 @@ Requires: %{name} = %{version}-%{release}
 %description date-time
 Set of data-time libralies in %{name}
 
+%package devel
+Summary: Header files and libraries for developing apps which will use %{name}
+Summary(ja): %{name}の開発に必要なヘッダファイル及びライブラリ
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: libicu-devel
+Requires: libquadmath-devel
+
 %package filesystem
 Summary: Set of filesystem operation libralies in %{name}
 Group: System Environment/Libraries
@@ -305,6 +256,32 @@ Requires: %{name} = %{version}-%{release}
 %description python
 Set of Python libralies in %{name}
 
+%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: %{name}-python3 = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
+
+%description python3-devel
+
+Shared object symbolic links for Python 3 variant of Boost.Python.
+
+%endif
+
 %package random
 Summary: Set of random number generation libralies in %{name}
 Group: System Environment/Libraries
@@ -374,6 +351,17 @@ Requires: %{name}-system = %{version}-%{release}
 The Boost Timer library answers that question and does so portably,
 with as little as one #include and one additional line of code.
 
+%package type_erasure
+Summary: Run-Time component of boost type erasure library
+Group: System Environment/Libraries
+Requires: %{name}-chrono = %{version}-%{release}
+Requires: %{name}-system = %{version}-%{release}
+
+%description type_erasure
+
+The Boost.TypeErasure library provides runtime polymorphism in C++
+that is more flexible than that provided by the core language.
+
 %package wave
 Summary: Set of wave libraries in %{name}
 Group: System Environment/Libraries
@@ -382,99 +370,443 @@ Requires: %{name} = %{version}-%{release}
 %description wave
 Set of wave libraries in %{name}
 
+%description devel
+The %{name}-devel package contains the header files and libraries needed
+to develop programs that use the Boost library.
+
+%description devel -l ja
+%{name}-devel パッケージは Boost ライブラリを使うプログラムの開発に必要な
+ヘッダファイルやライブラリを含んでいます。
+
+%package doc
+Summary: Documents of %{name}
+Summary(ja): %{name}のドキュメント
+Group: Applications/Documentation
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+The %{name}-doc package contains the documents about the boost library.
+
+%description doc -l ja
+%{name}-doc パッケージは Boost ライブラリについてのドキュメントを含んでいます。
+
+%package build
+Summary: Cross platform build system for C++ projects
+Group: Development/Tools
+Requires: %{name}-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 doctools
+Summary: Tools for working with Boost documentation
+Group: Applications/Publishing
+Requires: docbook-dtds
+Requires: docbook-style-xsl
+
+%description doctools
+
+Tools for working with Boost documentation in BoostBook or QuickBook format.
+
+%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
+
+
+%if %{with openmpi}
+
+%package openmpi
+Summary: Run-Time component of Boost.MPI library
+Group: System Environment/Libraries
+BuildRequires: openmpi-devel
+Requires: %{name}-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-python
+Summary: Python run-time component of Boost.MPI library
+Group: System Environment/Libraries
+Requires: %{name}-openmpi%{?_isa} = %{version}-%{release}
+Requires: %{name}-python%{?_isa} = %{version}-%{release}
+Requires: %{name}-serialization%{?_isa} = %{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: %{name}-openmpi%{?_isa} = %{version}-%{release}
+Requires: %{name}-serialization%{?_isa} = %{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
+BuildRequires: mpich-devel
+Requires: %{name}-serialization%{?_isa} = %{version}-%{release}
+Provides: boost-mpich2 = %{version}-%{release}
+Obsoletes: boost-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-python
+Summary: Python run-time component of Boost.MPI library
+Group: System Environment/Libraries
+Requires: %{name}-mpich%{?_isa} = %{version}-%{release}
+Requires: %{name}-python%{?_isa} = %{version}-%{release}
+Requires: %{name}-serialization%{?_isa} = %{version}-%{release}
+Provides: boost-mpich2-python = %{version}-%{release}
+Obsoletes: boost-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: %{name}-mpich%{?_isa} = %{version}-%{release}
+Requires: %{name}-serialization%{?_isa} = %{version}-%{release}
+Provides: boost-graph-mpich2 = %{version}-%{release}
+Obsoletes: boost-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
+
+
 %prep
 %setup -q -n %{tarname}_%{pkgver}
-cp %SOURCE1 user-config.jam
 
 %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
+%patch25 -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
+%patch61 -p1
+%patch62 -p1
+%patch63 -p1
+%patch65 -p1
+%patch68 -p1
+%patch81 -p2
+
+# 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
-## ./configure --prefix=/usr --libdir=%{_libdir} --with-icu
-## make EXPAT_INCLUDE=/usr/include EXPAT_LIBPATH=/usr/lib
-./bootstrap.sh \
-	--prefix=%{_prefix} \
-	--libdir=%{_libdir} \
-	--includedir=%{_includedir} \
-	--with-icu=%{_prefix} \
-	--with-python-version=%{pyver}
+: PYTHON2_VERSION=%{python2_version}
+%if %{with python3}
+: PYTHON3_VERSION=%{python3_version}
+: PYTHON3_ABIFLAGS=%{python3_abiflags}
+%endif
+
+# There are many strict aliasing warnings, and it's not feasible to go
+# through them all at this time.
+# There are also lots of noisy but harmless unused local typedef warnings.
+export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs"
+
+cat > ./tools/build/src/user-config.jam << "EOF"
+import os ;
+local RPM_OPT_FLAGS = [ os.environ RPM_OPT_FLAGS ] ;
 
-./bjam -sICU_LINK="-L%{_libdir} -licui18n" --user-config=./user-config.jam link=shared
+using gcc : : : <compileflags>$(RPM_OPT_FLAGS) ;
+%if %{with openmpi} || %{with mpich}
+using mpi ;
+%endif
+%if %{with python3}
+using python : %{python2_version} : /usr/bin/python2 : /usr/include/python%{python2_version} : : : : ;
+using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}%{python3_abiflags} : : : : %{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 --without-coroutine2 \
+%endif
+        variant=release threading=multi debug-symbols=on pch=off \
+        python=%{python2_version} stage
+
+# See libs/thread/build/Jamfile.v2 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
+ ./bootstrap.sh --with-toolset=gcc)
+
+%check
+:
 
 %install
 rm -rf $RPM_BUILD_ROOT
-## ./tools/jam/src/bin.linux*/bjam -sICU_PATH=/usr -sEXPAT_INCLUDE=/usr/include -sEXPAT_LIBPATH=/usr/lib --user-config=user-config.jam --prefix=${RPM_BUILD_ROOT}/usr --libdir=${RPM_BUILD_ROOT}%{_libdir} install
+#cd %{_builddir}/%{name}_%{pkgver}
 
-./bjam \
-	--prefix=${RPM_BUILD_ROOT}%{_prefix} \
-	--libdir=${RPM_BUILD_ROOT}%{_libdir} \
-	--user-config=./user-config.jam \
-	link=shared \
-	install
+%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 --without-coroutine2 \
+%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
+ ./b2 --prefix=$RPM_BUILD_ROOT%{_prefix} install
+ # Fix some permissions
+ chmod -x $RPM_BUILD_ROOT%{_datadir}/boost-build/src/build/alias.py
+ chmod +x $RPM_BUILD_ROOT%{_datadir}/boost-build/src/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/src/build/project.ann.py
+ # Empty file
+ rm -f $RPM_BUILD_ROOT%{_datadir}/boost-build/src/tools/doxygen/windows-paths-check.hpp
+ # Install the manual page
+ %{__install} -p -m 644 v2/doc/bjam.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/bjam.1
+)
+
+echo ============================= install Boost.QuickBook ==================
+(cd tools/quickbook
+ ../build/b2 --prefix=$RPM_BUILD_ROOT%{_prefix}
+ %{__install} -p -m 755 ../../dist/bin/quickbook $RPM_BUILD_ROOT%{_bindir}/
+ cd ../boostbook
+ find dtd -type f -name '*.dtd' | while read tobeinstalledfiles; do
+   install -p -m 644 $tobeinstalledfiles -D $RPM_BUILD_ROOT%{_datadir}/boostbook/$tobeinstalledfiles
+ done
+ find xsl -type f | while read tobeinstalledfiles; do
+   install -p -m 644 $tobeinstalledfiles -D $RPM_BUILD_ROOT%{_datadir}/boostbook/$tobeinstalledfiles
+ done
+)
+
+# Install documentation files (HTML pages) within the temporary place
+echo ============================= install documentation ==================
+# Prepare the place to temporarily 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 -print0 \
+    | xargs -P 0 -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
+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
+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 temporarily 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
 
 ln -s ./%{tarname} ${RPM_BUILD_ROOT}/%{_includedir}/%{tarname}-%{lnkver}
 
 # remove unuse files
 rm -f ${RPM_BUILD_ROOT}/%{_libdir}/%{name}_*.a
 
-# unnead for libboost-1.42
-## pushd $RPM_BUILD_ROOT/%{_libdir}
-## for i in libboost_*-mt.so
-## do
-##   ln -sf $i $(echo $i | cut -f1 -d-).so
-## done
-## popd
-
-## %post devel
-## if [ $1 = 2 ]; then
-##    rm -rf %{_includedir}/%{tarname}
-## fi
-## ln -s %{_includedir}/%{tarname}-%{lnkver}/%{tarname} %{_includedir}/%{tarname}
-## 
-## %postun devel
-## if [ $1 = 0 ]; then
-##    rm -rf %{_includedir}/%{tarname}
-## fi
+%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
 %post chrono -p /sbin/ldconfig
+%post container -p /sbin/ldconfig
 %if %{with context}
 %post context -p /sbin/ldconfig
+%post coroutine -p /sbin/ldconfig
 %endif
 %post date-time -p /sbin/ldconfig
 %post filesystem -p /sbin/ldconfig
@@ -485,6 +817,7 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/%{name}_*.a
 %post math -p /sbin/ldconfig
 %post program-options -p /sbin/ldconfig
 %post python -p /sbin/ldconfig
+%post random -p /sbin/ldconfig
 %post regex -p /sbin/ldconfig
 %post serialization -p /sbin/ldconfig
 %post signals -p /sbin/ldconfig
@@ -492,12 +825,15 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/%{name}_*.a
 %post test -p /sbin/ldconfig
 %post thread -p /sbin/ldconfig
 %post timer -p /sbin/ldconfig
+%post type_erasure -p /sbin/ldconfig
 %post wave -p /sbin/ldconfig
 
 %postun atomic -p /sbin/ldconfig
 %postun chrono -p /sbin/ldconfig
+%postun container -p /sbin/ldconfig
 %if %{with context}
 %postun context -p /sbin/ldconfig
+%postun coroutine -p /sbin/ldconfig
 %endif
 %postun date-time -p /sbin/ldconfig
 %postun filesystem -p /sbin/ldconfig
@@ -508,6 +844,7 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/%{name}_*.a
 %postun math -p /sbin/ldconfig
 %postun program-options -p /sbin/ldconfig
 %postun python -p /sbin/ldconfig
+%postun random -p /sbin/ldconfig
 %postun regex -p /sbin/ldconfig
 %postun serialization -p /sbin/ldconfig
 %postun signals -p /sbin/ldconfig
@@ -515,11 +852,9 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/%{name}_*.a
 %postun test -p /sbin/ldconfig
 %postun thread -p /sbin/ldconfig
 %postun timer -p /sbin/ldconfig
+%postun type_erasure -p /sbin/ldconfig
 %postun wave -p /sbin/ldconfig
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(-,root,root)
 %doc LICENSE_1_0.txt
@@ -527,111 +862,188 @@ rm -rf $RPM_BUILD_ROOT
 %files atomic
 %defattr(-, root, root, -)
 %doc LICENSE_1_0.txt
-%{_libdir}/libboost_atomic.so*
+%{_libdir}/libboost_atomic.so.*
 
 %files chrono
 %defattr(-, root, root, -)
 %doc LICENSE_1_0.txt
-%{_libdir}/libboost_chrono.so*
+%{_libdir}/libboost_chrono.so.*
+
+%files container
+%license LICENSE_1_0.txt
+%{_libdir}/libboost_container.so.*
 
 %if %{with context}
 %files context
 %defattr(-, root, root, -)
 %doc LICENSE_1_0.txt
-%{_libdir}/libboost_context.so*
-%endif
-
-%files devel
-%defattr(-,root,root)
-%{_includedir}/boost/
-%{_includedir}/boost-%{lnkver}
+%{_libdir}/libboost_context.so.*
 
-%files doc
-%doc index.htm index.html boost.css boost.png rst.css doc libs more
+%files coroutine
+%license LICENSE_1_0.txt
+%{_libdir}/libboost_coroutine.so.*
+%endif
 
 %files date-time
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_date_time*.so*
+%{_libdir}/%{name}_date_time*.so.*
 
 %files filesystem
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_filesystem*.so*
+%{_libdir}/%{name}_filesystem*.so.*
 
 %files graph
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_graph*.so*
-%{_libdir}/%{name}_mpi*.so*
-%{_libdir}/mpi*.so*
+%{_libdir}/%{name}_graph*.so.*
 
 %files iostreams
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_iostreams*.so*
+%{_libdir}/%{name}_iostreams*.so.*
 
 %files locale
 %defattr(-, root, root, -)
 %doc LICENSE_1_0.txt
-%{_libdir}/libboost_locale.so*
+%{_libdir}/libboost_locale.so.*
 
 %files log
 %defattr(-, root, root, -)
 %doc LICENSE_1_0.txt
-%{_libdir}/libboost_log.so*
-%{_libdir}/libboost_log_setup.so*
+%{_libdir}/libboost_log.so.*
+%{_libdir}/libboost_log_setup.so.*
 
 %files math
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_math_*.so*
+%{_libdir}/%{name}_math_*.so.*
 
 %files program-options
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_program_options*.so*
+%{_libdir}/%{name}_program_options*.so.*
 
 %files python
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_python*.so*
+%{_libdir}/%{name}_python.so.*
+
+%if %{with python3}
+%files python3
+%license LICENSE_1_0.txt
+%{_libdir}/libboost_python3.so.*
+
+%files python3-devel
+%license LICENSE_1_0.txt
+%{_libdir}/libboost_python3.so
+%endif
 
 %files random
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_random*.so*
+%{_libdir}/%{name}_random*.so.*
 
 %files regex
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_regex*.so*
+%{_libdir}/%{name}_regex*.so.*
 
 %files serialization
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_serialization*.so*
-%{_libdir}/%{name}_wserialization*.so*
+%{_libdir}/%{name}_serialization*.so.*
+%{_libdir}/%{name}_wserialization*.so.*
 
 %files signals
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_signals*.so*
+%{_libdir}/%{name}_signals*.so.*
 
 %files system
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_system*.so*
+%{_libdir}/%{name}_system*.so.*
 
 %files test
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_prg_exec_monitor*.so*
-%{_libdir}/%{name}_unit_test_framework*.so*
+%{_libdir}/%{name}_prg_exec_monitor*.so.*
+%{_libdir}/%{name}_unit_test_framework*.so.*
 
 %files thread
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_thread*.so*
+%{_libdir}/%{name}_thread*.so.*
 
 %files timer
 %defattr(-, root, root, -)
 %doc LICENSE_1_0.txt
-%{_libdir}/libboost_timer.so*
+%{_libdir}/libboost_timer.so.*
+
+%files type_erasure
+%license LICENSE_1_0.txt
+%{_libdir}/libboost_type_erasure.so.*
 
 %files wave
 %doc LICENSE_1_0.txt
-%{_libdir}/%{name}_wave*.so*
+%{_libdir}/%{name}_wave*.so.*
+
+%files devel
+%defattr(-,root,root)
+%{_includedir}/boost/
+%{_includedir}/boost-%{lnkver}
+%{_libdir}/%{name}_*.so
+
+%files doc
+%doc index.htm index.html boost.css boost.png rst.css doc libs more
+
+%files build
+%license LICENSE_1_0.txt
+%{_datadir}/boost-build
+
+%files doctools
+%license LICENSE_1_0.txt
+%{_bindir}/quickbook
+%{_datadir}/boostbook/
+
+%files jam
+%license LICENSE_1_0.txt
+%{_bindir}/bjam
+%{_mandir}/man1/bjam.1*
+
+# OpenMPI packages
+%if %{with openmpi}
+
+%files openmpi
+%license LICENSE_1_0.txt
+%{_libdir}/openmpi/lib/libboost_mpi.so.*
+
+%files openmpi-python
+%license LICENSE_1_0.txt
+%{_libdir}/openmpi/lib/libboost_mpi_python.so.*
+%{_libdir}/openmpi/lib/mpi.so
+
+%files graph-openmpi
+%license LICENSE_1_0.txt
+%{_libdir}/openmpi/lib/libboost_graph_parallel.so.*
+
+%endif
+
+# MPICH packages
+%if %{with mpich}
+
+%files mpich
+%license LICENSE_1_0.txt
+%{_libdir}/mpich/lib/libboost_mpi.so.*
+
+%files mpich-python
+%license LICENSE_1_0.txt
+%{_libdir}/mpich/lib/libboost_mpi_python.so.*
+%{_libdir}/mpich/lib/mpi.so
+
+%files graph-mpich
+%license LICENSE_1_0.txt
+%{_libdir}/mpich/lib/libboost_graph_parallel.so.*
+
+%endif
 
 %changelog
+* Mon Jun  6 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.60.0-1
+- updated to boost_1_60_0.
+- dropped all patches.
+- imported patches from rawhide.
+- moved *.so into libboost-devel.
+
 * Mon Nov 25 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 1.54.0-1
-- update tp boost_1_54_0
+- update to boost_1_54_0
 - all package: including license file
 - drop boost_filesystem patch (Patch0)
 - sync Fedora boost-1.54.0-5.fc21