You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
965 B
Plaintext
31 lines
965 B
Plaintext
NETTLE_VERSION=$(sh "${SCRIPT_DIR}"/get-pEp-version.sh "NETTLE_VERSION")
|
|
NETTLE_NAME="nettle-${NETTLE_VERSION}"
|
|
|
|
OUTPUT_DIR=${SCRIPT_DIR}/build
|
|
|
|
# Exit on errors
|
|
set -e
|
|
|
|
if [ -f "${LIB_DIR}/libnettle.a" ]; then
|
|
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
|
|
exit 0
|
|
fi
|
|
|
|
GMP_DIR="${TMP_DIR}/${NETTLE_NAME}"
|
|
if [ ! -d "${GMP_DIR}" ]; then
|
|
wget -nc https://ftp.gnu.org/gnu/nettle/${NETTLE_NAME}.tar.gz
|
|
tar xvf ${NETTLE_NAME}.tar.gz
|
|
fi
|
|
|
|
export LDFLAGS="-arch ${ARCH}"
|
|
export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
|
|
|
|
pushd ${NETTLE_NAME}
|
|
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig CC_FOR_BUILD="$(whereis gcc)" ./configure --host=${HOST} --prefix=${CURRENT_LIB_DIR} --with-lib-path=${PREFIX}/lib --with-include-path=${PREFIX}/include --disable-assembler --disable-arm-neon --disable-documentation --verbose
|
|
make clean
|
|
make -j4
|
|
make install
|
|
popd
|
|
|
|
rm -rf *.gz
|