commit: 311c195ba2bcf80e74fffaad949bf8cf050f614b Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> AuthorDate: Sat Oct 16 08:51:10 2021 +0000 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> CommitDate: Sat Oct 16 10:21:04 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=311c195b
app-misc/diff-so-fancy: drop 1.4.2, enable tests Closes: https://bugs.gentoo.org/816723 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> app-misc/diff-so-fancy/Manifest | 1 - app-misc/diff-so-fancy/diff-so-fancy-1.4.2.ebuild | 38 ---------------------- ...-1.4.3.ebuild => diff-so-fancy-1.4.3-r1.ebuild} | 18 ++++++++-- .../files/diff-so-fancy-1.4.3-system-bats.patch | 24 ++++++++++++++ 4 files changed, 40 insertions(+), 41 deletions(-) diff --git a/app-misc/diff-so-fancy/Manifest b/app-misc/diff-so-fancy/Manifest index c3f02462f..c8987d0d1 100644 --- a/app-misc/diff-so-fancy/Manifest +++ b/app-misc/diff-so-fancy/Manifest @@ -1,2 +1 @@ -DIST diff-so-fancy-1.4.2.tar.gz 51750 BLAKE2B 77d43c813cd6bd5c33b26c8687f6a664bc5557a1df65a300fd15d914723ffefe60c62facbf09f5e4bd4a0d063ea22ff99e9d049e5ce215f1deee7e7c3ed92cec SHA512 cedef279417708d4cbbc6d37fe8b4ba4e71b2bc759a86abab068242db3ff71336c7672251fd6d558bd38e2e5a3084caf19fb5a3c2e76d22dbbd07cf56ec29110 DIST diff-so-fancy-1.4.3.tar.gz 51800 BLAKE2B e36a30e79d50f9dd0c151ab42e4192563ab0dc9aa30d0aa12e2cf85c29ef8acf9761cc7c19e0067ecf62f5243b667a7d438ab19aaa7150fd93613e11ecbfabf8 SHA512 9c85c0ffcb7235ad985377206e93e56bdac3926f029d8ab8a899a4391339f344049e9bfe4b77df0f2bda29720ab454378218ea3752b97f40b5ac7ba72a5fa047 diff --git a/app-misc/diff-so-fancy/diff-so-fancy-1.4.2.ebuild b/app-misc/diff-so-fancy/diff-so-fancy-1.4.2.ebuild deleted file mode 100644 index 28f977235..000000000 --- a/app-misc/diff-so-fancy/diff-so-fancy-1.4.2.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -SRC_URI="https://github.com/so-fancy/diff-so-fancy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" -DESCRIPTION="Good-lookin' diffs. Actually... nah... The best-lookin' diffs." -HOMEPAGE="https://github.com/so-fancy/diff-so-fancy" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" -IUSE="test" -#RESTRICT="!test? ( test )" -RESTRICT="test" #investigate - -RDEPEND="" -DEPEND=" - ${RDEPEND} - dev-lang/perl -" -BDEPEND="test? ( dev-util/bats )" - -PATCHES=( "${FILESDIR}/fix-path.patch" ) -DOCS=( README.md history.md pro-tips.md ) - -src_install() { - dobin "${PN}" - - insinto "/usr/share/${PN}" - doins lib/* - - einstalldocs -} - -src_test() { - bats test || die -} diff --git a/app-misc/diff-so-fancy/diff-so-fancy-1.4.3.ebuild b/app-misc/diff-so-fancy/diff-so-fancy-1.4.3-r1.ebuild similarity index 65% rename from app-misc/diff-so-fancy/diff-so-fancy-1.4.3.ebuild rename to app-misc/diff-so-fancy/diff-so-fancy-1.4.3-r1.ebuild index 6ccc8520e..622371ea5 100644 --- a/app-misc/diff-so-fancy/diff-so-fancy-1.4.3.ebuild +++ b/app-misc/diff-so-fancy/diff-so-fancy-1.4.3-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -DESCRIPTION="Good-lookin' diffs. Actually... nah... The best-lookin' diffs." +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" @@ -16,10 +16,17 @@ 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" ) +PATCHES=( + "${FILESDIR}/fix-path.patch" + "${FILESDIR}/${P}-system-bats.patch" +) DOCS=( README.md history.md pro-tips.md ) RESTRICT="!test? ( test )" @@ -33,5 +40,12 @@ src_install() { } src_test() { + # it want a git repo + git init || die + git config --global user.email "y...@example.com" || die + git config --global user.name "Your Name" || die + git add . || die + git commit -m 'init' || die + bats test || die } diff --git a/app-misc/diff-so-fancy/files/diff-so-fancy-1.4.3-system-bats.patch b/app-misc/diff-so-fancy/files/diff-so-fancy-1.4.3-system-bats.patch new file mode 100644 index 000000000..a6087fc50 --- /dev/null +++ b/app-misc/diff-so-fancy/files/diff-so-fancy-1.4.3-system-bats.patch @@ -0,0 +1,24 @@ +--- a/test/bugs.bats ++++ b/test/bugs.bats +@@ -1,7 +1,7 @@ + #!/usr/bin/env bats + +-load 'test_helper/bats-support/load' +-load 'test_helper/bats-assert/load' ++load '/usr/share/bats-support/load.bash' ++load '/usr/share/bats-assert/load.bash' + load 'test_helper/util' + + # https://github.com/paulirish/dotfiles/commit/6743b907ff586c28cd36e08d1e1c634e2968893e#commitcomment-13459061 +--- a/test/diff-so-fancy.bats ++++ b/test/diff-so-fancy.bats +@@ -1,7 +1,7 @@ + #!/usr/bin/env bats + +-load 'test_helper/bats-support/load' +-load 'test_helper/bats-assert/load' ++load '/usr/share/bats-support/load.bash' ++load '/usr/share/bats-assert/load.bash' + load 'test_helper/util' + + set_env