libsodium-1.0.19-stable.tar.gz
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4490 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
7
deps/libsodium/dist-build/Makefile.am
vendored
7
deps/libsodium/dist-build/Makefile.am
vendored
@ -1,17 +1,14 @@
|
||||
|
||||
EXTRA_DIST = \
|
||||
android-build.sh \
|
||||
android-arm.sh \
|
||||
android-aar.sh \
|
||||
android-armv7-a.sh \
|
||||
android-armv8-a.sh \
|
||||
android-mips32.sh \
|
||||
android-mips64.sh \
|
||||
android-x86.sh \
|
||||
android-x86_64.sh \
|
||||
emscripten.sh \
|
||||
ios.sh \
|
||||
apple-xcframework.sh \
|
||||
macos.sh \
|
||||
msys2-win32.sh \
|
||||
msys2-win64.sh \
|
||||
watchos.sh \
|
||||
wasm32-wasi.sh
|
||||
|
8
deps/libsodium/dist-build/Makefile.in
vendored
8
deps/libsodium/dist-build/Makefile.in
vendored
@ -146,6 +146,7 @@ CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS_AESNI = @CFLAGS_AESNI@
|
||||
CFLAGS_ARMCRYPTO = @CFLAGS_ARMCRYPTO@
|
||||
CFLAGS_AVX = @CFLAGS_AVX@
|
||||
CFLAGS_AVX2 = @CFLAGS_AVX2@
|
||||
CFLAGS_AVX512F = @CFLAGS_AVX512F@
|
||||
@ -300,19 +301,16 @@ valgrind_enabled_tools = @valgrind_enabled_tools@
|
||||
valgrind_tools = @valgrind_tools@
|
||||
EXTRA_DIST = \
|
||||
android-build.sh \
|
||||
android-arm.sh \
|
||||
android-aar.sh \
|
||||
android-armv7-a.sh \
|
||||
android-armv8-a.sh \
|
||||
android-mips32.sh \
|
||||
android-mips64.sh \
|
||||
android-x86.sh \
|
||||
android-x86_64.sh \
|
||||
emscripten.sh \
|
||||
ios.sh \
|
||||
apple-xcframework.sh \
|
||||
macos.sh \
|
||||
msys2-win32.sh \
|
||||
msys2-win64.sh \
|
||||
watchos.sh \
|
||||
wasm32-wasi.sh
|
||||
|
||||
all: all-am
|
||||
|
2
deps/libsodium/dist-build/android-aar.sh
vendored
2
deps/libsodium/dist-build/android-aar.sh
vendored
@ -5,7 +5,7 @@
|
||||
# The x86 static library will not work due to text relocation rules, so static x86 versions are limited to shared libraries.
|
||||
# To simplify linking, library variants have distinct names: sodium, sodium-static, sodium-minimal and sodium-minimal-static.
|
||||
|
||||
SODIUM_VERSION="1.0.18.0"
|
||||
SODIUM_VERSION="1.0.19.0"
|
||||
NDK_VERSION=$(grep "Pkg.Revision = " <"${ANDROID_NDK_HOME}/source.properties" | cut -f 2 -d '=' | cut -f 2 -d' ' | cut -f 1 -d'.')
|
||||
DEST_PATH=$(mktemp -d)
|
||||
|
||||
|
4
deps/libsodium/dist-build/android-arm.sh
vendored
4
deps/libsodium/dist-build/android-arm.sh
vendored
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
export TARGET_ARCH=armv6
|
||||
export CFLAGS="-Os -mthumb -marm -march=${TARGET_ARCH}"
|
||||
ARCH=arm HOST_COMPILER=arm-linux-androideabi "$(dirname "$0")/android-build.sh"
|
4
deps/libsodium/dist-build/android-mips32.sh
vendored
4
deps/libsodium/dist-build/android-mips32.sh
vendored
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
export TARGET_ARCH=mips32
|
||||
export CFLAGS="-Os"
|
||||
ARCH=mips HOST_COMPILER=mipsel-linux-android "$(dirname "$0")/android-build.sh"
|
4
deps/libsodium/dist-build/android-mips64.sh
vendored
4
deps/libsodium/dist-build/android-mips64.sh
vendored
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
export TARGET_ARCH=mips64r6
|
||||
export CFLAGS="-Os -march=${TARGET_ARCH}"
|
||||
CC="mips64el-linux-android-gcc" NDK_PLATFORM=android-21 ARCH=mips64 HOST_COMPILER=mips64el-linux-android "$(dirname "$0")/android-build.sh"
|
146
deps/libsodium/dist-build/apple-xcframework.sh
vendored
146
deps/libsodium/dist-build/apple-xcframework.sh
vendored
@ -15,9 +15,11 @@ export WATCHOS64_PREFIX="${PREFIX}/tmp/watchos64"
|
||||
export WATCHOS_SIMULATOR_ARM64_PREFIX="${PREFIX}/tmp/watchos-simulator-arm64"
|
||||
export WATCHOS_SIMULATOR_I386_PREFIX="${PREFIX}/tmp/watchos-simulator-i386"
|
||||
export WATCHOS_SIMULATOR_X86_64_PREFIX="${PREFIX}/tmp/watchos-simulator-x86_64"
|
||||
export TVOS64_PREFIX="${PREFIX}/tmp/tvos64"
|
||||
export TVOS_PREFIX="${PREFIX}/tmp/tvos"
|
||||
export TVOS_SIMULATOR_ARM64_PREFIX="${PREFIX}/tmp/tvos-simulator-arm64"
|
||||
export TVOS_SIMULATOR_X86_64_PREFIX="${PREFIX}/tmp/tvos-simulator-x86_64"
|
||||
export VISIONOS_PREFIX="${PREFIX}/tmp/visionos"
|
||||
export VISIONOS_SIMULATOR_PREFIX="${PREFIX}/tmp/visionos-simulator"
|
||||
export CATALYST_ARM64_PREFIX="${PREFIX}/tmp/catalyst-arm64"
|
||||
export CATALYST_X86_64_PREFIX="${PREFIX}/tmp/catalyst-x86_64"
|
||||
export LOG_FILE="${PREFIX}/tmp/build_log"
|
||||
@ -40,7 +42,7 @@ echo "Define the LIBSODIUM_FULL_BUILD environment variable to build the full"
|
||||
echo "library (including all deprecated/undocumented/low-level functions)."
|
||||
echo
|
||||
echo "Define the LIBSODIUM_SKIP_SIMULATORS environment variable to skip building"
|
||||
echo "the simulators libraries (iOS, watchOS, tvOS simulators)."
|
||||
echo "the simulators libraries (iOS, watchOS, tvOS, visionOS simulators)."
|
||||
echo
|
||||
|
||||
if [ -z "$LIBSODIUM_FULL_BUILD" ]; then
|
||||
@ -69,21 +71,21 @@ build_macos() {
|
||||
|
||||
## macOS arm64
|
||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||
export CFLAGS="-O2 -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||
export LDFLAGS="-arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin20 --prefix="$MACOS_ARM64_PREFIX" \
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$MACOS_ARM64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
fi
|
||||
|
||||
## macOS x86_64
|
||||
export CFLAGS="-O2 -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||
export LDFLAGS="-arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=x86_64-apple-darwin10 --prefix="$MACOS_X86_64_PREFIX" \
|
||||
./configure --host=x86_64-apple-darwin23 --prefix="$MACOS_X86_64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
}
|
||||
@ -94,29 +96,29 @@ build_ios() {
|
||||
export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk"
|
||||
|
||||
## 32-bit iOS
|
||||
export CFLAGS="-O2 -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export LDFLAGS="-mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin10 --prefix="$IOS32_PREFIX" \
|
||||
./configure --host=arm-apple-darwin23 --prefix="$IOS32_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## 32-bit armv7s iOS
|
||||
export CFLAGS="-O2 -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export LDFLAGS="-mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin10 --prefix="$IOS32s_PREFIX" \
|
||||
./configure --host=arm-apple-darwin23 --prefix="$IOS32s_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## 64-bit iOS
|
||||
export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin10 --prefix="$IOS64_PREFIX" \
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$IOS64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
}
|
||||
@ -128,30 +130,30 @@ build_ios_simulator() {
|
||||
|
||||
## arm64 simulator
|
||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||
export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -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}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin20 --prefix="$IOS_SIMULATOR_ARM64_PREFIX" \
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$IOS_SIMULATOR_ARM64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
fi
|
||||
|
||||
## i386 simulator
|
||||
export CFLAGS="-O2 -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=i686-apple-darwin10 --prefix="$IOS_SIMULATOR_I386_PREFIX" \
|
||||
./configure --host=i686-apple-darwin23 --prefix="$IOS_SIMULATOR_I386_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## x86_64 simulator
|
||||
export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=x86_64-apple-darwin10 --prefix="$IOS_SIMULATOR_X86_64_PREFIX" \
|
||||
./configure --host=x86_64-apple-darwin23 --prefix="$IOS_SIMULATOR_X86_64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG}
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
}
|
||||
@ -162,29 +164,29 @@ build_watchos() {
|
||||
export SDK="${BASEDIR}/SDKs/WatchOS.sdk"
|
||||
|
||||
# 32-bit watchOS
|
||||
export CFLAGS="-O2 -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
export LDFLAGS="-mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin10 --prefix="$WATCHOS32_PREFIX" \
|
||||
./configure --host=arm-apple-darwin23 --prefix="$WATCHOS32_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## 64-bit arm64_32 watchOS
|
||||
export CFLAGS="-O2 -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
export LDFLAGS="-mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin10 --prefix="$WATCHOS64_32_PREFIX" \
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$WATCHOS64_32_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## 64-bit arm64 watchOS
|
||||
export CFLAGS="-O2 -mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
export LDFLAGS="-mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin10 --prefix="$WATCHOS64_PREFIX" \
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$WATCHOS64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
}
|
||||
@ -196,30 +198,30 @@ build_watchos_simulator() {
|
||||
|
||||
## arm64 simulator
|
||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||
export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -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}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin20 --prefix="$WATCHOS_SIMULATOR_ARM64_PREFIX" \
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$WATCHOS_SIMULATOR_ARM64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
fi
|
||||
|
||||
## i386 simulator
|
||||
export CFLAGS="-O2 -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=i686-apple-darwin10 --prefix="$WATCHOS_SIMULATOR_I386_PREFIX" \
|
||||
./configure --host=i686-apple-darwin23 --prefix="$WATCHOS_SIMULATOR_I386_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## x86_64 simulator
|
||||
export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=x86_64-apple-darwin10 --prefix="$WATCHOS_SIMULATOR_X86_64_PREFIX" \
|
||||
./configure --host=x86_64-apple-darwin23 --prefix="$WATCHOS_SIMULATOR_X86_64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
}
|
||||
@ -230,11 +232,11 @@ build_tvos() {
|
||||
export SDK="${BASEDIR}/SDKs/AppleTVOS.sdk"
|
||||
|
||||
## 64-bit tvOS
|
||||
export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
|
||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin10 --prefix="$TVOS64_PREFIX" \
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$TVOS_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
}
|
||||
@ -246,25 +248,55 @@ build_tvos_simulator() {
|
||||
|
||||
## arm64 simulator
|
||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||
export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -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}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-darwin20 --prefix="$TVOS_SIMULATOR_ARM64_PREFIX" \
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$TVOS_SIMULATOR_ARM64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
fi
|
||||
|
||||
## x86_64 simulator
|
||||
export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=x86_64-apple-darwin10 --prefix="$TVOS_SIMULATOR_X86_64_PREFIX" \
|
||||
./configure --host=x86_64-apple-darwin23 --prefix="$TVOS_SIMULATOR_X86_64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG}
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
}
|
||||
|
||||
build_visionos() {
|
||||
export BASEDIR="${XCODEDIR}/Platforms/XROS.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
export SDK="${BASEDIR}/SDKs/XROS.sdk"
|
||||
|
||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK}"
|
||||
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$VISIONOS_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
}
|
||||
|
||||
build_visionos_simulator() {
|
||||
export BASEDIR="${XCODEDIR}/Platforms/XRSimulator.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
export SDK="${BASEDIR}/SDKs/XRSimulator.sdk"
|
||||
|
||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK}"
|
||||
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=aarch64-apple-darwin23 --prefix="$VISIONOS_SIMULATOR_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
build_catalyst() {
|
||||
export BASEDIR="${XCODEDIR}/Platforms/MacOSX.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
@ -272,17 +304,17 @@ build_catalyst() {
|
||||
|
||||
## arm64 catalyst
|
||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||
export CFLAGS="-O2 -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||
export CFLAGS="-Ofast -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||
export LDFLAGS="-arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
./configure --host=arm-apple-ios --prefix="$CATALYST_ARM64_PREFIX" \
|
||||
./configure --host=aarch64-apple-ios --prefix="$CATALYST_ARM64_PREFIX" \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
fi
|
||||
|
||||
## x86_64 catalyst
|
||||
export CFLAGS="-O2 -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||
export CFLAGS="-Ofast -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||
export LDFLAGS="-arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||
|
||||
make distclean >/dev/null 2>&1
|
||||
@ -301,6 +333,8 @@ echo "Building for watchOS..."
|
||||
build_watchos >"$LOG_FILE" 2>&1 || exit 1
|
||||
echo "Building for tvOS..."
|
||||
build_tvos >"$LOG_FILE" 2>&1 || exit 1
|
||||
echo "Building for visionOS..."
|
||||
build_visionos >"$LOG_FILE" 2>&1 || exit 1
|
||||
echo "Building for Catalyst..."
|
||||
build_catalyst >"$LOG_FILE" 2>&1 || exit 1
|
||||
|
||||
@ -311,7 +345,9 @@ if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
||||
build_watchos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
||||
echo "Building for the tvOS simulator..."
|
||||
build_tvos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
||||
else
|
||||
echo "Building for the visionOS simulator..."
|
||||
build_visionos_simulator >"$LOG_FILE" 2>&1 || exit 1
|
||||
else
|
||||
echo "[Skipping the simulators]"
|
||||
fi
|
||||
|
||||
@ -365,13 +401,23 @@ done
|
||||
echo "Bundling tvOS targets..."
|
||||
|
||||
mkdir -p "${PREFIX}/tvos/lib"
|
||||
cp -a "${TVOS64_PREFIX}/include" "${PREFIX}/tvos/"
|
||||
cp -a "${TVOS_PREFIX}/include" "${PREFIX}/tvos/"
|
||||
for ext in a dylib; do
|
||||
lipo -create \
|
||||
"$TVOS64_PREFIX/lib/libsodium.${ext}" \
|
||||
"$TVOS_PREFIX/lib/libsodium.${ext}" \
|
||||
-output "$PREFIX/tvos/lib/libsodium.${ext}"
|
||||
done
|
||||
|
||||
echo "Bundling visionOS targets..."
|
||||
|
||||
mkdir -p "${PREFIX}/visionos/lib"
|
||||
cp -a "${VISIONOS_PREFIX}/include" "${PREFIX}/visionos/"
|
||||
for ext in a dylib; do
|
||||
lipo -create \
|
||||
"$VISIONOS_PREFIX/lib/libsodium.${ext}" \
|
||||
-output "$PREFIX/visionos/lib/libsodium.${ext}"
|
||||
done
|
||||
|
||||
echo "Bundling Catalyst targets..."
|
||||
|
||||
mkdir -p "${PREFIX}/catalyst/lib"
|
||||
@ -447,6 +493,18 @@ if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
||||
-output "${PREFIX}/tvos-simulators/lib/libsodium.${ext}" || exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Bundling visionOS simulators..."
|
||||
|
||||
mkdir -p "${PREFIX}/visionos-simulators/lib"
|
||||
cp -a "${VISIONOS_SIMULATOR_PREFIX}/include" "${PREFIX}/visionos-simulators/"
|
||||
for ext in a dylib; do
|
||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||
lipo -create \
|
||||
"${VISIONOS_SIMULATOR_PREFIX}/lib/libsodium.${ext}" \
|
||||
-output "${PREFIX}/visionos-simulators/lib/libsodium.${ext}" || exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Creating Clibsodium.xcframework..."
|
||||
@ -454,12 +512,12 @@ echo "Creating Clibsodium.xcframework..."
|
||||
rm -rf "${PREFIX}/Clibsodium.xcframework"
|
||||
|
||||
XCFRAMEWORK_ARGS=""
|
||||
for f in macos ios watchos tvos catalyst; do
|
||||
for f in macos ios watchos tvos visionos catalyst; do
|
||||
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a"
|
||||
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include"
|
||||
done
|
||||
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
|
||||
for f in ios-simulators watchos-simulators tvos-simulators; do
|
||||
for f in ios-simulators watchos-simulators tvos-simulators visionos-simulators; do
|
||||
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a"
|
||||
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include"
|
||||
done
|
||||
|
45
deps/libsodium/dist-build/emscripten-symbols.def
vendored
45
deps/libsodium/dist-build/emscripten-symbols.def
vendored
@ -1,3 +1,23 @@
|
||||
_crypto_aead_aegis128l_abytes 0 1
|
||||
_crypto_aead_aegis128l_decrypt 0 1
|
||||
_crypto_aead_aegis128l_decrypt_detached 0 1
|
||||
_crypto_aead_aegis128l_encrypt 0 1
|
||||
_crypto_aead_aegis128l_encrypt_detached 0 1
|
||||
_crypto_aead_aegis128l_keybytes 0 1
|
||||
_crypto_aead_aegis128l_keygen 0 1
|
||||
_crypto_aead_aegis128l_messagebytes_max 0 1
|
||||
_crypto_aead_aegis128l_npubbytes 0 1
|
||||
_crypto_aead_aegis128l_nsecbytes 0 1
|
||||
_crypto_aead_aegis256_abytes 0 1
|
||||
_crypto_aead_aegis256_decrypt 0 1
|
||||
_crypto_aead_aegis256_decrypt_detached 0 1
|
||||
_crypto_aead_aegis256_encrypt 0 1
|
||||
_crypto_aead_aegis256_encrypt_detached 0 1
|
||||
_crypto_aead_aegis256_keybytes 0 1
|
||||
_crypto_aead_aegis256_keygen 0 1
|
||||
_crypto_aead_aegis256_messagebytes_max 0 1
|
||||
_crypto_aead_aegis256_npubbytes 0 1
|
||||
_crypto_aead_aegis256_nsecbytes 0 1
|
||||
_crypto_aead_aes256gcm_abytes 0 0
|
||||
_crypto_aead_aes256gcm_beforenm 0 0
|
||||
_crypto_aead_aes256gcm_decrypt 0 0
|
||||
@ -145,7 +165,7 @@ _crypto_box_seedbytes 1 1
|
||||
_crypto_box_zerobytes 0 1
|
||||
_crypto_core_ed25519_add 0 1
|
||||
_crypto_core_ed25519_bytes 0 1
|
||||
_crypto_core_ed25519_from_hash 0 1
|
||||
_crypto_core_ed25519_from_hash 0 0
|
||||
_crypto_core_ed25519_from_uniform 0 1
|
||||
_crypto_core_ed25519_hashbytes 0 1
|
||||
_crypto_core_ed25519_is_valid_point 0 1
|
||||
@ -154,6 +174,7 @@ _crypto_core_ed25519_random 0 1
|
||||
_crypto_core_ed25519_scalar_add 0 1
|
||||
_crypto_core_ed25519_scalar_complement 0 1
|
||||
_crypto_core_ed25519_scalar_invert 0 1
|
||||
_crypto_core_ed25519_scalar_is_canonical 0 1
|
||||
_crypto_core_ed25519_scalar_mul 0 1
|
||||
_crypto_core_ed25519_scalar_negate 0 1
|
||||
_crypto_core_ed25519_scalar_random 0 1
|
||||
@ -182,6 +203,7 @@ _crypto_core_ristretto255_random 0 1
|
||||
_crypto_core_ristretto255_scalar_add 0 1
|
||||
_crypto_core_ristretto255_scalar_complement 0 1
|
||||
_crypto_core_ristretto255_scalar_invert 0 1
|
||||
_crypto_core_ristretto255_scalar_is_canonical 0 1
|
||||
_crypto_core_ristretto255_scalar_mul 0 1
|
||||
_crypto_core_ristretto255_scalar_negate 0 1
|
||||
_crypto_core_ristretto255_scalar_random 0 1
|
||||
@ -258,6 +280,26 @@ _crypto_kdf_bytes_max 1 1
|
||||
_crypto_kdf_bytes_min 1 1
|
||||
_crypto_kdf_contextbytes 1 1
|
||||
_crypto_kdf_derive_from_key 1 1
|
||||
_crypto_kdf_hkdf_sha256_bytes_max 1 1
|
||||
_crypto_kdf_hkdf_sha256_bytes_min 1 1
|
||||
_crypto_kdf_hkdf_sha256_expand 1 1
|
||||
_crypto_kdf_hkdf_sha256_extract 1 1
|
||||
_crypto_kdf_hkdf_sha256_extract_final 1 1
|
||||
_crypto_kdf_hkdf_sha256_extract_init 1 1
|
||||
_crypto_kdf_hkdf_sha256_statebytes 1 1
|
||||
_crypto_kdf_hkdf_sha256_extract_update 1 1
|
||||
_crypto_kdf_hkdf_sha256_keybytes 1 1
|
||||
_crypto_kdf_hkdf_sha256_keygen 1 1
|
||||
_crypto_kdf_hkdf_sha512_bytes_max 1 1
|
||||
_crypto_kdf_hkdf_sha512_bytes_min 1 1
|
||||
_crypto_kdf_hkdf_sha512_expand 1 1
|
||||
_crypto_kdf_hkdf_sha512_extract 1 1
|
||||
_crypto_kdf_hkdf_sha512_extract_final 1 1
|
||||
_crypto_kdf_hkdf_sha512_extract_init 1 1
|
||||
_crypto_kdf_hkdf_sha512_statebytes 1 1
|
||||
_crypto_kdf_hkdf_sha512_extract_update 1 1
|
||||
_crypto_kdf_hkdf_sha512_keybytes 1 1
|
||||
_crypto_kdf_hkdf_sha512_keygen 1 1
|
||||
_crypto_kdf_keybytes 1 1
|
||||
_crypto_kdf_keygen 1 1
|
||||
_crypto_kdf_primitive 0 1
|
||||
@ -591,6 +633,7 @@ _sodium_mprotect_readwrite 0 0
|
||||
_sodium_munlock 0 0
|
||||
_sodium_pad 1 1
|
||||
_sodium_runtime_has_aesni 0 0
|
||||
_sodium_runtime_has_armcrypto 0 0
|
||||
_sodium_runtime_has_avx 0 0
|
||||
_sodium_runtime_has_avx2 0 0
|
||||
_sodium_runtime_has_avx512f 0 0
|
||||
|
4
deps/libsodium/dist-build/emscripten.sh
vendored
4
deps/libsodium/dist-build/emscripten.sh
vendored
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
LIBSODIUM=${LIBSODIUM:-/tmp/sodium/lib/libsodium.23.dylib}
|
||||
LIBSODIUM=${LIBSODIUM:-/tmp/sodium/lib/libsodium.26.dylib}
|
||||
|
||||
symbols() {
|
||||
{
|
||||
@ -17,7 +17,7 @@ symbols() {
|
||||
else
|
||||
eval "defined_${symbol}=no"
|
||||
fi
|
||||
done < emscripten-symbols.def
|
||||
done <emscripten-symbols.def
|
||||
|
||||
/usr/bin/nm "$LIBSODIUM" |
|
||||
fgrep ' T _' |
|
||||
@ -34,11 +34,11 @@ symbols() {
|
||||
fi
|
||||
done
|
||||
}
|
||||
} | \
|
||||
sort | \
|
||||
} |
|
||||
sort |
|
||||
{
|
||||
out='"_malloc","_free"'
|
||||
while read symbol ; do
|
||||
while read symbol; do
|
||||
if [ ! -z "$out" ]; then
|
||||
out="${out},"
|
||||
fi
|
||||
@ -49,11 +49,11 @@ symbols() {
|
||||
}
|
||||
|
||||
out=$(symbols standard)
|
||||
sed s/EXPORTED_FUNCTIONS_STANDARD=\'.*\'/EXPORTED_FUNCTIONS_STANDARD=\'${out}\'/ < emscripten.sh > emscripten.sh.tmp && \
|
||||
sed s/EXPORTED_FUNCTIONS_STANDARD=\'.*\'/EXPORTED_FUNCTIONS_STANDARD=\'${out}\'/ <emscripten.sh >emscripten.sh.tmp &&
|
||||
mv -f emscripten.sh.tmp emscripten.sh
|
||||
|
||||
out=$(symbols sumo)
|
||||
sed s/EXPORTED_FUNCTIONS_SUMO=\'.*\'/EXPORTED_FUNCTIONS_SUMO=\'${out}\'/ < emscripten.sh > emscripten.sh.tmp && \
|
||||
sed s/EXPORTED_FUNCTIONS_SUMO=\'.*\'/EXPORTED_FUNCTIONS_SUMO=\'${out}\'/ <emscripten.sh >emscripten.sh.tmp &&
|
||||
mv -f emscripten.sh.tmp emscripten.sh
|
||||
|
||||
chmod +x emscripten.sh
|
||||
|
135
deps/libsodium/dist-build/ios.sh
vendored
135
deps/libsodium/dist-build/ios.sh
vendored
@ -1,135 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Step 1.
|
||||
# Configure for base system so simulator is covered
|
||||
#
|
||||
# Step 2.
|
||||
# Make for iOS and iOS simulator
|
||||
#
|
||||
# Step 3.
|
||||
# Merge libs into final version for xcode import
|
||||
|
||||
export PREFIX="$(pwd)/libsodium-ios"
|
||||
export IOS32_PREFIX="$PREFIX/tmp/ios32"
|
||||
export IOS32s_PREFIX="$PREFIX/tmp/ios32s"
|
||||
export IOS64_PREFIX="$PREFIX/tmp/ios64"
|
||||
export SIMULATOR32_PREFIX="$PREFIX/tmp/simulator32"
|
||||
export SIMULATOR64_PREFIX="$PREFIX/tmp/simulator64"
|
||||
export XCODEDIR=$(xcode-select -p)
|
||||
|
||||
export IOS_SIMULATOR_VERSION_MIN=${IOS_SIMULATOR_VERSION_MIN-"6.0.0"}
|
||||
export IOS_VERSION_MIN=${IOS_VERSION_MIN-"6.0.0"}
|
||||
|
||||
echo
|
||||
echo "Warnings related to headers being present but not usable are due to functions"
|
||||
echo "that didn't exist in the specified minimum iOS version level."
|
||||
echo "They can be safely ignored."
|
||||
echo
|
||||
|
||||
mkdir -p $SIMULATOR32_PREFIX $SIMULATOR64_PREFIX $IOS32_PREFIX $IOS32s_PREFIX $IOS64_PREFIX || exit 1
|
||||
|
||||
# Build for the simulator
|
||||
export BASEDIR="${XCODEDIR}/Platforms/iPhoneSimulator.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
export SDK="${BASEDIR}/SDKs/iPhoneSimulator.sdk"
|
||||
|
||||
## i386 simulator
|
||||
export CFLAGS="-O2 -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
if [ -z "$LIBSODIUM_FULL_BUILD" ]; then
|
||||
export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal"
|
||||
else
|
||||
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
|
||||
fi
|
||||
|
||||
./configure --host=i686-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$SIMULATOR32_PREFIX" || exit 1
|
||||
|
||||
|
||||
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||
PROCESSORS=${NPROCESSORS:-3}
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## x86_64 simulator
|
||||
export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=x86_64-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$SIMULATOR64_PREFIX"
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
# Build for iOS
|
||||
export BASEDIR="${XCODEDIR}/Platforms/iPhoneOS.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk"
|
||||
|
||||
## 32-bit iOS
|
||||
export CFLAGS="-fembed-bitcode -O2 -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export LDFLAGS="-fembed-bitcode -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=arm-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$IOS32_PREFIX" || exit 1
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## 32-bit armv7s iOS
|
||||
export CFLAGS="-fembed-bitcode -O2 -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export LDFLAGS="-fembed-bitcode -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=arm-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$IOS32s_PREFIX" || exit 1
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## 64-bit iOS
|
||||
export CFLAGS="-fembed-bitcode -O2 -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
export LDFLAGS="-fembed-bitcode -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=arm-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$IOS64_PREFIX" || exit 1
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
# Create universal binary and include folder
|
||||
rm -fr -- "$PREFIX/include" "$PREFIX/libsodium.a" 2> /dev/null
|
||||
mkdir -p -- "$PREFIX/lib"
|
||||
lipo -create \
|
||||
"$SIMULATOR32_PREFIX/lib/libsodium.a" \
|
||||
"$SIMULATOR64_PREFIX/lib/libsodium.a" \
|
||||
"$IOS32_PREFIX/lib/libsodium.a" \
|
||||
"$IOS32s_PREFIX/lib/libsodium.a" \
|
||||
"$IOS64_PREFIX/lib/libsodium.a" \
|
||||
-output "$PREFIX/lib/libsodium.a"
|
||||
mv -f -- "$IOS32_PREFIX/include" "$PREFIX/"
|
||||
|
||||
echo
|
||||
echo "libsodium has been installed into $PREFIX"
|
||||
echo
|
||||
file -- "$PREFIX/lib/libsodium.a"
|
||||
|
||||
# Cleanup
|
||||
rm -rf -- "$PREFIX/tmp"
|
||||
make distclean > /dev/null
|
@ -14,7 +14,7 @@ PROCESSORS=${NPROCESSORS:-3}
|
||||
|
||||
mkdir -p $PREFIX || exit 1
|
||||
|
||||
export CFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN} -O2 -g"
|
||||
export CFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN} -Ofast"
|
||||
export LDFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||
|
||||
make distclean >/dev/null
|
12
deps/libsodium/dist-build/msys2-win32.sh
vendored
12
deps/libsodium/dist-build/msys2-win32.sh
vendored
@ -3,7 +3,7 @@
|
||||
export CFLAGS="-Ofast -fomit-frame-pointer -m32 -march=pentium3 -mtune=westmere"
|
||||
export PREFIX="$(pwd)/libsodium-win32"
|
||||
|
||||
if (i686-w64-mingw32-gcc --version > /dev/null 2>&1) then
|
||||
if (i686-w64-mingw32-gcc --version >/dev/null 2>&1); then
|
||||
echo MinGW found
|
||||
else
|
||||
echo Please install mingw-w64-i686-gcc >&2
|
||||
@ -11,8 +11,8 @@ else
|
||||
fi
|
||||
|
||||
./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" \
|
||||
--host=i686-w64-mingw32 && \
|
||||
make clean && \
|
||||
make && \
|
||||
make check && \
|
||||
make install
|
||||
--host=i686-w64-mingw32 &&
|
||||
make clean &&
|
||||
make &&
|
||||
make check &&
|
||||
make install
|
||||
|
12
deps/libsodium/dist-build/msys2-win64.sh
vendored
12
deps/libsodium/dist-build/msys2-win64.sh
vendored
@ -3,7 +3,7 @@
|
||||
export CFLAGS="-Ofast -fomit-frame-pointer -m64 -mtune=westmere"
|
||||
export PREFIX="$(pwd)/libsodium-win64"
|
||||
|
||||
if (x86_64-w64-mingw32-gcc --version > /dev/null 2>&1) then
|
||||
if (x86_64-w64-mingw32-gcc --version >/dev/null 2>&1); then
|
||||
echo MinGW found
|
||||
else
|
||||
echo Please install mingw-w64-x86_64-gcc >&2
|
||||
@ -11,8 +11,8 @@ else
|
||||
fi
|
||||
|
||||
./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" \
|
||||
--host=x86_64-w64-mingw32 && \
|
||||
make clean && \
|
||||
make && \
|
||||
make check && \
|
||||
make install
|
||||
--host=x86_64-w64-mingw32 &&
|
||||
make clean &&
|
||||
make &&
|
||||
make check &&
|
||||
make install
|
||||
|
114
deps/libsodium/dist-build/watchos.sh
vendored
114
deps/libsodium/dist-build/watchos.sh
vendored
@ -1,114 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Step 1.
|
||||
# Configure for base system so simulator is covered
|
||||
#
|
||||
# Step 2.
|
||||
# Make for watchOS and watchOS simulator
|
||||
#
|
||||
# Step 3.
|
||||
# Merge libs into final version for xcode import
|
||||
|
||||
export PREFIX="$(pwd)/libsodium-watchos"
|
||||
export WATCHOS32_PREFIX="$PREFIX/tmp/watchos32"
|
||||
export WATCHOS64_32_PREFIX="$PREFIX/tmp/watchos64_32"
|
||||
export SIMULATOR32_PREFIX="$PREFIX/tmp/simulator32"
|
||||
export SIMULATOR64_PREFIX="$PREFIX/tmp/simulator64"
|
||||
export XCODEDIR=$(xcode-select -p)
|
||||
|
||||
export WATCHOS_SIMULATOR_VERSION_MIN=${WATCHOS_SIMULATOR_VERSION_MIN-"4.0.0"}
|
||||
export WATCHOS_VERSION_MIN=${WATCHOS_VERSION_MIN-"4.0.0"}
|
||||
|
||||
mkdir -p $SIMULATOR32_PREFIX $SIMULATOR64_PREFIX $WATCHOS32_PREFIX $WATCHOS64_32_PREFIX || exit 1
|
||||
|
||||
# Build for the simulator
|
||||
export BASEDIR="${XCODEDIR}/Platforms/WatchSimulator.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
export SDK="${BASEDIR}/SDKs/WatchSimulator.sdk"
|
||||
|
||||
## i386 simulator
|
||||
export CFLAGS="-O2 -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
if [ -z "$LIBSODIUM_FULL_BUILD" ]; then
|
||||
export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal"
|
||||
else
|
||||
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
|
||||
fi
|
||||
|
||||
./configure --host=i686-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$SIMULATOR32_PREFIX" || exit 1
|
||||
|
||||
|
||||
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||
PROCESSORS=${NPROCESSORS:-3}
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## x86_64 simulator
|
||||
export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=x86_64-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$SIMULATOR64_PREFIX"
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
# Build for watchOS
|
||||
export BASEDIR="${XCODEDIR}/Platforms/WatchOS.platform/Developer"
|
||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||
export SDK="${BASEDIR}/SDKs/WatchOS.sdk"
|
||||
|
||||
## 32-bit watchOS
|
||||
export CFLAGS="-fembed-bitcode -O2 -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
export LDFLAGS="-fembed-bitcode -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=arm-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$WATCHOS32_PREFIX" || exit 1
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
## 64-bit arm64_32 watchOS
|
||||
export CFLAGS="-fembed-bitcode -O2 -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
export LDFLAGS="-fembed-bitcode -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||
|
||||
make distclean > /dev/null
|
||||
|
||||
./configure --host=arm-apple-darwin10 \
|
||||
--disable-shared \
|
||||
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
||||
--prefix="$WATCHOS64_32_PREFIX" || exit 1
|
||||
|
||||
make -j${PROCESSORS} install || exit 1
|
||||
|
||||
# Create universal binary and include folder
|
||||
rm -fr -- "$PREFIX/include" "$PREFIX/libsodium.a" 2> /dev/null
|
||||
mkdir -p -- "$PREFIX/lib"
|
||||
lipo -create \
|
||||
"$SIMULATOR32_PREFIX/lib/libsodium.a" \
|
||||
"$SIMULATOR64_PREFIX/lib/libsodium.a" \
|
||||
"$WATCHOS32_PREFIX/lib/libsodium.a" \
|
||||
"$WATCHOS64_32_PREFIX/lib/libsodium.a" \
|
||||
-output "$PREFIX/lib/libsodium.a"
|
||||
mv -f -- "$WATCHOS32_PREFIX/include" "$PREFIX/"
|
||||
|
||||
echo
|
||||
echo "libsodium has been installed into $PREFIX"
|
||||
echo
|
||||
file -- "$PREFIX/lib/libsodium.a"
|
||||
|
||||
# Cleanup
|
||||
rm -rf -- "$PREFIX/tmp"
|
||||
make distclean > /dev/null
|
Reference in New Issue
Block a user