pkgsrc/print/atril/options.mk
maya 61659018e3 atril: don't enable dvi support by default. bump pkgrevision.
This option is pulling in t1lib. t1lib is an enormous security risk.
It hasn't seen maintenance since 2011 and we have local patches for
security issues from 2011.

Given the lack of attention, it's likely there are more security
issues lurking.

Documents are usually obtained from untrusted sources, and thus are
considered a remote attack vector
Documents may embed their own fonts. If one embeds a T1 font, it might
be parsed by this unmaintained library.

To avoid this risk, rip out the t1lib dependency.
2019-10-28 21:49:22 +00:00

93 lines
2.3 KiB
Makefile

# $NetBSD: options.mk,v 1.4 2019/10/28 21:49:22 maya Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.atril
PKG_SUPPORTED_OPTIONS= dbus pdf ps xps dvi djvu tiff gdk-pixbuf keyring introspection
PKG_SUGGESTED_OPTIONS= dbus pdf ps xps djvu tiff gdk-pixbuf keyring
.include "../../mk/bsd.options.mk"
PLIST_VARS+= dbus pdf ps xps dvi djvu tiff pixbuf introspection
.if !empty(PKG_OPTIONS:Mdbus)
.include "../../sysutils/dbus-glib/buildlink3.mk"
CONFIGURE_ARGS+= --enable-dbus
PLIST.dbus= yes
.else
CONFIGURE_ARGS+= --disable-dbus
.endif
.if !empty(PKG_OPTIONS:Mps)
.include "../../print/libspectre/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ps
PLIST.ps= yes
.else
CONFIGURE_ARGS+= --disable-ps
.endif
.if !empty(PKG_OPTIONS:Mxps)
.include "../../print/libgxps/buildlink3.mk"
CONFIGURE_ARGS+= --enable-xps
PLIST.xps= yes
.else
CONFIGURE_ARGS+= --disable-xps
.endif
.if !empty(PKG_OPTIONS:Mpdf)
.include "../../print/poppler-glib/buildlink3.mk"
CONFIGURE_ARGS+= --enable-pdf
PLIST.pdf= yes
.else
CONFIGURE_ARGS+= --disable-pdf
.endif
.if !empty(PKG_OPTIONS:Mdvi)
.include "../../print/kpathsea/buildlink3.mk"
.include "../../fonts/t1lib/buildlink3.mk"
CONFIGURE_ARGS+= --enable-dvi
CONFIGURE_ARGS+= --enable-t1lib
PLIST.dvi= yes
.else
CONFIGURE_ARGS+= --disable-dvi
CONFIGURE_ARGS+= --disable-t1lib
.endif
.if !empty(PKG_OPTIONS:Mdjvu)
.include "../../graphics/djvulibre-lib/buildlink3.mk"
CONFIGURE_ARGS+= --enable-djvu
PLIST.djvu= yes
.else
CONFIGURE_ARGS+= --disable-djvu
.endif
.if !empty(PKG_OPTIONS:Mtiff)
.include "../../graphics/tiff/buildlink3.mk"
CONFIGURE_ARGS+= --enable-tiff
PLIST.tiff= yes
.else
CONFIGURE_ARGS+= --disable-tiff
.endif
.if !empty(PKG_OPTIONS:Mgdk-pixbuf)
.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-pixbuf
PLIST.pixbuf=yes
.else
CONFIGURE_ARGS+= --disable-pixbuf
.endif
.if !empty(PKG_OPTIONS:Mkeyring)
.include "../../security/libsecret/buildlink3.mk"
CONFIGURE_ARGS+= --with-keyring
.else
CONFIGURE_ARGS+= --without-keyring
.endif
.if !empty(PKG_OPTIONS:Mintrospection)
BUILDLINK_DEPMETHOD.gobject-introspection+= build
.include "../../devel/gobject-introspection/buildlink3.mk"
.include "../../graphics/cairo-gobject/buildlink3.mk"
CONFIGURE_ARGS+= --enable-introspection
PLIST.introspection= yes
.else
CONFIGURE_ARGS+= --disable-introspection
.endif