diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2008-11-29 21:50:48 +0000 |
---|---|---|
committer | Gilles Dartiguelongue <eva@gentoo.org> | 2008-11-29 21:50:48 +0000 |
commit | 17bfeae24aae7a69db9fc99ec7ee5a59b9460552 (patch) | |
tree | dd64e06169d9c62216377bb05ba47aeb04464422 /media-libs/libgphoto2 | |
parent | amd64 stable, bug #249134. (diff) | |
download | gentoo-2-17bfeae24aae7a69db9fc99ec7ee5a59b9460552.tar.gz gentoo-2-17bfeae24aae7a69db9fc99ec7ee5a59b9460552.tar.bz2 gentoo-2-17bfeae24aae7a69db9fc99ec7ee5a59b9460552.zip |
Bump to 2.4.3, fix automagic dependencies. Clean up old patches.
(Portage version: 2.2_rc16/cvs/Linux 2.6.24-gentoo-r8-mactel x86_64)
Diffstat (limited to 'media-libs/libgphoto2')
11 files changed, 281 insertions, 226 deletions
diff --git a/media-libs/libgphoto2/ChangeLog b/media-libs/libgphoto2/ChangeLog index ba79d429265f..c39f3cb33f23 100644 --- a/media-libs/libgphoto2/ChangeLog +++ b/media-libs/libgphoto2/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for media-libs/libgphoto2 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.136 2008/10/08 20:50:41 eva Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.137 2008/11/29 21:50:48 eva Exp $ + +*libgphoto2-2.4.3 (29 Nov 2008) + + 29 Nov 2008; Gilles Dartiguelongue <eva@gentoo.org> + -files/libgphoto2-2.1.2-norpm.patch, + -files/libgphoto2-2.2.0-includes.patch, + -files/libgphoto2-2.2.1-backported-udev-fixes.diff, + -files/libgphoto-2.2.1-new-dbus-api.patch, + -files/libgphoto2-2.2.1-ngettext.patch, -files/libgphoto2-2.3.1-rpm.patch, + -files/libgphoto2-2.3.1-udev-rules-fix3.diff, + +files/libgphoto2-2.4.3-automagic.patch, metadata.xml, + +libgphoto2-2.4.3.ebuild: + Bump to 2.4.3, fix automagic dependencies. Clean up old patches. 08 Oct 2008; Gilles Dartiguelongue <eva@gentoo.org> libgphoto2-2.4.2.ebuild: diff --git a/media-libs/libgphoto2/files/libgphoto-2.2.1-new-dbus-api.patch b/media-libs/libgphoto2/files/libgphoto-2.2.1-new-dbus-api.patch deleted file mode 100644 index d4685b605d99..000000000000 --- a/media-libs/libgphoto2/files/libgphoto-2.2.1-new-dbus-api.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libgphoto2_port/disk/disk.c.orig 2006-04-19 03:54:26.000000000 +0200 -+++ libgphoto2_port/disk/disk.c 2006-09-30 20:57:40.000000000 +0200 -@@ -175,7 +175,6 @@ gp_port_library_list (GPPortInfoList *li - - libhal_free_string_array (volumes); - libhal_ctx_free (ctx); -- dbus_connection_disconnect (dbus_connection); - dbus_connection_unref (dbus_connection); - #else - # ifdef HAVE_MNTENT_H diff --git a/media-libs/libgphoto2/files/libgphoto2-2.1.2-norpm.patch b/media-libs/libgphoto2/files/libgphoto2-2.1.2-norpm.patch deleted file mode 100644 index 32629b06d7e8..000000000000 --- a/media-libs/libgphoto2/files/libgphoto2-2.1.2-norpm.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- libgphoto2-2.1.2/configure 2002-12-01 21:46:42.000000000 +0000 -+++ libgphoto2-2.1.2/configure 2003-08-18 17:32:26.000000000 +0100 -@@ -13865,14 +13865,9 @@ - # packages we're going to build will depend on libusb and libusb-devel - # RPM packages or not. - -- --if rpm -q libusb-devel > /dev/null 2>&1; then -+# remove rpm -q test to avoid breaking sandbox - RPM_LIBUSB_DEVEL_TRUE= - RPM_LIBUSB_DEVEL_FALSE='#' --else -- RPM_LIBUSB_DEVEL_TRUE='#' -- RPM_LIBUSB_DEVEL_FALSE= --fi - - - # effective_target has to be determined in advance diff --git a/media-libs/libgphoto2/files/libgphoto2-2.2.0-includes.patch b/media-libs/libgphoto2/files/libgphoto2-2.2.0-includes.patch deleted file mode 100644 index 6aaed2d21abd..000000000000 --- a/media-libs/libgphoto2/files/libgphoto2-2.2.0-includes.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --exclude-from=/home/dang/.diffrc -u -ruN libgphoto2-2.2.0.orig/packaging/generic/print-camera-list.c libgphoto2-2.2.0/packaging/generic/print-camera-list.c ---- libgphoto2-2.2.0.orig/packaging/generic/print-camera-list.c 2006-04-18 21:54:05.000000000 -0400 -+++ libgphoto2-2.2.0/packaging/generic/print-camera-list.c 2006-07-06 14:32:50.000000000 -0400 -@@ -48,8 +48,8 @@ - #include <time.h> - #include <string.h> - --#include <gphoto2/gphoto2-camera.h> --#include <gphoto2/gphoto2-port-log.h> -+#include <gphoto2-camera.h> -+#include <gphoto2-port-log.h> - - #ifndef TRUE - #define TRUE (0==0) diff --git a/media-libs/libgphoto2/files/libgphoto2-2.2.1-backported-udev-fixes.diff b/media-libs/libgphoto2/files/libgphoto2-2.2.1-backported-udev-fixes.diff deleted file mode 100644 index ec797c830cf7..000000000000 --- a/media-libs/libgphoto2/files/libgphoto2-2.2.1-backported-udev-fixes.diff +++ /dev/null @@ -1,125 +0,0 @@ -# Backported udev-rules-0.98 from libgphoto2-2.3.0 -# Backported PTP-Matching code from SVN (http://gphoto.svn.sourceforge.net/viewvc/gphoto/trunk/libgphoto2/packaging/generic/) - -diff -ruN libgphoto2-2.2.1-orig/packaging/generic/check_ptp_camera libgphoto2-2.2.1/packaging/generic/check_ptp_camera ---- libgphoto2-2.2.1-orig/packaging/generic/check_ptp_camera 1970-01-01 01:00:00.000000000 +0100 -+++ libgphoto2-2.2.1/packaging/generic/check_ptp_camera 2006-12-08 10:23:35.000000000 +0100 -@@ -0,0 +1,20 @@ -+#!/bin/sh -+ -+# check if any interface of this device is a PTP camera interface (06) -+INTERFACE="${1:-06/01/01}" -+ -+BASENAME=${PHYSDEVPATH##*/} -+for d in /sys/${PHYSDEVPATH}/${BASENAME}:*; do -+ [[ -d ${d} ]] || continue -+ INTERFACEID="$(< ${d}/bInterfaceClass)" -+ INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceSubClass)" -+ INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceProtocol)" -+ -+ #echo ${d}: ${INTERFACEID} -+ if [[ ${INTERFACE} == ${INTERFACEID} ]]; then -+ # Found interface -+ exit 0 -+ fi -+done -+ -+exit 1 -diff -ruN libgphoto2-2.2.1-orig/packaging/generic/Makefile.am libgphoto2-2.2.1/packaging/generic/Makefile.am ---- libgphoto2-2.2.1-orig/packaging/generic/Makefile.am 2006-12-08 10:04:43.000000000 +0100 -+++ libgphoto2-2.2.1/packaging/generic/Makefile.am 2006-12-08 10:24:29.000000000 +0100 -@@ -2,6 +2,7 @@ - # policies - utilsdir = $(libdir)/$(PACKAGE) - utils_PROGRAMS = print-camera-list -+EXTRA_DIST = check_ptp_camera - - # print_camera_list_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) - print_camera_list_SOURCE = print-camera-list.c -diff -ruN libgphoto2-2.2.1-orig/packaging/generic/print-camera-list.c libgphoto2-2.2.1/packaging/generic/print-camera-list.c ---- libgphoto2-2.2.1-orig/packaging/generic/print-camera-list.c 2006-12-08 10:04:43.000000000 +0100 -+++ libgphoto2-2.2.1/packaging/generic/print-camera-list.c 2006-12-08 13:40:57.000000000 +0100 -@@ -105,7 +105,6 @@ - } while (0) - #endif /* __GNUC__ */ - -- - /* print_usb_usermap - * - * Print out lines that can be included into usb.usermap -@@ -262,13 +261,14 @@ - - - static int --udev_begin_func (const func_params_t *params) -+udev_098_begin_func (const func_params_t *params) - { -- printf ("# udev rules file for libgphoto2\n#\n"); -- printf ("BUS!=\"usb\", ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n"); -+ printf ("# udev rules file for libgphoto2 devices (udev >= 0.98)\n#\n"); -+ printf ("ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n"); -+ printf ("SUBSYSTEM!=\"usb*\", GOTO=\"libgphoto2_rules_end\"\n\n"); - return 0; - } -- -+ - static int - udev_end_func (const func_params_t *params) - { -@@ -280,7 +280,7 @@ - - - static int --udev_camera_func (const func_params_t *params, -+udev_098_camera_func (const func_params_t *params, - const int i, - const CameraAbilities *a) - { -@@ -324,22 +324,18 @@ - } - - if (flags & GP_USB_HOTPLUG_MATCH_INT_CLASS) { -- printf("SYSFS{bInterfaceClass}==\"%02x\", ", class); -- if (flags & GP_USB_HOTPLUG_MATCH_INT_SUBCLASS) { -- printf("SYSFS{bInterfaceSubClass}==\"%02x\", ", subclass); -- } -- if (flags & GP_USB_HOTPLUG_MATCH_INT_PROTOCOL) { -- printf("SYSFS{bInterfaceProtocol}==\"%02x\", ", proto); -- } -+ if ((flags & (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) == (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) -+ printf("PROGRAM=\"check_ptp_camera %02d/%02d/%02d\", ", class, subclass, proto); -+ else -+ fprintf(stderr,"unhandled interface match flags %x\n", flags); - } else { -- printf ("SYSFS{idVendor}==\"%04x\", SYSFS{idProduct}==\"%04x\", ", -+ printf ("ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ", - a->usb_vendor, a->usb_product); - } -- printf("RUN+=\"%s\"\n", hotplug_script); -+ printf("MODE=\"660\", GROUP=\"plugdev\"\n"); - return 0; - } - -- - static int - empty_begin_func (const func_params_t *params) - { -@@ -647,12 +643,12 @@ - camera_func: fdi_device_camera_func, - end_func: fdi_device_end_func - }, -- {name: "udev-rules", -- descr: "udev rules file", -- help: "Put it into /etc/udev/libgphoto2.rules", -- paramdescr: "<PATH_TO_HOTPLUG_SCRIPT>", -- begin_func: udev_begin_func, -- camera_func: udev_camera_func, -+ {name: "udev-rules-0.98", -+ descr: "udev >= 0.98 rules file", -+ help: "Put it into /etc/udev/libgphoto2.rules, for udev >= 0.98", -+ paramdescr: "( <PATH_TO_SCRIPT> | [mode <mode>|owner <owner>|group <group>]* ) ", -+ begin_func: udev_098_begin_func, -+ camera_func: udev_098_camera_func, - end_func: udev_end_func - }, - {name: "idlist", diff --git a/media-libs/libgphoto2/files/libgphoto2-2.2.1-ngettext.patch b/media-libs/libgphoto2/files/libgphoto2-2.2.1-ngettext.patch deleted file mode 100644 index 213d883de0e9..000000000000 --- a/media-libs/libgphoto2/files/libgphoto2-2.2.1-ngettext.patch +++ /dev/null @@ -1,14 +0,0 @@ -Patch from Andrew Resch at https://bugs.gentoo.org/show_bug.cgi?id=139534 -Also present in upstream svn tree - ---- libgphoto2-2.2.1/camlibs/sonix/library.c 2006-04-18 18:54:18.000000000 -0700 -+++ libgphoto2-2.2.1-work/camlibs/sonix/library.c 2006-07-07 23:12:56.012649500 -0700 -@@ -41,7 +41,7 @@ - #else - # define _(String) (String) - # define N_(String) (String) --# define ngettext(String1,String2,Count) ((Count==1)?String1:String) -+# define ngettext(String1,String2,Count) ((Count==1)?String1:String2) - #endif - - #include <gphoto2-port.h> diff --git a/media-libs/libgphoto2/files/libgphoto2-2.3.1-rpm.patch b/media-libs/libgphoto2/files/libgphoto2-2.3.1-rpm.patch deleted file mode 100644 index d442019dfca7..000000000000 --- a/media-libs/libgphoto2/files/libgphoto2-2.3.1-rpm.patch +++ /dev/null @@ -1,15 +0,0 @@ - -It tries to creat /var/lib/rpm... - -diff -urNp libgphoto2-2.3.1.org/configure libgphoto2-2.3.1/configure ---- libgphoto2-2.3.1.org/configure 2006-12-24 21:12:44.000000000 +0200 -+++ libgphoto2-2.3.1/configure 2007-01-29 23:28:31.000000000 +0200 -@@ -30296,7 +30296,7 @@ fi - # RPM packages or not. - - --if rpm -q libusb-devel > /dev/null 2>&1; then -+if false -q libusb-devel > /dev/null 2>&1; then - RPM_LIBUSB_DEVEL_TRUE= - RPM_LIBUSB_DEVEL_FALSE='#' - else diff --git a/media-libs/libgphoto2/files/libgphoto2-2.3.1-udev-rules-fix3.diff b/media-libs/libgphoto2/files/libgphoto2-2.3.1-udev-rules-fix3.diff deleted file mode 100644 index 31b00ac578a9..000000000000 --- a/media-libs/libgphoto2/files/libgphoto2-2.3.1-udev-rules-fix3.diff +++ /dev/null @@ -1,29 +0,0 @@ -Index: libgphoto2-2.3.1/packaging/generic/print-camera-list.c -=================================================================== ---- libgphoto2-2.3.1.orig/packaging/generic/print-camera-list.c -+++ libgphoto2-2.3.1/packaging/generic/print-camera-list.c -@@ -299,7 +299,7 @@ udev_098_begin_func (const func_params_t - /* Note: 2 lines because we need to use || ... having them on the same - * line would mean &&. - */ -- printf ("SUBSYSTEM!=\"usb*\", GOTO=\"libgphoto2_rules_end\"\n"); -+ printf ("SUBSYSTEM!=\"usb|usb_device\", GOTO=\"libgphoto2_rules_end\"\n"); - printf ("ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n"); - return 0; - } -@@ -479,9 +479,14 @@ udev_098_camera_func (const func_params_ - else - fprintf(stderr,"unhandled interface match flags %x\n", flags); - } -- } else { -+ } else if (flags & GP_USB_HOTPLUG_MATCH_VENDOR_ID) { -+ - printf ("ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ", - a->usb_vendor, a->usb_product); -+ } else { -+ fprintf(stderr, "Attempted to output rule for Camera: \"%s\" , Vendor: \"%04x\" , Product: \"%04x\"", -+ a->model, a->usb_vendor, a->usb_product); -+ return 0; - } - if ((*params->argv)[1] == NULL) { - const char *hotplug_script = ((*params->argv)[0] != NULL) diff --git a/media-libs/libgphoto2/files/libgphoto2-2.4.3-automagic.patch b/media-libs/libgphoto2/files/libgphoto2-2.4.3-automagic.patch new file mode 100644 index 000000000000..4764e1d72b20 --- /dev/null +++ b/media-libs/libgphoto2/files/libgphoto2-2.4.3-automagic.patch @@ -0,0 +1,65 @@ +--- a/libgphoto2_port/configure.ac 2008-11-29 22:04:31.000000000 +0100 ++++ b/libgphoto2_port/configure.ac 2008-11-29 22:10:50.000000000 +0100 +@@ -161,14 +161,25 @@ + ]) + ]) + ++dnl --------------------------------------------------------------------------- + dnl Apple Bonjour / mDNSResponder multicast DNS queries. ++dnl --------------------------------------------------------------------------- ++ + MDNS_LIBS= +-AC_CHECK_HEADER([dns_sd.h],[ +- AC_CHECK_LIB(dns_sd,DNSServiceResolve,[ +- MDNS_LIBS="-ldns_sd" +- AC_DEFINE(HAVE_MDNS_BONJOUR,1,[Define if you have Bonjour/mDNSResponder.]) +- ]) +-]) ++have_bonjour=false ++ ++AC_ARG_ENABLE([bonjour], ++ AS_HELP_STRING([--disable-bonjour], [disable Bonjour support]), ++ ,enable_bonjour=yes) ++ ++if test "x$enable_bonjour" = "xyes"; then ++ AC_CHECK_HEADER([dns_sd.h],[ ++ AC_CHECK_LIB(dns_sd,DNSServiceResolve,[ ++ MDNS_LIBS="-ldns_sd" ++ AC_DEFINE(HAVE_MDNS_BONJOUR,1,[Define if you have Bonjour/mDNSResponder.]) ++ ]) ++ ]) ++fi + + dnl Check for mnt_mountp in struct mnttab + AC_MSG_CHECKING([for mnt_mountp in struct mnttab]) +@@ -347,15 +358,24 @@ + dnl --------------------------------------------------------------------------- + dnl disk - hal and various stuff + dnl --------------------------------------------------------------------------- +-PKG_CHECK_MODULES(HAL, [dbus-1 >= 0.31 hal >= 0.5.0], ++have_hal=false ++ ++AC_ARG_ENABLE([hal], ++ AS_HELP_STRING([--disable-hal], [disable HAL support]), ++ ,enable_hal=yes) ++ ++if test "x$enable_hal" = "xyes"; then ++ PKG_CHECK_MODULES(HAL, [dbus-1 >= 0.31 hal >= 0.5.0], + [have_hal=true], + [have_hal=false]) +-if test "x$have_hal" = "xtrue"; then +- AC_SUBST(HAL_CFLAGS) +- AC_SUBST(HAL_LIBS) +- AC_DEFINE(HAVE_HAL,1,[defined if HAL is available]) ++ if test "x$have_hal" = "xtrue"; then ++ AC_SUBST(HAL_CFLAGS) ++ AC_SUBST(HAL_LIBS) ++ AC_DEFINE(HAVE_HAL,1,[defined if HAL is available]) ++ IOLIB_SUBDIRS="$IOLIB_SUBDIRS disk" ++ fi + fi +-IOLIB_SUBDIRS="$IOLIB_SUBDIRS disk" ++ + + dnl ptpip - works 'everywhere' with TCP/IP stack. + IOLIB_SUBDIRS="$IOLIB_SUBDIRS ptpip" diff --git a/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild b/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild new file mode 100644 index 000000000000..ca4f224643a4 --- /dev/null +++ b/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild,v 1.1 2008/11/29 21:50:48 eva Exp $ + +# TODO +# 1. Track upstream bug --disable-docs does not work. +# http://sourceforge.net/tracker/index.php?func=detail&aid=1643870&group_id=8874&atid=108874 +# 3. Track upstream bug regarding rpm usage. +# http://sourceforge.net/tracker/index.php?func=detail&aid=1643813&group_id=8874&atid=358874 + +EAPI="2" + +inherit autotools eutils multilib + +DESCRIPTION="Library that implements support for numerous digital cameras" +HOMEPAGE="http://www.gphoto.org/" +SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +IUSE="bonjour doc exif hal nls kernel_linux" +RESTRICT="test" + +# By default, drivers for all supported cameras will be compiled. +# If you want to only compile for specific camera(s), set CAMERAS +# environment to a space-separated list (no commas) of drivers that +# you want to build. +IUSE_CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 +digigr8 digita dimera3500 directory enigma13 fuji gsmart300 hp215 iclick +jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 +konica konica_qm150 largan lg_gsm mars dimagev mustek panasonic_coolshot +panasonic_l859 panasonic_dc1000 panasonic_dc1580 pccam300 pccam600 +polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung +sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 +soundvision spca50x sq905 stv0674 stv0680 sx330z template toshiba_pdrm11 +topfield" + +for camera in ${IUSE_CAMERAS}; do + IUSE="${IUSE} cameras_${camera}" +done + +# libgphoto2 actually links to libtool +RDEPEND=">=dev-libs/libusb-0.1.8 + bonjour? ( || ( + net-dns/avahi[mdnsresponder-compat] + net-misc/mDNSResponder ) ) + exif? ( >=media-libs/libexif-0.5.9 ) + hal? ( + >=sys-apps/hal-0.5 + >=sys-apps/dbus-1 ) + sys-devel/libtool" +DEPEND="${RDEPEND} + dev-util/pkgconfig + sys-devel/flex + >=sys-devel/gettext-0.14.1 + doc? ( app-doc/doxygen )" +# FIXME: gtk-doc is broken +# >=dev-util/gtk-doc-1.10 )" + +RDEPEND="${RDEPEND} + !<sys-fs/udev-114" + +pkg_setup() { + if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then + einfo "libgphoto2 supports: all ${IUSE_CAMERAS}" + einfo "All camera drivers will be built since you did not specify" + einfo "via the CAMERAS variable what camera you use." + ewarn "NOTICE: Upstream will not support you if you do not compile all camera drivers first" + fi + + if use cameras_template || use cameras_sipix_blink; then + einfo "Upstream considers sipix_blink & template driver as obsolete" + fi + + enewgroup plugdev +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.4.0-rpm.patch + + # Fix pkgconfig file when USE="-exif" + use exif || sed -i "s/, @REQUIREMENTS_FOR_LIBEXIF@//" libgphoto2.pc.in || die " libgphoto2.pc sed failed" + + # Fix bug #216206, libusb detection + sed -i "s:usb_busses:usb_find_busses:g" libgphoto2_port/configure || die "libusb sed failed" + + # Fix building on alpha, bug #221853 comment #6 + epatch "${FILESDIR}/gphoto2-ixany.patch" + + # Fix automagic dependencies, bug #242470 + epatch "${FILESDIR}/${P}-automagic.patch" + + cd "${S}/libgphoto2_port" + eautoreconf +} + +src_configure() { + local cameras + local cam + for cam in ${IUSE_CAMERAS} ; do + use "cameras_${cam}" && cameras="${cameras},${cam}" + done + + [ -z "${cameras}" ] \ + && cameras="all" \ + || cameras="${cameras:1}" + + einfo "Enabled camera drivers: ${cameras}" + [ "${cameras}" != "all" ] && \ + ewarn "Upstream will not support you if you do not compile all camera drivers first" + + local myconf + + use exif \ + && myconf="${myconf} --with-libexif=/usr" \ + || myconf="${myconf} --with-libexif=no" + + econf \ + ${myconf} \ + --disable-docs \ + --disable-gp2ddb \ + $(use_enable bonjour) \ + $(use_enable hal) \ + $(use_enable nls) \ + --with-drivers=${cameras} \ + --with-doc-dir=/usr/share/doc/${PF} \ + --with-html-dir=/usr/share/doc/${PF}/html \ + --with-hotplug-doc-dir=/usr/share/doc/${PF}/hotplug \ + --with-rpmbuild=/bin/true \ + udevscriptdir=/$(get_libdir)/udev + +# FIXME: gtk-doc is currently broken +# $(use_enable doc docs) +} + +src_compile() { + emake || die "make failed" + + if use doc; then + doxygen doc/Doxyfile || die "Documentation generation failed" + fi +} + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + + # FIXME: fixup autoconf bug + if ! use doc && [ -d "${D}/usr/share/doc/${PF}/apidocs.html" ]; then + rm -fr "${D}/usr/share/doc/${PF}/apidocs.html" + fi + # end fixup + + dodoc ChangeLog NEWS* README AUTHORS TESTERS MAINTAINERS HACKING + + HAL_FDI="/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi" + UDEV_RULES="/etc/udev/rules.d/70-libgphoto2.rules" + CAM_LIST="/usr/$(get_libdir)/libgphoto2/print-camera-list" + + if [ -x "${D}"${CAM_LIST} ]; then + # Let print-camera-list find libgphoto2.so + export LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" + # Let libgphoto2 find its camera-modules + export CAMLIBS="${D}/usr/$(get_libdir)/libgphoto2/${PV}" + + if use hal && [ -n "$("${D}"${CAM_LIST} idlist)" ]; then + einfo "Generating HAL FDI files ..." + mkdir -p "${D}"/${HAL_FDI%/*} + "${D}"${CAM_LIST} hal-fdi >> "${D}"/${HAL_FDI} \ + || die "failed to create hal-fdi" + else + ewarn "No HAL FDI file generated because no real camera driver enabled" + fi + + einfo "Generating UDEV-rules ..." + mkdir -p "${D}"/${UDEV_RULES%/*} + echo -e "# do not edit this file, it will be overwritten on update\n#" \ + > "${D}"/${UDEV_RULES} + "${D}"${CAM_LIST} udev-rules version 0.98 group plugdev >> "${D}"/${UDEV_RULES} \ + || die "failed to create udev-rules" + else + eerror "Unable to find print-camera-list" + eerror "and therefore unable to generate hotplug usermap or HAL FDI files." + eerror "You will have to manually generate it by running:" + eerror " ${CAM_LIST} udev-rules version 0.98 group plugdev > ${UDEV_RULES}" + eerror " ${CAM_LIST} hal-fdi > ${HAL_FDI}" + fi + +} + +pkg_postinst() { + elog "Don't forget to add yourself to the plugdev group " + elog "if you want to be able to access your camera." + local OLD_UDEV_RULES="${ROOT}"etc/udev/rules.d/99-libgphoto2.rules + if [[ -f ${OLD_UDEV_RULES} ]]; then + rm -f "${OLD_UDEV_RULES}" + fi +} diff --git a/media-libs/libgphoto2/metadata.xml b/media-libs/libgphoto2/metadata.xml index 704693b7879c..42f21c55f816 100644 --- a/media-libs/libgphoto2/metadata.xml +++ b/media-libs/libgphoto2/metadata.xml @@ -3,4 +3,7 @@ <pkgmetadata> <herd>gnome</herd> <herd>graphics</herd> +<use> + <flag name="bonjour">Adds Bonjour/Zeroconf support.</flag> +</use> </pkgmetadata> |