diff --git a/textproc/xincluder/Makefile b/textproc/xincluder/Makefile index d882781a5a81..247ce5c9a7df 100644 --- a/textproc/xincluder/Makefile +++ b/textproc/xincluder/Makefile @@ -1,42 +1,54 @@ PORTNAME= xincluder PORTVERSION= 1.0.d11 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= textproc java MASTER_SITES= ftp://ftp.ibiblio.org/pub/languages/java/javafaq/ DISTNAME= ${PORTNAME}-1.0d11 MAINTAINER= ports@FreeBSD.org COMMENT= Java-based XInclude processors WWW= http://xincluder.sourceforge.net/ LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/lgpl.txt +BUILD_DEPENDS= ${JAVALIBDIR}/jdom.jar:java/jdom \ + ${JAVALIBDIR}/xercesImpl.jar:textproc/xerces-j RUN_DEPENDS= ${JAVALIBDIR}/jdom.jar:java/jdom \ ${JAVALIBDIR}/xercesImpl.jar:textproc/xerces-j USE_JAVA= yes -NO_BUILD= yes +USE_ANT= yes +ALL_TARGET= clean jar NO_ARCH= yes WRKSRC= ${WRKDIR}/${PORTNAME} SUFFIXES= -sax -dom -jdom -PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar bin/xincluder ${SUFFIXES:S,^,bin/xincluder,} +PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}.jar bin/xincluder ${SUFFIXES:S,^,bin/xincluder,} PORTDOCS= apidoc index.html SUB_FILES= xincluder.sh OPTIONS_DEFINE= DOCS +post-patch: + @${REINPLACE_CMD} \ + -e "s,\./lib/jdom-1.0b9rc.jar,${JAVAJARDIR}/jdom.jar," \ + -e "s,\./lib/xercesImpl-2.0.2.jar,${JAVAJARDIR}/xercesImpl.jar," \ + -e "s,\./lib/xmlParserAPIs-2.0.2.jar,${JAVAJARDIR}/xml-apis.jar," \ + -e 's, diff --git a/textproc/xincluder/files/patch-src_com_elharo_xml_xinclude_JDOMXIncluder.java b/textproc/xincluder/files/patch-src_com_elharo_xml_xinclude_JDOMXIncluder.java new file mode 100644 index 000000000000..6f0ff222e753 --- /dev/null +++ b/textproc/xincluder/files/patch-src_com_elharo_xml_xinclude_JDOMXIncluder.java @@ -0,0 +1,24 @@ +--- src/com/elharo/xml/xinclude/JDOMXIncluder.java.orig 2003-03-09 16:01:34 UTC ++++ src/com/elharo/xml/xinclude/JDOMXIncluder.java +@@ -54,6 +54,7 @@ import org.jdom.CDATA; + import org.jdom.Namespace; + import org.jdom.Comment; + import org.jdom.CDATA; ++import org.jdom.DocType; + import org.jdom.Text; + import org.jdom.JDOMException; + import org.jdom.Attribute; +@@ -404,6 +405,13 @@ public class JDOMXIncluder { + // I need to return the full document child list including comments and PIs, + // not just the resolved root + List topLevelNodes = doc.getContent(); ++ for (int i = 0; i < topLevelNodes.size(); i++) { ++ Object o = topLevelNodes.get(i); ++ if (o instanceof DocType) { ++ DocType docType = (DocType) o; ++ docType.detach(); ++ } ++ } + int rootPosition = topLevelNodes.indexOf(root); + List beforeRoot = topLevelNodes.subList(0, rootPosition); + List afterRoot = topLevelNodes.subList(rootPosition+1, topLevelNodes.size());