mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
main/boost: add patch to fix int128 detection
This commit is contained in:
parent
03a6370845
commit
4c0690cdb0
@ -8,7 +8,7 @@ _y=${_y#*.} # strip x.
|
||||
_z=${pkgver##*.} # strip x.y.
|
||||
_ver=${_x}_${_y}_${_z}
|
||||
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Free peer-reviewed portable C++ source libraries"
|
||||
url="http://www.boost.org/"
|
||||
arch="all"
|
||||
@ -36,6 +36,7 @@ $pkgname-wserialization
|
||||
"
|
||||
source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_ver.tar.gz
|
||||
stdint.patch
|
||||
boost-1.54.0-Fix-macro-for-int128-detection.patch
|
||||
"
|
||||
|
||||
_builddir="$srcdir"/${pkgname}_${_ver}
|
||||
@ -135,8 +136,11 @@ wserialization() { _mvlib wserialization; }
|
||||
|
||||
|
||||
md5sums="efbfbff5a85a9330951f243d0a46e4b9 boost_1_54_0.tar.gz
|
||||
44d1879459159367448967a2c43c36d1 stdint.patch"
|
||||
44d1879459159367448967a2c43c36d1 stdint.patch
|
||||
cba4ae04208e6adf331e78eabee4ba53 boost-1.54.0-Fix-macro-for-int128-detection.patch"
|
||||
sha256sums="412d003299e72555e1e1f62f51d3b07eca2a1911e27c442ee1c08167826ef9e2 boost_1_54_0.tar.gz
|
||||
b48f6ba5ffbc04c88dedb6b6639d2870a8f0901693d762f5c8d2e912d8ab47a6 stdint.patch"
|
||||
b48f6ba5ffbc04c88dedb6b6639d2870a8f0901693d762f5c8d2e912d8ab47a6 stdint.patch
|
||||
6e5e868ca8218c23537cf5108d2998280a2cbbd3e6b5f69245469c38f8cf00b8 boost-1.54.0-Fix-macro-for-int128-detection.patch"
|
||||
sha512sums="c2c56a50828d14d7eb34bb309702e232dbe2afa4ed6837a0e5af16f553e563b91f65a98413f5458f09d5899e42754277ce0d2556a642e9aed77eaa3bc2a28b36 boost_1_54_0.tar.gz
|
||||
b964488c9c74d89a55480b3a0078d4e7a19df91c9a7ba9ea2695142b54335191a3c0fbb004893c03b498bc270680403e1ba3681eb94ef4407a70f0727aa66c0a stdint.patch"
|
||||
b964488c9c74d89a55480b3a0078d4e7a19df91c9a7ba9ea2695142b54335191a3c0fbb004893c03b498bc270680403e1ba3681eb94ef4407a70f0727aa66c0a stdint.patch
|
||||
0d62aadd3021e435553ee5764a3b16259e160ab5607813ec69a026d646f76cf1eff8ccf37f6f85db7af3e193f23b8ef2e6a0e034ae41b22f5f12d319f34d5363 boost-1.54.0-Fix-macro-for-int128-detection.patch"
|
||||
|
35
main/boost/boost-1.54.0-Fix-macro-for-int128-detection.patch
Normal file
35
main/boost/boost-1.54.0-Fix-macro-for-int128-detection.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Index: boost/lexical_cast.hpp
|
||||
===================================================================
|
||||
--- boost/lexical_cast.hpp (revision 84136)
|
||||
+++ boost/lexical_cast.hpp (revision 84965)
|
||||
@@ -70,8 +70,8 @@
|
||||
#endif
|
||||
|
||||
-#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
|
||||
+// GCC 4.6 has some issues with int128 and uint128. Issues were fixed in GCC 4.7
|
||||
+#if defined(BOOST_HAS_INT128) && (!defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6))
|
||||
#define BOOST_LCAST_HAS_INT128
|
||||
#endif
|
||||
-
|
||||
|
||||
namespace boost
|
||||
Index: libs/conversion/test/lexical_cast_integral_types_test.cpp
|
||||
===================================================================
|
||||
--- libs/conversion/test/lexical_cast_integral_types_test.cpp (revision 83717)
|
||||
+++ libs/conversion/test/lexical_cast_integral_types_test.cpp (revision 84965)
|
||||
@@ -49,5 +49,5 @@
|
||||
#endif
|
||||
|
||||
-#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
|
||||
+#if defined(BOOST_HAS_INT128) && (!defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6))
|
||||
#define BOOST_LCAST_HAS_INT128
|
||||
#endif
|
||||
@@ -445,6 +445,6 @@
|
||||
|
||||
// Overflow test case from David W. Birdsall
|
||||
- std::string must_owerflow_str = "160000000000000000000";
|
||||
- std::string must_owerflow_negative_str = "-160000000000000000000";
|
||||
+ std::string must_owerflow_str = (sizeof(T) < 16 ? "160000000000000000000" : "1600000000000000000000000000000000000000");
|
||||
+ std::string must_owerflow_negative_str = (sizeof(T) < 16 ? "-160000000000000000000" : "-1600000000000000000000000000000000000000");
|
||||
for (int i = 0; i < 15; ++i) {
|
||||
BOOST_CHECK_THROW(lexical_cast<T>(must_owerflow_str), bad_lexical_cast);
|
Loading…
Reference in New Issue
Block a user