diff --git a/scripts/common-functions.sh b/scripts/common-functions.sh index 045a830..97e50b2 100755 --- a/scripts/common-functions.sh +++ b/scripts/common-functions.sh @@ -17,7 +17,7 @@ function downloadTarArchive() { echo "Ensuring sources of ${LIBRARY_NAME} in ${LIBRARY_SOURCES}" if [[ ! -d "$LIBRARY_SOURCES" ]]; then - curl -O ${DOWNLOAD_URL} + curl -L -O ${DOWNLOAD_URL} EXTRACTION_DIR="." if [ "$NEED_EXTRA_DIRECTORY" = true ] ; then diff --git a/scripts/libfreetype/build.sh b/scripts/libfreetype/build.sh new file mode 100755 index 0000000..b8bdf3c --- /dev/null +++ b/scripts/libfreetype/build.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +./configure \ + --prefix=${INSTALL_DIR} \ + --host=${TARGET} \ + --with-sysroot=${SYSROOT_PATH} \ + --disable-shared \ + --enable-static \ + --with-pic \ + --with-zlib \ + --without-bzip2 \ + --without-png \ + --without-harfbuzz \ + --without-brotli \ + --without-old-mac-fonts \ + --without-fsspec \ + --without-fsref \ + --without-quickdraw-toolbox \ + --without-quickdraw-carbon \ + --without-ats \ + CC=${FAM_CC} \ + AR=${FAM_AR} \ + RANLIB=${FAM_RANLIB} || exit 1 + +export FFMPEG_EXTRA_LD_FLAGS="${FFMPEG_EXTRA_LD_FLAGS} -lz" + +${MAKE_EXECUTABLE} clean +${MAKE_EXECUTABLE} -j${HOST_NPROC} +${MAKE_EXECUTABLE} install diff --git a/scripts/libfreetype/download.sh b/scripts/libfreetype/download.sh new file mode 100755 index 0000000..5184c6f --- /dev/null +++ b/scripts/libfreetype/download.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +source ${SCRIPTS_DIR}/common-functions.sh + +FREETYPE_VERSION=2.10.2 + +downloadTarArchive \ + "libfreetype" \ + "https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz" \ diff --git a/scripts/parse-arguments.sh b/scripts/parse-arguments.sh index 0404bef..83265f5 100755 --- a/scripts/parse-arguments.sh +++ b/scripts/parse-arguments.sh @@ -22,6 +22,7 @@ ALL_SUPPORTED_LIBRARIES=( "libtwolame" "libspeex" "libvpx" + "libfreetype" ) for argument in "$@"; do @@ -102,6 +103,9 @@ for argument in "$@"; do --enable-libvpx|-vpx) EXTERNAL_LIBRARIES+=( "libvpx" ) ;; + --enable-libfreetype|-freetype) + EXTERNAL_LIBRARIES+=( "libfreetype" ) + ;; --enable-all-external|-all) EXTERNAL_LIBRARIES=${ALL_SUPPORTED_LIBRARIES[@]} ;;