summaryrefslogtreecommitdiff
path: root/print/poppler/Makefile
blob: 8fcb5a8b0552252dbb82cabb91e310294c1bbaac (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
54
55
56
57
# $NetBSD: Makefile,v 1.42 2009/08/26 19:56:42 sno Exp $
#

.include "../../print/poppler/Makefile.common"

PKGREVISION=	2

COMMENT=		PDF rendering library
MAINTAINER=		reed@reedmedia.net

USE_TOOLS+=		gmake

#PKGCONFIG_OVERRIDE+=	${WRKSRC}/poppler-cairo.pc.in
PKGCONFIG_OVERRIDE+=	${WRKSRC}/poppler-splash.pc.in
PKGCONFIG_OVERRIDE+=	${WRKSRC}/poppler.pc.in
GNU_CONFIGURE=		yes

INSTALLATION_DIRS+=	include/poppler share/doc/poppler

CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
# TODO: Later add an option to choose Splash versus Cairo backend.
# Build the Splash graphics backend.
CONFIGURE_ARGS+=	--enable-splash-output
# Don't build the cairo graphics backend.
CONFIGURE_ARGS+=	--disable-cairo-output
# Don't compile poppler qt wrapper.
CONFIGURE_ARGS+=	--disable-poppler-qt
# Don't compile GTK+ test program.
CONFIGURE_ARGS+=	--disable-gtk-test
# Don't compile GLib wrapper which also needs gtk2
CONFIGURE_ARGS+=	--disable-poppler-glib
# Don't build and install the tools
CONFIGURE_ARGS+=	--disable-utils

PKG_OPTIONS_VAR=	PKG_OPTIONS.poppler
PKG_SUPPORTED_OPTIONS=	poppler-cms
PKG_SUGGESTED_OPTIONS=	poppler-cms
.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mpoppler-cms)
CONFIGURE_ARGS+=	--enable-cms
.include "../../graphics/lcms/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-cms
.endif

.include "../../mk/bsd.prefs.mk"

post-install:
	${INSTALL_MAN} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/poppler/
	${INSTALL_MAN} ${WRKSRC}/README-XPDF ${DESTDIR}${PREFIX}/share/doc/poppler/
	${RMDIR} ${DESTDIR}${PREFIX}/include/poppler || ${TRUE}

.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"