From d7dff4b2d5d283fce746611d92affee7d3d02860 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 31 Aug 2021 10:31:22 -0400 Subject: development/icdiff: Updated for version 2.0.4. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- .../icdiff/fix-pipe-handling-installed.patch | 51 ---------------------- development/icdiff/icdiff.1 | 47 ++++++++++++-------- development/icdiff/icdiff.SlackBuild | 23 +++------- development/icdiff/icdiff.info | 6 +-- development/icdiff/icdiff.rst | 6 ++- 5 files changed, 41 insertions(+), 92 deletions(-) delete mode 100644 development/icdiff/fix-pipe-handling-installed.patch (limited to 'development/icdiff') diff --git a/development/icdiff/fix-pipe-handling-installed.patch b/development/icdiff/fix-pipe-handling-installed.patch deleted file mode 100644 index fcc9c84dd9e7..000000000000 --- a/development/icdiff/fix-pipe-handling-installed.patch +++ /dev/null @@ -1,51 +0,0 @@ -Description: fix closed pipe handling -Author: Sascha Steinbiss -Bug: https://github.com/jeffkaufman/icdiff/issues/156 -Forwarded: https://github.com/jeffkaufman/icdiff/pull/165 -Last-Update: 2019-09-25 ---- a/icdiff -+++ b/icdiff -@@ -594,7 +594,22 @@ - validate_has_two_arguments(parser, args) - if not options.cols: - set_cols_option(options) -- diff(options, *args) -+ try: -+ diff(options, *args) -+ except KeyboardInterrupt: -+ pass -+ except IOError as e: -+ if e.errno == errno.EPIPE: -+ pass -+ else: -+ raise -+ -+ # Close stderr to prevent printing errors when icdiff is piped to -+ # something that closes before icdiff is done writing -+ # -+ # See: https://stackoverflow.com/questions/26692284/... -+ # ...how-to-prevent-brokenpipeerror-when-doing-a-flush-in-python -+ sys.stderr.close() - - - def codec_print(s, options): -@@ -755,18 +770,4 @@ - - - if __name__ == "__main__": -- try: -- start() -- except KeyboardInterrupt: -- pass -- except IOError as e: -- if e.errno == errno.EPIPE: -- pass -- else: -- raise -- # Close stderr to prevent printing errors when icdiff is piped to -- # something that closes before icdiff is done writing -- # -- # See: https://stackoverflow.com/questions/26692284/ -- # how-to-prevent-brokenpipeerror-when-doing-a-flush-in-python -- sys.stderr.close() -+ start() diff --git a/development/icdiff/icdiff.1 b/development/icdiff/icdiff.1 index a0d718e92d04..d5bb5306e220 100644 --- a/development/icdiff/icdiff.1 +++ b/development/icdiff/icdiff.1 @@ -1,8 +1,5 @@ .\" Man page generated from reStructuredText. . -.TH ICDIFF 1 "2020-11-15" "1.9.5" "SlackBuilds.org" -.SH NAME -icdiff \- improved color diff . .nr rst2man-indent-level 0 . @@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. +.TH "ICDIFF" 1 "2021-08-31" "2.0.4" "SlackBuilds.org" +.SH NAME +icdiff \- improved color diff .\" RST source for icdiff(1) man page. Convert with: . .\" rst2man.py icdiff.rst > icdiff.1 @@ -49,10 +49,10 @@ git\-icdiff [\fIgit diff options\fP] .SH OPTIONS .INDENT 0.0 .TP -.B \-\-version +.B \-\-version show program\(aqs version number and exit .TP -.B \-h\fP,\fB \-\-help +.B \-h\fP,\fB \-\-help show this help message and exit .TP .BI \-\-cols\fB= COLS @@ -61,53 +61,62 @@ specify the width of the screen. Autodetection is Unix only .BI \-\-encoding\fB= ENCODING specify the file encoding; defaults to utf8 .TP -.BI \-E \ MATCHER\fP,\fB \ \-\-exclude\-lines\fB= MATCHER +.BI \-E \ MATCHER\fR,\fB \ \-\-exclude\-lines\fB= MATCHER Do not diff lines that match this regex. Not compatible with the \(aqline\-numbers\(aq option .TP .BI \-\-head\fB= HEAD consider only the first N lines of each file .TP -.B \-H\fP,\fB \-\-highlight +.B \-H\fP,\fB \-\-highlight color by changing the background color instead of the foreground color. Very fast, ugly, displays all changes .TP -.BI \-L \ LABELS\fP,\fB \ \-\-label\fB= LABELS +.BI \-L \ LABELS\fR,\fB \ \-\-label\fB= LABELS override file labels with arbitrary tags. Use twice, one for each file .TP -.B \-N\fP,\fB \-\-line\-numbers +.B \-N\fP,\fB \-\-line\-numbers generate output with line numbers. Not compatible with the \(aqexclude\-lines\(aq option. .TP -.B \-\-no\-bold +.B \-\-no\-bold use non\-bold colors; recommended for solarized .TP -.B \-\-no\-headers +.B \-\-no\-headers don\(aqt label the left and right sides with their file names .TP .BI \-\-output\-encoding\fB= OUTPUT_ENCODING specify the output encoding; defaults to utf8 .TP -.B \-r\fP,\fB \-\-recursive +.B \-r\fP,\fB \-\-recursive recursively compare subdirectories .TP -.B \-\-show\-all\-spaces +.B \-s\fP,\fB \-\-report\-identical\-files +report when two files are the same +.TP +.B \-\-show\-all\-spaces color all non\-matching whitespace including that which is not needed for drawing the eye to changes. Slow, ugly, displays all changes .TP .BI \-\-tabsize\fB= TABSIZE tab stop spacing .TP -.B \-u\fP,\fB \-\-patch +.B \-t\fP,\fB \-\-truncate +truncate long lines instead of wrapping them +.TP +.B \-u\fP,\fB \-\-patch generate patch. This is always true, and only exists for compatibility .TP -.BI \-U \ NUM\fP,\fB \ \-\-unified\fB= NUM\fP,\fB \ \-\-numlines\fB= NUM +.BI \-U \ NUM\fR,\fB \ \-\-unified\fB= NUM\fR,\fB \ \-\-numlines\fB= NUM how many lines of context to print; can\(aqt be combined with \-\-whole\-file .TP -.B \-W\fP,\fB \-\-whole\-file +.B \-W\fP,\fB \-\-whole\-file show the whole file instead of just changed lines and context .TP -.B \-\-strip\-trailing\-cr +.B \-\-strip\-trailing\-cr strip any trailing carriage return at the end of an input line .TP .BI \-\-color\-map\fB= COLOR_MAP choose which colors are used for which items. Default is \-\-color\-map=\(aqadd:green_bold,change:yellow_bold,description:blue,meta:magenta,separator:blue,subtract:red_bold\(aq. You don\(aqt have to override all of them: \(aq\-\-color\-map=separator:white,description:cyan\(aq +.TP +.B \-\-is\-git\-diff +Show the real file name when displaying git\-diff result .UNINDENT .SH NOTE .sp @@ -115,10 +124,10 @@ It\(aqs highly recommended to use wide terminals with \fBicdiff\fP, for instance 160 columns or more. .SH EXAMPLES .sp -See the file /usr/doc/icdiff\-1.9.5/README.md for examples. +See the file /usr/doc/icdiff\-2.0.4/README.md for examples. .SH COPYRIGHT .sp -See the file /usr/doc/icdiff\-1.9.5/LICENSE for license information. +See the file /usr/doc/icdiff\-2.0.4/LICENSE for license information. .SH AUTHORS .sp icdiff was written by Jeff Kaufman. diff --git a/development/icdiff/icdiff.SlackBuild b/development/icdiff/icdiff.SlackBuild index 333f54ae4ad7..62bf70a0f745 100644 --- a/development/icdiff/icdiff.SlackBuild +++ b/development/icdiff/icdiff.SlackBuild @@ -6,10 +6,12 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20210831 bkw: updated for v2.0.4. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=icdiff -VERSION=${VERSION:-1.9.5} +VERSION=${VERSION:-2.0.4} SRCVER=release-$VERSION BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -23,9 +25,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -61,19 +60,7 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -# patch from upstream git by way of Debian: Close stderr to prevent -# printing errors when icdiff is piped to something that closes before -# icdiff is done writing. -patch -p1 < $CWD/fix-pipe-handling-installed.patch - -# 20201115 bkw: at some point, Slackware's /usr/bin/python will be python3. -# This stuff can go away then. -case "${PYVER:-auto}" in - 2|3) ;; # use as-is - auto) PYVER=2; python3 -c 'import sys' 2>/dev/null && PYVER=3 ;; -esac - -python$PYVER setup.py install --root=$PKG +python3 setup.py install --root=$PKG # man page made from README.md by SlackBuild author. mkdir -p $PKG/usr/man/man1 @@ -81,7 +68,7 @@ gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz ln -s $PRGNAM.1.gz $PKG/usr/man/man1/git-$PRGNAM.1.gz mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README* LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README* LICENSE* ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/development/icdiff/icdiff.info b/development/icdiff/icdiff.info index 39d246098e70..784ff905efb7 100644 --- a/development/icdiff/icdiff.info +++ b/development/icdiff/icdiff.info @@ -1,8 +1,8 @@ PRGNAM="icdiff" -VERSION="1.9.5" +VERSION="2.0.4" HOMEPAGE="https://www.jefftk.com/icdiff" -DOWNLOAD="https://github.com/jeffkaufman/icdiff/archive/release-1.9.5/icdiff-release-1.9.5.tar.gz" -MD5SUM="c896202f930336dfa461a0295019f887" +DOWNLOAD="https://github.com/jeffkaufman/icdiff/archive/release-2.0.4/icdiff-release-2.0.4.tar.gz" +MD5SUM="df7987904ad39019f63454590840769e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/icdiff/icdiff.rst b/development/icdiff/icdiff.rst index d6b9cdca4276..2fc7167f9975 100644 --- a/development/icdiff/icdiff.rst +++ b/development/icdiff/icdiff.rst @@ -2,7 +2,7 @@ .. rst2man.py icdiff.rst > icdiff.1 .. rst2man.py comes from the SBo development/docutils package. -.. |version| replace:: 1.9.5 +.. |version| replace:: 2.0.4 .. |date| date:: ====== @@ -51,8 +51,11 @@ OPTIONS --output-encoding=OUTPUT_ENCODING specify the output encoding; defaults to utf8 -r, --recursive recursively compare subdirectories +-s, --report-identical-files + report when two files are the same --show-all-spaces color all non-matching whitespace including that which is not needed for drawing the eye to changes. Slow, ugly, displays all changes --tabsize=TABSIZE tab stop spacing +-t, --truncate truncate long lines instead of wrapping them -u, --patch generate patch. This is always true, and only exists for compatibility -U NUM, --unified=NUM, --numlines=NUM how many lines of context to print; can't be combined with --whole-file @@ -60,6 +63,7 @@ OPTIONS --strip-trailing-cr strip any trailing carriage return at the end of an input line --color-map=COLOR_MAP choose which colors are used for which items. Default is --color-map='add:green_bold,change:yellow_bold,description:blue,meta:magenta,separator:blue,subtract:red_bold'. You don't have to override all of them: '--color-map=separator:white,description:cyan' +--is-git-diff Show the real file name when displaying git-diff result NOTE ==== -- cgit v1.2.3