Lines 11-24
Link Here
|
11 |
LICENSE="GPL-2" |
11 |
LICENSE="GPL-2" |
12 |
SLOT="0" |
12 |
SLOT="0" |
13 |
KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~ia64 ~ppc64 ~alpha" |
13 |
KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~ia64 ~ppc64 ~alpha" |
14 |
IUSE="nls doc exif nousb jpeg" |
14 |
IUSE="nls doc exif nousb" |
15 |
|
15 |
|
16 |
# needs >usbutils-0.11-r2 to avoid /usr/lib/libusb* |
16 |
# needs >usbutils-0.11-r2 to avoid /usr/lib/libusb* |
17 |
# conflicts with dev-libs/libusb |
17 |
# conflicts with dev-libs/libusb |
18 |
RDEPEND="!nousb? ( |
18 |
RDEPEND="!nousb? ( |
19 |
>=dev-libs/libusb-0.1.8 |
19 |
>=dev-libs/libusb-0.1.8 |
20 |
>=sys-apps/usbutils-0.11-r2 |
20 |
>=sys-apps/usbutils-0.11-r2 |
21 |
sys-apps/hotplug |
21 |
kernel_linux? ( sys-apps/hotplug ) |
22 |
) |
22 |
) |
23 |
exif? ( >=media-libs/libexif-0.5.9 )" |
23 |
exif? ( >=media-libs/libexif-0.5.9 )" |
24 |
DEPEND="${RDEPEND} |
24 |
DEPEND="${RDEPEND} |
Lines 34-46
Link Here
|
34 |
sierra sipix smal sonydscf1 sonydscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z toshiba" |
34 |
sierra sipix smal sonydscf1 sonydscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z toshiba" |
35 |
|
35 |
|
36 |
pkg_setup() { |
36 |
pkg_setup() { |
37 |
if [ -z "${CAMERAS}" ] ; then |
37 |
if [[ -z "${CAMERAS}" ]] ; then |
38 |
ewarn "All camera drivers will be built since you did not specify" |
38 |
ewarn "All camera drivers will be built since you did not specify" |
39 |
ewarn "via the CAMERAS variable what camera you use." |
39 |
ewarn "via the CAMERAS variable what camera you use." |
40 |
einfo "libgphoto2 supports: all ${IUSE_CAMERAS}" |
40 |
einfo "libgphoto2 supports: all ${IUSE_CAMERAS}" |
41 |
fi |
41 |
fi |
42 |
echo |
42 |
echo |
43 |
use jpeg && ewarn "For 'exif' support, you need to set USE=exif" |
|
|
44 |
} |
43 |
} |
45 |
|
44 |
|
46 |
src_unpack() { |
45 |
src_unpack() { |
Lines 55-61
Link Here
|
55 |
for cam in ${CAMERAS} ; do |
54 |
for cam in ${CAMERAS} ; do |
56 |
has ${cam} ${IUSE_CAMERAS} && cameras="${cameras},${cam}" |
55 |
has ${cam} ${IUSE_CAMERAS} && cameras="${cameras},${cam}" |
57 |
done |
56 |
done |
58 |
[ -z "${cameras}" ] \ |
57 |
[[ -z "${cameras}" ]] \ |
59 |
&& cameras="all" \ |
58 |
&& cameras="all" \ |
60 |
|| cameras="${cameras:1}" |
59 |
|| cameras="${cameras:1}" |
61 |
einfo $cameras |
60 |
einfo $cameras |
Lines 64-93
Link Here
|
64 |
|
63 |
|
65 |
local myconf |
64 |
local myconf |
66 |
|
65 |
|
67 |
myconf="--with-rpmbuild=/bin/false" |
|
|
68 |
myconf="--with-drivers=${cameras}" |
69 |
use exif \ |
66 |
use exif \ |
70 |
&& myconf="${myconf} --with-exif-prefix=/usr" \ |
67 |
&& myconf="${myconf} --with-exif-prefix=/usr" \ |
71 |
|| myconf="${myconf} --without-exif" |
68 |
|| myconf="${myconf} --without-exif" |
72 |
myconf="${myconf} `use_enable nls`" |
69 |
|
73 |
myconf="${myconf} `use_enable doc docs`" |
70 |
econf \ |
74 |
econf ${myconf} || die "econf failed" |
71 |
--with-drivers=${cameras} \ |
|
|
72 |
$(use_enable nls) \ |
73 |
$(use_enable doc docs) \ |
74 |
${myconf} || die "econf failed" |
75 |
|
75 |
# or the documentation fails. |
76 |
# or the documentation fails. |
76 |
emake -j1 || die "make failed" |
77 |
emake -j1 || die "make failed" |
77 |
} |
78 |
} |
78 |
|
79 |
|
79 |
src_install() { |
80 |
src_install() { |
80 |
if use !nousb; then |
81 |
if use !nousb && use kernel_linux; then |
81 |
make DESTDIR=${D} \ |
82 |
make DESTDIR=${D} \ |
82 |
gphotodocdir=/usr/share/doc/${PF} \ |
83 |
gphotodocdir=/usr/share/doc/${PF} \ |
83 |
HTML_DIR=/usr/share/doc/${PF}/sgml \ |
84 |
HTML_DIR=/usr/share/doc/${PF}/sgml \ |
84 |
hotplugdocdir=/usr/share/doc/${PF}/linux-hotplug \ |
85 |
hotplugdocdir=/usr/share/doc/${PF}/linux-hotplug \ |
85 |
install || die "install failed" |
86 |
install || die "install failed" |
86 |
else |
87 |
else |
87 |
make DESTDIR=${D} \ |
88 |
make DESTDIR=${D} \ |
88 |
gphotodocdir=/usr/share/doc/${PF} \ |
89 |
gphotodocdir=/usr/share/doc/${PF} \ |
89 |
HTML_DIR=/usr/share/doc/${PF}/sgml \ |
90 |
HTML_DIR=/usr/share/doc/${PF}/sgml \ |
90 |
install || die "install failed" |
91 |
install || die "install failed" |
91 |
fi |
92 |
fi |
92 |
|
93 |
|
93 |
# manually move apidocs |
94 |
# manually move apidocs |
Lines 102-108
Link Here
|
102 |
dodoc ChangeLog NEWS* README AUTHORS TESTERS MAINTAINERS HACKING CHANGES |
103 |
dodoc ChangeLog NEWS* README AUTHORS TESTERS MAINTAINERS HACKING CHANGES |
103 |
|
104 |
|
104 |
# install hotplug support |
105 |
# install hotplug support |
105 |
if use !nousb; then |
106 |
if use !nousb && use kernel_linux; then |
106 |
insinto /etc/hotplug/usb |
107 |
insinto /etc/hotplug/usb |
107 |
newins ${S}/packaging/linux-hotplug/usbcam.console usbcam |
108 |
newins ${S}/packaging/linux-hotplug/usbcam.console usbcam |
108 |
chmod +x ${D}/etc/hotplug/usb/usbcam |
109 |
chmod +x ${D}/etc/hotplug/usb/usbcam |
Lines 110-119
Link Here
|
110 |
} |
111 |
} |
111 |
|
112 |
|
112 |
pkg_postinst() { |
113 |
pkg_postinst() { |
113 |
if use !nousb; then |
114 |
if use !nousb && use kernel_linux; then |
114 |
einfo "Generating usbcam-gphoto2.usermap .." |
115 |
einfo "Generating usbcam-gphoto2.usermap .." |
115 |
HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap" |
116 |
HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap" |
116 |
if [ -x ${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap ]; then |
117 |
if [[ -x ${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap ]]; then |
117 |
echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${ROOT}/${HOTPLUG_USERMAP} |
118 |
echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${ROOT}/${HOTPLUG_USERMAP} |
118 |
echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${ROOT}/${HOTPLUG_USERMAP} |
119 |
echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${ROOT}/${HOTPLUG_USERMAP} |
119 |
${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap >> ${ROOT}/${HOTPLUG_USERMAP} |
120 |
${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap >> ${ROOT}/${HOTPLUG_USERMAP} |