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.
This commit is contained in:
Tim Schumacher 2021-09-26 20:46:41 +02:00 committed by Andreas Kling
parent 52e9f25403
commit e507cfcdb0

View file

@ -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)"