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>
This commit is contained in:
Lucio Sauer
2025-07-28 12:26:55 +02:00
parent d07b67243e
commit 00aef89228
3 changed files with 62 additions and 2 deletions

View File

@@ -3,6 +3,8 @@
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
@@ -21,8 +23,21 @@ IUSE="xxd"
RDEPEND="xxd? ( !dev-util/xxd !app-editors/vim-core )"
PATCHES=( "${FILESDIR}"/${PN}-1.3.7-fix-flags.patch )
src_compile() {
export CFLAGS LDFLAGS
tc-export CC
emake
}
src_test() {
edo ./testfiles/test13.sh
edo ./testfiles/test14.sh
}
src_install(){
default
emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
if use xxd; then
dosym -r /usr/bin/tinyxxd /usr/bin/xxd
fi