mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-30 14:57:53 +02:00
4647310322
Based on Swiftgram 12.5 (Telegram iOS 12.5). All GLEGram features ported and organized in GLEGram/ folder. Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass, Font Replacement, Fake Profile, Chat Export, Plugin System, and more. See CHANGELOG_12.5.md for full details.
74 lines
2.0 KiB
Bash
Executable File
74 lines
2.0 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
set -ex
|
|
|
|
ARCH="$1"
|
|
BUILD_DIR=$(echo "$(cd "$(dirname "$2")"; pwd -P)/$(basename "$2")")
|
|
SOURCE_CODE_ARCHIVE="$3"
|
|
|
|
MINIOSVERSION="13.0"
|
|
|
|
OPT_CFLAGS="-Os -g"
|
|
OPT_LDFLAGS=""
|
|
OPT_CONFIG_ARGS=""
|
|
|
|
OUTPUTDIR="$BUILD_DIR/Public"
|
|
|
|
# where we will keep our sources and build from.
|
|
SRCDIR="${BUILD_DIR}/src"
|
|
mkdir -p $SRCDIR
|
|
# where we will store intermediary builds
|
|
INTERDIR="${BUILD_DIR}/built"
|
|
mkdir -p $INTERDIR
|
|
|
|
########################################
|
|
|
|
tar zxf "$BUILD_DIR/$SOURCE_CODE_ARCHIVE" -C $SRCDIR
|
|
cd "${SRCDIR}/opus-"*
|
|
|
|
if [ "${ARCH}" = "linux_x86_64" ] || [ "${ARCH}" = "linux_arm64" ]; then
|
|
mkdir -p "${INTERDIR}"
|
|
|
|
# Keep it simple and portable for container builds.
|
|
./configure \
|
|
--disable-shared \
|
|
--enable-static \
|
|
--with-pic \
|
|
--disable-extra-programs \
|
|
--disable-doc \
|
|
--disable-asm \
|
|
--enable-intrinsics \
|
|
${OPT_CONFIG_ARGS} \
|
|
--prefix="${INTERDIR}" \
|
|
CFLAGS="$CFLAGS ${OPT_CFLAGS} -fPIC" \
|
|
LDFLAGS="$LDFLAGS ${OPT_LDFLAGS}"
|
|
|
|
make -j"$(getconf _NPROCESSORS_ONLN || echo 4)"
|
|
make install
|
|
exit 0
|
|
elif [ "${ARCH}" == "x86_64" ]; then
|
|
PLATFORM="iphonesimulator"
|
|
EXTRA_CFLAGS="-arch ${ARCH}"
|
|
EXTRA_CONFIG="--host=x86_64-apple-darwin"
|
|
elif [ "${ARCH}" == "sim_arm64" ]; then
|
|
PLATFORM="iphonesimulator"
|
|
EXTRA_CFLAGS="-arch arm64 --target=arm64-apple-ios$MINIOSVERSION-simulator"
|
|
EXTRA_CONFIG="--host=arm-apple-darwin20"
|
|
else
|
|
PLATFORM="iphoneos"
|
|
EXTRA_CFLAGS="-arch ${ARCH}"
|
|
EXTRA_CONFIG="--host=arm-apple-darwin"
|
|
fi
|
|
|
|
SDK_PATH="$(xcrun --sdk $PLATFORM --show-sdk-path 2>/dev/null)"
|
|
|
|
mkdir -p "${INTERDIR}"
|
|
|
|
./configure --disable-shared --enable-static --with-pic --disable-extra-programs --disable-doc --disable-asm --enable-intrinsics ${EXTRA_CONFIG} \
|
|
--prefix="${INTERDIR}" \
|
|
LDFLAGS="$LDFLAGS ${OPT_LDFLAGS} -fPIE -miphoneos-version-min=${MINIOSVERSION} -L${OUTPUTDIR}/lib" \
|
|
CFLAGS="$CFLAGS ${EXTRA_CFLAGS} ${OPT_CFLAGS} -fPIE -miphoneos-version-min=${MINIOSVERSION} -I${OUTPUTDIR}/include -isysroot ${SDK_PATH}" \
|
|
|
|
make -j
|
|
make install
|