|
|
|
@ -5,9 +5,9 @@ fi
|
|
|
|
|
|
|
|
|
|
VERSION=$(sh "${SCRIPT_DIR}/get-pEp-version.sh" "SEQUOIA_VERSION")
|
|
|
|
|
|
|
|
|
|
SEQUOIA_DIR="${TMP_DIR}/sequoia"
|
|
|
|
|
SEQUOIA_DIR="${TMP_DIR}/pEpEngineSequoiaBackend"
|
|
|
|
|
if [ ! -d "${SEQUOIA_DIR}" ]; then
|
|
|
|
|
git clone -b ${VERSION} --depth 1 https://gitlab.com/sequoia-pgp/sequoia.git
|
|
|
|
|
git clone -b ${VERSION} --depth 1 https://gitea.pep.foundation/pEp.foundation/pEpEngineSequoiaBackend.git
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
PKG_CONFIG_PATH=$OUTPUT_DIR/${ARCH}/lib/pkgconfig
|
|
|
|
@ -26,7 +26,7 @@ build_ios()
|
|
|
|
|
SDK="$SDK" \
|
|
|
|
|
SDK_PATH="$SDK_PATH" \
|
|
|
|
|
CFLAGS="$CFLAGS" \
|
|
|
|
|
cargo build --package sequoia-openpgp-ffi --target ${TARGET} --release
|
|
|
|
|
cargo build --target ${TARGET} --release
|
|
|
|
|
# copy artefacts
|
|
|
|
|
cp "${SEQUOIA_DIR}/target/${TARGET}/release"/*.a "${CURRENT_LIB_DIR}/lib"
|
|
|
|
|
}
|
|
|
|
@ -35,15 +35,13 @@ build_macos()
|
|
|
|
|
{
|
|
|
|
|
SDKROOT=$(xcrun -sdk ${SDK} --show-sdk-path) \
|
|
|
|
|
# JSONAdapter needlessly requires libsequoia_ffi.a
|
|
|
|
|
PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=full PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig RUSTFLAGS="-L ${PREFIX}/lib" cargo build --package sequoia-openpgp-ffi --target ${HOST} --release
|
|
|
|
|
PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=full PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig RUSTFLAGS="-L ${PREFIX}/lib" cargo build --target ${HOST} --release
|
|
|
|
|
|
|
|
|
|
cp "${SEQUOIA_DIR}/target/${HOST}/release"/*.a "${CURRENT_LIB_DIR}/lib"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pushd ${SEQUOIA_DIR}
|
|
|
|
|
rm -rf rust-toolchain
|
|
|
|
|
cargo update -p nettle-sys --precise 2.0.8
|
|
|
|
|
if [[ $TARGET == *"ios"* ]]; then
|
|
|
|
|
build_ios
|
|
|
|
|
else
|
|
|
|
@ -51,6 +49,4 @@ pushd ${SEQUOIA_DIR}
|
|
|
|
|
fi
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# copy artefacts
|
|
|
|
|
cp "${SEQUOIA_DIR}/target/${TARGET}/release"/*.a "${CURRENT_LIB_DIR}/lib"
|
|
|
|
|
cp -R "${SEQUOIA_DIR}/openpgp-ffi/include"/* "${CURRENT_LIB_DIR}/include/"
|
|
|
|
|
# no headers to copy for this backend
|
|
|
|
|