diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-08-08 15:31:00 +0800 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-08-08 15:31:00 +0800 |
commit | 3a3872f798b69ebe765f71bd22f07a9ed11736f0 (patch) | |
tree | 725f637291c802904cc8e2bad21ba6fcf23c38ca /graphics | |
parent | 96cdc5e45b6b0f78099166adf6fbb21b699360f1 (diff) | |
download | freebsd-ports-gnome-3a3872f798b69ebe765f71bd22f07a9ed11736f0.tar.gz freebsd-ports-gnome-3a3872f798b69ebe765f71bd22f07a9ed11736f0.tar.zst freebsd-ports-gnome-3a3872f798b69ebe765f71bd22f07a9ed11736f0.zip |
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
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/katarakt/files/patch-src_resourcemanager.cpp | 18 | ||||
-rw-r--r-- | graphics/katarakt/files/patch-src_search.cpp | 29 | ||||
-rw-r--r-- | graphics/katarakt/files/patch-src_util.h | 14 |
3 files changed, 61 insertions, 0 deletions
diff --git a/graphics/katarakt/files/patch-src_resourcemanager.cpp b/graphics/katarakt/files/patch-src_resourcemanager.cpp new file mode 100644 index 000000000000..3d3dfcd4641c --- /dev/null +++ b/graphics/katarakt/files/patch-src_resourcemanager.cpp @@ -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(); + diff --git a/graphics/katarakt/files/patch-src_search.cpp b/graphics/katarakt/files/patch-src_search.cpp new file mode 100644 index 000000000000..2a4bf9511a19 --- /dev/null +++ b/graphics/katarakt/files/patch-src_search.cpp @@ -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; diff --git a/graphics/katarakt/files/patch-src_util.h b/graphics/katarakt/files/patch-src_util.h new file mode 100644 index 000000000000..b033a2c8bd8d --- /dev/null +++ b/graphics/katarakt/files/patch-src_util.h @@ -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) |