On Wed, 01 Jun 2016, Stuart Henderson wrote:
> On 2016/06/01 10:25, David Coppa wrote:
> > Can I commit the diff below?
> >
> > I'd like to move on with my port of libtorrent-rasterbar, and imho
> > it's a reasonable band-aid after all (surely not worse than what we
> > have now).
>
> I'm ok with it if you add an explanatory comment.
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/boost/Makefile,v
retrieving revision 1.57
diff -u -p -u -p -r1.57 Makefile
--- Makefile 27 May 2016 22:35:40 -0000 1.57
+++ Makefile 1 Jun 2016 13:21:15 -0000
@@ -5,7 +5,7 @@ ONLY_FOR_ARCHS= ${GCC4_ARCHS}
COMMENT= free peer-reviewed portable C++ source libraries
VERSION= 1.58.0
-REVISION= 1
+REVISION= 2
DISTNAME= boost_${VERSION:S/./_/g}
PKGNAME= boost-${VERSION}
CATEGORIES= devel
Index: patches/patch-boost_config_compiler_clang_hpp
===================================================================
RCS file: patches/patch-boost_config_compiler_clang_hpp
diff -N patches/patch-boost_config_compiler_clang_hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-boost_config_compiler_clang_hpp 1 Jun 2016 13:21:15
-0000
@@ -0,0 +1,35 @@
+$OpenBSD$
+
+boost does not like mixing different compilers at build and compile
+time.
+
+We build boost itself with gcc-4.2.1 from base, which doesn't support
+the integer scalar type __int128, and this results in a
+/usr/local/include/boost/config/user.hpp lacking the "BOOST_HAS_INT128"
+define.
+
+When compiling something that depends on boost using a newer compiler
+like gcc-4.9 or clang, a code snippet in
+/usr/local/include/boost/config/compiler/{clang,gcc}.hpp reactivates
+__int128 support, but the code containing typedef declarations
+inside /usr/local/include/boost/config/suffix.hpp is never reached,
+because /usr/local/include/boost/config/user.hpp lacks "BOOST_HAS_INT128".
+Hence, the following error occurs:
+
+/usr/local/include/boost/type_traits/is_integral.hpp:72:1: error:
'int128_type' is not a member of 'boost'
+/usr/local/include/boost/type_traits/is_integral.hpp:73:1: error:
'uint128_type' is not a member of 'boost'
+
+As a temporary band-aid, completely disable __int128 support on
+OpenBSD.
+
+--- boost/config/compiler/clang.hpp.orig Tue Mar 24 19:27:48 2015
++++ boost/config/compiler/clang.hpp Mon May 30 09:10:59 2016
+@@ -60,7 +60,7 @@
+ // Only re-enable this for nvcc if you're absolutely sure
+ // of the circumstances under which it's supported:
+ //
+-#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
++#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) &&
!defined(__OpenBSD__)
+ # define BOOST_HAS_INT128
+ #endif
+
Index: patches/patch-boost_config_compiler_gcc_hpp
===================================================================
RCS file: patches/patch-boost_config_compiler_gcc_hpp
diff -N patches/patch-boost_config_compiler_gcc_hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-boost_config_compiler_gcc_hpp 1 Jun 2016 13:21:15 -0000
@@ -0,0 +1,35 @@
+$OpenBSD$
+
+boost does not like mixing different compilers at build and compile
+time.
+
+We build boost itself with gcc-4.2.1 from base, which doesn't support
+the integer scalar type __int128, and this results in a
+/usr/local/include/boost/config/user.hpp lacking the "BOOST_HAS_INT128"
+define.
+
+When compiling something that depends on boost using a newer compiler
+like gcc-4.9 or clang, a code snippet in
+/usr/local/include/boost/config/compiler/{clang,gcc}.hpp reactivates
+__int128 support, but the code containing typedef declarations
+inside /usr/local/include/boost/config/suffix.hpp is never reached,
+because /usr/local/include/boost/config/user.hpp lacks "BOOST_HAS_INT128".
+Hence, the following error occurs:
+
+/usr/local/include/boost/type_traits/is_integral.hpp:72:1: error:
'int128_type' is not a member of 'boost'
+/usr/local/include/boost/type_traits/is_integral.hpp:73:1: error:
'uint128_type' is not a member of 'boost'
+
+As a temporary band-aid, completely disable __int128 support on
+OpenBSD.
+
+--- boost/config/compiler/gcc.hpp.orig Tue Mar 24 19:27:48 2015
++++ boost/config/compiler/gcc.hpp Mon May 30 09:11:23 2016
+@@ -140,7 +140,7 @@
+ // Only re-enable this for nvcc if you're absolutely sure
+ // of the circumstances under which it's supported:
+ //
+-#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
++#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) &&
!defined(__OpenBSD__)
+ # define BOOST_HAS_INT128
+ #endif
+