This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git


The following commit(s) were added to refs/heads/master by this push:
     new 05acd81  Add experimental builds for Apple Silicon
05acd81 is described below

commit 05acd81acbd3149762bd70affb12cd7f17def113
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Mon Oct 23 15:31:39 2023 -0400

    Add experimental builds for Apple Silicon
---
 .github/workflows/maven.yml | 10 ++++++++++
 Makefile                    |  3 +++
 Makefile.common             | 12 +++++++++++-
 pom.xml                     |  8 +++++++-
 4 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index dc5cf37..2e3d63b 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -41,6 +41,16 @@ jobs:
         # These names are used in conditional statements below.
         java: [ 8, 11, 17, 21 ]
         experimental: [false]
+        include:
+          - java: 21
+            os: macos-13-arm64
+            experimental: true        
+          - java: 21
+            os: macos-13-arm64
+            experimental: true        
+          - java: 21
+            os: macos-13-arm64
+            experimental: true        
 #        include:
 #          - java: 22-ea
 #            os: ubuntu-20.04
diff --git a/Makefile b/Makefile
index a839b95..c3419cf 100644
--- a/Makefile
+++ b/Makefile
@@ -93,6 +93,9 @@ mac32:
 mac64:
        $(MAKE) native OS_NAME=Mac OS_ARCH=x86_64
 
+macArm64:
+       $(MAKE) native OS_NAME=Mac OS_ARCH=arm64-apple-macos11
+
 linux32:
        $(MAKE) native OS_NAME=Linux OS_ARCH=x86
 
diff --git a/Makefile.common b/Makefile.common
index 1dc075c..3d70ea2 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -53,7 +53,7 @@ endif
 
 # os=Default is meant to be generic Unix/Linux
 
-known_os_archs := Linux-x86 Linux-x86_64 Linux-aarch64 Linux-arm Linux-armhf 
Linux-ppc Linux-ppc64 Mac-x86 Mac-x86_64 FreeBSD-x86_64 Windows-x86 
Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc64
+known_os_archs := Linux-x86 Linux-x86_64 Linux-aarch64 Linux-arm Linux-armhf 
Linux-ppc Linux-ppc64 Mac-x86 Mac-x86_64 Mac-arm64 FreeBSD-x86_64 Windows-x86 
Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc64
 os_arch := $(OS_NAME)-$(OS_ARCH)
 
 ifeq (,$(findstring $(strip $(os_arch)),$(known_os_archs)))
@@ -209,6 +209,16 @@ Mac-x86_64_LIBNAME   := libcommons-crypto.jnilib
 Mac-x86_64_LIBNAME_OSSL3 := libcommons-crypto-ossl3.jnilib
 Mac-x86_64_COMMONS_CRYPTO_FLAGS  :=
 
+Mac-arm64_CC        := gcc -arch $(OS_ARCH)
+Mac-arm64_CXX       := gcc -arch $(OS_ARCH)
+Mac-arm64_STRIP     := strip -x
+Mac-arm64_CFLAGS    := -Ilib/inc_mac -I"$(JAVA_HOME)/include" -O2 -fPIC 
-mmacosx-version-min=11.0 -fvisibility=hidden -I/usr/local/include 
-I/usr/local/opt/openssl/include
+Mac-arm64_CXXFLAGS  := -Ilib/inc_mac -I"$(JAVA_HOME)/include" -O2 -fPIC 
-mmacosx-version-min=11.0 -fvisibility=hidden -I/usr/local/include 
-I/usr/local/opt/openssl/include
+Mac-arm64_LINKFLAGS := -dynamiclib -L/usr/local/lib
+Mac-arm64_LIBNAME   := libcommons-crypto.jnilib
+Mac-arm64_LIBNAME_OSSL3 := libcommons-crypto-ossl3.jnilib
+Mac-arm64_COMMONS_CRYPTO_FLAGS  :=
+
 FreeBSD-x86_64_CC           := $(CROSS_PREFIX)gcc
 FreeBSD-x86_64_CXX          := $(CROSS_PREFIX)g++
 FreeBSD-x86_64_STRIP        := $(CROSS_PREFIX)strip
diff --git a/pom.xml b/pom.xml
index f1ee9d7..9242412 100644
--- a/pom.xml
+++ b/pom.xml
@@ -148,7 +148,7 @@ The following provides more details on the included 
cryptographic software:
     <commons.release.isDistModule>true</commons.release.isDistModule>
     <jna.version>5.13.0</jna.version>
 
-    <!-- The property "target.name" is used to specify the ant target, The All 
target will use
+    <!-- The property "target.name" is used to specify the ant target, The 
"all" target will use
     OsInfo.java to detect the OS info and arch to generate the native binary 
for detected platform.
     User is able to specify the platform by maven profiles.-->
     <target.name>all</target.name>
@@ -291,6 +291,12 @@ The following provides more details on the included 
cryptographic software:
         <target.name>mac64</target.name>
       </properties>
     </profile>
+    <profile>
+      <id>macArm64</id>
+      <properties>
+        <target.name>macArm64</target.name>
+      </properties>
+    </profile>
     <profile>
       <id>linux32</id>
       <properties>

Reply via email to