tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding cairo support to print/poppler



EF> -- Add the build dependency to print/poppler, let it install 
EF>    poppler-cairo.pc and remove it from print/poppler-glib's PLIST?
GT> The question is how many people want to use poppler and not have cairo
GT> installed.  If almost zero, this might be a good approach.
Note that that's only a build dependency.

EF> -- Add a poppler-cairo package (with a full dependency on cairo) that 
EF>    only installs poppler-cairo.pc (removing it from print/poppler-glib)?
GT> That is probably optimal in terms of not forcing dependencies on people
GT> that they don't work, but adds a package.
Yes.

EF> -- Leave it as is and let the new poppler-cairo-utils package depend on 
EF>    poppler and cairo directly?
GT> How would this work?  Wouldn't poppler-cairo.pc not be installed? 
GT> Or is this in poppler-glib, and that's depended on?  If so, what's 
GT> wrong now that would be fixed? (not challenging, just not clear)
It's weird. If you build poppler with cairo enabled, it will build, but 
not install a libpoppler-cairo.la. If you enable building the utilities,
it uses that to build and install pdftocairo. It probably also uses it to 
build the glib interface (if enabled). So
-- you need to enable cairo to build the glib interface
-- if you enable cairo, building the utils adds pdftocairo
-- other than that, enabling cairo only adds poppler-cairo.pc.

I do have a local poppler-cairo-utils package (call that pdftocairo if you 
prefer) that only supplies pdftocairo and builds with the poppler package 
as is (you need a correction to patch-ab that incorrectly assumes 
libpoppler-cairo to get installed, which it isn't). Essentially, it is

CONFIGURE_ARGS+=	--enable-cairo-output
.include "../../print/poppler/buildlink3.mk"
.include "../../graphics/cairo/buildlink3.mk"
BUILD_DIRS=		goo fofi poppler utils
MAKE_FLAGS=		bin_PROGRAMS=pdftocairo dist_man1_MANS=pdftocairo.1
# $NetBSD: Makefile,v $

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

PKGNAME=		poppler-cairo-utils-${POPPLER_VERS}
COMMENT=		PDF utilities (from poppler) using cairo
#MAINTAINER=		reed%reedmedia.net@localhost

GNU_CONFIGURE=		yes
USE_TOOLS+=		gmake

CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
# Build the cairo graphics backend.
CONFIGURE_ARGS+=	--enable-cairo-output
# Don't build the splash graphics backend.
CONFIGURE_ARGS+=	--disable-splash-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
# Enable build and install of the tools
CONFIGURE_ARGS+=	--enable-utils	# the default

BUILDLINK_API_DEPENDS.poppler+=     poppler>=${POPPLER_VERS}
.include "../../print/poppler/buildlink3.mk"
.include "../../graphics/cairo/buildlink3.mk"

BUILD_DIRS=		goo fofi poppler utils
MAKE_FLAGS=		bin_PROGRAMS=pdftocairo dist_man1_MANS=pdftocairo.1

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

.if !empty(MACHINE_PLATFORM:MNetBSD-[12].*)
.include "../../devel/pthread-stublib/buildlink3.mk"
PTHREAD_STUBLIB=	"-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lpthstub"
.else
PTHREAD_STUBLIB=	# provided by libc
.endif
MAKE_ENV+=		PTHREAD_STUBLIB=${PTHREAD_STUBLIB}

.include "../../mk/bsd.pkg.mk"
This provides PDF (Portable Document Format) utilities from the
poppler project. Some of these are based on the versions from xpdf.

This poppler-cairo-utils package provides:

pdftocairo - converts a PDF file to PostScript using Cairo
@comment $NetBSD: PLIST,v $
bin/pdftocairo
man/man1/pdftocairo.1


Home | Main Index | Thread Index | Old Index