mirror of
https://git.freebsd.org/ports.git
synced 2025-05-31 18:36:28 -04:00
- 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
This commit is contained in:
parent
d98b70d9f5
commit
fd0149e537
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=331670
4 changed files with 29 additions and 56 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
|
@ -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;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue