Accepting request 178313 from devel:libraries:c_c++
- Build context library only on supported architectures - Reenable mpi on aarch64 - Avoid duplication between %build and %install OBS-URL: https://build.opensuse.org/request/show/178313 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/boost?expand=0&rev=79
This commit is contained in:
commit
d93d85f35c
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jun 8 08:41:55 UTC 2013 - schwab@suse.de
|
||||||
|
|
||||||
|
- Build context library only on supported architectures
|
||||||
|
- Reenable mpi on aarch64
|
||||||
|
- Avoid duplication between %build and %install
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 3 14:20:58 CEST 2013 - pth@suse.de
|
Wed Apr 3 14:20:58 CEST 2013 - pth@suse.de
|
||||||
|
|
||||||
|
71
boost.spec
71
boost.spec
@ -31,12 +31,19 @@
|
|||||||
# Just hardcode build_mpi to 1 as soon as openmpi builds on all
|
# Just hardcode build_mpi to 1 as soon as openmpi builds on all
|
||||||
# named architectures.
|
# named architectures.
|
||||||
|
|
||||||
%ifarch s390 s390x ia64 hppa aarch64
|
%ifarch s390 s390x ia64 hppa
|
||||||
%define build_mpi 0
|
%define build_mpi 0
|
||||||
%else
|
%else
|
||||||
%define build_mpi 1
|
%define build_mpi 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# context hasn't been ported to most architectures yet
|
||||||
|
%ifarch %ix86 x86_64 %arm mips ppc ppc64
|
||||||
|
%define build_context 1
|
||||||
|
%else
|
||||||
|
%define build_context 0
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch hppa
|
%ifarch hppa
|
||||||
%define disable_long_double 1
|
%define disable_long_double 1
|
||||||
%else
|
%else
|
||||||
@ -403,6 +410,8 @@ find . -name \*.orig -exec rm {} +
|
|||||||
%build
|
%build
|
||||||
find . -type f -exec chmod u+w {} +
|
find . -type f -exec chmod u+w {} +
|
||||||
|
|
||||||
|
# Create shared build instructions
|
||||||
|
cat > .build <<\EOF
|
||||||
# Now build it
|
# Now build it
|
||||||
J_P=%{jobs}
|
J_P=%{jobs}
|
||||||
J_G=$(getconf _NPROCESSORS_ONLN)
|
J_G=$(getconf _NPROCESSORS_ONLN)
|
||||||
@ -413,23 +422,29 @@ if test -z "$JOBS"; then
|
|||||||
else
|
else
|
||||||
test 1 -gt "$JOBS" && JOBS=1
|
test 1 -gt "$JOBS" && JOBS=1
|
||||||
fi
|
fi
|
||||||
if test "$JOBS" == "0"; then
|
if test "$JOBS" = 0; then
|
||||||
JOBS=1
|
JOBS=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# In case you want more parallel jobs then autobuild grants you
|
# In case you want more parallel jobs than autobuild grants you
|
||||||
#if [ $J_P -gt $J_I ]; then
|
#if [ $J_P -gt $J_I ]; then
|
||||||
# JOBS=$J_G
|
# JOBS=$J_G
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
%if %{disable_long_double}
|
%if %{disable_long_double}
|
||||||
export LONG_DOUBLE_FLAGS="--disable-long-double"
|
export LONG_DOUBLE_FLAGS="--disable-long-double"
|
||||||
%endif
|
%endif
|
||||||
BJAM_CONFIG="-d2 -j$JOBS -sICU_PATH=%{_prefix}"
|
BJAM_CONFIG="-d2 -j$JOBS -sICU_PATH=%{_prefix}"
|
||||||
PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
|
PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
|
||||||
PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION"
|
PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION"
|
||||||
REGEX_FLAGS="--with-icu"
|
export REGEX_FLAGS="--with-icu"
|
||||||
export EXPAT_INCLUDE=/usr/include EXPAT_LIBPATH=%{_libdir} REGEX_FLAGS="--with-icu"
|
export EXPAT_INCLUDE=/usr/include EXPAT_LIBPATH=%{_libdir}
|
||||||
export PYTHON_FLAGS
|
export PYTHON_FLAGS
|
||||||
|
LIBRARIES_FLAGS=
|
||||||
|
%if !%build_context
|
||||||
|
LIBRARIES_FLAGS+=" --without-context"
|
||||||
|
%endif
|
||||||
|
EOF
|
||||||
|
|
||||||
cat << EOF >user-config.jam
|
cat << EOF >user-config.jam
|
||||||
# Boost.Build Configuration
|
# Boost.Build Configuration
|
||||||
@ -456,11 +471,18 @@ cat << EOF >>user-config.jam
|
|||||||
using mpi ;
|
using mpi ;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cat >> .build <<\EOF
|
||||||
# Set PATH, MANPATH and LD_LIBRARY_PATH
|
# Set PATH, MANPATH and LD_LIBRARY_PATH
|
||||||
source /var/mpi-selector/data/$(rpm --qf "%{NAME}-%{VERSION}" -q openmpi).sh
|
source /var/mpi-selector/data/$(rpm --qf "%{NAME}-%{VERSION}" -q openmpi).sh
|
||||||
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{_bindir}/bjam ${BJAM_CONFIG} --user-config=user-config.jam ${LONG_DOUBLE_FLAGS} cflags="%{optflags}" cxxflags="%{optflags}" stage || \
|
# Read shared build instructions
|
||||||
|
. ./.build
|
||||||
|
|
||||||
|
%{_bindir}/bjam ${BJAM_CONFIG} ${LONG_DOUBLE_FLAGS} ${LIBRARIES_FLAGS} \
|
||||||
|
--user-config=user-config.jam \
|
||||||
|
cflags="%{optflags}" cxxflags="%{optflags}" stage || \
|
||||||
(echo "Not all Boost libraries built properly."; exit 1)
|
(echo "Not all Boost libraries built properly."; exit 1)
|
||||||
|
|
||||||
%if %build_docs
|
%if %build_docs
|
||||||
@ -469,38 +491,11 @@ cd doc
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Now build it
|
# Read shared build instructions
|
||||||
J_P=%{jobs}
|
. ./.build
|
||||||
J_G=$(getconf _NPROCESSORS_ONLN)
|
|
||||||
[ $J_G -gt 64 ] && J_G=64
|
|
||||||
|
|
||||||
if test -z "$JOBS"; then
|
%{_bindir}/bjam ${BJAM_CONFIG} ${LONG_DOUBLE_FLAGS} ${LIBRARIES_FLAGS} \
|
||||||
JOBS=$J_G
|
--user-config=user-config.jam \
|
||||||
else
|
|
||||||
test 1 -gt "$JOBS" && JOBS=1
|
|
||||||
fi
|
|
||||||
if test "$JOBS" == "0"; then
|
|
||||||
JOBS=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# In case you want more parallel jobs then autobuild grants you
|
|
||||||
if [ $J_P -gt $J_G ]; then
|
|
||||||
JOBS=$J_G
|
|
||||||
fi
|
|
||||||
|
|
||||||
BJAM_CONFIG="-d2 -j$JOBS -sICU_PATH=%{_prefix}"
|
|
||||||
PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
|
|
||||||
PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION"
|
|
||||||
REGEX_FLAGS="--with-icu"
|
|
||||||
export EXPAT_INCLUDE=/usr/include EXPAT_LIBPATH=%{_libdir} REGEX_FLAGS="--with-icu"
|
|
||||||
export PYTHON_FLAGS
|
|
||||||
|
|
||||||
# Set PATH, MANPATH and LD_LIBRARY_PATH
|
|
||||||
%if %build_mpi
|
|
||||||
source /var/mpi-selector/data/$(rpm --qf "%{NAME}-%{VERSION}" -q openmpi).sh
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%{_bindir}/bjam ${BJAM_CONFIG} ${LONG_DOUBLE_FLAGS} --user-config=user-config.jam \
|
|
||||||
--prefix=%{buildroot}%{_prefix} \
|
--prefix=%{buildroot}%{_prefix} \
|
||||||
--exec-prefix=$%{buildroot}%{_prefix} \
|
--exec-prefix=$%{buildroot}%{_prefix} \
|
||||||
--libdir=%{buildroot}%{_libdir} \
|
--libdir=%{buildroot}%{_libdir} \
|
||||||
@ -622,9 +617,11 @@ rm -f %{buildroot}%{_libdir}/*.a
|
|||||||
%defattr(-, root, root, -)
|
%defattr(-, root, root, -)
|
||||||
%{_libdir}/libboost_atomic*.so.*
|
%{_libdir}/libboost_atomic*.so.*
|
||||||
|
|
||||||
|
%if %build_context
|
||||||
%files -n libboost_context%{lib_appendix}
|
%files -n libboost_context%{lib_appendix}
|
||||||
%defattr(-, root, root, -)
|
%defattr(-, root, root, -)
|
||||||
%{_libdir}/libboost_context*.so.*
|
%{_libdir}/libboost_context*.so.*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n libboost_date_time%{lib_appendix}
|
%files -n libboost_date_time%{lib_appendix}
|
||||||
%defattr(-, root, root, -)
|
%defattr(-, root, root, -)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user