--- /usr/portage/sys-kernel/dracut/dracut-027-r1.ebuild 2013-04-18 17:37:10.000000000 +0400 +++ sys-kernel/dracut/dracut-027-r2.ebuild 2013-05-14 21:15:33.717636141 +0400 @@ -1,10 +1,10 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-027-r1.ebuild,v 1.1 2013/04/18 13:37:10 aidecoe Exp $ +# $Header: $ EAPI=4 -inherit bash-completion-r1 eutils linux-info +inherit eutils linux-info systemd add_req_use_for() { local dep="$1"; shift @@ -162,13 +162,8 @@ epatch "${FILESDIR}/${PV}-0004-plymouth-plymouth-pretrigger.sh-fixup-.patch" if use dracut_modules_systemd; then - local systemdutildir="$($(tc-getPKG_CONFIG) systemd \ - --variable=systemdutildir)" - local systemdsystemunitdir="$($(tc-getPKG_CONFIG) systemd \ - --variable=systemdsystemunitdir)" - [[ ${systemdutildir} ]] || die "Couldn't detect systemdutildir" - [[ ${systemdsystemunitdir} ]] \ - || die "Couldn't detect systemdsystemunitdir" + local systemdutildir=$(systemd_get_utildir) + local systemdsystemunitdir=$(systemd_get_unitdir) einfo "Setting systemdutildir to ${systemdutildir} and ..." sed -e "4asystemdutildir=\"${systemdutildir}\"" \ -i "${S}/dracut.conf.d/gentoo.conf.example" || die @@ -179,7 +174,25 @@ } 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=$(systemd_get_unitdir) + myconf="--systemdsystemunitdir=\"${systemdsystemunitdir}\"" + fi + + econf \ + --libdir="${MY_LIBDIR}" \ + --bashcompletiondir="${bashcompletiondir}" \ + ${myconf} } src_compile() { @@ -195,8 +208,6 @@ src_install() { default - newbashcomp "${PN}-bash-completion.sh" "${PN}" - local dracutlibdir="${MY_LIBDIR#/}/dracut" echo "DRACUT_VERSION=$PVR" > "${D%/}/${dracutlibdir}/dracut-version.sh"