texlive-bin: grab new version of pdftoepdf from upstream to support poppler 0.86
This commit is contained in:
parent
66879d09b6
commit
437f9d2c8a
@ -129,6 +129,6 @@ termux_step_pre_configure() {
|
||||
{} +
|
||||
|
||||
# These files are from upstream master:
|
||||
cp "$TERMUX_PKG_BUILDER_DIR"/pdftoepdf-poppler0.83.0.cc "$TERMUX_PKG_SRCDIR"/texk/web2c/pdftexdir/pdftoepdf.cc # commit f0d0598b
|
||||
cp "$TERMUX_PKG_BUILDER_DIR"/pdftoepdf-poppler0.86.0.cc "$TERMUX_PKG_SRCDIR"/texk/web2c/pdftexdir/pdftoepdf.cc # commit 7cabe29
|
||||
cp "$TERMUX_PKG_BUILDER_DIR"/pdftosrc-poppler0.83.0.cc "$TERMUX_PKG_SRCDIR"/texk/web2c/pdftexdir/pdftosrc.cc # commit f0d0598b
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at
|
||||
https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk
|
||||
by Arch Linux. A little modifications are made to avoid a crash for
|
||||
some kind of pdf images, such as figure_missing.pdf in gnuplot.
|
||||
The poppler should be 0.83.0 or newer versions.
|
||||
The poppler should be 0.86.0 or newer versions.
|
||||
POPPLER_VERSION should be defined.
|
||||
*/
|
||||
|
||||
@ -710,7 +710,7 @@ static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
|
||||
|
||||
int
|
||||
read_pdf_info(char *image_name, char *page_name, int page_num,
|
||||
int pagebox_spec, int minor_pdf_version_wanted,
|
||||
int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted,
|
||||
int pdf_inclusion_errorlevel)
|
||||
{
|
||||
PdfDocument *pdf_doc;
|
||||
@ -723,7 +723,7 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
|
||||
#endif
|
||||
// initialize
|
||||
if (!isInit) {
|
||||
globalParams.reset(new GlobalParams());
|
||||
globalParams = std::make_unique<GlobalParams>();
|
||||
globalParams->setErrQuiet(false);
|
||||
isInit = true;
|
||||
}
|
||||
@ -738,16 +738,16 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
|
||||
#ifdef POPPLER_VERSION
|
||||
pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion();
|
||||
pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion();
|
||||
if ((pdf_major_version_found > 1)
|
||||
if ((pdf_major_version_found > major_pdf_version_wanted)
|
||||
|| (pdf_minor_version_found > minor_pdf_version_wanted)) {
|
||||
const char *msg =
|
||||
"PDF inclusion: found PDF version <%d.%d>, but at most version <1.%d> allowed";
|
||||
"PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed";
|
||||
if (pdf_inclusion_errorlevel > 0) {
|
||||
pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, minor_pdf_version_wanted);
|
||||
pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted);
|
||||
} else if (pdf_inclusion_errorlevel < 0) {
|
||||
; /* do nothing */
|
||||
} else { /* = 0, give warning */
|
||||
pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, minor_pdf_version_wanted);
|
||||
pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -757,7 +757,7 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
|
||||
if (page_name) {
|
||||
// get page by name
|
||||
GString name(page_name);
|
||||
LinkDest *link = pdf_doc->doc->findDest(&name);
|
||||
std::unique_ptr<LinkDest> link = pdf_doc->doc->findDest(&name);
|
||||
if (link == 0 || !link->isOk())
|
||||
pdftex_fail("PDF inclusion: invalid destination <%s>", page_name);
|
||||
Ref ref = link->getPageRef();
|
||||
@ -765,7 +765,6 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
|
||||
if (page_num == 0)
|
||||
pdftex_fail("PDF inclusion: destination is not a page <%s>",
|
||||
page_name);
|
||||
delete link;
|
||||
} else {
|
||||
// get page by number
|
||||
if (page_num <= 0 || page_num > epdf_num_pages)
|
Loading…
Reference in New Issue
Block a user