diff --git a/print/hplip/Makefile b/print/hplip/Makefile index ef4be4e5a530..0d022ca4609c 100644 --- a/print/hplip/Makefile +++ b/print/hplip/Makefile @@ -1,124 +1,125 @@ PORTNAME= hplip PORTVERSION= 3.23.8 +PORTREVISION= 1 CATEGORIES= print MASTER_SITES= SF MAINTAINER= tijl@FreeBSD.org COMMENT= Drivers and utilities for HP printers and All-in-One devices WWW= https://developers.hp.com/hp-linux-imaging-and-printing 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} \ ${PYTHON_PKGNAMEPREFIX}distro>=1.0.1:sysutils/py-distro@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}gobject3>=0:devel/py-gobject3@${PY_FLAVOR} USES= dos2unix jpeg libtool localbase pkgconfig python \ shebangfix USE_LDCONFIG= yes DOS2UNIX_FILES= fax/filters/cdmfax/jetlib.cpp \ scan/sane/OrbliteScan/LinuxCommon.h scan/sane/orblite.c SHEBANG_GLOB= *.py hpps pstotiff GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-cupsbackenddir=${PREFIX}/libexec/cups/backend \ --with-cupsfilterdir=${PREFIX}/libexec/cups/filter \ --with-icondir=${DESKTOPDIR} \ --with-systraydir=${PREFIX}/etc/xdg/autostart \ --with-mimedir=${PREFIX}/share/cups/mime \ --with-docdir=${DOCSDIR} \ --with-htmldir=${DOCSDIR} \ --with-drvdir=${PREFIX}/share/cups/drv \ --disable-imageProcessor-build \ --disable-qt4 CONFIGURE_ENV+= PYTHONINCLUDEDIR=${PYTHON_INCLUDEDIR} CPPFLAGS+= -I${PYTHON_INCLUDEDIR} INSTALL_TARGET= install-strip DEBUG_FLAGS+= -UNDEBUG -DHP_DEBUG -DHPIP_DEBUG -DHPMUD_DEBUG -DHTTP_DEBUG \ -DAVAHI_DEBUG -DBB_LEDM_DEBUG -DESCL_DEBUG -DHPAIO_DEBUG \ -DSCLPML_DEBUG OPTIONS_DEFINE= DOCS FAX NETWORK SCAN X11 XSANE OPTIONS_DEFAULT= NETWORK SCAN 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_RUN_DEPENDS= ${PY_PILLOW} SCAN_LIB_DEPENDS= libsane.so:graphics/sane-backends SCAN_CONFIGURE_ENABLE= scan-build NETWORK_DESC= Network/JetDirect support NETWORK_USES= ssl NETWORK_LIB_DEPENDS= libavahi-client.so:net/avahi-app \ libnetsnmp.so:net-mgmt/net-snmp NETWORK_CONFIGURE_ENABLE= network-build X11_DESC= Graphical User Interface (Qt) X11_CONFIGURE_ENABLE= gui-build qt5 X11_USES= pyqt:5 X11_USE= PYQT=pyqt5:run XSANE_DESC= Install XSane for scanning (implies SCAN) XSANE_IMPLIES= SCAN XSANE_RUN_DEPENDS= xsane:graphics/xsane post-patch: @${REINPLACE_CMD} \ -e 's,/usr/local,${PREFIX},g' \ ${WRKSRC}/base/g.py \ ${WRKSRC}/base/utils.py \ ${WRKSRC}/base/queues.py \ ${WRKSRC}/check.py \ ${WRKSRC}/common/utils.c \ ${WRKSRC}/doc/troubleshooting.html \ ${WRKSRC}/fax/backend/hpfax.py \ ${WRKSRC}/fax/filters/pstotiff \ ${WRKSRC}/FindPPD.cpp \ ${WRKSRC}/installer/core_install.py \ ${WRKSRC}/installer/pluginhandler.py \ ${WRKSRC}/logcapture.py \ ${WRKSRC}/prnt/hpps/hppsfilter.c \ ${WRKSRC}/prnt/cups.py \ ${WRKSRC}/prnt/hpijs/hpcupsfax.cpp \ ${WRKSRC}/prnt/hpijs/globals.cpp \ ${WRKSRC}/prnt/hpijs/foomatic-rip-hplip \ ${WRKSRC}/prnt/filters/hpps \ ${WRKSRC}/ui5/scandialog.py \ ${WRKSRC}/ui5/devmgr5.py \ post-install: ${RM} ${STAGEDIR}${PREFIX}/bin/hp-pkservice \ ${STAGEDIR}${PREFIX}/bin/hp-uninstall \ ${STAGEDIR}${PREFIX}/bin/hp-upgrade \ ${STAGEDIR}${DOCSDIR}/uninstalling.html \ ${STAGEDIR}${DOCSDIR}/upgrading.html \ ${STAGEDIR}${DATADIR}/dat2drv \ ${STAGEDIR}${DATADIR}/locatedriver \ ${STAGEDIR}${DATADIR}/pkservice.py \ ${STAGEDIR}${DATADIR}/uninstall.py \ ${STAGEDIR}${DATADIR}/upgrade.py ${MV} ${STAGEDIR}${PREFIX}/etc/hp/hplip.conf \ ${STAGEDIR}${PREFIX}/etc/hp/hplip.conf.sample ${MKDIR} ${STAGEDIR}/var/lib/hp post-install-X11-on: .for s in 16 32 64 128 256 ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${LN} ${STAGEDIR}${DATADIR}/data/images/${s}x${s}/hp_logo.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps .endfor .include diff --git a/print/hplip/files/patch-protocol_hp__ipp.c b/print/hplip/files/patch-protocol_hp__ipp.c new file mode 100644 index 000000000000..f25f08f88867 --- /dev/null +++ b/print/hplip/files/patch-protocol_hp__ipp.c @@ -0,0 +1,46 @@ +--- protocol/hp_ipp.c.orig 2023-09-13 04:07:44 UTC ++++ protocol/hp_ipp.c +@@ -108,9 +108,6 @@ int addCupsPrinter(char *name, char *device_uri, char + goto abort; + } + +- if ( info == NULL ) +- snprintf( info,sizeof(info), name ); +- + sprintf(printer_uri, "ipp://localhost/printers/%s", name); + + cupsSetUser("root"); +@@ -514,27 +511,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_ + + if ( strcmp(attr_name, "printer-name") == 0 && + val_tag == IPP_TAG_NAME ) { +- snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "device-uri") == 0 && + val_tag == IPP_TAG_URI ) { +- snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-uri-supported") == 0 && + val_tag == IPP_TAG_URI ) { +- snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-info") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->info,sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-location") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->location,sizeof(t_printer->location), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-make-and-model") == 0 && + val_tag == IPP_TAG_TEXT ) { +- snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) ); ++ snprintf(t_printer->make_model,sizeof(t_printer->make_model), "%s", ippGetString(attr, 0, NULL) ); + } + else if ( strcmp(attr_name, "printer-state") == 0 && + val_tag == IPP_TAG_ENUM ) {