From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C86B5158086 for ; Fri, 29 Oct 2021 11:54:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A7A1E0801; Fri, 29 Oct 2021 11:54:26 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0BE26E0801 for ; Fri, 29 Oct 2021 11:54:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 131CD3430E8 for ; Fri, 29 Oct 2021 11:54:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA894144 for ; Fri, 29 Oct 2021 11:54:23 +0000 (UTC) From: "Jason A. Donenfeld" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason A. Donenfeld" Message-ID: <1635508449.bd569b9a6ef8d9e1e34a97116999e2345a16408b.zx2c4@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/xdp-tools/Manifest net-libs/xdp-tools/metadata.xml net-libs/xdp-tools/xdp-tools-0.0.3.ebuild X-VCS-Directories: net-libs/xdp-tools/ X-VCS-Committer: zx2c4 X-VCS-Committer-Name: Jason A. Donenfeld X-VCS-Revision: bd569b9a6ef8d9e1e34a97116999e2345a16408b X-VCS-Branch: master Date: Fri, 29 Oct 2021 11:54:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 246a911f-c5a5-4267-8727-bbedd4b750bb X-Archives-Hash: 93e9c596ad14641de51dfccbb7eb298c commit: bd569b9a6ef8d9e1e34a97116999e2345a16408b Author: Jason A. Donenfeld gentoo org> AuthorDate: Fri Oct 29 11:53:31 2021 +0000 Commit: Jason A. Donenfeld gentoo org> CommitDate: Fri Oct 29 11:54:09 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd569b9a net-libs/xdp-tools: add version 0.0.3 A bit rough around the edges, given the bespoke build system of xdp-tools is a little bit immature, and there's a bit of weirdness around installing BPF ELF objects. But hopefully this is a solid start. Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Jason A. Donenfeld gentoo.org> net-libs/xdp-tools/Manifest | 1 + net-libs/xdp-tools/metadata.xml | 14 +++++++++ net-libs/xdp-tools/xdp-tools-0.0.3.ebuild | 52 +++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest new file mode 100644 index 00000000000..1ce4a87a70a --- /dev/null +++ b/net-libs/xdp-tools/Manifest @@ -0,0 +1 @@ +DIST xdp-tools-0.0.3.tar.gz 381386 BLAKE2B 1160d9a7cc2b6cf7b49e7223acdbeba72046c00ec710c21140da0607cac1e8a1231992a8967b2f8f2a964da593dfe0af08b28abbc3b13818ddafebbc2c3961a7 SHA512 c2a4278db41af020cf42b1139c93786a49ad2a071b2002177ac39e8d6b74203d251bd7823399d9e156c969d2ae741b0ecd4178edf446fe5c7270e53295458fce diff --git a/net-libs/xdp-tools/metadata.xml b/net-libs/xdp-tools/metadata.xml new file mode 100644 index 00000000000..51fa02b96ae --- /dev/null +++ b/net-libs/xdp-tools/metadata.xml @@ -0,0 +1,14 @@ + + + + + Jason@zx2c4.com + Jason A. Donenfeld + + + xdp-project/xdp-tools + + + Install various helper tools rather than just libxdp. + + diff --git a/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild b/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild new file mode 100644 index 00000000000..0966087d398 --- /dev/null +++ b/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild @@ -0,0 +1,52 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="The libxdp library and various tools for use with XDP" +HOMEPAGE="https://github.com/xdp-project/xdp-tools" +SRC_URI="https://github.com/xdp-project/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1 BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="+doc +tools static-libs" + +DEPEND="dev-libs/libbpf + sys-libs/zlib + net-libs/libpcap + virtual/libelf" +RDEPEND="${DEPEND}" +BDEPEND=">=sys-devel/clang-10.0.0 + doc? ( app-editors/emacs )" + +# Not prebuilt -- we build them -- but they're not ordinary ELF objects either. +QA_PREBUILT="usr/lib/bpf/*.o" + +MAKEOPTS+=" V=1" + +src_prepare() { + # A form of this kludge is upstream but hasn't yet been released: + sed -i 's/install -m 0755 \$(SHARED_LIBS)/cp -fpR \$(SHARED_LIBS)/' lib/libxdp/Makefile || die + default +} + +src_configure() { + export PRODUCTION=1 + export DYNAMIC_LIBXDP=1 + export FORCE_EMACS=$(usex doc 1 0) + default + { + echo "PREFIX := ${EPREFIX}/usr" + echo "LIBDIR := \$(PREFIX)/$(get_libdir)" + echo "BPF_OBJECT_DIR := \$(PREFIX)/lib/bpf" + } >> config.mk +} + +src_install() { + default + use static-libs || rm -f "${D}/${EPREFIX}/usr/$(get_libdir)/libxdp.a" + use tools || rm -f "${D}/${EPREFIX}/usr/"{sbin,bin}/* + dostrip -x /usr/lib/bpf +}