From 502dbe8d231c90f7f6bc481f17293c676a8d6dcb Mon Sep 17 00:00:00 2001 From: TheZeldakatze <60302169+TheZeldakatze@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:49:19 +0200 Subject: [PATCH] poco: new recipe (#7982) poco: new recipe --- dev-libs/poco/licenses/Boost v1.0 | 32 + dev-libs/poco/patches/poco-1.12.4.patchset | 1324 ++++++++++++++++++++ dev-libs/poco/poco-1.12.4.recipe | 149 +++ 3 files changed, 1505 insertions(+) create mode 100644 dev-libs/poco/licenses/Boost v1.0 create mode 100644 dev-libs/poco/patches/poco-1.12.4.patchset create mode 100644 dev-libs/poco/poco-1.12.4.recipe diff --git a/dev-libs/poco/licenses/Boost v1.0 b/dev-libs/poco/licenses/Boost v1.0 new file mode 100644 index 000000000..2f2f957ce --- /dev/null +++ b/dev-libs/poco/licenses/Boost v1.0 @@ -0,0 +1,32 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +--------------------------------------------------------------------------- +Note: +Individual files contain the following tag instead of the full license text. + + SPDX-License-Identifier: BSL-1.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/dev-libs/poco/patches/poco-1.12.4.patchset b/dev-libs/poco/patches/poco-1.12.4.patchset new file mode 100644 index 000000000..9d31223f0 --- /dev/null +++ b/dev-libs/poco/patches/poco-1.12.4.patchset @@ -0,0 +1,1324 @@ +From 56e2e849bae47cd3b9b0ab53a0752fb40a1f683d Mon Sep 17 00:00:00 2001 +From: Maite Gamper +Date: Thu, 22 Dec 2022 13:36:46 +0100 +Subject: poco: add a plattform identifier + + +diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h +index 192d6c7..ac21e57 100644 +--- a/Foundation/include/Poco/Platform.h ++++ b/Foundation/include/Poco/Platform.h +@@ -43,6 +43,7 @@ + #define POCO_OS_WINDOWS_NT 0x1001 + #define POCO_OS_WINDOWS_CE 0x1011 + #define POCO_OS_VMS 0x2001 ++#define POCO_OS_HAIKU 0x0001 + + + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +@@ -107,6 +108,9 @@ + #elif defined(__VMS) + #define POCO_OS_FAMILY_VMS 1 + #define POCO_OS POCO_OS_VMS ++#elif defined(__HAIKU__) ++ #define POCO_OS_FAMILY_BE 1 ++ #define POCO_OS POCO_OS_HAIKU + #endif + + +-- +2.37.3 + + +From 6fa110e9759d2742668a5d9c3f5d405f3060d108 Mon Sep 17 00:00:00 2001 +From: Maite Gamper +Date: Thu, 22 Dec 2022 13:47:56 +0100 +Subject: poco: implemented debugger for haiku + + +diff --git a/Foundation/src/Debugger.cpp b/Foundation/src/Debugger.cpp +index f50a7f7..17ddbe1 100644 +--- a/Foundation/src/Debugger.cpp ++++ b/Foundation/src/Debugger.cpp +@@ -21,6 +21,8 @@ + #elif defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) + #include + #include ++#elif defined(POCO_OS_FAMILY_BE) ++ #include + #endif + #include "Poco/UnicodeConverter.h" + +@@ -55,6 +57,8 @@ bool Debugger::isAvailable() + return false; + #elif defined(POCO_OS_FAMILY_UNIX) + return std::getenv("POCO_ENABLE_DEBUGGER") ? true : false; ++ #elif defined(POCO_OS_FAMILY_BE) ++ return true; + #endif + #else + return false; +@@ -103,6 +107,10 @@ void Debugger::enter() + { + // not supported + } ++ #elif defined(POCO_OS_FAMILY_BE) ++ if(isAvailable()) { ++ debugger(""); ++ } + #elif defined(POCO_OS_FAMILY_UNIX) + if (isAvailable()) + { +-- +2.37.3 + + +From 71376c7ba420e6dd17cac4b53a8b0283d86f7a54 Mon Sep 17 00:00:00 2001 +From: Maite Gamper +Date: Sat, 18 Mar 2023 09:42:24 +0100 +Subject: libpoco: initial porting to Haiku + +Basically, for now we use Haiku's POSIX compatibility layer. +It would be nice to use Haiku's native API +Thread names are not implemented at all currenty. + +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index f504bc1..3207021 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -168,6 +168,9 @@ else() + elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "AIX") + target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_POLL) + target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt) ++ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Haiku") ++ target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_POLL) ++ target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} network) + else() + target_compile_definitions(Foundation PUBLIC _XOPEN_SOURCE=500 POCO_HAVE_FD_EPOLL) + target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt) +diff --git a/Foundation/include/Poco/FPEnvironment.h b/Foundation/include/Poco/FPEnvironment.h +index 4602f57..e18be55 100644 +--- a/Foundation/include/Poco/FPEnvironment.h ++++ b/Foundation/include/Poco/FPEnvironment.h +@@ -31,6 +31,8 @@ + #include "Poco/FPEnvironment_QNX.h" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "Poco/FPEnvironment_C99.h" ++#elif defined(POCO_OS_FAMILY_BE) ++#include "Poco/FPEnvironment_C99.h" + #elif defined(POCO_OS_FAMILY_WINDOWS) + #include "Poco/FPEnvironment_WIN32.h" + #else +diff --git a/Foundation/include/Poco/File.h b/Foundation/include/Poco/File.h +index 2ba1e96..402e32f 100644 +--- a/Foundation/include/Poco/File.h ++++ b/Foundation/include/Poco/File.h +@@ -31,6 +31,9 @@ + #endif + #elif defined(POCO_VXWORKS) + #include "Poco/File_VX.h" ++#elif defined(POCO_OS_FAMILY_BE) ++// TODO use the api ++#include "Poco/File_UNIX.h" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "Poco/File_UNIX.h" + #endif +diff --git a/Foundation/include/Poco/Foundation.h b/Foundation/include/Poco/Foundation.h +index 74a3bf9..d143221 100644 +--- a/Foundation/include/Poco/Foundation.h ++++ b/Foundation/include/Poco/Foundation.h +@@ -100,6 +100,9 @@ + #include "Poco/Platform_WIN32.h" + #elif defined(POCO_VXWORKS) + #include "Poco/Platform_VX.h" ++#elif defined(POCO_OS_FAMILY_BE) ++ //TODO use native api ++ #include "Poco/Platform_POSIX.h" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "Poco/Platform_POSIX.h" + #endif +diff --git a/Foundation/include/Poco/NamedEvent.h b/Foundation/include/Poco/NamedEvent.h +index 93c4b27..ab97e23 100644 +--- a/Foundation/include/Poco/NamedEvent.h ++++ b/Foundation/include/Poco/NamedEvent.h +@@ -25,6 +25,9 @@ + #include "Poco/NamedEvent_WIN32U.h" + #elif POCO_OS == POCO_OS_ANDROID + #include "Poco/NamedEvent_Android.h" ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "Poco/NamedEvent_UNIX.h" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "Poco/NamedEvent_UNIX.h" + #endif +diff --git a/Foundation/include/Poco/NamedEvent_UNIX.h b/Foundation/include/Poco/NamedEvent_UNIX.h +index 22cb31d..5823d02 100644 +--- a/Foundation/include/Poco/NamedEvent_UNIX.h ++++ b/Foundation/include/Poco/NamedEvent_UNIX.h +@@ -19,7 +19,7 @@ + + + #include "Poco/Foundation.h" +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + #include + #endif + +@@ -39,7 +39,7 @@ private: + std::string getFileName(); + + std::string _name; +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + sem_t* _sem; + #else + int _semid; // semaphore id +diff --git a/Foundation/include/Poco/NamedMutex.h b/Foundation/include/Poco/NamedMutex.h +index 197fe38..a6e5048 100644 +--- a/Foundation/include/Poco/NamedMutex.h ++++ b/Foundation/include/Poco/NamedMutex.h +@@ -26,6 +26,9 @@ + #include "Poco/NamedMutex_WIN32U.h" + #elif POCO_OS == POCO_OS_ANDROID + #include "Poco/NamedMutex_Android.h" ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "Poco/NamedMutex_UNIX.h" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "Poco/NamedMutex_UNIX.h" + #endif +diff --git a/Foundation/include/Poco/NamedMutex_UNIX.h b/Foundation/include/Poco/NamedMutex_UNIX.h +index 151aa1e..e1f61d1 100644 +--- a/Foundation/include/Poco/NamedMutex_UNIX.h ++++ b/Foundation/include/Poco/NamedMutex_UNIX.h +@@ -21,7 +21,7 @@ + #include "Poco/Foundation.h" + #include + #include +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + #include + #endif + +@@ -42,7 +42,7 @@ private: + std::string getFileName(); + + std::string _name; +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + sem_t* _sem; + #else + int _semid; // semaphore id +diff --git a/Foundation/include/Poco/PipeImpl.h b/Foundation/include/Poco/PipeImpl.h +index b0b7183..ea9a96e 100644 +--- a/Foundation/include/Poco/PipeImpl.h ++++ b/Foundation/include/Poco/PipeImpl.h +@@ -27,6 +27,9 @@ + #else + #include "Poco/PipeImpl_WIN32.h" + #endif ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "Poco/PipeImpl_POSIX.h" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "Poco/PipeImpl_POSIX.h" + #else +diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h +index ac21e57..c9c62f4 100644 +--- a/Foundation/include/Poco/Platform.h ++++ b/Foundation/include/Poco/Platform.h +@@ -43,7 +43,7 @@ + #define POCO_OS_WINDOWS_NT 0x1001 + #define POCO_OS_WINDOWS_CE 0x1011 + #define POCO_OS_VMS 0x2001 +-#define POCO_OS_HAIKU 0x0001 ++#define POCO_OS_HAIKU 0x3001 + + + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +diff --git a/Foundation/include/Poco/Process.h b/Foundation/include/Poco/Process.h +index f84b68e..7543dba 100644 +--- a/Foundation/include/Poco/Process.h ++++ b/Foundation/include/Poco/Process.h +@@ -29,6 +29,9 @@ + #endif + #elif defined(POCO_VXWORKS) + #include "Poco/Process_VX.h" ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "Poco/Process_UNIX.h" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "Poco/Process_UNIX.h" + #endif +diff --git a/Foundation/include/Poco/Types.h b/Foundation/include/Poco/Types.h +index 6489a6f..14d61cc 100644 +--- a/Foundation/include/Poco/Types.h ++++ b/Foundation/include/Poco/Types.h +@@ -21,10 +21,7 @@ + #include "Poco/Foundation.h" + #include + +- + namespace Poco { +- +- + using Int8 = std::int8_t; + using UInt8 = std::uint8_t; + using Int16 = std::int16_t; +@@ -36,7 +33,6 @@ using UInt64 = std::uint64_t; + using IntPtr = std::intptr_t; + using UIntPtr = std::uintptr_t; + +- + #if defined(_MSC_VER) + #if defined(_WIN64) + #define POCO_PTR_IS_64_BIT 1 +@@ -49,7 +45,7 @@ using UIntPtr = std::uintptr_t; + #if defined(__LP64__) + #define POCO_PTR_IS_64_BIT 1 + #define POCO_LONG_IS_64_BIT 1 +- #if POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_FREE_BSD || POCO_OS == POCO_OS_ANDROID ++ #if POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_FREE_BSD || POCO_OS == POCO_OS_ANDROID || defined(POCO_OS_FAMILY_BE) + #define POCO_INT64_IS_LONG 1 + #endif + #endif +diff --git a/Foundation/src/DirectoryIterator.cpp b/Foundation/src/DirectoryIterator.cpp +index 432c593..9ed6d2e 100644 +--- a/Foundation/src/DirectoryIterator.cpp ++++ b/Foundation/src/DirectoryIterator.cpp +@@ -19,6 +19,9 @@ + #include "DirectoryIterator_WIN32U.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "DirectoryIterator_UNIX.cpp" ++#elif defined(POCO_OS_FAMILY_BE) ++// TODO maybe use the be api ++#include "DirectoryIterator_UNIX.cpp" + #endif + + +diff --git a/Foundation/src/DirectoryIterator_UNIX.cpp b/Foundation/src/DirectoryIterator_UNIX.cpp +index 16be505..9d9485f 100644 +--- a/Foundation/src/DirectoryIterator_UNIX.cpp ++++ b/Foundation/src/DirectoryIterator_UNIX.cpp +@@ -15,6 +15,9 @@ + #include "Poco/DirectoryIterator_UNIX.h" + #if defined(POCO_VXWORKS) + #include "Poco/File_VX.h" ++#elif defined(POCO_OS_FAMILY_BE) ++// TODO maybe use the be api ++#include "Poco/File_UNIX.h" + #else + #include "Poco/File_UNIX.h" + #endif +diff --git a/Foundation/src/Environment.cpp b/Foundation/src/Environment.cpp +index 58a8ef3..c1ff0cb 100644 +--- a/Foundation/src/Environment.cpp ++++ b/Foundation/src/Environment.cpp +@@ -27,6 +27,9 @@ + #include "Environment_VX.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "Environment_UNIX.cpp" ++#elif defined(POCO_OS_FAMILY_BE) ++// TODO maybe use the be api ++#include "Environment_UNIX.h" + #elif defined(POCO_OS_FAMILY_WINDOWS) + #if defined(_WIN32_WCE) + #include "Environment_WINCE.cpp" +diff --git a/Foundation/src/Environment_UNIX.cpp b/Foundation/src/Environment_UNIX.cpp +index b7e57e4..4ab09bf 100644 +--- a/Foundation/src/Environment_UNIX.cpp ++++ b/Foundation/src/Environment_UNIX.cpp +@@ -136,7 +136,7 @@ unsigned EnvironmentImpl::processorCountImpl() + // + // nodeIdImpl + // +-#if defined(POCO_OS_FAMILY_BSD) || POCO_OS == POCO_OS_QNX ++#if defined(POCO_OS_FAMILY_BSD) || POCO_OS == POCO_OS_QNX || defined(POCO_OS_FAMILY_BE) + // + // BSD variants + // +@@ -161,7 +161,11 @@ void EnvironmentImpl::nodeIdImpl(NodeId& id) + if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_LINK) + { + struct sockaddr_dl* sdl = reinterpret_cast(ifap->ifa_addr); ++ #ifdef POCO_OS_HAIKU ++ caddr_t ap = (caddr_t) LLADDR(sdl); ++ #else + caddr_t ap = LLADDR(sdl); ++ #endif + int alen = sdl->sdl_alen; + if (ap && alen > 0) + { +diff --git a/Foundation/src/FPEnvironment.cpp b/Foundation/src/FPEnvironment.cpp +index 3b853dd..18011f6 100644 +--- a/Foundation/src/FPEnvironment.cpp ++++ b/Foundation/src/FPEnvironment.cpp +@@ -32,6 +32,9 @@ + #include "FPEnvironment_QNX.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "FPEnvironment_C99.cpp" ++#elif defined(POCO_OS_FAMILY_BE) ++// TODO maybe use the be api ++#include "FPEnvironment_C99.cpp" + #elif defined(POCO_OS_FAMILY_WINDOWS) + #include "FPEnvironment_WIN32.cpp" + #else +diff --git a/Foundation/src/File.cpp b/Foundation/src/File.cpp +index 7f96d5d..f4e9cdc 100644 +--- a/Foundation/src/File.cpp ++++ b/Foundation/src/File.cpp +@@ -27,6 +27,9 @@ + #include "File_VX.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "File_UNIX.cpp" ++#elif defined(POCO_OS_FAMILY_BE) ++// TODO maybe use the be api ++#include "File_UNIX.cpp" + #endif + #include "Poco/Thread.h" + +diff --git a/Foundation/src/File_UNIX.cpp b/Foundation/src/File_UNIX.cpp +index 090567b..90a34f1 100644 +--- a/Foundation/src/File_UNIX.cpp ++++ b/Foundation/src/File_UNIX.cpp +@@ -23,7 +23,7 @@ + #if defined(POCO_OS_FAMILY_BSD) + #include + #include +-#elif (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_QNX) ++#elif (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_HAIKU) + #include + #else + #include +@@ -35,7 +35,7 @@ + #include + #include + +-#if (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_QNX) ++#if (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_HAIKU) + #define STATFSFN statvfs + #define STATFSSTRUCT statvfs + #else +diff --git a/Foundation/src/Mutex.cpp b/Foundation/src/Mutex.cpp +index 843562a..92b61e2 100644 +--- a/Foundation/src/Mutex.cpp ++++ b/Foundation/src/Mutex.cpp +@@ -24,6 +24,7 @@ + #elif defined(POCO_VXWORKS) + #include "Mutex_VX.cpp" + #else ++// TODO Be: use the native api? + #include "Mutex_POSIX.cpp" + #endif + +diff --git a/Foundation/src/NamedEvent.cpp b/Foundation/src/NamedEvent.cpp +index 0cdeddb..494e78e 100644 +--- a/Foundation/src/NamedEvent.cpp ++++ b/Foundation/src/NamedEvent.cpp +@@ -19,6 +19,9 @@ + #include "NamedEvent_WIN32U.cpp" + #elif POCO_OS == POCO_OS_ANDROID + #include "NamedEvent_Android.cpp" ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "NamedEvent_UNIX.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "NamedEvent_UNIX.cpp" + #endif +diff --git a/Foundation/src/NamedEvent_UNIX.cpp b/Foundation/src/NamedEvent_UNIX.cpp +index b0cc100..14e526b 100644 +--- a/Foundation/src/NamedEvent_UNIX.cpp ++++ b/Foundation/src/NamedEvent_UNIX.cpp +@@ -18,7 +18,7 @@ + #include + #include + #include +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)|| (POCO_OS == POCO_OS_HAIKU) + #include + #else + #include +@@ -53,7 +53,7 @@ NamedEventImpl::NamedEventImpl(const std::string& name): + _name(name) + { + std::string fileName = getFileName(); +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)|| (POCO_OS == POCO_OS_HAIKU) + _sem = sem_open(fileName.c_str(), O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 0); + if ((long) _sem == (long) SEM_FAILED) + throw SystemException(Poco::format("cannot create named mutex %s (sem_open() failed, errno=%d)", fileName, errno), _name); +@@ -86,7 +86,7 @@ NamedEventImpl::NamedEventImpl(const std::string& name): + + NamedEventImpl::~NamedEventImpl() + { +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + sem_close(_sem); + #endif + } +@@ -94,7 +94,7 @@ NamedEventImpl::~NamedEventImpl() + + void NamedEventImpl::setImpl() + { +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + if (sem_post(_sem) != 0) + throw SystemException("cannot set named event", _name); + #else +@@ -110,7 +110,7 @@ void NamedEventImpl::setImpl() + + void NamedEventImpl::waitImpl() + { +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + int err; + do + { +diff --git a/Foundation/src/NamedMutex.cpp b/Foundation/src/NamedMutex.cpp +index 98c2f87..1b0c143 100644 +--- a/Foundation/src/NamedMutex.cpp ++++ b/Foundation/src/NamedMutex.cpp +@@ -19,6 +19,9 @@ + #include "NamedMutex_WIN32U.cpp" + #elif POCO_OS == POCO_OS_ANDROID + #include "NamedMutex_Android.cpp" ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "NamedMutex_UNIX.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "NamedMutex_UNIX.cpp" + #endif +diff --git a/Foundation/src/NamedMutex_UNIX.cpp b/Foundation/src/NamedMutex_UNIX.cpp +index 6466b2b..c6b5663 100644 +--- a/Foundation/src/NamedMutex_UNIX.cpp ++++ b/Foundation/src/NamedMutex_UNIX.cpp +@@ -18,7 +18,7 @@ + #include + #include + #include +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + #include + #else + #include +@@ -53,7 +53,7 @@ NamedMutexImpl::NamedMutexImpl(const std::string& name): + _name(name) + { + std::string fileName = getFileName(); +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + _sem = sem_open(fileName.c_str(), O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 1); + if ((long) _sem == (long) SEM_FAILED) + throw SystemException(Poco::format("cannot create named mutex %s (sem_open() failed, errno=%d)", fileName, errno), _name); +@@ -91,7 +91,7 @@ NamedMutexImpl::NamedMutexImpl(const std::string& name): + + NamedMutexImpl::~NamedMutexImpl() + { +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + sem_close(_sem); + #else + if (_owned) semctl(_semid, 0, IPC_RMID, 0); +@@ -101,7 +101,7 @@ NamedMutexImpl::~NamedMutexImpl() + + void NamedMutexImpl::lockImpl() + { +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + int err; + do + { +@@ -127,7 +127,7 @@ void NamedMutexImpl::lockImpl() + + bool NamedMutexImpl::tryLockImpl() + { +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + return sem_trywait(_sem) == 0; + #else + struct sembuf op; +@@ -141,7 +141,7 @@ bool NamedMutexImpl::tryLockImpl() + + void NamedMutexImpl::unlockImpl() + { +-#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) ++#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX) || (POCO_OS == POCO_OS_HAIKU) + if (sem_post(_sem) != 0) + throw SystemException("cannot unlock named mutex", _name); + #else +diff --git a/Foundation/src/Path.cpp b/Foundation/src/Path.cpp +index 7b85a65..05ffc7a 100644 +--- a/Foundation/src/Path.cpp ++++ b/Foundation/src/Path.cpp +@@ -22,8 +22,10 @@ + #endif + #include + +- +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "Path_UNIX.cpp" ++#elif defined(POCO_OS_FAMILY_UNIX) + #include "Path_UNIX.cpp" + #elif defined(POCO_OS_FAMILY_WINDOWS) + #if defined(_WIN32_WCE) +diff --git a/Foundation/src/PipeImpl.cpp b/Foundation/src/PipeImpl.cpp +index 0f43b45..0c8eb5d 100644 +--- a/Foundation/src/PipeImpl.cpp ++++ b/Foundation/src/PipeImpl.cpp +@@ -21,6 +21,9 @@ + #else + #include "PipeImpl_WIN32.cpp" + #endif ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "PipeImpl_POSIX.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "PipeImpl_POSIX.cpp" + #else +diff --git a/Foundation/src/SharedLibrary.cpp b/Foundation/src/SharedLibrary.cpp +index a2bdce5..282e064 100644 +--- a/Foundation/src/SharedLibrary.cpp ++++ b/Foundation/src/SharedLibrary.cpp +@@ -20,6 +20,9 @@ + #include "SharedLibrary_HPUX.cpp" + #elif defined(POCO_VXWORKS) + #include "SharedLibrary_VX.cpp" ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "SharedLibrary_UNIX.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "SharedLibrary_UNIX.cpp" + #elif defined(POCO_OS_FAMILY_WINDOWS) +diff --git a/Foundation/src/SharedMemory.cpp b/Foundation/src/SharedMemory.cpp +index da43a42..47e5be4 100644 +--- a/Foundation/src/SharedMemory.cpp ++++ b/Foundation/src/SharedMemory.cpp +@@ -18,6 +18,9 @@ + #include "SharedMemory_DUMMY.cpp" + #elif defined(POCO_OS_FAMILY_WINDOWS) + #include "SharedMemory_WIN32.cpp" ++#elif defined(POCO_OS_FAMILY_BE) ++//TODO use native api ++#include "SharedMemory_POSIX.cpp" + #elif defined(POCO_OS_FAMILY_UNIX) + #include "SharedMemory_POSIX.cpp" + #else +diff --git a/Foundation/src/Thread_POSIX.cpp b/Foundation/src/Thread_POSIX.cpp +index ceab76e..2630d35 100644 +--- a/Foundation/src/Thread_POSIX.cpp ++++ b/Foundation/src/Thread_POSIX.cpp +@@ -65,7 +65,9 @@ namespace + namespace { + void setThreadName(pthread_t thread, const std::string& threadName) + { +-#if (POCO_OS == POCO_OS_MAC_OS_X) ++#if POCO_OS == POCO_OS_HAIKU ++ return; // TODO allow thead names to be set ++#elif (POCO_OS == POCO_OS_MAC_OS_X) + pthread_setname_np(threadName.c_str()); // __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2) + #else + if (pthread_setname_np(thread, threadName.c_str()) == ERANGE && threadName.size() > 15) +@@ -277,7 +279,7 @@ long ThreadImpl::currentOsTidImpl() + #elif POCO_OS == POCO_OS_MAC_OS_X + return ::pthread_mach_thread_np(::pthread_self()); + #else +- return ::pthread_self(); ++ return (long) ::pthread_self(); + #endif + } + +@@ -289,7 +291,7 @@ void ThreadImpl::sleepImpl(long milliseconds) + interval.tv_sec = milliseconds / 1000; + interval.tv_nsec = (milliseconds % 1000)*1000000; + pthread_delay_np(&interval); +-#elif POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID || POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_QNX || POCO_OS == POCO_OS_VXWORKS ++#elif POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID || POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_QNX || POCO_OS == POCO_OS_VXWORKS || POCO_OS == POCO_OS_HAIKU + Poco::Timespan remainingTime(1000*Poco::Timespan::TimeDiff(milliseconds)); + int rc; + do +diff --git a/Foundation/src/Timestamp.cpp b/Foundation/src/Timestamp.cpp +index da05a56..26557fa 100644 +--- a/Foundation/src/Timestamp.cpp ++++ b/Foundation/src/Timestamp.cpp +@@ -19,7 +19,7 @@ + #undef min + #undef max + #include +-#if defined(POCO_OS_FAMILY_UNIX) ++#if (defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_FAMILY_BE)) + #include + #include + #if defined(POCO_VXWORKS) +diff --git a/Util/src/Application.cpp b/Util/src/Application.cpp +index fe61ddd..82ebed7 100644 +--- a/Util/src/Application.cpp ++++ b/Util/src/Application.cpp +@@ -334,7 +334,7 @@ Application::WindowSize Application::windowSize() + size.width = csbi.srWindow.Right - csbi.srWindow.Left + 1; + size.height = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; + } +-#elif defined(POCO_OS_FAMILY_UNIX) ++#elif defined(POCO_OS_FAMILY_UNIX) && (!defined(POCO_OS_FAMILY_BE)) + struct winsize winsz; + if (ioctl(0, TIOCGWINSZ , &winsz) != -1) + { +-- +2.37.3 + + +From d2bd3826ac4fa92ce1d3784b8ef9306408259e7f Mon Sep 17 00:00:00 2001 +From: Maite Gamper +Date: Sat, 25 Mar 2023 07:03:07 +0100 +Subject: poco: try to use GNUInstallDirs + + +diff --git a/ActiveRecord/Compiler/CMakeLists.txt b/ActiveRecord/Compiler/CMakeLists.txt +index 40a8b23..667392f 100644 +--- a/ActiveRecord/Compiler/CMakeLists.txt ++++ b/ActiveRecord/Compiler/CMakeLists.txt +@@ -20,7 +20,7 @@ install( + TARGETS ActiveRecordCompiler EXPORT "ActiveRecordCompiler" + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + BUNDLE DESTINATION bin + INCLUDES DESTINATION include + ) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c552091..208b754 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -482,12 +482,13 @@ else() + endif() + + configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" @ONLY) ++include(GNUInstallDirs) + install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake + DESTINATION +- "${PocoConfigPackageLocation}" ++ "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" + COMPONENT + Devel + ) +diff --git a/Encodings/Compiler/CMakeLists.txt b/Encodings/Compiler/CMakeLists.txt +index fa4e85b..d4ff144 100644 +--- a/Encodings/Compiler/CMakeLists.txt ++++ b/Encodings/Compiler/CMakeLists.txt +@@ -14,7 +14,7 @@ install( + TARGETS EncodingsCompiler EXPORT "EncodingsCompilerTargets" + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + BUNDLE DESTINATION bin + INCLUDES DESTINATION include + ) +diff --git a/PageCompiler/CMakeLists.txt b/PageCompiler/CMakeLists.txt +index 48379eb..423fe99 100644 +--- a/PageCompiler/CMakeLists.txt ++++ b/PageCompiler/CMakeLists.txt +@@ -22,7 +22,7 @@ install( + TARGETS PageCompiler EXPORT PageCompilerTargets + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + BUNDLE DESTINATION bin + INCLUDES DESTINATION include + ) +diff --git a/PageCompiler/File2Page/CMakeLists.txt b/PageCompiler/File2Page/CMakeLists.txt +index 6b69257..b56fe43 100644 +--- a/PageCompiler/File2Page/CMakeLists.txt ++++ b/PageCompiler/File2Page/CMakeLists.txt +@@ -20,7 +20,7 @@ install( + TARGETS File2Page EXPORT File2PageTargets + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + BUNDLE DESTINATION bin + INCLUDES DESTINATION include + ) +diff --git a/PocoDoc/CMakeLists.txt b/PocoDoc/CMakeLists.txt +index 49ad7b4..f87d040 100644 +--- a/PocoDoc/CMakeLists.txt ++++ b/PocoDoc/CMakeLists.txt +@@ -10,7 +10,7 @@ install( + TARGETS PocoDoc EXPORT PocoDocTargets + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + BUNDLE DESTINATION bin + INCLUDES DESTINATION include + ) +diff --git a/cmake/PocoMacros.cmake b/cmake/PocoMacros.cmake +index 0ef354e..71a2078 100644 +--- a/cmake/PocoMacros.cmake ++++ b/cmake/PocoMacros.cmake +@@ -236,18 +236,19 @@ else() + set(PocoConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") + endif() + ++include(GNUInstallDirs) + install( + EXPORT "${target_name}Targets" + FILE "${PROJECT_NAME}${target_name}Targets.cmake" + NAMESPACE "${PROJECT_NAME}::" +- DESTINATION "${PocoConfigPackageLocation}" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" + ) + + install( + FILES + "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}Config.cmake" + "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}${target_name}ConfigVersion.cmake" +- DESTINATION "${PocoConfigPackageLocation}" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" + COMPONENT Devel + ) + +@@ -264,18 +265,18 @@ endmacro() + macro(POCO_INSTALL target_name) + install( + DIRECTORY include/Poco +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT Devel + PATTERN ".svn" EXCLUDE + ) + ++include(GNUInstallDirs) + install( + TARGETS "${target_name}" EXPORT "${target_name}Targets" +- LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX} +- RUNTIME DESTINATION bin +- BUNDLE DESTINATION bin +- INCLUDES DESTINATION include ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + + if(MSVC) +@@ -297,7 +298,7 @@ macro(POCO_INSTALL_PDB target_name) + if("${type}" STREQUAL "SHARED_LIBRARY" OR "${type}" STREQUAL "EXECUTABLE") + install( + FILES $ +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT Devel + OPTIONAL + ) +-- +2.37.3 + + +From 94afd3b0a7c51253177bbba826773dfeb29d4c75 Mon Sep 17 00:00:00 2001 +From: Maite Gamper +Date: Wed, 19 Apr 2023 22:01:07 +0200 +Subject: poco: hopefully make networking work somewhat + + +diff --git a/Net/CMakeLists.txt b/Net/CMakeLists.txt +index 237df1c..753c976 100644 +--- a/Net/CMakeLists.txt ++++ b/Net/CMakeLists.txt +@@ -36,6 +36,10 @@ if(WIN32) + endif() + endif(WIN32) + ++if("${CMAKE_SYSTEM_NAME}" STREQUAL "Haiku") ++ target_link_libraries(Net PUBLIC network) ++endif(WIN32) ++ + target_include_directories(Net + PUBLIC + $ +diff --git a/Net/include/Poco/Net/Net.h b/Net/include/Poco/Net/Net.h +index 58e052a..9c9d77c 100644 +--- a/Net/include/Poco/Net/Net.h ++++ b/Net/include/Poco/Net/Net.h +@@ -127,7 +127,7 @@ POCO_NET_FORCE_SYMBOL(pocoNetworkInitializer) + // + // Define POCO_NET_HAS_INTERFACE for platforms that have network interface detection implemented. + // +-#if defined(POCO_OS_FAMILY_WINDOWS) || (POCO_OS == POCO_OS_LINUX) || (POCO_OS == POCO_OS_ANDROID) || defined(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_QNX) ++#if defined(POCO_OS_FAMILY_WINDOWS) || (POCO_OS == POCO_OS_LINUX) || (POCO_OS == POCO_OS_ANDROID) || defined(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_HAIKU) + #define POCO_NET_HAS_INTERFACE + #endif + +diff --git a/Net/include/Poco/Net/SocketAddress.h b/Net/include/Poco/Net/SocketAddress.h +index c6d3069..db217af 100644 +--- a/Net/include/Poco/Net/SocketAddress.h ++++ b/Net/include/Poco/Net/SocketAddress.h +@@ -49,7 +49,7 @@ public: + #if defined(POCO_HAVE_IPv6) + static const Family IPv6 = AddressFamily::IPv6; + #endif +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + static const Family UNIX_LOCAL = AddressFamily::UNIX_LOCAL; + #endif + +@@ -181,7 +181,7 @@ public: + enum + { + MAX_ADDRESS_LENGTH = +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + sizeof(struct sockaddr_un) + #elif defined(POCO_HAVE_IPv6) + sizeof(struct sockaddr_in6) +@@ -214,7 +214,7 @@ private: + void newIPv6(const IPAddress& hostAddress, Poco::UInt16 portNumber); + #endif + +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + void newLocal(const sockaddr_un* sockAddr); + void newLocal(const std::string& path); + #endif +@@ -265,7 +265,7 @@ inline void SocketAddress::newIPv6(const IPAddress& hostAddress, Poco::UInt16 po + #endif // POCO_HAVE_IPv6 + + +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + inline void SocketAddress::newLocal(const sockaddr_un* sockAddr) + { + _pImpl = new Poco::Net::Impl::LocalSocketAddressImpl(sockAddr); +@@ -281,7 +281,7 @@ inline void SocketAddress::newLocal(const std::string& path) + + inline bool SocketAddress::operator == (const SocketAddress& socketAddress) const + { +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + if (family() == UNIX_LOCAL) + return toString() == socketAddress.toString(); + else +diff --git a/Net/include/Poco/Net/SocketAddressImpl.h b/Net/include/Poco/Net/SocketAddressImpl.h +index b065ca2..8d33c0a 100644 +--- a/Net/include/Poco/Net/SocketAddressImpl.h ++++ b/Net/include/Poco/Net/SocketAddressImpl.h +@@ -177,7 +177,7 @@ inline SocketAddressImpl::Family IPv6SocketAddressImpl::family() const + #endif // POCO_HAVE_IPv6 + + +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + + + class Net_API LocalSocketAddressImpl: public SocketAddressImpl +diff --git a/Net/include/Poco/Net/SocketDefs.h b/Net/include/Poco/Net/SocketDefs.h +index d024a24..0d9f38b 100644 +--- a/Net/include/Poco/Net/SocketDefs.h ++++ b/Net/include/Poco/Net/SocketDefs.h +@@ -132,7 +132,7 @@ + #define POCO_TRY_AGAIN TRY_AGAIN + #define POCO_NO_RECOVERY NO_RECOVERY + #define POCO_NO_DATA NO_DATA +-#elif defined(POCO_OS_FAMILY_UNIX) ++#elif defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + #include + #include + #include +@@ -148,7 +148,7 @@ + #include + #include + #include +- #if defined(POCO_OS_FAMILY_UNIX) ++ #if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + #if (POCO_OS == POCO_OS_LINUX) || (POCO_OS == POCO_OS_ANDROID) + // Net/src/NetworkInterface.cpp changed #include to #include + // no more conflict, can use #include here +@@ -165,6 +165,8 @@ + #if (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_MAC_OS_X) + #include + #include ++ #elif (POCO_OS == POCO_OS_HAIKU) ++ #include + #endif + #define POCO_INVALID_SOCKET -1 + #define poco_socket_t int +@@ -277,7 +279,7 @@ + #if defined(POCO_HAVE_IPv6) + #define poco_set_sin6_len(pSA) (pSA)->sin6_len = sizeof(struct sockaddr_in6) + #endif +- #if defined(POCO_OS_FAMILY_UNIX) ++ #if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + #define poco_set_sun_len(pSA, len) (pSA)->sun_len = (len) + #endif + #else +@@ -343,7 +345,7 @@ + + + #if !defined(s6_addr32) +- #if defined(POCO_OS_FAMILY_UNIX) ++ #if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + #if (POCO_OS == POCO_OS_SOLARIS) + #define s6_addr32 _S6_un._S6_u32 + #else +@@ -359,7 +361,7 @@ namespace Net { + + #if defined(POCO_OS_FAMILY_WINDOWS) + typedef WSABUF SocketBuf; +-#elif defined(POCO_OS_FAMILY_UNIX) // TODO: may need more refinement ++#elif defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) // TODO: may need more refinement + typedef iovec SocketBuf; + #endif + +@@ -374,7 +376,7 @@ struct AddressFamily + { + UNKNOWN = AF_UNSPEC, + /// Unspecified family +- #if defined(POCO_OS_FAMILY_UNIX) ++ #if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + UNIX_LOCAL = AF_UNIX, + /// UNIX domain socket address family. Available on UNIX/POSIX platforms only. + #endif +diff --git a/Net/include/Poco/Net/SocketImpl.h b/Net/include/Poco/Net/SocketImpl.h +index 5d75e7c..3a2ed24 100644 +--- a/Net/include/Poco/Net/SocketImpl.h ++++ b/Net/include/Poco/Net/SocketImpl.h +@@ -454,7 +454,7 @@ public: + void ioctl(poco_ioctl_request_t request, void* arg); + /// A wrapper for the ioctl system call. + +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + int fcntl(poco_fcntl_request_t request); + /// A wrapper for the fcntl system call. + +diff --git a/Net/src/DatagramSocketImpl.cpp b/Net/src/DatagramSocketImpl.cpp +index 9a4dfc1..bef76be 100644 +--- a/Net/src/DatagramSocketImpl.cpp ++++ b/Net/src/DatagramSocketImpl.cpp +@@ -36,7 +36,7 @@ DatagramSocketImpl::DatagramSocketImpl(SocketAddress::Family family) + else if (family == SocketAddress::IPv6) + init(AF_INET6); + #endif +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + else if (family == SocketAddress::UNIX_LOCAL) + init(AF_UNIX); + #endif +diff --git a/Net/src/IPAddressImpl.cpp b/Net/src/IPAddressImpl.cpp +index b94b7e9..f019247 100644 +--- a/Net/src/IPAddressImpl.cpp ++++ b/Net/src/IPAddressImpl.cpp +@@ -519,7 +519,7 @@ unsigned IPv6AddressImpl::prefixLength() const + { + unsigned bits = 0; + unsigned bitPos = 128; +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + for (int i = 3; i >= 0; --i) + { + unsigned addr = ntohl(_addr.s6_addr32[i]); +diff --git a/Net/src/MulticastSocket.cpp b/Net/src/MulticastSocket.cpp +index f624026..348ad63 100644 +--- a/Net/src/MulticastSocket.cpp ++++ b/Net/src/MulticastSocket.cpp +@@ -53,7 +53,7 @@ MulticastSocket::MulticastSocket() + + MulticastSocket::MulticastSocket(SocketAddress::Family family): DatagramSocket(family) + { +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + if (family == SocketAddress::UNIX_LOCAL) + throw Poco::InvalidArgumentException("Cannot create a MulticastSocket with UNIX_LOCAL socket"); + #endif +diff --git a/Net/src/NetworkInterface.cpp b/Net/src/NetworkInterface.cpp +index 460250d..c8a3ad7 100644 +--- a/Net/src/NetworkInterface.cpp ++++ b/Net/src/NetworkInterface.cpp +@@ -485,12 +485,16 @@ void NetworkInterfaceImpl::setRunning(bool running) + + void NetworkInterfaceImpl::setFlags(short flags) + { +-#ifdef POCO_OS_FAMILY_UNIX ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + _broadcast = ((flags & IFF_BROADCAST) != 0); + _loopback = ((flags & IFF_LOOPBACK) != 0); + _multicast = ((flags & IFF_MULTICAST) != 0); + _pointToPoint = ((flags & IFF_POINTOPOINT) != 0); ++#if !(POCO_OS == POCO_OS_HAIKU) + _running = ((flags & IFF_RUNNING) != 0); ++#else ++ _running = ((flags & IFF_LINK) != 0); ++#endif + _up = ((flags & IFF_UP) != 0); + #endif + } +@@ -1322,7 +1326,7 @@ NetworkInterface::NetworkInterfaceList NetworkInterface::list() + } } // namespace Poco::Net + */ + +-#elif defined(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_SOLARIS) ++#elif defined(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_HAIKU) + // + // BSD variants, QNX(?) and Solaris + // +@@ -1349,14 +1353,18 @@ NetworkInterface::Type fromNative(u_char nativeType) + { + #ifndef POCO_NO_NET_IFTYPES + case IFT_ETHER: return NetworkInterface::NI_TYPE_ETHERNET_CSMACD; ++#ifndef POCO_OS_HAIKU + case IFT_ISO88025: return NetworkInterface::NI_TYPE_ISO88025_TOKENRING; + case IFT_FRELAY: return NetworkInterface::NI_TYPE_FRAMERELAY; ++#endif // POCO_OS_HAIKU + case IFT_PPP: return NetworkInterface::NI_TYPE_PPP; + case IFT_LOOP: return NetworkInterface::NI_TYPE_SOFTWARE_LOOPBACK; ++#ifndef POCO_OS_HAIKU + case IFT_ATM: return NetworkInterface::NI_TYPE_ATM; + #if (POCO_OS != POCO_OS_SOLARIS) + case IFT_IEEE1394: return NetworkInterface::NI_TYPE_IEEE1394; + #endif ++#endif // POCO_OS_HAIKU + #endif + default: return NetworkInterface::NI_TYPE_OTHER; + +diff --git a/Net/src/Socket.cpp b/Net/src/Socket.cpp +index b848cb6..38d7854 100644 +--- a/Net/src/Socket.cpp ++++ b/Net/src/Socket.cpp +@@ -334,7 +334,7 @@ void Socket::destroyBufVec(SocketBufVec& buf) + { + #if defined(POCO_OS_FAMILY_WINDOWS) + free(it->buf); +-#elif defined(POCO_OS_FAMILY_UNIX) ++#elif defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + free(it->iov_base); + #endif + } +@@ -348,7 +348,7 @@ SocketBuf Socket::makeBuffer(void* buffer, std::size_t length) + #if defined(POCO_OS_FAMILY_WINDOWS) + ret.buf = reinterpret_cast(buffer); + ret.len = static_cast(length); +-#elif defined(POCO_OS_FAMILY_UNIX) ++#elif defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + ret.iov_base = buffer; + ret.iov_len = length; + #else +diff --git a/Net/src/SocketAddress.cpp b/Net/src/SocketAddress.cpp +index 487f5ae..87477ab 100644 +--- a/Net/src/SocketAddress.cpp ++++ b/Net/src/SocketAddress.cpp +@@ -33,7 +33,7 @@ using Poco::Net::Impl::IPv4SocketAddressImpl; + #ifdef POCO_HAVE_IPv6 + using Poco::Net::Impl::IPv6SocketAddressImpl; + #endif +-#ifdef POCO_OS_FAMILY_UNIX ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + using Poco::Net::Impl::LocalSocketAddressImpl; + #endif + +@@ -63,7 +63,7 @@ const SocketAddress::Family SocketAddress::IPv4; + #if defined(POCO_HAVE_IPv6) + const SocketAddress::Family SocketAddress::IPv6; + #endif +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + const SocketAddress::Family SocketAddress::UNIX_LOCAL; + #endif + #endif +@@ -143,7 +143,7 @@ SocketAddress::SocketAddress(const SocketAddress& socketAddress) + else if (socketAddress.family() == IPv6) + newIPv6(reinterpret_cast(socketAddress.addr())); + #endif +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + else if (socketAddress.family() == UNIX_LOCAL) + newLocal(reinterpret_cast(socketAddress.addr())); + #endif +@@ -164,7 +164,7 @@ SocketAddress::SocketAddress(const struct sockaddr* sockAddr, poco_socklen_t len + else if (length == sizeof(struct sockaddr_in6) && sockAddr->sa_family == AF_INET6) + newIPv6(reinterpret_cast(sockAddr)); + #endif +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + else if (length > 0 && length <= sizeof(struct sockaddr_un) && sockAddr->sa_family == AF_UNIX) + newLocal(reinterpret_cast(sockAddr)); + #endif +@@ -181,7 +181,7 @@ bool SocketAddress::operator < (const SocketAddress& socketAddress) const + { + if (family() < socketAddress.family()) return true; + if (family() > socketAddress.family()) return false; +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + if (family() == UNIX_LOCAL) return toString() < socketAddress.toString(); + #endif + if (host() < socketAddress.host()) return true; +@@ -200,7 +200,7 @@ SocketAddress& SocketAddress::operator = (const SocketAddress& socketAddress) + else if (socketAddress.family() == IPv6) + newIPv6(reinterpret_cast(socketAddress.addr())); + #endif +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + else if (socketAddress.family() == UNIX_LOCAL) + newLocal(reinterpret_cast(socketAddress.addr())); + #endif +@@ -325,7 +325,7 @@ void SocketAddress::init(Family fam, const std::string& hostAddress, Poco::UInt1 + + void SocketAddress::init(Family fam, const std::string& address) + { +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + if (fam == UNIX_LOCAL) + { + newLocal(address); +@@ -369,7 +369,7 @@ void SocketAddress::init(const std::string& hostAndPort) + std::string::const_iterator it = hostAndPort.begin(); + std::string::const_iterator end = hostAndPort.end(); + +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + if (*it == '/') + { + newLocal(hostAndPort); +diff --git a/Net/src/SocketAddressImpl.cpp b/Net/src/SocketAddressImpl.cpp +index 5769017..ae10af3 100644 +--- a/Net/src/SocketAddressImpl.cpp ++++ b/Net/src/SocketAddressImpl.cpp +@@ -127,7 +127,7 @@ std::string IPv6SocketAddressImpl::toString() const + #endif // POCO_HAVE_IPv6 + + +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + + + // +diff --git a/Net/src/SocketImpl.cpp b/Net/src/SocketImpl.cpp +index 7bc99f3..b8d2d62 100644 +--- a/Net/src/SocketImpl.cpp ++++ b/Net/src/SocketImpl.cpp +@@ -360,7 +360,7 @@ int SocketImpl::sendBytes(const SocketBufVec& buffers, int flags) + static_cast(flags), 0, 0); + if (rc == SOCKET_ERROR) error(); + rc = sent; +-#elif defined(POCO_OS_FAMILY_UNIX) ++#elif defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + rc = writev(_sockfd, &buffers[0], static_cast(buffers.size())); + #endif + } +@@ -410,7 +410,7 @@ int SocketImpl::receiveBytes(SocketBufVec& buffers, int flags) + &recvd, &dwFlags, 0, 0); + if (rc == SOCKET_ERROR) error(); + rc = recvd; +-#elif defined(POCO_OS_FAMILY_UNIX) ++#elif defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + rc = readv(_sockfd, &buffers[0], static_cast(buffers.size())); + #endif + } +@@ -491,7 +491,7 @@ int SocketImpl::sendTo(const SocketBufVec& buffers, const SocketAddress& address + address.addr(), address.length(), 0, 0); + if (rc == SOCKET_ERROR) error(); + rc = sent; +-#elif defined(POCO_OS_FAMILY_UNIX) ++#elif defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + struct msghdr msgHdr; + msgHdr.msg_name = const_cast(address.addr()); + msgHdr.msg_namelen = address.length(); +@@ -577,7 +577,7 @@ int SocketImpl::receiveFrom(SocketBufVec& buffers, struct sockaddr** pSA, poco_s + &recvd, &dwFlags, *pSA, *ppSALen, 0, 0); + if (rc == SOCKET_ERROR) error(); + rc = recvd; +-#elif defined(POCO_OS_FAMILY_UNIX) ++#elif defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + struct msghdr msgHdr; + msgHdr.msg_name = *pSA; + msgHdr.msg_namelen = **ppSALen; +@@ -1133,7 +1133,7 @@ bool SocketImpl::getBroadcast() + + void SocketImpl::setBlocking(bool flag) + { +-#if !defined(POCO_OS_FAMILY_UNIX) ++#if !defined(POCO_OS_FAMILY_UNIX) || !(POCO_OS == POCO_OS_HAIKU) + int arg = flag ? 0 : 1; + ioctl(FIONBIO, arg); + #else +@@ -1205,7 +1205,7 @@ void SocketImpl::ioctl(poco_ioctl_request_t request, void* arg) + } + + +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + int SocketImpl::fcntl(poco_fcntl_request_t request) + { + int rc = ::fcntl(_sockfd, request); +@@ -1325,7 +1325,7 @@ void SocketImpl::error(int code, const std::string& arg) + throw NetException("Host is down", arg, code); + case POCO_EHOSTUNREACH: + throw NetException("No route to host", arg, code); +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_HAIKU) + case EPIPE: + throw IOException("Broken pipe", code); + case EBADF: +diff --git a/Net/src/StreamSocketImpl.cpp b/Net/src/StreamSocketImpl.cpp +index 6e86c8f..00973ba 100644 +--- a/Net/src/StreamSocketImpl.cpp ++++ b/Net/src/StreamSocketImpl.cpp +@@ -34,7 +34,7 @@ StreamSocketImpl::StreamSocketImpl(SocketAddress::Family family) + else if (family == SocketAddress::IPv6) + init(AF_INET6); + #endif +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + else if (family == SocketAddress::UNIX_LOCAL) + init(AF_UNIX); + #endif +diff --git a/Net/src/TCPServer.cpp b/Net/src/TCPServer.cpp +index 71c91f7..65c9a3f 100644 +--- a/Net/src/TCPServer.cpp ++++ b/Net/src/TCPServer.cpp +@@ -139,7 +139,7 @@ void TCPServer::run() + if (!_pConnectionFilter || _pConnectionFilter->accept(ss)) + { + // enable nodelay per default: OSX really needs that +-#if defined(POCO_OS_FAMILY_UNIX) ++#if defined(POCO_OS_FAMILY_UNIX) || (POCO_OS == POCO_OS_HAIKU) + if (ss.address().family() != AddressFamily::UNIX_LOCAL) + #endif + { +-- +2.37.3 + + +From a43e3d5eb34455d2fe3f5f5057a26d4864205071 Mon Sep 17 00:00:00 2001 +From: Maite Gamper +Date: Fri, 28 Apr 2023 22:33:11 +0200 +Subject: change an include for the debugger + + +diff --git a/Foundation/src/Debugger.cpp b/Foundation/src/Debugger.cpp +index 17ddbe1..1f9cf61 100644 +--- a/Foundation/src/Debugger.cpp ++++ b/Foundation/src/Debugger.cpp +@@ -18,11 +18,11 @@ + #include + #if defined(POCO_OS_FAMILY_WINDOWS) + #include "Poco/UnWindows.h" ++#elif defined(POCO_OS_FAMILY_BE) ++ #include + #elif defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) + #include + #include +-#elif defined(POCO_OS_FAMILY_BE) +- #include + #endif + #include "Poco/UnicodeConverter.h" + +-- +2.37.3 + diff --git a/dev-libs/poco/poco-1.12.4.recipe b/dev-libs/poco/poco-1.12.4.recipe new file mode 100644 index 000000000..8888d839f --- /dev/null +++ b/dev-libs/poco/poco-1.12.4.recipe @@ -0,0 +1,149 @@ +SUMMARY="C++ libraries for building network-based applications" +DESCRIPTION="The POCO C++ Libraries are powerful cross-platform C++ libraries for building \ +network- and internet-based applications that run on desktop, server, mobile, IoT, \ +and embedded systems." +HOMEPAGE="https://pocoproject.org/" +COPYRIGHT="pocoproject" +LICENSE="Boost v1.0" +REVISION="1" +SOURCE_URI="https://github.com/pocoproject/poco/archive/refs/tags/poco-1.12.4-release.tar.gz" +CHECKSUM_SHA256="71ef96c35fced367d6da74da294510ad2c912563f12cd716ab02b6ed10a733ef" +SOURCE_DIR="poco-poco-1.12.4-release/" +PATCHES="poco-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion=$portVersion +libVersionCompat="$portVersion compat >= 94" +soSuffix="94" + +PROVIDES=" + poco$secondaryArchSuffix = $portVersion + cmd:arc$secondaryArchSuffix = $portVersion + cmd:cpspc$secondaryArchSuffix = $portVersion + cmd:f2cpsp$secondaryArchSuffix = $portVersion + lib:libPocoActiveRecord$secondaryArchSuffix = $libVersionCompat + lib:libPocoCrypto$secondaryArchSuffix = $libVersionCompat + lib:libPocoData$secondaryArchSuffix = $libVersionCompat + lib:libPocoDataSQLite$secondaryArchSuffix = $libVersionCompat + lib:libPocoEncodings$secondaryArchSuffix = $libVersionCompat + lib:libPocoFoundation$secondaryArchSuffix = $libVersionCompat + lib:libPocoJSON$secondaryArchSuffix = $libVersionCompat + lib:libPocoJWT$secondaryArchSuffix = $libVersionCompat + lib:libPocoMongoDB$secondaryArchSuffix = $libVersionCompat + lib:libPocoNet$secondaryArchSuffix = $libVersionCompat + lib:libPocoNetSSL$secondaryArchSuffix = $libVersionCompat + lib:libPocoRedis$secondaryArchSuffix = $libVersionCompat + lib:libPocoUtil$secondaryArchSuffix = $libVersionCompat + lib:libPocoPrometheus$secondaryArchSuffix = $libVersionCompat + lib:libPocoXML$secondaryArchSuffix = $libVersionCompat + lib:libPocoZip$secondaryArchSuffix = $libVersionCompat + lib:poco$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libexpat$secondaryArchSuffix + lib:libpcre2_32$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libsqlite3$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + poco${secondaryArchSuffix}_devel = $portVersion + devel:libPocoActiveRecord$secondaryArchSuffix = $libVersionCompat + devel:libPocoCrypto$secondaryArchSuffix = $libVersionCompat + devel:libPocoData$secondaryArchSuffix = $libVersionCompat + devel:libPocoDataSQLite$secondaryArchSuffix = $libVersionCompat + devel:libPocoEncodings$secondaryArchSuffix = $libVersionCompat + devel:libPocoFoundation$secondaryArchSuffix = $libVersionCompat + devel:libPocoJSON$secondaryArchSuffix = $libVersionCompat + devel:libPocoJWT$secondaryArchSuffix = $libVersionCompat + devel:libPocoMongoDB$secondaryArchSuffix = $libVersionCompat + devel:libPocoNet$secondaryArchSuffix = $libVersionCompat + devel:libPocoNetSSL$secondaryArchSuffix = $libVersionCompat + devel:libPocoRedis$secondaryArchSuffix = $libVersionCompat + devel:libPocoUtil$secondaryArchSuffix = $libVersionCompat + devel:libPocoPrometheus$secondaryArchSuffix = $libVersionCompat + devel:libPocoXML$secondaryArchSuffix = $libVersionCompat + devel:libPocoZip$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + poco$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libexpat$secondaryArchSuffix + devel:libpcre2_32$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libsqlite3$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:make + cmd:gcc$secondaryArchSuffix + " + +TEST_REQUIRES=" + cmd:ctest + " + +defineDebugInfoPackage poco$secondaryArchSuffix \ + $binDir/arc \ + $binDir/cpspc \ + $binDir/f2cpsp \ + $libDir/libPocoActiveRecord.so.$soSuffix \ + $libDir/libPocoCrypto.so.$soSuffix \ + $libDir/libPocoData.so.$soSuffix \ + $libDir/libPocoDataSQLite.so.$soSuffix \ + $libDir/libPocoEncodings.so.$soSuffix \ + $libDir/libPocoFoundation.so.$soSuffix \ + $libDir/libPocoJSON.so.$soSuffix \ + $libDir/libPocoJWT.so.$soSuffix \ + $libDir/libPocoMongoDB.so.$soSuffix \ + $libDir/libPocoNet.so.$soSuffix \ + $libDir/libPocoNetSSL.so.$soSuffix \ + $libDir/libPocoPrometheus.so.$soSuffix \ + $libDir/libPocoRedis.so.$soSuffix \ + $libDir/libPocoUtil.so.$soSuffix \ + $libDir/libPocoXML.so.$soSuffix \ + $libDir/libPocoZip.so.$soSuffix + +BUILD() { + cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DENABLE_TESTS=ON \ + -DCMAKE_INSTALL_INCLUDEDIR=$includeDir \ + -DCMAKE_INSTALL_LIBDIR=$libDir \ + -DCMAKE_INSTALL_BINDIR=$binDir \ + $cmakeDirArgs \ + -DPOCO_UNBUNDLED=ON +# -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g3" \ + make -C build $jobArgs +} + +INSTALL() { + mkdir -p $includeDir + make -C build install + + prepareInstalledDevelLibs libPocoActiveRecord libPocoCrypto \ + libPocoData libPocoDataSQLite libPocoEncodings libPocoFoundation \ + libPocoJSON libPocoJWT libPocoMongoDB libPocoNet \ + libPocoNetSSL libPocoRedis libPocoUtil libPocoPrometheus \ + libPocoXML libPocoZip + fixPkgconfig + + packageEntries devel \ + $developDir \ + $libDir/cmake +} + +TEST() { + mkdir -p /home + # for some reason, the test library is in the bin folder + # a test assumes that $HOME is set, which it is not for build environments + HOME=/home LIBRARY_PATH=/sources/$SOURCE_DIR/build/bin:$LIBRARY_PATH make \ + -C build $jobArgs test ARGS="--rerun-failed --output-on-failure" +}