fix boost with gcc5

This commit is contained in:
Weng Xuetian 2015-11-18 22:34:24 +01:00
parent ee54d1575f
commit b33d3037ef
2 changed files with 44 additions and 3 deletions

View File

@ -9,7 +9,7 @@ pkgbase=boost
pkgname=('boost-libs' 'boost')
pkgver=1.55.0
_boostver=${pkgver//./_}
pkgrel=2
pkgrel=3
pkgdesc="Free peer-reviewed portable C++ source libraries"
arch=('x86_64')
url="http://www.boost.org/"
@ -17,9 +17,11 @@ license=('custom')
makedepends=('icu' 'python2' 'python3' 'bzip2' 'zlib' 'openmpi')
source=("http://downloads.sourceforge.net/${pkgbase}/${pkgbase}_${_boostver}.tar.gz"
# upstream patches
log_fix_dump_avx2.patch)
log_fix_dump_avx2.patch
gcc5.patch)
md5sums=('93780777cfbf999a600f62883bd54b17'
'2d8c2a83421afacda0ff0192c68b2c17')
'2d8c2a83421afacda0ff0192c68b2c17'
'39c9d2165dc2a3d9df50292a5509b270')
#options=("!makeflags")
license=('custom')
@ -29,6 +31,7 @@ prepare() {
cd "${srcdir}/${pkgbase}_${_boostver}"
patch -Np0 < ${srcdir}/log_fix_dump_avx2.patch
patch -Np1 < ${srcdir}/gcc5.patch
# Add an extra python version. This does not replace anything and python 2.x need to be the default.
echo "using python : 3.4 : /usr/bin/python3 : /usr/include/python3.4m : /usr/lib ;" >> ./tools/build/v2/user-config.jam
@ -113,6 +116,7 @@ package_boost-libs() {
install -d -m 755 "${pkgdir}"/usr
cp -a "${_stagedir}"/lib "${pkgdir}"/usr
rm -f "${pkgdir}"/usr/lib/*.a
install -D -m 644 "${srcdir}/"${pkgbase}_${_boostver}/LICENSE_1_0.txt \
"${pkgdir}"/usr/share/licenses/boost-libs/LICENSE_1_0.txt

37
boost/gcc5.patch Normal file
View File

@ -0,0 +1,37 @@
From eec808554936ae068b23df07ab54d4dc6302a695 Mon Sep 17 00:00:00 2001
From: jzmaddock <jzmaddock@gmail.com>
Date: Sat, 23 Aug 2014 09:38:02 +0100
Subject: [PATCH] Fix BOOST_NO_CXX11_VARIADIC_TEMPLATES definition - the
feature was introduced in GCC 4.4.
---
include/boost/config/compiler/gcc.hpp | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
Index: boost1.55-1.55.0+dfsg/boost/config/compiler/gcc.hpp
===================================================================
--- boost1.55-1.55.0+dfsg.orig/boost/config/compiler/gcc.hpp
+++ boost1.55-1.55.0+dfsg/boost/config/compiler/gcc.hpp
@@ -151,13 +151,6 @@
# define BOOST_NO_CXX11_RVALUE_REFERENCES
# define BOOST_NO_CXX11_STATIC_ASSERT
-// Variadic templates compiler:
-// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
-# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
-# define BOOST_HAS_VARIADIC_TMPL
-# else
-# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-# endif
#endif
// C++0x features in 4.4.n and later
@@ -170,6 +163,7 @@
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
# define BOOST_NO_CXX11_INLINE_NAMESPACES
#endif