From nobody Tue Apr 26 17:08:03 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 912541AABFEE; Tue, 26 Apr 2022 17:08:04 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KnpH75MTvz4rnT; Tue, 26 Apr 2022 17:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650992883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnr5vQAt8Ublo3g9iGdkTl0KxY+iQfeEvLYF697gyos=; b=TA5JLktGCJTP+jsAqZ25/p1Y72IdkBCOTnQDBnfaLV2BO7/n65fNCHxFCI+cDTpg9MMRAi ZFL3eKGPl9/wXhrJUfwpRqDDFNEnzQ3oiQBvajbgBOszC+OlMB8JRBm2I8JqqrQlQLL/dJ 0cq8uVL+UsQa0JxFhhJDut60asZsaMa/B0leleoI12w0kRNF1eCgeyiUaoJeF+deslSAvY bh/wVobpjOb26VLrIQXVMETMPWIQ+tQcibGLkIUOYhMIb7Ej6/7UT76cnjQjFnTNJcPHJQ ywsWa7Rzodbgd6ZSxeS8EgPXp9RmLMkkpj180TmN57dPSBmvJ7nYKzjA/0Redw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E6FF13733; Tue, 26 Apr 2022 17:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23QH83Vb007214; Tue, 26 Apr 2022 17:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23QH83Lc007213; Tue, 26 Apr 2022 17:08:03 GMT (envelope-from git) Date: Tue, 26 Apr 2022 17:08:03 GMT Message-Id: <202204261708.23QH83Lc007213@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Tobias C. Berner" Subject: git: d9b5ef800dbd - main - editors/libreoffice: prepare for update of poppler to 22.04 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tcberner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9b5ef800dbd0366eae81b03bfa89689ec73c6f7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650992884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnr5vQAt8Ublo3g9iGdkTl0KxY+iQfeEvLYF697gyos=; b=WKa9kGoZYyjyzOpyTv7czteiMO9XnNIFFM2srVVBC9r8N2L57FIFvf7bNCZSENDJH+nhf/ qUNBpmnjlsB1XgM5AW84z+R4703BLjC0CliqH3N9euMODmRZUG+ySVbdfC+RTGCECJfyv6 68UXHEQVIbjs6t9j+Y+SDm1m/JxDRIUwgyK+xsozqQm8gxtMC22v55J7Df19gErKPEP7wb okuD8HlWPqsq2MC+6o5P4AOo6ZBHATtdsw4d4nj0oWP+d1U7VWOIrmTMUclpQE89nY5Nh5 9z28xqxXS7q7iOl1OR47V5HMmIh03+Y5KaO2m7yGZifQn0Ve96+U6hYg2/pQ+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650992884; a=rsa-sha256; cv=none; b=CFmuQaLBuSHlq9nsgaSaz7qcxqGnP+pfErsZlNglov+alWBkaGXtXbzZEgFidBaCXT8BW/ ehmHQ7fYrP+1tr7+AqZhQuHRTBB9Dv7FHK3hBx+Rv5uckySK7euuUTp2n1T3D3klItUc5D AztNHS2INV0F7tPaJ8EmzAOyLIyhDKNJ5Tu0SbGwLSXdCGr9kQg7LQ0Ut2ngvuvAR6NoI2 iDPsmuJxRA4gTtWmjky2aXuRDVN0B+NuOYUooHSpSNtQeimTrWh3S1bvfBkRWtbSLDNhtu KheMWaT89ys4SEJim1sWXoKAwcRMyKFTREVblUW6YCPXG7575pl+xgP2olIIQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tcberner: URL: https://cgit.FreeBSD.org/ports/commit/?id=d9b5ef800dbd0366eae81b03bfa89689ec73c6f7 commit d9b5ef800dbd0366eae81b03bfa89689ec73c6f7 Author: Tobias C. Berner AuthorDate: 2022-04-26 16:02:59 +0000 Commit: Tobias C. Berner CommitDate: 2022-04-26 16:56:49 +0000 editors/libreoffice: prepare for update of poppler to 22.04 PR: 263009 --- ...ource_pdfimport_xpdfwrapper_pdfioutdev__gpl.cxx | 69 ++++++++++++++++++++++ ...t_source_pdfimport_xpdfwrapper_wrapper__gpl.cxx | 26 ++++++++ 2 files changed, 95 insertions(+) diff --git a/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.cxx b/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.cxx new file mode 100644 index 000000000000..1e32c6d74fe2 --- /dev/null +++ b/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev__gpl.cxx @@ -0,0 +1,69 @@ +--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig 2022-04-26 16:11:01 UTC ++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -474,11 +474,17 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* g + { + // TODO(P3): Unfortunately, need to read stream twice, since + // we must write byte count to stdout before ++#if !POPPLER_CHECK_VERSION(22, 3, 0) + char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); ++#else ++ std::optional> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() ); ++#endif + if( pBuf ) + { + aNewFont.isEmbedded = true; ++#if !POPPLER_CHECK_VERSION(22, 3, 0) + gfree(pBuf); ++#endif + } + } + +@@ -492,21 +498,32 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) cons + return; + + int nSize = 0; +- char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); ++#if !POPPLER_CHECK_VERSION(22, 3, 0) ++ char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); ++#else ++ std::optional> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() ); ++#endif + if( !pBuf ) + return; + + // ---sync point--- see SYNC STREAMS above + fflush(stdout); +- ++#if !POPPLER_CHECK_VERSION(22, 3, 0) + if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast(nSize) ) ++#else ++ if( fwrite(reinterpret_cast(pBuf.value().data()), sizeof(char), nSize, g_binary_out) != static_cast(nSize) ) ++#endif + { +- gfree(pBuf); ++#if !POPPLER_CHECK_VERSION(22, 3, 0) ++ gfree(pBuf); ++#endif + exit(1); // error + } + // ---sync point--- see SYNC STREAMS above + fflush(g_binary_out); +- gfree(pBuf); ++#if !POPPLER_CHECK_VERSION(22, 3, 0) ++ gfree(pBuf); ++#endif + } + + #if POPPLER_CHECK_VERSION(0, 83, 0) +@@ -759,7 +776,11 @@ void PDFOutDev::updateFont(GfxState *state) + { + assert(state); + ++#if !POPPLER_CHECK_VERSION(22, 3, 0) + GfxFont *gfxFont = state->getFont(); ++#else ++ GfxFont *gfxFont = state->getFont().get(); ++#endif + if( !gfxFont ) + return; + diff --git a/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_wrapper__gpl.cxx b/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_wrapper__gpl.cxx new file mode 100644 index 000000000000..2cc067945d3f --- /dev/null +++ b/editors/libreoffice/files/patch-sdext_source_pdfimport_xpdfwrapper_wrapper__gpl.cxx @@ -0,0 +1,26 @@ +--- sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx.orig 2022-03-23 13:32:00 UTC ++++ sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +@@ -138,6 +138,15 @@ int main(int argc, char **argv) + _setmode( _fileno( g_binary_out ), _O_BINARY ); + #endif + ++#if POPPLER_CHECK_VERSION(22, 3, 0) ++ PDFDoc aDoc( std::make_unique(pFileName), ++ GooString(pOwnerPasswordStr), ++ GooString(pUserPasswordStr) ); ++ ++ PDFDoc aErrDoc( std::make_unique(pErrFileName), ++ GooString(pOwnerPasswordStr), ++ GooString(pUserPasswordStr) ); ++#else + PDFDoc aDoc( pFileName, + pOwnerPasswordStr, + pUserPasswordStr ); +@@ -145,6 +154,7 @@ int main(int argc, char **argv) + PDFDoc aErrDoc( pErrFileName, + pOwnerPasswordStr, + pUserPasswordStr ); ++#endif + + // Check various permissions for aDoc. + PDFDoc &rDoc = aDoc.isOk()? aDoc: aErrDoc;