xbps-src: fix pkg options parsing in package names containing dashes.
When using per-pkg options via etc/conf, all dashes should be replaced by underscores, i.e: XBPS_PKG_OPTIONS_xorg_server=opt,~opt2
This commit is contained in:
parent
08328d20f1
commit
e372fcc6e0
2 changed files with 6 additions and 2 deletions
|
@ -90,14 +90,15 @@ msg_normal_append() {
|
|||
|
||||
set_build_options() {
|
||||
local f j opt optval _optsset pkgopts
|
||||
local -A options
|
||||
local -A options _pkgname
|
||||
|
||||
if [ -z "$build_options" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
for f in ${build_options}; do
|
||||
eval pkgopts="\$XBPS_PKG_OPTIONS_${pkgname}"
|
||||
_pkgname=${pkgname//\-/\_}
|
||||
eval pkgopts="\$XBPS_PKG_OPTIONS_${_pkgname}"
|
||||
if [ -z "$pkgopts" -o "$pkgopts" = "" ]; then
|
||||
pkgopts=${XBPS_PKG_OPTIONS}
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue