diff options
author | tijl <tijl@FreeBSD.org> | 2013-10-26 17:58:00 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2013-10-26 17:58:00 +0800 |
commit | 64e30d0bb0320854c1d474bb6a34c93811e20330 (patch) | |
tree | 7031885d2886da71f9051bfe2ccc24182c3f5554 | |
parent | 32061d5f8d47ba162bb8e4c087867692b4466557 (diff) | |
download | freebsd-ports-gnome-64e30d0bb0320854c1d474bb6a34c93811e20330.tar.gz freebsd-ports-gnome-64e30d0bb0320854c1d474bb6a34c93811e20330.tar.zst freebsd-ports-gnome-64e30d0bb0320854c1d474bb6a34c93811e20330.zip |
- Fix pkg-plist on FreeBSD 10 and let FreeBSD 8 and 9 use the libusb 1.0
API too.
- Remove patching of libgphoto2_port.pc.in. It has no effect.
- Don't define _XOPEN_SOURCE and _POSIX_C_SOURCE to old values. It hides
C99 symbols like snprintf that the port uses.
PR: ports/183308
-rw-r--r-- | graphics/libgphoto2/Makefile | 11 | ||||
-rw-r--r-- | graphics/libgphoto2/files/patch-libgphoto2_port-gphoto2-gphoto2-port-portability.h | 23 | ||||
-rw-r--r-- | graphics/libgphoto2/files/patch-libgphoto2_port-usb-libusb.c | 45 | ||||
-rw-r--r-- | graphics/libgphoto2/pkg-plist | 6 |
4 files changed, 29 insertions, 56 deletions
diff --git a/graphics/libgphoto2/Makefile b/graphics/libgphoto2/Makefile index 2ca623c88bab..765fbea9b454 100644 --- a/graphics/libgphoto2/Makefile +++ b/graphics/libgphoto2/Makefile @@ -3,7 +3,7 @@ PORTNAME= libgphoto2 PORTVERSION= 2.4.14 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics MASTER_SITES= SF/gphoto/libgphoto/${PORTVERSION} @@ -23,17 +23,14 @@ LIBTOOLFILES= configure libgphoto2_port/configure USE_LDCONFIG= yes CONFIGURE_ENV= LTDLINCL="-I${LOCALBASE}/include" \ LIBLTDL="-L${LOCALBASE}/lib -lltdl" +CFLAGS+= -DENODATA=9999 # Safe because it's never used PLIST_SUB= VERSION="${PORTVERSION}" VERSION_PORT=0.8.0 .include <bsd.port.options.mk> .if ${OSVERSION} < 1000040 -CONFIGURE_ENV+= LIBUSB_CFLAGS="-I/usr/include" \ - LIBUSB_LIBS="-lusb" -.else -# Safe because it's never used -CFLAGS+= -DENODATA=0 +CONFIGURE_ENV+= LIBUSB1_CFLAGS=" " LIBUSB1_LIBS="-lusb" .endif .if ${PORT_OPTIONS:MNLS} @@ -66,8 +63,6 @@ post-patch: @${REINPLACE_CMD} -e \ 's|@HAVE_DOXYGEN_TRUE@|#| ; s|@HAVE_DOXYGEN_FALSE@||' \ ${WRKSRC}/doc/Makefile.in - @${REINPLACE_CMD} -e '/Requires/d' \ - ${WRKSRC}/libgphoto2_port/libgphoto2_port.pc.in @${REINPLACE_CMD} 's|with_hal=yes|with_hal=no|' \ ${WRKSRC}/libgphoto2_port/configure diff --git a/graphics/libgphoto2/files/patch-libgphoto2_port-gphoto2-gphoto2-port-portability.h b/graphics/libgphoto2/files/patch-libgphoto2_port-gphoto2-gphoto2-port-portability.h new file mode 100644 index 000000000000..6a7c17a6330f --- /dev/null +++ b/graphics/libgphoto2/files/patch-libgphoto2_port-gphoto2-gphoto2-port-portability.h @@ -0,0 +1,23 @@ +--- libgphoto2_port/gphoto2/gphoto2-port-portability.h.orig 2011-04-05 08:38:24.000000000 +0200 ++++ libgphoto2_port/gphoto2/gphoto2-port-portability.h 2013-10-26 11:13:54.000000000 +0200 +@@ -152,20 +152,6 @@ + + /* yummy. :) */ + +-/* XOPEN needed for usleep */ +-#ifndef _XOPEN_SOURCE +-# define _XOPEN_SOURCE 500 +-#else +-# if ((_XOPEN_SOURCE - 0) < 500) +-# undef _XOPEN_SOURCE +-# define _XOPEN_SOURCE 500 +-# endif +-#endif +- +-/* for nanosleep */ +-# ifndef _POSIX_C_SOURCE +-# define _POSIX_C_SOURCE 199309 +-# endif + # include <time.h> + + # include <strings.h> diff --git a/graphics/libgphoto2/files/patch-libgphoto2_port-usb-libusb.c b/graphics/libgphoto2/files/patch-libgphoto2_port-usb-libusb.c deleted file mode 100644 index 08ccf671c47e..000000000000 --- a/graphics/libgphoto2/files/patch-libgphoto2_port-usb-libusb.c +++ /dev/null @@ -1,45 +0,0 @@ ---- libgphoto2_port/usb/libusb.c.old 2011-01-16 15:22:21.000000000 +0100 -+++ libgphoto2_port/usb/libusb.c 2011-01-16 15:21:57.000000000 +0100 -@@ -824,23 +824,25 @@ - * MTP interface descriptions, that's how they can be detected, before - * we try the more esoteric "OS descriptors" (below). - */ -- for (i = 0; i < dev->descriptor.bNumConfigurations; i++) { -- unsigned int j; -- for (j = 0; j < dev->config[i].bNumInterfaces; j++) { -- int k; -- for (k = 0; k < dev->config[i].interface[j].num_altsetting; k++) { -- buf[0] = '\0'; -- ret = usb_get_string_simple(devh, -- dev->config[i].interface[j].altsetting[k].iInterface, -- (char *) buf, -- 1024); -- if (ret < 3) -- continue; -- if (strcmp((char *) buf, "MTP") == 0) { -- gp_log (GP_LOG_DEBUG, "mtp matcher", "Configuration %d, interface %d, altsetting %d:\n", i, j, k); -- gp_log (GP_LOG_DEBUG, "mtp matcher", " Interface description contains the string \"MTP\"\n"); -- gp_log (GP_LOG_DEBUG, "mtp matcher", " Device recognized as MTP, no further probing.\n"); -- goto found; -+ if(dev->config) { -+ for (i = 0; i < dev->descriptor.bNumConfigurations; i++) { -+ unsigned int j; -+ for (j = 0; j < dev->config[i].bNumInterfaces; j++) { -+ int k; -+ for (k = 0; k < dev->config[i].interface[j].num_altsetting; k++) { -+ buf[0] = '\0'; -+ ret = usb_get_string_simple(devh, -+ dev->config[i].interface[j].altsetting[k].iInterface, -+ (char *) buf, -+ 1024); -+ if (ret < 3) -+ continue; -+ if (strcmp((char *) buf, "MTP") == 0) { -+ gp_log (GP_LOG_DEBUG, "mtp matcher", "Configuration %d, interface %d, altsetting %d:\n", i, j, k); -+ gp_log (GP_LOG_DEBUG, "mtp matcher", " Interface description contains the string \"MTP\"\n"); -+ gp_log (GP_LOG_DEBUG, "mtp matcher", " Device recognized as MTP, no further probing.\n"); -+ goto found; -+ } - } - } - } diff --git a/graphics/libgphoto2/pkg-plist b/graphics/libgphoto2/pkg-plist index f139d1c116e3..0d50f51d1898 100644 --- a/graphics/libgphoto2/pkg-plist +++ b/graphics/libgphoto2/pkg-plist @@ -218,9 +218,9 @@ lib/libgphoto2_port/%%VERSION_PORT%%/ptpip.so lib/libgphoto2_port/%%VERSION_PORT%%/serial.a lib/libgphoto2_port/%%VERSION_PORT%%/serial.la lib/libgphoto2_port/%%VERSION_PORT%%/serial.so -lib/libgphoto2_port/%%VERSION_PORT%%/usb.a -lib/libgphoto2_port/%%VERSION_PORT%%/usb.la -lib/libgphoto2_port/%%VERSION_PORT%%/usb.so +lib/libgphoto2_port/%%VERSION_PORT%%/usb1.a +lib/libgphoto2_port/%%VERSION_PORT%%/usb1.la +lib/libgphoto2_port/%%VERSION_PORT%%/usb1.so lib/libgphoto2_port/%%VERSION_PORT%%/usbdiskdirect.a lib/libgphoto2_port/%%VERSION_PORT%%/usbdiskdirect.la lib/libgphoto2_port/%%VERSION_PORT%%/usbdiskdirect.so |