summaryrefslogtreecommitdiff
diff options
authorShuxiongYe <yeshuxiong@gmail.com>2013-07-21 13:22:51 +0800
committergit-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com>2013-07-30 16:14:12 +0000
commit5ed5952b6eb8b6c90aeb44a0f8f8771f890ca66a (patch)
treea1dfbc0a12e08e77ee4f18529b2e7b31d5a7a3fb
parent0fe59b4c3b424f6682992367089b3410e2a2c61a (diff)
Imported using git-ubuntu import.
Notes
Notes: * Team upload. * Compatible with Java7 (Closes: #717250) - 01-compatible-with-java7.diff [ Sylvestre Ledru ] * Standards-Version updated to 3.9.4
-rw-r--r--debian/changelog11
-rw-r--r--debian/control2
-rw-r--r--debian/patches/01-compatible-with-java7.diff150
-rw-r--r--debian/patches/series1
4 files changed, 163 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index a4e2666..6f33e5a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+libcobra-java (0.98.4-5) unstable; urgency=low
+
+ * Team upload.
+ * Compatible with Java7 (Closes: #717250)
+ - 01-compatible-with-java7.diff
+
+ [ Sylvestre Ledru ]
+ * Standards-Version updated to 3.9.4
+
+ -- ShuxiongYe <yeshuxiong@gmail.com> Sun, 21 Jul 2013 13:22:51 +0800
+
libcobra-java (0.98.4-4) unstable; urgency=low
* Team upload.
diff --git a/debian/control b/debian/control
index ac7c0b5..73e6024 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.or
Uploaders: Varun Hiremath <varun@debian.org>, Torsten Werner <twerner@debian.org>
Build-Depends: cdbs, debhelper (>= 5)
Build-Depends-Indep: ant, rhino, libxalan2-java, default-jdk
-Standards-Version: 3.9.2
+Standards-Version: 3.9.4
Homepage: http://lobobrowser.org/cobra.jsp
Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/libcobra-java
Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/libcobra-java
diff --git a/debian/patches/01-compatible-with-java7.diff b/debian/patches/01-compatible-with-java7.diff
new file mode 100644
index 0000000..4776d2e
--- /dev/null
+++ b/debian/patches/01-compatible-with-java7.diff
@@ -0,0 +1,150 @@
+Index: libcobra-java-0.98.4/src/org/lobobrowser/html/domimpl/ElementImpl.java
+===================================================================
+--- libcobra-java-0.98.4.orig/src/org/lobobrowser/html/domimpl/ElementImpl.java 2008-08-27 00:43:10.000000000 +0800
++++ libcobra-java-0.98.4/src/org/lobobrowser/html/domimpl/ElementImpl.java 2013-07-21 13:22:31.759840623 +0800
+@@ -26,6 +26,7 @@
+ import java.util.*;
+
+ import org.lobobrowser.util.*;
++import org.lobobrowser.util.Objects;
+ import org.w3c.dom.Attr;
+ import org.w3c.dom.DOMException;
+ import org.w3c.dom.Element;
+Index: libcobra-java-0.98.4/src/org/lobobrowser/html/domimpl/NodeImpl.java
+===================================================================
+--- libcobra-java-0.98.4.orig/src/org/lobobrowser/html/domimpl/NodeImpl.java 2008-09-28 16:05:54.000000000 +0800
++++ libcobra-java-0.98.4/src/org/lobobrowser/html/domimpl/NodeImpl.java 2013-07-21 13:22:31.783840759 +0800
+@@ -32,6 +32,7 @@
+ import org.lobobrowser.html.style.*;
+ import org.lobobrowser.js.*;
+ import org.lobobrowser.util.*;
++import org.lobobrowser.util.Objects;
+ import org.w3c.dom.*;
+
+ public abstract class NodeImpl extends AbstractScriptableDelegate implements Node, ModelNode {
+Index: libcobra-java-0.98.4/src/org/lobobrowser/html/gui/HtmlBlockPanel.java
+===================================================================
+--- libcobra-java-0.98.4.orig/src/org/lobobrowser/html/gui/HtmlBlockPanel.java 2009-01-15 15:02:02.000000000 +0800
++++ libcobra-java-0.98.4/src/org/lobobrowser/html/gui/HtmlBlockPanel.java 2013-07-21 13:22:31.459839141 +0800
+@@ -34,6 +34,7 @@
+ import org.lobobrowser.html.renderer.*;
+ import org.lobobrowser.html.style.RenderState;
+ import org.lobobrowser.util.*;
++import org.lobobrowser.util.Objects;
+ import org.lobobrowser.util.gui.ColorFactory;
+ import org.w3c.dom.*;
+ import java.util.logging.*;
+Index: libcobra-java-0.98.4/src/org/lobobrowser/html/renderer/RBlock.java
+===================================================================
+--- libcobra-java-0.98.4.orig/src/org/lobobrowser/html/renderer/RBlock.java 2009-01-19 02:02:54.000000000 +0800
++++ libcobra-java-0.98.4/src/org/lobobrowser/html/renderer/RBlock.java 2013-07-21 13:22:31.499839347 +0800
+@@ -36,6 +36,7 @@
+ import org.lobobrowser.html.domimpl.*;
+ import org.lobobrowser.html.style.*;
+ import org.lobobrowser.util.*;
++import org.lobobrowser.util.Objects;
+ import org.w3c.dom.Node;
+
+ /**
+Index: libcobra-java-0.98.4/src/org/lobobrowser/html/renderer/RTable.java
+===================================================================
+--- libcobra-java-0.98.4.orig/src/org/lobobrowser/html/renderer/RTable.java 2009-01-18 23:09:50.000000000 +0800
++++ libcobra-java-0.98.4/src/org/lobobrowser/html/renderer/RTable.java 2013-07-21 13:22:31.531839506 +0800
+@@ -29,6 +29,7 @@
+
+ import org.lobobrowser.html.*;
+ import org.lobobrowser.util.*;
++import org.lobobrowser.util.Objects;
+ import org.lobobrowser.html.domimpl.*;
+ import org.lobobrowser.html.style.RenderState;
+
+Index: libcobra-java-0.98.4/src/org/lobobrowser/js/JavaFunctionObject.java
+===================================================================
+--- libcobra-java-0.98.4.orig/src/org/lobobrowser/js/JavaFunctionObject.java 2007-12-08 18:51:52.000000000 +0800
++++ libcobra-java-0.98.4/src/org/lobobrowser/js/JavaFunctionObject.java 2013-07-21 13:22:32.171842682 +0800
+@@ -25,6 +25,7 @@
+ import java.util.logging.*;
+ import java.util.*;
+ import org.lobobrowser.util.*;
++import org.lobobrowser.util.Objects;
+
+ public class JavaFunctionObject extends ScriptableObject implements Function {
+ private static final Logger logger = Logger.getLogger(JavaFunctionObject.class.getName());
+Index: libcobra-java-0.98.4/src/org/lobobrowser/util/gui/FontFactory.java
+===================================================================
+--- libcobra-java-0.98.4.orig/src/org/lobobrowser/util/gui/FontFactory.java 2008-12-29 00:33:38.000000000 +0800
++++ libcobra-java-0.98.4/src/org/lobobrowser/util/gui/FontFactory.java 2013-07-21 13:45:23.154640998 +0800
+@@ -23,6 +23,8 @@
+ */
+ package org.lobobrowser.util.gui;
+
++import java.lang.reflect.InvocationTargetException;
++import java.lang.reflect.Method;
+ import java.util.*;
+ import java.awt.*;
+ import java.awt.font.TextAttribute;
+@@ -30,7 +32,8 @@
+
+ import org.lobobrowser.util.Objects;
+ /** Note: Undocumented class? */
+-import sun.font.FontManager;
++//import sun.font.FontManager;
++//import sun.font.FontManagerFactory;
+
+ /**
+ * @author J. H. S.
+@@ -205,9 +208,46 @@
+ return createFont(this.defaultFontName, fontStyle, (int) Math.round(key.fontSize));
+ }
+
++ static private Method __method;
++ static {
++ Class<?> __cls=null;
++ try {
++ __cls=Class.forName("sun.font.FontUtilities");
++ // java 7
++ } catch (ClassNotFoundException e) {
++ try {
++ __cls=Class.forName("sun.font.FontManager");
++ // java 6
++ } catch (ClassNotFoundException e1) {
++ // should never go here
++ e1.printStackTrace();
++ }
++ }
++ try {
++ __method=__cls.getMethod("getCompositeFontUIResource", java.awt.Font.class);
++ } catch (NoSuchMethodException e) {
++ e.printStackTrace();
++ } catch (SecurityException e) {
++ e.printStackTrace();
++ } catch (NullPointerException e){
++ e.printStackTrace();
++ }
++ }
++
+ private Font createFont(String name, int style, int size) {
+ // Proprietary Sun API. Maybe shouldn't use it. Works well for Chinese.
+- return FontManager.getCompositeFontUIResource(new Font(name, style, size));
++ //return FontManager.getCompositeFontUIResource(new Font(name, style, size));
++ Font ret=null;
++ try {
++ ret=(Font)__method.invoke(null, new Font(name, style, size));
++ } catch (IllegalAccessException e) {
++ e.printStackTrace();
++ } catch (IllegalArgumentException e) {
++ e.printStackTrace();
++ } catch (InvocationTargetException e) {
++ e.printStackTrace();
++ };
++ return ret;
+ }
+
+ private static class FontKey {
+@@ -296,4 +336,4 @@
+ return "FontKey[family=" + this.fontFamily + ",size=" + this.fontSize + ",style=" + this.fontStyle + ",weight=" + this.fontWeight + ",variant=" + this.fontVariant + ",superscript="+this.superscript+"]";
+ }
+ }
+-}
+\ No newline at end of file
++}
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..15568ce
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-compatible-with-java7.diff