git: bb2ef4e129b0 - main - converters/pdf2djvu: switch to C++17 for upcoming poppler, -XMP option

From: Adriaan de Groot <adridg_at_FreeBSD.org>
Date: Fri, 21 Jan 2022 21:41:52 UTC
The branch main has been updated by adridg:

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

commit bb2ef4e129b0adb327e14abbc012e1cd39cea56d
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2022-01-11 22:43:27 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2022-01-21 21:41:05 +0000

    converters/pdf2djvu: switch to C++17 for upcoming poppler, -XMP option
    
    This is a "fix-it-before-it-breaks" commit.
    
    The issue is the upcoming updating for graphics/poppler. It *requires*
    consumers to be C++17 or later. Previously it was ok with C++11 or
    later. However, graphics/exiv2 is incompatible with C++17 in many
    ways; there's work on a new release that is compatible, but that's
    not out yet and not really applicable to the exiv2 version found
    in ports. (As an example of things-that-change, "register" is a
    keyword in C, which informs the storage class of a variable; in C++
    up to C++17 it was possibly-meaningful but deprecated while in C++17
    it is a reserved keyword but not allowed for storage class; any
    `register int x` is now a syntax error and patching that up outside
    of upstream repos is no fun at all).
    
    Mark XMP option broken because it pulls in (for the option)
    graphics/exiv2, while graphics/poppler is always needed.
    
    PR:     260956
---
 converters/pdf2djvu/Makefile | 15 ++++++---------
 converters/pdf2djvu/distinfo |  6 +++---
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/converters/pdf2djvu/Makefile b/converters/pdf2djvu/Makefile
index 194bb5cdb3cd..0eaa305e79b7 100644
--- a/converters/pdf2djvu/Makefile
+++ b/converters/pdf2djvu/Makefile
@@ -1,13 +1,9 @@
 PORTNAME=	pdf2djvu
-DISTVERSION=	0.9.17.1
-PORTREVISION=	17
+DISTVERSION=	0.9.18.2
+PORTREVISION=	1
 CATEGORIES=	converters
 MASTER_SITES=	https://github.com/jwilk/${PORTNAME}/releases/download/${PORTVERSION}/
 
-# Poppler 21.10 support
-PATCH_SITES=	https://github.com/jwilk/pdf2djvu/commit/
-PATCHFILES=	e528d3ab88c582e8481c9014982263d9c9e992fe.patch:-p1
-
 MAINTAINER=	samy.mahmoudi@gmail.com
 COMMENT=	Creates DjVu files from PDF files
 
@@ -18,14 +14,14 @@ BUILD_DEPENDS=	${LOCALBASE}/include/pstreams/pstream.h:devel/pstreams
 LIB_DEPENDS=	libdjvulibre.so:graphics/djvulibre \
 		libpoppler.so:graphics/poppler
 
-USES=		autoreconf:build compiler:c++11-lang gettext-tools \
+USES=		autoreconf:build compiler:c++17-lang gettext-tools \
 		gmake iconv localbase pkgconfig tar:xz
-USE_CXXSTD=	c++11
+USE_CXXSTD=	c++17
 
 GNU_CONFIGURE=	yes
 
 OPTIONS_DEFINE=	COLOR_QUANTIZATION DOCS NLS MULTITHREADING XMP
-OPTIONS_DEFAULT=COLOR_QUANTIZATION          MULTITHREADING XMP
+OPTIONS_DEFAULT=COLOR_QUANTIZATION          MULTITHREADING
 OPTIONS_SUB=	yes
 
 COLOR_QUANTIZATION_DESC=Color quantization via GraphicsMagick++
@@ -49,6 +45,7 @@ MULTITHREADING_CONFIGURE_ENABLE=openmp
 
 XMP_CONFIGURE_ENABLE=	xmp
 XMP_LIB_DEPENDS=	libexiv2.so:graphics/exiv2
+XMP_BROKEN=		graphics/exiv2 and graphics/poppler disagree about usable C++ standard
 
 pre-configure:
 	@cd ${WRKSRC} && ${SH} ${FILESDIR}/bootstrap
diff --git a/converters/pdf2djvu/distinfo b/converters/pdf2djvu/distinfo
index 4d16a595e807..d4a6b4e18c85 100644
--- a/converters/pdf2djvu/distinfo
+++ b/converters/pdf2djvu/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1633515656
-SHA256 (pdf2djvu-0.9.17.1.tar.xz) = 5bbbb7bdc7858a1eeac6ff270e5a323390f2abb6bd3b0b2ae08c1965272226a3
-SIZE (pdf2djvu-0.9.17.1.tar.xz) = 295540
+TIMESTAMP = 1641936020
+SHA256 (pdf2djvu-0.9.18.2.tar.xz) = 9ea03f21d841a336808d89d65015713c0785e7295a6559d77771dc795333a9fa
+SIZE (pdf2djvu-0.9.18.2.tar.xz) = 305912
 SHA256 (e528d3ab88c582e8481c9014982263d9c9e992fe.patch) = 39cd67224052205bcf65eddf30e71953b329e2775e917ebe0993bee4696590bb
 SIZE (e528d3ab88c582e8481c9014982263d9c9e992fe.patch) = 1149