# $NetBSD: Makefile.common,v 1.159 2024/10/20 20:01:34 nia Exp $
#
# used by print/poppler/Makefile
# used by print/poppler-cpp/Makefile
# used by print/poppler-includes/Makefile
# used by print/poppler-qt5/Makefile
# used by print/poppler-qt6/Makefile
# used by print/poppler-utils/Makefile

POPPLER_VERS=	24.10.0
DISTNAME=	poppler-${POPPLER_VERS}
CATEGORIES=	print
MASTER_SITES=	https://poppler.freedesktop.org/
EXTRACT_SUFX=	.tar.xz

MAINTAINER=	reed@reedmedia.net
HOMEPAGE=	https://poppler.freedesktop.org/
LICENSE=	gnu-gpl-v2

DISTINFO_FILE=	${.CURDIR}/../../print/poppler/distinfo
PATCHDIR=	${.CURDIR}/../../print/poppler/patches

USE_CXX_FEATURES=	c++20
USE_LANGUAGES=		c c++
USE_TOOLS+=		pkg-config gsed

CMAKE_CONFIGURE_ARGS+=	-DENABLE_GPGME=OFF
CMAKE_CONFIGURE_ARGS+=	-DENABLE_NSS3=OFF

.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
BUILDLINK_TRANSFORM+=   rm:-fno-check-new
.endif

# poppler's build infrastructure and our split packages
# do not work with ninja
CMAKE_GENERATOR=	make

.include "../../devel/boost-headers/buildlink3.mk"
.include "../../devel/cmake/build.mk"
.include "../../graphics/openjpeg/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
