Skip to content

Commit

Permalink
Freetype: run bash autogen.sh before any ./configure commands (#3523)
Browse files Browse the repository at this point in the history
* move autogen command before libpng check

* debug

* remove debug

* exit if autogen fails

* exit code 1
  • Loading branch information
Haroon-Khel authored Nov 8, 2023
1 parent 94b2888 commit 54ce302
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions sbin/prepareWorkspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -477,19 +477,21 @@ checkingAndDownloadingFreeType() {
return
fi

local pngArg=""
if ./configure --help | grep "with-png"; then
pngArg="--with-png=no"
fi

local freetypeEnv=""
if [[ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "i686" ]] || [[ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "i386" ]]; then
freetypeEnv="export CC=\"gcc -m32\""
fi

eval "${freetypeEnv}" && bash ./autogen.sh || exit 1

local pngArg=""
if ./configure --help | grep "with-png"; then
pngArg="--with-png=no"
fi

# We get the files we need at $WORKING_DIR/installedfreetype
# shellcheck disable=SC2046
if ! (eval "${freetypeEnv}" && bash ./autogen.sh && bash ./configure --prefix="${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}"/installedfreetype "${pngArg}" "${BUILD_CONFIG[FREETYPE_FONT_BUILD_TYPE_PARAM]}" && ${BUILD_CONFIG[MAKE_COMMAND_NAME]} all && ${BUILD_CONFIG[MAKE_COMMAND_NAME]} install); then
if ! (bash ./configure --prefix="${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}"/installedfreetype "${pngArg}" "${BUILD_CONFIG[FREETYPE_FONT_BUILD_TYPE_PARAM]}" && ${BUILD_CONFIG[MAKE_COMMAND_NAME]} all && ${BUILD_CONFIG[MAKE_COMMAND_NAME]} install); then
# shellcheck disable=SC2154
echo "Failed to configure and build libfreetype, exiting"
exit
Expand Down

0 comments on commit 54ce302

Please sign in to comment.