Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
JinhangZhang committed Nov 4, 2024
1 parent 39fa373 commit aaf06fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion closed/make/modules/openjceplus/Copy.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ifeq (true,$(BUILD_OPENJCEPLUS))
# Copy OpenJCEPlus native libraries.
$(eval $(call SetupCopyFiles, OPENJCEPLUS_JGSKIT_LIBS_COPY, \
SRC := $(OPENJCEPLUS_TOPDIR)/target, \
FILES := $(filter %.dll %.so %.x, $(call FindFiles, $(OPENJCEPLUS_TOPDIR)/target)), \
FILES := $(filter %.dylib %.dll %.so %.x, $(call FindFiles, $(OPENJCEPLUS_TOPDIR)/target)), \
FLATTEN := true, \
DEST := $(LIB_DST_DIR), \
))
Expand Down
1 change: 0 additions & 1 deletion closed/make/modules/openjceplus/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ else ifeq ($(call isTargetOs, windows), true)
else ifeq ($(call isTargetOs, macosx), true)
$(info OPENJDK_TARGET_OS is: $(OPENJDK_TARGET_OS))
$(info OPENJDK_TARGET_CPU is: $(OPENJDK_TARGET_CPU))
OPENJCEPLUS_GSKIT_HOME := $(OPENJCEPLUS_TOPDIR)/ock/jgsk_crypto_sdk/jgsk_sdk
$(info OPENJCEPLUS_GSKIT_HOME is: $(OPENJCEPLUS_GSKIT_HOME))
OPENJCEPLUS_JGSKIT_MAKE := jgskit.mac.mak
$(info OPENJCEPLUS_JGSKIT_MAKE is: $(OPENJCEPLUS_JGSKIT_MAKE))
Expand Down
22 changes: 3 additions & 19 deletions get_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,29 +259,13 @@ clone_or_update_repos() {
# binaries and create Java module folder.
#
maybe_get_gskit() {
DEFAULT_TARGET_DIR="ock/jgsk_sdk/lib64"
MAC_AARCH64_TARGET_DIR="ock/jgsk_crypto_sdk/jgsk_sdk/lib64"

if [ -d OpenJCEPlus ] && [ ! -d OpenJCEPlus/ock ] && [ -n "$gskit_bin" ] && [ -n "$gskit_sdk_bin" ] ; then
echo
echo "Downloading OCK binaries for OpenJCEPlus"
echo

cd OpenJCEPlus
# check if the OS is Mac
if [ "$(uname)" = "Darwin" ]; then
# check if the arch is aarch64
if [ "$(arch)" = "arm64" ]; then
echo "This system is macOS on AArch64 (Apple Silicon)."
mkdir -p ock/jgsk_crypto_sdk/jgsk_sdk/lib64
TARGET_DIR=$MAC_AARCH64_TARGET_DIR
else
echo "This system is macOS, but not on AArch64."
fi
else
mkdir -p ock/jgsk_sdk/lib64
TARGET_DIR=$DEFAULT_TARGET_DIR
fi
mkdir -p ock/jgsk_sdk/lib64

if [ -n "$gskit_credential" ] ; then
curl -u "$gskit_credential" "$gskit_bin" > ock/jgsk_crypto.tar
Expand All @@ -292,7 +276,7 @@ maybe_get_gskit() {
fi

tar -xf ock/jgsk_crypto_sdk.tar -C ock
tar -xf ock/jgsk_crypto.tar -C "$TARGET_DIR"
tar -xf ock/jgsk_crypto.tar -C ock/jgsk_sdk/lib64

# Create OpenJCEPlus Java module folder.
mkdir -p src/main/openjceplus/share/classes
Expand All @@ -307,4 +291,4 @@ maybe_get_gskit() {
configure_defaults
process_options "$@"
clone_or_update_repos
maybe_get_gskit
maybe_get_gskit

0 comments on commit aaf06fd

Please sign in to comment.