boost: fix attempted usage of cfsetspeed for serial ports

This commit is contained in:
PulkoMandy
2023-01-13 22:58:12 +01:00
parent 7125b386db
commit 37eb37188a
4 changed files with 60 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ expressions, and unit testing. It contains over eighty individual libraries."
HOMEPAGE="https://www.boost.org/"
SOURCE_URI="https://boostorg.jfrog.io/artifactory/main/release/$portVersion/source/boost_${portVersion//./_}.tar.bz2"
CHECKSUM_SHA256="8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406"
REVISION="4"
REVISION="5"
LICENSE="Boost v1.0"
COPYRIGHT="1998-2018 Beman Dawes, David Abrahams, Rene Rivera, et al."
SOURCE_DIR="boost_${portVersion//./_}"

View File

@@ -6,7 +6,7 @@ expressions, and unit testing. It contains over eighty individual libraries."
HOMEPAGE="https://www.boost.org/"
SOURCE_URI="https://boostorg.jfrog.io/artifactory/main/release/$portVersion/source/boost_${portVersion//./_}.tar.bz2"
CHECKSUM_SHA256="430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778"
REVISION="5"
REVISION="6"
LICENSE="Boost v1.0"
COPYRIGHT="1998-2018 Beman Dawes, David Abrahams, Rene Rivera, et al."
SOURCE_DIR="boost_${portVersion//./_}"

View File

@@ -1,4 +1,4 @@
From e10b6bb16e7d25d492f09fbb43f57de85b7a20f4 Mon Sep 17 00:00:00 2001
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
@@ -110,7 +110,7 @@ index 1a80c3f..031c014 100644
2.37.3
From d8ffb6aee3869581eb61ddaeeb7543991f4e4d26 Mon Sep 17 00:00:00 2001
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
@@ -133,7 +133,7 @@ index 172a601..c706e40 100644
2.37.3
From c0316c623e8b59c0ba2287d37c296d987e2868c5 Mon Sep 17 00:00:00 2001
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.
@@ -177,7 +177,7 @@ index 7e46e38..67293a0 100755
2.37.3
From 627d738436ec87c91b106837284ce378fbe8a46b Mon Sep 17 00:00:00 2001
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
@@ -206,3 +206,28 @@ index 53dcdb7..f424785 100644
--
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

View File

@@ -1,4 +1,4 @@
From a572ebfbe6b8283ae653d99eb49fe3f993a819d9 Mon Sep 17 00:00:00 2001
From f44a417e60b61bca55986c0eb146b466f5570606 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
@@ -110,7 +110,7 @@ index 1a80c3f..031c014 100644
2.37.3
From 00e2d48c70237dbf34152c3995c2624c8fd5af05 Mon Sep 17 00:00:00 2001
From 172a909099b905fee46a60ef9a00ab9996ec6c0f 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
@@ -133,7 +133,7 @@ index 172a601..c706e40 100644
2.37.3
From 0b4f7512e42c258995746e226dbe32dd42a6d78e Mon Sep 17 00:00:00 2001
From d4d11ecff10e4c9381fc8d42dc2af0eceef87bde 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.
@@ -177,7 +177,7 @@ index 005e4d9..ac4f43f 100755
2.37.3
From c55a0516b3078f74f0d84dc1dddf584c3383f531 Mon Sep 17 00:00:00 2001
From 7a66a0e6901e0fb5b1b10c0fba6c28a6b5643e2f Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Wed, 3 Feb 2021 08:36:01 -0600
Subject: boost/beast: Fix macro seeing , as args on gcc8
@@ -203,7 +203,7 @@ index e4a484b..139dfb2 100644
2.37.3
From 7f61231378557712f15f1c79a96624c1976ea65f Mon Sep 17 00:00:00 2001
From 787d04874f14762b62b17b307779acd703e2745f Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 18 Dec 2022 16:46:28 +0100
Subject: Fix build, tip provided by Jessicah and waddlesplash
@@ -237,3 +237,27 @@ index 91fe4d5..8b27cc6 100644
--
2.37.3
From 6e1b2ce2272d11cca5f7b279dec5cbd46b32f6b8 Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Fri, 13 Jan 2023 21:26:43 +0100
Subject: Haiku currently doesn't have cfsetspeed
diff --git a/boost/asio/impl/serial_port_base.ipp b/boost/asio/impl/serial_port_base.ipp
index c7ff518..5174970 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 re-enable this for Haiku once cfsetspeed is implemented (#18220)
::cfsetspeed(&storage, baud);
# else
::cfsetispeed(&storage, baud);
--
2.37.3