diff options
author | NIIBE Yutaka <[email protected]> | 2020-08-03 06:48:19 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2020-08-03 06:48:19 +0000 |
commit | 4192cbc3c58589055de1fb5ccbe42f3d33adb0af (patch) | |
tree | cdf3ebc549d10cdd1c96e914706faa16f419ca3d | |
parent | w32: Add gpgrt_fcancel to the definition. (diff) | |
download | libgpg-error-4192cbc3c58589055de1fb5ccbe42f3d33adb0af.tar.gz libgpg-error-4192cbc3c58589055de1fb5ccbe42f3d33adb0af.zip |
gpgrt-config: Fix handling 'Requires' field.
* src/gpgrt-config.in (get_attr_l): New.
(all_required_config_files): Use get_attr_l.
--
GnuPG-bug-id: 5010
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | src/gpgrt-config.in | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/gpgrt-config.in b/src/gpgrt-config.in index d82b66c..a7dc672 100644 --- a/src/gpgrt-config.in +++ b/src/gpgrt-config.in @@ -39,6 +39,11 @@ get_attr () { eval echo \$ATTR_$___name } +# variant of get_attr for list (separated by ',') +get_attr_l () { + (IFS=', '; for x in "$(get_attr $1)"; do echo $x; done) +} + # Remove ${varname} part in the beginning of a string. remove_var_expr () { ___varname=$1 @@ -359,9 +364,9 @@ all_required_config_files () { *) read_config_file $pkg $PKG_CONFIG_PATH all_list="$all_list${all_list:+ }$pkg" - new_list="$new_list${new_list:+ }$(get_attr Requires)" + new_list="$new_list${new_list:+ }$(get_attr_l Requires)" if [ -n "$enable_static" ]; then - new_list="$new_list${new_list:+ }$(get_attr Requires_private)" + new_list="$new_list${new_list:+ }$(get_attr_l Requires_private)" fi cleanup_vars_attrs pkg=$p @@ -374,9 +379,9 @@ all_required_config_files () { exit 1 fi all_list="$all_list${all_list:+ }$pkg" - new_list="$new_list${new_list:+ }$(get_attr Requires)" + new_list="$new_list${new_list:+ }$(get_attr_l Requires)" if [ -n "$enable_static" ]; then - new_list="$new_list${new_list:+ }$(get_attr Requires_private)" + new_list="$new_list${new_list:+ }$(get_attr_l Requires_private)" fi cleanup_vars_attrs pkg="" @@ -389,9 +394,9 @@ all_required_config_files () { elif [ -n "$pkg" ]; then read_config_file $pkg $PKG_CONFIG_PATH all_list="$all_list${all_list:+ }$pkg" - new_list="$new_list${new_list:+ }$(get_attr Requires)" + new_list="$new_list${new_list:+ }$(get_attr_l Requires)" if [ -n "$enable_static" ]; then - new_list="$new_list${new_list:+ }$(get_attr Requires_private)" + new_list="$new_list${new_list:+ }$(get_attr_l Requires_private)" fi cleanup_vars_attrs fi |