diff options
author | dholland <dholland@pkgsrc.org> | 2013-06-07 17:15:54 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2013-06-07 17:15:54 +0000 |
commit | 38527894c5c6b06ef0cff8fa895b948fc1a2622d (patch) | |
tree | 850194ae8b49667e0273c1706de947c4942fee71 /mk/buildlink3 | |
parent | eeaf4c1e56346c168f11fab4777d80f7b5c7fc16 (diff) | |
download | pkgsrc-38527894c5c6b06ef0cff8fa895b948fc1a2622d.tar.gz |
After including builtin.mk files, go through BUILDLINK_TREE in tree order
and force USE_BUILTIN.pkg=no for packages that depend on packages where
USE_BUILTIN.pkg is no. The names of any such packages are accumulated in
the variable FORCED_PKGSRC for reference; this is currently undocumented
and could be dropped in the future.
This makes it a lot safer to install pkgsrc versions of selected X
libraries without switching wholesale to pkgsrc X; however, other
issues may still exist and caution is still advisable.
As seen on tech-pkg.
Also note: this may affect the builds of packages we don't realize are
affected and that haven't been revbumped. If you find one, let us know
so we can bump its version (or do that yourself) -- most likely this
change will produce in working, properly-linked packages that were
previously broken, but if problems arise please speak up.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 06d89023de1..1287a80b99a 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.221 2013/05/13 12:01:51 jperkin Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.222 2013/06/07 17:15:54 dholland Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -121,6 +121,52 @@ BUILDLINK_BUILTIN_MK.${_pkg_}?= ${BUILDLINK_PKGSRCDIR.${_pkg_}}/builtin.mk .endif .endfor +# Go through the packages in tree order and make sure USE_BUILTIN.pkg +# is set to "no" if that package depends on any other packages where +# USE_BUILTIN.pkg is set to "no". +# + +_stack_:=bot +_ok_:=yes +.for _pkg_ in ${BUILDLINK_TREE} +# work around PR 47888 +_enter_:=${_pkg_:M-*} + +. if ${_pkg_} == x11-links || ${_pkg_} == -x11-links + # (nothing) +. elif empty(_enter_) + # entering a package (in the buildlink tree) + #.say "${_stack_:C/.*/ /} ${_pkg_}:" + _stack_:=${_ok_} ${_stack_} + _ok_:=yes +. else + # leaving a package (in the buildlink tree) +. if !empty(USE_BUILTIN.${_pkg_:S/^-//}:M[Yy][Ee][Ss]) + # this package is going to use the builtin version +. if ${_ok_} == no + # not ok for it to be builtin; force it to pkgsrc + USE_BUILTIN.${_pkg_:S/^-//}:=no + FORCED_PKGSRC+=${_pkg_:S/^-//} + #.say "${_stack_:C/.*/ /} ${_pkg_:S/^-//} pkgsrc FORCED" +. else + #.say "${_stack_:C/.*/ /} ${_pkg_:S/^-//} built-in" +. endif +. else + # no builtin version or not using it + #.say "${_stack_:C/.*/ /} ${_pkg_:S/^-//} pkgsrc" + _ok_:=no +. endif + # pop the stack +. if ${_ok_} == yes + _ok_:=${_stack_:[1]} +. endif + _stack_:=${_stack_:[2..-1]} +. endif +.endfor +.if ${_stack_} != "bot" +.error "The above loop through BUILDLINK_TREE failed to balance" +.endif + # Sorted and unified version of BUILDLINK_TREE without recursion # data. _BUILDLINK_TREE:= ${BUILDLINK_TREE:N-*:O:u} |