makepkg: add option to clear buildflags
Add the "buildflags" option, which is useful in its negative form for disabling CFLAGS, CXXFLAGS and LDFLAGS when building a package. This is useful when determining of one of these flags is causing an issue with a package. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
0c29eb431a
commit
2052f29cdb
|
@ -172,7 +172,7 @@ hi def link pbValidSha1sums Number
|
|||
|
||||
" options
|
||||
syn keyword pb_k_options options contained
|
||||
syn match pbOptions /\(no\)\?\(strip\|docs\|libtool\|emptydirs\|zipman\|ccache\|distcc\|makeflags\)/ contained
|
||||
syn match pbOptions /\(no\)\?\(strip\|docs\|libtool\|emptydirs\|zipman\|ccache\|distcc\|makeflags\|buildflags\)/ contained
|
||||
syn match pbOptionsNeg /\!/ contained
|
||||
syn match pbOptionsDeprec /no/ contained
|
||||
syn region pbOptionsGroup start=/^options=(/ end=/)/ contains=pb_k_options,pbOptions,pbOptionsNeg,pbOptionsDeprec,pbIllegalOption,shDoubleQuote,shSingleQuote
|
||||
|
|
|
@ -233,6 +233,12 @@ name. The syntax is: `source=('filename::url')`.
|
|||
form `!distcc` with select packages that have problems building
|
||||
with distcc.
|
||||
|
||||
*buildflags*;;
|
||||
Allow the use of user-specific buildflags (CFLAGS, CXXFLAGS, LDFLAGS)
|
||||
during build as specified in linkman:makepkg.conf[5]. More useful in
|
||||
its negative form `!buildflags` with select packages that have problems
|
||||
building with custom buildflags.
|
||||
|
||||
*makeflags*;;
|
||||
Allow the use of user-specific makeflags during build as specified
|
||||
in linkman:makepkg.conf[5]. More useful in its negative form
|
||||
|
|
|
@ -45,7 +45,7 @@ srcdir="$startdir/src"
|
|||
pkgdir="$startdir/pkg"
|
||||
|
||||
packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge')
|
||||
other_options=('ccache' 'distcc' 'makeflags')
|
||||
other_options=('ccache' 'distcc' 'buildflags' 'makeflags')
|
||||
splitpkg_overrides=('pkgver' 'pkgrel' 'pkgdesc' 'arch' 'license' 'groups' \
|
||||
'depends' 'optdepends' 'provides' 'conflicts' 'replaces' \
|
||||
'backup' 'options' 'install' 'changelog')
|
||||
|
@ -739,6 +739,13 @@ run_function() {
|
|||
fi
|
||||
local pkgfunc="$1"
|
||||
|
||||
# clear user-specified buildflags if requested
|
||||
if [[ $(check_option buildflags) = "n" ]]; then
|
||||
CFLAGS=""
|
||||
CXXFLAGS=""
|
||||
LDFLAGS=""
|
||||
fi
|
||||
|
||||
# clear user-specified makeflags if requested
|
||||
if [[ $(check_option makeflags) = "n" ]]; then
|
||||
MAKEFLAGS=""
|
||||
|
|
Loading…
Reference in New Issue