1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/print/hplip/Makefile

158 lines
4.6 KiB
Makefile
Raw Normal View History

# Created by: amistry@am-productions.biz
# $FreeBSD$
PORTNAME= hplip
PORTVERSION= 3.17.11
Fix Qt5 symbol version scripts to put the catch-all clause first. When a symbol matches multiple clauses the last one takes precedence. If the catch-all is last it captures everything. In the case of Qt5 libraries this caused all symbols to have a Qt_5 label while some should have Qt_5_PRIVATE_API. This only affects lld because GNU ld always gives the catch-all lowest priority. Older versions of Qt5Webengine exported some memory allocation symbols from the bundled Chromium. Version 5.9 stopped exporting these [1] but the symbols were kept as weak wrappers for the standard allocation functions to maintain binary compatibility. [2][3] The problem is that the call to the standard function in these weak wrappers is only resolved to the standard function if there's a call to this standard function in other parts of Qt5Webengine, because only then is there a non-weak symbol that takes precedence over the weak one. If there's no such non-weak symbol the call in the weak wrapper resolves to the weak wrapper itself creating an infinite call loop that overflows the stack and causes a crash. Some of the allocation functions are variants of C++ new and delete and it probably depends on the compiler whether these variants are used in other parts of Qt5Webengine. Remove the weak wrappers (make them Linux specific). This isn't binary compatible but we are already breaking that with the changes to the symbol versions. [1] https://github.com/qt/qtwebengine/commit/5c2cbfccf9aafb547b0b30914c4056abd25942a4 [2] https://github.com/qt/qtwebengine/commit/2ed5054e3a800fa97c2c9e920ba1e6ea4b6ef2a5 [3] https://github.com/qt/qtwebengine/commit/009f5ebb4bd6e50188671e0815a5dae6afe39db5 Bump all ports that depend on Qt5. PR: 234070 Exp-run by: antoine Approved by: kde (adridg)
2019-01-16 11:13:44 +00:00
PORTREVISION= 2
CATEGORIES= print
MASTER_SITES= SF
MAINTAINER= woodsb02@FreeBSD.org
COMMENT= Drivers and utilities for HP printers and All-in-One devices
LICENSE= GPLv2+ MIT BSD3CLAUSE
LICENSE_COMB= multi
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libcupsimage.so:print/cups \
libdbus-1.so:devel/dbus
RUN_DEPENDS= cups-filters>=0:print/cups-filters \
${PYTHON_PKGNAMEPREFIX}dbus>=0:devel/py-dbus@${PY_FLAVOR}
CONFLICTS_INSTALL= hpijs-[0-9]*
INSTALL_TARGET= install-strip
USES= jpeg libtool pkgconfig python shebangfix
USE_GNOME= pygobject
USE_LDCONFIG= yes
SHEBANG_GLOB= *.py hpps pstotiff
GNU_CONFIGURE= yes
Combine print/cups-base, print/cups-client and print/cups-image into print/cups and update it to 2.1.3. Also remove print/cups-pstoraster, improve print/cups-filters, print/foomatic-* and update print/hplip to 3.16.2. Long description: First some background. When you hand a file to cups it sets up a chain of filter programs that converts the file to something a printer understands. Each filter has a cost associated with it and cups tries to find the cheapest chain. Costs used to be configured in such a way that files were first converted to PostScript. This could then be manipulated further (e.g. putting multiple pages on one sheet) before finally being sent to a PostScript printer or another filter like pstoraster which produces a raster format understood by non-PostScript printer drivers. Nowadays most filters have been moved from cups to cups-filters and they have been configured to use PDF as an intermediate format instead of PostScript. Merging of cups-base, cups-client and cups-image into print/cups: - cups-image provides a library to work with the cups raster format. It is only used to implement filters and printer drivers and these only exist in the context of a cups server so there's no need to separate this from cups-base. - cups-client provides a library that allows applications to print via cups. It is possible to use the library to access a remote cups server without running a local cups server, but such a setup is discouraged and the configuration file to set this up has been marked deprecated. It is better to run a local cups server and let that talk to the remote cups server because then you have the benefits of local job queuing in case the remote server is down or busy. Given this and the fact that without filters cups-base is now smaller than it used to be it makes sense to merge the ports. The patch also adds options IPPTOOL, DOCS and NLS which when disabled make the new cups package smaller than the current cups-client package. Merging the ports also prevents problems with options like ZEROCONF being configured differently in both ports. - print/cups was a metaport that depended on cups-base and some filters. There isn't really a need for such a metaport so cups-base can be renamed to cups. The filters can be depended on by printer drivers such as hplip if they need them. Additional changes to the new print/cups: - Clean up the patches. They seem to have been regenerated with post-patch changes included. - Add a patch to prevent intermediate conversion to PDF when a PostScript file is sent to a PostScript printer when cups-filters is installed. - Fix the PAM configuration file. - Add a patch to let the server search /usr/local/share/ppd like on Linux so other ports don't have to add links to it. - Remove ulpt(4) helper scripts. The port uses libusb with ugen(4). - Remove support for mDNSResponder. cups-filters only supports Avahi. - Combine ICONS and XDG_OPEN options into an X11 option to support WITHOUT_X11. - Optionally depend on colord for ICC profile support. - Various smaller changes. Changes to print/cups-filters: - Let the cups_browsed rc.d script depend on cupsd and avahi_daemon instead of LOGIN. - Development of foomatic-filters has been moved to cups-filters so let this port install foomatic related files and add foomatic-filters to CONFLICTS. - Fix location of liblouis tables. - Add patch to fix ICC support. Changes to print/cups-pstoraster: This port is essentially an old version of Ghostscript plus a cups filter. It's no longer developed. This commit removes it and changes existing dependencies to print/cups-filters which depends on print/ghostscript* and includes a gstoraster filter that can handle both PostScript and PDF. Changes to print/foomatic-db*: Remove old MASTER_SITES and dependencies and eliminate PKGNAMEPREFIX. Changes to print/foomatic-filters: Install beh backend with its original name again and add cups-filters to CONFLICTS. Changes to print/hplip: - Stop installing hpijs/foomatic-rip support. This is no longer supported upstream. - Stop installing hpcups PPDs. These are now automatically generated. The bundled PPDs are generated for an older version of cups. - Rename the QT option to X11 to support WITHOUT_X11. - Simplify the patches now that ports are installed in a staging area. - Add a patch to set SO_REUSEPORT (next to SO_REUSEADDR) on the mDNS socket like avahi-daemon does. This fixes Zeroconf support for HP network printers. PR: 207746 Exp-run by: antoine Approved by: portmgr (antoine)
2016-03-11 11:53:42 +00:00
CONFIGURE_ARGS= --with-cupsbackenddir=${PREFIX}/libexec/cups/backend \
--with-cupsfilterdir=${PREFIX}/libexec/cups/filter \
--with-icondir=${DESKTOPDIR} \
--with-systraydir=${PREFIX}/etc/xdg/autostart \
Combine print/cups-base, print/cups-client and print/cups-image into print/cups and update it to 2.1.3. Also remove print/cups-pstoraster, improve print/cups-filters, print/foomatic-* and update print/hplip to 3.16.2. Long description: First some background. When you hand a file to cups it sets up a chain of filter programs that converts the file to something a printer understands. Each filter has a cost associated with it and cups tries to find the cheapest chain. Costs used to be configured in such a way that files were first converted to PostScript. This could then be manipulated further (e.g. putting multiple pages on one sheet) before finally being sent to a PostScript printer or another filter like pstoraster which produces a raster format understood by non-PostScript printer drivers. Nowadays most filters have been moved from cups to cups-filters and they have been configured to use PDF as an intermediate format instead of PostScript. Merging of cups-base, cups-client and cups-image into print/cups: - cups-image provides a library to work with the cups raster format. It is only used to implement filters and printer drivers and these only exist in the context of a cups server so there's no need to separate this from cups-base. - cups-client provides a library that allows applications to print via cups. It is possible to use the library to access a remote cups server without running a local cups server, but such a setup is discouraged and the configuration file to set this up has been marked deprecated. It is better to run a local cups server and let that talk to the remote cups server because then you have the benefits of local job queuing in case the remote server is down or busy. Given this and the fact that without filters cups-base is now smaller than it used to be it makes sense to merge the ports. The patch also adds options IPPTOOL, DOCS and NLS which when disabled make the new cups package smaller than the current cups-client package. Merging the ports also prevents problems with options like ZEROCONF being configured differently in both ports. - print/cups was a metaport that depended on cups-base and some filters. There isn't really a need for such a metaport so cups-base can be renamed to cups. The filters can be depended on by printer drivers such as hplip if they need them. Additional changes to the new print/cups: - Clean up the patches. They seem to have been regenerated with post-patch changes included. - Add a patch to prevent intermediate conversion to PDF when a PostScript file is sent to a PostScript printer when cups-filters is installed. - Fix the PAM configuration file. - Add a patch to let the server search /usr/local/share/ppd like on Linux so other ports don't have to add links to it. - Remove ulpt(4) helper scripts. The port uses libusb with ugen(4). - Remove support for mDNSResponder. cups-filters only supports Avahi. - Combine ICONS and XDG_OPEN options into an X11 option to support WITHOUT_X11. - Optionally depend on colord for ICC profile support. - Various smaller changes. Changes to print/cups-filters: - Let the cups_browsed rc.d script depend on cupsd and avahi_daemon instead of LOGIN. - Development of foomatic-filters has been moved to cups-filters so let this port install foomatic related files and add foomatic-filters to CONFLICTS. - Fix location of liblouis tables. - Add patch to fix ICC support. Changes to print/cups-pstoraster: This port is essentially an old version of Ghostscript plus a cups filter. It's no longer developed. This commit removes it and changes existing dependencies to print/cups-filters which depends on print/ghostscript* and includes a gstoraster filter that can handle both PostScript and PDF. Changes to print/foomatic-db*: Remove old MASTER_SITES and dependencies and eliminate PKGNAMEPREFIX. Changes to print/foomatic-filters: Install beh backend with its original name again and add cups-filters to CONFLICTS. Changes to print/hplip: - Stop installing hpijs/foomatic-rip support. This is no longer supported upstream. - Stop installing hpcups PPDs. These are now automatically generated. The bundled PPDs are generated for an older version of cups. - Rename the QT option to X11 to support WITHOUT_X11. - Simplify the patches now that ports are installed in a staging area. - Add a patch to set SO_REUSEPORT (next to SO_REUSEADDR) on the mDNS socket like avahi-daemon does. This fixes Zeroconf support for HP network printers. PR: 207746 Exp-run by: antoine Approved by: portmgr (antoine)
2016-03-11 11:53:42 +00:00
--with-mimedir=${PREFIX}/share/cups/mime \
--with-docdir=${DOCSDIR} \
2014-01-23 08:39:00 +00:00
--with-htmldir=${DOCSDIR} \
--with-drvdir=${PREFIX}/share/cups/drv
CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= DOCS FAX SCAN SNMP X11 XSANE
OPTIONS_RADIO= GUI
OPTIONS_RADIO_GUI= QT4 QT5
OPTIONS_DEFAULT= QT5 SCAN SNMP X11
OPTIONS_SUB= yes
DOCS_CONFIGURE_ENABLE= doc-build
FAX_DESC= PC Send Fax support
FAX_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}reportlab>=0:print/py-reportlab@${PY_FLAVOR}
FAX_CONFIGURE_ENABLE= fax-build
SCAN_DESC= Scanning support
SCAN_LIB_DEPENDS= libsane.so:graphics/sane-backends
SCAN_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR}
SCAN_CONFIGURE_ENABLE= scan-build
SNMP_DESC= Network/JetDirect support
SNMP_USES= ssl
SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
SNMP_CONFIGURE_ENABLE= network-build
X11_DESC= Graphical User Interface (Qt)
X11_CONFIGURE_ENABLE= gui-build
XSANE_DESC= Install XSane for scanning (implies SCAN)
XSANE_IMPLIES= SCAN
XSANE_RUN_DEPENDS= xsane:graphics/xsane
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MQT4} && ${PORT_OPTIONS:MX11}
DEPRECATED= Qt4 has been EOL since december 2015
EXPIRATION_DATE= 2019-03-15
USES+= pyqt:4
USE_PYQT= core_run dbussupport_run gui_run sip
CONFIGURE_ARGS+= --enable-qt4
.else
CONFIGURE_ARGS+= --disable-qt4
.endif
.if ${PORT_OPTIONS:MQT5} && ${PORT_OPTIONS:MX11}
USES+= pyqt:5
USE_PYQT= core_run dbussupport_run gui_run sip widgets_run
CONFIGURE_ARGS+= --enable-qt5
.else
CONFIGURE_ARGS+= --disable-qt5
.endif
.if ${PORT_OPTIONS:MX11} && ! ${PORT_OPTIONS:MQT4} && ! ${PORT_OPTIONS:MQT5}
BROKEN= The X11 option requires one of the QT4 or QT5 options
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-ldld||g;' \
-e 's|-ldl||g' \
-e 's,-lusb-1.0,-lusb,g' \
-e 's,libusb-1.0/libusb.h,libusb.h,g' \
${WRKSRC}/configure \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e '/[[:space:]]install-dist_rulesDATA/ s,install-dist_rulesDATA,,' \
2013-07-13 17:50:03 +00:00
-e '/[[:space:]]install-dist_rulessystemDATA/ s,install-dist_rulessystemDATA,,' \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's,/etc/hp,${PREFIX}&,g' \
-e 's,/etc/cups,${LOCALBASE}&,g' \
-e 's,/etc/init.d,${LOCALBASE}/etc/rc.d,g' \
-e 's,/etc/sane.d,${LOCALBASE}&,g' \
-e 's,/usr/share,${LOCALBASE}/share,g' \
-e 's,/usr/include,${LOCALBASE}/include,g' \
${WRKSRC}/Makefile.in \
${WRKSRC}/base/codes.py \
${WRKSRC}/base/g.py \
${WRKSRC}/base/password.py \
${WRKSRC}/base/pkit.py \
${WRKSRC}/base/queues.py \
${WRKSRC}/base/services.py \
${WRKSRC}/base/utils.py \
${WRKSRC}/check.py \
${WRKSRC}/fax/backend/hpfax.py \
${WRKSRC}/fax/coverpages.py \
${WRKSRC}/fax/filters/pstotiff \
${WRKSRC}/hplip.list.in \
${WRKSRC}/installer/core_install.py \
${WRKSRC}/installer/dcheck.py \
${WRKSRC}/installer/pluginhandler.py \
${WRKSRC}/logcapture.py \
${WRKSRC}/prnt/cups.py \
${WRKSRC}/prnt/filters/hpps \
${WRKSRC}/prnt/hpcups/HPCupsFilter.cpp \
${WRKSRC}/prnt/hpijs/globals.cpp \
${WRKSRC}/prnt/hpijs/hpcupsfax.cpp \
${WRKSRC}/prnt/hpijs/hpijs.cpp \
${WRKSRC}/ui/devmgr4.py \
${WRKSRC}/ui4/devmgr5.py \
${WRKSRC}/ui5/devmgr5.py
Combine print/cups-base, print/cups-client and print/cups-image into print/cups and update it to 2.1.3. Also remove print/cups-pstoraster, improve print/cups-filters, print/foomatic-* and update print/hplip to 3.16.2. Long description: First some background. When you hand a file to cups it sets up a chain of filter programs that converts the file to something a printer understands. Each filter has a cost associated with it and cups tries to find the cheapest chain. Costs used to be configured in such a way that files were first converted to PostScript. This could then be manipulated further (e.g. putting multiple pages on one sheet) before finally being sent to a PostScript printer or another filter like pstoraster which produces a raster format understood by non-PostScript printer drivers. Nowadays most filters have been moved from cups to cups-filters and they have been configured to use PDF as an intermediate format instead of PostScript. Merging of cups-base, cups-client and cups-image into print/cups: - cups-image provides a library to work with the cups raster format. It is only used to implement filters and printer drivers and these only exist in the context of a cups server so there's no need to separate this from cups-base. - cups-client provides a library that allows applications to print via cups. It is possible to use the library to access a remote cups server without running a local cups server, but such a setup is discouraged and the configuration file to set this up has been marked deprecated. It is better to run a local cups server and let that talk to the remote cups server because then you have the benefits of local job queuing in case the remote server is down or busy. Given this and the fact that without filters cups-base is now smaller than it used to be it makes sense to merge the ports. The patch also adds options IPPTOOL, DOCS and NLS which when disabled make the new cups package smaller than the current cups-client package. Merging the ports also prevents problems with options like ZEROCONF being configured differently in both ports. - print/cups was a metaport that depended on cups-base and some filters. There isn't really a need for such a metaport so cups-base can be renamed to cups. The filters can be depended on by printer drivers such as hplip if they need them. Additional changes to the new print/cups: - Clean up the patches. They seem to have been regenerated with post-patch changes included. - Add a patch to prevent intermediate conversion to PDF when a PostScript file is sent to a PostScript printer when cups-filters is installed. - Fix the PAM configuration file. - Add a patch to let the server search /usr/local/share/ppd like on Linux so other ports don't have to add links to it. - Remove ulpt(4) helper scripts. The port uses libusb with ugen(4). - Remove support for mDNSResponder. cups-filters only supports Avahi. - Combine ICONS and XDG_OPEN options into an X11 option to support WITHOUT_X11. - Optionally depend on colord for ICC profile support. - Various smaller changes. Changes to print/cups-filters: - Let the cups_browsed rc.d script depend on cupsd and avahi_daemon instead of LOGIN. - Development of foomatic-filters has been moved to cups-filters so let this port install foomatic related files and add foomatic-filters to CONFLICTS. - Fix location of liblouis tables. - Add patch to fix ICC support. Changes to print/cups-pstoraster: This port is essentially an old version of Ghostscript plus a cups filter. It's no longer developed. This commit removes it and changes existing dependencies to print/cups-filters which depends on print/ghostscript* and includes a gstoraster filter that can handle both PostScript and PDF. Changes to print/foomatic-db*: Remove old MASTER_SITES and dependencies and eliminate PKGNAMEPREFIX. Changes to print/foomatic-filters: Install beh backend with its original name again and add cups-filters to CONFLICTS. Changes to print/hplip: - Stop installing hpijs/foomatic-rip support. This is no longer supported upstream. - Stop installing hpcups PPDs. These are now automatically generated. The bundled PPDs are generated for an older version of cups. - Rename the QT option to X11 to support WITHOUT_X11. - Simplify the patches now that ports are installed in a staging area. - Add a patch to set SO_REUSEPORT (next to SO_REUSEADDR) on the mDNS socket like avahi-daemon does. This fixes Zeroconf support for HP network printers. PR: 207746 Exp-run by: antoine Approved by: portmgr (antoine)
2016-03-11 11:53:42 +00:00
@${REINPLACE_CMD} -e 's/umask(0)/umask(0o022)/' \
-e 's/umask(0o111)/umask(0o133)/' \
${WRKSRC}/base/os_utils.py \
${WRKSRC}/base/validation.py \
${WRKSRC}/fax/backend/hpfax.py \
${WRKSRC}/hpdio.py \
${WRKSRC}/installer/pluginhandler.py
post-install:
Combine print/cups-base, print/cups-client and print/cups-image into print/cups and update it to 2.1.3. Also remove print/cups-pstoraster, improve print/cups-filters, print/foomatic-* and update print/hplip to 3.16.2. Long description: First some background. When you hand a file to cups it sets up a chain of filter programs that converts the file to something a printer understands. Each filter has a cost associated with it and cups tries to find the cheapest chain. Costs used to be configured in such a way that files were first converted to PostScript. This could then be manipulated further (e.g. putting multiple pages on one sheet) before finally being sent to a PostScript printer or another filter like pstoraster which produces a raster format understood by non-PostScript printer drivers. Nowadays most filters have been moved from cups to cups-filters and they have been configured to use PDF as an intermediate format instead of PostScript. Merging of cups-base, cups-client and cups-image into print/cups: - cups-image provides a library to work with the cups raster format. It is only used to implement filters and printer drivers and these only exist in the context of a cups server so there's no need to separate this from cups-base. - cups-client provides a library that allows applications to print via cups. It is possible to use the library to access a remote cups server without running a local cups server, but such a setup is discouraged and the configuration file to set this up has been marked deprecated. It is better to run a local cups server and let that talk to the remote cups server because then you have the benefits of local job queuing in case the remote server is down or busy. Given this and the fact that without filters cups-base is now smaller than it used to be it makes sense to merge the ports. The patch also adds options IPPTOOL, DOCS and NLS which when disabled make the new cups package smaller than the current cups-client package. Merging the ports also prevents problems with options like ZEROCONF being configured differently in both ports. - print/cups was a metaport that depended on cups-base and some filters. There isn't really a need for such a metaport so cups-base can be renamed to cups. The filters can be depended on by printer drivers such as hplip if they need them. Additional changes to the new print/cups: - Clean up the patches. They seem to have been regenerated with post-patch changes included. - Add a patch to prevent intermediate conversion to PDF when a PostScript file is sent to a PostScript printer when cups-filters is installed. - Fix the PAM configuration file. - Add a patch to let the server search /usr/local/share/ppd like on Linux so other ports don't have to add links to it. - Remove ulpt(4) helper scripts. The port uses libusb with ugen(4). - Remove support for mDNSResponder. cups-filters only supports Avahi. - Combine ICONS and XDG_OPEN options into an X11 option to support WITHOUT_X11. - Optionally depend on colord for ICC profile support. - Various smaller changes. Changes to print/cups-filters: - Let the cups_browsed rc.d script depend on cupsd and avahi_daemon instead of LOGIN. - Development of foomatic-filters has been moved to cups-filters so let this port install foomatic related files and add foomatic-filters to CONFLICTS. - Fix location of liblouis tables. - Add patch to fix ICC support. Changes to print/cups-pstoraster: This port is essentially an old version of Ghostscript plus a cups filter. It's no longer developed. This commit removes it and changes existing dependencies to print/cups-filters which depends on print/ghostscript* and includes a gstoraster filter that can handle both PostScript and PDF. Changes to print/foomatic-db*: Remove old MASTER_SITES and dependencies and eliminate PKGNAMEPREFIX. Changes to print/foomatic-filters: Install beh backend with its original name again and add cups-filters to CONFLICTS. Changes to print/hplip: - Stop installing hpijs/foomatic-rip support. This is no longer supported upstream. - Stop installing hpcups PPDs. These are now automatically generated. The bundled PPDs are generated for an older version of cups. - Rename the QT option to X11 to support WITHOUT_X11. - Simplify the patches now that ports are installed in a staging area. - Add a patch to set SO_REUSEPORT (next to SO_REUSEADDR) on the mDNS socket like avahi-daemon does. This fixes Zeroconf support for HP network printers. PR: 207746 Exp-run by: antoine Approved by: portmgr (antoine)
2016-03-11 11:53:42 +00:00
${MV} ${STAGEDIR}${PREFIX}/etc/hp/hplip.conf \
${STAGEDIR}${PREFIX}/etc/hp/hplip.conf.sample
${MKDIR} ${STAGEDIR}${DATADIR}/ui4/plugins
${MKDIR} ${STAGEDIR}/var/lib/hp
post-install-SCAN-on:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/sane.d/dll.d
${MV} ${STAGEDIR}${PREFIX}/etc/sane.d/dll.conf \
${STAGEDIR}${PREFIX}/etc/sane.d/dll.d/hpaio
.include <bsd.port.mk>