Add a MULTILIB_INSECURE_INSTALL variable to eclass/multilib-minimal.eclass
Sometimes the "multilib magic header" business is an unwanted
feature. For example, it is infuriating to be forced
to wrap a header file (or, less offensively, but still quite
offensively, to be forced to implement inter-ABI
header-smuggling code) just to appease multilib_check_headers,
in the case where an ABI-specific header triggers a multilib_check_headers
failure.
This provides a frob to turn the whole thing off, collisions be
damned. Arguably, it would be better to have a per-header frob,
as well, but this this is better than nothing and trivial to implement.
--- 001-debug-print-function/multilib-minimal.eclass 2013-12-03 02:17:30.144384409 -0800
+++ 002-MULTILIB_INSECURE_INSTALL/multilib-minimal.eclass 2013-12-03 02:23:06.888008751 -0800
@@ -29,6 +29,20 @@ case ${EAPI:-0} in
*) die "EAPI=${EAPI} is not supported" ;;
esac
+# @ECLASS-VARIABLE: MULTILIB_INSECURE_INSTALL
+# @DEFAULT-UNSET
+# @DESCRIPTION:
+# If set to a nonempty value, multilib-minimal_src_install will not perform
+# automatic checking of headers for inter-ABI conflicts, nor will it automate
+# wrapping of header files. Instead, multilib_src_install pseudophases will
+# run without any special protection and the MULTILIB_WRAPPED_HEADERS array
+# will be ignored.
+# See:
+# @CODE@
+# http://devmanual.gentoo.org/eclass-reference/multilib-build.eclass/index.html
+# @CODE@
+# (or the multilib-build.eclass source itself) for further information about this
+# feature.
inherit eutils multilib-build
@@ -108,15 +122,19 @@ multilib-minimal_src_install() {
emake DESTDIR="${D}" install
fi
fi
- # Do multilib magic only when >1 ABI is used.
- if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
+
+ # Do multilib magic only when >1 ABI is used and
+ # MULTILIB_INSECURE_INSTALL is not set
+ if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 && \
+ -z ${MULTILIB_INSECURE_INSTALL} ]]; then
multilib_prepare_wrappers
multilib_check_headers
fi
popd >/dev/null || die
}
multilib_foreach_abi multilib-minimal_abi_src_install
- multilib_install_wrappers
+
+ [[ ${MULTILIB_INSECURE_INSTALL} ]] || multilib_install_wrappers
if declare -f multilib_src_install_all >/dev/null ; then
multilib_src_install_all