--- /usr/portage/sys-apps/kmod/kmod-19.ebuild 2015-01-17 04:31:17.000000000 +0100 +++ kmod-19.ebuild 2015-01-17 18:36:32.958717210 +0100 @@ -1,19 +1,20 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-19.ebuild,v 1.3 2015/01/17 03:15:26 zlogene Exp $ +# $Header: $ EAPI=5 PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} ) +AUTOTOOLS_AUTORECONF=yes -inherit bash-completion-r1 eutils multilib python-r1 +inherit bash-completion-r1 eutils multilib python-r1 autotools-utils if [[ ${PV} == 9999* ]]; then EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git" inherit autotools git-2 else SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz" - KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86" inherit libtool fi @@ -22,7 +23,7 @@ LICENSE="LGPL-2" SLOT="0" -IUSE="debug doc lzma python static-libs +tools zlib" +IUSE="debug doc lzma python static-libs +tools zlib logging openrc" # Upstream does not support running the test suite with custom configure flags. # I was also told that the test suite is intended for kmod developers. @@ -30,17 +31,16 @@ # See bug #408915. RESTRICT="test" -# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch RDEPEND="!sys-apps/module-init-tools !sys-apps/modutils - !=app-arch/xz-utils-5.0.4-r1 ) python? ( ${PYTHON_DEPS} ) zlib? ( >=sys-libs/zlib-1.2.6 )" #427130 DEPEND="${RDEPEND} doc? ( dev-util/gtk-doc ) lzma? ( virtual/pkgconfig ) + dev-libs/libxslt python? ( dev-python/cython[${PYTHON_USEDEP}] virtual/pkgconfig @@ -52,7 +52,6 @@ fi REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - DOCS="NEWS README TODO" src_prepare() { @@ -62,21 +61,28 @@ else touch libkmod/docs/gtk-doc.make fi - eautoreconf + #eautoreconf else - elibtoolize + epatch "${FILESDIR}"/${PN}-19-dynamic-kmod.patch #493630 + #elibtoolize fi # Restore possibility of running --enable-static wrt #472608 sed -i \ -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \ configure || die + + # regenerate aclocal.m4 to support earlier automake versions + rm aclocal.m4 || die + + autotools-utils_src_prepare } + src_configure() { local myeconfargs=( - --bindir="${EPREFIX}/bin" - --with-rootlibdir="${EPREFIX}/$(get_libdir)" + --bindir=/sbin + --with-rootlibdir="/$(get_libdir)" --enable-shared $(use_enable static-libs static) $(use_enable tools) @@ -84,6 +90,7 @@ $(use_enable doc gtk-doc) $(use_with lzma xz) $(use_with zlib) + $(use_enable logging) --with-bashcompletiondir="$(get_bashcompdir)" ) @@ -103,6 +110,7 @@ } src_compile() { + emake -C "${BUILD_DIR}" if use python; then @@ -122,6 +130,7 @@ src_install() { emake -C "${BUILD_DIR}" DESTDIR="${D}" install + einstalldocs if use python; then @@ -141,13 +150,13 @@ if use tools; then local bincmd sbincmd - for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do - dosym /bin/kmod /sbin/${sbincmd} + for sbincmd in depmod insmod modinfo modprobe rmmod; do + dosym kmod /sbin/${sbincmd} done # These are also usable as normal user for bincmd in lsmod modinfo; do - dosym kmod /bin/${bincmd} + dosym /sbin/kmod /bin/${bincmd} done fi @@ -156,20 +165,20 @@ softdep ohci_hcd pre: ehci_hcd EOF - insinto /lib/modprobe.d + insinto /etc/modprobe.d doins "${T}"/usb-load-ehci-first.conf #260139 - newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes + use openrc && doinitd "${FILESDIR}"/kmod-static-nodes } pkg_postinst() { - if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then + if use openrc && [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then ewarn "Removing old conflicting static-nodes init script from the boot runlevel" rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes fi # Add kmod to the runlevel automatically if this is the first install of this package. - if [[ -z ${REPLACING_VERSIONS} ]]; then + if use openrc && [[ -z ${REPLACING_VERSIONS} ]]; then if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then mkdir -p "${EROOT%/}"/etc/runlevels/sysinit fi @@ -178,7 +187,7 @@ fi fi - if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then + if use openrc && [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then ewarn ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"