Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,11 +1,12 @@
#!@PERL5@
#
# $NetBSD: patchdiff.pl,v 1.15 2011/03/04 15:57:07 wiz Exp $
# $NetBSD: patchdiff.pl,v 1.16 2016/02/10 16:00:10 wiz Exp $
#
# patchdiff: compares a set of patches in the patch dir with their predecessors
#
# Copyright (c) 2000, 2011 by Dieter Baron <dillo@giga.or.at> and
# Thomas Klausner <wiz@NetBSD.org>
# Copyright (c) 2016 Thomas Klausner <wiz@NetBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -120,26 +121,7 @@ foreach (sort <HANDLE>) {
if (! -f "$new") {
print "File $new removed\n";
} else {
# system("diff",$orig{$patch},$new{$patch});
$diff=`diff $orig $new`;
# the following regex try to eliminate uninteresting differences
# The general structure of the diffs-to-be-removed is:
# 25c25
# < --- something.orig 2008-08-08 08:08
# ---
# > --- something.orig 2008-08-08 18:08
#
# In particular, remove hunks with:
# . NetBSD RCS Id tag differences
$diff=~s/^[\d,]+c[\d,]+\n..\$[N]etBSD.*\$\n---\n..\$[N]etBSD.*\$\n//m;
# . the name of the input file changed
# (if the name of the output file has changed, patches
# won't get matched up anyway)
# . time of the input and/or output file changed
# . line numbers changed
$diff=~s/^[\d,]+c[\d,]+\n(?:.\s---\s(:?\S+).*\n)?(?:.\s\+\+\+\s(\S+).*\n)?(?:.\s@@\s(?:.*)\s@@.*\n)?---\n(?:.\s---\s\S+.*\n)?(?:.\s\+\+\+\s\S+.*\n)?(?:.\s@@\s.*\s@@.*\n)?//m;
# . only line numbers changed
$diff=~s/^[\d,]+c[\d,]+\n.\s@@\s.*\s@@.*\n---\n.\s@@\s.*\s@@.*\n//mg;
if ($diff) {
if (! -s $orig) {
print "New file $new\n";
@@ -147,8 +129,7 @@ foreach (sort <HANDLE>) {
print "Comparing $orig to $new\n$diff";
}
} else {
# restore previous version to get rid of uninteresting diffs
rename "$orig", "$new";
print "$orig and $new are the same";
}
}
}