ports/183084: [PATCH] change textproc/cdiff upstream to a new one.
Mathieu Arnold
mat at FreeBSD.org
Fri Oct 18 14:40:00 UTC 2013
>Number: 183084
>Category: ports
>Synopsis: [PATCH] change textproc/cdiff upstream to a new one.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 18 14:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Mathieu Arnold
>Release: FreeBSD 9.1-RELEASE-p4 i386
>Organization:
Absolight
>Environment:
System: FreeBSD aragorn.in.absolight.net 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #0: Mon Jun 17 11:38:17 UTC 2013
>Description:
This cdiff seems to work very nicely, and has a few new things like changing
the diff to be side by side, see https://github.com/ymattw/cdiff.
>How-To-Repeat:
>Fix:
Tested on redports.
--- cdiff-0.9.3,1.patch begins here ---
diff -ruN /usr/ports/textproc/cdiff/Makefile ./Makefile
--- /usr/ports/textproc/cdiff/Makefile 2013-09-21 01:17:30.000000000 +0200
+++ ./Makefile 2013-10-18 15:55:21.000000000 +0200
@@ -1,30 +1,20 @@
# Created by: eivind
-# $FreeBSD: textproc/cdiff/Makefile 327773 2013-09-20 23:17:30Z bapt $
+# $FreeBSD: head/textproc/cdiff/Makefile 327773 2013-09-20 23:17:30Z bapt $
PORTNAME= cdiff
-PORTVERSION= 1.5
+PORTVERSION= 0.9.3
+PORTEPOCH= 1
CATEGORIES= textproc
-MASTER_SITES= # none
-DISTFILES= # none
MAINTAINER= garga at 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 -ruN /usr/ports/textproc/cdiff/distinfo ./distinfo
--- /usr/ports/textproc/cdiff/distinfo 1970-01-01 01:00:00.000000000 +0100
+++ ./distinfo 2013-10-18 15:44:55.000000000 +0200
@@ -0,0 +1,2 @@
+SHA256 (cdiff-0.9.3.tar.gz) = 3081c7fcd1eaacfda60614544b9db8930aa09945e44343e2435914c825dc8730
+SIZE (cdiff-0.9.3.tar.gz) = 29237
diff -ruN /usr/ports/textproc/cdiff/pkg-descr ./pkg-descr
--- /usr/ports/textproc/cdiff/pkg-descr 2012-07-14 16:29:18.000000000 +0200
+++ ./pkg-descr 2013-10-18 16:29:44.000000000 +0200
@@ -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 -ruN /usr/ports/textproc/cdiff/pkg-plist ./pkg-plist
--- /usr/ports/textproc/cdiff/pkg-plist 1970-01-01 01:00:00.000000000 +0100
+++ ./pkg-plist 2013-10-18 16:01:14.000000000 +0200
@@ -0,0 +1,4 @@
+bin/cdiff
+%%PYTHON_SITELIBDIR%%/cdiff.py
+%%PYTHON_SITELIBDIR%%/cdiff.pyc
+%%PYTHON_SITELIBDIR%%/cdiff.pyo
diff -ruN /usr/ports/textproc/cdiff/src/cdiff.1 ./src/cdiff.1
--- /usr/ports/textproc/cdiff/src/cdiff.1 2012-07-14 16:29:18.000000000 +0200
+++ ./src/cdiff.1 1970-01-01 01:00:00.000000000 +0100
@@ -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: textproc/cdiff/src/cdiff.1 300897 2012-07-14 14:29:18Z beat $
-.\"
-.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 at 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 -ruN /usr/ports/textproc/cdiff/src/cdiff.sh ./src/cdiff.sh
--- /usr/ports/textproc/cdiff/src/cdiff.sh 2012-07-14 16:29:18.000000000 +0200
+++ ./src/cdiff.sh 1970-01-01 01:00:00.000000000 +0100
@@ -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
--- cdiff-0.9.3,1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list