From 20a13d595e51a32798202aeeaf3c4cb15cd30f9c Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Mon, 6 Nov 2023 18:06:29 +0000 Subject: [PATCH 1/5] move autogen command before libpng check --- sbin/prepareWorkspace.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index a7af847b5..0d95296c3 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -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 + + 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 From 514b577751327fca730ad831d362047c2a1100f4 Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Mon, 6 Nov 2023 18:13:56 +0000 Subject: [PATCH 2/5] debug --- sbin/prepareWorkspace.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index 0d95296c3..82bfc2d17 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -491,6 +491,7 @@ checkingAndDownloadingFreeType() { # We get the files we need at $WORKING_DIR/installedfreetype # shellcheck disable=SC2046 + echo "pngArg value: ${pngArg}" 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" From 7358c4277942e510f0b2a36ab615cce57d73ddcc Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Tue, 7 Nov 2023 12:05:20 +0000 Subject: [PATCH 3/5] remove debug --- sbin/prepareWorkspace.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index 82bfc2d17..0d95296c3 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -491,7 +491,6 @@ checkingAndDownloadingFreeType() { # We get the files we need at $WORKING_DIR/installedfreetype # shellcheck disable=SC2046 - echo "pngArg value: ${pngArg}" 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" From 9f9efbaef9b1645bc5935daec8120fc0dc5a3a20 Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Wed, 8 Nov 2023 12:46:38 +0000 Subject: [PATCH 4/5] exit if autogen fails --- sbin/prepareWorkspace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index 0d95296c3..a5887d8f9 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -482,7 +482,7 @@ checkingAndDownloadingFreeType() { freetypeEnv="export CC=\"gcc -m32\"" fi - eval "${freetypeEnv}" && bash ./autogen.sh + eval "${freetypeEnv}" && bash ./autogen.sh || exit local pngArg="" if ./configure --help | grep "with-png"; then From b058735b9de63caad2ea01c1359008602b41a14e Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Wed, 8 Nov 2023 13:35:19 +0000 Subject: [PATCH 5/5] exit code 1 --- sbin/prepareWorkspace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index a5887d8f9..9f4ab736c 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -482,7 +482,7 @@ checkingAndDownloadingFreeType() { freetypeEnv="export CC=\"gcc -m32\"" fi - eval "${freetypeEnv}" && bash ./autogen.sh || exit + eval "${freetypeEnv}" && bash ./autogen.sh || exit 1 local pngArg="" if ./configure --help | grep "with-png"; then