From a85885e4e630c837dbb91ae8bbffaa3283a2b1cc Mon Sep 17 00:00:00 2001 From: Javernaut Date: Sun, 26 Jul 2020 16:08:34 +0300 Subject: [PATCH] Initial libfribidi support --- scripts/common-functions.sh | 2 +- scripts/libfribidi/build.sh | 23 +++++++++++++++++++++++ scripts/libfribidi/download.sh | 9 +++++++++ scripts/parse-arguments.sh | 4 ++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100755 scripts/libfribidi/build.sh create mode 100755 scripts/libfribidi/download.sh diff --git a/scripts/common-functions.sh b/scripts/common-functions.sh index 045a830..5867335 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 -LO ${DOWNLOAD_URL} EXTRACTION_DIR="." if [ "$NEED_EXTRA_DIRECTORY" = true ] ; then diff --git a/scripts/libfribidi/build.sh b/scripts/libfribidi/build.sh new file mode 100755 index 0000000..0aaf74f --- /dev/null +++ b/scripts/libfribidi/build.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +./configure \ + --prefix=${INSTALL_DIR} \ + --host=${TARGET} \ + --with-sysroot=${SYSROOT_PATH} \ + --disable-shared \ + --enable-static \ + --disable-dependency-tracking \ + --disable-fast-install \ + --disable-debug \ + --disable-deprecated \ + --with-pic \ + CC=${FAM_CC} \ + AR=${FAM_AR} \ + RANLIB=${FAM_RANLIB} || exit 1 + +${MAKE_EXECUTABLE} clean +# Compiling only the static library. Just 'make' will build an executable and docs as well. +${MAKE_EXECUTABLE} -j${HOST_NPROC} -C lib +${MAKE_EXECUTABLE} install -C lib +# Installing the .pc file +${MAKE_EXECUTABLE} install-data-am diff --git a/scripts/libfribidi/download.sh b/scripts/libfribidi/download.sh new file mode 100755 index 0000000..f64b7d7 --- /dev/null +++ b/scripts/libfribidi/download.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +source ${SCRIPTS_DIR}/common-functions.sh + +FRIBIDI_VERSION=1.0.10 + +downloadTarArchive \ + "libfribidi" \ + "https://github.com/fribidi/fribidi/releases/download/v${FRIBIDI_VERSION}/fribidi-${FRIBIDI_VERSION}.tar.xz" diff --git a/scripts/parse-arguments.sh b/scripts/parse-arguments.sh index 0404bef..9b7d88e 100755 --- a/scripts/parse-arguments.sh +++ b/scripts/parse-arguments.sh @@ -22,6 +22,7 @@ ALL_SUPPORTED_LIBRARIES=( "libtwolame" "libspeex" "libvpx" + "fribidi" ) for argument in "$@"; do @@ -102,6 +103,9 @@ for argument in "$@"; do --enable-libvpx|-vpx) EXTERNAL_LIBRARIES+=( "libvpx" ) ;; + --enable-libfribidi|-fribidi) + EXTERNAL_LIBRARIES+=( "libfribidi" ) + ;; --enable-all-external|-all) EXTERNAL_LIBRARIES=${ALL_SUPPORTED_LIBRARIES[@]} ;;