From e507cfcdb0cc3be9e8e3304952c81d4410e6b610 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sun, 26 Sep 2021 20:46:41 +0200 Subject: [PATCH] Ports: Set defaults before loading package.sh This is too much bash magic for a simple "Use this value if the script doesn't set anything", especially since only one default setting depends on values from the script. --- Ports/.port_include.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 93f8006289..bf953a5a8c 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -54,25 +54,26 @@ host_env() { packagesdb="${DESTDIR}/usr/Ports/packages.db" +makeopts=-j$(nproc) +installopts= +configscript=configure +configopts= +useconfigure=false +depends= +patchlevel=1 +auth_type= +auth_import_key= +auth_opts= +launcher_name= +launcher_category= +launcher_command= +launcher_run_in_terminal=false +icon_file= + . "$@" shift -: "${makeopts:=-j$(nproc)}" -: "${installopts:=}" : "${workdir:=$port-$version}" -: "${configscript:=configure}" -: "${configopts:=}" -: "${useconfigure:=false}" -: "${depends:=}" -: "${patchlevel:=1}" -: "${auth_type:=}" -: "${auth_import_key:=}" -: "${auth_opts:=}" -: "${launcher_name:=}" -: "${launcher_category:=}" -: "${launcher_command:=}" -: "${launcher_run_in_terminal:=false}" -: "${icon_file:=}" run_nocd() { echo "+ $@ (nocd)"