diff options
author | Manuel Bentele | 2021-11-05 13:15:02 +0100 |
---|---|---|
committer | Manuel Bentele | 2021-11-05 13:15:02 +0100 |
commit | 68c99936d773d68bdb96307453f863d7638ee649 (patch) | |
tree | a1350d829c010fa6af07b9f47d022fcb6bbf0f70 /core/bin | |
parent | [qemu-src] Add missing LZO build dependency (diff) | |
download | mltk-68c99936d773d68bdb96307453f863d7638ee649.tar.gz mltk-68c99936d773d68bdb96307453f863d7638ee649.tar.xz mltk-68c99936d773d68bdb96307453f863d7638ee649.zip |
[pkg-config] Fix invalid space at line end in pkg-config wrapper
Diffstat (limited to 'core/bin')
-rwxr-xr-x | core/bin/pkg-config.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/bin/pkg-config.sh b/core/bin/pkg-config.sh index cd6abc0c..077810ba 100755 --- a/core/bin/pkg-config.sh +++ b/core/bin/pkg-config.sh @@ -26,10 +26,10 @@ function pkg_config_process_dir() { local DIR_NON_SYSROOT="${DIR_WTH_SYSROOT##${PKG_CONFIG_SYSROOT_DIR}}" if pkg_config_non_empty_dir "${DIR_WTH_SYSROOT}"; then - echo -n "${DIR_OPTION}${DIR_WTH_SYSROOT} " + echo -n "${DIR_OPTION}${DIR_WTH_SYSROOT}" else if pkg_config_non_empty_dir "${DIR_NON_SYSROOT}"; then - echo -n "${DIR_OPTION}${DIR_NON_SYSROOT} " + echo -n "${DIR_OPTION}${DIR_NON_SYSROOT}" else [[ "${DIR_WTH_SYSROOT}" == "${DIR_NON_SYSROOT}" ]] && \ echo -n "Directory '${DIR_WTH_SYSROOT}' does not exist!" || \ @@ -44,22 +44,24 @@ function pkg_config_process_dir() { # Return : Patched output of the original pkg-config input. function pkg_config_patch_sysroot() { + local OUTPUT_PATCHED=() + # process all passed parameters for PARAM in "${@}"; do case "${PARAM}" in -I*) - pkg_config_process_dir "-I" "${PARAM##-I}" + OUTPUT_PATCHED+=("$(pkg_config_process_dir "-I" "${PARAM##-I}")") ;; -L*) - pkg_config_process_dir "-L" "${PARAM##-L}" + OUTPUT_PATCHED+=("$(pkg_config_process_dir "-L" "${PARAM##-L}")") ;; *) - echo -n "${PARAM} " + OUTPUT_PATCHED+=("${PARAM}") ;; esac done - echo + echo "${OUTPUT_PATCHED[@]}" } # execute original pkg-config and save output and return code |