diff --git a/srcpkgs/cups/patches/default-config-no-gssapi.patch b/srcpkgs/cups/patches/default-config-no-gssapi.patch
new file mode 100644
index 00000000000..b12c55ddf81
--- /dev/null
+++ b/srcpkgs/cups/patches/default-config-no-gssapi.patch
@@ -0,0 +1,26 @@
+--- a/conf/cupsd.conf.in
++++ b/conf/cupsd.conf.in
+@@ -145,12 +145,12 @@
+
+ # Job-related operations must be done by the owner or an administrator...
+
+- AuthType Negotiate
++ AuthType Default
+ Order deny,allow
+
+
+
+- AuthType Negotiate
++ AuthType Default
+ Require user @OWNER @SYSTEM
+ Order deny,allow
+
+@@ -171,7 +171,7 @@
+
+ # Only the owner or an administrator can cancel or authenticate a job...
+
+- AuthType Negotiate
++ AuthType Default
+ Require user @OWNER @CUPS_DEFAULT_PRINTOPERATOR_AUTH@
+ Order deny,allow
+
diff --git a/srcpkgs/cups/template b/srcpkgs/cups/template
index a2599f66d7a..1faf168359e 100644
--- a/srcpkgs/cups/template
+++ b/srcpkgs/cups/template
@@ -1,7 +1,7 @@
# Template file for 'cups'
pkgname=cups
version=2.2.2
-revision=1
+revision=2
patch_args="-Np1"
short_desc="Common Unix Printing System"
maintainer="Juan RP "
@@ -13,7 +13,7 @@ checksum=f589bb7d5d1dc3aa0915d7cf2b808571ef2e1530cd1a6ebe76ae8f9f4994e4f6
hostmakedepends="automake pkg-config poppler-utils gnutls-devel avahi-libs-devel"
makedepends="acl-devel libjpeg-turbo-devel libpng-devel tiff-devel
gnutls-devel pam-devel poppler-devel libusb-devel avahi-libs-devel
- libpaper-devel"
+ libpaper-devel $(vopt_if gssapi mit-krb5-devel)"
depends="xdg-utils"
conf_files="/etc/pam.d/cups /etc/cups/*.conf"
make_dirs="
@@ -23,6 +23,8 @@ make_dirs="
/var/spool/cups 0755 cups lp
/etc/cups/ssl 0700 cups lp"
+build_options="gssapi"
+
# Package build options
system_accounts="cups"
cups_pgroup="lp"
@@ -44,12 +46,12 @@ do_configure() {
./configure ${configure_args} --sbindir=/usr/bin --libdir=/usr/lib \
--enable-acl --enable-dbus --enable-raw-printing \
--enable-threads --with-logdir=/var/log/cups \
- --with-docdir=/usr/share/cups/doc --disable-gssapi \
+ --with-docdir=/usr/share/cups/doc \
--with-cups-user=cups --with-cups-group=lp --enable-relro \
--enable-libpaper --enable-avahi --enable-pam --enable-ssl \
--with-menudir=/usr/share/applications --with-xinetd=/etc/xinetd.d \
--with-optim="${CFLAGS}" --without-systemd \
- --without-perl --without-php --without-python
+ --without-perl --without-php --without-python $(vopt_enable gssapi)
}
do_build() {
# Do not run genstrings binary in cross builds.