Files
guru/dev-util/tinyxxd/tinyxxd-1.3.7-r2.ebuild
Lucio Sauer 00aef89228 dev-util/tinyxxd: respect user variables and add tests
The ebuild now properly honors CC, CFLAGS, LDFLAGS, EPREFIX.

Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
2025-07-28 12:51:05 +02:00

45 lines
895 B
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edo toolchain-funcs
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 MIT )"
SLOT="0"
IUSE="xxd"
RDEPEND="xxd? ( !dev-util/xxd !app-editors/vim-core )"
PATCHES=( "${FILESDIR}"/${P}-fix-flags.patch )
src_compile() {
export CFLAGS LDFLAGS
tc-export CC
emake
}
src_test() {
edo ./testfiles/test13.sh
edo ./testfiles/test14.sh
}
src_install(){
emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
if use xxd; then
dosym -r /usr/bin/tinyxxd /usr/bin/xxd
fi
}