debian/ 0000755 0000000 0000000 00000000000 12175677126 007204 5 ustar debian/watch 0000644 0000000 0000000 00000000114 11064734625 010223 0 ustar version=3
http://sf.net/xamj/ cobra-(.*)\.zip \
debian debian/orig-tar.sh
debian/ant.properties 0000644 0000000 0000000 00000000102 11064734625 012067 0 ustar class.dir=build
source.dir=src
doc.dir=doc/api
jar.name=cobra.jar
debian/compat 0000644 0000000 0000000 00000000002 11064734625 010374 0 ustar 5
debian/build.xml 0000644 0000000 0000000 00000001735 11064734625 011025 0 ustar
debian/control 0000644 0000000 0000000 00000002216 12175677110 010601 0 ustar Source: libcobra-java
Section: java
Priority: optional
Maintainer: Debian Java Maintainers
Uploaders: Varun Hiremath , Torsten Werner
Build-Depends: cdbs, debhelper (>= 5)
Build-Depends-Indep: ant, rhino, libxalan2-java, default-jdk
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
Package: libcobra-java
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Java HTML Renderer & Parser
Cobra is a pure Java HTML renderer and DOM parser that is being
developed to support HTML 4, Javascript and CSS 2.
.
Cobra can be used as a Javascript-aware and CSS-aware HTML DOM
parser, independently of the Cobra rendering engine. Javascript DOM
modifications that occur during parsing (e.g. via document.write)
will be reflected in the parsed DOM, unless Javascript is
disabled. Likewise, DOM element implementations have a getStyle
method that can be called to obtain the styling properties of an
element.
debian/orig-tar.sh 0000755 0000000 0000000 00000000662 11064734625 011265 0 ustar #!/bin/sh -e
# called by uscan with '--upstream-version'
TAR=../libcobra-java_$2.orig.tar.gz
DIR=libcobra-java-$2.orig
# clean up the upstream tarball
unzip $3
mv cobra-$2 $DIR
GZIP=--best tar -c -z -f $TAR --exclude '*.jar' --exclude '*/doc/api/*' $DIR
rm -rf $3 $DIR
# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
. .svn/deb-layout
mv $TAR $origDir
echo "moved $TAR to $origDir"
fi
exit 0
debian/docs 0000644 0000000 0000000 00000000012 11064734625 010042 0 ustar doc/api/*
debian/copyright 0000644 0000000 0000000 00000007361 11064734625 011140 0 ustar This package was debianized by Varun Hiremath on
Tue, 31 Jul 2007 01:35:56 +0530.
It was downloaded from http://heanet.dl.sourceforge.net/sourceforge/xamj/
Upstream Authors: The XAMJ Project
Copyright:
(C) 2006 The Lobo Project
(C) 2006 The XAMJ Project
(C) 1994-2002 World Wide Web Consortium, (Massachusetts
Institute of Technology, Institut National de Recherche en
Informatique et en Automatique, Keio University). All Rights
Reserved.
(C) 1999, 2002 Steady State Software Ltd.
License:
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in `/usr/share/common-licenses/LGPL'.
-----
W3C SOFTWARE NOTICE AND LICENSE:
Copyright: 1994-2002 World Wide Web Consortium, (Massachusetts
Institute of Technology, Institut National de Recherche en
Informatique et en Automatique, Keio University). All Rights
Reserved.
License:
This W3C work (including software, documents, or other related items)
is being provided by the copyright holders under the following
license. By obtaining, using and/or copying this work, you (the
licensee) agree that you have read, understood, and will comply with
the following terms and conditions:
Permission to use, copy, modify, and distribute this software and its
documentation, with or without modification, for any purpose and
without fee or royalty is hereby granted, provided that you include
the following on ALL copies of the software and documentation or
portions thereof, including modifications, that you make:
1. The full text of this NOTICE in a location viewable to users of
the redistributed or derivative work.
2. Any pre-existing intellectual property disclaimers, notices, or
terms and conditions. If none exist, a short notice of the
following form (hypertext is preferred, text is permitted)
should be used within the body of any redistributed or
derivative code: "Copyright World Wide Web Consortium,
(Massachusetts Institute of Technology, Institut National de
Recherche en Informatique et en Automatique, Keio
University). All Rights Reserved.
3. Notice of any changes or modifications to the W3C files,
including the date changes were made. (We recommend you provide
URIs to the location from which the code is derived.)
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
DOCUMENTATION.
The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to the software without specific,
written prior permission. Title to copyright in this software and any
associated documentation will at all times remain with copyright
holders.
-----
The Debian packaging is (C) 2007, Varun Hiremath and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
debian/doc-base 0000644 0000000 0000000 00000000426 11064734625 010600 0 ustar Document: libcobra-java
Title: Programmer API for cobra
Author: The XAMJ Project
Abstract: Java HTML Renderer & Parser
Section: Programming
Format: HTML
Index: /usr/share/doc/libcobra-java/index.html
Files: /usr/share/doc/libcobra-java/*.html
debian/rules 0000755 0000000 0000000 00000001070 11674373214 010254 0 ustar #!/usr/bin/make -f
include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk
JAVA_HOME := /usr/lib/jvm/default-java
DEB_ANT_BUILDFILE := debian/build.xml
DEB_ANT_BUILD_TARGET := jar javadoc
DEB_JARS := js xml-apis
ANT_OPTS := -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5
install/libcobra-java::
install -m 644 -D cobra.jar $(DEB_DESTDIR)/usr/share/java/cobra-$(DEB_UPSTREAM_VERSION).jar
dh_link /usr/share/java/cobra-$(DEB_UPSTREAM_VERSION).jar /usr/share/java/cobra.jar
get-orig-source:
-uscan --upstream-version 0
debian/README.Debian-source 0000644 0000000 0000000 00000000766 11064734625 012546 0 ustar libcobra-java
=============
The upstream supplied source package contains binary jar files and
pre-built documentation. Currently no clean source distribution
exists. Therefore, the upstream sources were modified to comply with
the Debian Free Software Guidelines.
Use the rules/get-orig-source target to create the orig.tar.gz.
For more details on repackaging of upstream sources please see the
debian/orig-tar.sh file.
-- Varun Hiremath Mon, 27 Aug 2007 19:02:53 +0530
debian/changelog 0000644 0000000 0000000 00000007373 12175677126 011070 0 ustar 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 Sun, 21 Jul 2013 13:22:51 +0800
libcobra-java (0.98.4-4) unstable; urgency=low
* Team upload.
* Switch to default-jdk. (Closes: #643519).
* Bump Standards-Version to 3.9.2. No changes were required.
-- Miguel Landaeta Sat, 22 Oct 2011 21:03:27 -0430
libcobra-java (0.98.4-3) unstable; urgency=low
* Update Homepage.
* Change Build-Depends: default-jdk.
* Remove Java runtime Depends.
* Switch to source format 3.0.
* Change Section: java.
-- Torsten Werner Sun, 07 Aug 2011 01:42:01 +0200
libcobra-java (0.98.4-2) unstable; urgency=low
* upload to unstable
-- Torsten Werner Sun, 15 Feb 2009 22:18:56 +0100
libcobra-java (0.98.4-1) experimental; urgency=low
* New upstream release
-- Torsten Werner Wed, 11 Feb 2009 23:27:49 +0100
libcobra-java (0.98.3-1) experimental; urgency=low
* New upstream release
-- Torsten Werner Wed, 03 Dec 2008 23:52:13 +0100
libcobra-java (0.98.2-2) unstable; urgency=low
* Fix java bytecode / java runtime version mismatch (Closes: #503788)
-- Varun Hiremath Sat, 01 Nov 2008 02:50:06 -0400
libcobra-java (0.98.2-1) unstable; urgency=low
* New upstream release
* Switch to openjdk-6
* Remove all patches
* Bump Standards-Version to 3.8.0
-- Varun Hiremath Fri, 18 Jul 2008 14:24:58 +0530
libcobra-java (0.98-1) unstable; urgency=low
* new upstream release
* Refresh patch disable_proxy.diff.
-- Torsten Werner Mon, 17 Mar 2008 21:31:25 +0100
libcobra-java (0.97.5-1) unstable; urgency=low
* new upstream release
* Update patch disable_proxy.diff.
-- Torsten Werner Sat, 08 Mar 2008 11:32:48 +0100
libcobra-java (0.97.4-2) unstable; urgency=low
* Add patches/disable_proxy.diff patch as a temporary fix to build test/*
files using java-gcj
* debian/control: Bump up Standards-Version to 3.7.3
-- Varun Hiremath Wed, 09 Jan 2008 20:58:10 +0530
libcobra-java (0.97.4-1) unstable; urgency=low
* New upstream release
* debian/build.xml: exclude test/* files which require sun-java-jdk to build.
-- Varun Hiremath Thu, 29 Nov 2007 18:40:24 +0530
libcobra-java (0.97.2-3) unstable; urgency=low
* Reupload the package with the orig.tar.gz file from contrib.
-- Torsten Werner Sun, 04 Nov 2007 19:31:51 +0100
libcobra-java (0.97.2-2) unstable; urgency=low
* Move the package to pkg-java svn.
* debian/control:
+ Set Maintainer to Debian Java Maintainers and add myself to Uploaders.
+ Build-Depend on libxalan2-java.
+ Switch from sun-java5-jdk to java-gcj-compat.
+ Move package to Section main from contrib.
* Move the build scripts to debian dir.
-- Varun Hiremath Mon, 15 Oct 2007 19:55:58 +0530
libcobra-java (0.97.2-1) unstable; urgency=low
* New upstream release
* debian/control: Add XS-Vcs-{Svn,Browser} headers.
* Add debian/README.Debian-source file.
* debian/rules: fix the installed jar version and the dh_link.
-- Varun Hiremath Sat, 08 Sep 2007 03:20:26 +0530
libcobra-java (0.97-2) unstable; urgency=low
* debian/copyright: include the w3c license
-- Varun Hiremath Thu, 02 Aug 2007 20:17:36 +0530
libcobra-java (0.97-1) unstable; urgency=low
* Initial release (Closes: #435408)
-- Varun Hiremath Tue, 31 Jul 2007 01:35:56 +0530
debian/source/ 0000755 0000000 0000000 00000000000 11674373214 010476 5 ustar debian/source/format 0000644 0000000 0000000 00000000014 11674373214 011704 0 ustar 3.0 (quilt)
debian/patches/ 0000755 0000000 0000000 00000000000 12175676231 010627 5 ustar debian/patches/01-compatible-with-java7.diff 0000644 0000000 0000000 00000014220 12175676231 015774 0 ustar 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
+}
debian/patches/series 0000644 0000000 0000000 00000000036 12175676231 012043 0 ustar 01-compatible-with-java7.diff