From 418f3083f04f2d3a1a095ef1e8f650c1de57e128 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 12 Jun 2023 20:46:57 +0200 Subject: [PATCH] Fix using generated wx-config in CMake builds Since 1c64bd506c (Use grep instead of fgrep and egrep, 2023-05-10) EGREP wasn't defined in CMake build any longer, so finding the correct config script always failed. Fix this by using "grep -E" directly instead of "$EGREP". See #23537. (cherry picked from commit 2b6be286ee10b963bd15b31313fe9bf89de5dbc2) --- wx-config.in | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/wx-config.in b/wx-config.in index e3f7d115bb..4df8571d28 100755 --- a/wx-config.in +++ b/wx-config.in @@ -90,10 +90,6 @@ EOF [ $# -gt 0 ] || usage 1 -# Contentious tools determined by configure. -EGREP="@EGREP@" - - # For the people who know what they want, or think they do: # Divide the valid arguments into functional groups for later examination, # then parse all command line arguments completely, deferring action on @@ -520,11 +516,11 @@ fi # find_eligible_delegates _mask # Outputs all the config files installed which match the # (extended regex) _mask passed as an argument. -find_eligible_delegates() { echo "$installed_configs" | $EGREP "$1" 2> /dev/null; } +find_eligible_delegates() { echo "$installed_configs" | grep -E "$1" 2> /dev/null; } # user_mask_fits _config # Returns true if the string _config satisfies the user specified mask. -user_mask_fits() { echo "$1" | $EGREP "$configmask" > /dev/null 2>&1; } +user_mask_fits() { echo "$1" | grep -E "$configmask" > /dev/null 2>&1; } # count_fields _word # Returns the number of IFS split fields in _word @@ -673,7 +669,7 @@ find_best_legacy_config() if [ -n "$_legacy_configs" ]; then _legacy_mask=`get_legacy_mask` for d in $_legacy_configs; do - if echo $d | $EGREP $_legacy_mask > /dev/null 2>&1 ; then + if echo $d | grep -E $_legacy_mask > /dev/null 2>&1 ; then echo "$d" return fi