Permalink
Browse files

git: add diff_highlight variant

make diff-highlight a default variant
  • Loading branch information...
Schamschula committed Dec 3, 2018
1 parent f647e7e commit ae0c1b4139141fe369b6808e3514c3124b914196
Showing with 30 additions and 1 deletion.
  1. +20 −1 devel/git/Portfile
  2. +10 −0 devel/git/files/patch-contrib-diff-highlight-Makefile.diff
@@ -219,11 +219,30 @@ variant credential_osxkeychain description {Install git credential-osxkeychain u
}
}
variant diff_highlight description {Install git diff-highlight utility from contrib} {
patchfiles-append patch-contrib-diff-highlight-Makefile.diff
post-patch {
reinplace "s|%PREFIX%|${prefix}|" \
${worksrcpath}/contrib/diff-highlight/Makefile
}
post-build {
system -W "${worksrcpath}/contrib/diff-highlight" "make [join ${build.args}]"
}
post-destroot {
xinstall -m 755 "${worksrcpath}/contrib/diff-highlight/diff-highlight" \
"${destroot}${prefix}/bin/"
}
}
platform darwin 8 {
build.args-append NO_APPLE_COMMON_CRYPTO=1
}
default_variants +doc +pcre +credential_osxkeychain
default_variants +doc +pcre +credential_osxkeychain +diff_highlight
livecheck.type regexm
livecheck.regex {<span class="version">.*?(\d+\.\d+\.\d+).*?</span>}
@@ -0,0 +1,10 @@
--- a/contrib/diff-highlight/Makefile.orig 2018-11-21 08:58:11.000000000 -0600
+++ b/contrib/diff-highlight/Makefile 2018-12-03 14:13:53.000000000 -0600
@@ -1,6 +1,6 @@
all: diff-highlight
-PERL_PATH = /usr/bin/perl
+PERL_PATH = %PREFIX%/perl
-include ../../config.mak
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))

0 comments on commit ae0c1b4

Please sign in to comment.