Updated boost to 1.53.0, however it is broken for now.

This commit is contained in:
Scott McCreary
2013-03-29 01:46:50 +00:00
parent ce3ab9d62a
commit ace2484969
2 changed files with 387 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
DESCRIPTION="boost"
HOMEPAGE="http://www.boost.org/"
SRC_URI="http://sourceforge.net/projects/boost/files/boost/1.53.0/boost_1_53_0.tar.bz2/download"
CHECKSUM_MD5="a00d22605d5dbcfb4c9936a9b35bc4c2"
REVISION="1"
STATUS_HAIKU="broken"
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
DEPEND="boehm-gc"
BUILD {
cd boost_1_53_0
./bootstrap.sh \
--without-icu \
--prefix=`finddir B_COMMON_DIRECTORY` \
--exec-prefix=`finddir B_COMMON_BIN_DIRECTORY` \
--libdir=`finddir B_COMMON_LIB_DIRECTORY` \
--includedir=`finddir B_COMMON_HEADERS_DIRECTORY`
./bjam \
-sICU_PATH=`finddir B_COMMON_DIRECTORY` \
-sICONV_PATH=`finddir B_COMMON_DIRECTORY` \
-d2 \
--without-mpi \
--prefix=`finddir B_COMMON_DIRECTORY` \
--exec-prefix=`finddir B_COMMON_BIN_DIRECTORY` \
--libdir=`finddir B_COMMON_LIB_DIRECTORY` \
--includedir=`finddir B_COMMON_HEADERS_DIRECTORY` \
--enable-threads=posix \
--enable-thread-local-alloc \
--enable-parallel-mark \
inlining=on \
linkflags=-L`finddir B_COMMON_LIB_DIRECTORY` \
threading=multi \
variant=release \
link=shared \
runtime-link=shared
}
INSTALL {
cd boost_1_53_0
./bjam install \
-d2 \
--prefix=${DESTDIR}/`finddir B_COMMON_DIRECTORY` \
#--exec-prefix=${DESTDIR}/`finddir B_COMMON_BIN_DIRECTORY` \
#--libdir=${DESTDIR}/`finddir B_COMMON_LIB_DIRECTORY` \
#--includedir=${DESTDIR}/`finddir B_COMMON_HEADERS_DIRECTORY` \
inlining=on \
--without-mpi
}
LICENSE="Boost v1.0"
COPYRIGHT="1998-2013 Beman Dawes, David Abrahams, Rene Rivera, et al."

View File

@@ -0,0 +1,337 @@
diff -urN boost_1_53_0/boost/config/platform/haiku.hpp boost_1_53_0-haiku/boost/config/platform/haiku.hpp
--- boost_1_53_0/boost/config/platform/haiku.hpp 1969-12-31 16:00:00.000000000 -0800
+++ boost_1_53_0-haiku/boost/config/platform/haiku.hpp 2013-03-28 00:49:51.271056896 -0700
@@ -0,0 +1,27 @@
+//  (C) Copyright John Maddock 2001.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org for most recent version.
+
+//  Haiku specific config options:
+
+#define BOOST_PLATFORM "Haiku"
+
+#define BOOST_NO_INTRINSIC_WCHAR_T
+#define BOOST_HAS_UNISTD_H
+
+#define BOOST_HAS_BETHREADS
+
+#ifndef BOOST_DISABLE_THREADS
+# define BOOST_HAS_THREADS
+#endif
+
+//
+// thread API's not auto detected:
+//
+#define BOOST_HAS_GETTIMEOFDAY
+
+// boilerplate code:
+#include <boost/config/posix_features.hpp>
diff -urN boost_1_53_0/boost/config/select_platform_config.hpp boost_1_53_0-haiku/boost/config/select_platform_config.hpp
--- boost_1_53_0/boost/config/select_platform_config.hpp 2011-10-10 04:50:55.036175872 -0700
+++ boost_1_53_0-haiku/boost/config/select_platform_config.hpp 2013-03-28 00:40:07.746586112 -0700
@@ -41,6 +41,10 @@
// win32:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
+#elif defined(__HAIKU__)
+// Haiku
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp"
+
#elif defined(__BEOS__)
// BeOS
# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
diff -urN boost_1_53_0/boost/config/stdlib/libstdcpp3.hpp boost_1_53_0-haiku/boost/config/stdlib/libstdcpp3.hpp
--- boost_1_53_0/boost/config/stdlib/libstdcpp3.hpp 2012-07-15 08:59:05.036700160 -0700
+++ boost_1_53_0-haiku/boost/config/stdlib/libstdcpp3.hpp 2013-03-28 00:40:17.162267136 -0700
@@ -35,7 +35,8 @@
# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
|| defined(_GLIBCXX__PTHREADS) \
|| defined(_GLIBCXX_HAS_GTHREADS) \
- || defined(_WIN32)
+ || defined(_WIN32) \
+ || defined(__HAIKU__)
//
// If the std lib has thread support turned on, then turn it on in Boost
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT
diff -urN boost_1_53_0/boost/thread/detail/platform.hpp boost_1_53_0-haiku/boost/thread/detail/platform.hpp
--- boost_1_53_0/boost/thread/detail/platform.hpp 2012-07-08 22:55:01.064225280 -0700
+++ boost_1_53_0-haiku/boost/thread/detail/platform.hpp 2013-03-28 00:40:28.586153984 -0700
@@ -34,6 +34,8 @@
# define BOOST_THREAD_WIN32
#elif defined(__BEOS__)
# define BOOST_THREAD_BEOS
+#elif defined(__HAIKU__)
+# define BOOST_THREAD_BEOS
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
# define BOOST_THREAD_MACOS
//# define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(1000)
diff -urN boost_1_53_0/tools/build/v2/engine/boehm_gc/dyn_load.c boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/dyn_load.c
--- boost_1_53_0/tools/build/v2/engine/boehm_gc/dyn_load.c 2011-06-06 13:36:21.029360128 -0700
+++ boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/dyn_load.c 2013-03-28 00:40:38.863240192 -0700
@@ -64,7 +64,7 @@
!defined(AIX) && !defined(SCO_ELF) && !defined(DGUX) && \
!(defined(FREEBSD) && defined(__ELF__)) && \
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
- !defined(DARWIN) && !defined(CYGWIN32)
+ !defined(DARWIN) && !defined(CYGWIN32) !(defined(HAIKU)
--> We only know how to find data segments of dynamic libraries for the
--> above. Additional SVR4 variants might not be too
--> hard to add.
@@ -82,6 +82,10 @@
# define ELFSIZE ARCH_ELFSIZE
#endif
+#if defined(HAIKU)
+
+#endif
+
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
@@ -216,7 +220,8 @@
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
- (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
+ (defined(NETBSD) && defined(__ELF__)) || defined(HURD) || \
+ defined(HAIKU)
#ifdef USE_PROC_FOR_LIBRARIES
diff -urN boost_1_53_0/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h
--- boost_1_53_0/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h 2011-06-06 13:36:21.031719424 -0700
+++ boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h 2013-03-28 00:40:49.546045952 -0700
@@ -45,7 +45,8 @@
|| defined(GC_AIX_THREADS) \
|| defined(GC_LINUX_THREADS) \
|| defined(GC_NETBSD_THREADS) \
- || defined(GC_GNU_THREADS))
+ || defined(GC_GNU_THREADS)) \
+ || defined(GC_HAIKU_THREADS)
# define _REENTRANT
/* Better late than never. This fails if system headers that */
/* depend on this were previously included. */
@@ -62,6 +63,7 @@
# if defined(GC_SOLARIS_THREADS) || defined(GC_FREEBSD_THREADS) || \
defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
+ defined(GC_HAIKU_THREADS) || \
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__)) || \
diff -urN boost_1_53_0/tools/build/v2/engine/boehm_gc/include/gc.h boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/include/gc.h
--- boost_1_53_0/tools/build/v2/engine/boehm_gc/include/gc.h 2011-06-06 13:36:21.031195136 -0700
+++ boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/include/gc.h 2013-03-28 00:40:57.427556864 -0700
@@ -494,7 +494,7 @@
/* of compilers. */
/* This may also be desirable if it is possible but expensive to */
/* retrieve the call chain. */
-#if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
+#if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) \
|| defined(__FreeBSD__) || defined(__DragonFly__)) & !defined(GC_CAN_SAVE_CALL_STACKS)
# define GC_ADD_CALLER
# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
diff -urN boost_1_53_0/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h
--- boost_1_53_0/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h 2011-06-06 13:36:21.034078720 -0700
+++ boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h 2013-03-28 00:41:08.074448896 -0700
@@ -215,6 +215,11 @@
# define BEOS
# define mach_type_known
# endif
+# if defined(__HAIKU__) && defined(_X86_)
+# define I386
+# define HAIKU
+# define mach_type_known
+# endif
# if defined(LINUX) && (defined(i386) || defined(__i386__))
# define I386
# define mach_type_known
@@ -1014,6 +1019,13 @@
extern int etext[];
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
# endif
+# ifdef HAIKU
+# define OS_TYPE "HAIKU"
+# include <OS.h>
+# define GETPAGESIZE() B_PAGE_SIZE
+ extern int etext[];
+# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
+# endif
# ifdef SOLARIS
# define OS_TYPE "SOLARIS"
extern int _etext[], _end[];
diff -urN boost_1_53_0/tools/build/v2/engine/boehm_gc/os_dep.c boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/os_dep.c
--- boost_1_53_0/tools/build/v2/engine/boehm_gc/os_dep.c 2011-06-06 13:36:21.039583744 -0700
+++ boost_1_53_0-haiku/tools/build/v2/engine/boehm_gc/os_dep.c 2013-03-28 00:41:17.561774592 -0700
@@ -777,6 +777,16 @@
# endif /* BEOS */
+# ifdef HAIKU
+# include <OS.h>
+ptr_t GC_get_main_stack_base(void){
+ thread_info th;
+ get_thread_info(find_thread(NULL),&th);
+ return th.stack_end;
+}
+# endif /* HAIKU */
+
+
# ifdef OS2
ptr_t GC_get_main_stack_base(void)
@@ -1095,7 +1105,7 @@
#endif /* FREEBSD_STACKBOTTOM */
-#if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
+#if !defined(BEOS) && !defined(HAIKU) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
&& !defined(CYGWIN32)
@@ -1154,7 +1164,7 @@
# endif /* STACKBOTTOM */
}
-# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */
+# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !HAIKU, !NOSYS, !ECOS */
#if defined(GC_LINUX_THREADS) && !defined(HAVE_GET_STACK_BASE)
diff -urN boost_1_53_0/tools/build/v2/engine/fileunix.c boost_1_53_0-haiku/tools/build/v2/engine/fileunix.c
--- boost_1_53_0/tools/build/v2/engine/fileunix.c 2012-04-25 20:35:55.046399488 -0700
+++ boost_1_53_0-haiku/tools/build/v2/engine/fileunix.c 2013-03-28 00:41:26.497549312 -0700
@@ -81,6 +81,7 @@
# if defined( OS_QNX ) || \
defined( OS_BEOS ) || \
+ defined( OS_HAIKU ) || \
defined( OS_MPEIX )
# define NO_AR
# define HAVE_AR
diff -urN boost_1_53_0/tools/build/v2/engine/jam.h boost_1_53_0-haiku/tools/build/v2/engine/jam.h
--- boost_1_53_0/tools/build/v2/engine/jam.h 2012-06-05 21:00:21.048234496 -0700
+++ boost_1_53_0-haiku/tools/build/v2/engine/jam.h 2013-03-28 00:41:36.127139840 -0700
@@ -151,6 +151,11 @@
#define OS_BEOS
#define NO_VFORK
#endif
+#ifdef __HAIKU__
+ #define unix
+ #define OSMINOR "OS=HAIKU"
+ #define OS_HAIKU
+#endif
#ifdef __bsdi__
#define OSMINOR "OS=BSDI"
#define OS_BSDI
diff -urN boost_1_53_0/tools/build/v2/engine/jambase.c boost_1_53_0-haiku/tools/build/v2/engine/jambase.c
--- boost_1_53_0/tools/build/v2/engine/jambase.c 2011-06-06 13:36:21.048496640 -0700
+++ boost_1_53_0-haiku/tools/build/v2/engine/jambase.c 2013-03-28 00:41:44.670040064 -0700
@@ -548,6 +548,18 @@
"NOARSCAN ?= true ;\n",
"STDHDRS ?= /boot/develop/headers/posix ;\n",
"}\n",
+"else if $(OS) = HAIKU\n",
+"{\n",
+"BINDIR ?= /boot/common/bin ;\n",
+"CC ?= gcc ;\n",
+"C++ ?= $(CC) ;\n",
+"FORTRAN ?= \"\" ;\n",
+"LIBDIR ?= /boot/common/lib ;\n",
+"LINK ?= gcc ;\n",
+"LINKLIBS ?= -lnetwork ;\n",
+"NOARSCAN ?= true ;\n",
+"STDHDRS ?= /boot/develop/headers/posix ;\n",
+"}\n",
"else if $(OS) = BEOS\n",
"{\n",
"BINDIR ?= /boot/apps ;\n",
diff -urN boost_1_53_0/tools/build/v2/tools/builtin.jam boost_1_53_0-haiku/tools/build/v2/tools/builtin.jam
--- boost_1_53_0/tools/build/v2/tools/builtin.jam 2011-06-06 13:36:21.033816576 -0700
+++ boost_1_53_0-haiku/tools/build/v2/tools/builtin.jam 2013-03-28 00:41:54.663748608 -0700
@@ -40,7 +40,7 @@
.os-names = aix bsd cygwin darwin freebsd hpux iphone linux netbsd
- openbsd osf qnx qnxnto sgi solaris unix unixware windows
+ openbsd osf qnx qnxnto sgi solaris unix unixware windows haiku
elf # Not actually an OS -- used for targeting bare metal where
# object format is ELF. This catches both -elf and -eabi gcc
# targets and well as other compilers targeting ELF. It is not
@@ -75,6 +75,7 @@
case COHERENT : host-os = unix ;
case DRAGONFLYBSD : host-os = bsd ;
case IRIX : host-os = sgi ;
+ case HAIKU : host-os = haiku ;
case MACOSX : host-os = darwin ;
case KFREEBSD : host-os = freebsd ;
case LINUX : host-os = linux ;
diff -urN boost_1_53_0/tools/build/v2/tools/builtin.py boost_1_53_0-haiku/tools/build/v2/tools/builtin.py
--- boost_1_53_0/tools/build/v2/tools/builtin.py 2012-04-25 20:35:55.034078720 -0700
+++ boost_1_53_0-haiku/tools/build/v2/tools/builtin.py 2013-03-28 00:42:04.759693312 -0700
@@ -103,6 +103,7 @@
elif host_os == 'MACOSX': host_os = 'darwin'
elif host_os == 'KFREEBSD': host_os = 'freebsd'
elif host_os == 'LINUX': host_os = 'linux'
+ elif host_os == 'HAIKU': host_os = 'haiku'
else: host_os = 'unix'
return host_os.lower()
diff -urN boost_1_53_0/tools/build/v2/tools/gcc.jam boost_1_53_0-haiku/tools/build/v2/tools/gcc.jam
--- boost_1_53_0/tools/build/v2/tools/gcc.jam 2012-04-25 20:35:55.037224448 -0700
+++ boost_1_53_0-haiku/tools/build/v2/tools/gcc.jam 2013-03-28 00:42:15.700710912 -0700
@@ -1050,6 +1050,10 @@
case beos :
{
# BeOS has no threading options, so do not set anything here.
+ }
+ case haiku :
+ {
+ option = ;
}
case *bsd :
{
@@ -1067,7 +1071,7 @@
}
case * :
{
- option = -pthread ;
+ option = -pthreads ;
libs = rt ;
}
}
diff -urN boost_1_53_0/tools/build/v2/tools/gcc.py boost_1_53_0-haiku/tools/build/v2/tools/gcc.py
--- boost_1_53_0/tools/build/v2/tools/gcc.py 2012-04-25 20:35:55.037224448 -0700
+++ boost_1_53_0-haiku/tools/build/v2/tools/gcc.py 2013-03-28 00:42:26.814219264 -0700
@@ -675,6 +675,9 @@
elif host_os_name == 'BeOS':
# BeOS has no threading options, don't set anything here.
pass
+ elif host_os_name == 'Haiku':
+ flags('gcc', 'OPTIONS', ['<threading>multi'], ['-lroot'])
+ # there is no -lrt on HAIKU
elif host_os_name.endswith('BSD'):
flags('gcc', 'OPTIONS', ['<threading>multi'], ['-pthread'])
# there is no -lrt on BSD
diff -urN boost_1_53_0/tools/build/v2/tools/python.jam boost_1_53_0-haiku/tools/build/v2/tools/python.jam
--- boost_1_53_0/tools/build/v2/tools/python.jam 2012-04-25 20:35:55.041156608 -0700
+++ boost_1_53_0-haiku/tools/build/v2/tools/python.jam 2013-03-28 00:42:37.560463872 -0700
@@ -648,13 +648,14 @@
case qnx* : return ;
case darwin : return ;
case windows : return ;
+ case haiku : return ;
case hpux : return <library>rt ;
case *bsd : return <library>pthread <toolset>gcc:<library>util ;
case aix : return <library>pthread <library>dl ;
- case * : return <library>pthread <library>dl
+ case * : return ; <library>pthread <library>dl
<toolset>gcc:<library>util <toolset-intel:platform>linux:<library>util ;
}
}