From f7fca4c5b2be04e4ae505a7f719567cac01c4042 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Tue, 31 Dec 2024 03:44:06 +0800 Subject: [PATCH] wolfssl: enable dispatch on 10.6 ppc --- devel/wolfssl/Portfile | 4 ++ ...acOS-enable-dispatch-on-10.6-powerpc.patch | 39 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 devel/wolfssl/files/0010-macOS-enable-dispatch-on-10.6-powerpc.patch diff --git a/devel/wolfssl/Portfile b/devel/wolfssl/Portfile index 44cdbea6f5802..c8dd4abe4977e 100644 --- a/devel/wolfssl/Portfile +++ b/devel/wolfssl/Portfile @@ -8,6 +8,7 @@ legacysupport.newest_darwin_requires_legacy 15 name wolfssl version 5.7.4 +revision 1 categories devel security maintainers {wolfssl.com:facts @JacobBarthelmeh} openmaintainer homepage https://wolfssl.com/wolfSSL/Products-wolfssl.html @@ -35,6 +36,9 @@ configure.args --enable-all \ --disable-jobserver \ --disable-silent-rules +# Drop this if building on 10a190: +patchfiles-append 0010-macOS-enable-dispatch-on-10.6-powerpc.patch + # Enabling this option does not work at least on 10.6: # src/internal.c:41288: error: 'errSecSuccess' undeclared (first use in this function) # Arguably we do not need archaic system certificates anyway. diff --git a/devel/wolfssl/files/0010-macOS-enable-dispatch-on-10.6-powerpc.patch b/devel/wolfssl/files/0010-macOS-enable-dispatch-on-10.6-powerpc.patch new file mode 100644 index 0000000000000..1530ae05736aa --- /dev/null +++ b/devel/wolfssl/files/0010-macOS-enable-dispatch-on-10.6-powerpc.patch @@ -0,0 +1,39 @@ +From d9535aaabb5a55f22ab946448be1a879ed0bca97 Mon Sep 17 00:00:00 2001 +From: Sergey Fedorov +Date: Tue, 31 Dec 2024 03:37:59 +0800 +Subject: [PATCH] macOS: enable dispatch on 10.6 powerpc + +This assumes 10.6.8 on powerpc. API of 10a190 differs and will not work. +--- + wolfcrypt/src/wc_port.c | 3 +-- + wolfssl/wolfcrypt/types.h | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/wolfcrypt/src/wc_port.c b/wolfcrypt/src/wc_port.c +index 2ee85e3f3..82dfd0471 100644 +--- a/wolfcrypt/src/wc_port.c ++++ b/wolfcrypt/src/wc_port.c +@@ -4074,8 +4074,7 @@ char* mystrnstr(const char* s1, const char* s2, unsigned int n) + } + + #ifdef WOLFSSL_COND +- #if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 \ +- && !defined(__ppc__) ++ #if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 + /* Apple style dispatch semaphore */ + int wolfSSL_CondInit(COND_TYPE* cond) + { +diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h +index f8042cf82..ff769d471 100644 +--- a/wolfssl/wolfcrypt/types.h ++++ b/wolfssl/wolfcrypt/types.h +@@ -1513,8 +1513,7 @@ typedef struct w64wrapper { + typedef size_t THREAD_TYPE; + #define WOLFSSL_THREAD + #elif defined(WOLFSSL_PTHREADS) +- #if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 \ +- && !defined(__ppc__) ++ #if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 + #include + typedef struct COND_TYPE { + wolfSSL_Mutex mutex;