Index: libgphoto2-2.1.6.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.1.6.ebuild,v --- libgphoto2-2.1.6.ebuild 6 Jul 2005 09:44:51 -0000 1.5 +++ libgphoto2-2.1.6.ebuild 13 Aug 2005 12:18:00 -0000 @@ -11,14 +11,14 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~ia64 ~ppc64 ~alpha" -IUSE="nls doc exif nousb jpeg" +IUSE="nls doc exif nousb" # needs >usbutils-0.11-r2 to avoid /usr/lib/libusb* # conflicts with dev-libs/libusb RDEPEND="!nousb? ( >=dev-libs/libusb-0.1.8 >=sys-apps/usbutils-0.11-r2 - sys-apps/hotplug + kernel_linux? ( sys-apps/hotplug ) ) exif? ( >=media-libs/libexif-0.5.9 )" DEPEND="${RDEPEND} @@ -34,13 +34,12 @@ sierra sipix smal sonydscf1 sonydscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z toshiba" pkg_setup() { - if [ -z "${CAMERAS}" ] ; then + if [[ -z "${CAMERAS}" ]] ; then ewarn "All camera drivers will be built since you did not specify" ewarn "via the CAMERAS variable what camera you use." einfo "libgphoto2 supports: all ${IUSE_CAMERAS}" fi echo - use jpeg && ewarn "For 'exif' support, you need to set USE=exif" } src_unpack() { @@ -55,7 +54,7 @@ for cam in ${CAMERAS} ; do has ${cam} ${IUSE_CAMERAS} && cameras="${cameras},${cam}" done - [ -z "${cameras}" ] \ + [[ -z "${cameras}" ]] \ && cameras="all" \ || cameras="${cameras:1}" einfo $cameras @@ -64,30 +63,32 @@ local myconf - myconf="--with-rpmbuild=/bin/false" - myconf="--with-drivers=${cameras}" use exif \ && myconf="${myconf} --with-exif-prefix=/usr" \ || myconf="${myconf} --without-exif" - myconf="${myconf} `use_enable nls`" - myconf="${myconf} `use_enable doc docs`" - econf ${myconf} || die "econf failed" + + econf \ + --with-drivers=${cameras} \ + $(use_enable nls) \ + $(use_enable doc docs) \ + ${myconf} || die "econf failed" + # or the documentation fails. emake -j1 || die "make failed" } src_install() { - if use !nousb; then - make DESTDIR=${D} \ - gphotodocdir=/usr/share/doc/${PF} \ - HTML_DIR=/usr/share/doc/${PF}/sgml \ - hotplugdocdir=/usr/share/doc/${PF}/linux-hotplug \ - install || die "install failed" + if use !nousb && use kernel_linux; then + make DESTDIR=${D} \ + gphotodocdir=/usr/share/doc/${PF} \ + HTML_DIR=/usr/share/doc/${PF}/sgml \ + hotplugdocdir=/usr/share/doc/${PF}/linux-hotplug \ + install || die "install failed" else - make DESTDIR=${D} \ - gphotodocdir=/usr/share/doc/${PF} \ - HTML_DIR=/usr/share/doc/${PF}/sgml \ - install || die "install failed" + make DESTDIR=${D} \ + gphotodocdir=/usr/share/doc/${PF} \ + HTML_DIR=/usr/share/doc/${PF}/sgml \ + install || die "install failed" fi # manually move apidocs @@ -102,7 +103,7 @@ dodoc ChangeLog NEWS* README AUTHORS TESTERS MAINTAINERS HACKING CHANGES # install hotplug support - if use !nousb; then + if use !nousb && use kernel_linux; then insinto /etc/hotplug/usb newins ${S}/packaging/linux-hotplug/usbcam.console usbcam chmod +x ${D}/etc/hotplug/usb/usbcam @@ -110,10 +111,10 @@ } pkg_postinst() { - if use !nousb; then + if use !nousb && use kernel_linux; then einfo "Generating usbcam-gphoto2.usermap .." HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap" - if [ -x ${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap ]; then + if [[ -x ${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap ]]; then echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${ROOT}/${HOTPLUG_USERMAP} echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${ROOT}/${HOTPLUG_USERMAP} ${ROOT}/usr/$(get_libdir)/libgphoto2/print-usb-usermap >> ${ROOT}/${HOTPLUG_USERMAP}