From 95350a94bb2e486e29d87ec181e4d559c8ebf62f Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Fri, 8 May 2009 20:00:57 +0000 Subject: [PATCH] - disable threading; it causes several issues which will need more investigation - explicitely set some configure switches - use wheel as "system-groups" instead of non-existent "sys" - enable raw printing - respect CFLAGS - add GSSAPI support - tweak gecos - add missing @sample --- print/cups/Makefile | 32 +++++++++++++++++++++++++------- print/cups/files/krb5-config | 12 ++++++++++++ print/cups/pkg/PLIST | 5 +++-- 3 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 print/cups/files/krb5-config diff --git a/print/cups/Makefile b/print/cups/Makefile index 10f4ae0d53e..f9151eeed97 100644 --- a/print/cups/Makefile +++ b/print/cups/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.45 2009/04/27 08:25:39 bernd Exp $ +# $OpenBSD: Makefile,v 1.46 2009/05/08 20:00:57 ajacoutot Exp $ COMMENT= Common Unix Printing System VERSION= 1.3.10 DISTNAME= cups-${VERSION}-source -PKGNAME= cups-${VERSION} +PKGNAME= cups-${VERSION}p0 CATEGORIES= print sysutils SHARED_LIBS+= cups 4.0 @@ -21,7 +21,8 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB += c gcrypt gpg-error jpeg m pthread tasn1 z +WANTLIB += asn1 c crypto gcrypt gpg-error gssapi jpeg krb5 m +WANTLIB += pthread z MASTER_SITES= http://ftp.easysw.com/pub/cups/${VERSION}/ \ http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/cups/${VERSION}/ \ @@ -56,23 +57,37 @@ DIFF_ARGS= -a CONFIGURE_STYLE= gnu dest AUTOCONF_VERSION= 2.59 -CONFIGURE_ARGS+= --with-cups-user=_cups \ +CONFIGURE_ARGS= ${CONFIGURE_SHARED} \ + --with-cups-user=_cups \ --with-cups-group=_cups \ - ${CONFIGURE_SHARED} \ + --with-system-groups=wheel \ --localstatedir=/var \ --without-java \ - --without-perl \ + --with-perl="/usr/bin/perl" \ + --with-optim="${CFLAGS}" \ --without-php \ --without-python \ + --enable-image \ --enable-dbus \ + --enable-raw-printing \ + --enable-gssapi \ + --disable-dnssd \ + --disable-pap \ + --disable-ldap \ + --disable-slp \ + --disable-default-shared \ --disable-pdftops # XXX we need to use GnuTLS instead of OpenSSL because of conflicting # symbols with Mozilla NSS which can lead to crashes CONFIGURE_ARGS+= --enable-gnutls=yes +# XXX there is an issue with threading with CUPS under OpenBSD +# the lpd backend and admin.cgi hang at cpu 100% +CONFIGURE_ARGS+= --disable-threads + CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \ - -I${LOCALBASE}/include/libpng" \ + -I${LOCALBASE}/include/libpng" \ DSOFLAGS="-L${LOCALBASE}/lib" \ LDFLAGS="-L${LOCALBASE}/lib -pthread" \ LIBcups_VERSION=${LIBcups_VERSION} \ @@ -101,6 +116,9 @@ LIB_DEPENDS+= ldap,lber::databases/openldap CONFIGURE_ARGS+= --disable-ldap .endif +post-extract: + ${INSTALL} -m 555 ${FILESDIR}/krb5-config ${WRKDIR}/bin + post-configure: cd ${WRKBUILD} && perl -pi -e 's|\$${DESTDIR}||g' init/cups.sh \ config.h cups-config conf/cupsd.conf man/*.man diff --git a/print/cups/files/krb5-config b/print/cups/files/krb5-config new file mode 100644 index 00000000000..a9c190b6c92 --- /dev/null +++ b/print/cups/files/krb5-config @@ -0,0 +1,12 @@ +#! /bin/sh +# +# $OpenBSD: krb5-config,v 1.1 2009/05/08 20:00:57 ajacoutot Exp $ +# + +case x$1 in +x--libs) + echo '-lgssapi -lkrb5 -lasn1 -lcrypto';; +x--cflags) + echo '-I/usr/include/kerberosV';; +esac +exit 0 diff --git a/print/cups/pkg/PLIST b/print/cups/pkg/PLIST index 4c1a119feb4..6e229ccc6ef 100644 --- a/print/cups/pkg/PLIST +++ b/print/cups/pkg/PLIST @@ -1,7 +1,7 @@ -@comment $OpenBSD: PLIST,v 1.18 2009/04/27 08:25:39 bernd Exp $ +@comment $OpenBSD: PLIST,v 1.19 2009/05/08 20:00:57 ajacoutot Exp $ @conflict LPRng-* @newgroup _cups:541 -@newuser _cups:541:541:daemon:CUPS:/nonexistent:/sbin/nologin +@newuser _cups:541:541:daemon:CUPS printer spooler daemon:/var/empty:/sbin/nologin %%SHARED%% @bin bin/cancel bin/cups-config @@ -1772,6 +1772,7 @@ share/examples/cups/mime.types share/examples/cups/ppd/ @sample ${SYSCONFDIR}/cups/ppd/ share/examples/cups/snmp.conf +@sample ${SYSCONFDIR}/cups/snmp.conf share/examples/cups/ssl/ @sample ${SYSCONFDIR}/cups/ssl/ share/icons/