Opened 15 years ago

Closed 15 years ago

#24458 closed update (fixed)

new version of libgphoto2

Reported by: Lars.Rasmusson@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libgphoto2

Description (last modified by jmroot (Joshua Root))

Here is a patch. I updated the version number and checksums in the Portfile. I had to add a patch that I got from the upstream SVN repository of libgphoto2. It will be included in the next version. It adds a check if usbscsi is supported and ifdefs away the code if not (which happens on darwin).

diff -rNup /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/libgphoto2/Portfile ./Portfile
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/libgphoto2/Portfile	2010-03-15 17:31:33.000000000 +0100
+++ ./Portfile	2010-04-12 20:29:41.000000000 +0200
@@ -2,7 +2,7 @@
 
 PortSystem          1.0
 name                libgphoto2
-version             2.4.5
+version             2.4.9
 revision            3
 categories          devel
 maintainers         nomaintainer
@@ -17,9 +17,9 @@ homepage            http://www.gphoto.or
 master_sites        sourceforge:gphoto
 use_bzip2           yes
 
-checksums           md5     490d7f6def94ff9532593e62aed946e3 \
-                    sha1    b1f51f0587afbe454db411f9005bd6ce5138156b \
-                    rmd160  b5add1b9d13079578c113f45a11eafa8372c1c84
+checksums           md5     32b233189e3df7e5e67d2a81163682b8 \
+                    sha1    7d876fd650430e4f52fe10e53f378688e6026387 \
+                    rmd160  1af4e817281d6bfac1650a0b427a2903c997a9bb
 
 depends_build       port:pkgconfig
 depends_lib         port:dbus \
@@ -31,7 +31,7 @@ depends_lib         port:dbus \
                     port:libtool
 
 patchfiles          patch-configure.diff patch-configure-nodoxygen.diff \
-                    patch-camlibs_Makefile.in.diff
+                    patch-camlibs_Makefile.in.diff patch-usbscsi-autoconf.diff
 
 configure.cflags-append   -I${prefix}/include -no-cpp-precomp
 configure.args      --mandir=${prefix}/share/man \
@@ -47,4 +47,3 @@ variant with_doxygen description {Use do
    depends_build-append   port:doxygen
    patchfiles-delete      patch-configure-nodoxygen.diff
 }
-
diff -rNup /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/libgphoto2/files/patch-usbscsi-autoconf.diff ./files/patch-usbscsi-autoconf.diff
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/libgphoto2/files/patch-usbscsi-autoconf.diff	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-usbscsi-autoconf.diff	2010-04-12 20:29:15.000000000 +0200
@@ -0,0 +1,35 @@
+--- libgphoto2_port/usbscsi/linux.c	2010/03/29 09:39:26	12857
++++ libgphoto2_port/usbscsi/linux.c	2010/04/11 19:01:46	12992
+@@ -27,8 +27,12 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+-#include <sys/ioctl.h>
+-#include <scsi/sg.h>
++#ifdef HAVE_SYS_IOCTL_H
++# include <sys/ioctl.h>
++#endif
++#ifdef HAVE_SCSI_SG_H
++# include <scsi/sg.h>
++#endif
+ #ifdef HAVE_LOCKDEV
+ #  include <lockdev.h>
+ #endif
+@@ -297,6 +301,7 @@
+ static int gp_port_usbscsi_send_scsi_cmd (GPPort *port, int to_dev, char *cmd,
+ 	int cmd_size, char *sense, int sense_size, char *data, int data_size)
+ {
++#ifdef HAVE_SCSI_SG_H
+ 	sg_io_hdr_t io_hdr;
+ 
+ 	if (!port)
+@@ -328,6 +333,9 @@
+ 	}
+ 
+ 	return GP_OK;
++#else
++	return GP_ERROR_NOT_SUPPORTED;
++#endif
+ }
+ 
+ static int

Attachments (1)

patch.txt (2.8 KB) - added by Lars.Rasmusson@… 15 years ago.
Here is the patch as an attachment.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by Lars.Rasmusson@…

Attachment: patch.txt added

Here is the patch as an attachment.

comment:1 Changed 15 years ago by jmroot (Joshua Root)

Description: modified (diff)
Port: libgphoto2 added; libgport2 removed
Version: 1.8.2

comment:2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Thanks, updated in r66813.

Note: See TracTickets for help on using tickets.