Hi,

Samuel Thibault, le Tue 24 Jul 2007 22:54:03 +0200, a écrit :
> The Hurd doesn't have USB support, so libusb can't be build.  In the
> meanwhile, please disable the libusb-dev dependency in libgphoto2, as
> the attached patch does.
> 
> Also attached is a patch that fixes compilation: the Hurd has no such
> hard limit like PATH_MAX, and actually the tmppath buffer is useless.

Here is an updated patch. A new compilation fix was needed for
libgphoto2_port/serial/unix.c because it uses IXANY and O_NDELAY without
defining _BSD_SOURCE (yes, it compiles fine under Linux because Linux
headers are bloated).

Could you please apply it? In the meanwhile, sane can't be compiled, and
hence pike can't either, hence swig either, hence subversion either...

Samuel
diff -ur libgphoto2-2.4.0/debian/control libgphoto2-2.4.0-mine/debian/control
--- libgphoto2-2.4.0/debian/control     2007-08-14 21:25:15.708378000 +0200
+++ libgphoto2-2.4.0-mine/debian/control        2007-08-14 21:20:30.000000000 
+0200
@@ -8,7 +8,7 @@
                libtool,
                libltdl3-dev,
                zlib1g-dev,
-               libusb-dev (>= 1:0.1.5),
+               libusb-dev (>= 1:0.1.5) [!hurd-i386],
                libgpmg1-dev | not+linux-gnu,
                pkg-config,
                libexif-dev (>= 0.5.9),
@@ -25,7 +25,7 @@
 Provides: libgphoto2port-dev, libgphoto2-dev
 Replaces: libgphoto2port-dev, libgphoto2-dev
 Conflicts: libgphoto2port-dev, gphoto2-dev (<= 2.1.1)
-Depends: libgphoto2-2 (=${Source-Version}), libexif-dev, libusb-dev, 
libc6-dev, pkg-config
+Depends: libgphoto2-2 (=${Source-Version}), libexif-dev, libusb-dev 
[!hurd-i386], libc6-dev, pkg-config
 Description: gphoto2 digital camera library (development files)
  The gphoto2 library can be used by applications to access various
  digital camera models.
--- libgphoto2-2.4.0/debian/rules       2007-08-14 21:25:15.148562000 +0200
+++ libgphoto2-2.4.0-mine/debian/rules  2007-08-14 23:15:45.148562000 +0200
@@ -15,6 +15,10 @@
   endif
 endif
 
+ifeq ($(DEB_HOST_ARCH_OS),hurd)
+  CONFIGURE_OPTIONS += --without-libusb
+endif
+
 major=2
 
 CFLAGS = -g
@@ -31,7 +35,7 @@
 configure: configure-stamp
 configure-stamp: patch
        dh_testdir
-       CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --sysconfdir=/etc 
--mandir=\$${prefix}/share/man --with-drivers=all --enable-static
+       CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --sysconfdir=/etc 
--mandir=\$${prefix}/share/man --with-drivers=all --enable-static 
$(CONFIGURE_OPTIONS)
        touch configure-stamp
 
 build: build-stamp
@@ -84,7 +88,7 @@
                debian/libgphoto2-port0/usr/share/doc/libgphoto2-port0
        install -D packaging/generic/check-ptp-camera 
debian/libgphoto2-$(major)/lib/udev/check-ptp-camera
        rm debian/tmp/usr/lib/udev/check-ptp-camera
-       test -e debian/tmp/usr/lib/udev/check-mtp-device && \
+       -test -e debian/tmp/usr/lib/udev/check-mtp-device && \
                mkdir -p debian/libgphoto2-port0/lib/udev && \
                mv debian/tmp/usr/lib/udev/check-mtp-device \
                        debian/libgphoto2-port0/lib/udev/check-mtp-device
diff -ur libgphoto2-2.4.0/camlibs/digita/digita.c 
libgphoto2-2.4.0-mine/camlibs/digita/digita.c
--- libgphoto2-2.4.0/camlibs/digita/digita.c    2007-07-27 02:35:51.049064000 
+0200
+++ libgphoto2-2.4.0-mine/camlibs/digita/digita.c       2007-08-14 
21:23:16.429195000 +0200
@@ -138,7 +138,6 @@
        /* Walk through all of the pictures building a list of folders */
        for (i = 0; i < camera->pl->num_pictures; i++) {
                int found;
-               char tmppath[PATH_MAX + 1];
                char *path;
 
                /* Check to make sure the path matches the folder we're */
@@ -159,22 +158,19 @@
                if (strchr(path, '/') != path + strlen(path) - 1)
                        continue;
 
-               strncpy(tmppath, path, MIN(strlen(path) - 1, PATH_MAX));
-               tmppath[strlen(path) - 1] = 0;
-
                found = 0;
                for (i1 = 0; i1 < gp_list_count(list); i1++) {
                        const char *name;
 
                        gp_list_get_name(list, i1, &name);
-                       if (!strcmp(name, tmppath)) {
+                       if (!strcmp(name, path)) {
                                found = 1;
                                break;
                        }
                }
 
                if (!found)
-                       gp_list_append(list, tmppath, NULL);
+                       gp_list_append(list, path, NULL);
        }
 
        return GP_OK;
--- libgphoto2-2.4.0/libgphoto2_port/serial/unix.c      2007-07-27 
02:36:13.875970000 +0200
+++ libgphoto2-2.4.0-mine/libgphoto2_port/serial/unix.c 2007-08-14 
22:38:12.402348000 +0200
@@ -27,6 +27,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#define _BSD_SOURCE
 #include "config.h"
 #include <gphoto2/gphoto2-port-library.h>
 

Reply via email to