diff options
author | maya <maya@pkgsrc.org> | 2020-05-16 18:07:56 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2020-05-16 18:07:56 +0000 |
commit | 15f934703811ca7ea2597a1a98fd3be70937ad3b (patch) | |
tree | 93bb568c0f3905918338cad9a15a518d50f20e46 /print | |
parent | 2b1f794bc3075706c87b7df68f4dd8bf5d0b9248 (diff) | |
download | pkgsrc-15f934703811ca7ea2597a1a98fd3be70937ad3b.tar.gz |
Split cups-base in two: libcups and the printer daemon.
The intention with this change is to make it easier to enable CUPS support
by default in places, without requiring the daemon (which might conflict
with other printing setups).
Bump cups-base PKGREVISION and make it depend on libcups.
Diffstat (limited to 'print')
-rw-r--r-- | print/Makefile | 3 | ||||
-rw-r--r-- | print/cups-base/Makefile | 10 | ||||
-rw-r--r-- | print/cups-base/PLIST | 31 | ||||
-rw-r--r-- | print/cups-base/buildlink3.mk | 3 | ||||
-rw-r--r-- | print/libcups/DESCR | 14 | ||||
-rw-r--r-- | print/libcups/Makefile | 75 | ||||
-rw-r--r-- | print/libcups/PLIST | 30 | ||||
-rw-r--r-- | print/libcups/buildlink3.mk | 33 | ||||
-rw-r--r-- | print/libcups/options.mk | 66 |
9 files changed, 231 insertions, 34 deletions
diff --git a/print/Makefile b/print/Makefile index 736aee4d11a..4bb7ed262d6 100644 --- a/print/Makefile +++ b/print/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.769 2020/05/15 11:57:35 nia Exp $ +# $NetBSD: Makefile,v 1.770 2020/05/16 18:07:56 maya Exp $ # COMMENT= Desktop publishing @@ -78,6 +78,7 @@ SUBDIR+= lacheck SUBDIR+= latex-mk SUBDIR+= latexmk SUBDIR+= lgrind +SUBDIR+= libcups SUBDIR+= libgxps SUBDIR+= libpaper SUBDIR+= libspectre diff --git a/print/cups-base/Makefile b/print/cups-base/Makefile index bbdcc93cbdd..7d397632418 100644 --- a/print/cups-base/Makefile +++ b/print/cups-base/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.33 2020/05/14 19:45:50 joerg Exp $ +# $NetBSD: Makefile,v 1.34 2020/05/16 18:07:56 maya Exp $ .include "../../print/cups/Makefile.common" DISTNAME= cups-${CUPS_VERS}-source PKGNAME= cups-base-${CUPS_VERS} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= print MASTER_SITES= ${MASTER_SITE_GITHUB:=apple/} @@ -137,6 +137,11 @@ post-extract: ${CP} ${FILESDIR}/cups.pam ${WRKDIR}/cups.pam post-install: + # Delete files installed by libcups + ${RM} ${DESTDIR}${PREFIX}/bin/cups-config + ${RM} -rf ${DESTDIR}${PREFIX}/lib + ${RM} -rf ${DESTDIR}${PREFIX}/include/cups + ${RM} -rf ${DESTDIR}${PREFIX}/share/locale set -e; for file in LICENSE README.md; do \ ${INSTALL_DATA} ${WRKSRC}/$${file} \ ${DESTDIR}${DOCDIR}/$${file}; \ @@ -157,6 +162,7 @@ post-install: .include "../../devel/zlib/buildlink3.mk" .include "../../graphics/png/buildlink3.mk" .include "../../graphics/tiff/buildlink3.mk" +.include "../../print/libcups/buildlink3.mk" .include "../../print/libpaper/buildlink3.mk" .include "../../security/gnutls/buildlink3.mk" .include "../../textproc/libunistring/buildlink3.mk" diff --git a/print/cups-base/PLIST b/print/cups-base/PLIST index 45d791b5090..c51a781e299 100644 --- a/print/cups-base/PLIST +++ b/print/cups-base/PLIST @@ -1,6 +1,5 @@ -@comment $NetBSD: PLIST,v 1.4 2019/11/17 21:22:03 leot Exp $ +@comment $NetBSD: PLIST,v 1.5 2020/05/16 18:07:56 maya Exp $ bin/cancel -bin/cups-config bin/cupstestppd bin/ippeveprinter ${PLIST.ippfind}bin/ippfind @@ -16,23 +15,6 @@ 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 @@ -781,14 +763,3 @@ 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/en/cups_en.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/print/cups-base/buildlink3.mk b/print/cups-base/buildlink3.mk index 2bd49ff9b21..d203cc1497a 100644 --- a/print/cups-base/buildlink3.mk +++ b/print/cups-base/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.13 2020/03/10 22:08:57 wiz Exp $ +# $NetBSD: buildlink3.mk,v 1.14 2020/05/16 18:07:56 maya Exp $ BUILDLINK_TREE+= cups-base @@ -27,6 +27,7 @@ pkgbase := cups-base .include "../../converters/libiconv/buildlink3.mk" .include "../../graphics/png/buildlink3.mk" .include "../../graphics/tiff/buildlink3.mk" +.include "../../print/libcups/buildlink3.mk" .include "../../security/gnutls/buildlink3.mk" .endif # CUPS_BASE_BUILDLINK3_MK diff --git a/print/libcups/DESCR b/print/libcups/DESCR new file mode 100644 index 00000000000..2827c489cfb --- /dev/null +++ b/print/libcups/DESCR @@ -0,0 +1,14 @@ +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 package consists of the library used for talking to CUPS. diff --git a/print/libcups/Makefile b/print/libcups/Makefile new file mode 100644 index 00000000000..1042022f75b --- /dev/null +++ b/print/libcups/Makefile @@ -0,0 +1,75 @@ +# $NetBSD: Makefile,v 1.1 2020/05/16 18:07:56 maya Exp $ + +.include "../../print/cups/Makefile.common" + +PKGNAME= libcups-${CUPS_VERS} +MASTER_SITES= ${MASTER_SITE_GITHUB:=apple/} + +MAINTAINER= sbd@NetBSD.org +COMMENT= Common UNIX Printing System library + +DISTINFO_FILE?= ${.CURDIR}/../../print/cups-base/distinfo +PATCHDIR?= ${.CURDIR}/../../print/cups-base/patches + +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-components=libcups +CONFIGURE_ARGS+= --enable-libpaper +CONFIGURE_ARGS+= --enable-ssl + +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 + +PKG_SYSCONFSUBDIR= cups +CUPS_CACHE= ${VARBASE}/cache/cups + +.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 + +pre-configure: + cd ${WRKSRC} && aclocal && autoconf + +.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/print/libcups/PLIST b/print/libcups/PLIST new file mode 100644 index 00000000000..8f536549830 --- /dev/null +++ b/print/libcups/PLIST @@ -0,0 +1,30 @@ +@comment $NetBSD: PLIST,v 1.1 2020/05/16 18:07:56 maya Exp $ +bin/cups-config +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 +share/locale/ca/cups_ca.po +share/locale/cs/cups_cs.po +share/locale/de/cups_de.po +share/locale/en/cups_en.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/print/libcups/buildlink3.mk b/print/libcups/buildlink3.mk new file mode 100644 index 00000000000..8d9f644e638 --- /dev/null +++ b/print/libcups/buildlink3.mk @@ -0,0 +1,33 @@ +# $NetBSD: buildlink3.mk,v 1.1 2020/05/16 18:07:56 maya Exp $ + +BUILDLINK_TREE+= libcups + +.if !defined(LIBCUPS_BUILDLINK3_MK) +LIBCUPS_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.libcups+= libcups>=1.1.19nb3 +BUILDLINK_ABI_DEPENDS.libcups+= libcups>=2.3.1nb3 +BUILDLINK_PKGSRCDIR.libcups?= ../../print/libcups + +pkgbase := libcups +.include "../../mk/pkg-build-options.mk" + +.if !empty(PKG_BUILD_OPTIONS.libcups:Mkerberos) +.include "../../mk/krb5.buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.libcups:Mdnssd) +.include "../../net/mDNSResponder/buildlink3.mk" +.endif + +.if ${OPSYS} != "Darwin" && !empty(PKG_BUILD_OPTIONS.libcups: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 # LIBCUPS_BUILDLINK3_MK + +BUILDLINK_TREE+= -libcups diff --git a/print/libcups/options.mk b/print/libcups/options.mk new file mode 100644 index 00000000000..5dd0dd8b804 --- /dev/null +++ b/print/libcups/options.mk @@ -0,0 +1,66 @@ +# $NetBSD: options.mk,v 1.1 2020/05/16 18:07:56 maya Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.libcups +PKG_SUPPORTED_OPTIONS= acl dnssd kerberos tcpwrappers +PKG_SUGGESTED_OPTIONS= dnssd kerberos + +.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" +# CUPS on Darwin does not support DBus and libusb +PKG_SUPPORTED_OPTIONS+= avahi dbus +PKG_SUGGESTED_OPTIONS+= dbus +.endif + +.include "../../mk/bsd.options.mk" + +.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 +.else +CONFIGURE_ARGS+= --disable-avahi +.endif + +.if !empty(PKG_OPTIONS:Mdbus) +. include "../../sysutils/dbus/buildlink3.mk" +CONFIGURE_ARGS+= --enable-dbus +.else +CONFIGURE_ARGS+= --disable-dbus +.endif + +.if !empty(PKG_OPTIONS:Mdnssd) +.include "../../net/mDNSResponder/buildlink3.mk" +CONFIGURE_ARGS+= --enable-dnssd +.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:Mtcpwrappers) +.include "../../security/tcp_wrappers/buildlink3.mk" +CONFIGURE_ARGS+= --enable-tcp-wrappers +.else +CONFIGURE_ARGS+= --disable-tcp-wrappers +.endif |