diff options
author | Gabor Pali <pgj@FreeBSD.org> | 2009-02-12 19:28:12 +0000 |
---|---|---|
committer | Gabor Pali <pgj@FreeBSD.org> | 2009-02-12 19:28:12 +0000 |
commit | 88f79e5e8d2373733ca6050ab74e43c047432205 (patch) | |
tree | e6d68e3d72a4b77255947dac8f238fefab287e92 /deskutils/checkrdf | |
parent | bd1ef0a2c4edf59e6cd2c31629dedd984fb8a587 (diff) | |
download | ports-88f79e5e8d2373733ca6050ab74e43c047432205.tar.gz ports-88f79e5e8d2373733ca6050ab74e43c047432205.zip |
- Fix broken build due to my recent HaXml update
PR: ports/131022
Submitted by: pgj
Approved by: maintainer (timeout), tabthorpe
Notes
Notes:
svn path=/head/; revision=228141
Diffstat (limited to 'deskutils/checkrdf')
-rw-r--r-- | deskutils/checkrdf/Makefile | 4 | ||||
-rw-r--r-- | deskutils/checkrdf/files/patch-CheckRDF.hs | 46 |
2 files changed, 48 insertions, 2 deletions
diff --git a/deskutils/checkrdf/Makefile b/deskutils/checkrdf/Makefile index 6aa80269aa72..e4a1ffc9961b 100644 --- a/deskutils/checkrdf/Makefile +++ b/deskutils/checkrdf/Makefile @@ -7,7 +7,7 @@ PORTNAME= checkrdf PORTVERSION= 39.4444 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= deskutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= checkrdf @@ -15,7 +15,7 @@ MASTER_SITE_SUBDIR= checkrdf MAINTAINER= obraun@FreeBSD.org COMMENT= A tool for RDF site summaries based news-check -BUILD_DEPENDS= Xtract:${PORTSDIR}/textproc/hs-haxml +BUILD_DEPENDS= hs-haxml>=1.19:${PORTSDIR}/textproc/hs-haxml USE_BZIP2= yes diff --git a/deskutils/checkrdf/files/patch-CheckRDF.hs b/deskutils/checkrdf/files/patch-CheckRDF.hs new file mode 100644 index 000000000000..5383389034d5 --- /dev/null +++ b/deskutils/checkrdf/files/patch-CheckRDF.hs @@ -0,0 +1,46 @@ +--- CheckRDF.hs.orig 2007-03-02 19:13:07.000000000 +0100 ++++ CheckRDF.hs 2009-01-26 18:28:22.000000000 +0100 +@@ -24,9 +24,12 @@ + import Directory ( doesFileExist, getPermissions, readable, removeFile ) + import List ( partition, intersperse, groupBy, sortBy) + import Time (getClockTime,toCalendarTime,calendarTimeToString) ++import Char (toLower) + + import Text.XML.HaXml.Types + import Text.XML.HaXml.Parse (xmlParse) ++import Text.XML.HaXml.Posn (noPos) ++import Text.XML.HaXml.Xtract.Lex (lexXtract) + import Text.XML.HaXml.Xtract.Parse (parseXtract) + import Text.PrettyPrint.HughesPJ (render, vcat) + import Text.XML.HaXml.Pretty (content) +@@ -52,15 +55,15 @@ + mkNewRDF :: RDFConfig -> FilePath -> String -> RDF + mkNewRDF config filename contents = + let elem = getElem $ xmlParse filename contents +- ct = render $ vcat $ map content $ dfilter (parseXtract "channel/title/-") elem +- cl = render $ vcat $ map content $ dfilter (parseXtract "channel/link/-") elem +- len1 = length $ dfilter (parseXtract "//item/title") elem +- len2 = length $ dfilter (parseXtract "//item/link") elem ++ ct = render $ vcat $ map content $ dfilter (parseXtract (lexXtract (map toLower) "channel/title/-")) elem ++ cl = render $ vcat $ map content $ dfilter (parseXtract (lexXtract (map toLower) "channel/link/-")) elem ++ len1 = length $ dfilter (parseXtract (lexXtract (map toLower) "//item/title")) elem ++ len2 = length $ dfilter (parseXtract (lexXtract (map toLower) "//item/link")) elem + items = if len1 == len2 + then (map (\ i -> (render $ vcat $ map content $ +- dfilter (parseXtract ("//item/title["++i++"]/-")) elem ++ dfilter (parseXtract (lexXtract (map toLower) ("//item/title["++i++"]/-"))) elem + ,render $ vcat $ map content $ +- dfilter (parseXtract ("//item/link["++i++"]/-" )) elem) ++ dfilter (parseXtract (lexXtract (map toLower) ("//item/link["++i++"]/-" ))) elem) + ) + $ map show [0..len1-1]) + else [] +@@ -69,7 +72,7 @@ + ,clink = cl + ,citems = rdfitems + } +- where getElem (Document _ _ e _) = CElem e ++ where getElem (Document _ _ e _) = CElem e noPos + dfilter f = \ x -> f x x + mkRDFItem (t,l) = RDFItem {title = substituteChar '\n' ' ' $ rmCDATA t + ,link = filter (/='\n') $ rmCDATA l |