[sane-devel] Re: Darwin/MacOSX

Peter O'Gorman peter at pogma.com
Thu Nov 28 12:12:03 GMT 2002


On Thursday, November 28, 2002, at 08:47  PM, Karl Heinz Kremer wrote:

> It's possilbe that it's not a problem with Sane. There are two other 
> systems
> involved: libusb and Darwin. My plan is to replace libusb with some 
> code that
> talks to the Darwin USB functions directly. I started this some time 
> ago, and
> the first result was that I found a bug in Sane (which is fixed in 
> CVS).
> Somebody reported success yesterday or the day before with a Canon 
> scanner
> under OS X. Henning asked for more information, but I have not seen 
> anything
> yet.
>

Okay, okay, I get the message :)

Note that a dlopen compatibility library is needed, I suggest using 
dlcompat <http://www.opendarwin.org/projects/dlcompat>, but I am a 
little biased :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sane-backends-1.0.9.patch.gz
Type: application/x-gzip
Size: 1137 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20021128/d55b67ef/attachment.bin>
-------------- next part --------------


Here is my patch in full (watch for line wrapping) also attached as a 
.gz:

diff -Naur sane-backends-1.0.9.orig/backend/Makefile.in 
sane-backends-1.0.9/backend/Makefile.in
--- sane-backends-1.0.9.orig/backend/Makefile.in        Sun Sep  1 
22:46:53 2002
+++ sane-backends-1.0.9/backend/Makefile.in     Sun Nov 24 19:40:38 2002
@@ -139,7 +139,7 @@
  libsane-%.la: %.lo %-s.lo $(EXTRA) $(LIBOBJS)
         @$(LIBTOOL) $(MLINK) $(CC) -export-dynamic -o $@ $($*_LIBS) \
         $(LDFLAGS) $(BACKENDLIBS) $^ -rpath $(libsanedir) \
-       -version-info $(V_MAJOR):$(V_REV):$(V_MINOR)
+       -version-info $(V_MAJOR):$(V_REV):$(V_MINOR) -module

  %-s.lo:        %-s.c
         @$(LIBTOOL) $(MCOMP) $(COMPILE) -DSTUBS -DBACKEND_NAME=$* $<
diff -Naur sane-backends-1.0.9.orig/backend/dll.c 
sane-backends-1.0.9/backend/dll.c
--- sane-backends-1.0.9.orig/backend/dll.c      Sun Apr 21 23:13:40 2002
+++ sane-backends-1.0.9/backend/dll.c   Sun Nov 24 19:40:38 2002
@@ -267,7 +267,11 @@
  # ifdef __hpux
  #   define POSTFIX ".sl.%u"
  # else
+#  ifdef __APPLE__
+#   define POSTFIX ".%u.so"
+#  else
  #   define POSTFIX ".so.%u"
+#  endif
  # endif
    mode = getenv ("LD_BIND_NOW") ? RTLD_NOW : RTLD_LAZY;
  #elif defined(HAVE_SHL_LOAD)
diff -Naur sane-backends-1.0.9.orig/configure 
sane-backends-1.0.9/configure
--- sane-backends-1.0.9.orig/configure  Wed Oct 23 05:19:22 2002
+++ sane-backends-1.0.9/configure       Sun Nov 24 19:40:38 2002
@@ -6571,7 +6571,7 @@
      #        cross-compilation, but unfortunately the echo tests do not
      #        yet detect zsh echo's removal of \ escapes.  Also zsh 
mangles
      #       `"' quotes if we put them in here... so don't!
-    archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || 
echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs 
$deplibs$linker_flags -install_name $rpath/$soname $verstring'
+    archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || 
echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs 
$deplibs$linker_flags $(test .$module = .yes || (echo -install_name 
$rpath/$soname $verstring))'
      # We need to add '_' to the symbols in $export_symbols first
      #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
      hardcode_direct=yes
diff -Naur sane-backends-1.0.9.orig/sanei/sanei_usb.c 
sane-backends-1.0.9/sanei/sanei_usb.c
--- sane-backends-1.0.9.orig/sanei/sanei_usb.c  Sat Oct 12 20:06:05 2002
+++ sane-backends-1.0.9/sanei/sanei_usb.c       Sun Nov 24 19:41:34 2002
@@ -542,7 +542,7 @@
                      "(address: %d), ignoring the new one\n",
                      devices[devcount].bulk_in_ep);
               else
-               devices[devcount].bulk_in_ep = address;
+               devices[devcount].bulk_in_ep =  
endpoint->bEndpointAddress;
             }
           else
             {
@@ -551,7 +551,7 @@
                      "(address: %d), ignoring the new one\n",
                      devices[devcount].bulk_out_ep);
               else
-               devices[devcount].bulk_out_ep = address;
+               devices[devcount].bulk_out_ep =  
endpoint->bEndpointAddress;
             }
         }
  #else /* not HAVE_LIBUSB */



More information about the sane-devel mailing list