summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2006-12-11 16:20:03 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2006-12-11 16:20:03 +0000
commit5a070609f7d2f650c34254fa72ad43e9ccb07c93 (patch)
treeb0459af883a12bb42e22e5fa63e58042158e3932 /media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild
parentAdded udev-useflag for libgphoto2. (diff)
downloadhistorical-5a070609f7d2f650c34254fa72ad43e9ccb07c93.tar.gz
historical-5a070609f7d2f650c34254fa72ad43e9ccb07c93.tar.bz2
historical-5a070609f7d2f650c34254fa72ad43e9ccb07c93.zip
Added installation of udev-103 compliant rules, solving Bug #153471. Correcting also installation of hal-file, Bug #147346.
Package-Manager: portage-2.1.2_rc3-r2
Diffstat (limited to 'media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild')
-rw-r--r--media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild30
1 files changed, 25 insertions, 5 deletions
diff --git a/media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild b/media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild
index a7aa6aa19c00..3db8443a167f 100644
--- a/media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild
+++ b/media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild,v 1.6 2006/11/07 12:03:11 hanno Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild,v 1.7 2006/12/11 16:20:03 zzam Exp $
inherit libtool eutils autotools
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/gphoto/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="nls doc exif usb hal"
+IUSE="nls doc exif usb hal udev"
RESTRICT="test confcache"
# needs >usbutils-0.11-r2 to avoid /usr/lib/libusb*
@@ -61,6 +61,9 @@ src_unpack() {
# bug #139534: already merged into upstream SVN
epatch ${FILESDIR}/${P}-ngettext.patch
+ # bug #153471: create udev-rules for udev >= 0.98
+ epatch ${FILESDIR}/${P}-backported-udev-fixes.diff
+
# make default group 'plugdev', not camera
sed -e 's:=camera:=plugdev:' -i packaging/linux-hotplug/usbcam.group
@@ -118,20 +121,37 @@ src_install() {
fi
if [[ -x ${D}/usr/$(get_libdir)/libgphoto2/print-camera-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}"
+
HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap"
HAL_FDI="/usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2.fdi"
+ UDEV_RULES="/etc/udev/rules.d/99-libgphoto2.rules"
if use usb && use kernel_linux; then
einfo "Generating usbcam-gphoto2.usermap ..."
echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${D}/${HOTPLUG_USERMAP}
echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${D}/${HOTPLUG_USERMAP}
- ${D}/usr/$(get_libdir)/libgphoto2/print-camera-list usb-usermap >> ${D}/${HOTPLUG_USERMAP}
-
+ ${D}/usr/$(get_libdir)/libgphoto2/print-camera-list usb-usermap >> ${D}/${HOTPLUG_USERMAP} \
+ || die "failed to create usb-usermap"
fi
if use hal; then
einfo "Generating HAL FDI files ..."
- ${D}/usr/$(get_libdir)/libgphoto2/print-camera-list hal-fdi >> ${D}/${HAL_FDI}
+ mkdir -p ${D}/${HAL_FDI%/*}
+ ${D}/usr/$(get_libdir)/libgphoto2/print-camera-list hal-fdi >> ${D}/${HAL_FDI} \
+ || die "failed to create hal-fdi"
+ fi
+
+ if use udev; then
+ einfo "Generating UDEV-rules ..."
+ mkdir -p ${D}/${UDEV_RULES%/*}
+ ${D}/usr/$(get_libdir)/libgphoto2/print-camera-list udev-rules-0.98 >> ${D}/${UDEV_RULES} \
+ || die "failed to create udev-rules"
+ exeinto /lib/udev
+ doexe ${S}/packaging/generic/check_ptp_camera
fi
else
eerror "Unable to find ${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list"