From owner-svn-ports-head@freebsd.org Sat Aug 8 07:31:01 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9068F3A2F9F; Sat, 8 Aug 2020 07:31:01 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BNv6F3KjTz4Ryh; Sat, 8 Aug 2020 07:31:01 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 557DC25219; Sat, 8 Aug 2020 07:31:01 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0787V16R095228; Sat, 8 Aug 2020 07:31:01 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0787V0tL095225; Sat, 8 Aug 2020 07:31:00 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <202008080731.0787V0tL095225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Sat, 8 Aug 2020 07:31:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r544367 - head/graphics/katarakt/files X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: head/graphics/katarakt/files X-SVN-Commit-Revision: 544367 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2020 07:31:01 -0000 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 *hits = new QList; +-#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 tmp = p->search(search_term, +- has_upper_case ? Poppler::Page::CaseSensitive : Poppler::Page::CaseInsensitive); +- hits->swap(tmp); +-#else + // even newer interface + QList 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)