diff options
author | Krzysztof Pawlik <nelchael@gentoo.org> | 2006-07-29 15:49:15 +0000 |
---|---|---|
committer | Krzysztof Pawlik <nelchael@gentoo.org> | 2006-07-29 15:49:15 +0000 |
commit | 7b80b18403f3fc3c5a53957f9e08e1321343d84f (patch) | |
tree | 3b2803dce0c3982b83ae1719434a45e29d779d3c /dev-java/xdoclet/files | |
parent | Create /var/run/pulse directory during install, thanks to Florian Steinel for... (diff) | |
download | gentoo-2-7b80b18403f3fc3c5a53957f9e08e1321343d84f.tar.gz gentoo-2-7b80b18403f3fc3c5a53957f9e08e1321343d84f.tar.bz2 gentoo-2-7b80b18403f3fc3c5a53957f9e08e1321343d84f.zip |
Add missing patches, see bug #141583.
(Portage version: 2.1.1_pre4)
Diffstat (limited to 'dev-java/xdoclet/files')
-rw-r--r-- | dev-java/xdoclet/files/xdoclet-1.2.3-buildfile.patch | 48 | ||||
-rw-r--r-- | dev-java/xdoclet/files/xdoclet-1.2.3-interface.patch | 271 |
2 files changed, 319 insertions, 0 deletions
diff --git a/dev-java/xdoclet/files/xdoclet-1.2.3-buildfile.patch b/dev-java/xdoclet/files/xdoclet-1.2.3-buildfile.patch new file mode 100644 index 000000000000..968485e71959 --- /dev/null +++ b/dev-java/xdoclet/files/xdoclet-1.2.3-buildfile.patch @@ -0,0 +1,48 @@ +diff -urpN xdoclet-1.2.2.orig/build.xml xdoclet-1.2.2/build.xml +--- xdoclet-1.2.2.orig/build.xml 2005-04-03 05:13:08.000000000 +0200 ++++ xdoclet-1.2.2/build.xml 2005-04-03 05:13:12.000000000 +0200 +@@ -75,7 +75,7 @@ + <ant dir="${samples.dir}"/> + </target> + +- <target name="l10n" depends="core, modules"> ++ <target name="l10n"> + <!-- messages for each locale get built into a separate jar --> + <jar jarfile="${dist.lib.dir}/${name}-pt_BR-locale-${version}.jar"> + <fileset dir="${l10n.build.dir}"> +diff -urpN xdoclet-1.2.2.orig/core/build.xml xdoclet-1.2.2/core/build.xml +--- xdoclet-1.2.2.orig/core/build.xml 2005-04-03 05:13:08.000000000 +0200 ++++ xdoclet-1.2.2/core/build.xml 2005-04-03 05:13:12.000000000 +0200 +@@ -106,7 +106,7 @@ + <!-- =================================================================== --> + <!-- Compiles the source code --> + <!-- =================================================================== --> +- <target name="compile" depends="beautify"> ++ <target name="compile" depends="prepare"> + <mkdir dir="${modules.all-src.dir}"/> + <copy todir="${modules.all-src.dir}"> + <fileset dir="${core.src.dir}"> +diff -urpN xdoclet-1.2.2.orig/maven/build.xml xdoclet-1.2.2/maven/build.xml +--- xdoclet-1.2.2.orig/maven/build.xml 2005-04-03 05:13:08.000000000 +0200 ++++ xdoclet-1.2.2/maven/build.xml 2005-04-03 05:13:14.000000000 +0200 +@@ -77,7 +77,7 @@ + </jar> + + <!-- Install the plugin if MAVEN_HOME/MAVEN_LOCAL_HOME is defined --> +- <antcall target="install"/> ++ <!--antcall target="install"/--> + </target> + + <target name="clean"> +diff -urpN xdoclet-1.2.2.orig/modules/modules-common.ent xdoclet-1.2.2/modules/modules-common.ent +--- xdoclet-1.2.2.orig/modules/modules-common.ent 2005-04-03 05:13:08.000000000 +0200 ++++ xdoclet-1.2.2/modules/modules-common.ent 2005-04-03 05:13:12.000000000 +0200 +@@ -190,7 +190,7 @@ + <!-- =================================================================== --> + <!-- Compiles the source code --> + <!-- =================================================================== --> +- <target name="compile" depends="beautify" unless="module.jar.uptodate"> ++ <target name="compile" depends="init" unless="module.jar.uptodate"> + <mkdir dir="${module.classes.dir}"/> + <javac + destdir="${module.classes.dir}" diff --git a/dev-java/xdoclet/files/xdoclet-1.2.3-interface.patch b/dev-java/xdoclet/files/xdoclet-1.2.3-interface.patch new file mode 100644 index 000000000000..d7f9c2897873 --- /dev/null +++ b/dev-java/xdoclet/files/xdoclet-1.2.3-interface.patch @@ -0,0 +1,271 @@ +diff -uprN xdoclet-1.2.2.orig/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java xdoclet-1.2.2/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java +--- xdoclet-1.2.2.orig/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java 2004-10-14 04:39:06.000000000 +0200 ++++ xdoclet-1.2.2/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java 2005-04-03 15:20:31.000000000 +0200 +@@ -4,10 +4,7 @@ + */ + package xdoclet.modules.hibernate; + +-import java.util.Collection; +-import java.util.Iterator; +-import java.util.LinkedList; +-import java.util.Properties; ++import java.util.*; + + import org.apache.commons.logging.Log; + import org.apache.tools.ant.types.Parameter; +@@ -48,6 +45,18 @@ public class HibernateTagsHandler + + private Parameter currentOtherMapping; + ++ private static boolean isHibernated(XClass xClass) ++ { ++ if (xClass == null) { ++ return false; ++ } ++ ++ return ( ++ xClass.getDoc().getTag("hibernate.class") != null || ++ xClass.getDoc().getTag("hibernate.subclass") != null ++ ); ++ } ++ + /** + * Returns full path of hibernate file for the current class. + * +@@ -594,9 +603,11 @@ public class HibernateTagsHandler + log.debug("typeName=" + typeName); + + Collection classes = getXJavaDoc().getSourceClasses(); ++ List reorderedClasses = flattenHierachy(getCurrentClass(), classes); ++ + XClass clazz; + +- for (Iterator i = classes.iterator(); i.hasNext(); ) { ++ for (Iterator i = reorderedClasses.iterator(); i.hasNext(); ) { + clazz = (XClass) i.next(); + + log.debug("clazz=" + clazz); +@@ -604,8 +615,13 @@ public class HibernateTagsHandler + if (DocletSupport.isDocletGenerated(clazz)) { + log.debug("isDocletGenerated"); + } +- else if (clazz.getSuperclass() != null && clazz.getSuperclass().getQualifiedName().equals(typeName)) { +- log.debug("is a subclass"); ++ else if (isValidSubclass(clazz, getCurrentClass())) { ++ if (getCurrentClass().isInterface()) { ++ log.debug("is an implementing class"); ++ } ++ else { ++ log.debug("is a subclass"); ++ } + + XClass current = getCurrentClass(); + +@@ -735,10 +751,108 @@ public class HibernateTagsHandler + //TODO: Why do we need this!!?? + } + ++ private boolean isValidSubclass(XClass clazz, XClass currentClass) ++ { ++ String typeName = currentClass.getQualifiedName(); ++ ++ // easy case, clazz is implementing interface of hibernated class ++ // NB: not easy anymore, if we've got a hibernated interface hierachy ++ // only return true for "deepest" implemented interface in this hierachy ++ if (currentClass.isInterface() && clazz.isImplementingInterface(typeName)) { ++ List extending = currentClass.getExtendingInterfaces(); ++ ++ if (extending.isEmpty()) { ++ return true; ++ } ++ ++ for (int i = 0; i < extending.size(); i++) { ++ XClass xClass = (XClass) extending.get(i); ++ ++ if (isHibernated(xClass) && clazz.isImplementingInterface(xClass.getQualifiedName())) { ++ // we found an interface deeper in the hierachy ++ return false; ++ } ++ } ++ return true; ++ } ++ ++ if (clazz.getSuperclass() != null) { ++ // easy case, this class is direct subclass of the hibernated type ++ if (clazz.getSuperclass().equals(typeName)) { ++ return true; ++ } ++ else { ++ // go up class hierarchy to find first hibernate tag ++ XClass xc = clazz; ++ ++ do { ++ xc = xc.getSuperclass(); ++ ++ } while (xc != null && !isHibernated(xc)); ++ ++ // did we find a valid superclass, is it the current ? ++ if (xc != null) { ++ return xc.equals(currentClass); ++ } ++ } ++ } ++ ++ return false; ++ } ++ + private HibernateSubTask getHibernateSubTask() + { + return ((HibernateSubTask) (DocletContext.getInstance() + .getSubTaskBy(DocletTask.getSubTaskName(HibernateSubTask.class)))); + } ++ ++ /** ++ * Flattens the collection of classes by eliminating descendants (for hibernated non ++ * interface classes). ++ * ++ * @param currentClass ++ * @param classes ++ * @return ++ */ ++ private List flattenHierachy(XClass currentClass, Collection classes) ++ { ++ Log log = LogUtil.getLog(HibernateTagsHandler.class, "flattenHierachy"); ++ ++ log.debug("for class " + currentClass); ++ ++ if (!currentClass.isInterface()) { ++ List l = new ArrayList(classes); ++ ++ l.retainAll(currentClass.getAllSubclasses()); ++ return l; ++ } ++ ++ Set s = new HashSet(classes); ++ ++ log.debug("initial set size: " + s.size()); ++ ++ for (Iterator iterator = classes.iterator(); iterator.hasNext(); ) { ++ XClass xClass = (XClass) iterator.next(); ++ ++ if (xClass.isInterface() || !isHibernated(xClass)) { ++ continue; ++ } ++ ++ List subClasses = xClass.getAllSubclasses(); ++ ++ for (int i = 0; i < subClasses.size(); i++) { ++ XClass aClass = (XClass) subClasses.get(i); ++ ++ if (s.contains(aClass)) { ++ log.debug("removing " + aClass + " from set"); ++ s.remove(aClass); ++ } ++ } ++ } ++ ++ log.debug("new set size: " + s.size()); ++ ++ return new ArrayList(s); ++ } + } + +diff -uprN xdoclet-1.2.2.orig/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-properties.xdt xdoclet-1.2.2/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-properties.xdt +--- xdoclet-1.2.2.orig/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-properties.xdt 2004-10-10 11:43:05.000000000 +0200 ++++ xdoclet-1.2.2/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-properties.xdt 2005-04-03 15:20:31.000000000 +0200 +@@ -1,4 +1,4 @@ +- <XDtMethod:ifHasMethodTag tagName="hibernate.property"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.property" superclasses="false"> + <property + name="<XDtMethod:propertyName />" + type="<XDtMethod:methodTagValue tagName="hibernate.property" paramName="type" default="<XDtMethod:methodType/>"/>" +@@ -20,7 +20,7 @@ + </XDtHibernate:setCurrentTag> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one" superclasses="false"> + <many-to-one + name="<XDtMethod:propertyName/>" + class="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="class" default="<XDtMethod:methodType/>" />" +@@ -43,7 +43,7 @@ + </XDtHibernate:setCurrentTag> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.one-to-one"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.one-to-one" superclasses="false"> + <one-to-one + name="<XDtMethod:propertyName/>" + class="<XDtMethod:methodTagValue tagName="hibernate.one-to-one" paramName="class" default="<XDtMethod:methodType/>"/>" +@@ -59,7 +59,7 @@ + /> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.component"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.component" superclasses="false"> + <component + name="<XDtMethod:propertyName />" + class="<XDtMethod:methodTagValue tagName="hibernate.component" paramName="class" default="<XDtMethod:methodType/>"/>" +@@ -84,7 +84,7 @@ + /> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.set"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.set" superclasses="false"> + <set + <XDtHibernate:roleAttribute/>="<XDtMethod:propertyName/>" + <XDtMethod:ifHasMethodTag tagName="hibernate.set" paramName="table"> +@@ -114,7 +114,7 @@ + </set> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.bag"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.bag" superclasses="false"> + <bag + <XDtHibernate:roleAttribute/>="<XDtMethod:propertyName/>" + <XDtMethod:ifHasMethodTag tagName="hibernate.bag" paramName="table"> +@@ -143,7 +143,7 @@ + </bag> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.list"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.list" superclasses="false"> + <list + <XDtHibernate:roleAttribute/>="<XDtMethod:propertyName/>" + <XDtMethod:ifHasMethodTag tagName="hibernate.list" paramName="table"> +@@ -166,7 +166,7 @@ + </list> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.map"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.map" superclasses="false"> + <map + <XDtHibernate:roleAttribute/>="<XDtMethod:propertyName/>" + <XDtMethod:ifHasMethodTag tagName="hibernate.map" paramName="table"> +@@ -193,7 +193,7 @@ + </map> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.array"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.array" superclasses="false"> + <array + <XDtHibernate:roleAttribute/>="<XDtMethod:propertyName/>" + <XDtMethod:ifHasMethodTag tagName="hibernate.array" paramName="table"> +@@ -218,7 +218,7 @@ + </array> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.primitive-array"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.primitive-array" superclasses="false"> + <primitive-array + <XDtHibernate:roleAttribute/>="<XDtMethod:propertyName/>" + <XDtMethod:ifHasMethodTag tagName="hibernate.primitive-array" paramName="table"> +@@ -236,7 +236,7 @@ + </primitive-array> + </XDtMethod:ifHasMethodTag> + +- <XDtMethod:ifHasMethodTag tagName="hibernate.any"> ++ <XDtMethod:ifHasMethodTag tagName="hibernate.any" superclasses="false"> + <any + name="<XDtMethod:propertyName />" + id-type="<XDtMethod:methodTagValue tagName="hibernate.any" paramName="id-type"/>" |