Bug#548878: FTBFS texlive-bin won't compile against libpoppler >= 0.11
Package: texlive-bin
Version: 2007.dfsg.2-7
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu karmic ubuntu-patch
texlive-bin won't compile against libpoppler 0.11 or later, attached is
a couple of patches (one for libpoppler >= 0.11, and the other is for
libpoppler 0.12) to fix the issues.
Please note that libpoppler 0.12 is currently in experimental.
*** /tmp/tmpTsYyNF
In Ubuntu, we've applied the attached patch to achieve the following:
* debian/patches/ubuntu_libpoppler-0.11: fix a FTBFS because of unuseful
call to GfxFont destructor (virtual and protected) (LP: #383825)
* debian/patches/ubuntu_libpoppler-0.12: fix a FTBFS with libpoppler 0.12:
use getPDFMinorVersion instead of getPDFVersion.
We thought you might be interested in doing the same.
-- System Information:
Debian Release: squeeze/sid
APT prefers karmic-updates
APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic')
Architecture: i386 (i686)
Kernel: Linux 2.6.31-11-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u texlive-bin-2007.dfsg.2/debian/patches/series texlive-bin-2007.dfsg.2/debian/patches/series
--- texlive-bin-2007.dfsg.2/debian/patches/series
+++ texlive-bin-2007.dfsg.2/debian/patches/series
@@ -63,0 +65,2 @@
+ubuntu_libpoppler-0.11
+ubuntu_libpoppler-0.12
only in patch2:
unchanged:
--- texlive-bin-2007.dfsg.2.orig/debian/patches/ubuntu_libpoppler-0.11
+++ texlive-bin-2007.dfsg.2/debian/patches/ubuntu_libpoppler-0.11
@@ -0,0 +1,14 @@
+Fix a FTBFS with libpoppler 0.11: the destructor of GfxFont is virtual, and it doesn't make sense to call it.
+Index: texlive-bin-2007.dfsg.2/build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+===================================================================
+--- texlive-bin-2007.dfsg.2.orig/build/source/texk/web2c/pdftexdir/pdftoepdf.cc 2009-09-28 08:44:25.000000000 +0000
++++ texlive-bin-2007.dfsg.2/build/source/texk/web2c/pdftexdir/pdftoepdf.cc 2009-09-28 09:25:56.000000000 +0000
+@@ -633,7 +633,7 @@
+ }
+ for (r = encodingList; r != 0; r = n) {
+ n = r->next;
+- delete r->font;
++// delete r->font;
+ delete r;
+ }
+ }
only in patch2:
unchanged:
--- texlive-bin-2007.dfsg.2.orig/debian/patches/ubuntu_libpoppler-0.12
+++ texlive-bin-2007.dfsg.2/debian/patches/ubuntu_libpoppler-0.12
@@ -0,0 +1,26 @@
+Fix a FTBFS with libpoppler 0.12: use getPDFMinorVersion instead of getPDFVersion
+Index: texlive-bin-2007.dfsg.2/build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+===================================================================
+--- texlive-bin-2007.dfsg.2.orig/build/source/texk/web2c/pdftexdir/pdftoepdf.cc 2009-09-28 10:25:18.000000000 +0000
++++ texlive-bin-2007.dfsg.2/build/source/texk/web2c/pdftexdir/pdftoepdf.cc 2009-09-28 10:59:33.000000000 +0000
+@@ -673,6 +673,7 @@
+ Page *page;
+ int rotate;
+ PDFRectangle *pagebox;
++ int minor_pdf_version_found, major_pdf_version_found;
+ float pdf_version_found, pdf_version_wanted;
+ // initialize
+ if (!isInit) {
+@@ -688,8 +689,11 @@
+ // this works only for PDF 1.x -- but since any versions of PDF newer
+ // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will
+ // then have to changed drastically anyway.
+- pdf_version_found = pdf_doc->doc->getPDFVersion();
++ minor_pdf_version_found = pdf_doc->doc->getPDFMinorVersion();
++ major_pdf_version_found = pdf_doc->doc->getPDFMajorVersion();
++ pdf_version_found = major_pdf_version_found + (minor_pdf_version_found * 0.1);
+ pdf_version_wanted = 1 + (minor_pdf_version_wanted * 0.1);
++
+ if (pdf_version_found > pdf_version_wanted) {
+ char msg[] =
+ "PDF inclusion: found PDF version <%.1f>, but at most version <%.1f> allowed";
Reply to: