freebsd-ports/converters/pdf2djvu/Makefile
Adriaan de Groot bb2ef4e129 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
2022-01-21 22:41:05 +01:00

62 lines
1.9 KiB
Makefile

PORTNAME= pdf2djvu
DISTVERSION= 0.9.18.2
PORTREVISION= 1
CATEGORIES= converters
MASTER_SITES= https://github.com/jwilk/${PORTNAME}/releases/download/${PORTVERSION}/
MAINTAINER= samy.mahmoudi@gmail.com
COMMENT= Creates DjVu files from PDF files
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/doc/COPYING
BUILD_DEPENDS= ${LOCALBASE}/include/pstreams/pstream.h:devel/pstreams
LIB_DEPENDS= libdjvulibre.so:graphics/djvulibre \
libpoppler.so:graphics/poppler
USES= autoreconf:build compiler:c++17-lang gettext-tools \
gmake iconv localbase pkgconfig tar:xz
USE_CXXSTD= c++17
GNU_CONFIGURE= yes
OPTIONS_DEFINE= COLOR_QUANTIZATION DOCS NLS MULTITHREADING XMP
OPTIONS_DEFAULT=COLOR_QUANTIZATION MULTITHREADING
OPTIONS_SUB= yes
COLOR_QUANTIZATION_DESC=Color quantization via GraphicsMagick++
DOCS_DESC= Generate the man page
NLS_DESC= Native Language Support via gettext utilities
MULTITHREADING_DESC= Multithreading support via OpenMP
XMP_DESC= XMP metadata support via Exiv2
COLOR_QUANTIZATION_CONFIGURE_WITH=graphicsmagick
COLOR_QUANTIZATION_LIB_DEPENDS= \
libGraphicsMagick++.so:graphics/GraphicsMagick \
libGraphicsMagick.so:graphics/GraphicsMagick
DOCS_BUILD_DEPENDS= docbook-xsl>0:textproc/docbook-xsl \
xsltproc:textproc/libxslt
NLS_CONFIGURE_ENABLE= nls
NLS_USES= gettext-runtime
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
# Poppler 20.12 no longer installs the pc file for this private backend.
# https://github.com/jwilk/pdf2djvu/issues/144
${REINPLACE_CMD} -e 's|poppler-splash|poppler|g' ${WRKSRC}/configure
post-build-DOCS-on:
@cd ${WRKSRC}/doc && ${GMAKE}
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk>