Accepting request 434344 from devel:libraries:c_c++

- package boost-jam
- add missing ldconfig for libboost_type_erasure
- fix EOL encoding for documentation files

- update to version 1.62.0
  * new library: fiber: framework for userland-threads/fibers
  * new library: QVM: library for working with quaternions,
        vectors and matrices of static size
  * see http://www.boost.org/users/history/version_1_62_0.html
    for complete changelog
- remove boost-fix_include_config.patch - upstreamed
- gcc_path.patch - fix GCC search paths (bnc#996917)
  Boost assumes /usr/include/c++/x.y.z/ existence for GCC 4.x
  onward while our version of GCC only has /usr/include/c++/x.y
  for 4.x GCC and /usr/include/c++/x/ for 5.x onward.
- migrate to using %bcond_ instead of hardcoding macros
  for different Boost features
- better way to limit max number of compilation units than
  by reading /proc/meminfo and guesstimating.

OBS-URL: https://build.opensuse.org/request/show/434344
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/boost?expand=0&rev=110
This commit is contained in:
Dominique Leuenberger 2016-10-19 10:58:57 +00:00 committed by Git OBS Bridge
commit 500cbd0bfd
7 changed files with 197 additions and 112 deletions

View File

@ -1,24 +1,25 @@
boost_1_61-devel
boost_1_62-devel
requires -boost-<targettype>
libboost_atomic1_61_0
libboost_container1_61_0
libboost_context1_61_0
libboost_coroutine1_61_0
libboost_date_time1_61_0
libboost_filesystem1_61_0
libboost_graph1_61_0
libboost_graph_parallel1_61_0
libboost_iostreams1_61_0
libboost_math1_61_0
libboost_mpi1_61_0
libboost_test1_61_0
libboost_program_options1_61_0
libboost_python1_61_0
libboost_random1_61_0
libboost_serialization1_61_0
libboost_signals1_61_0
libboost_system1_61_0
libboost_thread1_61_0
libboost_type_erasure1_61_0
libboost_wave1_61_0
libboost_regex1_61_0
libboost_atomic1_62_0
libboost_container1_62_0
libboost_context1_62_0
libboost_coroutine1_62_0
libboost_date_time1_62_0
libboost_fiber1_62_0
libboost_filesystem1_62_0
libboost_graph1_62_0
libboost_graph_parallel1_62_0
libboost_iostreams1_62_0
libboost_math1_62_0
libboost_mpi1_62_0
libboost_test1_62_0
libboost_program_options1_62_0
libboost_python1_62_0
libboost_random1_62_0
libboost_serialization1_62_0
libboost_signals1_62_0
libboost_system1_62_0
libboost_thread1_62_0
libboost_type_erasure1_62_0
libboost_wave1_62_0
libboost_regex1_62_0

View File

@ -1,11 +0,0 @@
--- /boost_1_61_0/boost/optional/optional_fwd.hpp
+++ /boost_1_61_0.new/boost/optional/optional_fwd.hpp
@@ -16,7 +16,7 @@
#ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
#define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
-#include <boost/config/suffix.hpp>
+#include <boost/config.hpp>
namespace boost {

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
Fri Sep 30 12:13:02 UTC 2016 - adam.majer@suse.de
- package boost-jam
- add missing ldconfig for libboost_type_erasure
- fix EOL encoding for documentation files
-------------------------------------------------------------------
Thu Sep 29 10:56:49 UTC 2016 - adam.majer@suse.de
- update to version 1.62.0
* new library: fiber: framework for userland-threads/fibers
* new library: QVM: library for working with quaternions,
vectors and matrices of static size
* see http://www.boost.org/users/history/version_1_62_0.html
for complete changelog
- remove boost-fix_include_config.patch - upstreamed
- gcc_path.patch - fix GCC search paths (bnc#996917)
Boost assumes /usr/include/c++/x.y.z/ existence for GCC 4.x
onward while our version of GCC only has /usr/include/c++/x.y
for 4.x GCC and /usr/include/c++/x/ for 5.x onward.
- migrate to using %bcond_ instead of hardcoding macros
for different Boost features
- better way to limit max number of compilation units than
by reading /proc/meminfo and guesstimating.
-------------------------------------------------------------------
Thu Aug 18 14:40:43 UTC 2016 - mvetter@suse.com

View File

@ -16,16 +16,16 @@
#
%define ver 1.61.0
%define file_version 1_61_0
%define ver 1.62.0
%define file_version 1_62_0
%define docs_version 1.56.0
%define short_version 1_56
%define lib_appendix 1_61_0
#Only define to 1 to generate the man pages
%define lib_appendix 1_62_0
# building manpages is broken
%bcond_with build_docs
%bcond_without package_pdf
%bcond_without build_quickbook
%define build_docs 0
#Define to 0 to not package the pdf documentation
%define package_pdf 1
%define build_quickbook 1
%define boost_l1 libboost_date_time%{lib_appendix} libboost_filesystem%{lib_appendix} libboost_graph%{lib_appendix}
%define boost_l2 libboost_iostreams%{lib_appendix} libboost_math%{lib_appendix} libboost_test%{lib_appendix}
%define boost_l3 libboost_program_options%{lib_appendix} libboost_python%{lib_appendix} libboost_python3-%{lib_appendix} libboost_serialization%{lib_appendix}
@ -33,37 +33,50 @@
%define boost_l5 libboost_wave%{lib_appendix} libboost_regex%{lib_appendix} libboost_regex%{lib_appendix}
%define boost_l6 libboost_random%{lib_appendix} libboost_chrono%{lib_appendix} libboost_locale%{lib_appendix}
%define boost_l7 libboost_timer%{lib_appendix} libboost_atomic%{lib_appendix} libboost_log%{lib_appendix} libboost_container%{lib_appendix}
%define most_libs %{boost_l1} %{boost_l2} %{boost_l3} %{boost_l4} %{boost_l5} %{boost_l6} %{boost_l7} %{?boost_libs_context}
%define most_libs %{boost_l1} %{boost_l2} %{boost_l3} %{boost_l4} %{boost_l5} %{boost_l6} %{boost_l7}
%define my_docdir %{_docdir}/boost-%{version}
# Just hardcode build_mpi to 1 as soon as openmpi builds on all
# named architectures.
%ifarch ia64 hppa
%define build_mpi 0
%bcond_with build_mpi
%else
%define build_mpi 1
%bcond_without build_mpi
%endif
# context hasn't been ported to most architectures yet
%ifarch %ix86 x86_64 %arm aarch64 mips ppc ppc64 ppc64le
%define build_context 1
%bcond_without build_context
%else
%define build_context 0
%bcond_with build_context
%endif
# needs newer GCC to compile runtime
%if %{with build_context} && 0%{?suse_version} > 1320
%bcond_without boost_fiber
%else
%bcond_with boost_fiber
%endif
%ifarch hppa
%define disable_long_double 1
%bcond_with long_double
%else
%define disable_long_double 0
%bcond_without long_double
%endif
%if %{build_context}
%define boost_libs_context libboost_context%{lib_appendix} libboost_coroutine%{lib_appendix}
%if %{with build_context}
%define context_libs libboost_context%{lib_appendix} libboost_coroutine%{lib_appendix}
%endif
%if %{build_mpi}
%define all_libs %{most_libs} libboost_graph_parallel%{lib_appendix} libboost_mpi%{lib_appendix}
%else
%define all_libs %{most_libs}
%if %{with build_mpi}
%define mpi_libs libboost_graph_parallel%lib_appendix libboost_mpi%{lib_appendix}
%endif
%if %{with boost_fiber}
BuildRequires: gcc-c++ > 5
%define fiber_libs libboost_fiber%{lib_appendix}
%endif
%define all_libs %{most_libs} %{?context_libs} %{?mpi_libs} %{?fiber_libs}
Name: boost
%define package_name boost_1_61
Version: 1.61.0
%define package_name boost_1_62
Version: 1.62.0
Release: 0
Summary: Boost C++ Libraries
License: BSL-1.0
@ -88,7 +101,7 @@ Patch13: boost-visibility.patch
Patch14: boost-1.57.0-python-libpython_dep.patch
Patch15: boost-1.57.0-python-abi_letters.patch
Patch16: boost-1.55.0-python-test-PyImport_AppendInittab.patch
Patch17: boost-fix_include_config.patch
Patch100: gcc_path.patch
BuildRequires: chrpath
BuildRequires: dos2unix
BuildRequires: fdupes
@ -106,10 +119,10 @@ BuildRequires: python3-devel
BuildRequires: zlib-devel
Recommends: %{all_libs}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{build_mpi}
%if %{with build_mpi}
BuildRequires: openmpi-devel
%endif
%if %{build_docs}
%if %{with build_docs}
BuildRequires: docbook
BuildRequires: docbook-xsl-stylesheets
BuildRequires: doxygen
@ -148,6 +161,17 @@ This package contains all that is needed to develop/compile
applications that use the Boost C++ libraries. For documentation see
the documentation packages (html, man or pdf).
%package -n %{package_name}-jam
Summary: A Boost Make Replacement
Group: Development/Tools/Building
Provides: boost-jam
Conflicts: otherproviders(boost-jam)
%description -n %{package_name}-jam
Boost Jam is a build tool based on FTJam, which in turn is based on
Perforce Jam. It contains significant improvements made to facilitate
its use in the Boost Build System.
%package -n boost-license%{lib_appendix}
Summary: Boost License
Group: Development/Libraries/C and C++
@ -170,6 +194,7 @@ BuildArch: noarch
This package contains the documentation of the boost dynamic libraries
in HTML format.
%if %{with build_docs}
# %%package doc-man
# Summary: Man documentation for the Boost C++ Libraries
# Group: Development/Libraries/C and C++
@ -180,8 +205,9 @@ in HTML format.
# %%description doc-man
# This package contains the documentation of the boost dynamic libraries
# as man pages.
%endif
%if %{package_pdf}
%if %{with package_pdf}
%package -n %{package_name}-doc-pdf
Summary: PDF documentation for the Boost C++ Libraries
Group: Development/Libraries/C and C++
@ -237,6 +263,14 @@ Requires: boost-license%{lib_appendix}
%description -n libboost_date_time%{lib_appendix}
This package contains the Boost Date.Time runtime libraries.
%package -n libboost_fiber%{lib_appendix}
Summary: Boost::Filesystem Runtime Libraries
Group: System/Localization
Requires: boost-license%{lib_appendix}
%description -n libboost_fiber%{lib_appendix}
This package contains Boost::Fiber runtime library.
%package -n libboost_filesystem%{lib_appendix}
Summary: Boost::Filesystem Runtime Libraries
Group: System/Localization
@ -287,7 +321,7 @@ Requires: boost-license%{lib_appendix}
%description -n libboost_math%{lib_appendix}
This package contains the Boost::Math Runtime libraries.
%if %{build_mpi}
%if %{with build_mpi}
%package -n libboost_mpi%{lib_appendix}
Summary: Boost::MPI Runtime libraries
Group: System/Libraries
@ -417,7 +451,7 @@ Requires: boost-license%{lib_appendix}
%description -n libboost_type_erasure%{lib_appendix}
This package contains the Boost::TypeErasure runtime library.
%if %{build_quickbook}
%if %{with build_quickbook}
%package -n %{package_name}-quickbook
Summary: Documentation tool geared towards C++
Group: Development/Tools/Doc Generators
@ -432,7 +466,7 @@ tasks.
%endif
%prep
%setup -q -n boost_%{file_version} -b 3
%setup -q -n boost_%{lib_appendix} -b 3
#everything in the tarball has the executable flag set ...
find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {} +
%patch1 -p1
@ -448,7 +482,7 @@ find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {}
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p2
%patch100 -p1
#stupid build machinery copies .orig files
find . -name \*.orig -exec rm {} +
@ -458,44 +492,25 @@ find . -type f -exec chmod u+w {} +
# Create shared build instructions
cat << \EOF >.build
# Now build it
J_P=%{jobs}
J_G=$(getconf _NPROCESSORS_ONLN)
[ $J_G -gt 64 ] && J_G=64
if test -z "$JOBS"; then
JOBS=$J_G
else
test 1 -gt "$JOBS" && JOBS=1
fi
Mem=$(grep MemTotal /proc/meminfo | awk '{print $2}')
# require 4G for parallel build
if test "$Mem" -lt 4000000; then
JOBS=1
elif test "$Mem" -lt 7000000; then
# lower number of jobs if memory is less than 7G but more than 4G
JOBS=2
fi
# In case you want more parallel jobs than autobuild grants you
#if [ $J_P -gt $J_I ]; then
# JOBS=$J_G
#fi
%if %{disable_long_double}
%if ! %{with long_double}
export LONG_DOUBLE_FLAGS="--disable-long-double"
%endif
BJAM_CONFIG="-d2 -j$JOBS -sICU_PATH=%{_prefix}"
BJAM_CONFIG="-d2 -sICU_PATH=%{_prefix}"
PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
PYTHON3_VERSION=$(python3 -c 'import sys; print (sys.version[:3])')
PYTHON3_ABIFLAGS=m
PYTHON3_ABIFLAGS=$(python3 -c 'import sys; print (sys.abiflags);')
export REGEX_FLAGS="--with-icu"
export EXPAT_INCLUDE=%{_includedir} EXPAT_LIBPATH=%{_libdir}
LIBRARIES_FLAGS=--with-libraries=all
%if !%{build_context}
%if ! %{with build_context}
# coroutine/coroutine2 depend on context
LIBRARIES_FLAGS+=" --without-libraries=context,coroutine,coroutine2"
%endif
%if ! %{with boost_fiber}
LIBRARIES_FLAGS+=" --without-libraries=fiber"
%endif
EOF
# Read shared build instructions
@ -541,7 +556,7 @@ using python
EOF
%if %{build_docs}
%if %{with build_docs}
cat << EOF >>user-config.jam
using xsltproc ;
@ -554,22 +569,22 @@ using doxygen ;
EOF
%endif
%if %{build_mpi}
%if %{with build_mpi}
cat << EOF >>user-config.jam
using mpi ;
EOF
%endif
# perform the compilation
./b2 -d+2 -q --prefix=%{_prefix} --libdir=%{_libdir} --user-config=./user-config.jam
./b2 -d+2 -q --prefix=%{_prefix} --libdir=%{_libdir} --user-config=./user-config.jam %{?_smp_mflags}
%if %{build_quickbook}
%if %{with build_quickbook}
pushd tools/quickbook
../../b2 --user-config=../../user-config.jam --v2 dist-bin
popd
%endif
%if %{build_docs}
%if %{with build_docs}
cd doc
../b2 --user-config=../user-config.jam --v2 man
%endif
@ -587,6 +602,10 @@ cd doc
--libdir=%{buildroot}%{_libdir} --includedir=%{buildroot}%{_includedir} \
--user-config=./user-config.jam
mkdir -p %{buildroot}%{_bindir}
install -m 755 bjam %{buildroot}%{_bindir}
ln -s bjam %{buildroot}%{_bindir}/jam
# do not install the python module - as long as noone needs it, it requires more fixes
# see https://bugzilla.redhat.com/show_bug.cgi?id=801534 for details
rm -f %{buildroot}%{_libdir}/mpi.so
@ -618,12 +637,7 @@ popd
# popd
#install doc files
dos2unix libs/ptr_container/doc/tutorial_example.html \
libs/parameter/doc/html/reference.html \
libs/parameter/doc/html/index.html \
libs/iostreams/doc/tree/tree.js \
libs/graph/doc/lengauer_tarjan_dominator.htm
find libs/ -name \*.htm\* -o -name \*.css -o -name \*.js | xargs dos2unix
find . -name \*.htm\* -o -name \*.gif -o -name \*.css -o -name \*.jpg -o -name \*.png -o -name \*.ico | \
tar --files-from=%{SOURCE4} -cf - --files-from=- | tar -C %{buildroot}%{my_docdir} -xf -
rm -rf %{buildroot}%{my_docdir}/boost
@ -635,7 +649,7 @@ rm -f %{buildroot}%{_libdir}/*.a
#symlink dupes
%fdupes %{buildroot}
%if %{build_quickbook}
%if %{with build_quickbook}
mkdir -p %{buildroot}%{_bindir}
install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%endif
@ -650,6 +664,8 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%post -n libboost_date_time%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_fiber%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_filesystem%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_iostreams%{lib_appendix} -p /sbin/ldconfig
@ -672,8 +688,10 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%post -n libboost_thread%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_type_erasure%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_math%{lib_appendix} -p /sbin/ldconfig
%if %{build_mpi}
%if %{with build_mpi}
%post -n libboost_mpi%{lib_appendix} -p /sbin/ldconfig
%endif
@ -703,6 +721,8 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%postun -n libboost_date_time%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_fiber%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_filesystem%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_iostreams%{lib_appendix} -p /sbin/ldconfig
@ -725,8 +745,10 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%postun -n libboost_thread%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_type_erasure%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_math%{lib_appendix} -p /sbin/ldconfig
%if %{build_mpi}
%if %{with build_mpi}
%postun -n libboost_mpi%{lib_appendix} -p /sbin/ldconfig
%endif
@ -746,6 +768,11 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%postun -n libboost_graph_parallel%{lib_appendix} -p /sbin/ldconfig
%files -n %{package_name}-jam
%defattr(-, root, root, -)
%{_bindir}/bjam
%{_bindir}/jam
%files -n boost-license%{lib_appendix}
%defattr(-, root, root, -)
%dir %{my_docdir}
@ -759,7 +786,7 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%defattr(-, root, root, -)
%{_libdir}/libboost_container*.so.*
%if %{build_context}
%if %{with build_context}
%files -n libboost_context%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_context*.so.*
@ -773,6 +800,12 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%defattr(-, root, root, -)
%{_libdir}/libboost_date_time*.so.*
%if %{with boost_fiber}
%files -n libboost_fiber%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_fiber*.so.*
%endif
%files -n libboost_filesystem%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_filesystem*.so.*
@ -797,7 +830,7 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%defattr(-, root, root, -)
%{_libdir}/libboost_math_*.so.*
%if %{build_mpi}
%if %{with build_mpi}
%files -n libboost_mpi%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_mpi*.so.*
@ -875,20 +908,24 @@ install -m 0755 dist/bin/quickbook %{buildroot}%{_bindir}/quickbook
%doc %{my_docdir}/*
%exclude %{my_docdir}/LICENSE_1_0.txt
%if %{with build_docs}
# %%files doc-man
# %%defattr(644, root, root, -)
# %%doc %%{_mandir}/man3/*.3.gz
# %%doc %%{_mandir}/man7/*.7.gz
# %%doc %%{_mandir}/man9/*.9.gz
%endif
%if %{package_pdf}
%if %{with package_pdf}
%files -n %{package_name}-doc-pdf
%defattr(-, root, root, -)
%doc ../boost_%{short_version}_pdf/*.pdf
%endif
%if %{with build_quickbook}
%files -n %{package_name}-quickbook
%defattr(-, root, root, -)
%{_bindir}/quickbook
%endif
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a547bd06c2fd9a71ba1d169d9cf0339da7ebf4753849a8f7d6fdb8feee99b640
size 85202254

3
boost_1_62_0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0
size 84513338

32
gcc_path.patch Normal file
View File

@ -0,0 +1,32 @@
Author: Adam Majer <amajer@suse.de>
Date: Mon, 12 Sep 2016 17:12:13 +0200
Summary: Adapt paths for our GCC versions
Bugs: bnc#996917
Boost assumes /usr/include/c++/x.y.z/ existence for GCC 4.x
onward while our version of GCC only has /usr/include/c++/x.y
for 4.x GCC and /usr/include/c++/x/ for 5.x onward.
Index: boost_1_62_0/boost/tr1/detail/config_all.hpp
===================================================================
--- boost_1_62_0.orig/boost/tr1/detail/config_all.hpp
+++ boost_1_62_0/boost/tr1/detail/config_all.hpp
@@ -102,14 +102,12 @@
// compiler version:
# define BOOST_TR1_STD_HEADER(name) <../4.0.0/name>
/*
- * Before version 3.4.0 the 0 patch level was not part of the include path:
+ * SUSE GCC 4.x has 2 level directory and GCC 5.x and 6.x, only __GNUC__
*/
-# elif defined (__GNUC_PATCHLEVEL__) && ((__GNUC_PATCHLEVEL__ > 0) || \
- (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
- (__GNUC__ > 3))
-# define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/name>
-# else
+# elif __GNUC__ < 5
# define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__/name>
+# else
+# define BOOST_TR1_STD_HEADER(name) <../__GNUC__/name>
# endif
# endif