[arch-commits] Commit in diff-so-fancy/trunk (PKGBUILD system-diff_highlight.patch)
Date: Sunday, January 7, 2018 @ 07:09:53 Author: felixonmars Revision: 279787 upgpkg: diff-so-fancy 1.2.0-1 Modified: diff-so-fancy/trunk/PKGBUILD Deleted: diff-so-fancy/trunk/system-diff_highlight.patch -+ PKGBUILD| 20 ++-- system-diff_highlight.patch | 33 - 2 files changed, 10 insertions(+), 43 deletions(-) Modified: PKGBUILD === --- PKGBUILD2018-01-07 03:29:01 UTC (rev 279786) +++ PKGBUILD2018-01-07 07:09:53 UTC (rev 279787) @@ -3,30 +3,27 @@ # Contributor: icasdri pkgname=diff-so-fancy -pkgver=1.0.0 +pkgver=1.2.0 pkgrel=1 pkgdesc="Good-looking diffs with diff-highlight and more" arch=('any') url="https://github.com/so-fancy/diff-so-fancy; license=('MIT') -depends=('git') +depends=('perl') +makedepends=('git') checkdepends=('bash-bats-assert' 'bash-bats-support') -source=("$pkgname-$pkgver.tar.gz::https://github.com/so-fancy/diff-so-fancy/archive/v$pkgver.tar.gz; -system-diff_highlight.patch) -sha384sums=('00361ed7b36f2b4bb1d79430175e32daadfd5590ff5656e304d7e25c739f599f266efec1664cda7e4caf017a9a56316b' - 'ec4d6df1fc6dbf9e2c2f3fdc4d1c4e57e7cb2b085136f5f84cb32761e853cbc5a3a0878a62b467c05531286b19fe185e') +source=("$pkgname-$pkgver.tar.gz::https://github.com/so-fancy/diff-so-fancy/archive/v$pkgver.tar.gz;) +sha384sums=('77aa73a0fb1f76bbfe79348df11fb805ebcba6c0f7b34102dd4c071afa01a04e2e66533fb893fabdb88b5e5fc60de4d5') prepare() { cd "$srcdir"/$pkgname-$pkgver - patch -p0 -i ../system-diff_highlight.patch - rm -r third_party + rm -r third_party # lib sed -e 's|test_helper/bats-support|/usr/lib/bats-support|' \ -e 's|test_helper/bats-assert|/usr/lib/bats-assert|' \ -e "s|load'$|load.bash'|" \ -i test/*.bats - rm test/diff-highlight.bats } check() { @@ -38,7 +35,10 @@ package() { cd "$srcdir"/$pkgname-$pkgver + sed -i 's|^use lib .*$|use lib "/usr/share/diff-so-fancy";|' diff-so-fancy + install -Dm755 diff-so-fancy "$pkgdir"/usr/bin/diff-so-fancy - install -Dm644 readme.md "$pkgdir"/usr/share/doc/diff-so-fancy/readme.md + install -Dm755 lib/DiffHighlight.pm "$pkgdir"/usr/share/diff-so-fancy/DiffHighlight.pm + install -Dm644 README.md "$pkgdir"/usr/share/doc/diff-so-fancy/README.md install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } Deleted: system-diff_highlight.patch === --- system-diff_highlight.patch 2018-01-07 03:29:01 UTC (rev 279786) +++ system-diff_highlight.patch 2018-01-07 07:09:53 UTC (rev 279787) @@ -1,33 +0,0 @@ diff-so-fancy.old 2017-06-10 22:14:03.858070687 +0800 -+++ diff-so-fancy 2017-06-10 22:15:00.762691077 +0800 -@@ -572,29 +572,5 @@ - - # Find the location of diff-highlight - sub find_diff_highlight { --my $dh = "diff-highlight"; --my $dh_in_path = trim(`which $dh 2>/dev/null`); --my $ret; -- --# We check for diff-highlight in three places: --# 1) System path --# 2) Same dir as d-s-f --# 3) third_party/diff-highlight/ -- --# This is #1 --if ($dh_in_path) { --$ret = $dh_in_path; --# This is #2 and #3 --} else { --$ret = dirname(Cwd::realpath($0)) . "/diff-highlight"; --if (!-X $ret) { --$ret = dirname(Cwd::realpath($0)) . "/third_party/$dh/diff-highlight"; --} --} -- --if (!-X $ret) { --die("Error locating diff-highlight\n"); --} -- --return $ret; -+return "/usr/share/git/diff-highlight/diff-highlight"; - }
[arch-commits] Commit in diff-so-fancy/trunk (PKGBUILD system-diff_highlight.patch)
Date: Saturday, June 10, 2017 @ 14:23:55 Author: felixonmars Revision: 235916 upgpkg: diff-so-fancy 1.0.0-1 Modified: diff-so-fancy/trunk/PKGBUILD diff-so-fancy/trunk/system-diff_highlight.patch -+ PKGBUILD| 41 +--- system-diff_highlight.patch | 53 +- 2 files changed, 49 insertions(+), 45 deletions(-) Modified: PKGBUILD === --- PKGBUILD2017-06-10 14:12:41 UTC (rev 235915) +++ PKGBUILD2017-06-10 14:23:55 UTC (rev 235916) @@ -3,7 +3,7 @@ # Contributor: icasdri pkgname=diff-so-fancy -pkgver=0.11.4 +pkgver=1.0.0 pkgrel=1 pkgdesc="Good-looking diffs with diff-highlight and more" arch=('any') @@ -10,42 +10,35 @@ url="https://github.com/so-fancy/diff-so-fancy; license=('MIT') depends=('git') -checkdepends=('bash-bats') -source=("git+https://github.com/so-fancy/diff-so-fancy.git#tag=v$pkgver; -"git+https://github.com/ztombol/bats-support.git; -"git+https://github.com/ztombol/bats-assert.git; +checkdepends=('bash-bats-assert' 'bash-bats-support') +source=("$pkgname-$pkgver.tar.gz::https://github.com/so-fancy/diff-so-fancy/archive/v$pkgver.tar.gz; system-diff_highlight.patch) -sha384sums=('SKIP' -'SKIP' -'SKIP' - '9ec860b54a91f4852d9426e7e471de918132c29e846772cc3d65b33ff5be78b95875ba994f96882e0ce9f5c6dccac998') +sha384sums=('00361ed7b36f2b4bb1d79430175e32daadfd5590ff5656e304d7e25c739f599f266efec1664cda7e4caf017a9a56316b' + 'ec4d6df1fc6dbf9e2c2f3fdc4d1c4e57e7cb2b085136f5f84cb32761e853cbc5a3a0878a62b467c05531286b19fe185e') prepare() { - cd "$srcdir"/$pkgname - git config submodule."test/test_helper/bats-support".url "$srcdir"/bats-support - git config submodule."test/test_helper/bats-assert".url "$srcdir"/bats-assert - git submodule update --init + cd "$srcdir"/$pkgname-$pkgver + patch -p0 -i ../system-diff_highlight.patch - sed -i 's/libexec/lib/g' diff-so-fancy readme.md - mv libexec lib + rm -r third_party - patch -p1 -i ../system-diff_highlight.patch - rm -r third_party + sed -e 's|test_helper/bats-support|/usr/lib/bats-support|' \ + -e 's|test_helper/bats-assert|/usr/lib/bats-assert|' \ + -e "s|load'$|load.bash'|" \ + -i test/*.bats rm test/diff-highlight.bats } check() { - cd "$srcdir"/$pkgname + cd "$srcdir"/$pkgname-$pkgver + git init bats test/*.bats } package() { - cd "$srcdir"/$pkgname + cd "$srcdir"/$pkgname-$pkgver - sed -i 's|$(get_script_dir)/lib/diff-so-fancy.pl|/usr/share/diff-so-fancy/diff-so-fancy.pl|' diff-so-fancy - - install -Dm755 'diff-so-fancy' "$pkgdir"/usr/bin/diff-so-fancy - install -Dm755 'lib/diff-so-fancy.pl' "$pkgdir"/usr/share/diff-so-fancy/diff-so-fancy.pl - + install -Dm755 diff-so-fancy "$pkgdir"/usr/bin/diff-so-fancy install -Dm644 readme.md "$pkgdir"/usr/share/doc/diff-so-fancy/readme.md + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } Modified: system-diff_highlight.patch === --- system-diff_highlight.patch 2017-06-10 14:12:41 UTC (rev 235915) +++ system-diff_highlight.patch 2017-06-10 14:23:55 UTC (rev 235916) @@ -1,22 +1,33 @@ -From 10175a16b762282acd90ee624a73b55a362fbbca Mon Sep 17 00:00:00 2001 -From: Felix Yan-Date: Sun, 14 Feb 2016 17:07:07 +0800 -Subject: [PATCH] Use system git's diff_highlight - - diff-so-fancy | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/diff-so-fancy b/diff-so-fancy -index b17cf29..9f62e72 100755 a/diff-so-fancy -+++ b/diff-so-fancy -@@ -19,7 +19,7 @@ hash gsed 2> /dev/null && SED=gsed || SED=sed - if hash diff-highlight 2> /dev/null; then - diff_highlight=diff-highlight - else -- diff_highlight="$(get_script_dir)/third_party/diff-highlight/diff-highlight" -+ diff_highlight="/usr/share/git/diff-highlight/diff-highlight" - fi +--- diff-so-fancy.old 2017-06-10 22:14:03.858070687 +0800 diff-so-fancy 2017-06-10 22:15:00.762691077 +0800 +@@ -572,29 +572,5 @@ - CSI=$'\x1b\[' + # Find the location of diff-highlight + sub find_diff_highlight { +-my $dh = "diff-highlight"; +-my $dh_in_path = trim(`which $dh 2>/dev/null`); +-my $ret; +- +-# We check for diff-highlight in three places: +-# 1) System path +-# 2) Same dir as d-s-f +-# 3) third_party/diff-highlight/ +- +-# This is #1 +-if ($dh_in_path) { +-$ret = $dh_in_path; +-# This is #2 and #3 +-} else { +-$ret = dirname(Cwd::realpath($0)) . "/diff-highlight"; +-if (!-X $ret) { +-$ret = dirname(Cwd::realpath($0)) . "/third_party/$dh/diff-highlight"; +-} +-} +- +-if (!-X $ret) { +-die("Error locating diff-highlight\n"); +-} +- +-return $ret; ++return
[arch-commits] Commit in diff-so-fancy/trunk (PKGBUILD system-diff_highlight.patch)
Date: Sunday, February 14, 2016 @ 10:10:44 Author: fyan Revision: 161530 upgpkg: diff-so-fancy 0.3.0-2 use system git's diff_highlight Added: diff-so-fancy/trunk/system-diff_highlight.patch Modified: diff-so-fancy/trunk/PKGBUILD -+ PKGBUILD| 14 -- system-diff_highlight.patch | 22 ++ 2 files changed, 30 insertions(+), 6 deletions(-) Modified: PKGBUILD === --- PKGBUILD2016-02-14 08:52:39 UTC (rev 161529) +++ PKGBUILD2016-02-14 09:10:44 UTC (rev 161530) @@ -4,21 +4,22 @@ pkgname=diff-so-fancy pkgver=0.3.0 -pkgrel=1 +pkgrel=2 pkgdesc="Good-looking diffs with diff-highlight and more" arch=('any') url="https://github.com/stevemao/diff-so-fancy; license=('MIT') install="${pkgname}.install" -depends=('bash' 'perl' 'sed') -makedepends=('git') +depends=('git') checkdepends=('bash-bats') source=("git+https://github.com/so-fancy/diff-so-fancy.git#tag=v$pkgver; "git+https://github.com/ztombol/bats-core.git; -"git+https://github.com/ztombol/bats-assert.git;) +"git+https://github.com/ztombol/bats-assert.git; +system-diff_highlight.patch) sha384sums=('SKIP' 'SKIP' -'SKIP') +'SKIP' + '586f722ae89c9d0d2ab1ce987052c7c0f4929efaad13c1c395cc15a72a47efe4214a958fdb973a17a6c761d9f7662d01') prepare() { cd "${srcdir}/${pkgname}" @@ -25,6 +26,8 @@ git config submodule."test/test_helper/bats-core".url "${srcdir}"/bats-core git config submodule."test/test_helper/bats-assert".url "${srcdir}"/bats-assert git submodule update --init + + patch -p1 -i ../system-diff_highlight.patch } check() { @@ -35,5 +38,4 @@ package() { cd "${srcdir}/${pkgname}" install -Dm755 'diff-so-fancy' "${pkgdir}/usr/bin/diff-so-fancy" - install -Dm755 'third_party/diff-highlight/diff-highlight' "${pkgdir}/usr/bin/diff-highlight" } Added: system-diff_highlight.patch === --- system-diff_highlight.patch (rev 0) +++ system-diff_highlight.patch 2016-02-14 09:10:44 UTC (rev 161530) @@ -0,0 +1,22 @@ +From 10175a16b762282acd90ee624a73b55a362fbbca Mon Sep 17 00:00:00 2001 +From: Felix Yan+Date: Sun, 14 Feb 2016 17:07:07 +0800 +Subject: [PATCH] Use system git's diff_highlight + +--- + diff-so-fancy | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/diff-so-fancy b/diff-so-fancy +index b17cf29..9f62e72 100755 +--- a/diff-so-fancy b/diff-so-fancy +@@ -19,7 +19,7 @@ hash gsed 2> /dev/null && SED=gsed || SED=sed + if hash diff-highlight 2> /dev/null; then + diff_highlight=diff-highlight + else +- diff_highlight="$(get_script_dir)/third_party/diff-highlight/diff-highlight" ++ diff_highlight="/usr/share/git/diff-highlight/diff-highlight" + fi + + color_code_regex="(\x1B\[([0-9]{1,3}(;[0-9]{1,3}){0,3})[m|K])?"