CVS commit: pkgsrc/print/libppd

"Thomas Klausner" <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.cvs
Message-ID <[email protected]>
Module Name:	pkgsrc
Committed By:	wiz
Date:		Mon Jul 27 19:16:24 UTC 2026

Modified Files:
	pkgsrc/print/libppd: Makefile
Added Files:
	pkgsrc/print/libppd: options.mk

Log Message:
libppd: add options to choose the PDF renderer

From Edgar Fuß.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/print/libppd/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/print/libppd/options.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(unnamed) (text/x-diff, 3.4 KB)
Modified files:

Index: pkgsrc/print/libppd/Makefile
diff -u pkgsrc/print/libppd/Makefile:1.7 pkgsrc/print/libppd/Makefile:1.8
--- pkgsrc/print/libppd/Makefile:1.7	Thu May 14 16:41:56 2026
+++ pkgsrc/print/libppd/Makefile	Mon Jul 27 19:16:24 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2026/05/14 16:41:56 ryoon Exp $
+# $NetBSD: Makefile,v 1.8 2026/07/27 19:16:24 wiz Exp $
 
 DISTNAME=	libppd-2.1.1
-PKGREVISION=	6
+PKGREVISION=	7
 CATEGORIES=	print
 MASTER_SITES=	${MASTER_SITE_GITHUB:=OpenPrinting/}
 GITHUB_PROJECT=	libppd
@@ -13,8 +13,6 @@ HOMEPAGE=	https://github.com/OpenPrintin
 COMMENT=	Library for CUPS 2.x PPD files
 LICENSE=	apache-2.0 # with gnu-gpl-v2 and gnu-lgpl-v2 exception
 
-DEPENDS+=	poppler-utils-[0-9]*:../../print/poppler-utils
-
 GNU_CONFIGURE=	yes
 USE_LIBTOOL=	yes
 USE_TOOLS+=	pkg-config
@@ -22,8 +20,8 @@ USE_LANGUAGES=	c c++
 
 PKGCONFIG_OVERRIDE+=	libppd.pc.in
 
+.include "options.mk"
+
 .include "../../devel/zlib/buildlink3.mk"
-.include "../../print/ghostscript/buildlink3.mk"
 .include "../../print/libcupsfilters/buildlink3.mk"
-.include "../../print/mupdf/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Added files:

Index: pkgsrc/print/libppd/options.mk
diff -u /dev/null pkgsrc/print/libppd/options.mk:1.1
--- /dev/null	Mon Jul 27 19:16:24 2026
+++ pkgsrc/print/libppd/options.mk	Mon Jul 27 19:16:24 2026
@@ -0,0 +1,55 @@
+# $NetBSD: options.mk,v 1.1 2026/07/27 19:16:24 wiz Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.libppd
+
+# pdftops-renderers: PDF-to-PS renderers to include support for
+# pdftops-renderer: default PDF-to-PS renderer to use
+#  when CUPS option pdftops-renderer is not set
+PKG_OPTIONS_REQUIRED_GROUPS+=		pdftops-renderer
+PKG_OPTIONS_NONEMPTY_SETS+=		pdftops-renderers
+.for i in gs pdftops pdftocairo mupdf # hybrid
+PKG_OPTIONS_SET.pdftops-renderers+=	pdftops-renderers-${i}
+PKG_OPTIONS_GROUP.pdftops-renderer+=	pdftops-renderer-${i}
+.endfor
+PKG_SUGGESTED_OPTIONS+=			pdftops-renderers-gs pdftops-renderers-pdftops
+PKG_SUGGESTED_OPTIONS+=			pdftops-renderer-gs
+
+.include "../../mk/bsd.options.mk"
+
+PDFTOPS_RENDERER=	${PKG_OPTIONS:Mpdftops-renderer-*:S/^pdftops-renderer-//}
+.if !empty(PKG_OPTIONS:Mpdftops-renderers-${PDFTOPS_RENDERER})
+CONFIGURE_ARGS+=	--with-pdftops=${PDFTOPS_RENDERER}
+.else
+PKG_FAIL_REASON+=	"Default pdftops renderer ${PDFTOPS_RENDERER} not included in pdftops renderers"
+.endif
+
+# Strangely, for some of the possible renderers, there's a
+#  --disable-xxx option, for some, you need to revert to
+#  passing a nonexistent path
+.if !empty(PKG_OPTIONS:Mpdftops-renderers-gs)
+.include "../../print/ghostscript/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-gs-path=${PREFIX}/bin/gs
+.else
+CONFIGURE_ARGS+=	--disable-ghostscript
+.endif
+
+.if !empty(PKG_OPTIONS:Mpdftops-renderers-pdftops)
+DEPENDS+=		poppler-utils-[0-9]*:../../print/poppler-utils
+CONFIGURE_ARGS+=	--with-pdftops-path=${PREFIX}/bin/pdftops
+.else
+CONFIGURE_ARGS+=	--with-pdftops-path=/nonexistent/pdftops
+.endif
+
+.if !empty(PKG_OPTIONS:Mpdftops-renderers-pdftocairo)
+DEPENDS+=		poppler-utils-[0-9]*:../../print/poppler-utils
+CONFIGURE_ARGS+=	--with-pdftocairo-path=${PREFIX}/bin/pdftocairo
+.else
+CONFIGURE_ARGS+=	--with-pdftocairo-path=/nonexistent/pdftocairo
+.endif
+
+.if !empty(PKG_OPTIONS:Mpdftops-renderers-mupdf)
+DEPENDS+=		mupdf-[0-9]*:../../print/mupdf
+CONFIGURE_ARGS+=	--with-mutool-path=${PREFIX}/bin/mutool
+.else
+CONFIGURE_ARGS+=	--disable-mutool
+.endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.