diff options
author | mat <mat@FreeBSD.org> | 2013-10-19 02:47:57 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2013-10-19 02:47:57 +0800 |
commit | 1f45e6dc97c53cc0612d48767e9e79e9ab621adc (patch) | |
tree | 15530130e06ca6b16770751284f6dcbc3a6b33ef /textproc | |
parent | 4fcff308abffd2fb3a0ddf7827d1224db35eb2ce (diff) | |
download | freebsd-ports-gnome-1f45e6dc97c53cc0612d48767e9e79e9ab621adc.tar.gz freebsd-ports-gnome-1f45e6dc97c53cc0612d48767e9e79e9ab621adc.tar.zst freebsd-ports-gnome-1f45e6dc97c53cc0612d48767e9e79e9ab621adc.zip |
Change upstream to a new shinier one.
(And take maintainership.)
PR: ports/183084
Submitted by: mat
Approved by: garga (maintainer)
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/cdiff/Makefile | 28 | ||||
-rw-r--r-- | textproc/cdiff/distinfo | 2 | ||||
-rw-r--r-- | textproc/cdiff/pkg-descr | 7 | ||||
-rw-r--r-- | textproc/cdiff/pkg-plist | 4 | ||||
-rw-r--r-- | textproc/cdiff/src/cdiff.1 | 80 | ||||
-rw-r--r-- | textproc/cdiff/src/cdiff.sh | 43 |
6 files changed, 19 insertions, 145 deletions
diff --git a/textproc/cdiff/Makefile b/textproc/cdiff/Makefile index 2646b0ac9afa..57f48f93dae5 100644 --- a/textproc/cdiff/Makefile +++ b/textproc/cdiff/Makefile @@ -2,29 +2,19 @@ # $FreeBSD$ PORTNAME= cdiff -PORTVERSION= 1.5 +PORTVERSION= 0.9.3 +PORTEPOCH= 1 CATEGORIES= textproc -MASTER_SITES= # none -DISTFILES= # none -MAINTAINER= garga@FreeBSD.org +MAINTAINER= mat@FreeBSD.org COMMENT= Diff readability enhancer for color terminals -NO_BUILD= yes -NO_WRKSUBDIR= yes -USES= perl5 +USE_GITHUB= +GH_ACCOUNT= ymattw +GH_TAGNAME= 0.9.3 +GH_COMMIT= 423551f -SRC= ${.CURDIR}/src - -MAN1= cdiff.1 -PLIST_FILES= bin/cdiff - -NO_STAGE= yes -do-fetch: - @${DO_NADA} - -do-install: - @${INSTALL_SCRIPT} ${SRC}/cdiff.sh ${PREFIX}/bin/cdiff - @${INSTALL_MAN} ${SRC}/cdiff.1 ${PREFIX}/man/man1 +USE_PYTHON= +USE_PYDISTUTILS= yes .include <bsd.port.mk> diff --git a/textproc/cdiff/distinfo b/textproc/cdiff/distinfo new file mode 100644 index 000000000000..dca53864ff14 --- /dev/null +++ b/textproc/cdiff/distinfo @@ -0,0 +1,2 @@ +SHA256 (cdiff-0.9.3.tar.gz) = 3081c7fcd1eaacfda60614544b9db8930aa09945e44343e2435914c825dc8730 +SIZE (cdiff-0.9.3.tar.gz) = 29237 diff --git a/textproc/cdiff/pkg-descr b/textproc/cdiff/pkg-descr index 534557c26454..ddd5d17131cd 100644 --- a/textproc/cdiff/pkg-descr +++ b/textproc/cdiff/pkg-descr @@ -1,4 +1,5 @@ -cdiff is a readability enhancer for context diffs -and unified diffs on color terminals. +Term based tool to view colored, incremental diff in a Git/Mercurial/Svn +workspace or from stdin, with side by side and auto pager support. Requires +python (>= 2.5.0) and less. -It uses less(1) as a backend. +WWW: https://github.com/ymattw/cdiff diff --git a/textproc/cdiff/pkg-plist b/textproc/cdiff/pkg-plist new file mode 100644 index 000000000000..85be85ce9c71 --- /dev/null +++ b/textproc/cdiff/pkg-plist @@ -0,0 +1,4 @@ +bin/cdiff +%%PYTHON_SITELIBDIR%%/cdiff.py +%%PYTHON_SITELIBDIR%%/cdiff.pyc +%%PYTHON_SITELIBDIR%%/cdiff.pyo diff --git a/textproc/cdiff/src/cdiff.1 b/textproc/cdiff/src/cdiff.1 deleted file mode 100644 index cadff07ed6da..000000000000 --- a/textproc/cdiff/src/cdiff.1 +++ /dev/null @@ -1,80 +0,0 @@ -.\"- -.\" Copyright (c) 2000 Eivind Eklund -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer -.\" in this position and unchanged. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd October 24, 2000 -.Dt CDIFF 1 -.Sh NAME -.Nm cdiff -.Nd show diffs with colors -.Sh SYNOPSIS -.Nm cdiff -.Op Fl m -.Op Ar diff ... -.Sh DESCRIPTION -.Nm -reads a unidiff or context diff from stdin or a set of (optionally compressed) -files and URLs, adds color codes, expands tabs to 8 spaces, and passes the -results to -.Xr less 1 . -If used on a color terminal, it makes diffs much easier to read. -There is also handling of "cvs annotate" in it. -.Pp -.Bl -tag -width Ds -.It Fl m -Use bold, reverse and underline codes (for monochrome terminals). -.El -.Bl -tag -width CDIFFCOLORS -.It Ev CDIFFCOLORS -The color codes used to add. Default is 1:34:31:35, for lines begin with "@", "-", "+" and "!". -.El -.Sh AUTHORS -.Nm -was written by -.An Eivind Eklund Aq eivind@FreeBSD.org . -based on a sed line somebody passed around. The code is (much) smaller than -this man page. -.Sh SEE ALSO -.Xr diff 1 , -.Xr less 1 , -.Xr cvs 1 . -.Sh BUGS -.Nm -assumes standard ANSI color escape sequences (as used by xterm and most other -commonly used terminals), rather than using -.Xr curses 3 . -.Pp -.Nm -should really be a large and complex C program based on -.Xr less 1 -and a diff library. This would allow a more informative display, including -collapsing pure deletions/insertions inside a single line to one line with -colors for deleted/added material, avoiding the line-wrap problems in less -due to less not knowing the effects or lengths of the color escape codes, -and correct handling of shifted tabs (instead of just expanding them to -spaces.) diff --git a/textproc/cdiff/src/cdiff.sh b/textproc/cdiff/src/cdiff.sh deleted file mode 100644 index 102dc6adcbdc..000000000000 --- a/textproc/cdiff/src/cdiff.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -if [ "$1" = "-m" ]; then - shift; - CODES="4:7:1:1" -else - if [ "$CDIFFCOLORS" != "" ]; then - CODES=$CDIFFCOLORS - else - CODES="1:34:31:35" - fi -fi -(if [ "$1" != "" ]; then - while [ "$1" != "" ]; do - case $1 in - http:*|https:*|ftp:*|file:*) - fetch -q -o - $1 - ;; - *) - zcat -f $1 - ;; - esac - shift; - done -else - cat -fi) | perl -p -mconstant=CODES,${CODES} -e ' -($at, $m, $p, $c) = split /:/, CODES; -while (s/\t/" " x (8 - ((length($`)-1) % 8))/e) {} -s/^(\+.*)$/\033[${p}m$1\033[0m/o; -s/^(-.*)$/\033[${m}m$1\033[0m/o - if !s/^(--- \d+,\d+ ----.*)$/\033[1m$1\033[0m/o; -s/^(\*\*\* \d+,\d+ *\*\*\*.*)$/\033[1m$1\033[0m/o; -s/^(\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*)$/\033[1m$1\033[0m/o; -s/^(!.*)$/\033[${c}m$1\033[0m/o; -s/^(@@.*$)/\033[${at}m$1\033[0m/o; -if (/^1.(\d+)(\s+\(\w+\s+\d{2}-\w{3}-\d{2}\):\s)(.*)/) { - $lastcol = $lastcol || 0; - $lastcol++ if defined($lastrev) && $lastrev != $1; - $lastrev = $1; - $lastcol %= 6; - $_ = "\033[3" . ($lastcol + 1) . "m1.$1$2\033[0m$3\n"; -} -' | less -R |