summaryrefslogtreecommitdiff
path: root/print/poppler-cpp/Makefile
blob: 4b150e471b1da5aee735b8874695296c051e6a0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $NetBSD: Makefile,v 1.28 2021/04/09 06:54:57 wiz Exp $

PKGREVISION= 1
.include "../../print/poppler/Makefile.common"

PKGNAME=	poppler-cpp-${POPPLER_VERS}

COMMENT=	PDF rendering library (cpp wrapper)

CONFLICTS+=	poppler<0.4.5nb1

PKGCONFIG_OVERRIDE+=	${WRKSRC}/poppler-cpp.pc.cmake

# Don't compile GTK+ test program.
CMAKE_ARGS+=	-DBUILD_GTK_TESTS=OFF
# Don't compile GLib wrapper which also needs gtk2
CMAKE_ARGS+=	-DENABLE_GLIB=OFF
# Don't build and install the tools
CMAKE_ARGS+=	-DENABLE_UTILS=OFF
# Compile poppler cpp wrapper.
CMAKE_ARGS+=	-DENABLE_CPP=ON
# Don't compile poppler qt5 wrapper.
CMAKE_ARGS+=	-DENABLE_QT5=OFF
# Don't build libcurl based HTTP support. ## might want to include
CMAKE_ARGS+=	-DENABLE_LIBCURL=OFF

LDFLAGS.SunOS+=		-liconv

BUILDLINK_API_DEPENDS.poppler+=	poppler-${POPPLER_VERS}{,nb*}
.include "../../print/poppler/buildlink3.mk"

BUILD_DIRS=		cpp
INSTALL_DIRS=		cpp

INSTALLATION_DIRS+=	lib/pkgconfig

.include "../../converters/libiconv/buildlink3.mk"

CHECK_BUILTIN.iconv:=	yes
.include "../../converters/libiconv/builtin.mk"
CHECK_BUILTIN.iconv:=	no

.if !empty(USE_BUILTIN.iconv:M[nN][oO])
CMAKE_ARGS+=	-DICONV_INCLUDE_DIR:PATH=${BUILDLINK_PREFIX.iconv}/include
CMAKE_ARGS+=	-DICONV_LIBRARIES:PATH=${BUILDLINK_PREFIX.iconv}/lib
LDFLAGS.Darwin+=-liconv
.endif

post-install:
	${INSTALL_DATA} ${WRKSRC}/poppler-cpp.pc ${DESTDIR}${PREFIX}/lib/pkgconfig

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"