mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
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
This commit is contained in:
parent
96cdc5e45b
commit
3a3872f798
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=544367
18
graphics/katarakt/files/patch-src_resourcemanager.cpp
Normal file
18
graphics/katarakt/files/patch-src_resourcemanager.cpp
Normal file
@ -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();
|
||||
|
29
graphics/katarakt/files/patch-src_search.cpp
Normal file
29
graphics/katarakt/files/patch-src_search.cpp
Normal file
@ -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;
|
14
graphics/katarakt/files/patch-src_util.h
Normal file
14
graphics/katarakt/files/patch-src_util.h
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user