[libnu-htmlparser-java] 02/02: Disable jchardet support
Andrew Ross
rockclimb-guest at alioth.debian.org
Thu Oct 31 22:08:03 UTC 2013
This is an automated email from the git hooks/post-receive script.
rockclimb-guest pushed a commit to branch master
in repository libnu-htmlparser-java.
commit 2893cecb7d4cccbeaef5b7ff9515e29e0934b6a2
Author: Andrew Ross <ubuntu at rossfamily.co.uk>
Date: Thu Oct 31 19:36:18 2013 +0000
Disable jchardet support
---
debian/changelog | 2 +-
debian/control | 2 +-
debian/maven.ignoreRules | 1 +
debian/patches/no-jchardet.patch | 66 ++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
5 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b117cb1..68c5b88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,4 +2,4 @@ libnu-htmlparser-java (1.4-1) unstable; urgency=low
* Initial release (Closes: #723028)
- -- Andrew Ross <ubuntu at rossfamily.co.uk> Mon, 07 Oct 2013 23:14:54 +0100
+ -- Andrew Ross <ubuntu at rossfamily.co.uk> Thu, 31 Oct 2013 22:06:32 +0000
diff --git a/debian/control b/debian/control
index 60612bd..99ef2ed 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Andrew Ross <ubuntu at rossfamily.co.uk>
Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-debian-helper (>= 1.5),
- libicu4j-java (>= 4.2.1.1-2~), libjchardet-java, libxom-java
+ libicu4j-java (>= 4.2.1.1-2~), libxom-java
Build-Depends-Indep: libmaven-antrun-plugin-java, libmaven-bundle-plugin-java
Standards-Version: 3.9.4
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/libnu-htmlparser-java.git
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index 17ecf34..6852e73 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -1,5 +1,6 @@
com.sdicons.jsontools jsontools-core * * * *
com.sun tools * * * *
+net.sourceforge.jchardet jchardet * * * *
org.apache.maven.plugins maven-surefire-plugin * * * *
org.codehaus.mojo rpm-maven-plugin * * * *
diff --git a/debian/patches/no-jchardet.patch b/debian/patches/no-jchardet.patch
new file mode 100644
index 0000000..5748de3
--- /dev/null
+++ b/debian/patches/no-jchardet.patch
@@ -0,0 +1,66 @@
+The support for jchardet is optional, and we currently disable it using this
+patch. This reduces the dependencies of this package. An ITP is filed to
+package jchardet (see #721624), so once that is complete then we should
+probably re-enable it by removing this patch and updating the dependencies.
+
+--- a/src/nu/validator/htmlparser/extra/ChardetSniffer.java
++++ b/src/nu/validator/htmlparser/extra/ChardetSniffer.java
+@@ -22,7 +22,7 @@
+
+ package nu.validator.htmlparser.extra;
+
+-import java.io.IOException;
++/*import java.io.IOException;
+ import java.nio.charset.UnsupportedCharsetException;
+
+ import nu.validator.htmlparser.io.Encoding;
+@@ -43,7 +43,7 @@
+
+ /**
+ * @param source
+- */
++ *
+ public ChardetSniffer(final byte[] source, final int length) {
+ this.source = source;
+ this.length = length;
+@@ -82,3 +82,4 @@
+ }
+ }
+ }
++*/
+\ No newline at end of file
+--- a/src/nu/validator/htmlparser/io/HtmlInputStreamReader.java
++++ b/src/nu/validator/htmlparser/io/HtmlInputStreamReader.java
+@@ -35,7 +35,7 @@
+ import nu.validator.htmlparser.common.ByteReadable;
+ import nu.validator.htmlparser.common.Heuristics;
+ import nu.validator.htmlparser.common.XmlViolationPolicy;
+-import nu.validator.htmlparser.extra.ChardetSniffer;
++//import nu.validator.htmlparser.extra.ChardetSniffer;
+ import nu.validator.htmlparser.extra.IcuDetectorSniffer;
+ import nu.validator.htmlparser.impl.Tokenizer;
+
+@@ -126,10 +126,10 @@
+ if (encoding == null) {
+ position = 0;
+ encoding = (new MetaSniffer(errorHandler, this)).sniff(this);
+- if (encoding == null
++ /*if (encoding == null
+ && (heuristics == Heuristics.CHARDET || heuristics == Heuristics.ALL)) {
+ encoding = (new ChardetSniffer(byteArray, limit)).sniff();
+- }
++ }*/
+ if (encoding == null
+ && (heuristics == Heuristics.ICU || heuristics == Heuristics.ALL)) {
+ position = 0;
+--- a/src/nu/validator/htmlparser/common/Heuristics.java
++++ b/src/nu/validator/htmlparser/common/Heuristics.java
+@@ -43,7 +43,7 @@
+ /**
+ * Use jchardet only.
+ */
+- CHARDET,
++ //CHARDET,
+
+ /**
+ * Use ICU4J only.
diff --git a/debian/patches/series b/debian/patches/series
index 5ec15d3..a17017e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
non-final.patch
+no-jchardet.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libnu-htmlparser-java.git
More information about the pkg-java-commits
mailing list