1PORTNAME=	libgphoto2
2PORTVERSION=	2.5.31
3CATEGORIES=	graphics
4MASTER_SITES=	SF/gphoto/libgphoto/${PORTVERSION}
5
6MAINTAINER=	ports@MidnightBSD.org
7COMMENT=	Universal digital camera control library
8WWW=		http://www.gphoto.org/proj/libgphoto2/
9
10LICENSE=	lgpl2.1+
11LICENSE_FILE=	${WRKSRC}/COPYING
12
13LIB_DEPENDS=	libltdl.so:devel/libltdl
14
15USES=		gnome libtool pathfix pkgconfig ssl tar:xz
16USE_GNOME=	libxml2
17GNU_CONFIGURE=	yes
18INSTALL_TARGET=	install-strip
19USE_LDCONFIG=	yes
20PATHFIX_MAKEFILEIN=	Makefile.in \
21			configure \
22			libgphoto2_port/Makefile.in \
23			libgphoto2_port/configure
24
25PLIST_SUB=	VERSION=${PORTVERSION} VERSION_PORT=0.12.2
26
27OPTIONS_DEFINE=	CURL DOCS GD JPEG LIBEXIF NLS
28OPTIONS_DEFAULT=	CURL GD JPEG LIBEXIF
29OPTIONS_SUB=	yes
30
31CURL_DESC=	Lumix WiFi support via cURL
32CURL_LIB_DEPENDS=	libcurl.so:ftp/curl
33CURL_CONFIGURE_OFF=	--with-libcurl=no
34
35GD_DESC=	libGD conversion support
36GD_LIB_DEPENDS=		libgd.so:graphics/gd
37GD_CONFIGURE_OFF=	--with-gdlib=no
38
39JPEG_DESC=	JPEG image mangling support
40JPEG_USES=		jpeg
41JPEG_CONFIGURE_OFF=	--without-jpeg
42
43LIBEXIF_LIB_DEPENDS=	libexif.so:graphics/libexif
44LIBEXIF_CONFIGURE_OFF=	--with-libexif=no
45
46NLS_USES=		gettext
47NLS_CONFIGURE_OFF=	--disable-nls
48
49post-patch:
50.for i in configure libgphoto2_port/configure
51	@${REINPLACE_CMD} -e \
52		'/FLAGS/s|-g|| ; \
53		 /grep -i linux/s|; fi ; then|; else false; fi ; then|' \
54		${WRKSRC}/${i}
55.endfor
56	@${REINPLACE_CMD} -e \
57		'/^doc_DATA/s|COPYING||' \
58		${WRKSRC}/Makefile.in
59
60.include <bsd.port.mk>
61