aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2006-06-02 03:26:51 +0800
committermux <mux@FreeBSD.org>2006-06-02 03:26:51 +0800
commit481e9a5a618f3ef15e106954f94c699ccb11eb5a (patch)
tree1985b71b8761ca1dda84d10dee974f1418b2e42e /textproc
parent0e7fa204f9d03a66e69b4d32ebd34431c751c3ef (diff)
downloadfreebsd-ports-gnome-481e9a5a618f3ef15e106954f94c699ccb11eb5a.tar.gz
freebsd-ports-gnome-481e9a5a618f3ef15e106954f94c699ccb11eb5a.tar.zst
freebsd-ports-gnome-481e9a5a618f3ef15e106954f94c699ccb11eb5a.zip
Add a patch from the upstream author to fix a well-known bug when parsing
XML files with attributes containing the ' %' character.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/hs-HaXml/Makefile2
-rw-r--r--textproc/hs-HaXml/files/patch-1.13-percent21
-rw-r--r--textproc/hs-haxml/Makefile2
-rw-r--r--textproc/hs-haxml/files/patch-1.13-percent21
4 files changed, 44 insertions, 2 deletions
diff --git a/textproc/hs-HaXml/Makefile b/textproc/hs-HaXml/Makefile
index 7baddab76c44..9c0377c1ac8f 100644
--- a/textproc/hs-HaXml/Makefile
+++ b/textproc/hs-HaXml/Makefile
@@ -6,7 +6,7 @@
PORTNAME= haxml
PORTVERSION= 1.13
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= textproc haskell
MASTER_SITES= http://www.haskell.org/HaXml/ \
ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/
diff --git a/textproc/hs-HaXml/files/patch-1.13-percent b/textproc/hs-HaXml/files/patch-1.13-percent
new file mode 100644
index 000000000000..75858eaa11e9
--- /dev/null
+++ b/textproc/hs-HaXml/files/patch-1.13-percent
@@ -0,0 +1,21 @@
+--- src/Text/XML/HaXml/Lex.hs.orig 2005-04-19 13:22:15.000000000 +0100
++++ src/Text/XML/HaXml/Lex.hs 2006-02-21 15:46:57.000000000 +0000
+@@ -194,12 +194,12 @@
+ | close `prefixes` (s:ss) = emit (TokFreeText (reverse acc)) pos:
+ emit tok p:
+ skip (length close-1) (addcol 1 p) ss k
+- | s=='&'||s=='%' = (if not (null acc)
+- then (emit (TokFreeText (reverse acc)) pos:)
+- else id)
+- (emit (if s=='&' then TokAmp else TokPercent) p:
+- textUntil ";" TokSemi "" p (addcol 1 p) ss
+- (\p' i-> textOrRefUntil close tok "" p p' i k))
++ | s=='&' = (if not (null acc)
++ then (emit (TokFreeText (reverse acc)) pos:)
++ else id)
++ (emit TokAmp p:
++ textUntil ";" TokSemi "" p (addcol 1 p) ss
++ (\p' i-> textOrRefUntil close tok "" p p' i k))
+ | isSpace s = textOrRefUntil close tok (s:acc) pos (white s p) ss k
+ | otherwise = textOrRefUntil close tok (s:acc) pos (addcol 1 p) ss k
+
diff --git a/textproc/hs-haxml/Makefile b/textproc/hs-haxml/Makefile
index 7baddab76c44..9c0377c1ac8f 100644
--- a/textproc/hs-haxml/Makefile
+++ b/textproc/hs-haxml/Makefile
@@ -6,7 +6,7 @@
PORTNAME= haxml
PORTVERSION= 1.13
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= textproc haskell
MASTER_SITES= http://www.haskell.org/HaXml/ \
ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/
diff --git a/textproc/hs-haxml/files/patch-1.13-percent b/textproc/hs-haxml/files/patch-1.13-percent
new file mode 100644
index 000000000000..75858eaa11e9
--- /dev/null
+++ b/textproc/hs-haxml/files/patch-1.13-percent
@@ -0,0 +1,21 @@
+--- src/Text/XML/HaXml/Lex.hs.orig 2005-04-19 13:22:15.000000000 +0100
++++ src/Text/XML/HaXml/Lex.hs 2006-02-21 15:46:57.000000000 +0000
+@@ -194,12 +194,12 @@
+ | close `prefixes` (s:ss) = emit (TokFreeText (reverse acc)) pos:
+ emit tok p:
+ skip (length close-1) (addcol 1 p) ss k
+- | s=='&'||s=='%' = (if not (null acc)
+- then (emit (TokFreeText (reverse acc)) pos:)
+- else id)
+- (emit (if s=='&' then TokAmp else TokPercent) p:
+- textUntil ";" TokSemi "" p (addcol 1 p) ss
+- (\p' i-> textOrRefUntil close tok "" p p' i k))
++ | s=='&' = (if not (null acc)
++ then (emit (TokFreeText (reverse acc)) pos:)
++ else id)
++ (emit TokAmp p:
++ textUntil ";" TokSemi "" p (addcol 1 p) ss
++ (\p' i-> textOrRefUntil close tok "" p p' i k))
+ | isSpace s = textOrRefUntil close tok (s:acc) pos (white s p) ss k
+ | otherwise = textOrRefUntil close tok (s:acc) pos (addcol 1 p) ss k
+