sys-apps/kmod: Synced live ebuild
authorLars Wendler <polynomial-c@gentoo.org>
Wed, 19 Feb 2020 09:48:39 +0000 (10:48 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Wed, 19 Feb 2020 09:48:39 +0000 (10:48 +0100)
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
sys-apps/kmod/kmod-9999.ebuild

index 1ba782da2719aa6c7a08c42b5da88926ca920f6f..e0a5eee807dfb4ff50baaab2a102b6796d4cd052 100644 (file)
@@ -1,19 +1,19 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_COMPAT=( python3_{6,7,8} )
 
-inherit bash-completion-r1 multilib python-r1
+inherit autotools bash-completion-r1 multilib python-r1
 
 if [[ ${PV} == 9999* ]]; then
        EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
-       inherit autotools git-r3
+       inherit git-r3
 else
        SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kmod/${P}.tar.xz"
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-       inherit libtool
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
+       #inherit libtool
 fi
 
 DESCRIPTION="library and tools for managing linux kernel modules"
@@ -41,14 +41,19 @@ RDEPEND="!sys-apps/module-init-tools
                libressl? ( dev-libs/libressl:0= )
        )
        zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
-DEPEND="${RDEPEND}
-       doc? ( dev-util/gtk-doc )
+DEPEND="${RDEPEND}"
+BDEPEND="
+       doc? (
+               dev-util/gtk-doc
+               dev-util/gtk-doc-am
+       )
        lzma? ( virtual/pkgconfig )
        python? (
                dev-python/cython[${PYTHON_USEDEP}]
                virtual/pkgconfig
                )
-       zlib? ( virtual/pkgconfig )"
+       zlib? ( virtual/pkgconfig )
+"
 if [[ ${PV} == 9999* ]]; then
        DEPEND="${DEPEND}
                dev-libs/libxslt"
@@ -61,8 +66,9 @@ DOCS="NEWS README TODO"
 src_prepare() {
        default
 
-       if [[ ! -e configure ]] ; then
+       if [[ ! -e configure ]] || use doc ; then
                if use doc; then
+                       cp "${EROOT}"/usr/share/aclocal/gtk-doc.m4 m4 || die
                        gtkdocize --copy --docdir libkmod/docs || die
                else
                        touch libkmod/docs/gtk-doc.make
@@ -85,7 +91,7 @@ src_configure() {
                --with-bashcompletiondir="$(get_bashcompdir)"
                --with-rootlibdir="${EPREFIX}/$(get_libdir)"
                $(use_enable debug)
-               $(use_enable doc gtk-doc)
+               $(usex doc '--enable-gtk-doc' '')
                $(use_enable static-libs static)
                $(use_enable tools)
                $(use_with lzma xz)
@@ -143,7 +149,7 @@ src_install() {
                python_foreach_impl python_install
        fi
 
-       find "${ED}" -name "*.la" -delete || die
+       find "${ED}" -type f -name "*.la" -delete || die
 
        if use tools; then
                local cmd
@@ -169,23 +175,23 @@ src_install() {
 }
 
 pkg_postinst() {
-       if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
+       if [[ -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
+               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 [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
-                       mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
+               if [[ ! -d ${EROOT}/etc/runlevels/sysinit ]]; then
+                       mkdir -p "${EROOT}"/etc/runlevels/sysinit
                fi
-               if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then
-                       ln -s /etc/init.d/kmod-static-nodes "${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes
+               if [[ -x ${EROOT}/etc/init.d/kmod-static-nodes ]]; then
+                       ln -s /etc/init.d/kmod-static-nodes "${EROOT}"/etc/runlevels/sysinit/kmod-static-nodes
                fi
        fi
 
-       if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
-               if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
+       if [[ -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"
                        ewarn "kernel modules to have required static nodes!"