dev-util/tinyxxd: properly setup xxd replacement

Signed-off-by: ingenarel <ingenarelitems@gmail.com>
This commit is contained in:
ingenarel
2025-07-28 06:18:56 +06:00
parent bf6fdb43eb
commit 48b3bc60df
3 changed files with 28 additions and 15 deletions

View File

@@ -0,0 +1,29 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Drop-in replacement and standalone version of xxd"
HOMEPAGE="https://github.com/xyproto/tinyxxd"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/xyproto/tinyxxd.git"
else
SRC_URI="https://github.com/xyproto/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="xxd"
RDEPEND="xxd? ( !dev-util/xxd !app-editors/vim-core )"
src_install(){
default
if use xxd; then
dosym -r /usr/bin/tinyxxd /usr/bin/xxd
fi
}