Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2012 06:16:12 GMT
From:      Anish Mistry <amistry@am-productions.biz>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/173827: Update Port: print/hplip to 3.12.10a
Message-ID:  <201211220616.qAM6GCdR083280@red.freebsd.org>
Resent-Message-ID: <201211220620.qAM6K07l067985@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         173827
>Category:       ports
>Synopsis:       Update Port: print/hplip to 3.12.10a
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 22 06:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Anish Mistry
>Release:        8.2-RELEASE-p1 amd64
>Organization:
>Environment:
FreeBSD bigguy.am-productions.biz 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Tue May 10 20:58:55 EDT 2011     amistry@bigguy.am-productions.biz:/usr/home/amistry/storage/temp/usr/src/sys/BIGGUY  amd64
>Description:
This is a partial update to 3.12.10a.  I haven't regenerated the pkg-plist due to time constraints, but wanted to get this code out there since some people are probably going to be buying/receiving new printers that are supported by this driver.
>How-To-Repeat:
Try to use the current version of hplip with an Officejet 6700.  It doesn't contain the drivers.
>Fix:
Attached patch.

Patch attached with submission follows:

diff -ruN hplip.orig/Makefile hplip/Makefile
--- hplip.orig/Makefile	2012-11-21 21:33:45.000000000 -0500
+++ hplip/Makefile	2012-11-22 00:50:06.000000000 -0500
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	hplip
-PORTVERSION=	3.12.2
-PORTREVISION=	2
+PORTVERSION=	3.12.10a
 CATEGORIES=	print
 MASTER_SITES=	SF
 
@@ -34,6 +33,8 @@
 CONFIGURE_ARGS=	--enable-foomatic-ppd-install \
 		--enable-foomatic-rip-hplip-install \
 		--enable-hpijs-install \
+		--enable-cups-ppd-install \
+		--enable-libusb01_build \
 		--with-cupsbackenddir=${PREFIX}/libexec/cups/backend \
 		--with-cupsfilterdir=${PREFIX}/libexec/cups/filter \
 		--with-icondir=${DESKTOPDIR} \
@@ -162,6 +163,7 @@
 		-e 's,/etc/sane.d,${LOCALBASE}&,g' \
 		-e 's,/usr/share,${LOCALBASE}/share,g' \
 		-e 's,/usr/include,${LOCALBASE}/include,g' \
+		-e 's,/usr/bin,${LOCALBASE}/bin,g' \
 		${FILES4FIX:S,^,${WRKSRC}/,}
 	${REINPLACE_CMD} -e 's,%USB_INCLUDE%,${USB_INCLUDE},' \
 		${WRKSRC}/installer/core_install.py
diff -ruN hplip.orig/distinfo hplip/distinfo
--- hplip.orig/distinfo	2012-11-21 21:33:45.000000000 -0500
+++ hplip/distinfo	2012-11-21 21:36:38.000000000 -0500
@@ -1,2 +1,2 @@
-SHA256 (hplip-3.12.2.tar.gz) = 6eaa0cc6f255cc3ebeddb73dee208e6bdc22ba467e3b1da943844ae266d3c314
-SIZE (hplip-3.12.2.tar.gz) = 20579749
+SHA256 (hplip-3.12.10a.tar.gz) = 616a30f260407f959874d35d351eaf73c74f7f8f016a7826286c88d923a4b1fc
+SIZE (hplip-3.12.10a.tar.gz) = 21827613
diff -ruN hplip.orig/files/patch-Makefile.in hplip/files/patch-Makefile.in
--- hplip.orig/files/patch-Makefile.in	2012-11-21 21:33:45.000000000 -0500
+++ hplip/files/patch-Makefile.in	2012-11-21 22:07:55.000000000 -0500
@@ -1,49 +1,83 @@
---- ./Makefile.in.orig	2011-12-09 11:23:55.000000000 +0000
-+++ ./Makefile.in	2012-01-14 20:21:23.105509188 +0000
-@@ -90,8 +90,8 @@
- # ip library
- @HPLIP_BUILD_TRUE@am__append_1 = libhpmud.la libhpip.la
+--- Makefile.in.orig	2012-10-10 02:16:15.000000000 -0400
++++ Makefile.in	2012-11-21 22:06:31.000000000 -0500
+@@ -93,10 +93,10 @@
+ @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_TRUE@am__append_2 = -lusb
+ @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@am__append_3 = -lusb-1.0
  @HPLIP_BUILD_TRUE@hp_mkuri_PROGRAMS = hp-mkuri$(EXEEXT)
--@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_TRUE@am__append_2 = data/rules/40-hplip.rules
--@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_FALSE@am__append_3 = data/rules/55-hpmud.rules
-+#@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_TRUE@am__append_2 = data/rules/40-hplip.rules
-+#@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_FALSE@am__append_3 = data/rules/55-hpmud.rules
- @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_4 =  \
+-@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_TRUE@@UDEV_SYSFS_RULES_TRUE@am__append_4 = data/rules/40-hplip_sysfs.rules
+-@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_FALSE@@UDEV_SYSFS_RULES_TRUE@am__append_5 = data/rules/55-hpmud_sysfs.rules
+-@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_TRUE@@UDEV_SYSFS_RULES_FALSE@am__append_6 = data/rules/40-hplip.rules
+-@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_FALSE@@UDEV_SYSFS_RULES_FALSE@am__append_7 = data/rules/55-hpmud.rules
++#@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_TRUE@@UDEV_SYSFS_RULES_TRUE@am__append_4 = data/rules/40-hplip_sysfs.rules
++#@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_FALSE@@UDEV_SYSFS_RULES_TRUE@am__append_5 = data/rules/55-hpmud_sysfs.rules
++#@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_TRUE@@UDEV_SYSFS_RULES_FALSE@am__append_6 = data/rules/40-hplip.rules
++#@HPLIP_BUILD_TRUE@@UDEV_ACL_RULES_FALSE@@UDEV_SYSFS_RULES_FALSE@am__append_7 = data/rules/55-hpmud.rules
+ @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_8 =  \
  @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@	scan/sane/hpaio.desc \
  @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@	prnt/drv/hpijs.drv.in.template \
-@@ -2214,9 +2214,9 @@
+@@ -2330,15 +2330,15 @@
  	ppd/hpcups/hp-psc_950vr.ppd.gz ppd/hpcups/hp-psc_950xi.ppd.gz
  am__dist_prnt_DATA_DIST = prnt/cups.py prnt/__init__.py prnt/ldl.py \
  	prnt/pcl.py prnt/colorcal.py
 -am__dist_rules_DATA_DIST = data/rules/56-hpmud_support.rules \
--	data/rules/86-hpmud_plugin.rules data/rules/40-hplip.rules \
--	data/rules/55-hpmud.rules
+-	data/rules/86-hpmud_plugin.rules \
+-	data/rules/56-hpmud_add_printer.rules \
+-	data/rules/40-hplip.rules data/rules/55-hpmud.rules \
+-	data/rules/56-hpmud_support_sysfs.rules \
+-	data/rules/86-hpmud_plugin_sysfs.rules \
+-	data/rules/56-hpmud_add_printer_sysfs.rules \
+-	data/rules/40-hplip_sysfs.rules \
+-	data/rules/55-hpmud_sysfs.rules
 +#am__dist_rules_DATA_DIST = data/rules/56-hpmud_support.rules \
-+#	data/rules/86-hpmud_plugin.rules data/rules/40-hplip.rules \
-+#	data/rules/55-hpmud.rules
++#	data/rules/86-hpmud_plugin.rules \
++#	data/rules/56-hpmud_add_printer.rules \
++#	data/rules/40-hplip.rules data/rules/55-hpmud.rules \
++#	data/rules/56-hpmud_support_sysfs.rules \
++#	data/rules/86-hpmud_plugin_sysfs.rules \
++#	data/rules/56-hpmud_add_printer_sysfs.rules \
++#	data/rules/40-hplip_sysfs.rules \
++#	data/rules/55-hpmud_sysfs.rules
  am__dist_scan_DATA_DIST = scan/__init__.py scan/sane.py
  am__dist_ui_DATA_DIST = ui/alignform.py ui/colorcalform_base.py \
  	ui/colorcalform.py ui/coloradjform_base.py ui/coloradjform.py \
-@@ -4106,12 +4106,12 @@
- @HPLIP_BUILD_TRUE@hp_mkuri_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
+@@ -4353,21 +4353,21 @@
+ @HPLIP_BUILD_TRUE@dist_cron_DATA = data/rules/hplip_cron
  
  # hpmud.rules
 -@HPLIP_BUILD_TRUE@rulesdir = /etc/udev/rules.d
--@HPLIP_BUILD_TRUE@dist_rules_DATA = data/rules/56-hpmud_support.rules \
--@HPLIP_BUILD_TRUE@	data/rules/86-hpmud_plugin.rules \
--@HPLIP_BUILD_TRUE@	$(am__append_2) $(am__append_3)
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@dist_rules_DATA = data/rules/56-hpmud_support.rules \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@	data/rules/86-hpmud_plugin.rules \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@	data/rules/56-hpmud_add_printer.rules \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@	$(am__append_6) \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@	$(am__append_7)
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@dist_rules_DATA = data/rules/56-hpmud_support_sysfs.rules \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	data/rules/86-hpmud_plugin_sysfs.rules \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	data/rules/56-hpmud_add_printer_sysfs.rules \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	$(am__append_4) \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	$(am__append_5) \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	$(am__append_6) \
+-@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	$(am__append_7)
 -@HPLIP_BUILD_TRUE@halpredir = /usr/share/hal/fdi/preprobe/10osvendor
 -@HPLIP_BUILD_TRUE@dist_halpre_DATA = data/rules/20-hplip-devices.fdi
-+#@HPLIP_BUILD_TRUE@rulesdir = /etc/udev/rules.d
-+#@HPLIP_BUILD_TRUE@dist_rules_DATA = data/rules/56-hpmud_support.rules \
-+#@HPLIP_BUILD_TRUE@	data/rules/86-hpmud_plugin.rules \
-+#@HPLIP_BUILD_TRUE@	$(am__append_2) $(am__append_3)
-+#@HPLIP_BUILD_TRUE@halpredir = /usr/share/hal/fdi/preprobe/10osvendor
-+#@HPLIP_BUILD_TRUE@dist_halpre_DATA = data/rules/20-hplip-devices.fdi
++# @HPLIP_BUILD_TRUE@rulesdir = /etc/udev/rules.d
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@dist_rules_DATA = data/rules/56-hpmud_support.rules \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@	data/rules/86-hpmud_plugin.rules \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@	data/rules/56-hpmud_add_printer.rules \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@	$(am__append_6) \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@	$(am__append_7)
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@dist_rules_DATA = data/rules/56-hpmud_support_sysfs.rules \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	data/rules/86-hpmud_plugin_sysfs.rules \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	data/rules/56-hpmud_add_printer_sysfs.rules \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	$(am__append_4) \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	$(am__append_5) \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	$(am__append_6) \
++# @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@	$(am__append_7)
++# @HPLIP_BUILD_TRUE@halpredir = /usr/share/hal/fdi/preprobe/10osvendor
++# @HPLIP_BUILD_TRUE@dist_halpre_DATA = data/rules/20-hplip-devices.fdi
  
  # hplip.conf
  @HPLIP_BUILD_TRUE@hplip_confdir = /etc/hp
-@@ -4169,14 +4169,14 @@
+@@ -4428,14 +4428,14 @@
  
  # data
  @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@modelsdir = $(hplipdir)/data/models
@@ -66,7 +100,7 @@
  @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@pcldir = $(hplipdir)/data/pcl
  @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@ldldir = $(hplipdir)/data/ldl
  @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@postscriptdir = $(hplipdir)/data/ps
-@@ -8581,12 +8581,12 @@
+@@ -8894,20 +8894,20 @@
  
  
  install-dist_hplip_LogDATA:
@@ -83,5 +117,19 @@
 +#@HPLIP_BUILD_TRUE@	chgrp "lp" -R $(DESTDIR)$(hplip_Logdir)
 +#@HPLIP_BUILD_TRUE@	chmod 774 $(DESTDIR)$(hplip_Logdir)
  
- install-data-hook:
- #	   If scanner build, add hpaio entry to sane dll.conf.
+ install-dist_hplip_tmpDATA:
+-@FULL_BUILD_TRUE@	test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
+-@FULL_BUILD_TRUE@	chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
+-@FULL_BUILD_TRUE@	chmod 1774 $(DESTDIR)$(hplip_tmpdir)
+-@HPLIP_BUILD_TRUE@	test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
+-@HPLIP_BUILD_TRUE@	chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
+-@HPLIP_BUILD_TRUE@	chmod 1774 $(DESTDIR)$(hplip_tmpdir)
++# @FULL_BUILD_TRUE@	test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
++# @FULL_BUILD_TRUE@	chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
++# @FULL_BUILD_TRUE@	chmod 1774 $(DESTDIR)$(hplip_tmpdir)
++# @HPLIP_BUILD_TRUE@	test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
++# @HPLIP_BUILD_TRUE@	chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
++# @HPLIP_BUILD_TRUE@	chmod 1774 $(DESTDIR)$(hplip_tmpdir)
+ 
+ install-dist_cronDATA:$(dist_cron_DATA)
+ 	test -z "$(DESTDIR)$(crondir)" || $(MKDIR_P) "$(DESTDIR)$(crondir)"; \
diff -ruN hplip.orig/files/patch-base__utils.py hplip/files/patch-base__utils.py
--- hplip.orig/files/patch-base__utils.py	2012-11-21 21:33:45.000000000 -0500
+++ hplip/files/patch-base__utils.py	2012-11-21 21:42:54.000000000 -0500
@@ -1,13 +1,13 @@
---- ./base/utils.py.orig	2011-05-14 22:26:06.000000000 +0400
-+++ ./base/utils.py	2011-07-04 11:57:33.000000000 +0400
-@@ -840,8 +840,8 @@
+--- base/utils.py.orig	2012-11-21 21:40:54.000000000 -0500
++++ base/utils.py	2012-11-21 21:42:16.000000000 -0500
+@@ -881,8 +881,8 @@
+         if not f(x): return False
      return True
  
- 
--BROWSERS = ['firefox', 'mozilla', 'konqueror', 'galeon', 'skipstone'] # in preferred order
--BROWSER_OPTS = {'firefox': '-new-window', 'mozilla' : '', 'konqueror': '', 'galeon': '-w', 'skipstone': ''}
-+BROWSERS = ['xdg-open', 'firefox', 'mozilla', 'konqueror', 'galeon', 'skipstone'] # in preferred order
-+BROWSER_OPTS = {'xdg-open': '','firefox': '-new-window', 'mozilla' : '', 'konqueror': '', 'galeon': '-w', 'skipstone': ''}
+-BROWSERS = ['firefox', 'mozilla', 'konqueror', 'epiphany', 'skipstone'] # in preferred order
+-BROWSER_OPTS = {'firefox': '-new-tab', 'mozilla': '', 'konqueror': '', 'epiphany': '--new-tab', 'skipstone': ''}
++BROWSERS = ['xdg-open', 'firefox', 'mozilla', 'konqueror', 'epiphany', 'skipstone'] # in preferred order
++BROWSER_OPTS = {'xdg-open': '', 'firefox': '-new-tab', 'mozilla': '', 'konqueror': '', 'epiphany': '--new-tab', 'skipstone': ''}
  
  
  def find_browser():
diff -ruN hplip.orig/files/patch-core_install.py hplip/files/patch-core_install.py
--- hplip.orig/files/patch-core_install.py	2012-11-21 21:33:45.000000000 -0500
+++ hplip/files/patch-core_install.py	2012-11-21 21:46:29.000000000 -0500
@@ -1,11 +1,52 @@
---- ./installer/core_install.py.orig	2010-08-26 02:29:22.000000000 +0400
-+++ ./installer/core_install.py	2010-08-26 02:30:22.429959790 +0400
-@@ -833,7 +833,7 @@
-         if not check_lib('libusb'):
-             return False
+--- installer/core_install.py.orig	2012-11-21 21:43:00.000000000 -0500
++++ installer/core_install.py	2012-11-21 21:45:41.000000000 -0500
+@@ -1,4 +1,4 @@
+-# -*- coding: utf-8 -*-
++# -*- coding: utf-8 -*-
+ #
+ # (c) Copyright 2003-2009 Hewlett-Packard Development Company, L.P.
+ #
+@@ -885,14 +885,14 @@
+             if not check_lib('libusb'):
+                 return False
+             if self.distro_name != "rhel":
+-                return len(locate_file_contains("usb.h", '/usr/include', 'usb_init'))
++                return len(locate_file_contains("usb.h", '%USB_INCLUDE%', 'usb_init'))
+             else:
+                 return True
+         else:
+             if not check_lib('libusb-1.0'):
+                 return False
+             if self.distro_name != "rhel":
+-                return len(locate_file_contains("libusb.h", '/usr/include/libusb-1.0', 'libusb_init'))
++                return len(locate_file_contains("libusb.h", '%USB_INCLUDE%/libusb-1.0', 'libusb_init'))
+             else:
+                 return True
  
--        return len(locate_file_contains("usb.h", '/usr/include', 'usb_init(void)'))
-+        return len(locate_file_contains("usb.h", '%USB_INCLUDE%', 'usb_init(void)'))
+@@ -958,7 +958,7 @@
  
  
-     def check_libjpeg(self):
+     def check_sane_devel(self):
+-        return len(locate_file_contains("sane.h", '/usr/include', 'extern SANE_Status sane_init'))
++        return len(locate_file_contains("sane.h", '%USB_INCLUDE%', 'extern SANE_Status sane_init'))
+ 
+ 
+     def check_xsane(self):
+@@ -1061,7 +1061,7 @@
+     def check_dbus(self):
+         log.debug("Checking for dbus running and header files present (dbus-devel)...")
+         return check_ps(['dbus-daemon'])  and \
+-            len(locate_file_contains("dbus-message.h", '/usr/include', 'dbus_message_new_signal'))
++            len(locate_file_contains("dbus-message.h", '%USB_INCLUDE%', 'dbus_message_new_signal'))
+ 
+ 
+     def check_cups_devel(self):
+@@ -1079,7 +1079,7 @@
+ 
+ 
+     def check_cups_image(self):
+-      return check_file("raster.h", "/usr/include/cups")
++      return check_file("raster.h", "%USB_INCLUDE%/cups")
+ 
+ 
+     def check_hplip(self):
diff -ruN hplip.orig/files/patch-io-hpmud-musb.c hplip/files/patch-io-hpmud-musb.c
--- hplip.orig/files/patch-io-hpmud-musb.c	2012-11-21 21:33:45.000000000 -0500
+++ hplip/files/patch-io-hpmud-musb.c	2012-11-21 21:52:01.000000000 -0500
@@ -1,21 +1,25 @@
-Index: io/hpmud/musb.c
-@@ -122,10 +122,16 @@
-    {
-       ret = usb_control_msg(dev, USB_ENDPOINT_IN, USB_REQ_GET_DESCRIPTOR, (USB_DT_STRING << 8) + index, 
-                0x409, tbuf, sizeof(tbuf), LIBUSB_CONTROL_REQ_TIMEOUT);
+--- io/hpmud/musb.c.orig	2012-11-21 21:50:35.000000000 -0500
++++ io/hpmud/musb.c	2012-11-21 21:51:45.000000000 -0500
+@@ -133,11 +133,17 @@
+                  0x409, 
+                  tbuf, sizeof(tbuf), LIBUSB_CONTROL_REQ_TIMEOUT);
+ 
 -      if (ret==0)
-+      if (ret==0
-+#ifdef __FreeBSD__
-+       || ret == -EIO
-+#endif
-+       )
-       {
+-      {
 -         /* This retry is necessary for lj1000 and lj1005. des 12/12/07 */
 -         BUG("get_string_descriptor zero result, retrying...");
-+         /* This retry is necessary for lj1000 and lj1005. des 12/12/07
-+         Also HP Photosmart 42xx seems to suffer transient errors with serial id */
-+         BUG("get_string_descriptor error result %d, retrying in 2 secs...", ret);
-+         sleep(2);
-          continue;
+-         continue;
++       if (ret==0
++ #ifdef __FreeBSD__
++        || ret == -EIO
++ #endif
++        )
++      {
++          /* This retry is necessary for lj1000 and lj1005. des 12/12/07
++          Also HP Photosmart 42xx seems to suffer transient errors with serial id */
++          BUG("get_string_descriptor error result %d, retrying in 2 secs...", ret);
++          sleep(2);
++          continue;
        }
        break;
+    }
diff -ruN hplip.orig/files/patch-prnt__hpcups__HPCupsFilter.cpp hplip/files/patch-prnt__hpcups__HPCupsFilter.cpp
--- hplip.orig/files/patch-prnt__hpcups__HPCupsFilter.cpp	2012-11-21 21:33:45.000000000 -0500
+++ hplip/files/patch-prnt__hpcups__HPCupsFilter.cpp	1969-12-31 19:00:00.000000000 -0500
@@ -1,20 +0,0 @@
---- ./prnt/hpcups/HPCupsFilter.cpp.orig	2010-08-25 11:15:08.000000000 +0400
-+++ ./prnt/hpcups/HPCupsFilter.cpp	2010-08-25 11:35:36.000000000 +0400
-@@ -433,13 +433,14 @@
- 
-     memset(&m_JA, 0, sizeof(JobAttributes));
-     struct    tm       *t;
--    struct    timeb    tb;
-+    struct    timeval    tv;
-+    struct    timezone   tz;
-     time_t             long_time;
-     time(&long_time);
-     t = localtime(&long_time);
--    ftime(&tb);
-+    gettimeofday(&tv, &tz);
-     strncpy(m_JA.job_start_time, asctime(t), sizeof(m_JA.job_start_time)-1);    // returns Fri Jun  5 08:12:16 2009
--    snprintf(m_JA.job_start_time+19, sizeof(m_JA.job_start_time) - 20, ":%d %d", tb.millitm, t->tm_year + 1900); // add milliseconds
-+    snprintf(m_JA.job_start_time+19, sizeof(m_JA.job_start_time) - 20, ":%d %d", tv.tv_usec/1000, t->tm_year + 1900); // add milliseconds
- 
-     getLogLevel();
-     m_JA.job_id = atoi(argv[1]);


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211220616.qAM6GCdR083280>