public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jim Ramsay (lack)" <lack@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: vim.eclass
Date: Mon, 18 May 2009 17:02:32 +0000	[thread overview]
Message-ID: <E1M66ES-0004v2-7Q@stork.gentoo.org> (raw)

lack        09/05/18 17:02:32

  Modified:             vim.eclass
  Log:
  Allow either gzipped or uncompressed patches in the tarball.
  
  Also removed date-seeking regexp to find first and second lines of the patch
  since as of 7.2.167 the date format in all vim.org patches has changed.  It is
  less work (while marginally less correct) to just look for lines that start with
  '***' and do not end with '****' (and "---" / "----" for the second line).

Revision  Changes    Path
1.174                eclass/vim.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/vim.eclass?rev=1.174&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/vim.eclass?rev=1.174&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/vim.eclass?r1=1.173&r2=1.174

Index: vim.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -r1.173 -r1.174
--- vim.eclass	10 Oct 2008 13:44:16 -0000	1.173
+++ vim.eclass	18 May 2009 17:02:32 -0000	1.174
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.173 2008/10/10 13:44:16 hawking Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.174 2009/05/18 17:02:32 lack Exp $
 
 # Authors:
 # 	Ryan Phillips <rphillips@gentoo.org>
@@ -160,21 +160,40 @@
 	#
 	# Changed awk to gawk in the below; BSD's awk chokes on it
 	# --spb, 2004/12/18
+	#
+	# Allow either gzipped or uncompressed patches in the tarball.
+	# --lack 2009-05-18
+	# 
+	# Also removed date-seeking regexp to find first and second lines of the
+	# patch since as of 7.2.167 the date format has changed.  It is less work
+	# (while marginally less correct) to just look for lines that start with
+	# '***' and do not end with '****' (and "---" / "----" for the second line).
+	# --lack 2009-05-18
 	einfo "Filtering vim patches ..."
 	p=${WORKDIR}/${VIM_ORG_PATCHES%.tar*}.patch
 	ls "${WORKDIR}"/vimpatches | sort | \
-	while read f; do gzip -dc "${WORKDIR}"/vimpatches/${f}; done | gawk '
+	while read f; do 
+		local fpath="${WORKDIR}"/vimpatches/${f}
+		case $f in
+			*.gz)
+				gzip -dc "${fpath}"
+				;;
+			*)
+				cat "${fpath}"
+				;;
+		esac
+	done | gawk '
 		/^Subject: [Pp]atch/ {
 			if (patchnum) {printf "\n" >"/dev/stderr"}
 			patchnum = $3
 			printf "%s:", patchnum >"/dev/stderr"
 		}
-		$1=="***" && $(NF-1)~/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]$/ {
+		$1=="***" && $(NF)!="****" {
 			# First line of a patch; suppress printing
 			firstlines = $0
 			next
 		}
-		$1=="---" && $(NF-1)~/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]$/ {
+		$1=="---" && $(NF)!="----" {
 			# Second line of a patch; try to open the file to see
 			# if it exists.
 			thisfile = $2
@@ -205,7 +224,7 @@
 		' > ${p} || die
 
 	# For reasons yet unknown, epatch fails to apply this cleanly
-	ebegin "Applying filtered vim patches ..."
+	ebegin "Applying filtered vim patches"
 	TMPDIR=${T} patch -f -s -p0 < ${p}
 	eend 0
 }






             reply	other threads:[~2009-05-18 17:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-18 17:02 Jim Ramsay (lack) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-11-28 18:13 [gentoo-commits] gentoo-x86 commit in eclass: vim.eclass Jim Ramsay (lack)
2011-08-20 15:46 Jim Ramsay (lack)
2011-08-18  2:48 Jim Ramsay (lack)
2011-07-13  4:22 Jim Ramsay (lack)
2011-07-13  1:06 Jim Ramsay (lack)
2011-03-28  6:47 Diego Petteno (flameeyes)
2011-03-24 17:43 Jim Ramsay (lack)
2011-03-14  8:22 Tim Harder (radhermit)
2011-03-06 10:19 Tim Harder (radhermit)
2011-01-04 13:55 Jim Ramsay (lack)
2010-07-20 13:53 Jim Ramsay (lack)
2010-07-15 13:11 Jim Ramsay (lack)
2010-06-09 18:35 Jim Ramsay (lack)
2010-05-03  1:41 Jim Ramsay (lack)
2010-04-15 19:23 Jeremy Olexa (darkside)
2010-03-28  2:23 Jim Ramsay (lack)
2010-03-26 18:40 Jim Ramsay (lack)
2010-03-23 16:02 Jeremy Olexa (darkside)
2009-10-21 22:20 Jim Ramsay (lack)
2009-10-17 18:30 Jim Ramsay (lack)
2009-10-17 17:10 Jim Ramsay (lack)
2009-10-17 13:43 Jim Ramsay (lack)
2009-10-14  1:29 Jim Ramsay (lack)
2009-10-11 11:49 Markus Meier (maekke)
2008-10-10 13:44 Ali Polatel (hawking)
2008-07-26 14:20 Ali Polatel (hawking)
2008-04-06  9:22 Ali Polatel (hawking)
2008-03-03 15:09 Ali Polatel (hawking)
2008-01-09 21:14 Ali Polatel (hawking)
2007-11-07 15:01 Ali Polatel (hawking)
2007-09-27  9:32 Ali Polatel (hawking)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1M66ES-0004v2-7Q@stork.gentoo.org \
    --to=lack@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox