diff options
author | mva <mva@FreeBSD.org> | 2014-09-22 00:58:59 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2014-09-22 00:58:59 +0800 |
commit | b3f73cd7303e82aa15a5bfb170612d52e2ab6987 (patch) | |
tree | 2fe993833f243cd54a50a2e14586d4f088a5a0be | |
parent | fa9a63ef94737b890b2aa966c90b283459567aa7 (diff) | |
download | freebsd-ports-gnome-b3f73cd7303e82aa15a5bfb170612d52e2ab6987.tar.gz freebsd-ports-gnome-b3f73cd7303e82aa15a5bfb170612d52e2ab6987.tar.zst freebsd-ports-gnome-b3f73cd7303e82aa15a5bfb170612d52e2ab6987.zip |
- Fix diff scan and output for new files within a non-CVS diff
- Fix file name mangling for new files with whitespace
- Convert line endings to unix
This also should fix an issue in Bugzilla for patch attachments being
truncated, if they contain new files.
Some changes from https://rt.cpan.org/Public/Bug/Display.html?id=94181 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=399391 were incorporated in this
patch.
PR: 193785, 190724
Approved by: toni.viemero@iki.fi (maintainer)
-rw-r--r-- | devel/p5-PatchReader/Makefile | 3 | ||||
-rw-r--r-- | devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm | 24 |
2 files changed, 26 insertions, 1 deletions
diff --git a/devel/p5-PatchReader/Makefile b/devel/p5-PatchReader/Makefile index 1bc967017e33..a1485f0ebfc2 100644 --- a/devel/p5-PatchReader/Makefile +++ b/devel/p5-PatchReader/Makefile @@ -3,6 +3,7 @@ PORTNAME= PatchReader PORTVERSION= 0.9.6 +PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= CPAN MASTER_SITE_SUBDIR= CPAN:TMANNERM @@ -11,7 +12,7 @@ PKGNAMEPREFIX= p5- MAINTAINER= toni.viemero@iki.fi COMMENT= Perl module with utilities to read and manipulate patches and CVS -USES= perl5 +USES= perl5 dos2unix USE_PERL5= configure .include <bsd.port.mk> diff --git a/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm b/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm new file mode 100644 index 000000000000..513aae67f829 --- /dev/null +++ b/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm @@ -0,0 +1,24 @@ +--- lib/PatchReader/Raw.pm.orig 2014-09-20 06:54:09 UTC ++++ lib/PatchReader/Raw.pm +@@ -41,7 +41,7 @@ + return if $line =~ /^\?/; + + # patch header parsing +- if ($line =~ /^---\s*([\S ]+)\s*\t([^\t\r\n]*)\s*(\S*)/) { ++ if ($line =~ /^---\s+([\S ]+)\s*?(?:\t([^\t\r\n]*)\s*(\S*))?/) { + $this->_maybe_end_file(); + + if ($1 eq "/dev/null") { +@@ -54,9 +54,12 @@ + + $this->{IN_HEADER} = 1; + +- } elsif ($line =~ /^\+\+\+\s*([\S ]+)\s*\t([^\t\r\n]*)(\S*)/) { ++ } elsif ($line =~ /^\+\+\+\s+([\S ]+)\s*?(?:\t([^\t\r\n]*)(\S*))?/) { + if ($1 eq "/dev/null") { + $this->{FILE_STATE}{is_remove} = 1; ++ } else { ++ $this->{FILE_STATE}{filename} = $1; + } + $this->{FILE_STATE}{new_date_str} = $2; + $this->{FILE_STATE}{new_revision} = $3 if $3; |