]> Pileus Git - ~andy/sunrise/blob - media-libs/unicap/unicap-0.9.7.ebuild
90a0a74a79937bec06ea2f9c35059fc00e806c1e
[~andy/sunrise] / media-libs / unicap / unicap-0.9.7.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 DESCRIPTION="The uniform API for image acquisition devices"
8 HOMEPAGE="http://unicap-imaging.org/"
9 SRC_URI="http://unicap-imaging.org/downloads/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="alsa debug doc gtk ieee1394 nls png theora threads v4l v4l2"
15
16 RDEPEND="alsa? ( media-libs/alsa-lib )
17         gtk? ( x11-libs/gtk+:2 )
18         ieee1394? ( >=sys-libs/libraw1394-0.10.0 )
19         nls? ( virtual/libintl )
20         png? ( media-libs/libpng )
21         theora? ( media-libs/libtheora )"
22 DEPEND="${RDEPEND}
23         doc? ( >=dev-util/gtk-doc-1.4 )"
24
25 src_configure() {
26         local myconf
27
28         if use debug ; then
29                 myconf="${myconf} --enable-thing --enable-debug-unicap
30                         --enable-debug-ucil --enable-debug-thing"
31                 use gtk && myconf="${myconf} --enable-debug-unicapgtk"
32                 use ieee1394 && myconf="${myconf} --enable-debug-dcam
33                         --enable-debug-vid21394"
34                 use v4l && myconf="${myconf} --enable-debug-v4l"
35                 use v4l2 && myconf="${myconf} --enable-debug-v4l2"
36         fi
37
38         # The Unicap author recommended leaving avcodec (ffmpeg) support disabled:
39         # http://unicap-imaging.org/blog/index.php?/archives/20-Unicap-0.9.3-and-UCView-0.22-released.html#c46
40
41         econf ${myconf} \
42                 $(use_enable alsa ucil-alsa) \
43                 $(use_enable doc gtk-doc) \
44                 $(use_enable gtk unicapgtk) \
45                 $(use_enable ieee1394 dcam) \
46                 $(use_enable ieee1394 vid21394) \
47                 $(use_enable nls) \
48                 $(use_enable png ucil-png) \
49                 $(use_enable theora ucil-theora) \
50                 $(use_enable threads unicap-threads) \
51                 $(use_enable v4l) \
52                 $(use_enable v4l2) \
53                 --enable-ucil
54 }
55
56 src_install() {
57         emake DESTDIR="${D}" install || die "emake install failed"
58         dodoc AUTHORS ChangeLog NEWS README README.troubleshooting \
59                 || die "dodoc failed"
60 }