guru/app-misc/diff-so-fancy/diff-so-fancy-1.4.3-r1.ebuild
Alessandro Barbieri 311c195ba2
app-misc/diff-so-fancy: drop 1.4.2, enable tests
Closes: https://bugs.gentoo.org/816723
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
2021-10-16 12:21:04 +02:00

52 lines
1007 B
Bash

# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Good-lookin' diffs. Actually... nah... The best-lookin' diffs"
HOMEPAGE="https://github.com/so-fancy/diff-so-fancy"
SRC_URI="https://github.com/so-fancy/diff-so-fancy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RDEPEND=""
DEPEND="
${RDEPEND}
dev-lang/perl
test? (
dev-util/bats-assert
dev-util/bats-support
)
"
BDEPEND="test? ( dev-util/bats )"
PATCHES=(
"${FILESDIR}/fix-path.patch"
"${FILESDIR}/${P}-system-bats.patch"
)
DOCS=( README.md history.md pro-tips.md )
RESTRICT="!test? ( test )"
src_install() {
dobin "${PN}"
insinto "/usr/share/${PN}"
doins lib/*
einstalldocs
}
src_test() {
# it want a git repo
git init || die
git config --global user.email "you@example.com" || die
git config --global user.name "Your Name" || die
git add . || die
git commit -m 'init' || die
bats test || die
}