diff --git a/games-strategy/freeciv/freeciv-3.2.0_beta2.ebuild b/games-strategy/freeciv/freeciv-3.2.0_beta2.ebuild index a62e7ec5bef5c..bb9c48299f114 100644 --- a/games-strategy/freeciv/freeciv-3.2.0_beta2.ebuild +++ b/games-strategy/freeciv/freeciv-3.2.0_beta2.ebuild @@ -123,7 +123,10 @@ src_configure() { if use ${flag} ; then myclient+=( ${client_name} ) - use modpack && myfcmp+=( ${fcmp_name} ) + # Avoid duplicate `cli` entries; meson will complain + if use modpack && [[ ! " ${myfcmp[*]} " =~ " ${fcmp_name} " ]]; then + myfcmp+=( ${fcmp_name} ) + fi fi } @@ -145,8 +148,8 @@ src_configure() { # the client and fpmc arrays are now populated (or not for dedicated); let's add them to emesonargs emesonargs+=( - -Dclients=$(IFS=, ; echo "${myclient[*]}") - -Dfcmp=$(IFS=, ; echo "${myfcmp[*]}") + -Dclients="$(meson-format-array "${myclient[*]}")" + -Dfcmp="$(meson-format-array "${myfcmp[*]}")" ) if use sound; then @@ -171,7 +174,7 @@ src_configure() { # default-enabled upstream use rule-editor && tools+=( ruledit ruleup ) emesonargs+=( - -Dtools=$(IFS=, ; echo ${tools[*]}) + -Dtools=$(meson-format-array ${tools[*]}) ) # Anything that can be trivially set by meson_use goes here diff --git a/games-strategy/freeciv/freeciv-9999.ebuild b/games-strategy/freeciv/freeciv-9999.ebuild index 65c349c373424..0ba23a26c9c93 100644 --- a/games-strategy/freeciv/freeciv-9999.ebuild +++ b/games-strategy/freeciv/freeciv-9999.ebuild @@ -131,7 +131,10 @@ src_configure() { if use ${flag} ; then myclient+=( ${client_name} ) - use modpack && myfcmp+=( ${fcmp_name} ) + # Avoid duplicate `cli` entries; meson will complain + if use modpack && [[ ! " ${myfcmp[*]} " =~ " ${fcmp_name} " ]]; then + myfcmp+=( ${fcmp_name} ) + fi fi } @@ -153,8 +156,8 @@ src_configure() { # the client and fpmc arrays are now populated (or not for dedicated); let's add them to emesonargs emesonargs+=( - -Dclients=$(IFS=, ; echo "${myclient[*]}") - -Dfcmp=$(IFS=, ; echo "${myfcmp[*]}") + -Dclients="$(meson-format-array "${myclient[*]}")" + -Dfcmp="$(meson-format-array "${myfcmp[*]}")" ) if use authentication; then @@ -163,7 +166,7 @@ src_configure() { use mariadb && myfcdb+=( mariadb ) use odbc && myfcdb+=( odbc ) emesonargs+=( - -Dfcdb=$(IFS=, ; echo "${myfcdb[*]}") + -Dfcdb="$(meson-format-array "${myfcdb[*]}")" ) else # If we don't want authentication @@ -192,7 +195,7 @@ src_configure() { # default-enabled upstream use rule-editor && tools+=( ruledit ruleup ) emesonargs+=( - -Dtools=$(IFS=, ; echo ${tools[*]}) + -Dtools=$(meson-format-array ${tools[*]}) ) # Anything that can be trivially set by meson_use goes here