diff -u collectd-5.1.0/debian/collectd-core.overrides collectd-5.1.0/debian/collectd-core.overrides
--- collectd-5.1.0/debian/collectd-core.overrides
+++ collectd-5.1.0/debian/collectd-core.overrides
@@ -12,3 +12,3 @@
 # though ...
-collectd-core: binary-or-shlib-defines-rpath usr/lib/collectd/java.so /usr/lib/jvm/java-6-openjdk-*
+collectd-core: binary-or-shlib-defines-rpath usr/lib/collectd/java.so /usr/lib/jvm/default-java/jre/lib/*/server
 
diff -u collectd-5.1.0/debian/changelog collectd-5.1.0/debian/changelog
--- collectd-5.1.0/debian/changelog
+++ collectd-5.1.0/debian/changelog
@@ -1,3 +1,18 @@
+collectd (5.1.0-3.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "FTBFS with perl 5.18: POD errors":
+    add patch pod-perl-5.18 that adds =encoding to some POD files.
+    (Closes: #708718)
+  * Fix "Transition package to use default java implementation":
+    apply modified patch from Ubuntu / James Page:
+    - switch build dependency from openjdk-6-jdk to default-jdk
+    - set JAVA_HOME to /usr/lib/jvm/default-java
+    - update lintian override accordingly
+    (Closes: #683525)
+
+ -- gregor herrmann <gregoa@debian.org>  Sun, 26 May 2013 00:52:37 +0200
+
 collectd (5.1.0-3) unstable; urgency=low
 
   * debian/patches/migrate-4-5-df.dpatch, debian/collectd-core.postinst:
diff -u collectd-5.1.0/debian/rules collectd-5.1.0/debian/rules
--- collectd-5.1.0/debian/rules
+++ collectd-5.1.0/debian/rules
@@ -37,7 +37,7 @@
 ifeq (,$(JAVA_ARCHDIR))
 	JAVA_ARCHDIR = $(DEB_BUILD_ARCH)
 endif
-JAVA_HOME = /usr/lib/jvm/java-6-openjdk-$(DEB_BUILD_ARCH)
+JAVA_HOME = /usr/lib/jvm/default-java
 JAVA_LIBDIR = $(JAVA_HOME)/jre/lib/$(JAVA_ARCHDIR)/server
 
 JAVAC = $(JAVA_HOME)/bin/javac
diff -u collectd-5.1.0/debian/control collectd-5.1.0/debian/control
--- collectd-5.1.0/debian/control
+++ collectd-5.1.0/debian/control
@@ -39,7 +39,7 @@
  libxml2-dev,
  libyajl-dev,
  linux-libc-dev (>= 2.6.25-4) [linux-any] | linux-libc-dev (<< 2.6.25-1) [linux-any],
- openjdk-6-jdk [!hppa !kfreebsd-any !hurd-any],
+ default-jdk [!hppa !kfreebsd-i386 !kfreebsd-amd64],
  protobuf-c-compiler,
  python-dev
 Build-Conflicts: libpthread-dev
diff -u collectd-5.1.0/debian/patches/00list collectd-5.1.0/debian/patches/00list
--- collectd-5.1.0/debian/patches/00list
+++ collectd-5.1.0/debian/patches/00list
@@ -5,0 +6 @@
+pod-perl-5.18.dpatch
only in patch2:
unchanged:
--- collectd-5.1.0.orig/debian/patches/pod-perl-5.18.dpatch
+++ collectd-5.1.0/debian/patches/pod-perl-5.18.dpatch
@@ -0,0 +1,38 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## pod-perl-5.18.dpatch by gregor herrmann <gregoa@debian.org>
+##
+# Description: add =encoding to POD. perl 5.18 is more picky and exists with an error.
+# Origin: vendor
+# Bug-Debian: http://bugs.debian.org/708718
+# Forwarded: no
+# Author: gregor herrmann <gregoa@debian.org>
+# Last-Update: 2013-05-19
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' collectd-5.1.0~/src/collectd-java.pod collectd-5.1.0/src/collectd-java.pod
+--- collectd-5.1.0~/src/collectd-java.pod	2012-04-02 10:04:58.000000000 +0200
++++ collectd-5.1.0/src/collectd-java.pod	2013-05-19 16:18:19.323246574 +0200
+@@ -1,3 +1,5 @@
++=encoding utf8
++
+ =head1 NAME
+ 
+ collectd-java - Documentation of collectd's "java plugin"
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' collectd-5.1.0~/src/collectd.conf.pod collectd-5.1.0/src/collectd.conf.pod
+--- collectd-5.1.0~/src/collectd.conf.pod	2012-04-02 10:04:58.000000000 +0200
++++ collectd-5.1.0/src/collectd.conf.pod	2013-05-19 16:17:52.395246170 +0200
+@@ -1,3 +1,5 @@
++=encoding utf8
++
+ =head1 NAME
+ 
+ collectd.conf - Configuration for the system statistics collection daemon B<collectd>
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' collectd-5.1.0~/src/collectdctl.pod collectd-5.1.0/src/collectdctl.pod
+--- collectd-5.1.0~/src/collectdctl.pod	2012-04-02 10:04:58.000000000 +0200
++++ collectd-5.1.0/src/collectdctl.pod	2013-05-19 16:18:04.251246348 +0200
+@@ -1,3 +1,5 @@
++=encoding latin1
++
+ =head1 NAME
+ 
+ collectdctl - Control interface for collectd
