mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
Don't compile for VisionOS if Xcode doesn't support it
Drop APPLE_SILICON_SUPPORTED, since Xcode has had support for it for ages.
This commit is contained in:
parent
8f453f41f8
commit
16cd369c65
@ -51,9 +51,8 @@ else
|
|||||||
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
|
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
APPLE_SILICON_SUPPORTED=false
|
VISIONOS_SUPPORTED=false
|
||||||
echo 'int main(void){return 0;}' >comptest.c && cc --target=arm64-macos comptest.c 2>/dev/null && APPLE_SILICON_SUPPORTED=true
|
[ -d "${XCODEDIR}/Platforms/XROS.platform" ] && VISIONOS_SUPPORTED=true
|
||||||
rm -f comptest.c
|
|
||||||
|
|
||||||
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||||
PROCESSORS=${NPROCESSORS:-3}
|
PROCESSORS=${NPROCESSORS:-3}
|
||||||
@ -70,7 +69,6 @@ build_macos() {
|
|||||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||||
|
|
||||||
## macOS arm64
|
## macOS arm64
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
export CFLAGS="-O3 -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||||
|
|
||||||
@ -78,7 +76,6 @@ build_macos() {
|
|||||||
./configure --host=aarch64-apple-darwin23 --prefix="$MACOS_ARM64_PREFIX" \
|
./configure --host=aarch64-apple-darwin23 --prefix="$MACOS_ARM64_PREFIX" \
|
||||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
fi
|
|
||||||
|
|
||||||
## macOS x86_64
|
## macOS x86_64
|
||||||
export CFLAGS="-O3 -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
export CFLAGS="-O3 -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||||
@ -129,7 +126,6 @@ build_ios_simulator() {
|
|||||||
export SDK="${BASEDIR}/SDKs/iPhoneSimulator.sdk"
|
export SDK="${BASEDIR}/SDKs/iPhoneSimulator.sdk"
|
||||||
|
|
||||||
## arm64 simulator
|
## arm64 simulator
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
@ -137,7 +133,6 @@ build_ios_simulator() {
|
|||||||
./configure --host=aarch64-apple-darwin23 --prefix="$IOS_SIMULATOR_ARM64_PREFIX" \
|
./configure --host=aarch64-apple-darwin23 --prefix="$IOS_SIMULATOR_ARM64_PREFIX" \
|
||||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
fi
|
|
||||||
|
|
||||||
## i386 simulator
|
## i386 simulator
|
||||||
export CFLAGS="-O3 -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
@ -197,7 +192,6 @@ build_watchos_simulator() {
|
|||||||
export SDK="${BASEDIR}/SDKs/WatchSimulator.sdk"
|
export SDK="${BASEDIR}/SDKs/WatchSimulator.sdk"
|
||||||
|
|
||||||
## arm64 simulator
|
## arm64 simulator
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
@ -205,7 +199,6 @@ build_watchos_simulator() {
|
|||||||
./configure --host=aarch64-apple-darwin23 --prefix="$WATCHOS_SIMULATOR_ARM64_PREFIX" \
|
./configure --host=aarch64-apple-darwin23 --prefix="$WATCHOS_SIMULATOR_ARM64_PREFIX" \
|
||||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
fi
|
|
||||||
|
|
||||||
## i386 simulator
|
## i386 simulator
|
||||||
export CFLAGS="-O3 -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
@ -247,7 +240,6 @@ build_tvos_simulator() {
|
|||||||
export SDK="${BASEDIR}/SDKs/AppleTVSimulator.sdk"
|
export SDK="${BASEDIR}/SDKs/AppleTVSimulator.sdk"
|
||||||
|
|
||||||
## arm64 simulator
|
## arm64 simulator
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
@ -255,7 +247,6 @@ build_tvos_simulator() {
|
|||||||
./configure --host=aarch64-apple-darwin23 --prefix="$TVOS_SIMULATOR_ARM64_PREFIX" \
|
./configure --host=aarch64-apple-darwin23 --prefix="$TVOS_SIMULATOR_ARM64_PREFIX" \
|
||||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
fi
|
|
||||||
|
|
||||||
## x86_64 simulator
|
## x86_64 simulator
|
||||||
export CFLAGS="-O3 -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||||
@ -286,7 +277,6 @@ build_visionos_simulator() {
|
|||||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||||
export SDK="${BASEDIR}/SDKs/XRSimulator.sdk"
|
export SDK="${BASEDIR}/SDKs/XRSimulator.sdk"
|
||||||
|
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
|
||||||
|
|
||||||
@ -294,7 +284,6 @@ build_visionos_simulator() {
|
|||||||
./configure --host=aarch64-apple-darwin23 --prefix="$VISIONOS_SIMULATOR_PREFIX" \
|
./configure --host=aarch64-apple-darwin23 --prefix="$VISIONOS_SIMULATOR_PREFIX" \
|
||||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build_catalyst() {
|
build_catalyst() {
|
||||||
@ -303,7 +292,6 @@ build_catalyst() {
|
|||||||
export SDK="${BASEDIR}/SDKs/MacOSX.sdk"
|
export SDK="${BASEDIR}/SDKs/MacOSX.sdk"
|
||||||
|
|
||||||
## arm64 catalyst
|
## arm64 catalyst
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
export CFLAGS="-O3 -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
export CFLAGS="-O3 -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||||
export LDFLAGS="-arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
export LDFLAGS="-arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||||
|
|
||||||
@ -311,7 +299,6 @@ build_catalyst() {
|
|||||||
./configure --host=aarch64-apple-ios --prefix="$CATALYST_ARM64_PREFIX" \
|
./configure --host=aarch64-apple-ios --prefix="$CATALYST_ARM64_PREFIX" \
|
||||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
fi
|
|
||||||
|
|
||||||
## x86_64 catalyst
|
## x86_64 catalyst
|
||||||
export CFLAGS="-O3 -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
export CFLAGS="-O3 -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||||
@ -333,10 +320,12 @@ echo "Building for watchOS..."
|
|||||||
build_watchos >"$LOG_FILE" 2>&1 || exit 1
|
build_watchos >"$LOG_FILE" 2>&1 || exit 1
|
||||||
echo "Building for tvOS..."
|
echo "Building for tvOS..."
|
||||||
build_tvos >"$LOG_FILE" 2>&1 || exit 1
|
build_tvos >"$LOG_FILE" 2>&1 || exit 1
|
||||||
echo "Building for visionOS..."
|
|
||||||
build_visionos >"$LOG_FILE" 2>&1 || exit 1
|
|
||||||
echo "Building for Catalyst..."
|
echo "Building for Catalyst..."
|
||||||
build_catalyst >"$LOG_FILE" 2>&1 || exit 1
|
build_catalyst >"$LOG_FILE" 2>&1 || exit 1
|
||||||
|
if [ "$VISIONOS_SUPPORTED" = true ]; then
|
||||||
|
echo "Building for visionOS..."
|
||||||
|
build_visionos >"$LOG_FILE" 2>&1 || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
||||||
echo "Building for the iOS simulator..."
|
echo "Building for the iOS simulator..."
|
||||||
@ -345,8 +334,10 @@ if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
|||||||
build_watchos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
build_watchos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
||||||
echo "Building for the tvOS simulator..."
|
echo "Building for the tvOS simulator..."
|
||||||
build_tvos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
build_tvos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
||||||
|
if [ "$VISIONOS_SUPPORTED" = true ]; then
|
||||||
echo "Building for the visionOS simulator..."
|
echo "Building for the visionOS simulator..."
|
||||||
build_visionos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
build_visionos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "[Skipping the simulators]"
|
echo "[Skipping the simulators]"
|
||||||
fi
|
fi
|
||||||
@ -362,16 +353,10 @@ echo "Bundling macOS targets..."
|
|||||||
mkdir -p "${PREFIX}/macos/lib"
|
mkdir -p "${PREFIX}/macos/lib"
|
||||||
cp -a "${MACOS_X86_64_PREFIX}/include" "${PREFIX}/macos/"
|
cp -a "${MACOS_X86_64_PREFIX}/include" "${PREFIX}/macos/"
|
||||||
for ext in a dylib; do
|
for ext in a dylib; do
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
lipo -create \
|
lipo -create \
|
||||||
"${MACOS_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
"${MACOS_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
"${MACOS_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
"${MACOS_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
-output "${PREFIX}/macos/lib/libsodium.${ext}"
|
-output "${PREFIX}/macos/lib/libsodium.${ext}"
|
||||||
else
|
|
||||||
lipo -create \
|
|
||||||
"${MACOS_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
|
||||||
-output "${PREFIX}/macos/lib/libsodium.${ext}"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Bundling iOS targets..."
|
echo "Bundling iOS targets..."
|
||||||
@ -408,15 +393,17 @@ for ext in a dylib; do
|
|||||||
-output "$PREFIX/tvos/lib/libsodium.${ext}"
|
-output "$PREFIX/tvos/lib/libsodium.${ext}"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Bundling visionOS targets..."
|
if [ "$VISIONOS_SUPPORTED" = true ]; then
|
||||||
|
echo "Bundling visionOS targets..."
|
||||||
|
|
||||||
mkdir -p "${PREFIX}/visionos/lib"
|
mkdir -p "${PREFIX}/visionos/lib"
|
||||||
cp -a "${VISIONOS_PREFIX}/include" "${PREFIX}/visionos/"
|
cp -a "${VISIONOS_PREFIX}/include" "${PREFIX}/visionos/"
|
||||||
for ext in a dylib; do
|
for ext in a dylib; do
|
||||||
lipo -create \
|
lipo -create \
|
||||||
"$VISIONOS_PREFIX/lib/libsodium.${ext}" \
|
"$VISIONOS_PREFIX/lib/libsodium.${ext}" \
|
||||||
-output "$PREFIX/visionos/lib/libsodium.${ext}"
|
-output "$PREFIX/visionos/lib/libsodium.${ext}"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Bundling Catalyst targets..."
|
echo "Bundling Catalyst targets..."
|
||||||
|
|
||||||
@ -426,16 +413,10 @@ for ext in a dylib; do
|
|||||||
if [ ! -f "${CATALYST_X86_64_PREFIX}/lib/libsodium.${ext}" ]; then
|
if [ ! -f "${CATALYST_X86_64_PREFIX}/lib/libsodium.${ext}" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
lipo -create \
|
lipo -create \
|
||||||
"${CATALYST_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
"${CATALYST_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
"${CATALYST_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
"${CATALYST_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
-output "${PREFIX}/catalyst/lib/libsodium.${ext}"
|
-output "${PREFIX}/catalyst/lib/libsodium.${ext}"
|
||||||
else
|
|
||||||
lipo -create \
|
|
||||||
"${CATALYST_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
|
||||||
-output "${PREFIX}/catalyst/lib/libsodium.${ext}"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
||||||
@ -444,18 +425,11 @@ if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
|||||||
mkdir -p "${PREFIX}/ios-simulators/lib"
|
mkdir -p "${PREFIX}/ios-simulators/lib"
|
||||||
cp -a "${IOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/ios-simulators/"
|
cp -a "${IOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/ios-simulators/"
|
||||||
for ext in a dylib; do
|
for ext in a dylib; do
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
lipo -create \
|
lipo -create \
|
||||||
"${IOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
"${IOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
"${IOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
|
"${IOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
|
||||||
"${IOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
"${IOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
-output "${PREFIX}/ios-simulators/lib/libsodium.${ext}" || exit 1
|
-output "${PREFIX}/ios-simulators/lib/libsodium.${ext}" || exit 1
|
||||||
else
|
|
||||||
lipo -create \
|
|
||||||
"${IOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
|
|
||||||
"${IOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
|
||||||
-output "${PREFIX}/ios-simulators/lib/libsodium.${ext}" || exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Bundling watchOS simulators..."
|
echo "Bundling watchOS simulators..."
|
||||||
@ -463,18 +437,11 @@ if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
|||||||
mkdir -p "${PREFIX}/watchos-simulators/lib"
|
mkdir -p "${PREFIX}/watchos-simulators/lib"
|
||||||
cp -a "${WATCHOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/watchos-simulators/"
|
cp -a "${WATCHOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/watchos-simulators/"
|
||||||
for ext in a dylib; do
|
for ext in a dylib; do
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
lipo -create \
|
lipo -create \
|
||||||
"${WATCHOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
"${WATCHOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
"${WATCHOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
|
"${WATCHOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
|
||||||
"${WATCHOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
"${WATCHOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
-output "${PREFIX}/watchos-simulators/lib/libsodium.${ext}"
|
-output "${PREFIX}/watchos-simulators/lib/libsodium.${ext}"
|
||||||
else
|
|
||||||
lipo -create \
|
|
||||||
"${WATCHOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
|
|
||||||
"${WATCHOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
|
||||||
-output "${PREFIX}/watchos-simulators/lib/libsodium.${ext}"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Bundling tvOS simulators..."
|
echo "Bundling tvOS simulators..."
|
||||||
@ -482,29 +449,23 @@ if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
|||||||
mkdir -p "${PREFIX}/tvos-simulators/lib"
|
mkdir -p "${PREFIX}/tvos-simulators/lib"
|
||||||
cp -a "${TVOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/tvos-simulators/"
|
cp -a "${TVOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/tvos-simulators/"
|
||||||
for ext in a dylib; do
|
for ext in a dylib; do
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
lipo -create \
|
lipo -create \
|
||||||
"${TVOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
"${TVOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
"${TVOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
"${TVOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
||||||
-output "${PREFIX}/tvos-simulators/lib/libsodium.${ext}" || exit 1
|
-output "${PREFIX}/tvos-simulators/lib/libsodium.${ext}" || exit 1
|
||||||
else
|
|
||||||
lipo -create \
|
|
||||||
"${TVOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
|
|
||||||
-output "${PREFIX}/tvos-simulators/lib/libsodium.${ext}" || exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$VISIONOS_SUPPORTED" = true ]; then
|
||||||
echo "Bundling visionOS simulators..."
|
echo "Bundling visionOS simulators..."
|
||||||
|
|
||||||
mkdir -p "${PREFIX}/visionos-simulators/lib"
|
mkdir -p "${PREFIX}/visionos-simulators/lib"
|
||||||
cp -a "${VISIONOS_SIMULATOR_PREFIX}/include" "${PREFIX}/visionos-simulators/"
|
cp -a "${VISIONOS_SIMULATOR_PREFIX}/include" "${PREFIX}/visionos-simulators/"
|
||||||
for ext in a dylib; do
|
for ext in a dylib; do
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
|
||||||
lipo -create \
|
lipo -create \
|
||||||
"${VISIONOS_SIMULATOR_PREFIX}/lib/libsodium.${ext}" \
|
"${VISIONOS_SIMULATOR_PREFIX}/lib/libsodium.${ext}" \
|
||||||
-output "${PREFIX}/visionos-simulators/lib/libsodium.${ext}" || exit 1
|
-output "${PREFIX}/visionos-simulators/lib/libsodium.${ext}" || exit 1
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Creating Clibsodium.xcframework..."
|
echo "Creating Clibsodium.xcframework..."
|
||||||
@ -513,11 +474,17 @@ rm -rf "${PREFIX}/Clibsodium.xcframework"
|
|||||||
|
|
||||||
XCFRAMEWORK_ARGS=""
|
XCFRAMEWORK_ARGS=""
|
||||||
for f in macos ios watchos tvos visionos catalyst; do
|
for f in macos ios watchos tvos visionos catalyst; do
|
||||||
|
if [ "$VISIONOS_SUPPORTED" = false ] && [ "$f" = "visionos" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a"
|
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a"
|
||||||
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include"
|
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include"
|
||||||
done
|
done
|
||||||
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
||||||
for f in ios-simulators watchos-simulators tvos-simulators visionos-simulators; do
|
for f in ios-simulators watchos-simulators tvos-simulators visionos-simulators; do
|
||||||
|
if [ "$VISIONOS_SUPPORTED" = false ] && [ "$f" = "visionos-simulators" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a"
|
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a"
|
||||||
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include"
|
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user