Lines 11-17
Link Here
|
11 |
LICENSE="GPL-2" |
11 |
LICENSE="GPL-2" |
12 |
SLOT="0" |
12 |
SLOT="0" |
13 |
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
13 |
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
14 |
IUSE="nls doc exif usb hal" |
14 |
IUSE="nls doc exif usb hal udev" |
15 |
RESTRICT="test confcache" |
15 |
RESTRICT="test confcache" |
16 |
|
16 |
|
17 |
# needs >usbutils-0.11-r2 to avoid /usr/lib/libusb* |
17 |
# needs >usbutils-0.11-r2 to avoid /usr/lib/libusb* |
Lines 61-66
Link Here
|
61 |
# bug #139534: already merged into upstream SVN |
61 |
# bug #139534: already merged into upstream SVN |
62 |
epatch ${FILESDIR}/${P}-ngettext.patch |
62 |
epatch ${FILESDIR}/${P}-ngettext.patch |
63 |
|
63 |
|
|
|
64 |
# bug #153471: create udev-rules for udev >= 0.98 |
65 |
epatch ${FILESDIR}/${P}-backported-udev-fixes.diff |
66 |
|
64 |
# make default group 'plugdev', not camera |
67 |
# make default group 'plugdev', not camera |
65 |
sed -e 's:=camera:=plugdev:' -i packaging/linux-hotplug/usbcam.group |
68 |
sed -e 's:=camera:=plugdev:' -i packaging/linux-hotplug/usbcam.group |
66 |
|
69 |
|
Lines 118-137
Link Here
|
118 |
fi |
121 |
fi |
119 |
|
122 |
|
120 |
if [[ -x ${D}/usr/$(get_libdir)/libgphoto2/print-camera-list ]]; then |
123 |
if [[ -x ${D}/usr/$(get_libdir)/libgphoto2/print-camera-list ]]; then |
|
|
124 |
# Let print-camera-list find libgphoto2.so |
125 |
export LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" |
126 |
# Let libgphoto2 find its camera-modules |
127 |
export CAMLIBS="${D}/usr/$(get_libdir)/libgphoto2/${PV}" |
128 |
|
121 |
HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap" |
129 |
HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap" |
122 |
HAL_FDI="/usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2.fdi" |
130 |
HAL_FDI="/usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2.fdi" |
|
|
131 |
UDEV_RULES="/etc/udev/rules.d/99-libgphoto2.rules" |
123 |
|
132 |
|
124 |
if use usb && use kernel_linux; then |
133 |
if use usb && use kernel_linux; then |
125 |
einfo "Generating usbcam-gphoto2.usermap ..." |
134 |
einfo "Generating usbcam-gphoto2.usermap ..." |
126 |
echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${D}/${HOTPLUG_USERMAP} |
135 |
echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${D}/${HOTPLUG_USERMAP} |
127 |
echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${D}/${HOTPLUG_USERMAP} |
136 |
echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${D}/${HOTPLUG_USERMAP} |
128 |
${D}/usr/$(get_libdir)/libgphoto2/print-camera-list usb-usermap >> ${D}/${HOTPLUG_USERMAP} |
137 |
${D}/usr/$(get_libdir)/libgphoto2/print-camera-list usb-usermap >> ${D}/${HOTPLUG_USERMAP} \ |
129 |
|
138 |
|| die "failed to create usb-usermap" |
130 |
fi |
139 |
fi |
131 |
|
140 |
|
132 |
if use hal; then |
141 |
if use hal; then |
133 |
einfo "Generating HAL FDI files ..." |
142 |
einfo "Generating HAL FDI files ..." |
134 |
${D}/usr/$(get_libdir)/libgphoto2/print-camera-list hal-fdi >> ${D}/${HAL_FDI} |
143 |
mkdir -p ${D}/${HAL_FDI%/*} |
|
|
144 |
${D}/usr/$(get_libdir)/libgphoto2/print-camera-list hal-fdi >> ${D}/${HAL_FDI} \ |
145 |
|| die "failed to create hal-fdi" |
146 |
fi |
147 |
|
148 |
if use udev; then |
149 |
einfo "Generating UDEV-rules ..." |
150 |
mkdir -p ${D}/${UDEV_RULES%/*} |
151 |
${D}/usr/$(get_libdir)/libgphoto2/print-camera-list udev-rules-0.98 >> ${D}/${UDEV_RULES} \ |
152 |
|| die "failed to create udev-rules" |
153 |
exeinto /lib/udev |
154 |
doexe ${S}/packaging/generic/check_ptp_camera |
135 |
fi |
155 |
fi |
136 |
else |
156 |
else |
137 |
eerror "Unable to find ${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list" |
157 |
eerror "Unable to find ${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list" |