pkgsrc-WIP-changes archive

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

cups*: Import cups-2.2.12 as wip/cups{,-base}



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Sun Nov 17 14:37:55 2019 +0100
Changeset:	a6af01a45cceaaacb4a6ec8463ee6c488827a030

Modified Files:
	Makefile
Added Files:
	cups-base/DESCR
	cups-base/MESSAGE
	cups-base/MESSAGE.libusb
	cups-base/MESSAGE.pam
	cups-base/Makefile
	cups-base/PLIST
	cups-base/buildlink3.mk
	cups-base/distinfo
	cups-base/files/cups.pam
	cups-base/files/cupsd.sh
	cups-base/options.mk
	cups-base/patches/patch-ae
	cups-base/patches/patch-af
	cups-base/patches/patch-ai
	cups-base/patches/patch-airprint-conf_mime.convs.in
	cups-base/patches/patch-airprint-scheduler_conf.c
	cups-base/patches/patch-airprint-scheduler_dirsvc.c
	cups-base/patches/patch-airprint-scheduler_printers.c
	cups-base/patches/patch-at
	cups-base/patches/patch-conf-cups-files.conf.in
	cups-base/patches/patch-conf_Makefile
	cups-base/patches/patch-config-scripts_cups-compiler.m4
	cups-base/patches/patch-config-scripts_cups-directories.m4
	cups-base/patches/patch-config-scripts_cups-gssapi.m4
	cups-base/patches/patch-config-scripts_cups-libtool.m4
	cups-base/patches/patch-config-scripts_cups-manpages.m4
	cups-base/patches/patch-config-scripts_cups-opsys.m4
	cups-base/patches/patch-cups-tls.c
	cups-base/patches/patch-cups_thread.c
	cups-base/patches/patch-doc-help-man-cups-files.conf.html
	cups-base/patches/patch-man-cups-files.conf.man.in
	cups-base/patches/patch-scheduler-conf.c
	cups-base/patches/patch-scheduler-conf.h
	cups-base/patches/patch-scheduler-main.c
	cups-base/patches/patch-scheduler_auth.c
	cups-base/patches/patch-scheduler_dirsvc.c
	cups-base/patches/patch-test_ippfind.c
	cups/DESCR
	cups/Makefile
	cups/Makefile.common

Log Message:
cups*: Import cups-2.2.12 as wip/cups{,-base}

Intended to be used to ease the update of print/cups{,-base}

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a6af01a45cceaaacb4a6ec8463ee6c488827a030

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |   2 +
 cups-base/DESCR                                    |  12 +
 cups-base/MESSAGE                                  |  13 +
 cups-base/MESSAGE.libusb                           |  14 +
 cups-base/MESSAGE.pam                              |   9 +
 cups-base/Makefile                                 | 172 +++++
 cups-base/PLIST                                    | 795 +++++++++++++++++++++
 cups-base/buildlink3.mk                            |  33 +
 cups-base/distinfo                                 |  32 +
 cups-base/files/cups.pam                           |   6 +
 cups-base/files/cupsd.sh                           |  74 ++
 cups-base/options.mk                               | 102 +++
 cups-base/patches/patch-ae                         |  25 +
 cups-base/patches/patch-af                         |  24 +
 cups-base/patches/patch-ai                         |  15 +
 .../patches/patch-airprint-conf_mime.convs.in      |  37 +
 cups-base/patches/patch-airprint-scheduler_conf.c  |  36 +
 .../patches/patch-airprint-scheduler_dirsvc.c      |  40 ++
 .../patches/patch-airprint-scheduler_printers.c    | 152 ++++
 cups-base/patches/patch-at                         |  15 +
 cups-base/patches/patch-conf-cups-files.conf.in    |  16 +
 cups-base/patches/patch-conf_Makefile              |  29 +
 .../patches/patch-config-scripts_cups-compiler.m4  |  42 ++
 .../patch-config-scripts_cups-directories.m4       | 158 ++++
 .../patches/patch-config-scripts_cups-gssapi.m4    |  36 +
 .../patches/patch-config-scripts_cups-libtool.m4   |  15 +
 .../patches/patch-config-scripts_cups-manpages.m4  |  62 ++
 .../patches/patch-config-scripts_cups-opsys.m4     |  16 +
 cups-base/patches/patch-cups-tls.c                 |  20 +
 cups-base/patches/patch-cups_thread.c              |  33 +
 .../patch-doc-help-man-cups-files.conf.html        |  17 +
 cups-base/patches/patch-man-cups-files.conf.man.in |  19 +
 cups-base/patches/patch-scheduler-conf.c           |  30 +
 cups-base/patches/patch-scheduler-conf.h           |  15 +
 cups-base/patches/patch-scheduler-main.c           |  86 +++
 cups-base/patches/patch-scheduler_auth.c           |  35 +
 cups-base/patches/patch-scheduler_dirsvc.c         |  17 +
 cups-base/patches/patch-test_ippfind.c             |  16 +
 cups/DESCR                                         |  16 +
 cups/Makefile                                      |  15 +
 cups/Makefile.common                               |  11 +
 41 files changed, 2312 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 58d8fd5610..7930cbe675 100644
--- a/Makefile
+++ b/Makefile
@@ -526,6 +526,8 @@ SUBDIR+=	cubature
 SUBDIR+=	cufflinks
 SUBDIR+=	cufflinks-2.2.1
 SUBDIR+=	cup
+SUBDIR+=	cups
+SUBDIR+=	cups-base
 SUBDIR+=	cutecom
 SUBDIR+=	cvc3
 SUBDIR+=	cvs-syncmail
diff --git a/cups-base/DESCR b/cups-base/DESCR
new file mode 100644
index 0000000000..e967ca7963
--- /dev/null
+++ b/cups-base/DESCR
@@ -0,0 +1,12 @@
+The Common UNIX Printing System provides a portable printing layer for
+UNIX operating systems. It has been developed by Easy Software Products
+to promote a standard printing solution for all UNIX vendors and users.
+CUPS provides the System V and Berkeley command-line interfaces.
+
+CUPS uses the Internet Printing Protocol (IETF-IPP) as the basis for
+managing print jobs and queues.  The Line Printer Daemon (LPD, RFC1179)
+and AppSocket protocols are also supported with reduced functionality.
+
+CUPS adds network printer browsing and PostScript Printer Description
+("PPD")-based printing options to support real world applications under
+UNIX.
diff --git a/cups-base/MESSAGE b/cups-base/MESSAGE
new file mode 100644
index 0000000000..41de5b26f3
--- /dev/null
+++ b/cups-base/MESSAGE
@@ -0,0 +1,13 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.2 2017/12/02 20:02:35 leot Exp $
+
+You will need to also install print/cups-filters if you wish to
+print to non-Postscript printers.
+
+You may install additional PPD files for other printer models into
+${PREFIX}/share/cups/model.
+
+You may want to backup /etc/printcap before starting CUPS for the first
+time, as the CUPS scheduler may overwrite this file with automatically
+generated content.
+===========================================================================
diff --git a/cups-base/MESSAGE.libusb b/cups-base/MESSAGE.libusb
new file mode 100644
index 0000000000..22087a1716
--- /dev/null
+++ b/cups-base/MESSAGE.libusb
@@ -0,0 +1,14 @@
+===========================================================================
+$NetBSD: MESSAGE.libusb,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+With cups 1.4 from pkgsrc, USB printing can use libusb in addition to
+traditional USB printer devices.
+
+To see the DeviceURI of all attached printers run:
+
+${PREFIX}/libexec/cups/backend/usb
+
+libusb DeviceURIs start with "usb://".
+
+ulpt(4)/usblp DeviceURIs start with "usb:/dev/" (e.g., "usb:/dev/ulpt0".)
+===========================================================================
diff --git a/cups-base/MESSAGE.pam b/cups-base/MESSAGE.pam
new file mode 100644
index 0000000000..05ede72317
--- /dev/null
+++ b/cups-base/MESSAGE.pam
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE.pam,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+To authenticate for CUPS using PAM, add the contents of the file:
+
+        ${PREFIX}/share/examples/cups/cups.pam
+
+to your PAM configuration file.
+===========================================================================
diff --git a/cups-base/Makefile b/cups-base/Makefile
new file mode 100644
index 0000000000..5d723f0056
--- /dev/null
+++ b/cups-base/Makefile
@@ -0,0 +1,172 @@
+# $NetBSD: Makefile,v 1.25 2019/08/26 21:57:43 rillig Exp $
+
+.include "../../wip/cups/Makefile.common"
+
+DISTNAME=	cups-${CUPS_VERS}-source
+PKGNAME=	cups-base-${CUPS_VERS}
+CATEGORIES=	print
+MASTER_SITES=	${MASTER_SITE_GITHUB:=apple/}
+
+MAINTAINER=	sbd%NetBSD.org@localhost
+HOMEPAGE=	https://www.cups.org/
+COMMENT=	Common UNIX Printing System
+LICENSE=	gnu-gpl-v2 AND gnu-lgpl-v2
+
+GITHUB_PROJECT=	cups
+GITHUB_RELEASE=	v${PKGVERSION_NOREV}
+
+CONFLICTS+=	LPRng-[0-9]* LPRng-core-[0-9]*
+
+WRKSRC=			${WRKDIR}/${DISTNAME:S/-source//}
+UNLIMIT_RESOURCES=	datasize memorysize
+USE_LANGUAGES=		c c++	# pdftops is a C++ application
+USE_LIBTOOL=		yes
+USE_PKGLOCALEDIR=	yes
+USE_TOOLS+=		aclocal autoconf automake gmake pkg-config
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS+=	--localedir=${PREFIX}/${PKGLOCALEDIR}/locale
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFBASEDIR}
+CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
+CONFIGURE_ARGS+=	--with-cachedir=${CUPS_CACHE:Q}
+CONFIGURE_ARGS+=	--with-docdir=${PREFIX}/share/doc/cups
+CONFIGURE_ARGS+=	--with-serverbindir=${PREFIX}/libexec/cups
+CONFIGURE_ARGS+=	--with-cups-user=${CUPS_USER}
+CONFIGURE_ARGS+=	--with-cups-group=${CUPS_GROUP}
+CONFIGURE_ARGS+=	--with-system-groups=${CUPS_SYSTEM_GROUPS:Q}
+CONFIGURE_ARGS+=	--with-exe-file-perm=0755
+CONFIGURE_ARGS+=	--enable-libpaper
+CONFIGURE_ARGS+=	--enable-ssl
+CONFIGURE_ARGS+=	--with-manext=bsd
+CONFIGURE_ARGS+=	--without-bundledir
+CONFIGURE_ARGS+=	--without-icondir
+CONFIGURE_ARGS+=	--without-menudir
+CONFIGURE_ARGS+=	--without-perl
+CONFIGURE_ARGS+=	--without-php
+CONFIGURE_ARGS+=	--without-python
+CONFIGURE_ARGS+=	--without-java
+CONFIGURE_ARGS+=	--disable-gssapi
+
+CONFIGURE_ENV+=		DSOFLAGS=${LDFLAGS:M*:Q}
+
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
+# Explicitly disable epoll on illumos, it is provided for Linux compat only.
+CONFIGURE_ENV.SunOS+=	ac_cv_func_epoll_create=no
+
+LIBS+=			${BUILDLINK_LDADD.iconv}
+
+# Avoid the following error when compiling with clang.
+# /usr/local/bin/ld: /usr/lib/crt1.o: relocation R_X86_64_32 against `_DYNAMIC'
+# can not be used when making a shared object; recompile with -fPIC
+BUILDLINK_TRANSFORM.FreeBSD+=	rm:-Wl,-pie
+
+# CUPS_USER		user to run filter and CGI programs as
+# CUPS_GROUP		group to run filter and CGI programs as
+# CUPS_SYSTEM_GROUPS	group for system administration
+#
+CUPS_USER?=		lp
+CUPS_GROUP?=		lp
+CUPS_SYSTEM_GROUPS?=	${REAL_ROOT_GROUP}
+FILES_SUBST+=		CUPS_USER=${CUPS_USER}
+FILES_SUBST+=		CUPS_GROUP=${CUPS_GROUP}
+FILES_SUBST+=		CUPS_SYSTEM_GROUPS=${CUPS_SYSTEM_GROUPS:Q}
+
+PKG_GROUPS_VARS+=	CUPS_GROUP CUPS_SYSTEM_GROUPS
+PKG_USERS_VARS=		CUPS_USER
+
+BUILD_DEFS+=		CUPS_USER CUPS_GROUP CUPS_SYSTEM_GROUPS VARBASE
+
+DOCDIR=			${PREFIX}/share/doc/cups
+EGDIR=			${PREFIX}/share/examples/cups
+MIMEDIR=		${PREFIX}/share/cups/mime
+PKG_SYSCONFSUBDIR=	cups
+CUPS_CONFDIR=		${PKG_SYSCONFDIR}
+CUPS_LOGDIR=		${VARBASE}/log/cups
+CUPS_REQUESTS=		${VARBASE}/spool/cups
+CUPS_CACHE=		${VARBASE}/cache/cups
+CUPS_STATEDIR=		${VARBASE}/run/cups
+
+PKG_GROUPS=		${CUPS_GROUP}
+PKG_USERS=		${CUPS_USER}:${CUPS_GROUP}
+PKG_GECOS.${CUPS_USER}=	Common UNIX Printing System user
+PKG_SHELL.${CUPS_USER}=	${SH}
+
+CONF_FILES+=		${EGDIR}/cupsd.conf ${CUPS_CONFDIR}/cupsd.conf
+CONF_FILES+=		${EGDIR}/cups-files.conf ${CUPS_CONFDIR}/cups-files.conf
+CONF_FILES+=		${EGDIR}/snmp.conf ${CUPS_CONFDIR}/snmp.conf
+RCD_SCRIPTS=		cupsd
+
+OWN_DIRS=		${CUPS_CONFDIR}
+OWN_DIRS+=		${CUPS_CONFDIR}/interfaces
+OWN_DIRS+=		${CUPS_CONFDIR}/ppd
+OWN_DIRS+=		${PREFIX}/libexec/cups/driver
+OWN_DIRS+=		${CUPS_LOGDIR}
+OWN_DIRS+=		${CUPS_STATEDIR}
+OWN_DIRS_PERMS=		${CUPS_STATEDIR}/certs ${CUPS_USER} ${CUPS_GROUP} 0711
+OWN_DIRS_PERMS+=	${CUPS_CONFDIR}/ssl ${REAL_ROOT_USER} ${CUPS_GROUP} 0700
+OWN_DIRS_PERMS+=	${CUPS_REQUESTS} ${REAL_ROOT_USER} ${CUPS_GROUP} 0710
+OWN_DIRS_PERMS+=	${CUPS_REQUESTS}/tmp ${REAL_ROOT_USER} ${CUPS_GROUP} 1770
+OWN_DIRS_PERMS+=	${CUPS_CACHE} ${REAL_ROOT_USER} ${CUPS_GROUP} 0775
+OWN_DIRS_PERMS+=	${CUPS_CACHE}/rss ${REAL_ROOT_USER} ${CUPS_GROUP} 0775
+
+SUBST_CLASSES+=		paths
+SUBST_FILES.paths=	${WRKDIR}/cups.pam
+SUBST_VARS.paths=	LOCALBASE
+SUBST_STAGE.paths=	pre-configure
+
+SUBST_CLASSES+=		rpathfix
+SUBST_FILES.rpathfix=	cups-config.in
+SUBST_MESSAGE.rpathfix=	Adding rpath to cups-config.
+SUBST_SED.rpathfix=	-e 's|@EXPORT_LDFLAGS@|${COMPILER_RPATH_FLAG}${PREFIX}/lib|g'
+SUBST_STAGE.rpathfix=	pre-configure
+
+.if !empty(OPSYS:MNetBSD) && !empty(MACHINE_ARCH:Mpowerpc)
+SUBST_CLASSES+=		piefix
+SUBST_FILES.piefix=	Makedefs.in
+SUBST_MESSAGE.piefix=	Removing PIE flags
+SUBST_SED.piefix=	-e 's|@PIEFLAGS@||g'
+SUBST_STAGE.piefix=	pre-configure
+.endif
+
+INSTALLATION_DIRS=	${DOCDIR} ${EGDIR} ${MIMEDIR}
+INSTALL_ENV+=		DSTROOT=${DESTDIR}
+
+pre-configure:
+.if !empty(CUPS_SYSTEM_GROUPS:M${CUPS_GROUP})
+	${ERROR_MSG} "CUPS_SYSTEM_GROUPS may not contain the CUPS_GROUP"
+	exit 1
+.endif
+	cd ${WRKSRC} && aclocal && autoconf
+
+post-extract:
+	${CP} ${FILESDIR}/cups.pam ${WRKDIR}/cups.pam
+
+post-install:
+	set -e; for file in LICENSE.txt README.md; do			\
+		${INSTALL_DATA} ${WRKSRC}/$${file}			\
+		     ${DESTDIR}${DOCDIR}/$${file}; \
+	done
+	${RUN} for file in cupsd.conf cups-files.conf snmp.conf ; do	\
+		${INSTALL_DATA} ${WRKSRC}/conf/$${file}			\
+			${DESTDIR}${EGDIR}/$${file};			\
+	done
+	${CHMOD} g-w ${DESTDIR}${PREFIX}/libexec/cups/cgi-bin
+.if !empty(PKG_OPTIONS:Mpam)
+	${INSTALL_DATA} ${WRKDIR}/cups.pam ${DESTDIR}${EGDIR}
+.endif
+.if !empty(PKG_OPTIONS:Mdnssd)
+	${LN} -sf ${DESTDIR}${PREFIX}/libexec/cups/backend/dnssd ${DESTDIR}${PREFIX}/libexec/cups/backend/mdns
+.endif
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../graphics/tiff/buildlink3.mk"
+.include "../../print/libpaper/buildlink3.mk"
+.include "../../security/gnutls/buildlink3.mk"
+.include "../../textproc/libunistring/buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/cups-base/PLIST b/cups-base/PLIST
new file mode 100644
index 0000000000..227125afe5
--- /dev/null
+++ b/cups-base/PLIST
@@ -0,0 +1,795 @@
+@comment $NetBSD: PLIST,v 1.3 2018/11/10 19:51:12 leot Exp $
+bin/cancel
+bin/cups-config
+bin/cupstestdsc
+bin/cupstestppd
+${PLIST.ippfind}bin/ippfind
+bin/ipptool
+bin/lp
+bin/lpoptions
+bin/lpq
+bin/lpr
+bin/lprm
+bin/lpstat
+bin/ppdc
+bin/ppdhtml
+bin/ppdi
+bin/ppdmerge
+bin/ppdpo
+include/cups/adminutil.h
+include/cups/array.h
+include/cups/backend.h
+include/cups/cups.h
+include/cups/dir.h
+include/cups/file.h
+include/cups/http.h
+include/cups/ipp.h
+include/cups/language.h
+include/cups/ppd.h
+include/cups/pwg.h
+include/cups/raster.h
+include/cups/sidechannel.h
+include/cups/transcode.h
+include/cups/versioning.h
+lib/libcups.la
+lib/libcupsimage.la
+${PLIST.apple}libexec/cups/apple/http
+${PLIST.apple}libexec/cups/apple/https
+${PLIST.apple}libexec/cups/apple/ipp
+${PLIST.apple}libexec/cups/apple/ipps
+${PLIST.dnssd-backend}libexec/cups/backend/dnssd
+libexec/cups/backend/http
+libexec/cups/backend/https
+libexec/cups/backend/ipp
+libexec/cups/backend/ipps
+libexec/cups/backend/lpd
+${PLIST.dnssd}libexec/cups/backend/mdns
+libexec/cups/backend/snmp
+libexec/cups/backend/socket
+libexec/cups/backend/usb
+libexec/cups/cgi-bin/admin.cgi
+libexec/cups/cgi-bin/classes.cgi
+libexec/cups/cgi-bin/help.cgi
+libexec/cups/cgi-bin/jobs.cgi
+libexec/cups/cgi-bin/printers.cgi
+libexec/cups/daemon/cups-deviced
+libexec/cups/daemon/cups-driverd
+libexec/cups/daemon/cups-exec
+libexec/cups/daemon/cups-lpd
+libexec/cups/filter/commandtops
+libexec/cups/filter/gziptoany
+libexec/cups/filter/pstops
+libexec/cups/filter/rastertodymo
+libexec/cups/filter/rastertoepson
+libexec/cups/filter/rastertohp
+libexec/cups/filter/rastertolabel
+libexec/cups/filter/rastertopwg
+libexec/cups/monitor/bcp
+libexec/cups/monitor/tbcp
+${PLIST.dbus}libexec/cups/notifier/dbus
+libexec/cups/notifier/mailto
+libexec/cups/notifier/rss
+man/man1/cancel.1
+man/man1/cups-config.1
+man/man1/cups.1
+man/man1/cupstestdsc.1
+man/man1/cupstestppd.1
+${PLIST.ippfind}man/man1/ippfind.1
+man/man1/ipptool.1
+man/man1/lp.1
+man/man1/lpoptions.1
+man/man1/lpq.1
+man/man1/lpr.1
+man/man1/lprm.1
+man/man1/lpstat.1
+man/man1/ppdc.1
+man/man1/ppdhtml.1
+man/man1/ppdi.1
+man/man1/ppdmerge.1
+man/man1/ppdpo.1
+man/man5/classes.conf.5
+man/man5/client.conf.5
+man/man5/cups-files.conf.5
+man/man5/cups-snmp.conf.5
+man/man5/cupsd-logs.5
+man/man5/cupsd.conf.5
+man/man5/ipptoolfile.5
+man/man5/mailto.conf.5
+man/man5/mime.convs.5
+man/man5/mime.types.5
+man/man5/ppdcfile.5
+man/man5/printers.conf.5
+man/man5/subscriptions.conf.5
+man/man7/backend.7
+man/man7/filter.7
+man/man7/notifier.7
+man/man8/accept.8
+man/man8/cups-deviced.8
+man/man8/cups-driverd.8
+man/man8/cups-exec.8
+man/man8/cups-lpd.8
+man/man8/cups-snmp.8
+man/man8/cupsaccept.8
+man/man8/cupsaddsmb.8
+man/man8/cupsctl.8
+man/man8/cupsd-helper.8
+man/man8/cupsd.8
+man/man8/cupsdisable.8
+man/man8/cupsenable.8
+man/man8/cupsfilter.8
+man/man8/cupsreject.8
+man/man8/lpadmin.8
+man/man8/lpc.8
+man/man8/lpinfo.8
+man/man8/lpmove.8
+man/man8/reject.8
+sbin/accept
+sbin/cupsaccept
+sbin/cupsaddsmb
+sbin/cupsctl
+sbin/cupsd
+sbin/cupsdisable
+sbin/cupsenable
+sbin/cupsfilter
+sbin/cupsreject
+sbin/lpadmin
+sbin/lpc
+sbin/lpinfo
+sbin/lpmove
+sbin/reject
+share/cups/drv/sample.drv
+share/cups/examples/color.drv
+share/cups/examples/constraint.drv
+share/cups/examples/custom.drv
+share/cups/examples/grouping.drv
+share/cups/examples/laserjet-basic.drv
+share/cups/examples/laserjet-pjl.drv
+share/cups/examples/minimum.drv
+share/cups/examples/postscript.drv
+share/cups/examples/r300-basic.drv
+share/cups/examples/r300-colorman.drv
+share/cups/examples/r300-remote.drv
+share/cups/ipptool/color.jpg
+share/cups/ipptool/create-printer-subscription.test
+share/cups/ipptool/document-a4.pdf
+share/cups/ipptool/document-a4.ps
+share/cups/ipptool/document-letter.pdf
+share/cups/ipptool/document-letter.ps
+share/cups/ipptool/get-completed-jobs.test
+share/cups/ipptool/get-jobs.test
+share/cups/ipptool/get-notifications.test
+share/cups/ipptool/get-printer-attributes.test
+share/cups/ipptool/get-subscriptions.test
+share/cups/ipptool/gray.jpg
+share/cups/ipptool/ipp-1.1.test
+share/cups/ipptool/ipp-2.0.test
+share/cups/ipptool/ipp-2.1.test
+share/cups/ipptool/ipp-2.2.test
+share/cups/ipptool/ipp-everywhere.test
+share/cups/ipptool/onepage-a4.pdf
+share/cups/ipptool/onepage-a4.ps
+share/cups/ipptool/onepage-letter.pdf
+share/cups/ipptool/onepage-letter.ps
+share/cups/ipptool/print-job-deflate.test
+share/cups/ipptool/print-job-gzip.test
+share/cups/ipptool/print-job.test
+share/cups/ipptool/testfile.jpg
+share/cups/ipptool/testfile.pcl
+share/cups/ipptool/testfile.pdf
+share/cups/ipptool/testfile.ps
+share/cups/ipptool/testfile.txt
+share/cups/ipptool/validate-job.test
+share/cups/mime/mime.convs
+share/cups/mime/mime.types
+share/cups/ppdc/epson.h
+share/cups/ppdc/font.defs
+share/cups/ppdc/hp.h
+share/cups/ppdc/label.h
+share/cups/ppdc/media.defs
+share/cups/ppdc/raster.defs
+share/cups/templates/add-class.tmpl
+share/cups/templates/add-printer.tmpl
+share/cups/templates/add-rss-subscription.tmpl
+share/cups/templates/admin.tmpl
+share/cups/templates/choose-device.tmpl
+share/cups/templates/choose-make.tmpl
+share/cups/templates/choose-model.tmpl
+share/cups/templates/choose-serial.tmpl
+share/cups/templates/choose-uri.tmpl
+share/cups/templates/class-added.tmpl
+share/cups/templates/class-confirm.tmpl
+share/cups/templates/class-deleted.tmpl
+share/cups/templates/class-jobs-header.tmpl
+share/cups/templates/class-modified.tmpl
+share/cups/templates/class.tmpl
+share/cups/templates/classes-header.tmpl
+share/cups/templates/classes.tmpl
+share/cups/templates/command.tmpl
+share/cups/templates/de/add-class.tmpl
+share/cups/templates/de/add-printer.tmpl
+share/cups/templates/de/add-rss-subscription.tmpl
+share/cups/templates/de/admin.tmpl
+share/cups/templates/de/choose-device.tmpl
+share/cups/templates/de/choose-make.tmpl
+share/cups/templates/de/choose-model.tmpl
+share/cups/templates/de/choose-serial.tmpl
+share/cups/templates/de/choose-uri.tmpl
+share/cups/templates/de/class-added.tmpl
+share/cups/templates/de/class-confirm.tmpl
+share/cups/templates/de/class-deleted.tmpl
+share/cups/templates/de/class-jobs-header.tmpl
+share/cups/templates/de/class-modified.tmpl
+share/cups/templates/de/class.tmpl
+share/cups/templates/de/classes-header.tmpl
+share/cups/templates/de/classes.tmpl
+share/cups/templates/de/command.tmpl
+share/cups/templates/de/edit-config.tmpl
+share/cups/templates/de/error-op.tmpl
+share/cups/templates/de/error.tmpl
+share/cups/templates/de/header.tmpl
+share/cups/templates/de/help-header.tmpl
+share/cups/templates/de/help-printable.tmpl
+share/cups/templates/de/help-trailer.tmpl
+share/cups/templates/de/job-cancel.tmpl
+share/cups/templates/de/job-hold.tmpl
+share/cups/templates/de/job-move.tmpl
+share/cups/templates/de/job-moved.tmpl
+share/cups/templates/de/job-release.tmpl
+share/cups/templates/de/job-restart.tmpl
+share/cups/templates/de/jobs-header.tmpl
+share/cups/templates/de/jobs.tmpl
+share/cups/templates/de/list-available-printers.tmpl
+share/cups/templates/de/modify-class.tmpl
+share/cups/templates/de/modify-printer.tmpl
+share/cups/templates/de/norestart.tmpl
+share/cups/templates/de/option-boolean.tmpl
+share/cups/templates/de/option-conflict.tmpl
+share/cups/templates/de/option-header.tmpl
+share/cups/templates/de/option-pickmany.tmpl
+share/cups/templates/de/option-pickone.tmpl
+share/cups/templates/de/option-trailer.tmpl
+share/cups/templates/de/pager.tmpl
+share/cups/templates/de/printer-accept.tmpl
+share/cups/templates/de/printer-added.tmpl
+share/cups/templates/de/printer-cancel-jobs.tmpl
+share/cups/templates/de/printer-configured.tmpl
+share/cups/templates/de/printer-confirm.tmpl
+share/cups/templates/de/printer-default.tmpl
+share/cups/templates/de/printer-deleted.tmpl
+share/cups/templates/de/printer-jobs-header.tmpl
+share/cups/templates/de/printer-modified.tmpl
+share/cups/templates/de/printer-reject.tmpl
+share/cups/templates/de/printer-start.tmpl
+share/cups/templates/de/printer-stop.tmpl
+share/cups/templates/de/printer.tmpl
+share/cups/templates/de/printers-header.tmpl
+share/cups/templates/de/printers.tmpl
+share/cups/templates/de/restart.tmpl
+share/cups/templates/de/samba-export.tmpl
+share/cups/templates/de/samba-exported.tmpl
+share/cups/templates/de/search.tmpl
+share/cups/templates/de/set-printer-options-header.tmpl
+share/cups/templates/de/set-printer-options-trailer.tmpl
+share/cups/templates/de/subscription-added.tmpl
+share/cups/templates/de/subscription-canceled.tmpl
+share/cups/templates/de/test-page.tmpl
+share/cups/templates/de/trailer.tmpl
+share/cups/templates/de/users.tmpl
+share/cups/templates/edit-config.tmpl
+share/cups/templates/error-op.tmpl
+share/cups/templates/error.tmpl
+share/cups/templates/es/add-class.tmpl
+share/cups/templates/es/add-printer.tmpl
+share/cups/templates/es/add-rss-subscription.tmpl
+share/cups/templates/es/admin.tmpl
+share/cups/templates/es/choose-device.tmpl
+share/cups/templates/es/choose-make.tmpl
+share/cups/templates/es/choose-model.tmpl
+share/cups/templates/es/choose-serial.tmpl
+share/cups/templates/es/choose-uri.tmpl
+share/cups/templates/es/class-added.tmpl
+share/cups/templates/es/class-confirm.tmpl
+share/cups/templates/es/class-deleted.tmpl
+share/cups/templates/es/class-jobs-header.tmpl
+share/cups/templates/es/class-modified.tmpl
+share/cups/templates/es/class.tmpl
+share/cups/templates/es/classes-header.tmpl
+share/cups/templates/es/classes.tmpl
+share/cups/templates/es/command.tmpl
+share/cups/templates/es/edit-config.tmpl
+share/cups/templates/es/error-op.tmpl
+share/cups/templates/es/error.tmpl
+share/cups/templates/es/header.tmpl
+share/cups/templates/es/help-header.tmpl
+share/cups/templates/es/help-printable.tmpl
+share/cups/templates/es/help-trailer.tmpl
+share/cups/templates/es/job-cancel.tmpl
+share/cups/templates/es/job-hold.tmpl
+share/cups/templates/es/job-move.tmpl
+share/cups/templates/es/job-moved.tmpl
+share/cups/templates/es/job-release.tmpl
+share/cups/templates/es/job-restart.tmpl
+share/cups/templates/es/jobs-header.tmpl
+share/cups/templates/es/jobs.tmpl
+share/cups/templates/es/list-available-printers.tmpl
+share/cups/templates/es/modify-class.tmpl
+share/cups/templates/es/modify-printer.tmpl
+share/cups/templates/es/norestart.tmpl
+share/cups/templates/es/option-boolean.tmpl
+share/cups/templates/es/option-conflict.tmpl
+share/cups/templates/es/option-header.tmpl
+share/cups/templates/es/option-pickmany.tmpl
+share/cups/templates/es/option-pickone.tmpl
+share/cups/templates/es/option-trailer.tmpl
+share/cups/templates/es/pager.tmpl
+share/cups/templates/es/printer-accept.tmpl
+share/cups/templates/es/printer-added.tmpl
+share/cups/templates/es/printer-cancel-jobs.tmpl
+share/cups/templates/es/printer-configured.tmpl
+share/cups/templates/es/printer-confirm.tmpl
+share/cups/templates/es/printer-default.tmpl
+share/cups/templates/es/printer-deleted.tmpl
+share/cups/templates/es/printer-jobs-header.tmpl
+share/cups/templates/es/printer-modified.tmpl
+share/cups/templates/es/printer-reject.tmpl
+share/cups/templates/es/printer-start.tmpl
+share/cups/templates/es/printer-stop.tmpl
+share/cups/templates/es/printer.tmpl
+share/cups/templates/es/printers-header.tmpl
+share/cups/templates/es/printers.tmpl
+share/cups/templates/es/restart.tmpl
+share/cups/templates/es/samba-export.tmpl
+share/cups/templates/es/samba-exported.tmpl
+share/cups/templates/es/search.tmpl
+share/cups/templates/es/set-printer-options-header.tmpl
+share/cups/templates/es/set-printer-options-trailer.tmpl
+share/cups/templates/es/subscription-added.tmpl
+share/cups/templates/es/subscription-canceled.tmpl
+share/cups/templates/es/test-page.tmpl
+share/cups/templates/es/trailer.tmpl
+share/cups/templates/es/users.tmpl
+share/cups/templates/fr/add-class.tmpl
+share/cups/templates/fr/add-printer.tmpl
+share/cups/templates/fr/add-rss-subscription.tmpl
+share/cups/templates/fr/admin.tmpl
+share/cups/templates/fr/choose-device.tmpl
+share/cups/templates/fr/choose-make.tmpl
+share/cups/templates/fr/choose-model.tmpl
+share/cups/templates/fr/choose-serial.tmpl
+share/cups/templates/fr/choose-uri.tmpl
+share/cups/templates/fr/class-added.tmpl
+share/cups/templates/fr/class-confirm.tmpl
+share/cups/templates/fr/class-deleted.tmpl
+share/cups/templates/fr/class-jobs-header.tmpl
+share/cups/templates/fr/class-modified.tmpl
+share/cups/templates/fr/class.tmpl
+share/cups/templates/fr/classes-header.tmpl
+share/cups/templates/fr/classes.tmpl
+share/cups/templates/fr/command.tmpl
+share/cups/templates/fr/edit-config.tmpl
+share/cups/templates/fr/error-op.tmpl
+share/cups/templates/fr/error.tmpl
+share/cups/templates/fr/header.tmpl
+share/cups/templates/fr/help-header.tmpl
+share/cups/templates/fr/help-printable.tmpl
+share/cups/templates/fr/help-trailer.tmpl
+share/cups/templates/fr/job-cancel.tmpl
+share/cups/templates/fr/job-hold.tmpl
+share/cups/templates/fr/job-move.tmpl
+share/cups/templates/fr/job-moved.tmpl
+share/cups/templates/fr/job-release.tmpl
+share/cups/templates/fr/job-restart.tmpl
+share/cups/templates/fr/jobs-header.tmpl
+share/cups/templates/fr/jobs.tmpl
+share/cups/templates/fr/list-available-printers.tmpl
+share/cups/templates/fr/modify-class.tmpl
+share/cups/templates/fr/modify-printer.tmpl
+share/cups/templates/fr/norestart.tmpl
+share/cups/templates/fr/option-boolean.tmpl
+share/cups/templates/fr/option-conflict.tmpl
+share/cups/templates/fr/option-header.tmpl
+share/cups/templates/fr/option-pickmany.tmpl
+share/cups/templates/fr/option-pickone.tmpl
+share/cups/templates/fr/option-trailer.tmpl
+share/cups/templates/fr/pager.tmpl
+share/cups/templates/fr/printer-accept.tmpl
+share/cups/templates/fr/printer-added.tmpl
+share/cups/templates/fr/printer-cancel-jobs.tmpl
+share/cups/templates/fr/printer-configured.tmpl
+share/cups/templates/fr/printer-confirm.tmpl
+share/cups/templates/fr/printer-default.tmpl
+share/cups/templates/fr/printer-deleted.tmpl
+share/cups/templates/fr/printer-jobs-header.tmpl
+share/cups/templates/fr/printer-modified.tmpl
+share/cups/templates/fr/printer-reject.tmpl
+share/cups/templates/fr/printer-start.tmpl
+share/cups/templates/fr/printer-stop.tmpl
+share/cups/templates/fr/printer.tmpl
+share/cups/templates/fr/printers-header.tmpl
+share/cups/templates/fr/printers.tmpl
+share/cups/templates/fr/restart.tmpl
+share/cups/templates/fr/samba-export.tmpl
+share/cups/templates/fr/samba-exported.tmpl
+share/cups/templates/fr/search.tmpl
+share/cups/templates/fr/set-printer-options-header.tmpl
+share/cups/templates/fr/set-printer-options-trailer.tmpl
+share/cups/templates/fr/subscription-added.tmpl
+share/cups/templates/fr/subscription-canceled.tmpl
+share/cups/templates/fr/test-page.tmpl
+share/cups/templates/fr/trailer.tmpl
+share/cups/templates/fr/users.tmpl
+share/cups/templates/header.tmpl
+share/cups/templates/help-header.tmpl
+share/cups/templates/help-printable.tmpl
+share/cups/templates/help-trailer.tmpl
+share/cups/templates/ja/add-class.tmpl
+share/cups/templates/ja/add-printer.tmpl
+share/cups/templates/ja/add-rss-subscription.tmpl
+share/cups/templates/ja/admin.tmpl
+share/cups/templates/ja/choose-device.tmpl
+share/cups/templates/ja/choose-make.tmpl
+share/cups/templates/ja/choose-model.tmpl
+share/cups/templates/ja/choose-serial.tmpl
+share/cups/templates/ja/choose-uri.tmpl
+share/cups/templates/ja/class-added.tmpl
+share/cups/templates/ja/class-confirm.tmpl
+share/cups/templates/ja/class-deleted.tmpl
+share/cups/templates/ja/class-jobs-header.tmpl
+share/cups/templates/ja/class-modified.tmpl
+share/cups/templates/ja/class.tmpl
+share/cups/templates/ja/classes-header.tmpl
+share/cups/templates/ja/classes.tmpl
+share/cups/templates/ja/command.tmpl
+share/cups/templates/ja/edit-config.tmpl
+share/cups/templates/ja/error-op.tmpl
+share/cups/templates/ja/error.tmpl
+share/cups/templates/ja/header.tmpl
+share/cups/templates/ja/help-header.tmpl
+share/cups/templates/ja/help-printable.tmpl
+share/cups/templates/ja/help-trailer.tmpl
+share/cups/templates/ja/job-cancel.tmpl
+share/cups/templates/ja/job-hold.tmpl
+share/cups/templates/ja/job-move.tmpl
+share/cups/templates/ja/job-moved.tmpl
+share/cups/templates/ja/job-release.tmpl
+share/cups/templates/ja/job-restart.tmpl
+share/cups/templates/ja/jobs-header.tmpl
+share/cups/templates/ja/jobs.tmpl
+share/cups/templates/ja/list-available-printers.tmpl
+share/cups/templates/ja/modify-class.tmpl
+share/cups/templates/ja/modify-printer.tmpl
+share/cups/templates/ja/norestart.tmpl
+share/cups/templates/ja/option-boolean.tmpl
+share/cups/templates/ja/option-conflict.tmpl
+share/cups/templates/ja/option-header.tmpl
+share/cups/templates/ja/option-pickmany.tmpl
+share/cups/templates/ja/option-pickone.tmpl
+share/cups/templates/ja/option-trailer.tmpl
+share/cups/templates/ja/pager.tmpl
+share/cups/templates/ja/printer-accept.tmpl
+share/cups/templates/ja/printer-added.tmpl
+share/cups/templates/ja/printer-cancel-jobs.tmpl
+share/cups/templates/ja/printer-configured.tmpl
+share/cups/templates/ja/printer-confirm.tmpl
+share/cups/templates/ja/printer-default.tmpl
+share/cups/templates/ja/printer-deleted.tmpl
+share/cups/templates/ja/printer-jobs-header.tmpl
+share/cups/templates/ja/printer-modified.tmpl
+share/cups/templates/ja/printer-reject.tmpl
+share/cups/templates/ja/printer-start.tmpl
+share/cups/templates/ja/printer-stop.tmpl
+share/cups/templates/ja/printer.tmpl
+share/cups/templates/ja/printers-header.tmpl
+share/cups/templates/ja/printers.tmpl
+share/cups/templates/ja/restart.tmpl
+share/cups/templates/ja/samba-export.tmpl
+share/cups/templates/ja/samba-exported.tmpl
+share/cups/templates/ja/search.tmpl
+share/cups/templates/ja/set-printer-options-header.tmpl
+share/cups/templates/ja/set-printer-options-trailer.tmpl
+share/cups/templates/ja/subscription-added.tmpl
+share/cups/templates/ja/subscription-canceled.tmpl
+share/cups/templates/ja/test-page.tmpl
+share/cups/templates/ja/trailer.tmpl
+share/cups/templates/ja/users.tmpl
+share/cups/templates/job-cancel.tmpl
+share/cups/templates/job-hold.tmpl
+share/cups/templates/job-move.tmpl
+share/cups/templates/job-moved.tmpl
+share/cups/templates/job-release.tmpl
+share/cups/templates/job-restart.tmpl
+share/cups/templates/jobs-header.tmpl
+share/cups/templates/jobs.tmpl
+share/cups/templates/list-available-printers.tmpl
+share/cups/templates/modify-class.tmpl
+share/cups/templates/modify-printer.tmpl
+share/cups/templates/norestart.tmpl
+share/cups/templates/option-boolean.tmpl
+share/cups/templates/option-conflict.tmpl
+share/cups/templates/option-header.tmpl
+share/cups/templates/option-pickmany.tmpl
+share/cups/templates/option-pickone.tmpl
+share/cups/templates/option-trailer.tmpl
+share/cups/templates/pager.tmpl
+share/cups/templates/printer-accept.tmpl
+share/cups/templates/printer-added.tmpl
+share/cups/templates/printer-cancel-jobs.tmpl
+share/cups/templates/printer-configured.tmpl
+share/cups/templates/printer-confirm.tmpl
+share/cups/templates/printer-default.tmpl
+share/cups/templates/printer-deleted.tmpl
+share/cups/templates/printer-jobs-header.tmpl
+share/cups/templates/printer-modified.tmpl
+share/cups/templates/printer-reject.tmpl
+share/cups/templates/printer-start.tmpl
+share/cups/templates/printer-stop.tmpl
+share/cups/templates/printer.tmpl
+share/cups/templates/printers-header.tmpl
+share/cups/templates/printers.tmpl
+share/cups/templates/pt_BR/add-class.tmpl
+share/cups/templates/pt_BR/add-printer.tmpl
+share/cups/templates/pt_BR/add-rss-subscription.tmpl
+share/cups/templates/pt_BR/admin.tmpl
+share/cups/templates/pt_BR/choose-device.tmpl
+share/cups/templates/pt_BR/choose-make.tmpl
+share/cups/templates/pt_BR/choose-model.tmpl
+share/cups/templates/pt_BR/choose-serial.tmpl
+share/cups/templates/pt_BR/choose-uri.tmpl
+share/cups/templates/pt_BR/class-added.tmpl
+share/cups/templates/pt_BR/class-confirm.tmpl
+share/cups/templates/pt_BR/class-deleted.tmpl
+share/cups/templates/pt_BR/class-jobs-header.tmpl
+share/cups/templates/pt_BR/class-modified.tmpl
+share/cups/templates/pt_BR/class.tmpl
+share/cups/templates/pt_BR/classes-header.tmpl
+share/cups/templates/pt_BR/classes.tmpl
+share/cups/templates/pt_BR/command.tmpl
+share/cups/templates/pt_BR/edit-config.tmpl
+share/cups/templates/pt_BR/error-op.tmpl
+share/cups/templates/pt_BR/error.tmpl
+share/cups/templates/pt_BR/header.tmpl
+share/cups/templates/pt_BR/help-header.tmpl
+share/cups/templates/pt_BR/help-printable.tmpl
+share/cups/templates/pt_BR/help-trailer.tmpl
+share/cups/templates/pt_BR/job-cancel.tmpl
+share/cups/templates/pt_BR/job-hold.tmpl
+share/cups/templates/pt_BR/job-move.tmpl
+share/cups/templates/pt_BR/job-moved.tmpl
+share/cups/templates/pt_BR/job-release.tmpl
+share/cups/templates/pt_BR/job-restart.tmpl
+share/cups/templates/pt_BR/jobs-header.tmpl
+share/cups/templates/pt_BR/jobs.tmpl
+share/cups/templates/pt_BR/list-available-printers.tmpl
+share/cups/templates/pt_BR/modify-class.tmpl
+share/cups/templates/pt_BR/modify-printer.tmpl
+share/cups/templates/pt_BR/norestart.tmpl
+share/cups/templates/pt_BR/option-boolean.tmpl
+share/cups/templates/pt_BR/option-conflict.tmpl
+share/cups/templates/pt_BR/option-header.tmpl
+share/cups/templates/pt_BR/option-pickmany.tmpl
+share/cups/templates/pt_BR/option-pickone.tmpl
+share/cups/templates/pt_BR/option-trailer.tmpl
+share/cups/templates/pt_BR/pager.tmpl
+share/cups/templates/pt_BR/printer-accept.tmpl
+share/cups/templates/pt_BR/printer-added.tmpl
+share/cups/templates/pt_BR/printer-cancel-jobs.tmpl
+share/cups/templates/pt_BR/printer-configured.tmpl
+share/cups/templates/pt_BR/printer-confirm.tmpl
+share/cups/templates/pt_BR/printer-default.tmpl
+share/cups/templates/pt_BR/printer-deleted.tmpl
+share/cups/templates/pt_BR/printer-jobs-header.tmpl
+share/cups/templates/pt_BR/printer-modified.tmpl
+share/cups/templates/pt_BR/printer-reject.tmpl
+share/cups/templates/pt_BR/printer-start.tmpl
+share/cups/templates/pt_BR/printer-stop.tmpl
+share/cups/templates/pt_BR/printer.tmpl
+share/cups/templates/pt_BR/printers-header.tmpl
+share/cups/templates/pt_BR/printers.tmpl
+share/cups/templates/pt_BR/restart.tmpl
+share/cups/templates/pt_BR/samba-export.tmpl
+share/cups/templates/pt_BR/samba-exported.tmpl
+share/cups/templates/pt_BR/search.tmpl
+share/cups/templates/pt_BR/set-printer-options-header.tmpl
+share/cups/templates/pt_BR/set-printer-options-trailer.tmpl
+share/cups/templates/pt_BR/subscription-added.tmpl
+share/cups/templates/pt_BR/subscription-canceled.tmpl
+share/cups/templates/pt_BR/test-page.tmpl
+share/cups/templates/pt_BR/trailer.tmpl
+share/cups/templates/pt_BR/users.tmpl
+share/cups/templates/restart.tmpl
+share/cups/templates/ru/add-class.tmpl
+share/cups/templates/ru/add-printer.tmpl
+share/cups/templates/ru/add-rss-subscription.tmpl
+share/cups/templates/ru/admin.tmpl
+share/cups/templates/ru/choose-device.tmpl
+share/cups/templates/ru/choose-make.tmpl
+share/cups/templates/ru/choose-model.tmpl
+share/cups/templates/ru/choose-serial.tmpl
+share/cups/templates/ru/choose-uri.tmpl
+share/cups/templates/ru/class-added.tmpl
+share/cups/templates/ru/class-confirm.tmpl
+share/cups/templates/ru/class-deleted.tmpl
+share/cups/templates/ru/class-jobs-header.tmpl
+share/cups/templates/ru/class-modified.tmpl
+share/cups/templates/ru/class.tmpl
+share/cups/templates/ru/classes-header.tmpl
+share/cups/templates/ru/classes.tmpl
+share/cups/templates/ru/command.tmpl
+share/cups/templates/ru/edit-config.tmpl
+share/cups/templates/ru/error-op.tmpl
+share/cups/templates/ru/error.tmpl
+share/cups/templates/ru/header.tmpl
+share/cups/templates/ru/help-header.tmpl
+share/cups/templates/ru/help-printable.tmpl
+share/cups/templates/ru/help-trailer.tmpl
+share/cups/templates/ru/job-cancel.tmpl
+share/cups/templates/ru/job-hold.tmpl
+share/cups/templates/ru/job-move.tmpl
+share/cups/templates/ru/job-moved.tmpl
+share/cups/templates/ru/job-release.tmpl
+share/cups/templates/ru/job-restart.tmpl
+share/cups/templates/ru/jobs-header.tmpl
+share/cups/templates/ru/jobs.tmpl
+share/cups/templates/ru/list-available-printers.tmpl
+share/cups/templates/ru/modify-class.tmpl
+share/cups/templates/ru/modify-printer.tmpl
+share/cups/templates/ru/norestart.tmpl
+share/cups/templates/ru/option-boolean.tmpl
+share/cups/templates/ru/option-conflict.tmpl
+share/cups/templates/ru/option-header.tmpl
+share/cups/templates/ru/option-pickmany.tmpl
+share/cups/templates/ru/option-pickone.tmpl
+share/cups/templates/ru/option-trailer.tmpl
+share/cups/templates/ru/pager.tmpl
+share/cups/templates/ru/printer-accept.tmpl
+share/cups/templates/ru/printer-added.tmpl
+share/cups/templates/ru/printer-cancel-jobs.tmpl
+share/cups/templates/ru/printer-configured.tmpl
+share/cups/templates/ru/printer-confirm.tmpl
+share/cups/templates/ru/printer-default.tmpl
+share/cups/templates/ru/printer-deleted.tmpl
+share/cups/templates/ru/printer-jobs-header.tmpl
+share/cups/templates/ru/printer-modified.tmpl
+share/cups/templates/ru/printer-reject.tmpl
+share/cups/templates/ru/printer-start.tmpl
+share/cups/templates/ru/printer-stop.tmpl
+share/cups/templates/ru/printer.tmpl
+share/cups/templates/ru/printers-header.tmpl
+share/cups/templates/ru/printers.tmpl
+share/cups/templates/ru/restart.tmpl
+share/cups/templates/ru/samba-export.tmpl
+share/cups/templates/ru/samba-exported.tmpl
+share/cups/templates/ru/search.tmpl
+share/cups/templates/ru/set-printer-options-header.tmpl
+share/cups/templates/ru/set-printer-options-trailer.tmpl
+share/cups/templates/ru/subscription-added.tmpl
+share/cups/templates/ru/subscription-canceled.tmpl
+share/cups/templates/ru/test-page.tmpl
+share/cups/templates/ru/trailer.tmpl
+share/cups/templates/ru/users.tmpl
+share/cups/templates/samba-export.tmpl
+share/cups/templates/samba-exported.tmpl
+share/cups/templates/search.tmpl
+share/cups/templates/set-printer-options-header.tmpl
+share/cups/templates/set-printer-options-trailer.tmpl
+share/cups/templates/subscription-added.tmpl
+share/cups/templates/subscription-canceled.tmpl
+share/cups/templates/test-page.tmpl
+share/cups/templates/trailer.tmpl
+share/cups/templates/users.tmpl
+${PLIST.libusb}share/cups/usb/org.cups.usb-quirks
+share/doc/cups/LICENSE.txt
+share/doc/cups/README.md
+share/doc/cups/apple-touch-icon.png
+share/doc/cups/cups-printable.css
+share/doc/cups/cups.css
+share/doc/cups/de/index.html
+share/doc/cups/es/index.html
+share/doc/cups/help/accounting.html
+share/doc/cups/help/api-admin.html
+share/doc/cups/help/api-filter.html
+share/doc/cups/help/api-ppd.html
+share/doc/cups/help/api-raster.html
+share/doc/cups/help/cgi.html
+share/doc/cups/help/cupspm.html
+share/doc/cups/help/encryption.html
+share/doc/cups/help/glossary.html
+share/doc/cups/help/kerberos.html
+share/doc/cups/help/license.html
+share/doc/cups/help/man-backend.html
+share/doc/cups/help/man-cancel.html
+share/doc/cups/help/man-classes.conf.html
+share/doc/cups/help/man-client.conf.html
+share/doc/cups/help/man-cups-config.html
+share/doc/cups/help/man-cups-files.conf.html
+share/doc/cups/help/man-cups-lpd.html
+share/doc/cups/help/man-cups-snmp.html
+share/doc/cups/help/man-cups.html
+share/doc/cups/help/man-cupsaccept.html
+share/doc/cups/help/man-cupsaddsmb.html
+share/doc/cups/help/man-cupsd-helper.html
+share/doc/cups/help/man-cupsd-logs.html
+share/doc/cups/help/man-cupsd.conf.html
+share/doc/cups/help/man-cupsd.html
+share/doc/cups/help/man-cupsenable.html
+share/doc/cups/help/man-cupstestdsc.html
+share/doc/cups/help/man-cupstestppd.html
+share/doc/cups/help/man-filter.html
+share/doc/cups/help/man-ipptool.html
+share/doc/cups/help/man-ipptoolfile.html
+share/doc/cups/help/man-lp.html
+share/doc/cups/help/man-lpadmin.html
+share/doc/cups/help/man-lpc.html
+share/doc/cups/help/man-lpinfo.html
+share/doc/cups/help/man-lpmove.html
+share/doc/cups/help/man-lpoptions.html
+share/doc/cups/help/man-lpq.html
+share/doc/cups/help/man-lpr.html
+share/doc/cups/help/man-lprm.html
+share/doc/cups/help/man-lpstat.html
+share/doc/cups/help/man-mime.convs.html
+share/doc/cups/help/man-mime.types.html
+share/doc/cups/help/man-notifier.html
+share/doc/cups/help/man-ppdc.html
+share/doc/cups/help/man-ppdhtml.html
+share/doc/cups/help/man-ppdi.html
+share/doc/cups/help/man-ppdmerge.html
+share/doc/cups/help/man-ppdpo.html
+share/doc/cups/help/man-printers.conf.html
+share/doc/cups/help/man-subscriptions.conf.html
+share/doc/cups/help/network.html
+share/doc/cups/help/options.html
+share/doc/cups/help/overview.html
+share/doc/cups/help/policies.html
+share/doc/cups/help/postscript-driver.html
+share/doc/cups/help/ppd-compiler.html
+share/doc/cups/help/raster-driver.html
+share/doc/cups/help/ref-ppdcfile.html
+share/doc/cups/help/security.html
+share/doc/cups/help/sharing.html
+share/doc/cups/help/spec-banner.html
+share/doc/cups/help/spec-command.html
+share/doc/cups/help/spec-design.html
+share/doc/cups/help/spec-ipp.html
+share/doc/cups/help/spec-pdf.html
+share/doc/cups/help/spec-postscript.html
+share/doc/cups/help/spec-ppd.html
+share/doc/cups/help/spec-raster.html
+share/doc/cups/help/spec-stp.html
+share/doc/cups/help/translation.html
+share/doc/cups/images/color-wheel.png
+share/doc/cups/images/cups-block-diagram.png
+share/doc/cups/images/cups-command-chain.png
+share/doc/cups/images/cups-icon.png
+share/doc/cups/images/cups-postscript-chain.png
+share/doc/cups/images/cups-raster-chain.png
+share/doc/cups/images/cups.png
+share/doc/cups/images/generic.png
+share/doc/cups/images/left.gif
+share/doc/cups/images/raster-organization.png
+share/doc/cups/images/raster.png
+share/doc/cups/images/right.gif
+share/doc/cups/images/sample-image.png
+share/doc/cups/images/sel.gif
+share/doc/cups/images/smiley.jpg
+share/doc/cups/images/unsel.gif
+share/doc/cups/images/wait.gif
+share/doc/cups/index.html
+share/doc/cups/ja/index.html
+share/doc/cups/pt_BR/index.html
+share/doc/cups/robots.txt
+share/doc/cups/ru/index.html
+share/examples/cups/cups-files.conf
+${PLIST.pam}share/examples/cups/cups.pam
+share/examples/cups/cupsd.conf
+share/examples/cups/snmp.conf
+share/locale/ca/cups_ca.po
+share/locale/cs/cups_cs.po
+share/locale/de/cups_de.po
+share/locale/es/cups_es.po
+share/locale/fr/cups_fr.po
+share/locale/it/cups_it.po
+share/locale/ja/cups_ja.po
+share/locale/pt_BR/cups_pt_BR.po
+share/locale/ru/cups_ru.po
+share/locale/zh_CN/cups_zh_CN.po
diff --git a/cups-base/buildlink3.mk b/cups-base/buildlink3.mk
new file mode 100644
index 0000000000..e97d1c2344
--- /dev/null
+++ b/cups-base/buildlink3.mk
@@ -0,0 +1,33 @@
+# $NetBSD: buildlink3.mk,v 1.11 2019/07/21 22:24:09 wiz Exp $
+
+BUILDLINK_TREE+=	cups-base
+
+.if !defined(CUPS_BASE_BUILDLINK3_MK)
+CUPS_BASE_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.cups-base+=	cups-base>=1.1.19nb3
+BUILDLINK_ABI_DEPENDS.cups-base+=	cups-base>=2.2.11nb3
+BUILDLINK_PKGSRCDIR.cups-base?=		../../wip/cups-base
+
+pkgbase := cups-base
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.cups-base:Mkerberos)
+.include "../../mk/krb5.buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.cups-base:Mdnssd)
+.include "../../net/mDNSResponder/buildlink3.mk"
+.endif
+
+.if ${OPSYS} != "Darwin" && !empty(PKG_BUILD_OPTIONS.cups-base:Mavahi)
+.include "../../net/avahi/buildlink3.mk"
+.endif
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../graphics/tiff/buildlink3.mk"
+.include "../../security/gnutls/buildlink3.mk"
+.endif # CUPS_BASE_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-cups-base
diff --git a/cups-base/distinfo b/cups-base/distinfo
new file mode 100644
index 0000000000..834e77cb0b
--- /dev/null
+++ b/cups-base/distinfo
@@ -0,0 +1,32 @@
+$NetBSD: distinfo,v 1.15 2019/08/16 21:19:30 leot Exp $
+
+SHA1 (cups-2.2.12-source.tar.gz) = a6a89bd1dd3b7122913651698a89d795e3bfea80
+RMD160 (cups-2.2.12-source.tar.gz) = e9bcc54ad693f77f482c1fcef63d5c2fa538a722
+SHA512 (cups-2.2.12-source.tar.gz) = b8e7be512938ad388d469d093ad0c882ab42ea1408c27a91340f8424aa0e79e588df3d59795624973b89074a2af650fa9b5b6ed5224138b17e4c6dbbcbf0a2e6
+Size (cups-2.2.12-source.tar.gz) = 10409313 bytes
+SHA1 (patch-ae) = f34ec899f4816bdcf96ff315e001e3ac5a960200
+SHA1 (patch-af) = 6ae6ae6006387db69bf7c15f7c8500708c9e8f56
+SHA1 (patch-ai) = 2c1ca67ea6f6c1dedb4c8ff97736f328a2b9a7c6
+SHA1 (patch-airprint-conf_mime.convs.in) = 413a5ef448ab42858db804cfbfc1b8ff5b6bbf77
+SHA1 (patch-airprint-scheduler_conf.c) = f54ba16cc32dc09cd5bd8e864e1510ed2a84d6ed
+SHA1 (patch-airprint-scheduler_dirsvc.c) = bef4ea8e898dffc67c4866baa701e12570eb6fca
+SHA1 (patch-airprint-scheduler_printers.c) = 7fc0157f990a6e4dfa04c0b2c5684422229af725
+SHA1 (patch-at) = ef6303936daf0826dc4725f5369bfb1add832b1f
+SHA1 (patch-conf-cups-files.conf.in) = b2eccf54e108d8c9e70094acfd9618a66779a84a
+SHA1 (patch-conf_Makefile) = bb8313e493c02959edfe1e53f50b9f16ce6f42e0
+SHA1 (patch-config-scripts_cups-compiler.m4) = 26f2ed2ef45d922f47e5e0ac87ccc278f35de7f3
+SHA1 (patch-config-scripts_cups-directories.m4) = 8a6c2f962dafdde20f913fac2e172ae9f8760c3e
+SHA1 (patch-config-scripts_cups-gssapi.m4) = ac2df3e82bc844630af8462a461c7efe1da4b354
+SHA1 (patch-config-scripts_cups-libtool.m4) = a6139fbbbee7038d11654c0a2387af21f48b7412
+SHA1 (patch-config-scripts_cups-manpages.m4) = 5cc943738df29f11fc366557938b82c1e9162344
+SHA1 (patch-config-scripts_cups-opsys.m4) = 2bbacc401d4d8dbc157889b6a6cf66684c52357b
+SHA1 (patch-cups-tls.c) = f89c25f8089d9e11a983a270adbb2cbde3c22511
+SHA1 (patch-cups_thread.c) = e625a2b81f3d831d2a0c02bc0fa9a9d31c1097a7
+SHA1 (patch-doc-help-man-cups-files.conf.html) = c26754104788eb619e69e49d6d51bf84ab047876
+SHA1 (patch-man-cups-files.conf.man.in) = 820da58aa3f854018a48b68256d0cf0dc75b986e
+SHA1 (patch-scheduler-conf.c) = 179964f8d251be3c21f4cfc7b67f3196beda29dc
+SHA1 (patch-scheduler-conf.h) = d11f3b789af096dcaca13a38f6484727ff895bee
+SHA1 (patch-scheduler-main.c) = cb31fa7427b497108ce7724bbfee1b784b9330ab
+SHA1 (patch-scheduler_auth.c) = 8c9a5338c9eb84336db0d487008795227fa9e7f0
+SHA1 (patch-scheduler_dirsvc.c) = aae5b924fb8fb39007cf04d8b83747e8724485cf
+SHA1 (patch-test_ippfind.c) = 70403f5e7d5bd56772616f64fc2dff1482994b79
diff --git a/cups-base/files/cups.pam b/cups-base/files/cups.pam
new file mode 100644
index 0000000000..400141302a
--- /dev/null
+++ b/cups-base/files/cups.pam
@@ -0,0 +1,6 @@
+# $NetBSD: cups.pam,v 1.1 2017/11/12 14:10:15 khorben Exp $
+#
+# PAM configuration for Common UNIX Printing System
+#
+auth	required	@LOCALBASE@/lib/security/pam_unix.so nullok
+account	required	@LOCALBASE@/lib/security/pam_unix.so
diff --git a/cups-base/files/cupsd.sh b/cups-base/files/cupsd.sh
new file mode 100644
index 0000000000..9813c14200
--- /dev/null
+++ b/cups-base/files/cupsd.sh
@@ -0,0 +1,74 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: cupsd.sh,v 1.1 2017/11/12 14:10:15 khorben Exp $
+#
+# Common UNIX Printing System daemon
+#
+# PROVIDE: cups
+# REQUIRE: DAEMON
+#
+# You will need to set some variables in /etc/rc.conf to start cupsd:
+#
+# cupsd=YES
+# cupsd_wait=YES	# set to "YES" to wait for cupsd to detect printers;
+#			#   this variable is optional and defaults to "NO".
+# cupsd_timeout=60	# set to the number of seconds we wait for cupsd
+#			#   to respond before we declare it not responding;
+#			#   this variable is optional and defaults to "60".
+
+if [ -f /etc/rc.subr ]; then
+	. /etc/rc.subr
+fi
+
+name="cupsd"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}"
+pidfile="@VARBASE@/run/cups/cupsd.pid"
+lpstat_command="@PREFIX@/bin/lpstat"
+command_args="& sleep 2"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+extra_commands="reload wait"
+wait_cmd="cupsd_waitcmd"
+start_postcmd="cupsd_poststart"
+
+cupsd_poststart()
+{
+	if checkyesno cupsd_wait; then
+		run_rc_command wait
+	fi
+}
+
+cupsd_waitcmd()
+{
+	if [ -x ${lpstat_command} ]; then
+		msg=
+		@ECHO@ -n "Waiting ${cupsd_timeout} seconds for ${name}: "
+		if ${lpstat_command} -r >/dev/null 2>&1; then
+			msg='responding'
+		else
+			master=$$
+			trap "msg='not responding'" ALRM
+			(sleep ${cupsd_timeout} && kill -ALRM $master) >/dev/null 2>&1 &
+			while [ -z "$msg" ]; do
+				if ${lpstat_command} -r >/dev/null 2>&1; then
+					msg='responding'
+					trap : ALRM
+				else
+					sleep 5
+					@ECHO@ -n '.'
+				fi
+			done
+		fi
+		@ECHO@ "$msg"
+	fi
+}
+
+if [ -f /etc/rc.subr ]; then
+	load_rc_config $name
+	: ${cupsd_wait:=NO}
+	: ${cupsd_timeout:=60}
+	run_rc_command "$1"
+else
+	@ECHO@ -n " ${name}"
+	${command} ${cupsd_flags} ${command_args}
+fi
diff --git a/cups-base/options.mk b/cups-base/options.mk
new file mode 100644
index 0000000000..adc28c98bc
--- /dev/null
+++ b/cups-base/options.mk
@@ -0,0 +1,102 @@
+# $NetBSD: options.mk,v 1.3 2018/06/25 10:01:51 leot Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.cups-base
+PKG_SUPPORTED_OPTIONS=	acl dnssd kerberos pam tcpwrappers
+PKG_SUGGESTED_OPTIONS=	dnssd kerberos
+
+PLIST_VARS+=		apple dbus dnssd dnssd-backend ippfind libusb pam
+
+.if defined(PKG_OPTIONS.cups)
+PKG_LEGACY_OPTIONS+=		${PKG_OPTIONS.cups}
+PKG_OPTIONS_DEPRECATED_WARNINGS+= \
+	"Deprecated variable PKG_OPTIONS.cups used, use ${PKG_OPTIONS_VAR} instead."
+.endif
+
+.if ${OPSYS} == "Darwin"
+PLIST.apple=		yes
+PLIST.ippfind=		yes
+.else
+# CUPS on Darwin does not support DBus and libusb
+PKG_SUPPORTED_OPTIONS+=	avahi dbus
+PKG_SUGGESTED_OPTIONS+=	dbus
+# Neither DragonFly nor SunOS can build libusb1
+.  if ${OPSYS} != "DragonFly" && ${OPSYS} != "SunOS"
+PKG_SUPPORTED_OPTIONS+=	libusb
+PKG_SUGGESTED_OPTIONS+=	libusb
+.  endif
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+MESSAGE_SRC=		${PKGDIR}/MESSAGE
+
+.if !empty(PKG_OPTIONS:Macl)
+CONFIGURE_ARGS+=	--enable-acl
+.else
+CONFIGURE_ARGS+=	--disable-acl
+.endif
+
+.if !empty(PKG_OPTIONS:Mavahi)
+.include "../../net/avahi/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-avahi
+PLIST.ippfind=		yes
+PLIST.dnssd-backend=	yes
+.else
+CONFIGURE_ARGS+=	--disable-avahi
+.endif
+
+.if !empty(PKG_OPTIONS:Mdbus)
+.  include "../../sysutils/dbus/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-dbus
+PLIST.dbus=		yes
+.else
+CONFIGURE_ARGS+=	--disable-dbus
+.endif
+
+.if !empty(PKG_OPTIONS:Mdnssd)
+.include "../../net/mDNSResponder/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-dnssd
+PLIST.dnssd=		yes
+PLIST.dnssd-backend=	yes
+.else
+CONFIGURE_ARGS+=	--disable-dnssd
+.endif
+
+.if !empty(PKG_OPTIONS:Mkerberos)
+.include "../../mk/krb5.buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-gssapi
+.else
+CONFIGURE_ARGS+=	--disable-gssapi
+# https://github.com/apple/cups/issues/4947
+SUBST_CLASSES+=		nokerb
+SUBST_STAGE.nokerb=	post-build
+SUBST_SED.nokerb+=	-e '\%<Policy kerberos>%,\%</Policy>%s/^/\#/'
+SUBST_FILES.nokerb+=	conf/cupsd.conf
+SUBST_MESSAGE.nokerb=	Commenting out kerberos section in config.
+.endif
+
+.if !empty(PKG_OPTIONS:Mlibusb)
+.include "../../devel/libusb1/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-libusb
+MESSAGE_SRC+=		${PKGDIR}/MESSAGE.libusb
+PLIST.libusb=		yes
+.else
+CONFIGURE_ARGS+=	--disable-libusb
+.endif
+
+.if !empty(PKG_OPTIONS:Mpam)
+.  include "../../mk/pam.buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-pam
+MESSAGE_SRC+=		${PKGDIR}/MESSAGE.pam
+PLIST.pam=		yes
+.else
+CONFIGURE_ARGS+=	--disable-pam
+MESSAGE_SRC+=		${.CURDIR}/MESSAGE
+.endif
+
+.if !empty(PKG_OPTIONS:Mtcpwrappers)
+.include "../../security/tcp_wrappers/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-tcp-wrappers
+.else
+CONFIGURE_ARGS+=	--disable-tcp-wrappers
+.endif
diff --git a/cups-base/patches/patch-ae b/cups-base/patches/patch-ae
new file mode 100644
index 0000000000..d8fb583172
--- /dev/null
+++ b/cups-base/patches/patch-ae
@@ -0,0 +1,25 @@
+$NetBSD: patch-ae,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+- Do not pass `-z' option to install(1)
+- Honor optimization flags.
+
+--- Makedefs.in.orig	2017-10-13 18:22:26.000000000 +0000
++++ Makedefs.in
+@@ -49,7 +49,7 @@ SHELL		=	/bin/sh
+ #
+ 
+ INSTALL_BIN	=	@LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
+-INSTALL_COMPDATA =	$(INSTALL) -c -m 444 @INSTALL_GZIP@
++INSTALL_COMPDATA =	$(INSTALL) -c -m 444
+ INSTALL_CONFIG	=	$(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
+ INSTALL_DATA	=	$(INSTALL) -c -m 444
+ INSTALL_DIR	=	$(INSTALL) -d
+@@ -151,7 +151,7 @@ CXXLIBS		=	@CXXLIBS@
+ DBUS_NOTIFIER	=	@DBUS_NOTIFIER@
+ DBUS_NOTIFIERLIBS =	@DBUS_NOTIFIERLIBS@
+ DNSSD_BACKEND	=	@DNSSD_BACKEND@
+-DSOFLAGS	=	-L../cups @DSOFLAGS@
++DSOFLAGS	=	-L../cups @DSOFLAGS@ $(OPTIM)
+ DSOLIBS		=	@DSOLIBS@ $(COMMONLIBS)
+ DNSSDLIBS	=	@DNSSDLIBS@
+ IPPFIND_BIN	=	@IPPFIND_BIN@
diff --git a/cups-base/patches/patch-af b/cups-base/patches/patch-af
new file mode 100644
index 0000000000..3b35445e41
--- /dev/null
+++ b/cups-base/patches/patch-af
@@ -0,0 +1,24 @@
+$NetBSD: patch-af,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+* Remove unneeded $(LIBTOOL), it's now in $(INSTALL_BIN).
+
+--- backend/Makefile.orig	2014-05-08 22:42:44.000000000 +0000
++++ backend/Makefile
+@@ -126,7 +126,7 @@ install-exec:	$(INSTALLXPC)
+ 	echo Installing backends in $(SERVERBIN)/backend
+ 	$(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
+ 	for file in $(RBACKENDS); do \
+-		$(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
++		$(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
+ 	done
+ 	for file in $(UBACKENDS); do \
+ 		$(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
+@@ -150,7 +150,7 @@ install-exec:	$(INSTALLXPC)
+ install-xpc:	ipp
+ 	echo Installing XPC backends in $(SERVERBIN)/apple
+ 	$(INSTALL_DIR) -m 755 $(SERVERBIN)/apple
+-	$(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple
++	$(INSTALL_BIN) ipp $(SERVERBIN)/apple
+ 	for file in $(IPPALIASES); do \
+ 		$(RM) $(SERVERBIN)/apple/$$file; \
+ 		$(LN) ipp $(SERVERBIN)/apple/$$file; \
diff --git a/cups-base/patches/patch-ai b/cups-base/patches/patch-ai
new file mode 100644
index 0000000000..6b534c7a17
--- /dev/null
+++ b/cups-base/patches/patch-ai
@@ -0,0 +1,15 @@
+$NetBSD: patch-ai,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Don't create directories, do that with OWN_DIRS and OWN_DIRS_PERMS
+
+--- notifier/Makefile.orig	2013-05-29 11:51:34.000000000 +0000
++++ notifier/Makefile
+@@ -62,6 +62,8 @@ install:	all install-data install-header
+ #
+ 
+ install-data:
++
++install-dirs:
+ 	$(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR)/rss
+ 
+ 
diff --git a/cups-base/patches/patch-airprint-conf_mime.convs.in b/cups-base/patches/patch-airprint-conf_mime.convs.in
new file mode 100644
index 0000000000..1b79bc1aeb
--- /dev/null
+++ b/cups-base/patches/patch-airprint-conf_mime.convs.in
@@ -0,0 +1,37 @@
+$NetBSD: patch-airprint-conf_mime.convs.in,v 1.1 2018/07/24 12:19:21 bouyer Exp $
+
+From bbc3507a260d29db3fc5601826f33c10f9dccd1e Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod
+ Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: http://bugs.debian.org/700961
+Bug: https://cups.org/str.php?L4341
+Last-Update: 2015-02-10
+
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in   | 3 +++
+ conf/mime.types      | 3 +++
+ scheduler/conf.c     | 2 +-
+ scheduler/dirsvc.c   | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/conf/mime.convs.in b/conf/mime.convs.in
+index bffd04f84..33ce812e3 100644
+--- conf/mime.convs.in.orig
++++ conf/mime.convs.in
+@@ -47,6 +47,9 @@ application/postscript		application/vnd.cups-postscript	66	pstops
+ application/vnd.cups-raster	image/pwg-raster		100	rastertopwg
+ application/vnd.cups-raster	image/urf			100	rastertopwg
+ 
++# Needed for printing from iOS (AirPrint) clients
++image/urf    	      	       application/pdf			100	-
++
+ ########################################################################
+ #
+ # Raw filter...
diff --git a/cups-base/patches/patch-airprint-scheduler_conf.c b/cups-base/patches/patch-airprint-scheduler_conf.c
new file mode 100644
index 0000000000..3fa80423d4
--- /dev/null
+++ b/cups-base/patches/patch-airprint-scheduler_conf.c
@@ -0,0 +1,36 @@
+$NetBSD: patch-airprint-scheduler_conf.c,v 1.1 2018/07/24 12:19:21 bouyer Exp $
+
+From bbc3507a260d29db3fc5601826f33c10f9dccd1e Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod
+ Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: http://bugs.debian.org/700961
+Bug: https://cups.org/str.php?L4341
+Last-Update: 2015-02-10
+
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in   | 3 +++
+ conf/mime.types      | 3 +++
+ scheduler/conf.c     | 2 +-
+ scheduler/dirsvc.c   | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/scheduler/conf.c b/scheduler/conf.c
+index 9c1be7089..52f2a6d35 100644
+--- scheduler/conf.c.orig
++++ scheduler/conf.c
+@@ -745,7 +745,7 @@ cupsdReadConfiguration(void)
+   DefaultShared            = CUPS_DEFAULT_DEFAULT_SHARED;
+ 
+ #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
+-  cupsdSetString(&DNSSDSubTypes, "_cups,_print");
++  cupsdSetString(&DNSSDSubTypes, "_cups,_print,_universal");
+ #endif /* HAVE_DNSSD || HAVE_AVAHI */
+ 
+   cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE);
diff --git a/cups-base/patches/patch-airprint-scheduler_dirsvc.c b/cups-base/patches/patch-airprint-scheduler_dirsvc.c
new file mode 100644
index 0000000000..9b35a5c2d2
--- /dev/null
+++ b/cups-base/patches/patch-airprint-scheduler_dirsvc.c
@@ -0,0 +1,40 @@
+$NetBSD: patch-airprint-scheduler_dirsvc.c,v 1.1 2018/07/24 12:19:21 bouyer Exp $
+
+From bbc3507a260d29db3fc5601826f33c10f9dccd1e Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod
+ Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: http://bugs.debian.org/700961
+Bug: https://cups.org/str.php?L4341
+Last-Update: 2015-02-10
+
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in   | 3 +++
+ conf/mime.types      | 3 +++
+ scheduler/conf.c     | 2 +-
+ scheduler/dirsvc.c   | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c
+index 3dab90ca9..f21942af3 100644
+--- scheduler/dirsvc.c.orig
++++ scheduler/dirsvc.c
+@@ -443,6 +443,12 @@ dnssdBuildTxtRecord(
+     keyvalue[count  ][0] = "pdl";
+     keyvalue[count++][1] = p->pdl ? p->pdl : "application/postscript";
+ 
++    /* iOS 6 does not accept this printer as AirPrint printer if there is
++       no URF txt record or "URF=none", "DM3" is the minimum needed found
++       by try and error */
++    keyvalue[count  ][0] = "URF";
++    keyvalue[count++][1] = "DM3";
++
+     if (get_auth_info_required(p, air_str, sizeof(air_str)))
+     {
+       keyvalue[count  ][0] = "air";
diff --git a/cups-base/patches/patch-airprint-scheduler_printers.c b/cups-base/patches/patch-airprint-scheduler_printers.c
new file mode 100644
index 0000000000..15c1db47c0
--- /dev/null
+++ b/cups-base/patches/patch-airprint-scheduler_printers.c
@@ -0,0 +1,152 @@
+$NetBSD: patch-airprint-scheduler_printers.c,v 1.1 2018/07/24 12:19:21 bouyer Exp $
+
+From debian:
+From 7147c814439aafb26ff0262a7d6b8ef56d20969f Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:04 +0200
+Subject: For PWG Raster, add required IPP attributes
+
+Add required by IPP Everywhere for PWG Raster when PWG Raster as input format
+is supported
+
+Bug-Upstream: https://www.cups.org/str.php?L4428
+Last-Update: 2015-02-10
+Patch-Name: pwg-raster-attributes.patch
+---
+ scheduler/printers.c | 77 +++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 76 insertions(+), 1 deletion(-)
+
+diff --git a/scheduler/printers.c b/scheduler/printers.c
+index bb99907ad..a0ebcbd3e 100644
+--- scheduler/printers.c.orig
++++ scheduler/printers.c
+@@ -2199,9 +2199,10 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
+   cupsd_location_t *auth;		/* Pointer to authentication element */
+   const char	*auth_supported;	/* Authentication supported */
+   ipp_t		*oldattrs;		/* Old printer attributes */
+-  ipp_attribute_t *attr;		/* Attribute data */
++  ipp_attribute_t *attr, *attr2;	/* Attribute data */
+   char		*name,			/* Current user/group name */
+ 		*filter;		/* Current filter */
++  mime_type_t   *type;
+ 
+ 
+   DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
+@@ -2538,6 +2539,80 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
+   DEBUG_printf(("cupsdSetPrinterAttrs: leaving name = %s, type = %x\n", p->name,
+                 p->type));
+ 
++  /* 
++   * Add "pwg-raster-document-xxx-supported" attributes if PWG Raster input
++   * is supported
++   */
++  for (type = (mime_type_t *)cupsArrayFirst(p->filetypes);
++       type;
++       type = (mime_type_t *)cupsArrayNext(p->filetypes))
++  {
++    if (!_cups_strcasecmp(type->super, "image"))
++    {
++      if (!_cups_strcasecmp(type->type, "pwg-raster"))
++      {
++	if (p->ppd_attrs != NULL &&
++	    (attr = ippFindAttribute(p->ppd_attrs,
++				     "printer-resolution-supported",
++				     IPP_TAG_ZERO)) != NULL)
++	{
++	  attr2 = ippAddResolutions(p->attrs, IPP_TAG_PRINTER,
++				    "pwg-raster-document-resolution-supported",
++				    attr->num_values, IPP_RES_PER_INCH,
++				    NULL, NULL);
++	  for (i = 0; i < attr->num_values; i ++)
++	  {
++	    attr2->values[i].resolution.xres =
++	      attr->values[i].resolution.xres;
++	    attr2->values[i].resolution.yres =
++	      attr->values[i].resolution.yres;
++	    attr2->values[i].resolution.units = IPP_RES_PER_INCH;
++	  }
++	}
++	else
++	{
++	  static const int	pwg_raster_document_resolution_supported[] =
++	  {
++	    300,
++	    600,
++	    1200
++	  };
++	  ippAddResolutions(p->attrs, IPP_TAG_PRINTER,
++			    "pwg-raster-document-resolution-supported",
++			    (int)(sizeof(pwg_raster_document_resolution_supported) /
++				  sizeof(pwg_raster_document_resolution_supported[0])),
++			    IPP_RES_PER_INCH,
++			    pwg_raster_document_resolution_supported,
++			    pwg_raster_document_resolution_supported);
++	}
++	ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
++		     "pwg-raster-document-sheet-back", NULL, "normal");
++	static const char * const pwg_raster_document_type_supported[] =
++	{
++	  "adobergb-8",
++	  "adobergb-16",
++	  "black-1",
++	  "black-8",
++	  "black-16",
++	  "cmyk-8",
++	  "cmyk-16",
++	  "rgb-8",
++	  "rgb-16",
++	  "sgray-1",
++	  "sgray-8",
++	  "sgray-16",
++	  "srgb-8",
++	  "srgb-16"
++	};
++	ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
++		      "pwg-raster-document-type-supported",
++		      (int)(sizeof(pwg_raster_document_type_supported) /
++			    sizeof(pwg_raster_document_type_supported[0])), NULL,
++		      pwg_raster_document_type_supported);
++      }
++    }
++  }
++
+  /*
+   * Add name-default attributes...
+   */
+
+From bbc3507a260d29db3fc5601826f33c10f9dccd1e Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter%gmail.com@localhost>
+Date: Tue, 9 Aug 2016 18:11:29 +0200
+Subject: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod
+ Touch to a CUPS server)
+
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495
+Bug-Debian: http://bugs.debian.org/700961
+Bug: https://cups.org/str.php?L4341
+Last-Update: 2015-02-10
+
+Patch-Name: airprint-support.patch
+---
+ conf/mime.convs.in   | 3 +++
+ conf/mime.types      | 3 +++
+ scheduler/conf.c     | 2 +-
+ scheduler/dirsvc.c   | 6 ++++++
+ scheduler/printers.c | 4 +++-
+ 5 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/scheduler/printers.c b/scheduler/printers.c
+index a0ebcbd3e..b5fe9e031 100644
+--- scheduler/printers.c.orig
++++ scheduler/printers.c
+@@ -3765,7 +3765,9 @@ add_printer_formats(cupsd_printer_t *p)	/* I - Printer */
+       }
+       else if (!_cups_strcasecmp(type->super, "image"))
+       {
+-        if (!_cups_strcasecmp(type->type, "jpeg"))
++        if (!_cups_strcasecmp(type->type, "urf"))
++	  strlcat(pdl, "image/urf,", sizeof(pdl));
++	else if (!_cups_strcasecmp(type->type, "jpeg"))
+ 	  strlcat(pdl, "image/jpeg,", sizeof(pdl));
+ 	else if (!_cups_strcasecmp(type->type, "png"))
+ 	  strlcat(pdl, "image/png,", sizeof(pdl));
diff --git a/cups-base/patches/patch-at b/cups-base/patches/patch-at
new file mode 100644
index 0000000000..9539a9e416
--- /dev/null
+++ b/cups-base/patches/patch-at
@@ -0,0 +1,15 @@
+$NetBSD: patch-at,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Don't create directories, do that with OWN_DIRS and OWN_DIRS_PERMS
+
+--- scheduler/Makefile.orig	2015-02-17 13:10:19.000000000 +0000
++++ scheduler/Makefile
+@@ -145,6 +145,8 @@ install:	all install-data install-header
+ #
+ 
+ install-data:
++
++install-dirs:
+ 	echo Creating $(SERVERBIN)/driver...
+ 	$(INSTALL_DIR) -m 755 $(SERVERBIN)/driver
+ 	echo Creating $(SERVERROOT)...
diff --git a/cups-base/patches/patch-conf-cups-files.conf.in b/cups-base/patches/patch-conf-cups-files.conf.in
new file mode 100644
index 0000000000..815ca8d34d
--- /dev/null
+++ b/cups-base/patches/patch-conf-cups-files.conf.in
@@ -0,0 +1,16 @@
+$NetBSD: patch-conf-cups-files.conf.in,v 1.2 2018/09/07 20:21:20 wiz Exp $
+
+Add a PidFile configuration directive to write a PID file.
+
+--- conf/cups-files.conf.in.orig	2017-03-28 20:26:53.000000000 +0200
++++ conf/cups-files.conf.in	2017-07-17 17:25:02.000000000 +0200
+@@ -40,6 +40,9 @@
+ # Location of data files used by the scheduler...
+ #DataDir @CUPS_DATADIR@
+ 
++# Location of PID file written by the scheduler (set empty for no PID file)...
++#PidFile @CUPS_STATEDIR@/cupsd.pid
++
+ # Location of the static web content served by the scheduler...
+ #DocumentRoot @CUPS_DOCROOT@
+ 
diff --git a/cups-base/patches/patch-conf_Makefile b/cups-base/patches/patch-conf_Makefile
new file mode 100644
index 0000000000..20ce94a3a9
--- /dev/null
+++ b/cups-base/patches/patch-conf_Makefile
@@ -0,0 +1,29 @@
+$NetBSD: patch-conf_Makefile,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Don't install the config files (leave it up to pkgsrc).
+
+--- conf/Makefile.orig	2015-02-27 12:30:26.000000000 +0000
++++ conf/Makefile
+@@ -70,22 +70,8 @@ install:	all install-data install-header
+ #
+ 
+ install-data:
+-	for file in $(KEEP); do \
+-		if test -r $(SERVERROOT)/$$file ; then \
+-			$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.N ; \
+-		else \
+-			$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT) ; \
+-		fi ; \
+-		$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.default; \
+-	done
+ 	$(INSTALL_DIR) -m 755 $(DATADIR)/mime
+ 	for file in $(REPLACE); do \
+-		if test -r $(DATADIR)/mime/$$file ; then \
+-			$(MV) $(DATADIR)/mime/$$file $(DATADIR)/mime/$$file.O ; \
+-		fi ; \
+-		if test -r $(SERVERROOT)/$$file ; then \
+-			$(MV) $(SERVERROOT)/$$file $(DATADIR)/mime/$$file.O ; \
+-		fi ; \
+ 		$(INSTALL_DATA) $$file $(DATADIR)/mime ; \
+ 	done
+ 	-if test x$(PAMDIR) != x; then \
diff --git a/cups-base/patches/patch-config-scripts_cups-compiler.m4 b/cups-base/patches/patch-config-scripts_cups-compiler.m4
new file mode 100644
index 0000000000..2f52dcb8eb
--- /dev/null
+++ b/cups-base/patches/patch-config-scripts_cups-compiler.m4
@@ -0,0 +1,42 @@
+$NetBSD: patch-config-scripts_cups-compiler.m4,v 1.2 2018/01/26 17:22:51 jperkin Exp $
+
+Disable SSP checks, leave pkgsrc to enable/disable it.
+PIE needs to be tested with linking.
+
+--- config-scripts/cups-compiler.m4.orig	2017-11-01 14:57:53.000000000 +0000
++++ config-scripts/cups-compiler.m4
+@@ -115,12 +115,13 @@ if test -n "$GCC"; then
+ 	AC_MSG_CHECKING(whether compiler supports -fstack-protector)
+ 	OLDCFLAGS="$CFLAGS"
+ 	CFLAGS="$CFLAGS -fstack-protector"
+-	AC_TRY_LINK(,,
++	AC_TRY_LINK(, [return 0;],
+ 		if test "x$LSB_BUILD" = xy; then
+ 			# Can't use stack-protector with LSB binaries...
+-			OPTIM="$OPTIM -fno-stack-protector"
++			: OPTIM="$OPTIM -fno-stack-protector"
+ 		else
+-			OPTIM="$OPTIM -fstack-protector"
++			: OPTIM="$OPTIM -fstack-protector"
++			: LIBS="$LIBS $LIBS_SSP"
+ 		fi
+ 		AC_MSG_RESULT(yes),
+ 		AC_MSG_RESULT(no))
+@@ -137,7 +138,7 @@ if test -n "$GCC"; then
+ 		case "$host_os_name" in
+ 			darwin*)
+ 				CFLAGS="$CFLAGS -fPIE -Wl,-pie"
+-				AC_TRY_COMPILE(,,[
++				AC_TRY_LINK(,,[
+ 					PIEFLAGS="-fPIE -Wl,-pie"
+ 					AC_MSG_RESULT(yes)],
+ 					AC_MSG_RESULT(no))
+@@ -145,7 +146,7 @@ if test -n "$GCC"; then
+ 
+ 			*)
+ 				CFLAGS="$CFLAGS -fPIE -pie"
+-				AC_TRY_COMPILE(,,[
++				AC_TRY_LINK(,,[
+ 					PIEFLAGS="-fPIE -pie"
+ 					AC_MSG_RESULT(yes)],
+ 					AC_MSG_RESULT(no))
diff --git a/cups-base/patches/patch-config-scripts_cups-directories.m4 b/cups-base/patches/patch-config-scripts_cups-directories.m4
new file mode 100644
index 0000000000..404da49638
--- /dev/null
+++ b/cups-base/patches/patch-config-scripts_cups-directories.m4
@@ -0,0 +1,158 @@
+$NetBSD: patch-config-scripts_cups-directories.m4,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+The '$' while loops expand the variables as long as possible so that no
+references to other variables occur. This is necessary because fontpath
+may be "${exec_prefix}", which itself may be "${prefix}", and so on. I
+don't know how many levels of indirection are possible, therefore the
+loop.
+
+I'm also sure that this is not the Right Way to fix it, but at least it
+works.
+
+--- config-scripts/cups-directories.m4.orig	2017-06-30 15:44:38.000000000 +0000
++++ config-scripts/cups-directories.m4
+@@ -101,7 +101,7 @@ dnl Fix "libdir" variable...
+ if test "$libdir" = "\${exec_prefix}/lib"; then
+ 	case "$host_os_name" in
+ 		linux*)
+-			if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
++			if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot && false; then
+ 				libdir="$exec_prefix/lib64"
+ 			fi
+ 			;;
+@@ -178,7 +178,15 @@ AC_SUBST(CUPS_CACHEDIR)
+ 
+ # Data files
+ CUPS_DATADIR="$datadir/cups"
+-AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
++done=no
++while test $done = no; do
++	case "$CUPS_DATADIR" in
++	*'$'*) eval "CUPS_DATADIR=$CUPS_DATADIR";;
++	*) done=yes;;
++	esac
++done
++
++AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$CUPS_DATADIR")
+ AC_SUBST(CUPS_DATADIR)
+ 
+ # Icon directory
+@@ -187,7 +195,11 @@ AC_ARG_WITH(icondir, [  --with-icondir  
+ if test "x$icondir" = x -a -d /usr/share/icons; then
+ 	ICONDIR="/usr/share/icons"
+ else
+-	ICONDIR="$icondir"
++	if test "x$icondir" = xno; then
++		ICONDIR=""
++	else
++		ICONDIR="$icondir"
++	fi
+ fi
+ 
+ AC_SUBST(ICONDIR)
+@@ -198,7 +210,11 @@ AC_ARG_WITH(menudir, [  --with-menudir  
+ if test "x$menudir" = x -a -d /usr/share/applications; then
+ 	MENUDIR="/usr/share/applications"
+ else
+-	MENUDIR="$menudir"
++	if test "x$menudir" = xno; then
++		MENUDIR=""
++	else
++		MENUDIR="$menudir"
++	fi
+ fi
+ 
+ AC_SUBST(MENUDIR)
+@@ -213,7 +229,15 @@ else
+ 	CUPS_DOCROOT="$docdir"
+ fi
+ 
+-AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir")
++done=no
++while test $done = no; do
++	case "$CUPS_DOCROOT" in
++	*'$'*) eval "CUPS_DOCROOT=$CUPS_DOCROOT";;
++	*) done=yes;;
++	esac
++done
++
++AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$CUPS_DOCROOT")
+ AC_SUBST(CUPS_DOCROOT)
+ 
+ # Fonts
+@@ -225,8 +249,16 @@ else
+ 	CUPS_FONTPATH="$fontpath"
+ fi
+ 
+-AC_SUBST(CUPS_FONTPATH)
++done=no
++while test $done = no; do
++	case "$CUPS_FONTPATH" in
++	*'$'*) eval "CUPS_FONTPATH=$CUPS_FONTPATH";;
++	*) done=yes;;
++	esac
++done
++
+ AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
++AC_SUBST(CUPS_FONTPATH)
+ 
+ # Locale data
+ if test "$localedir" = "\${datarootdir}/locale"; then
+@@ -244,6 +276,14 @@ else
+ 	CUPS_LOCALEDIR="$localedir"
+ fi
+ 
++done=no
++while test $done = no; do
++	case "$CUPS_LOCALEDIR" in
++	*'$'*) eval "CUPS_LOCALEDIR=$CUPS_LOCALEDIR";;
++	*) done=yes;;
++	esac
++done
++
+ AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
+ AC_SUBST(CUPS_LOCALEDIR)
+ 
+@@ -252,7 +292,6 @@ AC_ARG_WITH(logdir, [  --with-logdir    
+ 
+ if test x$logdir = x; then
+ 	CUPS_LOGDIR="$localstatedir/log/cups"
+-	AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
+ else
+ 	CUPS_LOGDIR="$logdir"
+ fi
+@@ -261,10 +300,13 @@ AC_SUBST(CUPS_LOGDIR)
+ 
+ # Longer-term spool data
+ CUPS_REQUESTS="$localstatedir/spool/cups"
+-AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
++AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$CUPS_REQUESTS")
+ AC_SUBST(CUPS_REQUESTS)
+ 
+ # Server executables...
++AC_ARG_WITH(serverbindir, [  --with-serverbindir     set path for server helper programs],serverbindir="$withval",serverbindir="")
++
++if test x$serverbindir = x; then
+ case "$host_os_name" in
+ 	*bsd* | darwin*)
+ 		# *BSD and Darwin (macOS)
+@@ -277,6 +319,10 @@ case "$host_os_name" in
+ 		CUPS_SERVERBIN="$exec_prefix/lib/cups"
+ 		;;
+ esac
++else
++	INSTALL_SYSV=""
++	CUPS_SERVERBIN="$serverbindir"
++fi
+ 
+ AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN")
+ AC_SUBST(CUPS_SERVERBIN)
+@@ -284,7 +330,7 @@ AC_SUBST(INSTALL_SYSV)
+ 
+ # Configuration files
+ CUPS_SERVERROOT="$sysconfdir/cups"
+-AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
++AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$CUPS_SERVERROOT")
+ AC_SUBST(CUPS_SERVERROOT)
+ 
+ # Transient run-time state
diff --git a/cups-base/patches/patch-config-scripts_cups-gssapi.m4 b/cups-base/patches/patch-config-scripts_cups-gssapi.m4
new file mode 100644
index 0000000000..5056aceff5
--- /dev/null
+++ b/cups-base/patches/patch-config-scripts_cups-gssapi.m4
@@ -0,0 +1,36 @@
+$NetBSD: patch-config-scripts_cups-gssapi.m4,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+builtin krb5-config in platforms such as solaris do not support
+the gssapi option, and need an explicit -lgss
+
+--- config-scripts/cups-gssapi.m4.orig	2017-06-30 15:44:38.000000000 +0000
++++ config-scripts/cups-gssapi.m4
+@@ -34,19 +34,18 @@ if test x$enable_gssapi != xno; then
+ 					AC_MSG_RESULT(no)
+ 				fi
+ 				;;
+-			sunos*)
+-				# Solaris has a non-standard krb5-config, don't use it!
+-				AC_CHECK_LIB(gss, gss_display_status,
+-					AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
++			*)
++				# make sure krb5-config supports gssapi option
++				if $KRB5CONFIG --cflags gssapi 2>&1 | grep "Unknown option" > /dev/null ; then
+ 					CFLAGS="`$KRB5CONFIG --cflags` $CFLAGS"
+ 					CPPFLAGS="`$KRB5CONFIG --cflags` $CPPFLAGS"
+-					LIBGSSAPI="-lgss `$KRB5CONFIG --libs`")
+-				;;
+-			*)
++					LIBGSSAPI="-lgss `$KRB5CONFIG --libs`"
++				else
+ 				# Other platforms just ask for GSSAPI
+-				CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
+-				CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
+-				LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
++					CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
++					CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
++					LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
++				fi
+ 				;;
+ 		esac
+ 		AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
diff --git a/cups-base/patches/patch-config-scripts_cups-libtool.m4 b/cups-base/patches/patch-config-scripts_cups-libtool.m4
new file mode 100644
index 0000000000..ac832078ed
--- /dev/null
+++ b/cups-base/patches/patch-config-scripts_cups-libtool.m4
@@ -0,0 +1,15 @@
+$NetBSD: patch-config-scripts_cups-libtool.m4,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Fix non-portable `==' test(1) operator.
+
+--- config-scripts/cups-libtool.m4.orig	2017-10-13 18:22:26.000000000 +0000
++++ config-scripts/cups-libtool.m4
+@@ -14,7 +14,7 @@ dnl
+ AC_ARG_ENABLE(libtool_unsupported, [  --enable-libtool-unsupported=/path/to/libtool
+                           build with libtool (UNSUPPORTED!)],
+ 	[if test x$enable_libtool_unsupported != xno; then
+-		if test x$enable_libtool_unsupported == xyes; then
++		if test x$enable_libtool_unsupported = xyes; then
+ 			AC_MSG_ERROR([Use --enable-libtool-unsupported=/path/to/libtool.])
+ 		fi
+ 		LIBTOOL="$enable_libtool_unsupported"
diff --git a/cups-base/patches/patch-config-scripts_cups-manpages.m4 b/cups-base/patches/patch-config-scripts_cups-manpages.m4
new file mode 100644
index 0000000000..590f60c818
--- /dev/null
+++ b/cups-base/patches/patch-config-scripts_cups-manpages.m4
@@ -0,0 +1,62 @@
+$NetBSD: patch-config-scripts_cups-manpages.m4,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Add '--with-manext' configure option.
+
+--- config-scripts/cups-manpages.m4.orig	2017-06-30 15:44:38.000000000 +0000
++++ config-scripts/cups-manpages.m4
+@@ -11,6 +11,8 @@ dnl which should have been included with
+ dnl missing or damaged, see the license at "http://www.cups.org/";.
+ dnl
+ 
++AC_ARG_WITH(manext, [  --with-manext           set man page extension style (bsd,irix,sysv,none)],manext="$withval",manext="")
++
+ dnl Fix "mandir" variable...
+ if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
+ 	# New GNU "standards" break previous ones, so make sure we use
+@@ -42,7 +44,27 @@ AC_SUBST(AMANDIR)
+ AC_SUBST(PMANDIR)
+ 
+ dnl Setup manpage extensions...
+-case "$host_os_name" in
++if test x$manext = x; then
++	case "$host_os_name" in
++		*bsd* | dragonfly*)
++			# *BSD and Darwin (MacOS X)
++			manext=bsd
++			;;
++		sunos* | hp-ux*)
++			# Solaris and HP-UX
++			manext=sysv
++			;;
++		linux* | gnu* | darwin*)
++			# Linux and GNU Hurd
++			manext=linux
++			;;
++		*)
++			# All others
++			;;
++	esac
++fi
++
++case "$manext" in
+ 	sunos*)
+ 		# Solaris
+ 		MAN1EXT=1
+@@ -51,7 +73,7 @@ case "$host_os_name" in
+ 		MAN8EXT=1m
+ 		MAN8DIR=1m
+ 		;;
+-	linux* | gnu* | darwin*)
++	linux)
+ 		# Linux, GNU Hurd, and macOS
+ 		MAN1EXT=1.gz
+ 		MAN5EXT=5.gz
+@@ -59,7 +81,7 @@ case "$host_os_name" in
+ 		MAN8EXT=8.gz
+ 		MAN8DIR=8
+ 		;;
+-	*)
++	none|*)
+ 		# All others
+ 		MAN1EXT=1
+ 		MAN5EXT=5
diff --git a/cups-base/patches/patch-config-scripts_cups-opsys.m4 b/cups-base/patches/patch-config-scripts_cups-opsys.m4
new file mode 100644
index 0000000000..e99eeeb315
--- /dev/null
+++ b/cups-base/patches/patch-config-scripts_cups-opsys.m4
@@ -0,0 +1,16 @@
+$NetBSD: patch-config-scripts_cups-opsys.m4,v 1.2 2018/04/05 16:31:45 leot Exp $
+
+Fix building on newer macOS.
+
+--- config-scripts/cups-opsys.m4.orig	2018-03-23 03:48:36.000000000 +0000
++++ config-scripts/cups-opsys.m4
+@@ -22,9 +22,6 @@ if test "x$host_os_version" = x; then
+         host_os_version="0"
+ fi
+ 
+-if test "$host_os_name" = darwin -a $host_os_version -lt 120; then
+-        AC_MSG_ERROR([Sorry, this version of CUPS requires macOS 10.8 or higher.])
+-fi
+ 
+ dnl Determine whether we are cross-compiling...
+ if test "$build" = "$host"; then
diff --git a/cups-base/patches/patch-cups-tls.c b/cups-base/patches/patch-cups-tls.c
new file mode 100644
index 0000000000..226fd58430
--- /dev/null
+++ b/cups-base/patches/patch-cups-tls.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-cups-tls.c,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Add missing stub.
+
+--- cups/tls.c.orig	2014-08-29 15:19:40.000000000 +0000
++++ cups/tls.c
+@@ -50,6 +50,13 @@
+ #    include "tls-sspi.c"
+ #  endif /* HAVE_GNUTLS */
+ #else
++
++void                                    
++_httpTLSSetOptions(int options)         /* I - Options */
++{                                       
++	(void)options;
++}
++
+ /* Stubs for when TLS is not supported/available */
+ int
+ httpCopyCredentials(http_t *http, cups_array_t **credentials)
diff --git a/cups-base/patches/patch-cups_thread.c b/cups-base/patches/patch-cups_thread.c
new file mode 100644
index 0000000000..8791bbcd10
--- /dev/null
+++ b/cups-base/patches/patch-cups_thread.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-cups_thread.c,v 1.1 2018/07/09 13:53:34 youri Exp $
+
+Patch for macOS Sierra and before.
+
+--- cups/thread.c.orig	2018-06-05 16:06:54.000000000 +0000
++++ cups/thread.c
+@@ -19,6 +19,26 @@
+ #include "cups-private.h"
+ #include "thread-private.h"
+ 
++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
++#include <mach/mach_time.h>
++#ifndef CLOCK_REALTIME
++#define CLOCK_REALTIME 0
++#define CLOCK_MONOTONIC 0
++#endif
++static int
++clock_gettime(int clk_id, struct timespec *t){
++    mach_timebase_info_data_t timebase;
++    mach_timebase_info(&timebase);
++    uint64_t time;
++    time = mach_absolute_time();
++    double nseconds = ((double)time * (double)timebase.numer)/((double)timebase.denom);
++    double seconds = ((double)time * (double)timebase.numer)/((double)timebase.denom * 1e9);
++    t->tv_sec = seconds;
++    t->tv_nsec = nseconds;
++    return 0;
++}
++#endif
++
+ 
+ #if defined(HAVE_PTHREAD_H)
+ /*
diff --git a/cups-base/patches/patch-doc-help-man-cups-files.conf.html b/cups-base/patches/patch-doc-help-man-cups-files.conf.html
new file mode 100644
index 0000000000..8c3a5da275
--- /dev/null
+++ b/cups-base/patches/patch-doc-help-man-cups-files.conf.html
@@ -0,0 +1,17 @@
+$NetBSD: patch-doc-help-man-cups-files.conf.html,v 1.2 2018/11/10 19:51:12 leot Exp $
+
+Add a PidFile configuration directive to write a PID file.
+
+--- doc/help/man-cups-files.conf.html.orig	2018-11-08 13:49:36.000000000 +0000
++++ doc/help/man-cups-files.conf.html
+@@ -118,6 +118,10 @@ The default is "/var/log/cups/page_log".
+ <dt><a name="PassEnv"></a><b>PassEnv </b><i>variable </i>[ ... <i>variable </i>]
+ <dd style="margin-left: 5.0em">Passes the specified environment variable(s) to child processes.
+ Note: the standard CUPS filter and backend environment variables cannot be overridden using this directive.
++<dt><a name="PidFile"></a><b>PidFile </b><i>path</i>
++<dd style="margin-left: 5.0em">Specifies the file the CUPS scheduler writes its PID to
++(set to an ampty value to disable the PID file).
++The default is usually "/var/run/cups/cupsd.pid".
+ <dt><a name="RemoteRoot"></a><b>RemoteRoot </b><i>username</i>
+ <dd style="margin-left: 5.0em">Specifies the username that is associated with unauthenticated accesses by clients claiming to be the root user.
+ The default is "remroot".
diff --git a/cups-base/patches/patch-man-cups-files.conf.man.in b/cups-base/patches/patch-man-cups-files.conf.man.in
new file mode 100644
index 0000000000..91f87acb44
--- /dev/null
+++ b/cups-base/patches/patch-man-cups-files.conf.man.in
@@ -0,0 +1,19 @@
+$NetBSD: patch-man-cups-files.conf.man.in,v 1.2 2018/06/11 10:04:25 adam Exp $
+
+Add a PidFile configuration directive to write a PID file.
+
+--- man/cups-files.conf.man.in.orig	2018-06-05 16:06:54.000000000 +0000
++++ man/cups-files.conf.man.in
+@@ -157,6 +157,12 @@ The server name may be included in filen
+ 
+ .fi
+ The default is "/var/log/cups/page_log".
++.\"#PidFile
++.TP 5
++\fBPidFile \fIpath\fR
++Specifies the file the CUPS scheduler writes its PID to
++(set to an empty value to disable the PID file).
++The default is usually "/var/run/cups/cupsd.pid".
+ .\"#PassEnv
+ .TP 5
+ \fBPassEnv \fIvariable \fR[ ... \fIvariable \fR]
diff --git a/cups-base/patches/patch-scheduler-conf.c b/cups-base/patches/patch-scheduler-conf.c
new file mode 100644
index 0000000000..8ec5f6d7ed
--- /dev/null
+++ b/cups-base/patches/patch-scheduler-conf.c
@@ -0,0 +1,30 @@
+$NetBSD: patch-scheduler-conf.c,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Add a PidFile configuration directive to write a PID file.
+
+--- scheduler/conf.c.orig	2017-03-28 20:26:53.000000000 +0200
++++ scheduler/conf.c	2017-07-17 18:04:23.000000000 +0200
+@@ -142,6 +142,7 @@ static const cupsd_var_t	cupsfiles_vars[
+   { "CreateSelfSignedCerts",	&CreateSelfSignedCerts,	CUPSD_VARTYPE_BOOLEAN },
+ #endif /* HAVE_SSL */
+   { "DataDir",			&DataDir,		CUPSD_VARTYPE_STRING },
++  { "PidFile",			&PidFile,		CUPSD_VARTYPE_STRING },
+   { "DocumentRoot",		&DocumentRoot,		CUPSD_VARTYPE_STRING },
+   { "ErrorLog",			&ErrorLog,		CUPSD_VARTYPE_STRING },
+   { "FileDevice",		&FileDevice,		CUPSD_VARTYPE_BOOLEAN },
+@@ -579,6 +580,7 @@ cupsdReadConfiguration(void)
+   cupsdSetString(&RequestRoot, CUPS_REQUESTS);
+   cupsdSetString(&CacheDir, CUPS_CACHEDIR);
+   cupsdSetString(&DataDir, CUPS_DATADIR);
++  cupsdSetString(&PidFile, CUPS_STATEDIR "/cupsd.pid");
+   cupsdSetString(&DocumentRoot, CUPS_DOCROOT);
+   cupsdSetString(&AccessLog, CUPS_LOGDIR "/access_log");
+   cupsdClearString(&ErrorLog);
+@@ -3402,6 +3404,7 @@ read_cupsd_conf(cups_file_t *fp)	/* I - 
+              !_cups_strcasecmp(line, "CacheDir") ||
+              !_cups_strcasecmp(line, "ConfigFilePerm") ||
+              !_cups_strcasecmp(line, "DataDir") ||
++             !_cups_strcasecmp(line, "PidFile") ||
+              !_cups_strcasecmp(line, "DocumentRoot") ||
+              !_cups_strcasecmp(line, "ErrorLog") ||
+              !_cups_strcasecmp(line, "FatalErrors") ||
diff --git a/cups-base/patches/patch-scheduler-conf.h b/cups-base/patches/patch-scheduler-conf.h
new file mode 100644
index 0000000000..da85398f6a
--- /dev/null
+++ b/cups-base/patches/patch-scheduler-conf.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-scheduler-conf.h,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Add a PidFile configuration directive to write a PID file.
+
+--- scheduler/conf.h.orig	2017-03-28 20:26:53.000000000 +0200
++++ scheduler/conf.h	2017-07-17 17:25:02.000000000 +0200
+@@ -134,6 +134,8 @@
+ 					/* Cache file directory */
+ 			*DataDir		VALUE(NULL),
+ 					/* Data file directory */
++			*PidFile		VALUE(NULL),
++					/* PID file */
+ 			*DefaultLanguage	VALUE(NULL),
+ 					/* Default language encoding */
+ 			*DefaultLocale		VALUE(NULL),
diff --git a/cups-base/patches/patch-scheduler-main.c b/cups-base/patches/patch-scheduler-main.c
new file mode 100644
index 0000000000..a88c1b4ea3
--- /dev/null
+++ b/cups-base/patches/patch-scheduler-main.c
@@ -0,0 +1,86 @@
+$NetBSD: patch-scheduler-main.c,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+Add a PidFile configuration directive to write a PID file.
+
+--- scheduler/main.c.orig	2017-10-13 18:22:26.000000000 +0000
++++ scheduler/main.c
+@@ -61,6 +61,7 @@
+  * Local functions...
+  */
+ 
++static int		create_pidfile(const char *path);
+ static void		parent_handler(int sig);
+ static void		process_children(void);
+ static void		sigchld_handler(int sig);
+@@ -676,6 +677,13 @@ main(int  argc,				/* I - Number of comm
+ #endif /* __APPLE__ */
+ 
+  /*
++  * Create pidfile...
++  */
++  if (PidFile && *PidFile)
++    if (!create_pidfile(PidFile))
++      goto fail;
++
++ /*
+   * Send server-started event...
+   */
+ 
+@@ -1143,6 +1151,7 @@ main(int  argc,				/* I - Number of comm
+                   "Scheduler shutting down due to program error.");
+   }
+ 
++fail:
+  /*
+   * Close all network clients...
+   */
+@@ -1168,6 +1177,12 @@ main(int  argc,				/* I - Number of comm
+   */
+ 
+   cupsdDeleteTemporaryPrinters(1);
++ 
++/*
++ * Remove pidfile...
++ */
++ if (PidFile && *PidFile)
++   (void)unlink(PidFile);
+ 
+ #ifdef __APPLE__
+  /*
+@@ -2088,6 +2103,36 @@ service_checkout(int shutdown)          
+ 
+ 
+ /*
++ * 'create_pidfile()' - Create PID file.
++ */
++static int
++create_pidfile(const char *path)
++{
++  int fd;
++  size_t l;
++  char s[42];
++  if ((l = snprintf(s, sizeof(s), "%jd\n", (intmax_t)getpid())) < 0) {
++    cupsdLogMessage(CUPSD_LOG_EMERG, "PidFile: snprintf() failed - %s!",
++                    strerror(errno));
++    return (0);
++  }
++  if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)) < 0) {
++    cupsdLogMessage(CUPSD_LOG_EMERG, "PidFile: open(%s) failed - %s!",
++                    path, strerror(errno));
++    return (0);
++  }
++  if (write(fd, s, l + 1) < l + 1) {
++    cupsdLogMessage(CUPSD_LOG_EMERG, "PidFile %s: write(\"%s\", %zd) failed - %s!",
++                    path, s, l + 1, strerror(errno));
++    (void)close(fd);
++    return (0);
++  }
++  (void)close(fd);
++  return (1);
++}
++
++
++/*
+  * 'usage()' - Show scheduler usage.
+  */
+ 
diff --git a/cups-base/patches/patch-scheduler_auth.c b/cups-base/patches/patch-scheduler_auth.c
new file mode 100644
index 0000000000..16e04479ac
--- /dev/null
+++ b/cups-base/patches/patch-scheduler_auth.c
@@ -0,0 +1,35 @@
+$NetBSD: patch-scheduler_auth.c,v 1.3 2018/06/11 10:04:25 adam Exp $
+
+- Don't pull in sys/ucred.h on Solaris as it results in procfs.h being
+  included and conflicts between _FILE_OFFSET_BITS=64 and 32-bit procfs.
+- OpenBSD defines SO_PEERCRED, but it is different from Linux's one.
+
+--- scheduler/auth.c.orig	2018-06-05 16:06:54.000000000 +0000
++++ scheduler/auth.c
+@@ -47,7 +47,7 @@ extern const char *cssmErrorString(int e
+ #ifdef HAVE_SYS_PARAM_H
+ #  include <sys/param.h>
+ #endif /* HAVE_SYS_PARAM_H */
+-#ifdef HAVE_SYS_UCRED_H
++#if defined(HAVE_SYS_UCRED_H) && !defined(__sun) && !defined(__OpenBSD__)
+ #  include <sys/ucred.h>
+ typedef struct xucred cupsd_ucred_t;
+ #  define CUPSD_UCRED_UID(c) (c).cr_uid
+@@ -399,7 +399,7 @@ cupsdAuthorize(cupsd_client_t *con)	/* I
+     con->type = CUPSD_AUTH_BASIC;
+   }
+ #endif /* HAVE_AUTHORIZATION_H */
+-#if defined(SO_PEERCRED) && defined(AF_LOCAL)
++#if defined(SO_PEERCRED) && defined(AF_LOCAL) && !defined(__OpenBSD__)
+   else if (!strncmp(authorization, "PeerCred ", 9) &&
+            con->http->hostaddr->addr.sa_family == AF_LOCAL && con->best)
+   {
+@@ -836,7 +836,7 @@ cupsdAuthorize(cupsd_client_t *con)	/* I
+ 
+     gss_delete_sec_context(&minor_status, &context, GSS_C_NO_BUFFER);
+ 
+-#  if defined(SO_PEERCRED) && defined(AF_LOCAL)
++#  if defined(SO_PEERCRED) && defined(AF_LOCAL) && !defined(__OpenBSD__)
+    /*
+     * Get the client's UID if we are printing locally - that allows a backend
+     * to run as the correct user to get Kerberos credentials of its own.
diff --git a/cups-base/patches/patch-scheduler_dirsvc.c b/cups-base/patches/patch-scheduler_dirsvc.c
new file mode 100644
index 0000000000..55fee664fd
--- /dev/null
+++ b/cups-base/patches/patch-scheduler_dirsvc.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-scheduler_dirsvc.c,v 1.1 2017/11/12 14:10:15 khorben Exp $
+
+o net/mDNSResponder-258.14 does not define kDNSServiceErr_Timeout, just threat
+ it like kDNSServiceErr_Unknown.
+
+--- scheduler/dirsvc.c.orig	2015-01-30 16:15:53.000000000 +0000
++++ scheduler/dirsvc.c
+@@ -831,9 +831,6 @@ dnssdErrorString(int error)		/* I - Erro
+ 
+     case kDNSServiceErr_PollingMode :
+         return ("Service polling mode error.");
+-
+-    case kDNSServiceErr_Timeout :
+-        return ("Service timeout.");
+   }
+ 
+ #  else /* HAVE_AVAHI */
diff --git a/cups-base/patches/patch-test_ippfind.c b/cups-base/patches/patch-test_ippfind.c
new file mode 100644
index 0000000000..ca55a51c9d
--- /dev/null
+++ b/cups-base/patches/patch-test_ippfind.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-test_ippfind.c,v 1.2 2018/11/10 19:51:12 leot Exp $
+
+--- test/ippfind.c.orig	2018-11-08 13:49:36.000000000 +0000
++++ test/ippfind.c
+@@ -1765,11 +1765,6 @@ dnssd_error_string(int error)		/* I - Er
+ 
+     case kDNSServiceErr_PollingMode :
+         return ("Service polling mode error.");
+-
+-#ifndef _WIN32
+-    case kDNSServiceErr_Timeout :
+-        return ("Service timeout.");
+-#endif /* !_WIN32 */
+   }
+ 
+ #  elif defined(HAVE_AVAHI)
diff --git a/cups/DESCR b/cups/DESCR
new file mode 100644
index 0000000000..15bcaec70d
--- /dev/null
+++ b/cups/DESCR
@@ -0,0 +1,16 @@
+The Common UNIX Printing System provides a portable printing layer for
+UNIX operating systems. It has been developed by Easy Software Products
+to promote a standard printing solution for all UNIX vendors and users.
+CUPS provides the System V and Berkeley command-line interfaces.
+
+CUPS uses the Internet Printing Protocol (IETF-IPP) as the basis for
+managing print jobs and queues.  The Line Printer Daemon (LPD, RFC1179)
+and AppSocket protocols are also supported with reduced functionality.
+
+CUPS adds network printer browsing and PostScript Printer Description
+("PPD")-based printing options to support real world applications under
+UNIX.
+
+This is a meta-package for installing CUPS and the necessary backends,
+filters, and other software that is required for using printer drivers
+from CUPS 1.6.0 on.
diff --git a/cups/Makefile b/cups/Makefile
new file mode 100644
index 0000000000..70caa258ee
--- /dev/null
+++ b/cups/Makefile
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.266 2019/08/16 21:19:30 leot Exp $
+
+.include "../../print/cups/Makefile.common"
+
+PKGNAME=	cups-${CUPS_VERS}
+MASTER_SITES=	# empty
+
+MAINTAINER=	sbd%NetBSD.org@localhost
+COMMENT=	Common UNIX Printing System
+
+META_PACKAGE=	yes
+
+.include "../../print/cups-base/buildlink3.mk"
+.include "../../print/cups-filters/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/cups/Makefile.common b/cups/Makefile.common
new file mode 100644
index 0000000000..9fcbad1ea9
--- /dev/null
+++ b/cups/Makefile.common
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile.common,v 1.8 2019/08/16 21:19:30 leot Exp $
+#
+# used by wip/cups/Makefile
+# used by wip/cups-base/Makefile
+
+CUPS_VERS=	2.2.12
+DISTNAME=	cups-${CUPS_VERS}-source
+CATEGORIES=	print
+
+HOMEPAGE=	https://www.cups.org/
+LICENSE=	gnu-gpl-v2 AND gnu-lgpl-v2



Home | Main Index | Thread Index | Old Index