--- /usr/portage/sys-kernel/dracut/dracut-027-r1.ebuild 2013-04-18 17:37:10.000000000 +0400 +++ /usr/portage/local/sys-kernel/dracut/dracut-027-r2.ebuild 2013-04-29 21:03:36.533370307 +0400 @@ -4,7 +4,7 @@ EAPI=4 -inherit bash-completion-r1 eutils linux-info +inherit eutils linux-info add_req_use_for() { local dep="$1"; shift @@ -179,7 +179,26 @@ } src_configure() { - econf --libdir="${MY_LIBDIR}" + local bashcompletiondir + local myconf + + if $(tc-getPKG_CONFIG) bash-completion --exists; then + bashcompletiondir="$($(tc-getPKG_CONFIG) bash-completion \ + --variable=completionsdir)" + else + bashcompletiondir=/usr/share/bash-completion + fi + + if use dracut_modules_systemd; then + local systemdsystemunitdir="$($(tc-getPKG_CONFIG) systemd \ + --variable=systemdsystemunitdir)" + local myconf="--systemdsystemunitdir=\"${systemdsystemunitdir}\"" + fi + + econf \ + --libdir="${MY_LIBDIR}" \ + --bashcompletiondir="${bashcompletiondir}" \ + ${myconf} } src_compile() { @@ -195,8 +214,6 @@ src_install() { default - newbashcomp "${PN}-bash-completion.sh" "${PN}" - local dracutlibdir="${MY_LIBDIR#/}/dracut" echo "DRACUT_VERSION=$PVR" > "${D%/}/${dracutlibdir}/dracut-version.sh"