diff options
author | spz <spz@pkgsrc.org> | 2010-01-31 17:10:08 +0000 |
---|---|---|
committer | spz <spz@pkgsrc.org> | 2010-01-31 17:10:08 +0000 |
commit | e66acabe5943035640eea2d8bac6dedba67d1484 (patch) | |
tree | 7d08f93e75eb2ff2157d92c5ba18e65b6bc8f299 | |
parent | bd9f8dc0aff6ea05a76b138f575265dda2a29e1f (diff) | |
download | pkgsrc-e66acabe5943035640eea2d8bac6dedba67d1484.tar.gz |
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.
-rw-r--r-- | devel/flex/distinfo | 3 | ||||
-rw-r--r-- | devel/flex/patches/patch-ad | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/devel/flex/distinfo b/devel/flex/distinfo index f3343aa3c27..d59a8dd27bf 100644 --- a/devel/flex/distinfo +++ b/devel/flex/distinfo @@ -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 @@ Size (flex-2.5.35.tar.gz) = 1456620 bytes SHA1 (patch-aa) = 938335a9071be62f534bad8e785003318816fd38 SHA1 (patch-ab) = 84e8f679973ffa298391bfe20215f5c6878ed65e SHA1 (patch-ac) = 27ac026f8a180b49523933c5d70db0237e8dc095 +SHA1 (patch-ad) = b7fe34269e4425a7b3871278bb6a2b1e754c9045 diff --git a/devel/flex/patches/patch-ad b/devel/flex/patches/patch-ad new file mode 100644 index 00000000000..a09b6971653 --- /dev/null +++ b/devel/flex/patches/patch-ad @@ -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) { |