From 0f6fb0782c389b4f1f41c7827325f256ca76decf Mon Sep 17 00:00:00 2001 From: Peter Levine Date: Sat, 15 Jan 2022 18:02:02 -0500 Subject: [PATCH] dev-util/xxd: initial commit This adds xxd hex dump utility from vim for revdeps that need it, without having to depend on app-editors/vim-core. Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Peter Levine --- dev-util/xxd/Manifest | 2 ++ dev-util/xxd/metadata.xml | 17 ++++++++++++++ dev-util/xxd/xxd-8.2.4092.ebuild | 40 ++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 dev-util/xxd/Manifest create mode 100644 dev-util/xxd/metadata.xml create mode 100644 dev-util/xxd/xxd-8.2.4092.ebuild diff --git a/dev-util/xxd/Manifest b/dev-util/xxd/Manifest new file mode 100644 index 0000000000..9e2fe34e6c --- /dev/null +++ b/dev-util/xxd/Manifest @@ -0,0 +1,2 @@ +DIST xxd-8.2.4092.1 10572 BLAKE2B 866dd9256bf0e3dcb4f530044cab7e9fa74137916b120d05a7b2d491b6364d23509bb6793a80ec7770ef2fe319f4b5ca7b0b08bc066ae5cba9e67ecda6713823 SHA512 68d71cb5155994bf1add3f9f29590a46184c5f29466525fc6cd5bb028d98423c40ce1650020499ec9b67d7c63f30a82a6494a79c4ab26a5cf8c804f48b349b71 +DIST xxd-8.2.4092.c 24474 BLAKE2B f288bfa550d256555db907a54cf504f8eed29a78056fec4bef819c8bed8658c843bdcad06217e16285e2cce8316a952d0dbd61b7d31a3c0a65162a3c3f9dadad SHA512 46c68bcfb29145cf597206e59f1d958b29e7917ffe98a5911a0ae92f33df6a8f9f77c120be57a7a5bbe98257af4259e666877c677112990a70a5ee2183d1ce00 diff --git a/dev-util/xxd/metadata.xml b/dev-util/xxd/metadata.xml new file mode 100644 index 0000000000..72d4543659 --- /dev/null +++ b/dev-util/xxd/metadata.xml @@ -0,0 +1,17 @@ + + + + + new maintainers welcome + Peter Levine + plevine457@gmail.com + + + + Bram Moolenaar + Bram@vim.org + + https://github.com/vim/vim/issues + vim/vim + + diff --git a/dev-util/xxd/xxd-8.2.4092.ebuild b/dev-util/xxd/xxd-8.2.4092.ebuild new file mode 100644 index 0000000000..42fd9b3133 --- /dev/null +++ b/dev-util/xxd/xxd-8.2.4092.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Hexdump utility from vim" +HOMEPAGE="https://www.vim.org/" +SRC_URI=" + https://raw.githubusercontent.com/vim/vim/v${PV}/src/xxd/xxd.c + -> ${P}.c + https://raw.githubusercontent.com/vim/vim/v${PV}/runtime/doc/xxd.1 + -> ${P}.1 +" + +# Attribution in xxd.c differs from vim. +LICENSE="GPL-2 MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="!app-editors/vim-core" + +S="${WORKDIR}" + +src_unpack() { + cp "${DISTDIR}"/${P}.c xxd.c || die "cp failed" + cp "${DISTDIR}"/${P}.1 xxd.1 || die "cp failed" +} + +src_compile() { + # Basically, what's in src/xxd/Makefile + "$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -DUNIX \ + -o xxd "${DISTDIR}"/${P}.c || die "compile failed" +} + +src_install() { + dobin xxd + doman xxd.1 +}