Date: Sat, 8 Aug 2020 07:31:00 +0000 (UTC) From: "Tobias C. Berner" <tcberner@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r544367 - head/graphics/katarakt/files Message-ID: <202008080731.0787V0tL095225@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tcberner Date: Sat Aug 8 07:31:00 2020 New Revision: 544367 URL: https://svnweb.freebsd.org/changeset/ports/544367 Log: graphics/katarakt: prepare for poppler 20.08.0 (fixed) - unfortunately the fix applied in r544366 broke the build in the current tree (and I impatiently committed before the trunk testbuild was finished) - simply remove all the broken POPPLER_VERSION checks, the version in ports is well-defined and years newer than anything that is checked against. PR: 248419 Pointy hat: tcberner Added: head/graphics/katarakt/files/patch-src_resourcemanager.cpp (contents, props changed) head/graphics/katarakt/files/patch-src_search.cpp (contents, props changed) head/graphics/katarakt/files/patch-src_util.h (contents, props changed) Added: head/graphics/katarakt/files/patch-src_resourcemanager.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/katarakt/files/patch-src_resourcemanager.cpp Sat Aug 8 07:31:00 2020 (r544367) @@ -0,0 +1,18 @@ +--- src/resourcemanager.cpp.orig 2020-08-08 07:23:53 UTC ++++ src/resourcemanager.cpp +@@ -118,15 +118,9 @@ void ResourceManager::initialize(const QString &file, + doc->setRenderHint(Poppler::Document::Antialiasing, true); + doc->setRenderHint(Poppler::Document::TextAntialiasing, true); + doc->setRenderHint(Poppler::Document::TextHinting, true); +-#if POPPLER_VERSION >= POPPLER_VERSION_CHECK(0, 18, 0) + doc->setRenderHint(Poppler::Document::TextSlightHinting, true); +-#endif +-#if POPPLER_VERSION >= POPPLER_VERSION_CHECK(0, 22, 0) + // doc->setRenderHint(Poppler::Document::OverprintPreview, true); // TODO what is this? +-#endif +-#if POPPLER_VERSION >= POPPLER_VERSION_CHECK(0, 24, 0) + doc->setRenderHint(Poppler::Document::ThinLineSolid, true); // TODO what's the difference between ThinLineSolid and ThinLineShape? +-#endif + + page_count = doc->numPages(); + Added: head/graphics/katarakt/files/patch-src_search.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/katarakt/files/patch-src_search.cpp Sat Aug 8 07:31:00 2020 (r544367) @@ -0,0 +1,29 @@ +--- src/search.cpp.orig 2020-08-08 07:25:17 UTC ++++ src/search.cpp +@@ -68,26 +68,11 @@ void SearchWorker::run() { + + // collect all occurrences + QList<QRectF> *hits = new QList<QRectF>; +-#if POPPLER_VERSION < POPPLER_VERSION_CHECK(0, 22, 0) +- // old search interface, slow for many hits per page +- double x = 0, y = 0, x2 = 0, y2 = 0; +- while (!stop && !die && +- p->search(search_term, x, y, x2, y2, Poppler::Page::NextResult, +- has_upper_case ? Poppler::Page::CaseSensitive : Poppler::Page::CaseInsensitive)) { +- hits->push_back(QRectF(x, y, x2 - x, y2 - y)); +- } +-#elif POPPLER_VERSION < POPPLER_VERSION_CHECK(0, 31, 0) +- // new search interface +- QList<QRectF> tmp = p->search(search_term, +- has_upper_case ? Poppler::Page::CaseSensitive : Poppler::Page::CaseInsensitive); +- hits->swap(tmp); +-#else + // even newer interface + QList<QRectF> tmp = p->search(search_term, + has_upper_case ? (Poppler::Page::SearchFlags) 0 : Poppler::Page::IgnoreCase); + // TODO support Poppler::Page::WholeWords + hits->swap(tmp); +-#endif + #ifdef DEBUG + if (hits->size() > 0) { + cerr << hits->size() << " hits on page " << page << endl; Added: head/graphics/katarakt/files/patch-src_util.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/katarakt/files/patch-src_util.h Sat Aug 8 07:31:00 2020 (r544367) @@ -0,0 +1,14 @@ +--- src/util.h.orig 2020-08-08 07:25:17 UTC ++++ src/util.h +@@ -7,11 +7,6 @@ + + class QImage; + +- +-#define POPPLER_VERSION ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) +- +-#define POPPLER_VERSION_CHECK(major,minor,micro) ((major << 16) | (minor << 8) | (micro)) +- + // rounds a float when afterwards cast to int + // seems to fix the mismatch between calculated page height and actual image height + #define ROUND(x) ((x) + 0.5f)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008080731.0787V0tL095225>