From 7baba90c967a1689b8ca5c8a816d9194ef8d859a Mon Sep 17 00:00:00 2001 From: Magnus Edenhill Date: Wed, 29 Jun 2022 21:45:38 +0200 Subject: [PATCH] Packaging: OSX arm64 builds --- packaging/nuget/packaging.py | 37 +++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/packaging/nuget/packaging.py b/packaging/nuget/packaging.py index f2eae9cb7b..c295e15da3 100755 --- a/packaging/nuget/packaging.py +++ b/packaging/nuget/packaging.py @@ -41,7 +41,8 @@ ('win', 'x86', '.lib'): re.compile('current ar archive'), ('linux', 'x64', '.so'): re.compile('ELF 64.* x86-64'), ('linux', 'arm64', '.so'): re.compile('ELF 64.* ARM aarch64'), - ('osx', 'x64', '.dylib'): re.compile('Mach-O 64.* x86_64')} + ('osx', 'x64', '.dylib'): re.compile('Mach-O 64.* x86_64'), + ('osx', 'arm64', '.dylib'): re.compile('Mach-O 64.*arm64')} magic = magic.Magic() @@ -403,11 +404,16 @@ def build(self, buildtype): './share/doc/librdkafka/LICENSES.txt', 'LICENSES.txt'], - # Travis OSX build + # Travis OSX x64 build [{'arch': 'x64', 'plat': 'osx', 'fname_glob': 'librdkafka-clang.tar.gz'}, './lib/librdkafka.dylib', 'runtimes/osx-x64/native/librdkafka.dylib'], + # Travis OSX arm64 build + [{'arch': 'arm64', 'plat': 'osx', + 'fname_glob': 'librdkafka-gcc.tar.gz'}, + './lib/librdkafka.dylib', + 'runtimes/osx-arm64/native/librdkafka.dylib'], # Travis Manylinux build [{'arch': 'x64', 'plat': 'linux', @@ -632,6 +638,7 @@ def verify(self, path): "runtimes/linux-x64/native/librdkafka.so", "runtimes/linux-arm64/native/librdkafka.so", "runtimes/osx-x64/native/librdkafka.dylib", + "runtimes/osx-arm64/native/librdkafka.dylib", # win x64 "runtimes/win-x64/native/librdkafka.dll", "runtimes/win-x64/native/librdkafkacpp.dll", @@ -728,15 +735,25 @@ def build(self, buildtype): 'rdkafka-static.pc', 'librdkafka_musl_linux.pc'], - # osx static lib and pkg-config file - [{'arch': 'x64', - 'plat': 'osx', + # osx x64 static lib and pkg-config file + [{'arch': 'x64', 'plat': 'osx', 'fname_glob': 'librdkafka-clang.tar.gz'}, './lib/librdkafka-static.a', - 'librdkafka_darwin.a'], + 'librdkafka_darwin_amd64.a'], [{'arch': 'x64', 'plat': 'osx', 'fname_glob': 'librdkafka-clang.tar.gz'}, - './lib/pkgconfig/rdkafka-static.pc', 'librdkafka_darwin.pc'], + './lib/pkgconfig/rdkafka-static.pc', + 'librdkafka_darwin_amd64.pc'], + + # osx arm64 static lib and pkg-config file + [{'arch': 'arm64', 'plat': 'osx', + 'fname_glob': 'librdkafka-gcc.tar.gz'}, + './lib/librdkafka-static.a', + 'librdkafka_darwin_arm64.a'], + [{'arch': 'arm64', 'plat': 'osx', + 'fname_glob': 'librdkafka-gcc.tar.gz'}, + './lib/pkgconfig/rdkafka-static.pc', + 'librdkafka_darwin_arm64.pc'], # win static lib and pkg-config file (mingw) [{'arch': 'x64', 'plat': 'win', @@ -813,8 +830,10 @@ def verify(self, path): "./librdkafka_glibc_linux.pc", "./librdkafka_musl_linux.a", "./librdkafka_musl_linux.pc", - "./librdkafka_darwin.a", - "./librdkafka_darwin.pc", + "./librdkafka_darwin_amd64.a", + "./librdkafka_darwin_arm64.a", + "./librdkafka_darwin_amd64.pc", + "./librdkafka_darwin_arm64.pc", "./librdkafka_windows.a", "./librdkafka_windows.pc"]