summaryrefslogtreecommitdiff
path: root/dev-util/difffilter
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-11-18 09:38:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-11-18 09:38:27 +0000
commit536c3711867ec947c1738f2c4b96f22e4863322d (patch)
tree697733f5cb713908dcf378e13fd15a798a906a91 /dev-util/difffilter
parentf65628136faa35d0c4d3b5e7332275c7b35fcd96 (diff)
gentoo resync : 18.11.2018
Diffstat (limited to 'dev-util/difffilter')
-rw-r--r--dev-util/difffilter/Manifest4
-rw-r--r--dev-util/difffilter/difffilter-0.3.3-r1.ebuild26
-rw-r--r--dev-util/difffilter/files/difffilter-0.3.3.man1194
-rw-r--r--dev-util/difffilter/metadata.xml3
4 files changed, 226 insertions, 1 deletions
diff --git a/dev-util/difffilter/Manifest b/dev-util/difffilter/Manifest
index bcc0baf0b64b..b01d34f12b2f 100644
--- a/dev-util/difffilter/Manifest
+++ b/dev-util/difffilter/Manifest
@@ -1,3 +1,5 @@
+AUX difffilter-0.3.3.man1 7592 BLAKE2B 9df9c1d7c59f129d714820c3b102adec0dfef3d17c944aaf19bede55d1746a4112d75da118bd3b1b4e5c2b639e482dc0e76c39efe14c9a7df997d7160d77f457 SHA512 6fb0ee29cc6700a9cde54c46b526d8d944a5cacefb57b0f6f579055033b007250f476a3cb86fbe3ba0b500418cf6601dd4978d03dc898ffbf897e070e91dc0c9
DIST difffilter-0.3.3.tar.bz2 291226 BLAKE2B 95a43e025668318c1d8e216ae4259e874983f899da8bff402b2fa60c7d8d1f7cb203854b76dfe12b2577f6e2ce8f86cedb93fe50b596c1782a436346069b5eb0 SHA512 ac9aa95dd7e41b6c49c1416be9d1929a41b629587ecb90f3dcadd3982a46d8eb49d181f8f1b1645322113becd9a4b708d0df1e27f6fb9064ffb06b37e5f101f8
+EBUILD difffilter-0.3.3-r1.ebuild 547 BLAKE2B ee771f3e7f090753ea4fec02153d79753d2ed5450050d366750136684133bc64b708b0d2d9fdc11eaa60eafeb6a8264ae5bf3b6be14f47d0f3542710d5c899ad SHA512 e3782c5c57b537d55a40cf3896e3998e0d5a824b78f54dcd1db073222815de549ac5a752e25aeff9d5adeb05ad0e20249d04737c38b863cb3ab48e47eabbbe96
EBUILD difffilter-0.3.3.ebuild 627 BLAKE2B d5e374dfb6c47aaf1db7b0864a2b679272f1fd4757493642ca28af48a90a6f819ca3344bb2a89466ecc039e53653eeafc42a2e3dd9fc0d10c5ee394e521647f8 SHA512 f789e1b968d0d1f79e71ce8fad490e64104ce3f1cc5f67f3e841d78a426982aa2ec7bdc88b316f6701b25663370feb8221c53ad7c2473f0cf6ebe6783e9292b2
-MISC metadata.xml 139 BLAKE2B b4a59c22790dfec3fbcfaea41ef363401766736b68a85bedae00e1944d0a848aa97104c2f34244c0fe7b6363029281f965fc1b3545301d341cda371eaa976274 SHA512 8be912ace7468a4396eb1da00a9785030a8ce35da4357a01591876a1056fd45e44da65de2af3e1eb0506ce6551714962c40c3ae5a3aefa2ad231de35af2519be
+MISC metadata.xml 210 BLAKE2B 5fe5983d28e12b1e05d7cdaea69fdd87becfb2dd9a9b0353caab5f617a2f806227181e7100f623c8c814be524625c2739db8a93226b35b3cd9ec6d72db9895e6 SHA512 267d83ef7ae9579f44c22fe568d6d2064e426acdd07c00a69c735801e588ae0fb1988ae60199e349d444ddb5393a6a0a6836df89b2205fc85e25144ecbf56148
diff --git a/dev-util/difffilter/difffilter-0.3.3-r1.ebuild b/dev-util/difffilter/difffilter-0.3.3-r1.ebuild
new file mode 100644
index 000000000000..9a0c0387ec78
--- /dev/null
+++ b/dev-util/difffilter/difffilter-0.3.3-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Filter files out of unified diffs using POSIX extended regular expressions"
+HOMEPAGE="http://ohnopub.net/~ohnobinki/difffilter/"
+SRC_URI="ftp://mirror.ohnopub.net/mirror/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+
+RDEPEND="
+ >=dev-libs/liblist-2.3.1
+ dev-libs/libstrl
+ dev-libs/tre
+"
+DEPEND="
+ ${RDEPEND}
+"
+
+src_install() {
+ default
+ newman "${FILESDIR}"/${PN}-0.3.3.man1 ${PN}.1
+}
diff --git a/dev-util/difffilter/files/difffilter-0.3.3.man1 b/dev-util/difffilter/files/difffilter-0.3.3.man1
new file mode 100644
index 000000000000..ad7a6331827b
--- /dev/null
+++ b/dev-util/difffilter/files/difffilter-0.3.3.man1
@@ -0,0 +1,194 @@
+.\" Text automatically generated by txt2man
+.TH difffilter 1 "04 November 2018" "difffilter 0.3.3" ""
+.SH NAME
+\fBdifffilter \fP- Filter diffs out of multi-file patches
+.SH SYNOPSIS
+.nf
+.fam C
+\fBdifffilter\fP [\fB-U\fP <lines>] [\fB-hv\fP] [--] [\fB-e\fP <regex>] [\fB-a\fP] [\fB-e\fP <regex>] [\fB-x\fP] [\fB-e\fP <regex>] \.\.\.
+.fam T
+.fi
+.fam T
+.fi
+.SH DESCRIPTION
+\fBdifffilter\fP reads in a series of unified-diffs and filters out any file
+which matches one of the passed extended regular expressions. The remaining
+diffs are written to standard out. \fBdifffilter\fP is a traditional unix filter,
+reading input from standard input and writing the results to standard
+output.
+.PP
+If \fBdifffilter\fP encounters a parsing or input reading error, it will exit
+after writing an error message to standard output. In such a case,
+\fBdifffilter\fP's return value is non-zero. As the parser is not guaranteed to
+be perfect and badly-formatted input may be accepted by commands like
+\fBpatch\fP(1), it is advised that scripts use error checking on \fBdifffilter\fP.
+.SH OPTIONS
+.TP
+.B
+\fB-h\fP
+Displays some amount of helpful or unhelpful information which is intended
+to be helpful. \fBdifffilter\fP will exit without performing any filtering.
+.TP
+.B
+\fB-v\fP
+Displays \fBdifffilter\fP's version information.
+.TP
+.B
+\fB-e\fP BRE
+A POSIX Basic Regular Expression which a filename in the input
+diff may be matched against. The default action for a matched regex
+is to exclude that portion of the diff from the output.
+.TP
+.B
+\fB-E\fP ERE
+Like \fB-e\fP but uses a POSIX Extended Regular Expression.
+.TP
+.B
+\fB-a\fP
+Any following \fB-e\fP options will cause files which match the regex to
+be included in the output diff. This allows one to preserve selected files
+which later patterns will exclude. See EXAMPLE for an application.
+.TP
+.B
+\fB-x\fP
+Any following \fB-e\fP options will cause files matching the regex to be excluded
+from the output diff. This is the default state of difffilter. I.e.,
+$ \fBdifffilter\fP \fB-e\fP 'configure$'
+has the same functionality of
+$ \fBdifffilter\fP \fB-x\fP \fB-e\fP 'configure$' .
+.TP
+.B
+\fB-b\fP
+Attempt to make the patch appear as if it were generated using \fBdiff\fP(1)'s \fB-b\fP
+option. This is similar to \fB-w\fP but only removes changes involving changes
+in the amount of whitespace. This means that completely removing a block of
+whitespace or inserting whitespace between two non-whitespace characters
+will still be seen as a change. See \fBdiff\fP(1) for more details.
+.TP
+.B
+\fB-k\fP BRE
+A POSIX Basic Regular Expression which will be matched against
+the name of a CVS keyword whose effect is to be nullified. For example, if
+the CVS keyword looks like $Pizza: I'm hungry$, a regex of `hungry' would
+not match but a regex of `Pi.*a$' would.
+.TP
+.B
+\fB-K\fP ERE
+Like \fB-k\fP but uses a POSIX Extended Regular Expression.
+.TP
+.B
+\fB-R\fP
+Reverse the patch. This is intended to recover from accidents when the
+sources used to generate a diff are not available but the reverse diff
+is.
+.TP
+.B
+\fB-U\fP lines
+Reduce the number of lines of context of the diff to the specified
+number of lines. Specify \fB-1\fP or a high number to avoid reducing the number
+of lines of context. This is set to \fB-1\fP by default. You should set it to 3 in
+most cases so that the effects of \fB-k\fP, \fB-b\fP, \fB-w\fP, and other flags can be more useful.
+.TP
+.B
+\fB-w\fP
+Attempt to make the patch as if it had been created by \fBdiff\fP(1) with the
+\fB-w\fP option. This removes changes from the input diff for which only whitespace
+was added or removed.
+.SH EXAMPLES
+This command should be adequate to filter out many auto-generated
+files that don't belong in a Version Control System. This will
+filter out files like config.log, config.status, Makefile, and
+Makefile.in. It preserves Makefile.am and sourcecode files. Not that
+\fB-E\fP is used instead of \fB-e\fP because the command utilizes Extended
+Regular Expressions.
+.PP
+.nf
+.fam C
+ $ difffilter -E '(^|/)config\.(log|status|guess|rpath|sub)$' -E '(^|/)(install-sh|configure|ac(include|local)\.m4|ltmain\.sh|lt[^/]*\.m4)$' -a -E '(^|/)Makefile\.am$' -x -E '(^|/)Makefile' < dirty.patch > clean.patch
+
+.fam T
+.fi
+If a dirty patch is submitted to a bugtracker with random whitespace
+changes which should be ignored, the patch may be feed through
+\fBdifffilter\fP with the \fB-b\fP or \fB-w\fP options. For most cases, \fB-b\fP is more
+reasonable -- and is definitely safer than \fB-w\fP. See the CVS keyword
+removal example for information on how \fB-U\fP might apply to this
+situation.
+.PP
+.nf
+.fam C
+ $ difffilter -w < bug-34567-dirty.patch > bug-34567-clean.patch
+
+.fam T
+.fi
+If you want to see only changes made to a particular file in a
+multifile patch, such as README.txt, you may use the \fB-a\fP and \fB-x\fP flags
+to effectively invert the normal filtering convention. Any files
+which match expressions following an \fB-a\fP will be accepted if that
+rule is processed. To revert \fBdifffilter\fP back to its normal mode of
+treating expressions as files to discard, use \fB-x\fP. We use an empty
+regular expression after the \fB-x\fP because the empty regular expression
+matches everything and we want to discard everything but
+README.txt. One can also easily modify this example to extract all
+changes to \.c$ or \.h$ files.
+.PP
+.nf
+.fam C
+ $ difffilter -a -e 'README\.txt$' -x -e '' < changes-bigpatch.patch > README.txt-changes.patch
+
+.fam T
+.fi
+To nullify diff lines which are caused by changes in CVS keywords'
+content, use the \fB-k\fP and \fB-K\fP options. For example, a diff might catch
+changes in an $Id: $ line, which is likely to happen when creating
+diffs from tarballs, where CVS control files are not available. If
+the $Id: $ line has change in the diff meaning that there are two
+versions of the $Id: $, the user is likely going to be applying the
+diff to the same file which would have a third value for the $Id: $
+line. Thus, applying such a patch would be troublesome (depending on
+the method of applying it). With \fB-k\fP and \fB-K\fP, we can get
+.PP
+.nf
+.fam C
+ $ difffilter -k Id < not-from-cvs.patch > not-from-cvs-fixed.patch
+
+ - /* $Id: binki /var/test/etc/rc.conf.RCS 1.1$ */
+ + /* $Id: mgorny /var/test/etc/rc.conf.RCS 2.1.5.3$ */
+
+.fam T
+.fi
+to be nullified. This means that we end up getting rid of the '+'
+and '-' lines and end up with a ' ' line:
+.PP
+.nf
+.fam C
+ /* $Id: binki /var/test/etc/rc.conf.RCS 1.1$ */
+
+.fam T
+.fi
+To most effectively avoid such problems, the change should be first
+nullified with \fB-k\fP or \fB-K\fP. Then the \fB-U\fP option should be used. The \fB-U\fP
+option is used to reduce the number of lines of context a diff may
+have. It would be customary to pass the value 3 to this option. If a
+certain block or a portion of the diff has a series of 3 or more
+null or noop lines, then \fBdifffilter\fP starts removing these. If a
+whole block (or chunk, as \fBpatch\fP(1) calls it) contains no changes,
+then \fBdifffilter\fP will completely drop that block from the diff. In
+many cases, this may completely remove the block, especially when
+(as is often the case) the CVS keyword being nullified is a line in
+the header comments of a file where actual edits occur infrequently.
+.PP
+.nf
+.fam C
+ $ difffilter -k Id -U 3 < not-from-cvs.patch > not-from-cvs-fixed.patch
+
+.fam T
+.fi
+.SH SEE ALSO
+\fBcolordiff\fP(1), \fBdiff\fP(1), \fBpatch\fP(1), \fBhg\fP(1)
+.SH BUGS
+There are no known bugs.
+.PP
+There is a bug tracker at http://ohnopub.net/bugzilla/ .
+.SH AUTHOR
+Nathan Phillip Brink (binki) <ohnobinki@ohnopublishing.net>
diff --git a/dev-util/difffilter/metadata.xml b/dev-util/difffilter/metadata.xml
index 097975e3adc2..fed47a353275 100644
--- a/dev-util/difffilter/metadata.xml
+++ b/dev-util/difffilter/metadata.xml
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+<maintainer type='person'>
+<email>jer@gentoo.org</email>
+</maintainer>
</pkgmetadata>