diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2007-10-26 20:16:02 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2007-10-26 20:16:02 +0000 |
commit | ee4ef808b3270c2c1fe74c3876ac5f5e4650e4ea (patch) | |
tree | d5405436b924f60fd1bd0c7392c243d5c1973a6c /print/hplip3/files | |
parent | Update to 0.45.2 (diff) |
- Update to 2.7.9 (breaks out foomatic integration, all access is done via
libusb now)
PR: ports/117250
Submitted by: Anish Mistry <amistry@am-productions.biz> (maintainer)
Notes
Notes:
svn path=/head/; revision=202098
Diffstat (limited to 'print/hplip3/files')
19 files changed, 188 insertions, 725 deletions
diff --git a/print/hplip3/files/hpiod.sh.in b/print/hplip3/files/hpiod.sh.in deleted file mode 100644 index b24681234b8c..000000000000 --- a/print/hplip3/files/hpiod.sh.in +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -# PROVIDE: hpiod -# REQUIRE: NETWORKING -# KEYWORD: shutdown - -. %%RC_SUBR%% - -name=hpiod -rcvar=${name}_enable - -command="%%PREFIX%%/sbin/${name}" -pidfile="/var/run/${name}.pid" -portfile="/var/run/${name}.port" -hpiod_user=hplip - -start_precmd="hpiod_prestart" - -load_rc_config $name - -: ${hpiod_enable="NO"} - -hpiod_prestart() -{ - touch ${pidfile} - touch ${portfile} - chown ${hpiod_user} ${pidfile} - chown ${hpiod_user} ${portfile} -} - -run_rc_command $* diff --git a/print/hplip3/files/hpssd.sh.in b/print/hplip3/files/hpssd.sh.in index 065bb88badde..105076f0a135 100644 --- a/print/hplip3/files/hpssd.sh.in +++ b/print/hplip3/files/hpssd.sh.in @@ -13,7 +13,6 @@ rcvar=${name}_enable command="%%PREFIX%%/sbin/${name}" command_interpreter="%%PREFIX%%/bin/python" pidfile="/var/run/${name}.pid" -portfile="/var/run/${name}.port" hpssd_user=nobody command_args=">/dev/null" @@ -26,9 +25,7 @@ load_rc_config $name hpssd_prestart() { touch ${pidfile} - touch ${portfile} chown ${hpssd_user} ${pidfile} - chown ${hpssd_user} ${portfile} } run_rc_command $* diff --git a/print/hplip3/files/patch-Makefile.am b/print/hplip3/files/patch-Makefile.am new file mode 100644 index 000000000000..beb9769cde6c --- /dev/null +++ b/print/hplip3/files/patch-Makefile.am @@ -0,0 +1,37 @@ +--- Makefile.am.orig Fri Sep 21 15:36:07 2007 ++++ Makefile.am Tue Oct 9 19:31:35 2007 +@@ -45,7 +45,7 @@ + www243dir = $(docdir)/install/step4/suse + dist_www243_DATA = $(wwwsrc)/install/step4/suse/* + www251dir = $(docdir)/install/manual +-dist_www251_DATA = $(wwwsrc)/install/manual/* ++dist_www251_DATA = $(wwwsrc)/install/manual/*.html + www252dir = $(docdir)/install/manual/distros + dist_www252_DATA = $(wwwsrc)/install/manual/distros/* + www261dir = $(docdir)/install/install +@@ -53,13 +53,13 @@ + www3dir = $(docdir)/styles + dist_www3_DATA = $(wwwsrc)/styles/* + www4dir = $(docdir)/images +-dist_www4_DATA = $(wwwsrc)/images/* ++dist_www4_DATA = $(wwwsrc)/images/*.png + www5dir = $(docdir)/supported_devices + dist_www5_DATA = $(wwwsrc)/supported_devices/* + www6dir = $(docdir)/tech_docs +-dist_www6_DATA = $(wwwsrc)/tech_docs/* ++dist_www6_DATA = $(wwwsrc)/tech_docs/*.html + www61dir = $(docdir)/tech_docs/man_pages +-dist_www61_DATA = $(wwwsrc)/tech_docs/man_pages/* ++dist_www61_DATA = $(wwwsrc)/tech_docs/man_pages/*.html + www7dir = $(docdir)/troubleshooting + dist_www7_DATA = $(wwwsrc)/troubleshooting/* + endif +@@ -131,7 +131,7 @@ + dist_postscript_DATA = data/ps/testpage.ps.gz data/ps/clean_page.pdf.gz + dist_models_DATA = data/models/models.dat + if GUI_BUILD +-dist_images_DATA = data/images/* ++dist_images_DATA = data/images/*.png + endif + dist_pcl_DATA = data/pcl/align1_8xx.pcl.gz data/pcl/align1_9xx.pcl.gz data/pcl/align2_8xx.pcl.gz data/pcl/align3_8xx.pcl.gz data/pcl/align4_8xx.pcl.gz \ + data/pcl/align5_8xx.pcl.gz data/pcl/align2_9xx.pcl.gz data/pcl/align3_9xx.pcl.gz data/pcl/align4_450.pcl.gz data/pcl/align6_450.pcl.gz \ diff --git a/print/hplip3/files/patch-Makefile.in b/print/hplip3/files/patch-Makefile.in index add4fc086982..0f340db071ce 100644 --- a/print/hplip3/files/patch-Makefile.in +++ b/print/hplip3/files/patch-Makefile.in @@ -1,143 +1,72 @@ ---- Makefile.in.orig Fri Mar 23 16:39:45 2007 -+++ Makefile.in Wed Apr 18 17:00:46 2007 -@@ -434,7 +434,7 @@ - www243dir = $(docdir)/install/step4/suse - dist_www243_DATA = $(wwwsrc)/install/step4/suse/* - www251dir = $(docdir)/install/manual --dist_www251_DATA = $(wwwsrc)/install/manual/* -+dist_www251_DATA = $(wwwsrc)/install/manual/*.html - www252dir = $(docdir)/install/manual/distros - dist_www252_DATA = $(wwwsrc)/install/manual/distros/* - www261dir = $(docdir)/install/install -@@ -446,12 +446,12 @@ - www5dir = $(docdir)/supported_devices - dist_www5_DATA = $(wwwsrc)/supported_devices/* - www6dir = $(docdir)/tech_docs --dist_www6_DATA = $(wwwsrc)/tech_docs/* -+dist_www6_DATA = $(wwwsrc)/tech_docs/*.html - www61dir = $(docdir)/tech_docs/man_pages --dist_www61_DATA = $(wwwsrc)/tech_docs/man_pages/* -+dist_www61_DATA = $(wwwsrc)/tech_docs/man_pages/*.html - www7dir = $(docdir)/troubleshooting - dist_www7_DATA = $(wwwsrc)/troubleshooting/* --dist_hplip_DATA = $(doc_DATA) hplip.conf -+dist_hplip_DATA = $(doc_DATA) - dist_hplip_SCRIPTS = hpssd.py __init__.py hplip.sh install.py hplip-install - cmddir = $(hplipdir) - dist_cmd_SCRIPTS = align.py info.py print.py toolbox.py clean.py colorcal.py unload.py testpage.py makeuri.py check.py fab.py levels.py \ -@@ -2884,20 +2884,9 @@ - # - # If scanner build, install sane backend. - if [ "$(scan_build)" = "yes" ]; then \ -- $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \ -- if [ ! -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \ -- touch $(DESTDIR)/etc/sane.d/dll.conf; \ -- fi; \ -- $(mkinstalldirs) $(DESTDIR)$(sanedir); \ -- ln -sf ../$(SOLONG) $(DESTDIR)$(sanedir)/$(SONOVER); \ -- ln -sf ../$(SOLONG) $(DESTDIR)$(sanedir)/$(SOSHORT); \ -- ln -sf ../$(SOLONG) $(DESTDIR)$(sanedir)/$(SOLONG); \ -- if [ -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \ -- if ! grep ^hpaio $(DESTDIR)/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \ -- echo "Adding hpaio entry to /etc/sane.d/dll.conf." ; \ -- echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \ -- fi \ -- fi \ -+ ln -sf $(prefix)/lib/$(SOSHORT) $(DESTDIR)$(sanedir)/$(SONOVER); \ -+ ln -sf $(prefix)/lib/$(SOSHORT) $(DESTDIR)$(sanedir)/$(SOSHORT); \ -+ ln -sf $(prefix)/lib/$(SOSHORT) $(DESTDIR)$(sanedir)/$(SOLONG); \ - fi - - install-data-hook: install-pcardext install-cupsext -@@ -2945,63 +2934,41 @@ - done - # - # Edit hpiod.conf in destdir. -- echo -e "\n[$(PACKAGE)]\nversion=$(VERSION)\njdprobe=0\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf -- echo -e "[dirs]\nhome=$(hplipdir)\nrun=$(rundir)\nppd=$(hpppddir)\nppdbase=$(ppddir)\ndoc=$(docdir)\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf -- echo -e "# Following values are determined at configure time and cannot be changed.\n[configure]" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf -+ echo -e "\n[$(PACKAGE)]\nversion=$(VERSION)\njdprobe=0\n" >> $(PACKAGE).conf -+ echo -e "[dirs]\nhome=$(hplipdir)\nrun=$(rundir)\nppd=$(hpppddir)\nppdbase=$(ppddir)\ndoc=$(docdir)\n" >> $(PACKAGE).conf -+ echo -e "# Following values are determined at configure time and cannot be changed.\n[configure]" >> $(PACKAGE).conf - if [ "$(network_build)" = "yes" ]; then \ -- echo -e "network-build=1" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "network-build=1" >> $(PACKAGE).conf; \ - else \ -- echo -e "network-build=0" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "network-build=0" >> $(PACKAGE).conf; \ - fi - if [ "$(pp_build)" = "yes" ]; then \ -- echo -e "pp-build=1" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "pp-build=1" >> $(PACKAGE).conf; \ - else \ -- echo -e "pp-build=0" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "pp-build=0" >> $(PACKAGE).conf; \ - fi - if [ "$(gui_build)" = "yes" ]; then \ -- echo -e "gui-build=1" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "gui-build=1" >> $(PACKAGE).conf; \ - else \ -- echo -e "gui-build=0" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "gui-build=0" >> $(PACKAGE).conf; \ - fi - if [ "$(scan_build)" = "yes" ]; then \ -- echo -e "scanner-build=1" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "scanner-build=1" >> $(PACKAGE).conf; \ - else \ -- echo -e "scanner-build=0" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "scanner-build=0" >> $(PACKAGE).conf; \ - fi - if [ "$(fax_build)" = "yes" ]; then \ -- echo -e "fax-build=1" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "fax-build=1" >> $(PACKAGE).conf; \ - else \ -- echo -e "fax-build=0" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "fax-build=0" >> $(PACKAGE).conf; \ - fi - if [ "$(cups11_build)" = "yes" ]; then \ -- echo -e "cups11-build=1" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -+ echo -e "cups11-build=1" >> $(PACKAGE).conf; \ - else \ -- echo -e "cups11-build=0" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \ -- fi -- echo -e "installinitd=$(INSTALLINITD)\nchkconfig=$(CHKCONFIG)" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf -- echo -e "internal-tag=$(PACKAGE_BUGREPORT)" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf --# --# Install hpiod.conf. -- $(mkinstalldirs) $(DESTDIR)/etc/hp -- $(INSTALL_DATA) $(DESTDIR)$(hplipdir)/$(PACKAGE).conf $(DESTDIR)/etc/hp --# --# Create hpiod start/stop script from hpiod.sh in destdir. -- sed 's:HPIODDIR=:HPIODDIR=$(sbindir):' < $(DESTDIR)$(hplipdir)/$(PACKAGE).sh > $(DESTDIR)$(hplipdir)/$(PACKAGE).tmp; \ -- sed 's:HPSSDDIR=:HPSSDDIR=$(hplipdir):' < $(DESTDIR)$(hplipdir)/$(PACKAGE).tmp > $(DESTDIR)$(hplipdir)/$(PACKAGE); \ -- rm -f $(DESTDIR)$(hplipdir)/$(PACKAGE).tmp --# --# Install hpiod start/stop script. -- $(mkinstalldirs) $(DESTDIR)/etc/init.d -- $(INSTALL_SCRIPT) $(DESTDIR)$(hplipdir)/$(PACKAGE) $(DESTDIR)/etc/init.d --# --# Run chkconfig/install_initd if DESTDIR="". -- if [ "$(DESTDIR)" = "" ]; then \ -- if [ "$(INSTALLINITD)" != "" ]; then \ -- $(INSTALLINITD) $(PACKAGE); \ -- elif [ "$(CHKCONFIG)" != "" ]; then \ -- $(CHKCONFIG) $(PACKAGE) reset; \ -- fi \ -+ echo -e "cups11-build=0" >> $(PACKAGE).conf; \ - fi -+ echo -e "installinitd=$(INSTALLINITD)\nchkconfig=$(CHKCONFIG)" >> $(PACKAGE).conf -+ echo -e "internal-tag=$(PACKAGE_BUGREPORT)" >> $(PACKAGE).conf - # - # Install fax support. Let hpijs symlink hpppddir to cupsppddir. - if [ "$(fax_build)" = "yes" ]; then \ -@@ -3032,8 +2999,8 @@ - done - # - # Remove hplip.conf and hplip start/stop script. -- rm -f $(DESTDIR)/etc/hp/$(PACKAGE).conf -- rm -f $(DESTDIR)/etc/init.d/$(PACKAGE) -+ rm -f $(DESTDIR)/usr/local/etc/hp/$(PACKAGE).conf -+ rm -f $(DESTDIR)/usr/local/etc/rc.d/$(PACKAGE) - # - # Remove fax support. - rm -f $(DESTDIR)$(hpfaxdir)/hpfax +--- Makefile.in.orig Fri Sep 28 19:33:08 2007 ++++ Makefile.in Tue Oct 9 21:10:19 2007 +@@ -671,7 +671,7 @@ + dist_faxppdDATA_INSTALL = $(INSTALL_DATA) + am__dist_hplip_DATA_DIST = scan/sane/hpaio.desc + dist_hplipDATA_INSTALL = $(INSTALL_DATA) +-am__dist_images_DATA_DIST = data/images/* ++am__dist_images_DATA_DIST = data/images/*.png + dist_imagesDATA_INSTALL = $(INSTALL_DATA) + am__dist_ldl_DATA_DIST = data/ldl/cb2pcal.ldl.gz \ + data/ldl/cb2pcal_done.ldl.gz data/ldl/cbbcal.ldl.gz \ +@@ -1610,7 +1610,7 @@ + dist_www242DATA_INSTALL = $(INSTALL_DATA) + am__dist_www243_DATA_DIST = $(wwwsrc)/install/step4/suse/* + dist_www243DATA_INSTALL = $(INSTALL_DATA) +-am__dist_www251_DATA_DIST = $(wwwsrc)/install/manual/* ++am__dist_www251_DATA_DIST = $(wwwsrc)/install/manual/*.html + dist_www251DATA_INSTALL = $(INSTALL_DATA) + am__dist_www252_DATA_DIST = $(wwwsrc)/install/manual/distros/* + dist_www252DATA_INSTALL = $(INSTALL_DATA) +@@ -1618,13 +1618,13 @@ + dist_www261DATA_INSTALL = $(INSTALL_DATA) + am__dist_www3_DATA_DIST = $(wwwsrc)/styles/* + dist_www3DATA_INSTALL = $(INSTALL_DATA) +-am__dist_www4_DATA_DIST = $(wwwsrc)/images/* ++am__dist_www4_DATA_DIST = $(wwwsrc)/images/*.png + dist_www4DATA_INSTALL = $(INSTALL_DATA) + am__dist_www5_DATA_DIST = $(wwwsrc)/supported_devices/* + dist_www5DATA_INSTALL = $(INSTALL_DATA) +-am__dist_www6_DATA_DIST = $(wwwsrc)/tech_docs/* ++am__dist_www6_DATA_DIST = $(wwwsrc)/tech_docs/*.html + dist_www6DATA_INSTALL = $(INSTALL_DATA) +-am__dist_www61_DATA_DIST = $(wwwsrc)/tech_docs/man_pages/* ++am__dist_www61_DATA_DIST = $(wwwsrc)/tech_docs/man_pages/*.html + dist_www61DATA_INSTALL = $(INSTALL_DATA) + am__dist_www7_DATA_DIST = $(wwwsrc)/troubleshooting/* + dist_www7DATA_INSTALL = $(INSTALL_DATA) +@@ -1840,7 +1840,7 @@ + @DOC_BUILD_TRUE@www243dir = $(docdir)/install/step4/suse + @DOC_BUILD_TRUE@dist_www243_DATA = $(wwwsrc)/install/step4/suse/* + @DOC_BUILD_TRUE@www251dir = $(docdir)/install/manual +-@DOC_BUILD_TRUE@dist_www251_DATA = $(wwwsrc)/install/manual/* ++@DOC_BUILD_TRUE@dist_www251_DATA = $(wwwsrc)/install/manual/*.html + @DOC_BUILD_TRUE@www252dir = $(docdir)/install/manual/distros + @DOC_BUILD_TRUE@dist_www252_DATA = $(wwwsrc)/install/manual/distros/* + @DOC_BUILD_TRUE@www261dir = $(docdir)/install/install +@@ -1848,13 +1848,13 @@ + @DOC_BUILD_TRUE@www3dir = $(docdir)/styles + @DOC_BUILD_TRUE@dist_www3_DATA = $(wwwsrc)/styles/* + @DOC_BUILD_TRUE@www4dir = $(docdir)/images +-@DOC_BUILD_TRUE@dist_www4_DATA = $(wwwsrc)/images/* ++@DOC_BUILD_TRUE@dist_www4_DATA = $(wwwsrc)/images/*.png + @DOC_BUILD_TRUE@www5dir = $(docdir)/supported_devices + @DOC_BUILD_TRUE@dist_www5_DATA = $(wwwsrc)/supported_devices/* + @DOC_BUILD_TRUE@www6dir = $(docdir)/tech_docs +-@DOC_BUILD_TRUE@dist_www6_DATA = $(wwwsrc)/tech_docs/* ++@DOC_BUILD_TRUE@dist_www6_DATA = $(wwwsrc)/tech_docs/*.html + @DOC_BUILD_TRUE@www61dir = $(docdir)/tech_docs/man_pages +-@DOC_BUILD_TRUE@dist_www61_DATA = $(wwwsrc)/tech_docs/man_pages/* ++@DOC_BUILD_TRUE@dist_www61_DATA = $(wwwsrc)/tech_docs/man_pages/*.html + @DOC_BUILD_TRUE@www7dir = $(docdir)/troubleshooting + @DOC_BUILD_TRUE@dist_www7_DATA = $(wwwsrc)/troubleshooting/* + @HPLIP_BUILD_TRUE@dist_hplip_DATA = scan/sane/hpaio.desc +@@ -1904,7 +1904,7 @@ + @HPLIP_BUILD_TRUE@localzdir = $(hplipdir)/data/localization + @HPLIP_BUILD_TRUE@dist_postscript_DATA = data/ps/testpage.ps.gz data/ps/clean_page.pdf.gz + @HPLIP_BUILD_TRUE@dist_models_DATA = data/models/models.dat +-@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@dist_images_DATA = data/images/* ++@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@dist_images_DATA = data/images/*.png + @HPLIP_BUILD_TRUE@dist_pcl_DATA = data/pcl/align1_8xx.pcl.gz data/pcl/align1_9xx.pcl.gz data/pcl/align2_8xx.pcl.gz data/pcl/align3_8xx.pcl.gz data/pcl/align4_8xx.pcl.gz \ + @HPLIP_BUILD_TRUE@ data/pcl/align5_8xx.pcl.gz data/pcl/align2_9xx.pcl.gz data/pcl/align3_9xx.pcl.gz data/pcl/align4_450.pcl.gz data/pcl/align6_450.pcl.gz \ + @HPLIP_BUILD_TRUE@ data/pcl/colorcal1_450.pcl.gz data/pcl/colorcal2_450.pcl.gz data/pcl/crbcal.pcl.gz data/pcl/crcaldone.pcl.gz data/pcl/crcbcal.pcl.gz data/pcl/crccal.pcl.gz \ diff --git a/print/hplip3/files/patch-base_utils.py b/print/hplip3/files/patch-base_utils.py new file mode 100644 index 000000000000..92d4757c8cee --- /dev/null +++ b/print/hplip3/files/patch-base_utils.py @@ -0,0 +1,53 @@ +--- base/utils.py.orig Wed Oct 10 00:23:07 2007 ++++ base/utils.py Wed Oct 10 00:27:04 2007 +@@ -54,6 +54,50 @@ + + return callable + ++# For pidfile locking (must be "static" and global to the whole app) ++prv_pidfile = None ++prv_pidfile_name = "" ++ ++def get_pidfile_lock (a_pidfile_name=""): ++ """ Call this to either lock the pidfile, or to update it after a fork() ++ Credit: Henrique M. Holschuh <hmh@debian.org> ++ """ ++ global prv_pidfile ++ global prv_pidfile_name ++ if prv_pidfile_name == "": ++ try: ++ prv_pidfile_name = a_pidfile_name ++ prv_pidfile = os.fdopen(os.open(prv_pidfile_name, os.O_RDWR | os.O_CREAT, 0644), 'r+') ++ fcntl.fcntl(prv_pidfile.fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC) ++ while 1: ++ try: ++ fcntl.flock(prv_pidfile.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB) ++ except (OSError, IOError), e: ++ if e.errno == errno.EINTR: ++ continue ++ elif e.errno == errno.EWOULDBLOCK: ++ try: ++ prv_pidfile.seek(0) ++ otherpid = int(prv_pidfile.readline(), 10) ++ sys.stderr.write ("can't lock %s, running daemon's pid may be %d\n" % (prv_pidfile_name, otherpid)) ++ except (OSError, IOError), e: ++ sys.stderr.write ("error reading pidfile %s: (%d) %s\n" % (prv_pidfile_name, e.errno, e.strerror)) ++ ++ sys.exit(1) ++ sys.stderr.write ("can't lock %s: (%d) %s\n" % (prv_pidfile_name, e.errno, e.strerror)) ++ sys.exit(1) ++ break ++ except (OSError, IOError), e: ++ sys.stderr.write ("can't open pidfile %s: (%d) %s\n" % (prv_pidfile_name, e.errno, e.strerror)) ++ sys.exit(1) ++ try: ++ prv_pidfile.seek(0) ++ prv_pidfile.write("%d\n" % (os.getpid())) ++ prv_pidfile.flush() ++ prv_pidfile.truncate() ++ except (OSError, IOError), e: ++ log.error("can't update pidfile %s: (%d) %s\n" % (prv_pidfile_name, e.errno, e.strerror)) ++ + def daemonize (stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'): + """ + Credit: Jürgen Hermann, Andy Gimblett, and Noah Spurrier diff --git a/print/hplip3/files/patch-configure b/print/hplip3/files/patch-configure deleted file mode 100644 index 22f040c1d5c1..000000000000 --- a/print/hplip3/files/patch-configure +++ /dev/null @@ -1,34 +0,0 @@ ---- configure.bak Fri May 5 10:01:57 2006 -+++ configure Fri May 5 10:03:39 2006 -@@ -22100,29 +22100,9 @@ - echo "$as_me:$LINENO: result: \"using $CUPS_BACKEND_PATH\"" >&5 - echo "${ECHO_T}\"using $CUPS_BACKEND_PATH\"" >&6 - --ICONSEARCHPATH="/usr/lib/menu /usr/share/applications" --ICON="hplip hplip.desktop" -+ICON_PATH="/usr/share/applications" -+ICON_FILE="hplip.desktop" - --echo "$as_me:$LINENO: checking \"for icon directory\"" >&5 --echo $ECHO_N "checking \"for icon directory\"... $ECHO_C" >&6 --ICON_PATH="" --ICON_FILE="" --idx=1 --for i in $ICONSEARCHPATH; do -- if test -d "$i"; then -- ICON_PATH="$i" -- jdx=1 -- for j in $ICON; do -- if test "$jdx" = "$idx"; then -- break -- fi -- jdx=$jdx+1 -- done -- ICON_FILE="$j" -- break -- fi -- idx=$idx+1 --done - if test "$ICON_PATH" != ""; then - echo "$as_me:$LINENO: result: \"using $ICON_PATH/$ICON_FILE\"" >&5 - echo "${ECHO_T}\"using $ICON_PATH/$ICON_FILE\"" >&6 diff --git a/print/hplip3/files/patch-hplip.conf b/print/hplip3/files/patch-hplip.conf deleted file mode 100644 index 82d374200c3f..000000000000 --- a/print/hplip3/files/patch-hplip.conf +++ /dev/null @@ -1,8 +0,0 @@ ---- hplip.conf.orig Mon Aug 7 03:19:37 2006 -+++ hplip.conf Mon Aug 7 03:20:58 2006 -@@ -6,3 +6,5 @@ - [hpssd] - # port=0 (dynamic IP port) - port=2207 (IANA IP port) -+[dirs] -+run=/var/run diff --git a/print/hplip3/files/patch-hpssd.py b/print/hplip3/files/patch-hpssd.py new file mode 100644 index 000000000000..f3e7a9c8b22e --- /dev/null +++ b/print/hplip3/files/patch-hpssd.py @@ -0,0 +1,21 @@ +--- hpssd.py Fri Oct 12 19:42:15 2007 ++++ /usr/local/sbin/hpssd Fri Oct 12 23:59:31 2007 +@@ -664,6 +664,10 @@ + if prop.daemonize: + utils.daemonize() + ++ # Lock pidfile before we muck around with system state ++ # Patch by Henrique M. Holschuh <hmh@debian.org> ++ utils.get_pidfile_lock(os.path.join(sys_cfg.dirs.run, 'hpssd.pid')) ++ + # hpssd server dispatcher object + try: + server = hpssd_server(prop.hpssd_host, prop.hpssd_port) +@@ -688,6 +692,7 @@ + + log.debug("Cleaning up...") + finally: ++ os.remove(os.path.join(sys_cfg.dirs.run, 'hpssd.pid')) + server.close() + return 0 + diff --git a/print/hplip3/files/patch-io_hpiod_device.cpp b/print/hplip3/files/patch-io_hpiod_device.cpp deleted file mode 100644 index 13bd9bb419cd..000000000000 --- a/print/hplip3/files/patch-io_hpiod_device.cpp +++ /dev/null @@ -1,262 +0,0 @@ ---- io/hpiod/device.cpp.orig Thu Jun 15 02:02:11 2006 -+++ io/hpiod/device.cpp Sun Jul 16 16:57:30 2006 -@@ -25,6 +25,9 @@ - \*****************************************************************************/ - - #include "hpiod.h" -+#ifdef __FreeBSD__ -+#include <dev/usb/usb.h> -+#endif - - const unsigned char Venice_Power_On[] = {0x1b, '%','P','u','i','f','p','.', - 'p','o','w','e','r',' ','1',';', -@@ -111,21 +114,240 @@ - - #elif defined(__FreeBSD__) - --/* -- * Anish Mistry amistry@am-productions.biz is working on libusb extensions for FreeBSD. His current implementation does not handle device exceptions (ie: paperout). -- * Once this issue is resolved we will be glade to add his code to the project. -- */ -- - int Device::Write(int fd, const void *buf, int size) - { -- syslog(LOG_ERR, "error Write: unimplemented (freebsd) %s %s %d\n", URI, __FILE__, __LINE__); -- return -1; -+ int nwrote, total, write_len, r, ep, endpoint_fd; -+ void *tmp_buf = (void *)buf; -+ fd_set ready; -+ char *pEndPoint = NULL; -+ -+ if (FD[fd].pHD == NULL) -+ { -+ syslog(LOG_ERR, "invalid Device::Write state: %s %s %d\n", URI,__FILE__, __LINE__); -+ return -1; -+ } -+ -+ if ((ep = GetOutEP(dev, FD[fd].Config, FD[fd].Interface, FD[fd].AltSetting, USB_ENDPOINT_TYPE_BULK)) < 0) -+ { -+ syslog(LOG_ERR, "invalid bulk out endpoint %s %s %d\n", URI, __FILE__, __LINE__); -+ return -1; -+ } -+ -+ /* We only want the address, so mask out the direction bits */ -+ ep = (ep & USB_ENDPOINT_ADDRESS_MASK); -+ /* open endpoint */ -+ /* allocate data for the usb endpoint string */ -+ pEndPoint = (char *)malloc(strlen(dev->filename)+20); -+ if(!pEndPoint) -+ return -1; -+ /* create device endpoint name string */ -+ sprintf(pEndPoint, "%s.%d", dev->filename, ep); -+ -+ /* open the endpoint with read write access */ -+ endpoint_fd = open(pEndPoint, O_WRONLY, 0); -+ free(pEndPoint); -+ if(endpoint_fd < 0) -+ { -+ /* we failed to open the endpoint */ -+ return -1; -+ } -+ -+ total = size; -+ write_len = size; -+ -+ while (total > 0) -+ { -+ FD_ZERO(&ready); -+ FD_SET(endpoint_fd, &ready); -+ -+ if (!FD_ISSET(endpoint_fd, &ready)) -+ { -+ close(endpoint_fd); -+ return -1; -+ } -+ nwrote = write(endpoint_fd, tmp_buf, write_len); -+ -+ if (nwrote < 0) -+ { -+ close(endpoint_fd); -+ return -1; -+ } -+ -+ write_len -= nwrote; -+ tmp_buf = (void *)((long)tmp_buf + nwrote); -+ total -= nwrote; -+ } -+ -+ close(endpoint_fd); -+ return size; - } - - int Device::Read(int fd, void *buf, int size, int usec) - { -- syslog(LOG_ERR, "error Read: unimplemented (freebsd) %s %s %d\n", URI, __FILE__, __LINE__); -- return -2; -+ int nwrote, total, r, ep=0, endpoint_fd, i; -+ struct timeval t1, t2; -+ fd_set ready; -+ char *pEndPoint = NULL; -+ int bytes_want = 0; -+ int rlen = 0; -+ int bytes_read = 0; -+ int mili_timeout = usec/10; -+ unsigned char *pbuf_pos = NULL; -+ int total_usec, tmo_usec = usec; -+ -+ if (FD[fd].pHD == NULL) -+ { -+ syslog(LOG_ERR, "invalid Device::Read state: %s %s %d\n", URI,__FILE__, __LINE__); -+ return -1; -+ } -+ -+ if ((ep = GetInEP(dev, FD[fd].Config, FD[fd].Interface, FD[fd].AltSetting, USB_ENDPOINT_TYPE_BULK)) < 0) -+ { -+ syslog(LOG_ERR, "invalid bulk in endpoint %s %s %d\n", URI, __FILE__, __LINE__); -+ return -1; -+ } -+ -+ /* We only want the address, so mask out the direction bits */ -+ ep = (ep & USB_ENDPOINT_ADDRESS_MASK); -+ /* open endpoint */ -+ /* allocate data for the usb endpoint string */ -+ pEndPoint = (char *)malloc(strlen(dev->filename)+20); -+ if(!pEndPoint) -+ return -1; -+ /* create device endpoint name string */ -+ sprintf(pEndPoint, "%s.%d", dev->filename, ep); -+ -+ /* open the endpoint with read write access */ -+ endpoint_fd = open(pEndPoint, O_RDONLY, 0); -+ if(endpoint_fd < 0) -+ { -+ /* we failed to open the endpoint */ -+ syslog(LOG_ERR, "unable to open bulk in endpoint (%s) %s %s %d\n", pEndPoint, URI, __FILE__, __LINE__); -+ free(pEndPoint); -+ return -1; -+ } -+ free(pEndPoint); -+ -+ /* set short transfer so that we can allow "short" reads since we -+ will don't know exactly -+ what is coming so we can't specify exact byte amounts */ -+ i = 1; -+ if (ioctl(endpoint_fd, USB_SET_SHORT_XFER, &i) < 0) -+ { -+ syslog(LOG_ERR, "USB_SET_SHORT_XFER set failed Device::Read : %s %s %d\n", URI,__FILE__, __LINE__); -+ } -+ -+ /* 0 timeout value will cause us the wait until the device has data -+ available or is disconnected */ -+ if (ioctl(endpoint_fd, USB_SET_TIMEOUT, &mili_timeout) < 0) -+ { -+ syslog(LOG_ERR, "USB_SET_TIMEOUT set failed Device::Read : %s %s %d\n", URI,__FILE__, __LINE__); -+ } -+ -+ gettimeofday (&t1, NULL); /* get start time */ -+ -+ if (FD[fd].ucnt > 0) -+ { -+ /* copy buffered data to storage */ -+ if (size <= FD[fd].ucnt) -+ { -+ memcpy(buf, FD[fd].ubuf, size); -+ FD[fd].uindex += size; -+ FD[fd].ucnt -= size; -+ bytes_read = size; -+ } -+ else -+ { -+ memcpy(buf, FD[fd].ubuf, FD[fd].ucnt); -+ bytes_read += FD[fd].ucnt; -+ FD[fd].ucnt = 0; -+ } -+ } -+ else if (FD[fd].ucnt == 0 && bytes_read < size) -+ { -+ /* reset data buffer */ -+ FD[fd].uindex = 0; -+ /* offset storage to not overwrite data copied from the buffer */ -+ pbuf_pos = (unsigned char *)((long)buf + bytes_read); -+ bytes_want = size - bytes_read; -+ do -+ { -+ if (bytes_want >= BUFFER_SIZE) -+ { -+ /* check to see if the device is ready for a read */ -+ FD_ZERO(&ready); -+ FD_SET(endpoint_fd, &ready); -+ if (!FD_ISSET(endpoint_fd, &ready)) -+ { -+ syslog(LOG_ERR, "timeout Device::Read : %s %s %d\n", URI,__FILE__, __LINE__); -+ errno = ETIMEDOUT; -+ return -1; -+ } -+ /* read directly into storage */ -+ rlen = read(endpoint_fd, pbuf_pos, BUFFER_SIZE); -+ if (rlen < 0) -+ { -+ syslog(LOG_ERR, "error Device::Read : %s %s %d\n", URI,__FILE__, __LINE__); -+ return -1; -+ } -+ bytes_read += rlen; -+ bytes_want -= rlen; -+ pbuf_pos += rlen; -+ } -+ else if (bytes_want < BUFFER_SIZE) -+ { -+ /* check to see if the device is ready for a read */ -+ FD_ZERO(&ready); -+ FD_SET(endpoint_fd, &ready); -+ if (!FD_ISSET(endpoint_fd, &ready)) -+ { -+ syslog(LOG_ERR, "timeout Device::Read : %s %s %d\n", URI,__FILE__, __LINE__); -+ errno = ETIMEDOUT; -+ return -1; -+ } -+ /* read to buffer */ -+ rlen = read(endpoint_fd, FD[fd].ubuf, BUFFER_SIZE); -+ if (rlen < 0) -+ { -+ syslog(LOG_ERR, "error Device::Read : %s %s %d\n", URI,__FILE__, __LINE__); -+ return -1; -+ } -+ if (rlen >= bytes_want) -+ { -+ memcpy(pbuf_pos, FD[fd].ubuf, -+ bytes_want); -+ FD[fd].uindex += bytes_want; -+ FD[fd].ucnt = rlen - bytes_want; -+ bytes_read += bytes_want; -+ bytes_want = 0; -+ } -+ else -+ { -+ memcpy(pbuf_pos, FD[fd].ubuf, rlen); -+ bytes_want -= rlen; -+ bytes_read += rlen; -+ pbuf_pos += rlen; -+ } -+ } -+ /* Bulk_read has a timeout, but bulk_read can return zero byte packet(s), so we must use our own timeout here. */ -+ gettimeofday(&t2, NULL); /* get current time */ -+ -+ total_usec = (t2.tv_sec - t1.tv_sec)*1000000; -+ total_usec += (t2.tv_usec > t1.tv_usec) ? t2.tv_usec - t1.tv_usec : t1.tv_usec - t2.tv_usec; -+ if (total_usec > usec) -+ { -+ size = -1; /* timeout */ -+ errno = ETIMEDOUT; -+ break; -+ } -+ tmo_usec = usec - total_usec; /* decrease timeout */ -+ continue; -+ } -+ while (bytes_want > 0); -+ } -+ -+ close(endpoint_fd); -+ return size; - } - - #else diff --git a/print/hplip3/files/patch-io_hpiod_dot4.cpp b/print/hplip3/files/patch-io_hpiod_dot4.cpp deleted file mode 100644 index 62ebdadeae36..000000000000 --- a/print/hplip3/files/patch-io_hpiod_dot4.cpp +++ /dev/null @@ -1,19 +0,0 @@ ---- io/hpiod/dot4.cpp.orig Tue May 23 15:30:04 2006 -+++ io/hpiod/dot4.cpp Tue May 23 15:32:37 2006 -@@ -78,6 +78,7 @@ - Dot4Channel *pC=NULL; - int i, len, size; - unsigned char socket; -+ static int cnt=0; - - pCmd = (DOT4Cmd *)buf; - -@@ -130,7 +131,7 @@ - Dot4ForwardReply(fd, (unsigned char *)pCreditReply, sizeof(DOT4CreditReply)); - break; - case DOT4_CREDIT_REQUEST: -- static int cnt=0; -+ cnt=0; - pCreditReq = (DOT4CreditRequest *)buf; - if (cnt++ < 5) - syslog(LOG_ERR, "unexpected DOT4CreditRequest: cmd=%x, hid=%x, pid=%x, maxcredit=%d: %s %d\n", pCreditReq->cmd, diff --git a/print/hplip3/files/patch-io_hpiod_mlc.cpp b/print/hplip3/files/patch-io_hpiod_mlc.cpp deleted file mode 100644 index a2c186607052..000000000000 --- a/print/hplip3/files/patch-io_hpiod_mlc.cpp +++ /dev/null @@ -1,19 +0,0 @@ ---- io/hpiod/mlc.cpp.orig Tue May 23 15:27:16 2006 -+++ io/hpiod/mlc.cpp Tue May 23 15:29:40 2006 -@@ -73,6 +73,7 @@ - MLCError *pError; - MlcChannel *pC; - int i, len, size; -+ static int cnt=0; - - pCmd = (MLCCmd *)buf; - -@@ -122,7 +123,7 @@ - MlcForwardReply(fd, (unsigned char *)pCreditReply, sizeof(MLCCreditReply)); - break; - case MLC_CREDIT_REQUEST: -- static int cnt=0; -+ cnt = 0; - pCreditReq = (MLCCreditRequest *)buf; - if (cnt++ < 5) - syslog(LOG_ERR, "unexpected MLCCreditRequest: cmd=%x, hid=%x, pid=%x, credit=%d: %s %d\n", pCreditReq->cmd, diff --git a/print/hplip3/files/patch-io_hpiod_system.cpp b/print/hplip3/files/patch-io_hpiod_system.cpp deleted file mode 100644 index c8fd116dcd6c..000000000000 --- a/print/hplip3/files/patch-io_hpiod_system.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- io/hpiod/system.cpp.orig Mon Jul 23 14:08:51 2007 -+++ io/hpiod/system.cpp Mon Jul 23 14:09:52 2007 -@@ -633,7 +633,7 @@ - list_for_each(p, &head.list) - { - psa = list_entry(p, SessionAttributes, list); -- lstLen += sprintf(lst+lstLen, "t[%d] d[%d] socket=%d\n", (int)psa->tid, psa->descriptor, psa->sockid); -+ lstLen += sprintf(lst+lstLen, "t[%d] d[%d] socket=%d\n", (unsigned long)psa->tid, psa->descriptor, psa->sockid); - } - - len = sprintf(sendBuf, "msg=PStateResult\nresult-code=%d\nlength=%d\ndata:\n%s", R_AOK, lstLen, lst); diff --git a/print/hplip3/files/patch-pcard_fat.c b/print/hplip3/files/patch-pcard_fat.c deleted file mode 100644 index 805b9ba39d47..000000000000 --- a/print/hplip3/files/patch-pcard_fat.c +++ /dev/null @@ -1,14 +0,0 @@ ---- pcard/fat.c.orig Tue May 23 15:25:02 2006 -+++ pcard/fat.c Tue May 23 15:25:54 2006 -@@ -27,7 +27,11 @@ - \*****************************************************************************/ - - #include <stdlib.h> -+#ifdef __FreeBSD__ -+#include <inttypes.h> -+#else - #include <stdint.h> -+#endif - #include <stdio.h> - #include <string.h> - #include <unistd.h> diff --git a/print/hplip3/files/patch-pcard_pcardext_pcardext.c b/print/hplip3/files/patch-pcard_pcardext_pcardext.c deleted file mode 100644 index 133c6b2c5879..000000000000 --- a/print/hplip3/files/patch-pcard_pcardext_pcardext.c +++ /dev/null @@ -1,19 +0,0 @@ ---- pcard/pcardext/pcardext.c.orig Tue May 23 15:43:36 2006 -+++ pcard/pcardext/pcardext.c Tue May 23 15:44:43 2006 -@@ -80,6 +80,7 @@ - - PyObject * pcardext_mount( PyObject * self, PyObject * args ) - { -+ int i; - if( !PyArg_ParseTuple( args, "OO", &readsectorFunc, &writesectorFunc ) ) - { - return Py_BuildValue( "i", 1 ); -@@ -93,7 +94,7 @@ - Py_INCREF( readsectorFunc ); - Py_INCREF( writesectorFunc ); - -- int i = FatInit(); -+ i = FatInit(); - /*char buf[1024]; - sprintf( buf, "print 'FatInit()=%d\n'", i ); - PyRun_SimpleString( buf );*/ diff --git a/print/hplip3/files/patch-prnt_hpijs_configure b/print/hplip3/files/patch-prnt_hpijs_configure deleted file mode 100644 index 7e6c63c94649..000000000000 --- a/print/hplip3/files/patch-prnt_hpijs_configure +++ /dev/null @@ -1,56 +0,0 @@ ---- prnt/hpijs/configure.orig Wed Oct 18 00:58:44 2006 -+++ prnt/hpijs/configure Wed Oct 18 01:04:20 2006 -@@ -8481,7 +8481,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" -+LIBS=" $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -8539,7 +8539,7 @@ - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 - echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 - if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="" - else - - lt_cv_dlopen="dyld" -@@ -8807,7 +8807,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" -+LIBS=" $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -8865,7 +8865,7 @@ - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 - echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 - if test $ac_cv_lib_dl_dlopen = yes; then -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="" - else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 - echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -@@ -20319,7 +20319,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldl $LIBS" -+LIBS=" $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -20380,7 +20380,7 @@ - cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBDL 1 - _ACEOF -- LIBS="-ldl $LIBS" -+ LIBS="$LIBS" - else - { { echo "$as_me:$LINENO: error: \"cannot find libdl support\"" >&5 - echo "$as_me: error: \"cannot find libdl support\"" >&2;}
\ No newline at end of file diff --git a/print/hplip3/files/patch-prnt_hpijs_djgenericvip.h b/print/hplip3/files/patch-prnt_hpijs_djgenericvip.h deleted file mode 100644 index b6641350f13a..000000000000 --- a/print/hplip3/files/patch-prnt_hpijs_djgenericvip.h +++ /dev/null @@ -1,11 +0,0 @@ -diff -uNr hplip-2.7.6.old/prnt/hpijs/djgenericvip.h hplip-2.7.6.new/prnt/hpijs/djgenericvip.h ---- prnt/hpijs/djgenericvip.h.orig 2007-07-06 10:31:25.000000000 -0700 -+++ prnt/hpijs/djgenericvip.h 2007-07-06 10:48:25.000000000 -0700 -@@ -52,6 +52,7 @@ - virtual PHOTOTRAY_STATE PhotoTrayEngaged (BOOL bQueryPrinter); - //! Returns TRUE if a hagaki feed is present in printer. - virtual BOOL HagakiFeedPresent(BOOL bQueryPrinter); -+ virtual DATA_FORMAT GetDataFormat () { return RASTER_STRIP; } - - #ifdef APDK_AUTODUPLEX - //!Returns TRUE if duplexer and hagaki feed (combined) unit is present in printer. diff --git a/print/hplip3/files/patch-prnt_hpijs_hpijsfax.cpp b/print/hplip3/files/patch-prnt_hpijs_hpijsfax.cpp index 7a3675b9cdba..3f0d49e84a3a 100644 --- a/print/hplip3/files/patch-prnt_hpijs_hpijsfax.cpp +++ b/print/hplip3/files/patch-prnt_hpijs_hpijsfax.cpp @@ -1,25 +1,11 @@ ---- prnt/hpijs/hpijsfax.cpp.orig Tue Feb 21 13:19:54 2006 -+++ prnt/hpijs/hpijsfax.cpp Fri May 26 11:56:49 2006 -@@ -39,7 +39,11 @@ - #include <string.h> - #include <unistd.h> - #include <fcntl.h> -+#ifdef __FreeBSD__ -+#include <inttypes.h> -+#else - #include <stdint.h> -+#endif - #include <time.h> - #include <sys/time.h> - #include <math.h> -@@ -297,8 +301,8 @@ +--- prnt/hpijs/hpijsfax.cpp.orig Sat Oct 6 11:33:52 2007 ++++ prnt/hpijs/hpijsfax.cpp Sun Oct 7 15:06:23 2007 +@@ -295,7 +295,7 @@ memset (&tv, 0, sizeof (tv)); gettimeofday (&tv, NULL); - cur_time = localtime (&tv.tv_sec); -- memset (hpFileName, 0, 256); -+ cur_time = localtime ((const time_t *)&tv.tv_sec); -+ memset (hpFileName, 0, 256); ++ cur_time = localtime((const time_t *)&tv.tv_sec); + memset (hpFileName, 0, 256); sprintf (hpFileName, "%s/hplipfax%d%d%d%d%d%d.g3", getenv ("TMPDIR"), cur_time->tm_year+1900, cur_time->tm_mon+1, cur_time->tm_mday, - cur_time->tm_hour, cur_time->tm_min, cur_time->tm_sec); diff --git a/print/hplip3/files/patch-scan_sane-mfpdtf.c b/print/hplip3/files/patch-scan_sane-mfpdtf.c deleted file mode 100644 index 84fb6edefa58..000000000000 --- a/print/hplip3/files/patch-scan_sane-mfpdtf.c +++ /dev/null @@ -1,56 +0,0 @@ ---- scan/sane/mfpdtf.c.orig Sat Nov 11 00:22:14 2006 -+++ scan/sane/mfpdtf.c Mon Dec 25 01:43:52 2006 -@@ -157,7 +157,7 @@ - int MfpdtfReadService( Mfpdtf_t mfpdtf ) - { - int result = 0; -- int datalen, blockLength, headerLength; -+ int datalen, blockLength, headerLength, r; - - if( mfpdtf->read.fixedBlockBytesRemaining <= 0 ) - { -@@ -169,7 +169,7 @@ - - //READ( &mfpdtf->read.fixedHeader, datalen ); - -- int r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)&mfpdtf->read.fixedHeader, datalen ); -+ r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)&mfpdtf->read.fixedHeader, datalen ); - - if( r!= datalen ) - { -@@ -207,7 +207,7 @@ - - //READ( mfpdtf->read.pVariantHeader, datalen ); - -- int r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)mfpdtf->read.pVariantHeader, datalen ); -+ r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)mfpdtf->read.pVariantHeader, datalen ); - - if( r!= datalen ) - { -@@ -259,7 +259,7 @@ - - //READ( &id, datalen ); - -- int r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)&id, datalen ); -+ r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)&id, datalen ); - - if( r!= datalen ) - { -@@ -296,7 +296,7 @@ - datalen = sizeof( mfpdtf->read.imageStartPageRecord ); - // DBG( 0, "Reading start of page record.\n" ); - // DBG( 0, "********************************** SOP RECORD **********************************.\n" ); -- int r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)&mfpdtf->read.imageStartPageRecord, datalen ); -+ r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)&mfpdtf->read.imageStartPageRecord, datalen ); - - if( r!= datalen ) - { -@@ -314,7 +314,7 @@ - datalen = sizeof( mfpdtf->read.imageEndPageRecord ); - // DBG( 0, "Reading end of page record.\n" ); - // DBG( 0, "********************************** EOP RECORD **********************************.\n" ); -- int r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)&mfpdtf->read.imageEndPageRecord, datalen ); -+ r = MfpdtfReadGeneric( mfpdtf, (unsigned char *)&mfpdtf->read.imageEndPageRecord, datalen ); - - if( r!= datalen ) - { diff --git a/print/hplip3/files/patch-scan_sane-pml.c b/print/hplip3/files/patch-scan_sane-pml.c deleted file mode 100644 index 0bb93d4eb03a..000000000000 --- a/print/hplip3/files/patch-scan_sane-pml.c +++ /dev/null @@ -1,20 +0,0 @@ ---- scan/sane/pml.c.orig Tue May 23 15:13:18 2006 -+++ scan/sane/pml.c Tue May 23 15:13:55 2006 -@@ -725,7 +725,7 @@ - IP_IMAGE_TRAITS traits; - IP_XFORM_SPEC xforms[IP_MAX_XFORMS], * pXform = xforms; - int stat = SANE_STATUS_DEVICE_BUSY; -- int i, bsize, state, wResult, index, r; -+ int i, bsize, state, wResult, index, r, mmWidth; - int oldStuff = (hpaio->preDenali || hpaio->fromDenali || hpaio->denali) ? 1 : 0; - - if (hpaio->cmd_channelid < 0) -@@ -919,7 +919,7 @@ - hpaio->scanParameters.lines = MILLIMETERS_TO_PIXELS(hpaio->bryRange.max, hpaio->effectiveResolution); - } - -- int mmWidth = PIXELS_TO_MILLIMETERS(traits.iPixelsPerRow, hpaio->effectiveResolution); -+ mmWidth = PIXELS_TO_MILLIMETERS(traits.iPixelsPerRow, hpaio->effectiveResolution); - - /* Set up X_CROP xform. */ - pXform->aXformInfo[IP_CROP_LEFT].dword = MILLIMETERS_TO_PIXELS( hpaio->effectiveTlx, hpaio->effectiveResolution ); |