blob: 463319536b76c24922ca1a4cd1bc8b4b68141172 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
}
|