You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
878 B
47 lines
878 B
# Copyright 2020 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
DESCRIPTION="View hex of binary files"
|
|
HOMEPAGE="https://git.flanchan.moe/flanchan/hexview"
|
|
SRC_URI="https://git.flanchan.moe/flanchan/hexview/archive/v${PV}.tar.gz -> hexview-${PV}.tar.gz"
|
|
|
|
LICENSE="GPL-3+"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
DEPEND=""
|
|
RDEPEND="${DEPEND}"
|
|
BDEPEND="dev-libs/libfmt"
|
|
|
|
IUSE="+fixed pgo debug"
|
|
|
|
REQUIRED_USE="pgo? ( !debug )"
|
|
|
|
src_unpack() {
|
|
default
|
|
mv ${WORKDIR}/hexview{,-${PV}}
|
|
}
|
|
|
|
src_compile() {
|
|
_HX_FEAT=""
|
|
|
|
use "fixed" && _HX_FEAT+="-DFIXED_ROW_SIZE=24 "
|
|
|
|
if use "pgo"; then
|
|
_HX_FEAT="${_HX_FEAT}" emake pgo
|
|
mv hexview-pgo hexview
|
|
elif use "debug"; then
|
|
_HX_FEAT="${_HX_FEAT}" emake debug
|
|
mv hexview-debug hexview
|
|
else
|
|
_HX_FEAT="${_HX_FEAT}" default
|
|
mv hexview-release hexview
|
|
fi
|
|
}
|
|
|
|
src_install() {
|
|
dobin hexview
|
|
}
|