dev-libs/libnl: upgrade from 3.2.24 to 3.4.0
This CL imports libnl 3.4.0 from upstream Gentoo and modifies the
ebuild to use KEYWORDS="*".
BUG=chromium:919717
TEST=Tested the following:
1. `emerge-$BOARD dev-libs/libnl:0`
2. `emerge-$BOARD dev-libs/libnl:3`
3. `FEATURES=test emerge-$BOARD platform2`
4. Run network_WiFi_SimpleConnect test.
Change-Id: Iadf70417488df8f1213edeaaa25cff0d88be92db
Reviewed-on: https://chromium-review.googlesource.com/1404152
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 971beff949c5f78f372b73f111099401a73446a6)
Reviewed-on: https://chromium-review.googlesource.com/c/1426115
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/dev-libs/libnl/Manifest b/dev-libs/libnl/Manifest
index 6e33a11..722015e 100644
--- a/dev-libs/libnl/Manifest
+++ b/dev-libs/libnl/Manifest
@@ -1,2 +1,2 @@
DIST libnl-1.1.tar.gz 288932 RMD160 ebfc660302f31e5a94f03683f1ba85a3e057cf30 SHA1 54c7d02f93b09b43338e5cbf42f1373e83566577 SHA256 35cea4cfb6cd8af0cafa0f34fff81def5a1f193b8b8384299b4b21883e22edc3
-DIST libnl-3.2.24.tar.gz 802068 SHA256 fb8d6e5dc8af5b85bc6d00a71582a68a01e6a3f7d1664d4a646e289a99dd6816 SHA512 d42c131d0be3bddfd65b9353f7193d355a0b5a7f0c32ee3db67ceeb9da2b04030f2dbc0d51f7f7cddbcc15fcc596b380e0c846dbe1c52212e50d06b7ee12fb10 WHIRLPOOL a90e9dcd08c7a2fb2bc883dd4f8b09e21afd55b10573bada84d1fb6425f5a9adff90bfd0c7572aef437719cfaaa106e5cc4b4aeed081d62e6723ba31c15f0edf
+DIST libnl-3.4.0.tar.gz 933443 BLAKE2B 735da9f800277c48a5deceb78084f510f56f7017b1184e91b2bb45ba61a2e95355e7a3f5d0a74bdaf7ae003393a6c7556d5b201d0d0052dfc66042aa9e137986 SHA512 6336e5c55c79ff2638de9c812cc1842871769236bad7f65c547dec35fafd91988b257fceab144a0cc133c4b29f61172f6552c53aa9fc723bdc783079c2b1851e
diff --git a/dev-libs/libnl/libnl-3.2.24.ebuild b/dev-libs/libnl/libnl-3.2.24.ebuild
deleted file mode 100644
index f2a923f..0000000
--- a/dev-libs/libnl/libnl-3.2.24.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libnl/libnl-3.2.24.ebuild,v 1.3 2014/05/03 21:00:22 floppym Exp $
-
-EAPI=5
-PYTHON_COMPAT=( python2_{6,7} python3_{2,3,4} )
-DISTUTILS_OPTIONAL=1
-inherit distutils-r1 eutils libtool multilib
-
-NL_P=${P/_/-}
-
-DESCRIPTION="A collection of libraries providing APIs to netlink protocol based Linux kernel interfaces"
-HOMEPAGE="http://www.infradead.org/~tgr/libnl/"
-SRC_URI="
- http://www.infradead.org/~tgr/${PN}/files/${NL_P}.tar.gz
-"
-LICENSE="LGPL-2.1 utils? ( GPL-2 )"
-SLOT="3"
-KEYWORDS="*"
-IUSE="static-libs python utils"
-
-RDEPEND="python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- python? ( dev-lang/swig )
- sys-devel/flex
- sys-devel/bison
-"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS=( ChangeLog )
-
-S=${WORKDIR}/${NL_P}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.1-vlan-header.patch
- epatch "${FILESDIR}"/${PN}-3.2.20-rtnl_tc_get_ops.patch
- epatch "${FILESDIR}"/${PN}-3.2.20-cache-api.patch
-
- elibtoolize
-
- if use python; then
- cd "${S}"/python || die
- distutils-r1_src_prepare
- fi
-}
-
-src_configure() {
- econf \
- --disable-silent-rules \
- $(use_enable static-libs static) \
- $(use_enable utils cli)
-
- if use python; then
- cd "${S}"/python || die
- distutils-r1_src_configure
- fi
-}
-
-src_compile() {
- default
-
- if use python; then
- cd "${S}"/python || die
- distutils-r1_src_compile
- fi
-}
-
-src_install() {
- default
-
- if use python; then
- # Unset DOCS= since distutils-r1.eclass interferes
- DOCS=''
- cd "${S}"/python || die
- distutils-r1_src_install
- fi
-
- prune_libtool_files $(usex static-libs --modules --all)
-}
diff --git a/dev-libs/libnl/libnl-3.4.0.ebuild b/dev-libs/libnl/libnl-3.4.0.ebuild
new file mode 100644
index 0000000..bfd45e1
--- /dev/null
+++ b/dev-libs/libnl/libnl-3.4.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+DISTUTILS_OPTIONAL=1
+inherit distutils-r1 eutils libtool multilib multilib-minimal
+
+LIBNL_P=${P/_/-}
+LIBNL_DIR=${PV/_/}
+LIBNL_DIR=${LIBNL_DIR//./_}
+
+DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
+HOMEPAGE="http://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl"
+SRC_URI="
+ https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz
+"
+LICENSE="LGPL-2.1 utils? ( GPL-2 )"
+SLOT="3"
+KEYWORDS="*"
+IUSE="+debug static-libs python +threads utils"
+
+RDEPEND="
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="
+ ${RDEPEND}
+ python? ( dev-lang/swig )
+ sys-devel/bison
+ sys-devel/flex
+"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+DOCS=(
+ ChangeLog
+)
+
+S=${WORKDIR}/${LIBNL_P}
+
+MULTILIB_WRAPPED_HEADERS=(
+ # we do not install CLI stuff for non-native
+ /usr/include/libnl3/netlink/cli/addr.h
+ /usr/include/libnl3/netlink/cli/class.h
+ /usr/include/libnl3/netlink/cli/cls.h
+ /usr/include/libnl3/netlink/cli/ct.h
+ /usr/include/libnl3/netlink/cli/exp.h
+ /usr/include/libnl3/netlink/cli/link.h
+ /usr/include/libnl3/netlink/cli/neigh.h
+ /usr/include/libnl3/netlink/cli/qdisc.h
+ /usr/include/libnl3/netlink/cli/route.h
+ /usr/include/libnl3/netlink/cli/rule.h
+ /usr/include/libnl3/netlink/cli/tc.h
+ /usr/include/libnl3/netlink/cli/utils.h
+)
+
+src_prepare() {
+ default
+
+ elibtoolize
+
+ if use python; then
+ cd "${S}"/python || die
+ distutils-r1_src_prepare
+ fi
+
+ # out-of-source build broken
+ # https://github.com/thom311/libnl/pull/58
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ econf \
+ $(multilib_native_use_enable utils cli) \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable threads) \
+ --disable-silent-rules
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use python; then
+ cd python || die
+ distutils-r1_src_compile
+ fi
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use python; then
+ # Unset DOCS= since distutils-r1.eclass interferes
+ local DOCS=()
+ cd python || die
+ distutils-r1_src_install
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --modules
+}
diff --git a/dev-libs/libnl/metadata.xml b/dev-libs/libnl/metadata.xml
index c18ce8f..ae83e25 100644
--- a/dev-libs/libnl/metadata.xml
+++ b/dev-libs/libnl/metadata.xml
@@ -1,10 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>netmon</herd>
-<use>
-<flag name="doc">Install development documentation</flag>
-<flag name="python">Install experimental <pkg>dev-lang/python</pkg> bindings</flag>
-<flag name="utils">Install command line interface utils</flag>
-</use>
+ <maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+ </maintainer>
+ <use>
+ <flag name="doc">Install development documentation</flag>
+ <flag name="python">Install experimental <pkg>dev-lang/python</pkg> bindings</flag>
+ <flag name="utils">Install command line interface utils</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">thom311/libnl</remote-id>
+ </upstream>
</pkgmetadata>