# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic autotools DESCRIPTION="The Open Computer Vision Library is a collection of algorithms and sample code for various computer vision problems." HOMEPAGE="http://www.intel.com/technology/computing/opencv/index.htm" SRC_URI="mirror://sourceforge/${PN}library/${P}.tar.gz" LICENSE="BSD" KEYWORDS="~x86 ~amd64" SLOT="1" IUSE="gtk xine ffmpeg ieee1394 v4l python jpeg jpeg2k zlib png tiff openexr debug apps" RESTRICT="nomirror" DEPEND="gtk? (>=x11-libs/gtk+-2.0.0) xine? (media-libs/xine-lib) ffmpeg? (media-video/ffmpeg) ieee1394? (media-libs/libdc1394 sys-libs/libraw1394) python? (dev-lang/python dev-lang/swig) jpeg? (media-libs/jpeg) jpeg2k? (media-libs/jasper) zlib? (sys-libs/zlib) png? (media-libs/libpng) tiff? (media-libs/tiff) openexr? (media-libs/openexr)" ALLOWED_FLAGS="-Wall -fno-rtti -pipe -march=i686 -ffast-math \ -fomit-frame-pointer" src_unpack() { unpack ${A} cd ${S} # remove the install-hook that runs ldconfig. sed -i '/install-hook:/,/^$/d' Makefile.am epatch "${FILESDIR}"/enable-use-flags-1.0.0.patch epatch "${FILESDIR}"/cvcap_ffmpeg-1.0.0.patch AT_M4DIR="autotools/aclocal" eautoreconf || die "eautoreconf failed" } src_compile() { strip-flags filter-flags -O* if use debug; then filter-ldflags -O1 -Wl filter-ldflags --enable-new-dtags -Wl filter-ldflags --sort-common -s filter-ldflags -Wl filter-ldflags -O1 fi local myconf if use python; then myconf="${myconf} --with-swig --with-python" fi local myconf econf \ ${myconf} \ $(use_with gtk) \ $(use_with xine) \ $(use_with ffmpeg) \ $(use_with ieee1394 1394libs) \ $(use_with v4l) \ $(use_enable apps) \ $(use_enable debug) || die "econf failed" emake || die "emake failed" } src_install() { make install DESTDIR=${D} || die "make install failed" dodoc AUTHORS NEWS TODO }