Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2000 08:51:43 -0700 (PDT)
From:      tkato@prontomail.ne.jp
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/21207: Update port: graphics/sane to 1.0.3 (fix ports/20595)
Message-ID:  <20000911155143.1925E37B43C@hub.freebsd.org>

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

>Number:         21207
>Category:       ports
>Synopsis:       Update port: graphics/sane to 1.0.3 (fix ports/20595)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 11 09:00:04 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        4.1-RELEASE i386
>Organization:
>Environment:
>Description:
- Update to version 1.0.3

New file:
patches/patch-ae

This PR supersedes ports/20595.

>How-To-Repeat:

>Fix:
diff -urN /usr/ports/graphics/sane/Makefile graphics/sane/Makefile
--- /usr/ports/graphics/sane/Makefile	Sat Jun 17 08:46:38 2000
+++ graphics/sane/Makefile	Mon Aug 14 20:24:37 2000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	sane
-PORTVERSION=	1.0.2
+PORTVERSION=	1.0.3
 CATEGORIES=	graphics
 MASTER_SITES=	${MASTER_SITE_SUNSITE} \
 		ftp://ftp.mostang.com/pub/sane/
@@ -21,17 +21,21 @@
 
 USE_GMAKE=	yes
 USE_LIBTOOL=	yes
-INSTALLS_SHLIB=	yes
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 		GTK_CONFIG="${GTK_CONFIG}" \
 		LIBS="-L${LOCALBASE}/lib"
 CONFIGURE_ARGS=	--disable-gtktest
+INSTALLS_SHLIB=	yes
 
-MAN1=	saned.1 scanimage.1 xscanimage.1
-MAN5=	sane-abaton.5 sane-agfafocus.5 sane-apple.5 sane-dll.5 sane-dc25.5 \
-	sane-dmc.5 sane-epson.5 sane-hp.5 sane-microtek.5 sane-microtek2.5 \
-	sane-mustek.5 sane-net.5 sane-pint.5 sane-pnm.5 sane-umax.5 \
-	sane-qcam.5 sane-scsi.5 sane-artec.5 sane-fujitsu.5 sane-sharp.5
+MAN1=	saned.1 scanimage.1 xcam.1 xscanimage.1
+MAN5=	sane-abaton.5 sane-agfafocus.5 sane-apple.5 sane-artec.5 \
+	sane-avision.5 sane-canon.5 sane-coolscan.5 sane-dc210.5 \
+	sane-dc25.5 sane-dll.5 sane-dmc.5 sane-epson.5 \
+	sane-fujitsu.5 sane-hp.5 sane-microtek.5 sane-microtek2.5 \
+	sane-mustek.5 sane-mustek_pp.5 sane-net.5 sane-pint.5 \
+	sane-plustek.5 sane-pnm.5 sane-qcam.5 sane-ricoh.5 \
+	sane-s9036.5 sane-scsi.5 sane-sharp.5 sane-snapscan.5 \
+	sane-st400.5 sane-tamarack.5 sane-umax.5 sane-v4l.5
 
 pre-configure:
 	@${ECHO} "*** Note: SANE can be built with an X scanner interface"
diff -urN /usr/ports/graphics/sane/files/md5 graphics/sane/files/md5
--- /usr/ports/graphics/sane/files/md5	Mon May  1 21:47:21 2000
+++ graphics/sane/files/md5	Mon Aug 14 18:44:55 2000
@@ -1 +1 @@
-MD5 (sane-1.0.2.tar.gz) = 8cd5d092225f98032db88a221a1d6efe
+MD5 (sane-1.0.3.tar.gz) = c1c2e08358e0196109724ecdbe316c7b
diff -urN /usr/ports/graphics/sane/patches/patch-ae graphics/sane/patches/patch-ae
--- /usr/ports/graphics/sane/patches/patch-ae	Thu Jan  1 09:00:00 1970
+++ graphics/sane/patches/patch-ae	Fri Sep  8 22:39:26 2000
@@ -0,0 +1,180 @@
+--- sanei/sanei_scsi.c.orig	Sat Aug 12 23:54:15 2000
++++ sanei/sanei_scsi.c	Fri Sep  8 22:38:49 2000
+@@ -2424,6 +2424,169 @@
+    cam_freeccb(ccb);
+    return SANE_STATUS_GOOD;
+ }
++
++#define WE_HAVE_FIND_DEVICES
++
++int
++cam_compare_inquiry(int fd, path_id_t path_id,
++		    target_id_t target_id, lun_id_t target_lun,
++		    const char *vendor, const char *product, const char *type)
++{
++  struct ccb_dev_match	cdm;
++  struct device_match_pattern *pattern;
++  struct scsi_inquiry_data *inq;
++  int retval = 0;
++
++  /* build ccb for device match */
++  bzero(&cdm, sizeof(cdm));
++  cdm.ccb_h.func_code = XPT_DEV_MATCH;
++
++  /* result buffer */
++  cdm.match_buf_len = sizeof(struct dev_match_result);
++  cdm.matches = (struct dev_match_result *)malloc(cdm.match_buf_len);
++  cdm.num_matches = 0;
++
++  /* pattern buffer */
++  cdm.num_patterns = 1;
++  cdm.pattern_buf_len = sizeof(struct dev_match_pattern);
++  cdm.patterns = (struct dev_match_pattern *)malloc(cdm.pattern_buf_len);
++
++  /* assemble conditions */
++  cdm.patterns[0].type = DEV_MATCH_DEVICE;
++  pattern = &cdm.patterns[0].pattern.device_pattern;
++  pattern->flags = DEV_MATCH_PATH | DEV_MATCH_TARGET | DEV_MATCH_LUN;
++  pattern->path_id = path_id;
++  pattern->target_id = target_id;
++  pattern->target_lun = target_lun;
++  
++  if (ioctl(fd, CAMIOCOMMAND, &cdm) == -1) {
++    DBG (1, "error sending CAMIOCOMMAND ioctl");
++    retval = -1;
++    goto ret;
++  }
++
++  if ((cdm.ccb_h.status != CAM_REQ_CMP)
++      || ((cdm.status != CAM_DEV_MATCH_LAST)
++	  && (cdm.status != CAM_DEV_MATCH_MORE))) {
++    DBG (1, "got CAM error %#x, CDM error %d\n",
++	 cdm.ccb_h.status, cdm.status);
++    retval = -1;
++    goto ret;
++  }
++
++  if (cdm.num_matches == 0) {
++    DBG (1, "not found\n");
++    retval = -1;
++    goto ret;
++  }
++	    
++  if (cdm.matches[0].type != DEV_MATCH_DEVICE) {
++    DBG (1, "no device match\n");
++    retval = -1;
++    goto ret;
++  }
++
++  inq = &cdm.matches[0].result.device_result.inq_data;
++  if ((vendor && cam_strmatch(inq->vendor, vendor, SID_VENDOR_SIZE)) ||
++      (product && cam_strmatch(inq->product, product, SID_PRODUCT_SIZE)))
++    retval = 1;
++ 
++ ret:
++  free(cdm.patterns);
++  free(cdm.matches);
++  return(retval);
++}
++
++void
++sanei_scsi_find_devices (const char *findvendor, const char *findmodel,
++			 const char *findtype,
++			 int findbus, int findchannel, int findid, int findlun,
++			 SANE_Status (*attach) (const char *dev))
++{
++  int		fd;
++  struct ccb_dev_match	cdm;
++  struct periph_match_pattern *pattern;
++  struct periph_match_result *result;
++  int		i;
++  char devname[16];
++
++  DBG_INIT();
++
++  if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) {
++    DBG (1, "could not open %s\n", XPT_DEVICE);
++    return;
++  }
++
++  /* build ccb for device match */
++  bzero(&cdm, sizeof(cdm));
++  cdm.ccb_h.func_code = XPT_DEV_MATCH;
++
++  /* result buffer */
++  cdm.match_buf_len = sizeof(struct dev_match_result) * 100;
++  cdm.matches = (struct dev_match_result *)malloc(cdm.match_buf_len);
++  cdm.num_matches = 0;
++
++  /* pattern buffer */
++  cdm.num_patterns = 1;
++  cdm.pattern_buf_len = sizeof(struct dev_match_pattern);
++  cdm.patterns = (struct dev_match_pattern *)malloc(cdm.pattern_buf_len);
++
++  /* assemble conditions ... findchannel is ignored */
++  cdm.patterns[0].type = DEV_MATCH_PERIPH;
++  pattern = &cdm.patterns[0].pattern.periph_pattern;
++  pattern->flags = PERIPH_MATCH_NAME;
++  strcpy(pattern->periph_name, "pass");
++  if (findbus != -1) {
++    pattern->path_id = findbus;
++    pattern->flags |= PERIPH_MATCH_PATH;
++  }    
++  if (findid != -1) {
++    pattern->target_id = findid;
++    pattern->flags |= PERIPH_MATCH_TARGET;
++  }
++  if (findlun != -1) {
++    pattern->target_lun = findlun;
++    pattern->flags |= PERIPH_MATCH_LUN;
++  }
++
++  /* result loop */
++  do {
++    if (ioctl(fd, CAMIOCOMMAND, &cdm) == -1) {
++      DBG (1, "error sending CAMIOCOMMAND ioctl");
++      break;
++    }
++
++    if ((cdm.ccb_h.status != CAM_REQ_CMP)
++	|| ((cdm.status != CAM_DEV_MATCH_LAST)
++	    && (cdm.status != CAM_DEV_MATCH_MORE))) {
++      DBG (1, "got CAM error %#x, CDM error %d\n", 
++	   cdm.ccb_h.status, cdm.status);
++      break;
++    }
++    
++    for (i = 0; i < cdm.num_matches; i++) {
++      if (cdm.matches[i].type != DEV_MATCH_PERIPH)
++	continue;
++      result = &cdm.matches[i].result.periph_result;
++      DBG (4, "%s%d on scbus%d %d:%d\n",
++	      result->periph_name, result->unit_number,
++	      result->path_id, result->target_id, result->target_lun);
++      if (cam_compare_inquiry(fd, result->path_id,
++			      result->target_id, result->target_lun,
++			      findvendor, findmodel, findtype) == 0) {
++	sprintf(devname, "/dev/%s%d", result->periph_name, result->unit_number);
++	(*attach) (devname);
++      }
++    }
++  } while ((cdm.ccb_h.status == CAM_REQ_CMP)
++	   && (cdm.status == CAM_DEV_MATCH_MORE));
++
++  free(cdm.patterns);
++  free(cdm.matches);
++  close(fd);
++  return;
++}
++
+ #endif
+ 
+ 
+@@ -3722,6 +3885,7 @@
+ 			 int findbus, int findchannel, int findid, int findlun,
+ 			 SANE_Status (*attach) (const char *dev))
+ {
++  DBG_INIT();
+   DBG (1, "sanei_scsi_find_devices: not implemented for this platform\n");
+ }
+ 
diff -urN /usr/ports/graphics/sane/pkg/PLIST graphics/sane/pkg/PLIST
--- /usr/ports/graphics/sane/pkg/PLIST	Fri Jun 16 21:43:59 2000
+++ graphics/sane/pkg/PLIST	Mon Sep 11 23:57:56 2000
@@ -18,13 +18,16 @@
 etc/sane.d/microtek.conf
 etc/sane.d/microtek2.conf
 etc/sane.d/mustek.conf
+etc/sane.d/mustek_pp.conf
 etc/sane.d/net.conf
+etc/sane.d/plustek.conf
 etc/sane.d/ricoh.conf
 etc/sane.d/s9036.conf
 etc/sane.d/saned.conf
 etc/sane.d/sharp.conf
 etc/sane.d/snapscan.conf
 etc/sane.d/sp15c.conf
+etc/sane.d/st400.conf
 etc/sane.d/tamarack.conf
 etc/sane.d/umax.conf
 include/sane/config.h
@@ -35,6 +38,7 @@
 include/sane/sanei_codec_bin.h
 include/sane/sanei_debug.h
 include/sane/sanei_net.h
+include/sane/sanei_pa4s2.h
 include/sane/sanei_scsi.h
 include/sane/sanei_wire.h
 include/sane/saneopts.h
@@ -92,9 +96,15 @@
 lib/sane/libsane-mustek.a
 lib/sane/libsane-mustek.so
 lib/sane/libsane-mustek.so.1
+lib/sane/libsane-mustek_pp.a
+lib/sane/libsane-mustek_pp.so
+lib/sane/libsane-mustek_pp.so.1
 lib/sane/libsane-net.a
 lib/sane/libsane-net.so
 lib/sane/libsane-net.so.1
+lib/sane/libsane-plustek.a
+lib/sane/libsane-plustek.so
+lib/sane/libsane-plustek.so.1
 lib/sane/libsane-pnm.a
 lib/sane/libsane-pnm.so
 lib/sane/libsane-pnm.so.1
@@ -113,6 +123,9 @@
 lib/sane/libsane-sp15c.a
 lib/sane/libsane-sp15c.so
 lib/sane/libsane-sp15c.so.1
+lib/sane/libsane-st400.a
+lib/sane/libsane-st400.so
+lib/sane/libsane-st400.so.1
 lib/sane/libsane-tamarack.a
 lib/sane/libsane-tamarack.so
 lib/sane/libsane-tamarack.so.1


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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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