dev-util/rexxd: add new package

Signed-off-by: NRK <nrk@disroot.org>
This commit is contained in:
NRK
2025-03-09 19:21:01 +00:00
parent 33dc463227
commit 71801d19f8
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edo flag-o-matic toolchain-funcs
DESCRIPTION="Drop-in replacement for the original xxd"
HOMEPAGE="https://github.com/skeeto/w64devkit/blob/master/src/rexxd.c"
COMMIT="b217f139b86096c7864fc50f727d0ce81e4831d0"
SRC_URI="https://github.com/skeeto/w64devkit/raw/${COMMIT}/src/rexxd.c -> ${P}.c"
S="${WORKDIR}"
LICENSE="Unlicense"
KEYWORDS="~amd64 ~x86"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
src_unpack() {
cp "${DISTDIR}/${P}.c" rexxd.c || die "cp failed"
}
src_compile() {
append-cflags -D_FILE_OFFSET_BITS=64
edo $(tc-getCC) ${CFLAGS} -o rexxd rexxd.c ${LDFLAGS}
use test && edo $(tc-getCC) ${CFLAGS} -DTEST -o tests rexxd.c ${LDFLAGS}
}
src_install() {
dobin rexxd
}
src_test() {
edo ./tests
}