ports/131022: [UPDATE] deskutils/checkrdf - Fix Broken Build Due to HaXml Update
Gabor PALI
pgj at FreeBSD.org
Mon Jan 26 18:50:05 UTC 2009
>Number: 131022
>Category: ports
>Synopsis: [UPDATE] deskutils/checkrdf - Fix Broken Build Due to HaXml Update
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 26 18:50:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Gabor PALI
>Release: 7.1-STABLE
>Organization:
The FreeBSD Project
>Environment:
FreeBSD xxx 7.1-STABLE FreeBSD 7.1-STABLE #1: Fri Jan 23 20:38:51 CET 2009 xxx:/usr/obj/usr/src/sys/NON-GENERIC i386
>Description:
Pointyhat has reported that deskutils/checkrdf is broken [1] due to my recent HaXml update [2]. In version 1.17 and older, HaXml introduced some API changes [3], and it resulted problems.
Sorry for this. I propose a patch to fix the port. I have not tested it, but it unbreaks the build with minimal changes to the original source code.
[1] http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.7.20090125074245/checkrdf-39.4444_1.log
[2] http://www.freebsd.org/cgi/getmsg.cgi?fetch=1256100+0+/usr/local/www/db/text/2009/cvs-ports/20090125.cvs-ports
[3] http://www.cs.york.ac.uk/fp/HaXml-devel/migrate.html
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/deskutils/checkrdf/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile 25 Jul 2008 09:38:41 -0000 1.14
+++ Makefile 26 Jan 2009 18:40:12 -0000
@@ -7,7 +7,7 @@
PORTNAME= checkrdf
PORTVERSION= 39.4444
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= deskutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= checkrdf
Index: files/patch-CheckRDF.hs
===================================================================
RCS file: files/patch-CheckRDF.hs
diff -N files/patch-CheckRDF.hs
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-CheckRDF.hs 26 Jan 2009 18:40:12 -0000
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list