Implemented support for permanent pkg build options (globally or per-pkg).
Permanent global pkg build options can be defined via 'XBPS_PKG_OPTIONS' in etc/conf. Permament per-pkg build options can be defined via 'XBPS_PKG_OPTIONS_<pkgname>' in etc/conf. Close GH #452.
This commit is contained in:
parent
31866db69f
commit
9d34c36e0a
8 changed files with 117 additions and 68 deletions
10
xbps-src
10
xbps-src
|
@ -143,7 +143,9 @@ Options:
|
|||
-N Disable use of remote repositories to resolve dependencies.
|
||||
|
||||
-o <opt,~opt2,...>
|
||||
Enable or disable (prefixed with ~) package build options.
|
||||
Enable or disable (prefixed with ~) package build options. Note this overrides
|
||||
options set via XBPS_PKG_OPTIONS from 'etc/conf'. This effectively has the same
|
||||
effect than setting 'XBPS_PKG_OPTIONS_<pkgname>' in 'etc/conf'.
|
||||
Supported options can be shown with the 'show-options' target.
|
||||
|
||||
-r <repo>
|
||||
|
@ -325,7 +327,7 @@ while getopts "a:CfghH:Ij:Lm:No:r:V" opt; do
|
|||
L) export NOCOLORS=1; XBPS_OPTIONS+="-L ";;
|
||||
m) readonly XBPS_MASTERDIR=$(readlink -m $OPTARG 2>/dev/null); XBPS_OPTIONS+="-m $XBPS_MASTERDIR ";;
|
||||
N) readonly XBPS_SKIP_REMOTEREPOS=1; XBPS_OPTIONS+="-N ";;
|
||||
o) readonly XBPS_BUILD_OPTS="$OPTARG"; XBPS_OPTIONS+="-o $OPTARG ";;
|
||||
o) readonly XBPS_PKG_OPTIONS="$OPTARG"; XBPS_OPTIONS+="-o $OPTARG ";;
|
||||
r) readonly XBPS_ALT_REPOSITORY="$OPTARG"; XBPS_OPTIONS+="-r $OPTARG ";;
|
||||
V) echo $XBPS_SRC_VERSION && exit 0;;
|
||||
--) shift; break;;
|
||||
|
@ -457,7 +459,7 @@ export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \
|
|||
XBPS_BUILDSTYLEDIR XBPS_CFLAGS XBPS_CXXFLAGS XBPS_LDFLAGS \
|
||||
XBPS_MAKEJOBS XBPS_BUILD_FORCEMODE XBPS_USE_GIT_REVS XBPS_DEBUG_PKGS \
|
||||
XBPS_CCACHE XBPS_DISTCC XBPS_DISTCC_HOSTS XBPS_SKIP_DEPS \
|
||||
XBPS_SKIP_REMOTEREPOS XBPS_CROSS_BUILD XBPS_BUILD_OPTS \
|
||||
XBPS_SKIP_REMOTEREPOS XBPS_CROSS_BUILD XBPS_PKG_OPTIONS \
|
||||
XBPS_CONFIG_FILE XBPS_KEEP_ALL XBPS_HOSTDIR XBPS_MASTERDIR \
|
||||
XBPS_SRC_VERSION XBPS_DESTDIR FAKEROOT_CMD CHROOT_CMD XBPS_MACHINE
|
||||
|
||||
|
@ -618,7 +620,7 @@ case "$XBPS_TARGET" in
|
|||
;;
|
||||
show-options)
|
||||
read_pkg
|
||||
show_pkg_options
|
||||
show_pkg_build_options
|
||||
;;
|
||||
show-shlib-provides)
|
||||
read_pkg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue