git: c8b6581835f1 - main - editors/libreoffice: force PDFium to link with OpenJPEG (+)

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Sun, 06 Mar 2022 16:42:12 UTC
The branch main has been updated by fluffy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c8b6581835f18a1dae05a4dd9a8b5829fe99b5d7

commit c8b6581835f18a1dae05a4dd9a8b5829fe99b5d7
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2022-03-06 16:37:48 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2022-03-06 16:37:48 +0000

    editors/libreoffice: force PDFium to link with OpenJPEG (+)
    
    When libvcllo.so is linked together with libpdfiumlo.so, it also needs
    libopenjp2.so from graphics/openjpeg, since pdfium depends on that.
    Building with LTO exposes this as an error, complaining about undefined
    references to openjpeg library functions.
    
    While here, add py310 to allowed versions to the build
    
    PR:             262008
    Submitted by:   Florian Walpen <dev@submerge.ch>
    Sponsored by:   Netzkommune GmbH
---
 editors/libreoffice/Makefile                          |  4 ++--
 editors/libreoffice/files/patch-RepositoryExternal.mk | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile
index 7371d11ef669..d78b4085a616 100644
--- a/editors/libreoffice/Makefile
+++ b/editors/libreoffice/Makefile
@@ -1,4 +1,4 @@
-PORTREVISION=	0
+PORTREVISION=	1
 
 .include "${.CURDIR}/Makefile.common"
 
@@ -116,7 +116,7 @@ SHEBANG_GLOB=	*.py
 GNU_CONFIGURE=	yes
 USES=		autoreconf:build bison compiler:c++17-lang cpe desktop-file-utils \
 		gettext gl gmake gnome jpeg localbase:ldflags perl5 pkgconfig \
-		python:3.8-3.9 shebangfix shared-mime-info ssl tar:xz xorg
+		python:3.8-3.10 shebangfix shared-mime-info ssl tar:xz xorg
 USE_GL=		gl glew glu
 USE_GNOME=	cairo glib20 libxml2 libxslt
 USE_OPENLDAP=	yes
diff --git a/editors/libreoffice/files/patch-RepositoryExternal.mk b/editors/libreoffice/files/patch-RepositoryExternal.mk
new file mode 100644
index 000000000000..40589b578ab4
--- /dev/null
+++ b/editors/libreoffice/files/patch-RepositoryExternal.mk
@@ -0,0 +1,10 @@
+--- RepositoryExternal.mk.orig	2022-02-28 18:19:33 UTC
++++ RepositoryExternal.mk
+@@ -4203,6 +4203,7 @@ $(call gb_LinkTarget_set_include,$(1),\
+        $$(INCLUDE) \
+ )
+ $(call gb_LinkTarget_use_libraries,$(1),pdfium)
++$(call gb_LinkTarget_add_libs,$(1),$(OPENJPEG2_LIBS))
+ endef
+ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
+        pdfium \