# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ IUSE="usb gphoto2" MY_P="iscan-1.9.0-5.redhat.8.0.tar.gz" DESCRIPTION="Sane frontend and backend for Epson scanners" HOMEPAGE="http://www.epkowa.co.jp/english/linux_e/index.html" SRC_URI="mirror://gentoo/${MY_P}" SLOT="0" LICENCE="GPL-2 epson-kowa" KEYWORDS="~x86" DEPEND="media-gfx/sane-backends usb? dev-libs/libusb" src_unpack() { unpack ${A} } src_compile() { local myconf myconf="$(use_enable usb libusb) $(use_with gphoto2)" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --host=${CHOST} ${myconf} --with-gnu-ld --with-pic || die make || die } src_install() { #This prog overwrites files from sane-backend with older versions. #Delete them ! #Also the doc goes in the wrong place einstall || die einfo ${WORKDIR} pushd ${WORKDIR}/../image/ rm -f usr/lib/sane/libsane-epson.* rm -f usr/lib/sane/libsane-dll.* rm -f usr/lib/libsane.* rm -f etc/sane.d/epson.conf rm -f etc/sane.d/dll.conf rm -rf usr/doc popd dodoc ABOUT-NLS AUTHORS COPYING* README* } pkg_postinst() { einfo einfo "If you want use the epkowa backend with xsane/kooka/scanimage... (recommended)" einfo "you must remerge \"media-gfx/sane-backends\" with the following command: " einfo einfo "LDFLAGS=\"-lstdc++\" emerge media-gfx/sane-backends " einfo einfo "Hint: to enable the backend, add \"epkowa\" in \"/etc/sane.d/dll.conf\" " einfo "Then edit \"/etc/sane.d/epkowa.conf\" to suite yuer needs. " einfo }