pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/flex The comment above the code patch in the new...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1893db3b7e1b
branches:  trunk
changeset: 570526:1893db3b7e1b
user:      spz <spz%pkgsrc.org@localhost>
date:      Sun Jan 31 17:10:08 2010 +0000

description:
The comment above the code patch in the new patch file says:
"This is a Hail Mary situation. It seems to work."
It doesn't reliably on NetBSD-5 or -current; namely, it makes flex
spit out a "Broken pipe" when presented with an input file on stdin.

Finding the problem area and suggesting a workaround kudos mlelstv.
There are better ways to fix it properly, which will be employed
in Due Time.

diffstat:

 devel/flex/distinfo         |   3 ++-
 devel/flex/patches/patch-ad |  14 ++++++++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 324716614461 -r 1893db3b7e1b devel/flex/distinfo
--- a/devel/flex/distinfo       Sun Jan 31 12:14:24 2010 +0000
+++ b/devel/flex/distinfo       Sun Jan 31 17:10:08 2010 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2008/05/21 12:54:32 tnn Exp $
+$NetBSD: distinfo,v 1.12 2010/01/31 17:10:08 spz Exp $
 
 SHA1 (flex-2.5.35.tar.gz) = 333c876a8e24ae5a17d9573459fc501b7721930b
 RMD160 (flex-2.5.35.tar.gz) = 648645f4751ec5029f510730577f5c3e291b7a5e
@@ -6,3 +6,4 @@
 SHA1 (patch-aa) = 938335a9071be62f534bad8e785003318816fd38
 SHA1 (patch-ab) = 84e8f679973ffa298391bfe20215f5c6878ed65e
 SHA1 (patch-ac) = 27ac026f8a180b49523933c5d70db0237e8dc095
+SHA1 (patch-ad) = b7fe34269e4425a7b3871278bb6a2b1e754c9045
diff -r 324716614461 -r 1893db3b7e1b devel/flex/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/flex/patches/patch-ad       Sun Jan 31 17:10:08 2010 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1 2010/01/31 17:10:08 spz Exp $
+
+--- filter.c.orig      2007-03-07 21:50:24.000000000 +0000
++++ filter.c
+@@ -164,7 +164,8 @@ bool filter_apply_chain (struct filter *
+               if (dup2 (pipes[0], fileno (stdin)) == -1)
+                       flexfatal (_("dup2(pipes[0],0)"));
+               close (pipes[0]);
+-        fseek (stdin, 0, SEEK_CUR);
++        ungetc(' ', stdin); /* still an evil hack, but one that works better */
++      (void)fgetc(stdin); /* on NetBSD than the fseek attempt does */
+ 
+               /* run as a filter, either internally or by exec */
+               if (chain->filter_func) {



Home | Main Index | Thread Index | Old Index