mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 13:50:08 +02:00
234 lines
7.5 KiB
Plaintext
234 lines
7.5 KiB
Plaintext
From 8b1be1258d061ef9db9b2b22f95813d051374cfb Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@gmail.com>
|
|
Date: Sat, 6 Aug 2016 22:27:19 +0200
|
|
Subject: Import changes from 1.55.0: buildtools
|
|
|
|
|
|
diff --git a/tools/build/src/engine/boehm_gc/include/gc_config_macros.h b/tools/build/src/engine/boehm_gc/include/gc_config_macros.h
|
|
index 762162a..723b4c3 100644
|
|
--- a/tools/build/src/engine/boehm_gc/include/gc_config_macros.h
|
|
+++ b/tools/build/src/engine/boehm_gc/include/gc_config_macros.h
|
|
@@ -62,7 +62,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_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 --git a/tools/build/src/engine/boehm_gc/include/private/gcconfig.h b/tools/build/src/engine/boehm_gc/include/private/gcconfig.h
|
|
index 61cf9eac..427a9be 100644
|
|
--- a/tools/build/src/engine/boehm_gc/include/private/gcconfig.h
|
|
+++ b/tools/build/src/engine/boehm_gc/include/private/gcconfig.h
|
|
@@ -219,6 +219,12 @@
|
|
# define I386
|
|
# define HAIKU
|
|
# define mach_type_known
|
|
+# endif
|
|
+# if defined(__HAIKU__) && defined(__x86_64__)
|
|
+# define X86_64
|
|
+# define HAIKU
|
|
+# define mach_type_known
|
|
+# endif
|
|
# if defined(LINUX) && (defined(i386) || defined(__i386__))
|
|
# define I386
|
|
# define mach_type_known
|
|
@@ -1025,6 +1031,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 --git a/tools/build/src/engine/boehm_gc/os_dep.c b/tools/build/src/engine/boehm_gc/os_dep.c
|
|
index 2dd087f..8be17f8 100644
|
|
--- a/tools/build/src/engine/boehm_gc/os_dep.c
|
|
+++ b/tools/build/src/engine/boehm_gc/os_dep.c
|
|
@@ -776,6 +776,15 @@ ptr_t GC_get_main_stack_base(void){
|
|
}
|
|
# 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 HAIKU
|
|
# include <OS.h>
|
|
@@ -1106,7 +1115,7 @@ ptr_t GC_get_main_stack_base(void)
|
|
|
|
#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) && !defined(HAIKU)
|
|
|
|
diff --git a/tools/build/src/engine/jam.h b/tools/build/src/engine/jam.h
|
|
index a6abf41..b774a59 100644
|
|
--- a/tools/build/src/engine/jam.h
|
|
+++ b/tools/build/src/engine/jam.h
|
|
@@ -162,6 +162,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 --git a/tools/build/src/tools/builtin.py b/tools/build/src/tools/builtin.py
|
|
index 1a80c3f..031c014 100644
|
|
--- a/tools/build/src/tools/builtin.py
|
|
+++ b/tools/build/src/tools/builtin.py
|
|
@@ -82,7 +82,7 @@ def variant (name, parents_or_properties, explicit_properties = []):
|
|
feature.compose ("<variant>" + name, explicit_properties.all())
|
|
|
|
__os_names = """
|
|
- amiga aix appletv bsd cygwin darwin dos emx freebsd hpux iphone linux netbsd
|
|
+ amiga aix appletv bsd cygwin darwin dos emx freebsd haiku hpux iphone linux netbsd
|
|
openbsd osf qnx qnxnto sgi solaris sun sunos svr4 sysv ultrix unix unixware
|
|
vms windows
|
|
""".split()
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 8a48ec20f7fb03bd5fbcefd5f1e7259bb37fbdb6 Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@gmail.com>
|
|
Date: Sat, 6 Aug 2016 22:27:41 +0200
|
|
Subject: Import changes from 1.55.0: sourcecode
|
|
|
|
|
|
diff --git a/boost/thread/detail/platform.hpp b/boost/thread/detail/platform.hpp
|
|
index 172a601..c706e40 100644
|
|
--- a/boost/thread/detail/platform.hpp
|
|
+++ b/boost/thread/detail/platform.hpp
|
|
@@ -34,7 +34,7 @@
|
|
#if ! defined BOOST_THREAD_WIN32
|
|
# define BOOST_THREAD_WIN32
|
|
#endif
|
|
-#elif defined(__BEOS__)
|
|
+#elif defined(__BEOS__) || defined(__HAIKU__)
|
|
# define BOOST_THREAD_BEOS
|
|
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
|
# define BOOST_THREAD_MACOS
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 389501f44db62e8041e7629da8b4ada6dec2e003 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Sat, 14 Oct 2017 11:47:09 +0200
|
|
Subject: Haiku needs bsd and _BSD_SOURCE.
|
|
|
|
|
|
diff --git a/tools/build/src/engine/build.jam b/tools/build/src/engine/build.jam
|
|
index a92b70f..e1655dd 100644
|
|
--- a/tools/build/src/engine/build.jam
|
|
+++ b/tools/build/src/engine/build.jam
|
|
@@ -583,6 +583,11 @@ if $(OS) = VMS
|
|
{
|
|
--defs += VMS ;
|
|
}
|
|
+if $(OS) = HAIKU
|
|
+{
|
|
+ --defs += _BSD_SOURCE ;
|
|
+ --libs += -lbsd ;
|
|
+}
|
|
--defs += YYSTACKSIZE=5000 ;
|
|
|
|
if $(with-python)
|
|
diff --git a/tools/build/src/engine/build.sh b/tools/build/src/engine/build.sh
|
|
index 7e46e38..67293a0 100755
|
|
--- a/tools/build/src/engine/build.sh
|
|
+++ b/tools/build/src/engine/build.sh
|
|
@@ -150,6 +150,13 @@ case $BOOST_JAM_TOOLSET in
|
|
BOOST_JAM_OS="NT"
|
|
;;
|
|
|
|
+ *haiku*)
|
|
+ BOOST_JAM_CC=cc
|
|
+ BOOST_JAM_OPT_JAM="$BOOST_JAM_OPT_JAM -D_BSD_SOURCE -lbsd"
|
|
+ BOOST_JAM_OPT_MKJAMBASE="$BOOST_JAM_OPT_MKJAMBASE -D_BSD_SOURCE -lbsd"
|
|
+ BOOST_JAM_OPT_YYACC="$BOOST_JAM_OPT_YYACC -D_BSD_SOURCE -lbsd"
|
|
+ ;;
|
|
+
|
|
*)
|
|
BOOST_JAM_CC=gcc
|
|
esac
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From e92ab804d523656e6e1954dc74b347e563508ef4 Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sun, 18 Dec 2022 08:16:06 +0100
|
|
Subject: fix build, kudos to Jessicah and waddlesplash
|
|
|
|
|
|
diff --git a/libs/filesystem/src/operations.cpp b/libs/filesystem/src/operations.cpp
|
|
index 53dcdb7..f424785 100644
|
|
--- a/libs/filesystem/src/operations.cpp
|
|
+++ b/libs/filesystem/src/operations.cpp
|
|
@@ -2112,8 +2112,13 @@ namespace
|
|
error_code ec = path_max(path_size);
|
|
if (ec)return ec;
|
|
dirent de;
|
|
- buffer = std::malloc((sizeof(dirent) - sizeof(de.d_name))
|
|
- + path_size + 1); // + 1 for "/0"
|
|
+ #ifdef __HAIKU__
|
|
+ buffer = std::malloc(sizeof(dirent)
|
|
+ + path_size + 1);
|
|
+ #else
|
|
+ buffer = std::malloc((sizeof(dirent) - sizeof(de.d_name))
|
|
+ + path_size + 1); // + 1 for "/0"
|
|
+ #endif
|
|
return ok;
|
|
}
|
|
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 499e9f8a1b17b694a23bd08d6fb8591cc693bf0b Mon Sep 17 00:00:00 2001
|
|
From: PulkoMandy <pulkomandy@pulkomandy.tk>
|
|
Date: Fri, 13 Jan 2023 22:10:19 +0100
|
|
Subject: Temporarily disable use of cfsetspeed in Haiku
|
|
|
|
It is not available for now.
|
|
|
|
diff --git a/boost/asio/impl/serial_port_base.ipp b/boost/asio/impl/serial_port_base.ipp
|
|
index 9954f77..a558e8e 100644
|
|
--- a/boost/asio/impl/serial_port_base.ipp
|
|
+++ b/boost/asio/impl/serial_port_base.ipp
|
|
@@ -114,7 +114,8 @@ BOOST_ASIO_SYNC_OP_VOID serial_port_base::baud_rate::store(
|
|
ec = boost::asio::error::invalid_argument;
|
|
BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
|
|
}
|
|
-# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
|
|
+# if (defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)) && !defined(__HAIKU__)
|
|
+ // TODO enable this when Haiku implements cfsetpseed (#18220)
|
|
::cfsetspeed(&storage, baud);
|
|
# else
|
|
::cfsetispeed(&storage, baud);
|
|
--
|
|
2.37.3
|
|
|