proj/gentoo: Initial commit
[gentoo.git] / media-video / dirac / dirac-1.0.2-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit autotools eutils multilib-minimal
7
8 DESCRIPTION="Open Source video codec"
9 HOMEPAGE="http://dirac.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="MPL-1.1"
13 SLOT="0"
14 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
15 IUSE="debug doc cpu_flags_x86_mmx static-libs"
16
17 RDEPEND=""
18 DEPEND="
19         doc? (
20                 app-doc/doxygen
21                 virtual/latex-base
22                 media-gfx/graphviz
23                 || ( >=app-text/texlive-core-2014 app-text/dvipdfm )
24         )"
25 DOCS=( AUTHORS ChangeLog NEWS README TODO )
26
27 src_prepare() {
28         epatch "${FILESDIR}"/${PN}-0.5.2-doc.patch
29         AT_M4DIR="m4" eautoreconf
30         export VARTEXFONTS="${T}/fonts"
31 }
32
33 multilib_src_configure() {
34         ECONF_SOURCE="${S}" econf \
35                 $(use_enable static-libs static) \
36                 $(use_enable cpu_flags_x86_mmx mmx) \
37                 $(use_enable debug) \
38                 $(multilib_is_native_abi && echo $(use_enable doc))
39         if ! multilib_is_native_abi ; then
40                 sed -i -e 's/ encoder decoder util//' Makefile || die
41         fi
42 }
43
44 multilib_src_install() {
45         emake \
46                 DESTDIR="${D}" \
47                 htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
48                 latexdir="${EPREFIX}/usr/share/doc/${PF}/programmers" \
49                 algodir="${EPREFIX}/usr/share/doc/${PF}/algorithm" \
50                 faqdir="${EPREFIX}/usr/share/doc/${PF}" \
51                 install
52 }
53
54 multilib_src_install_all() {
55         prune_libtool_files --all
56         einstalldocs
57 }