sys-apps/iproute2: Synced live ebuild.
authorLars Wendler <polynomial-c@gentoo.org>
Wed, 6 Sep 2017 08:59:51 +0000 (10:59 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Wed, 6 Sep 2017 09:04:44 +0000 (11:04 +0200)
Package-Manager: Portage-2.3.8, Repoman-2.3.3

sys-apps/iproute2/iproute2-9999.ebuild

index e15e28d2140e51a9cd729a5ccf7340c90def25ea..ba7c88b2ac9b32c06e0ef9da71e6694e86d50a12 100644 (file)
@@ -1,13 +1,13 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
+EAPI=6
 
-inherit eutils toolchain-funcs flag-o-matic multilib
+inherit toolchain-funcs flag-o-matic multilib
 
 if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-       inherit git-2
+       inherit git-r3
 else
        SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
@@ -34,9 +34,18 @@ DEPEND="${RDEPEND}
        >=sys-kernel/linux-headers-3.7
        elibc_glibc? ( >=sys-libs/glibc-2.7 )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+)
+
 src_prepare() {
-       epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-       use ipv6 || epatch "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+       if ! use ipv6 ; then
+               PATCHES+=(
+                       "${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
+               )
+       fi
+
+       default
 
        sed -i \
                -e '/^CC :=/d' \
@@ -96,18 +105,18 @@ src_install() {
 
        emake \
                DESTDIR="${D}" \
-               LIBDIR="${EPREFIX}"/$(get_libdir) \
-               SBINDIR="${EPREFIX}"/sbin \
-               CONFDIR="${EPREFIX}"/etc/iproute2 \
-               DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-               MANDIR="${EPREFIX}"/usr/share/man \
-               ARPDDIR="${EPREFIX}"/var/lib/arpd \
+               LIBDIR="${EPREFIX%/}"/$(get_libdir) \
+               SBINDIR="${EPREFIX%/}"/sbin \
+               CONFDIR="${EPREFIX%/}"/etc/iproute2 \
+               DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
+               MANDIR="${EPREFIX%/}"/usr/share/man \
+               ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
                install
 
-       rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+       rm "${ED%/}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
 
        dodir /bin
-       mv "${ED}"/{s,}bin/ip || die #330115
+       mv "${ED%/}"/{s,}bin/ip || die #330115
 
        dolib.a lib/libnetlink.a
        insinto /usr/include
@@ -115,12 +124,12 @@ src_install() {
        # This local header pulls in a lot of linux headers it
        # doesn't directly need.  Delete this header that requires
        # linux-headers-3.8 until that goes stable.  #467716
-       sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+       sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
 
        if use berkdb ; then
                dodir /var/lib/arpd
                # bug 47482, arpd doesn't need to be in /sbin
                dodir /usr/bin
-               mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+               mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
        fi
 }