Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-misc/diff-so-fancy/, app-misc/diff-so-fancy/files/
Date: Sat, 16 Oct 2021 10:21:45
Message-Id: 1634379664.311c195ba2bcf80e74fffaad949bf8cf050f614b.Alessandro-Barbieri@gentoo
1 commit: 311c195ba2bcf80e74fffaad949bf8cf050f614b
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sat Oct 16 08:51:10 2021 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Sat Oct 16 10:21:04 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=311c195b
7
8 app-misc/diff-so-fancy: drop 1.4.2, enable tests
9
10 Closes: https://bugs.gentoo.org/816723
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 app-misc/diff-so-fancy/Manifest | 1 -
14 app-misc/diff-so-fancy/diff-so-fancy-1.4.2.ebuild | 38 ----------------------
15 ...-1.4.3.ebuild => diff-so-fancy-1.4.3-r1.ebuild} | 18 ++++++++--
16 .../files/diff-so-fancy-1.4.3-system-bats.patch | 24 ++++++++++++++
17 4 files changed, 40 insertions(+), 41 deletions(-)
18
19 diff --git a/app-misc/diff-so-fancy/Manifest b/app-misc/diff-so-fancy/Manifest
20 index c3f02462f..c8987d0d1 100644
21 --- a/app-misc/diff-so-fancy/Manifest
22 +++ b/app-misc/diff-so-fancy/Manifest
23 @@ -1,2 +1 @@
24 -DIST diff-so-fancy-1.4.2.tar.gz 51750 BLAKE2B 77d43c813cd6bd5c33b26c8687f6a664bc5557a1df65a300fd15d914723ffefe60c62facbf09f5e4bd4a0d063ea22ff99e9d049e5ce215f1deee7e7c3ed92cec SHA512 cedef279417708d4cbbc6d37fe8b4ba4e71b2bc759a86abab068242db3ff71336c7672251fd6d558bd38e2e5a3084caf19fb5a3c2e76d22dbbd07cf56ec29110
25 DIST diff-so-fancy-1.4.3.tar.gz 51800 BLAKE2B e36a30e79d50f9dd0c151ab42e4192563ab0dc9aa30d0aa12e2cf85c29ef8acf9761cc7c19e0067ecf62f5243b667a7d438ab19aaa7150fd93613e11ecbfabf8 SHA512 9c85c0ffcb7235ad985377206e93e56bdac3926f029d8ab8a899a4391339f344049e9bfe4b77df0f2bda29720ab454378218ea3752b97f40b5ac7ba72a5fa047
26
27 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
28 deleted file mode 100644
29 index 28f977235..000000000
30 --- a/app-misc/diff-so-fancy/diff-so-fancy-1.4.2.ebuild
31 +++ /dev/null
32 @@ -1,38 +0,0 @@
33 -# Copyright 1999-2021 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=7
37 -
38 -SRC_URI="https://github.com/so-fancy/diff-so-fancy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
39 -DESCRIPTION="Good-lookin' diffs. Actually... nah... The best-lookin' diffs."
40 -HOMEPAGE="https://github.com/so-fancy/diff-so-fancy"
41 -
42 -LICENSE="MIT"
43 -SLOT="0"
44 -KEYWORDS="~amd64"
45 -IUSE="test"
46 -#RESTRICT="!test? ( test )"
47 -RESTRICT="test" #investigate
48 -
49 -RDEPEND=""
50 -DEPEND="
51 - ${RDEPEND}
52 - dev-lang/perl
53 -"
54 -BDEPEND="test? ( dev-util/bats )"
55 -
56 -PATCHES=( "${FILESDIR}/fix-path.patch" )
57 -DOCS=( README.md history.md pro-tips.md )
58 -
59 -src_install() {
60 - dobin "${PN}"
61 -
62 - insinto "/usr/share/${PN}"
63 - doins lib/*
64 -
65 - einstalldocs
66 -}
67 -
68 -src_test() {
69 - bats test || die
70 -}
71
72 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
73 similarity index 65%
74 rename from app-misc/diff-so-fancy/diff-so-fancy-1.4.3.ebuild
75 rename to app-misc/diff-so-fancy/diff-so-fancy-1.4.3-r1.ebuild
76 index 6ccc8520e..622371ea5 100644
77 --- a/app-misc/diff-so-fancy/diff-so-fancy-1.4.3.ebuild
78 +++ b/app-misc/diff-so-fancy/diff-so-fancy-1.4.3-r1.ebuild
79 @@ -3,7 +3,7 @@
80
81 EAPI=8
82
83 -DESCRIPTION="Good-lookin' diffs. Actually... nah... The best-lookin' diffs."
84 +DESCRIPTION="Good-lookin' diffs. Actually... nah... The best-lookin' diffs"
85 HOMEPAGE="https://github.com/so-fancy/diff-so-fancy"
86 SRC_URI="https://github.com/so-fancy/diff-so-fancy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
87
88 @@ -16,10 +16,17 @@ RDEPEND=""
89 DEPEND="
90 ${RDEPEND}
91 dev-lang/perl
92 + test? (
93 + dev-util/bats-assert
94 + dev-util/bats-support
95 + )
96 "
97 BDEPEND="test? ( dev-util/bats )"
98
99 -PATCHES=( "${FILESDIR}/fix-path.patch" )
100 +PATCHES=(
101 + "${FILESDIR}/fix-path.patch"
102 + "${FILESDIR}/${P}-system-bats.patch"
103 +)
104 DOCS=( README.md history.md pro-tips.md )
105 RESTRICT="!test? ( test )"
106
107 @@ -33,5 +40,12 @@ src_install() {
108 }
109
110 src_test() {
111 + # it want a git repo
112 + git init || die
113 + git config --global user.email "you@×××××××.com" || die
114 + git config --global user.name "Your Name" || die
115 + git add . || die
116 + git commit -m 'init' || die
117 +
118 bats test || die
119 }
120
121 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
122 new file mode 100644
123 index 000000000..a6087fc50
124 --- /dev/null
125 +++ b/app-misc/diff-so-fancy/files/diff-so-fancy-1.4.3-system-bats.patch
126 @@ -0,0 +1,24 @@
127 +--- a/test/bugs.bats
128 ++++ b/test/bugs.bats
129 +@@ -1,7 +1,7 @@
130 + #!/usr/bin/env bats
131 +
132 +-load 'test_helper/bats-support/load'
133 +-load 'test_helper/bats-assert/load'
134 ++load '/usr/share/bats-support/load.bash'
135 ++load '/usr/share/bats-assert/load.bash'
136 + load 'test_helper/util'
137 +
138 + # https://github.com/paulirish/dotfiles/commit/6743b907ff586c28cd36e08d1e1c634e2968893e#commitcomment-13459061
139 +--- a/test/diff-so-fancy.bats
140 ++++ b/test/diff-so-fancy.bats
141 +@@ -1,7 +1,7 @@
142 + #!/usr/bin/env bats
143 +
144 +-load 'test_helper/bats-support/load'
145 +-load 'test_helper/bats-assert/load'
146 ++load '/usr/share/bats-support/load.bash'
147 ++load '/usr/share/bats-assert/load.bash'
148 + load 'test_helper/util'
149 +
150 + set_env