xbps-src: make build options from config ang flags work together

Flag options was appended to XBPS_PKG_OPTIONS, but was later
overwritten by sourcing config. Instead, pass only flags
options in separate variable and join at very end.
This commit is contained in:
Piotr Wójcik 2020-08-28 19:19:13 +02:00 committed by Piotr
parent 52781a35fe
commit 15e7a92951
2 changed files with 11 additions and 10 deletions

View file

@ -167,6 +167,16 @@ set_build_options() {
if [ -z "$pkgopts" -o "$pkgopts" = "" ]; then
pkgopts=${XBPS_PKG_OPTIONS}
fi
# If pkg options were set in config(s), merge them with command line
if [ -n "$XBPS_ARG_PKG_OPTIONS" ]; then
if [ -n "$pkgopts" ]; then
pkgopts+=",$XBPS_ARG_PKG_OPTIONS"
else
pkgopts="$XBPS_ARG_PKG_OPTIONS"
fi
fi
OIFS="$IFS"; IFS=','
for j in ${pkgopts}; do
case "$j" in