# $Id: Portfile 66816 2010-04-23 03:56:40Z ryandesign@macports.org $

PortSystem          1.0
name                libgphoto2
version             2.4.9.1
categories          devel
maintainers         nomaintainer
description         The gphoto2 digital camera library
long_description \
   The gphoto2 library can be used by applications to access various digital \
   camera models.

platforms           darwin

homepage            http://www.gphoto.org/proj/libgphoto2/
master_sites        sourceforge:gphoto
use_bzip2           yes

checksums           md5     7ad1c1bf906abed4d2799a6f6a3e4f75 \
                    sha1    7a5fb35b9c050bae3ceac096245071ab1e699af5 \
                    rmd160  6dc887332803776fb1a72707108ee87db4db86ad

depends_build       port:pkgconfig
depends_lib         port:dbus \
                    port:gettext \
                    port:jpeg \
                    port:libexif \
                    port:libiconv \
                    port:libusb-compat \
                    port:libtool

patchfiles          patch-configure.diff patch-configure-nodoxygen.diff \
                    patch-camlibs_Makefile.in.diff

configure.cflags-append   -I${prefix}/include -no-cpp-precomp
configure.args      --mandir=${prefix}/share/man \
                    --with-drivers=all --with-libexif=auto

variant without_libexif description {Disable libexif support} {
   depends_lib-delete      port:libexif
   configure.args-delete   --with-libexif=auto
   configure.args-append   --with-libexif=no
}

variant with_doxygen description {Use doxygen to generate API docs} {
   depends_build-append   port:doxygen
   patchfiles-delete      patch-configure-nodoxygen.diff
}

livecheck.type      regex
livecheck.url       http://sourceforge.net/projects/gphoto/files/
livecheck.regex     /${name}-(\[0-9.\]+)\\.tar
