commit: 012f5b62959a9e55c3a9fce3285689d296121472 Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com> AuthorDate: Tue Sep 9 21:19:43 2025 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Tue Nov 11 19:07:01 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=012f5b62
dev-util/xxd: new package for standalone xxd, split off from vim-core Bug: https://bugs.gentoo.org/962554 Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com> Part-of: https://github.com/gentoo/gentoo/pull/43726 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> dev-util/xxd/Manifest | 1 + dev-util/xxd/files/xxd-completion | 24 +++++++++++++++++++++ dev-util/xxd/metadata.xml | 16 ++++++++++++++ dev-util/xxd/xxd-2025.08.24.ebuild | 43 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+) diff --git a/dev-util/xxd/Manifest b/dev-util/xxd/Manifest new file mode 100644 index 000000000000..552f2ec35e71 --- /dev/null +++ b/dev-util/xxd/Manifest @@ -0,0 +1 @@ +DIST vim-9.1.1652.tar.gz 18776578 BLAKE2B c4cc711ee996d6b7268c243c1fae01600d104763f6eee2abbe342f2cf9ee90fb6ee3f0b44fe4814ff47ae13c5a391510c3b711c92acbee591e290da621289029 SHA512 f1dfb1dc0fd834fa3ffb40c31f48de78b48225c9d67667f069ff8b23a6a76d534f3e228b936141616a33a0d73445626dcd2ff52a8571e9f4370a8fbcad9771d7 diff --git a/dev-util/xxd/files/xxd-completion b/dev-util/xxd/files/xxd-completion new file mode 100644 index 000000000000..098999364e33 --- /dev/null +++ b/dev-util/xxd/files/xxd-completion @@ -0,0 +1,24 @@ +# Author: Ciaran McCreesh <[email protected]> +# +# completion for xxd + +_xxd() +{ + local cur prev cmd args + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + cmd=${COMP_WORDS[0]} + + if [[ "${cur}" == -* ]] ; then + args='-a -b -c -E -g -h -i -l -ps -r -s -u -v' + COMPREPLY=( $( compgen -W "${args}" -- $cur ) ) + else + _filedir + fi +} + +complete -F _xxd xxd + +# vim: set ft=sh sw=4 et sts=4 : diff --git a/dev-util/xxd/metadata.xml b/dev-util/xxd/metadata.xml new file mode 100644 index 000000000000..4d597132f8c2 --- /dev/null +++ b/dev-util/xxd/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>[email protected]</email> + <name>Holger Hoffstätte</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>[email protected]</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">vim/vim</remote-id> + <remote-id type="cpe">cpe:/a:vim:vim</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-util/xxd/xxd-2025.08.24.ebuild b/dev-util/xxd/xxd-2025.08.24.ebuild new file mode 100644 index 000000000000..39e04c7e9492 --- /dev/null +++ b/dev-util/xxd/xxd-2025.08.24.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 toolchain-funcs + +DESCRIPTION="Standalone version of Vim's xxd" +HOMEPAGE="https://www.vim.org https://github.com/vim/vim" +VIM_VERSION="9.1.1652" +SRC_URI="https://github.com/vim/vim/archive/v${VIM_VERSION}.tar.gz -> vim-${VIM_VERSION}.tar.gz" +S="${WORKDIR}/vim-${VIM_VERSION}/src/xxd" +LICENSE="vim" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + +RDEPEND="!<app-editors/vim-core-9.1.1652-r1" + +src_prepare() { + default + + # international man pages need some renaming: + # xxd-<lang>.UTF-8.1 -> xxd.<lang>.1 + cd ../../runtime/doc || die + local f newname + for f in xxd-*.UTF-8.1 ; do + newname=${f//xxd-/xxd.} + newname=${newname//UTF-8\./} + mv -f "${f}" "${newname}" || die + done +} + +src_compile() { + tc-export CC + export {C,CPP,LD}FLAGS + emake +} + +src_install() { + dobin xxd + doman ../../runtime/doc/xxd*.1 + newbashcomp "${FILESDIR}"/xxd-completion xxd +}
