From 4784c3a10035dd70b343b88b24e2c8ecf3b2a55f Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Mon, 3 May 2021 08:23:10 +0200 Subject: [PATCH] app-misc/diff-so-fancy: initial import Signed-off-by: Alessandro Barbieri --- app-misc/diff-so-fancy/Manifest | 1 + .../diff-so-fancy/diff-so-fancy-1.4.0.ebuild | 36 +++++++++++++++++++ app-misc/diff-so-fancy/files/fix-path.patch | 11 ++++++ app-misc/diff-so-fancy/metadata.xml | 13 +++++++ 4 files changed, 61 insertions(+) create mode 100644 app-misc/diff-so-fancy/Manifest create mode 100644 app-misc/diff-so-fancy/diff-so-fancy-1.4.0.ebuild create mode 100644 app-misc/diff-so-fancy/files/fix-path.patch create mode 100644 app-misc/diff-so-fancy/metadata.xml diff --git a/app-misc/diff-so-fancy/Manifest b/app-misc/diff-so-fancy/Manifest new file mode 100644 index 0000000000..d9adbf2ead --- /dev/null +++ b/app-misc/diff-so-fancy/Manifest @@ -0,0 +1 @@ +DIST diff-so-fancy-1.4.0.tar.gz 46216 BLAKE2B c68a41a74bfc4f280aa3a90d9cbf6c63dbecaa917e83bb6403dfa1ee3ea7837f5348d1a44fa7673ad5c65a3f2948d1e028865b21f6f04a0f495cc54755c99535 SHA512 b92bdf6d7868fe183f2ea7d655f9619c2059ff7d10901ed445762ed5baff0944528b1e409f36e5d47ce51eb39b106617f302a6926995aeab27324cb3e5f6f293 diff --git a/app-misc/diff-so-fancy/diff-so-fancy-1.4.0.ebuild b/app-misc/diff-so-fancy/diff-so-fancy-1.4.0.ebuild new file mode 100644 index 0000000000..2e89c0d96e --- /dev/null +++ b/app-misc/diff-so-fancy/diff-so-fancy-1.4.0.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2020 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/files/fix-path.patch b/app-misc/diff-so-fancy/files/fix-path.patch new file mode 100644 index 0000000000..fc04cebcd6 --- /dev/null +++ b/app-misc/diff-so-fancy/files/fix-path.patch @@ -0,0 +1,11 @@ +--- a/diff-so-fancy ++++ b/diff-so-fancy +@@ -9,7 +9,7 @@ + use File::Basename; # For dirname + use Encode; # For handling UTF8 stuff + use Cwd qw(abs_path); # For realpath() +-use lib dirname(abs_path(File::Spec->catdir($0))) . "/lib"; # Add the local lib/ to @INC ++use lib "/usr/share/diff-so-fancy"; + use DiffHighlight; + + use strict; diff --git a/app-misc/diff-so-fancy/metadata.xml b/app-misc/diff-so-fancy/metadata.xml new file mode 100644 index 0000000000..f6d5fdd00f --- /dev/null +++ b/app-misc/diff-so-fancy/metadata.xml @@ -0,0 +1,13 @@ + + + + + co-maintainers welcome + lssndrbarbieri@gmail.com + Alessandro Barbieri + + + so-fancy/diff-so-fancy + so-fancy/diff-so-fancy + +