Accepting request 227209 from home:repabuild

Am submitting this again, after trying locally to use the "system" bjam, and failing. The bjam in boost-jam rpm does NOT find zlib-devel, and consequently fails to build the boost iostreams zlib compression components. Instead of trying to fix that, the right solution is using the boost-supplied b2/bjam. That also prevents a possible mis-match between the build tool and boost code. In addition there is not much penalty, b2 is quickly built.

OBS-URL: https://build.opensuse.org/request/show/227209
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/boost?expand=0&rev=125
This commit is contained in:
Stephan Kulow 2014-04-01 08:01:36 +00:00 committed by Git OBS Bridge
parent c2a41851e1
commit befb761f0e
2 changed files with 44 additions and 32 deletions

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Tue Mar 11 12:04:13 UTC 2014 - Rene.vanPaassen@gmail.com
- further improved the use of supplied b2 / bootstrap.sh,
include user-config.jam, and remove superfluous python
and gcc instructions from user-config.jam
-------------------------------------------------------------------
Mon Mar 10 16:26:29 UTC 2014 - Rene.vanPaassen@gmail.com
- fix problem with executable .pdf in doc by correcting
permissions after install (%attr with a dir failed on
sled/sles)
- add dependency on zlib-devel and libbz2-devel and use the
supplied bootstrap.sh script in building. This adds
on-the-fly compression to boost-iostreams
-------------------------------------------------------------------
Thu Feb 27 06:13:01 UTC 2014 - coolo@suse.com

View File

@ -66,7 +66,6 @@
%endif
Name: boost
BuildRequires: boost-jam >= 3.1.19
BuildRequires: chrpath
BuildRequires: dos2unix
BuildRequires: gcc-c++
@ -75,6 +74,7 @@ BuildRequires: libexpat-devel
BuildRequires: libicu-devel >= 4.4
BuildRequires: python-devel
BuildRequires: xorg-x11-devel
BuildRequires: zlib-devel
%if %build_mpi
BuildRequires: openmpi-devel
%endif
@ -442,7 +442,7 @@ find . -name \*.orig -exec rm {} +
find . -type f -exec chmod u+w {} +
# Create shared build instructions
cat > .build <<\EOF
cat << EOF >.build
# Now build it
J_P=%{jobs}
J_G=$(getconf _NPROCESSORS_ONLN)
@ -483,18 +483,21 @@ LIBRARIES_FLAGS+=" --without-context --without-coroutine"
%endif
EOF
cat << EOF >user-config.jam
# Boost.Build Configuration
# Read shared build instructions
. ./.build
# Compiler configuration
using gcc ;
# Set PATH, MANPATH and LD_LIBRARY_PATH for mpi
source /var/mpi-selector/data/$(rpm --qf "%{NAME}-%{VERSION}" -q openmpi).sh
# Python configuration
using python : ${PYTHON_VERSION} : %{_prefix} ;
EOF
# use supplied bootstrap.sh instead of mucking with old bjam
# see also: https://svn.boost.org/trac/boost/ticket/9304
./bootstrap.sh --with-libraries=all \
--prefix=%{_prefix} --exec-prefix=%{_bindir} \
--libdir=%{_libdir} --includedir=%{_includedir}
# add specific wishes in user-config.jam
%if %build_docs
cat << EOF >>user-config.jam
cat << EOF >user-config.jam
using xsltproc ;
using boostbook : /usr/share/xml/docbook/stylesheet/nwalsh/current ;
@ -507,41 +510,32 @@ EOF
cat << EOF >>user-config.jam
using mpi ;
EOF
cat >> .build <<\EOF
# Set PATH, MANPATH and LD_LIBRARY_PATH
source /var/mpi-selector/data/$(rpm --qf "%{NAME}-%{VERSION}" -q openmpi).sh
EOF
%endif
# Read shared build instructions
. ./.build
%{_bindir}/bjam ${BJAM_CONFIG} ${LONG_DOUBLE_FLAGS} ${LIBRARIES_FLAGS} \
--user-config=user-config.jam \
cflags="%{optflags}" cxxflags="%{optflags} -fno-var-tracking" stage || \
(echo "Not all Boost libraries built properly."; exit 1)
# perform the compilation
./b2 --prefix=%{_prefix} --libdir=%{_libdir} --user-config=./user-config.jam
%if %build_docs
cd doc
%{_bindir}/bjam ${BJAM_CONFIG} --user-config=../user-config.jam --v2 man
../b2 ${BJAM_CONFIG} --user-config=../user-config.jam --v2 man
%endif
%install
# Read shared build instructions
. ./.build
%{_bindir}/bjam ${BJAM_CONFIG} ${LONG_DOUBLE_FLAGS} ${LIBRARIES_FLAGS} \
--user-config=user-config.jam \
--prefix=%{buildroot}%{_prefix} \
--exec-prefix=$%{buildroot}%{_prefix} \
--libdir=%{buildroot}%{_libdir} \
--includedir=%{buildroot}%{_includedir} \
install || echo "Not all Boost libraries built properly."
# Set PATH, MANPATH and LD_LIBRARY_PATH for mpi
source /var/mpi-selector/data/$(rpm --qf "%{NAME}-%{VERSION}" -q openmpi).sh
./b2 install \
--prefix=%{buildroot}%{_prefix} --exec-prefix=%{buildroot}%{_bindir} \
--libdir=%{buildroot}%{_libdir} --includedir=%{buildroot}%{_includedir} \
--user-config=./user-config.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 %{buildroot}%{_libdir}/mpi.so
rm -f %{buildroot}%{_libdir}/mpi.so
mkdir -p %{buildroot}%{_docdir}
@ -586,6 +580,7 @@ ln -s ../LICENSE_1_0.txt %{buildroot}%{_docdir}/libs
#cp %%{S:5} %%{buildroot}%%{_docdir}
#only for documentation, doesn't need to be executable
find %{buildroot}%{_docdir} -name \*.py -exec chmod -x {} +
chmod -x ../%{name}_%{file_version}_pdf/*.pdf
rm -f %{buildroot}%{_libdir}/*.a
#symlink dupes
%if 0%suse_version > 1020
@ -773,7 +768,7 @@ rm -f %{buildroot}%{_libdir}/*.a
%files doc-pdf
%defattr(-, root, root, -)
%attr(644,root,root) %doc ../%{name}_%{file_version}_pdf/*.pdf
%doc ../%{name}_%{file_version}_pdf/*.pdf
%endif
%changelog