summaryrefslogtreecommitdiff
path: root/devel/libgphoto2
diff options
context:
space:
mode:
authorsborrill <sborrill>2008-04-29 09:31:09 +0000
committersborrill <sborrill>2008-04-29 09:31:09 +0000
commit487f75e37fdf35f5610f1e9f4fd99ee73532a96c (patch)
tree2360f4b2dfb881d180c7785dbc89150be53954ab /devel/libgphoto2
parentefb32363ad6bf194c1312363121cee9206fdb1e8 (diff)
downloadpkgsrc-487f75e37fdf35f5610f1e9f4fd99ee73532a96c.tar.gz
Changes:
libgphoto2 2.4.1 This is a 2.4 release branch update. Package / System integration: * HAL FDI files now use "info.subsystem" instead of "info.bus", required by hal after March 2008. * Suppress another Olympus camera in FDI file that is better of done using Mass Storage only. libgphoto2_port: * Suppress more known network filesystems in "disk" autodetection * disabled usb_reset for Canon cameras in "usb", broke EOS cameras. PTP2 driver: * Merged all new Camera IDs from TRUNK. * Configuration bugfix for multiple options with the same name. * Capture bugfix for Nikon Coolpix * Various small bugfixes. Canon driver: * Increased the event timeout, so operations work again. * Fixed a bug in interval capture * some additional configuration values for newer cameras Mars driver: * Synced with SVN TRUNK (1:1 copy). * Better whitebalance postprocessing * Camera ids added * Decompression fixes Digigr8 driver: * Synced with SVN TRUNK (1:1 copy). * bugfixes Sonix driver: * Synced with SVN TRUNK (1:1 copy). * bugfixes + changes from 2.3.x
Diffstat (limited to 'devel/libgphoto2')
-rw-r--r--devel/libgphoto2/Makefile6
-rw-r--r--devel/libgphoto2/PLIST.common17
-rw-r--r--devel/libgphoto2/PLIST.common_end4
-rw-r--r--devel/libgphoto2/distinfo18
-rw-r--r--devel/libgphoto2/patches/patch-aa60
-rw-r--r--devel/libgphoto2/patches/patch-ac41
-rw-r--r--devel/libgphoto2/patches/patch-ad14
-rw-r--r--devel/libgphoto2/patches/patch-ae49
-rw-r--r--devel/libgphoto2/patches/patch-af13
-rw-r--r--devel/libgphoto2/patches/patch-ag115
-rw-r--r--devel/libgphoto2/patches/patch-ah12
-rw-r--r--devel/libgphoto2/patches/patch-ai14
-rw-r--r--devel/libgphoto2/patches/patch-aj14
-rw-r--r--devel/libgphoto2/patches/patch-ak10
14 files changed, 45 insertions, 342 deletions
diff --git a/devel/libgphoto2/Makefile b/devel/libgphoto2/Makefile
index 476d89e736c..2ebcc40de72 100644
--- a/devel/libgphoto2/Makefile
+++ b/devel/libgphoto2/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.39 2008/04/12 22:42:59 jlam Exp $
+# $NetBSD: Makefile,v 1.40 2008/04/29 09:31:38 sborrill Exp $
-DISTNAME= libgphoto2-2.3.1
-PKGREVISION= 4
+DISTNAME= libgphoto2-2.4.1
CATEGORIES= devel graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gphoto/}
EXTRACT_SUFX= .tar.bz2
@@ -32,6 +31,7 @@ post-install:
rm ${PREFIX}/include/gphoto2/gphoto2
.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/libltdl/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/libexif/buildlink3.mk"
diff --git a/devel/libgphoto2/PLIST.common b/devel/libgphoto2/PLIST.common
index 2f8e54defa7..abd099d88d0 100644
--- a/devel/libgphoto2/PLIST.common
+++ b/devel/libgphoto2/PLIST.common
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.common,v 1.11 2008/04/12 22:42:59 jlam Exp $
+@comment $NetBSD: PLIST.common,v 1.12 2008/04/29 09:31:38 sborrill Exp $
bin/gphoto2-config
bin/gphoto2-port-config
include/gphoto2/gphoto2-abilities-list.h
@@ -79,12 +79,13 @@ lib/libgphoto2/${PKGVERSION}/stv0674.la
lib/libgphoto2/${PKGVERSION}/stv0680.la
lib/libgphoto2/${PKGVERSION}/sx330z.la
lib/libgphoto2/${PKGVERSION}/toshiba_pdrm11.la
-lib/libgphoto2_port/0.7.1/disk.la
-lib/libgphoto2_port/0.7.1/ptpip.la
-lib/libgphoto2_port/0.7.1/serial.la
-${PLIST.libusb}lib/libgphoto2_port/0.7.1/usb.la
+lib/libgphoto2_port/0.8.0/disk.la
+lib/libgphoto2_port/0.8.0/ptpip.la
+lib/libgphoto2_port/0.8.0/serial.la
+${PLIST.libusb}lib/libgphoto2_port/0.8.0/usb.la
lib/pkgconfig/libgphoto2.pc
lib/pkgconfig/libgphoto2_port.pc
+lib/udev/check-mtp-device
lib/udev/check-ptp-camera
man/man3/libgphoto2.3
man/man3/libgphoto2_port.3
@@ -92,14 +93,15 @@ share/doc/libgphoto2/AUTHORS
share/doc/libgphoto2/COPYING
share/doc/libgphoto2/NEWS
share/doc/libgphoto2/README
+share/doc/libgphoto2/camlibs/README.9050
+share/doc/libgphoto2/camlibs/README.905C
share/doc/libgphoto2/camlibs/README.913C
+share/doc/libgphoto2/camlibs/README.913D
share/doc/libgphoto2/camlibs/README.adc65
share/doc/libgphoto2/camlibs/README.agfa-cl20
share/doc/libgphoto2/camlibs/README.aox
-share/doc/libgphoto2/camlibs/README.barbie
share/doc/libgphoto2/camlibs/README.canon
share/doc/libgphoto2/camlibs/README.clicksmart310
-share/doc/libgphoto2/camlibs/README.digigr8
share/doc/libgphoto2/camlibs/README.enigma13
share/doc/libgphoto2/camlibs/README.gsmart300
share/doc/libgphoto2/camlibs/README.iclick
@@ -163,6 +165,7 @@ share/locale/sv/LC_MESSAGES/libgphoto2-2.mo
share/locale/sv/LC_MESSAGES/libgphoto2_port-0.mo
share/locale/uk/LC_MESSAGES/libgphoto2-2.mo
share/locale/uk/LC_MESSAGES/libgphoto2_port-0.mo
+share/locale/vi/LC_MESSAGES/libgphoto2-2.mo
share/locale/vi/LC_MESSAGES/libgphoto2_port-0.mo
share/locale/zh_CN/LC_MESSAGES/libgphoto2-2.mo
share/locale/zh_CN/LC_MESSAGES/libgphoto2_port-0.mo
diff --git a/devel/libgphoto2/PLIST.common_end b/devel/libgphoto2/PLIST.common_end
index 936076941b2..2ea08169ee7 100644
--- a/devel/libgphoto2/PLIST.common_end
+++ b/devel/libgphoto2/PLIST.common_end
@@ -1,11 +1,11 @@
-@comment $NetBSD: PLIST.common_end,v 1.4 2007/01/03 08:20:18 adam Exp $
+@comment $NetBSD: PLIST.common_end,v 1.5 2008/04/29 09:31:38 sborrill Exp $
@dirrm share/libgphoto2/${PKGVERSION}/konica
@dirrm share/libgphoto2/${PKGVERSION}
@dirrm share/libgphoto2
@dirrm share/doc/libgphoto2/camlibs
@dirrm share/doc/libgphoto2
@dirrm lib/udev
-@dirrm lib/libgphoto2_port/0.7.1
+@dirrm lib/libgphoto2_port/0.8.0
@dirrm lib/libgphoto2_port
@dirrm lib/libgphoto2/${PKGVERSION}
@dirrm lib/libgphoto2
diff --git a/devel/libgphoto2/distinfo b/devel/libgphoto2/distinfo
index 5afa5d22488..3579d7555f2 100644
--- a/devel/libgphoto2/distinfo
+++ b/devel/libgphoto2/distinfo
@@ -1,14 +1,8 @@
-$NetBSD: distinfo,v 1.14 2007/06/21 03:40:23 minskim Exp $
+$NetBSD: distinfo,v 1.15 2008/04/29 09:31:38 sborrill Exp $
-SHA1 (libgphoto2-2.3.1.tar.bz2) = 13cc3f05ee298b33cd03ba4b772ef05a3aa49b97
-RMD160 (libgphoto2-2.3.1.tar.bz2) = ab678a5006a89ef1fe9f052dac1f9738961cc3a8
-Size (libgphoto2-2.3.1.tar.bz2) = 3230934 bytes
-SHA1 (patch-aa) = c1620348beddd102b2515987670786a54f9fcf08
+SHA1 (libgphoto2-2.4.1.tar.bz2) = acff08c45e2a69cde2646c321e6140ccd19f1951
+RMD160 (libgphoto2-2.4.1.tar.bz2) = 1671698eec9a1de601de5423d887e8a238a6f41b
+Size (libgphoto2-2.4.1.tar.bz2) = 3493514 bytes
SHA1 (patch-ab) = 921eea83471110dd85197a7171278c7d0556536b
-SHA1 (patch-ac) = f5d3e72163f6de85c4e5a9b5f4b32d8d628e7b30
-SHA1 (patch-ad) = 270c6f9a655631bc8d43a8d66851e902ea5ea8a5
-SHA1 (patch-ae) = 782807e35b748d80ad4bb8306eb576742d9e6f69
-SHA1 (patch-af) = b0dccb67bf51ad7570438ba8f65d0187f5fd4b17
-SHA1 (patch-ag) = 2c50b33a70dd9c4b41eb8fabc1f7fd03959660f3
-SHA1 (patch-ah) = 0fc27ed7d505e914cec954d98b201fd721995e0f
-SHA1 (patch-ai) = 4b349d60bea6e362c89c65d1ad13eccac26488e5
+SHA1 (patch-aj) = 111b26861d59dddf7a8d0998cb7ae6513114fe38
+SHA1 (patch-ak) = b1e9243cf4d4c78995184b357ba36bdfb0471d76
diff --git a/devel/libgphoto2/patches/patch-aa b/devel/libgphoto2/patches/patch-aa
deleted file mode 100644
index f84a9e91467..00000000000
--- a/devel/libgphoto2/patches/patch-aa
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD: patch-aa,v 1.7 2007/04/25 13:36:18 sborrill Exp $
-
---- camlibs/ptp2/library.c.orig 2007-01-30 20:06:58.000000000 -0500
-+++ camlibs/ptp2/library.c 2007-01-30 20:13:25.000000000 -0500
-@@ -50,23 +50,6 @@
- # define N_(String) (String)
- #endif
-
--/*
-- * On MacOS (Darwin) and *BSD we're not using glibc, but libiconv.
-- * glibc knows that UCS-2 is to be in the local machine endianness,
-- * whereas libiconv does not. So we construct this macro to get
-- * things right. Reportedly, glibc 2.1.3 has a bug so that UCS-2
-- * is always bigendian though, we would need to work around that
-- * too...
-- */
--#ifndef __GLIBC__
--#define UCS_2_INTERNAL "UCS-2-INTERNAL"
--#else
--#if (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1 )
--#error "Too old glibc. This versions iconv() implementation cannot be trusted."
--#endif
--#define UCS_2_INTERNAL "UCS-2"
--#endif
--
- #include "ptp.h"
- #include "ptp-bugs.h"
- #include "ptp-private.h"
-@@ -3619,7 +3602,7 @@
- CameraAbilities a;
- int ret, i, retried = 0;
- PTPParams *params;
-- char *curloc;
-+ char *camloc, *curloc;
-
- /* Make sure our port is either USB or PTP/IP. */
- if ((camera->port->type != GP_PORT_USB) && (camera->port->type != GP_PORT_PTPIP)) {
-@@ -3649,6 +3632,11 @@
- memset (camera->pl->params.data, 0, sizeof (PTPData));
- ((PTPData *) camera->pl->params.data)->camera = camera;
- camera->pl->params.byteorder = PTP_DL_LE;
-+ if (camera->pl->params.byteorder == PTP_DL_LE) {
-+ camloc = "UCS-2LE";
-+ } else {
-+ camloc = "UCS-2BE";
-+ }
-
- switch (camera->port->type) {
- case GP_PORT_USB:
-@@ -3696,8 +3684,8 @@
-
- curloc = nl_langinfo (CODESET);
- if (!curloc) curloc="UTF-8";
-- camera->pl->params.cd_ucs2_to_locale = iconv_open(curloc, UCS_2_INTERNAL);
-- camera->pl->params.cd_locale_to_ucs2 = iconv_open(UCS_2_INTERNAL, curloc);
-+ camera->pl->params.cd_ucs2_to_locale = iconv_open(curloc, camloc);
-+ camera->pl->params.cd_locale_to_ucs2 = iconv_open(camloc, curloc);
- if ((camera->pl->params.cd_ucs2_to_locale == (iconv_t) -1) ||
- (camera->pl->params.cd_locale_to_ucs2 == (iconv_t) -1)) {
- gp_log (GP_LOG_ERROR, "iconv", "Failed to create iconv converter.\n");
diff --git a/devel/libgphoto2/patches/patch-ac b/devel/libgphoto2/patches/patch-ac
deleted file mode 100644
index 96c92891ea9..00000000000
--- a/devel/libgphoto2/patches/patch-ac
+++ /dev/null
@@ -1,41 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2007/01/02 18:32:47 adam Exp $
-
---- camlibs/ptp2/ptp.c.orig 2006-12-24 16:16:20.000000000 +0100
-+++ camlibs/ptp2/ptp.c
-@@ -524,6 +524,9 @@ static inline uint16_t
- ptp_usb_event (PTPParams* params, PTPContainer* event, int wait)
- {
- uint16_t ret;
-+ uint32_t packetlen;
-+ size_t toread;
-+ unsigned char *bp;
- unsigned int rlen;
- PTPUSBEventContainer usbevent;
- PTP_CNT_INIT(usbevent);
-@@ -533,8 +536,24 @@ ptp_usb_event (PTPParams* params, PTPCon
-
- switch(wait) {
- case PTP_EVENT_CHECK:
-- ret=params->check_int_func((unsigned char*)&usbevent,
-- sizeof(usbevent), params->data, &rlen);
-+ ret=params->check_int_func((unsigned char*)&packetlen,
-+ sizeof(packetlen), params->data, &rlen);
-+ if (ret!=PTP_RC_OK)
-+ break;
-+ if (rlen != sizeof(packetlen)) {
-+ ret = PTP_ERROR_IO;
-+ break;
-+ }
-+ toread = dtoh32(packetlen) - sizeof(packetlen);
-+ bp = (unsigned char*)&usbevent.type;
-+ while (toread > 0) {
-+ ret=params->check_int_func(bp,
-+ toread, params->data, &rlen);
-+ if (ret!=PTP_RC_OK)
-+ break;
-+ toread -= rlen;
-+ bp += rlen;
-+ }
- break;
- case PTP_EVENT_CHECK_FAST:
- ret=params->check_int_fast_func((unsigned char*)
diff --git a/devel/libgphoto2/patches/patch-ad b/devel/libgphoto2/patches/patch-ad
deleted file mode 100644
index 0364e21bf0c..00000000000
--- a/devel/libgphoto2/patches/patch-ad
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2007/02/05 20:03:19 markd Exp $
-
---- camlibs/digita/digita.c.orig 2007-02-03 18:19:59.857410000 +1300
-+++ camlibs/digita/digita.c
-@@ -26,9 +26,7 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <string.h>
--#ifdef HAVE_LIMITS_H
- #include <limits.h>
--#endif
- #ifdef OS2
- #include <db.h>
- #endif
diff --git a/devel/libgphoto2/patches/patch-ae b/devel/libgphoto2/patches/patch-ae
deleted file mode 100644
index e32963cd0c6..00000000000
--- a/devel/libgphoto2/patches/patch-ae
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD: patch-ae,v 1.1 2007/02/05 20:03:19 markd Exp $
-
---- camlibs/mars/mars.c.orig 2007-02-03 18:30:12.430858000 +1300
-+++ camlibs/mars/mars.c
-@@ -38,7 +38,7 @@
- #define GET_DATA 0x0f
-
- static int
--M_READ (GPPort *port, char *data, int size)
-+Ma_READ (GPPort *port, char *data, int size)
- {
- gp_port_write(port, "\x21", 1);
- gp_port_read(port, data, 16);
-@@ -49,7 +49,7 @@ static int
- M_COMMAND (GPPort *port, char *command, int size, char *response)
- {
- gp_port_write(port, command, size);
-- M_READ(port, response, 16);
-+ Ma_READ(port, response, 16);
- return GP_OK;
- }
-
-@@ -68,7 +68,7 @@ mars_init (Camera *camera, GPPort *port,
- * camera reports 0x02 it is "jammed" and we must clear it.
- */
-
-- M_READ(port, c, 16);
-+ Ma_READ(port, c, 16);
- if ( (c[0] == 0x02 ) ) {
- gp_port_write(port, "\x19", 1);
- gp_port_read(port, c, 16);
-@@ -317,7 +317,7 @@ mars_routine (Info *info, GPPort *port,
- memset(c,0,sizeof(c));
-
- /*Routine used in initialization, photo download, and reset. */
-- M_READ(port, c, 16);
-+ Ma_READ(port, c, 16);
- M_COMMAND(port, start, 2, c);
- M_COMMAND(port, do_something, 2, c);
- M_COMMAND(port, address1, 2, c);
-@@ -326,7 +326,7 @@ mars_routine (Info *info, GPPort *port,
- gp_port_write(port, address2, 2);
- /* Moving the memory cursor to the given address? */
- while (( c[0] != 0xa) ) {
-- M_READ(port, c, 16);
-+ Ma_READ(port, c, 16);
- }
-
- M_COMMAND(port, address3, 2, c);
diff --git a/devel/libgphoto2/patches/patch-af b/devel/libgphoto2/patches/patch-af
deleted file mode 100644
index 43dd45b5c60..00000000000
--- a/devel/libgphoto2/patches/patch-af
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-af,v 1.1 2007/02/05 20:03:19 markd Exp $
-
---- camlibs/enigma13/Makefile.in.orig 2007-02-03 19:22:41.363815000 +1300
-+++ camlibs/enigma13/Makefile.in
-@@ -288,7 +288,7 @@ utilsdir = @utilsdir@
- camlib_LTLIBRARIES = enigma13.la
- EXTRA_DIST = STATUS protocol.txt README.enigma13
- enigma13_la_SOURCES = enigma13.c
--enigma13_la_LDFLAGS = = -module -no-undefined -avoid-version -export-dynamic \
-+enigma13_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic \
- -export-symbols $(top_srcdir)/camlibs/camlib.sym
-
- enigma13_la_DEPENDENCIES = $(top_srcdir)/camlibs/camlib.sym
diff --git a/devel/libgphoto2/patches/patch-ag b/devel/libgphoto2/patches/patch-ag
deleted file mode 100644
index c84651906da..00000000000
--- a/devel/libgphoto2/patches/patch-ag
+++ /dev/null
@@ -1,115 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2007/04/25 13:36:18 sborrill Exp $
-
---- camlibs/ptp2/ptp-pack.c.orig 2007-01-30 20:06:47.000000000 -0500
-+++ camlibs/ptp2/ptp-pack.c 2007-01-30 21:32:05.000000000 -0500
-@@ -89,41 +89,38 @@
- static inline char*
- ptp_unpack_string(PTPParams *params, unsigned char* data, uint16_t offset, uint8_t *len)
- {
-- int i;
-- uint8_t loclen;
-+ uint8_t length;
-+ uint16_t string[PTP_MAXSTRLEN+1];
-+ /* allow for UTF-8: max of 3 bytes per UCS-2 char, plus final null */
-+ char loclstr[PTP_MAXSTRLEN*3+1];
-+ size_t nconv, srclen, destlen;
-+ char *src, *dest;
-+
-+ length = dtoh8a(&data[offset]); /* PTP_MAXSTRLEN == 255, 8 bit len */
-+ *len = length;
-+ if (length == 0) /* nothing to do? */
-+ return(NULL);
-+
-+ /* copy to string[] to ensure correct alignment for iconv(3) */
-+ memcpy(string, &data[offset+1], length * sizeof(string[0]));
-+ string[length] = 0x0000U; /* be paranoid! add a terminator. */
-+ loclstr[0] = '\0';
-+
-+ /* convert from camera UCS-2 to our locale */
-+ src = (char *)string;
-+ srclen = length * sizeof(string[0]);
-+ dest = loclstr;
-+ destlen = sizeof(loclstr)-1;
-+ nconv = iconv(params->cd_ucs2_to_locale, &src, &srclen,
-+ &dest, &destlen);
-+ if (nconv == (size_t) -1)
-+ return(NULL);
-
-- /* Cannot exceed 255 (PTP_MAXSTRLEN) since it is a single byte, duh ... */
-- loclen = dtoh8a(&data[offset]);
-- /* This len is used to advance the buffer pointer */
-- *len = loclen;
-- if (loclen) {
-- uint16_t string[PTP_MAXSTRLEN+1];
-- char *stringp = (char *) string;
-- char loclstr[PTP_MAXSTRLEN*3+1]; /* UTF-8 encoding is max 3 bytes per UCS2 char. */
-- char *locp = loclstr;
-- size_t nconv;
-- size_t convlen = loclen * 2; /* UCS-2 is 16 bit wide */
-- size_t convmax = PTP_MAXSTRLEN*3;
--
-- for (i=0;i<loclen;i++) {
-- string[i]=dtoh16a(&data[offset+i*2+1]);
-- }
-- /* be paranoid! Add a terminator. :( */
-- string[loclen]=0x0000U;
-- loclstr[0]='\0';
-- /* loclstr=ucs2_to_utf8(string); */
-- /* Do the conversion. */
-- nconv = iconv (params->cd_ucs2_to_locale, &stringp, &convlen, &locp, &convmax);
-- /* FIXME: handle size errors */
-- loclstr[PTP_MAXSTRLEN*3] = '\0';
-- if (nconv == (size_t) -1)
-- return NULL;
-- return strdup(loclstr);
-- }
-- return NULL;
-+ *dest = '\0';
-+ loclstr[sizeof(loclstr)-1] = '\0'; /* be safe? */
-+ return(strdup(loclstr));
- }
-
--
- static inline int
- ucs2strlen(uint16_t const * const unicstr)
- {
-@@ -138,7 +135,6 @@
- static inline void
- ptp_pack_string(PTPParams *params, char *string, unsigned char* data, uint16_t offset, uint8_t *len)
- {
-- int i;
- int packedlen;
- uint16_t ucs2str[PTP_MAXSTRLEN+1];
- char *ucs2strp = (char *) ucs2str;
-@@ -148,11 +144,15 @@
- size_t convmax = PTP_MAXSTRLEN * 2; /* Includes the terminator */
-
- /* Cannot exceed 255 (PTP_MAXSTRLEN) since it is a single byte, duh ... */
-- ucs2str[0] = 0x0000U;
-- memset(ucs2strp, 0, PTP_MAXSTRLEN*2+2);
-- nconv = iconv (params->cd_locale_to_ucs2, &stringp, &convlen, &ucs2strp, &convmax);
-+ memset(ucs2strp, 0, sizeof(ucs2str)); /* XXX: necessary? */
-+ nconv = iconv(params->cd_locale_to_ucs2, &stringp, &convlen,
-+ &ucs2strp, &convmax);
- if (nconv == (size_t) -1)
- ucs2str[0] = 0x0000U;
-+ /*
-+ * XXX: isn't packedlen just ( (uint16_t *)ucs2strp - ucs2str )?
-+ * why do we need ucs2strlen()?
-+ */
- packedlen = ucs2strlen(ucs2str);
- if (packedlen > PTP_MAXSTRLEN-1) {
- *len=0;
-@@ -161,10 +161,8 @@
-
- /* number of characters including terminating 0 (PTP standard confirmed) */
- htod8a(&data[offset],packedlen+1);
-- for (i=0;i<packedlen && i< PTP_MAXSTRLEN; i++) {
-- htod16a(&data[offset+i*2+1],ucs2str[i]);
-- }
-- htod16a(&data[offset+i*2+1],0x0000);
-+ memcpy(&data[offset+1], &ucs2str[0], packedlen * sizeof(ucs2str[0]));
-+ htod16a(&data[offset+packedlen*2+1], 0x0000); /* terminate 0 */
-
- /* The returned length is in number of characters */
- *len = (uint8_t) packedlen+1;
diff --git a/devel/libgphoto2/patches/patch-ah b/devel/libgphoto2/patches/patch-ah
deleted file mode 100644
index 2e11cb0fa31..00000000000
--- a/devel/libgphoto2/patches/patch-ah
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2007/06/21 03:40:23 minskim Exp $
-
---- libgphoto2_port/libgphoto2_port/Makefile.in.orig 2007-06-20 18:32:38.000000000 -0700
-+++ libgphoto2_port/libgphoto2_port/Makefile.in
-@@ -305,7 +305,6 @@ libgphoto2_port_la_SOURCES = \
- libgphoto2_port_la_DEPENDENCIES = \
- $(top_srcdir)/gphoto2/gphoto2-port-version.h \
- $(top_srcdir)/gphoto2/gphoto2-port-library.h \
-- $(LIBLTDL) \
- $(srcdir)/libgphoto2_port.sym
-
-
diff --git a/devel/libgphoto2/patches/patch-ai b/devel/libgphoto2/patches/patch-ai
deleted file mode 100644
index f5e563059b3..00000000000
--- a/devel/libgphoto2/patches/patch-ai
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2007/06/21 03:40:23 minskim Exp $
-
---- libgphoto2/Makefile.in.orig 2007-06-20 19:36:13.000000000 -0700
-+++ libgphoto2/Makefile.in
-@@ -345,8 +345,7 @@ libgphoto2_la_LIBADD = \
- # "-dlopen" $(top_builddir)/camlibs/ptp2/....la
- libgphoto2_la_DEPENDENCIES = \
- $(top_srcdir)/gphoto2/gphoto2-version.h \
-- $(srcdir)/libgphoto2.sym \
-- $(LIBLTDL)
-+ $(srcdir)/libgphoto2.sym
-
- pkgconfig_DATA = libgphoto2.pc
- EXTRA_DIST = libgphoto2.pc.in gphoto2-library.c libgphoto2.sym
diff --git a/devel/libgphoto2/patches/patch-aj b/devel/libgphoto2/patches/patch-aj
new file mode 100644
index 00000000000..3dd234da2d8
--- /dev/null
+++ b/devel/libgphoto2/patches/patch-aj
@@ -0,0 +1,14 @@
+$NetBSD: patch-aj,v 1.1 2008/04/29 09:31:09 sborrill Exp $
+
+--- libgphoto2_port/serial/unix.c.orig 2008-03-24 19:00:32.000000000 +0000
++++ libgphoto2_port/serial/unix.c 2008-04-25 00:10:34.000000000 +0100
+@@ -38,6 +38,9 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#ifdef __NetBSD__
++#define _NETBSD_SOURCE
++#endif
+ #ifdef HAVE_FCNTL_H
+ #include <fcntl.h>
+ #endif
diff --git a/devel/libgphoto2/patches/patch-ak b/devel/libgphoto2/patches/patch-ak
new file mode 100644
index 00000000000..b47c5c9a592
--- /dev/null
+++ b/devel/libgphoto2/patches/patch-ak
@@ -0,0 +1,10 @@
+$NetBSD: patch-ak,v 1.1 2008/04/29 09:31:09 sborrill Exp $
+
+--- packaging/generic/check-ptp-camera.orig 2008-04-25 00:01:14.000000000 +0100
++++ packaging/generic/check-ptp-camera 2008-04-25 00:01:36.000000000 +0100
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # check if any interface of this device is a PTP camera interface (06)
+ INTERFACE="${1:-06/01/01}"