1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools eutils multilib flag-o-matic
8 DESCRIPTION="The most advanced non-linear video editor and compositor"
9 HOMEPAGE="http://www.cinelerra.org/"
10 SRC_URI="https://dev.gentoo.org/~ssuominen/${P}.tar.xz"
14 KEYWORDS="~amd64 ~ppc ~x86"
15 IUSE="cpu_flags_x86_3dnow alsa altivec css debug ieee1394 cpu_flags_x86_mmx opengl oss"
17 RDEPEND="media-libs/a52dec:=
20 >=media-libs/freetype-2
22 >=media-libs/libogg-1.2:=
24 media-libs/libsndfile:=
25 >=media-libs/libtheora-1.1:=
26 >=media-libs/libvorbis-1.3:=
27 >=media-libs/openexr-1.5:=
31 >=media-video/mjpegtools-2
40 || ( media-video/ffmpeg:0 media-libs/libpostproc )
42 alsa? ( media-libs/alsa-lib:= )
44 media-libs/libiec61883:=
45 >=sys-libs/libraw1394-1.2.0:=
46 >=sys-libs/libavc1394-0.5.0:=
55 cpu_flags_x86_mmx? ( dev-lang/nasm )"
59 "${FILESDIR}"/${P}-validate_desktop_entry.patch \
60 "${FILESDIR}"/${PN}-ffmpeg.patch \
61 "${FILESDIR}"/${P}-underlinking.patch \
62 "${FILESDIR}"/${P}-ffmpeg-0.11.patch \
63 "${FILESDIR}"/${PN}-libav9.patch \
64 "${FILESDIR}"/${PN}-pngtoh.patch \
65 "${FILESDIR}"/${PN}-nofindobject.patch
67 if has_version '>=media-video/ffmpeg-2' ; then
68 epatch "${FILESDIR}"/${PN}-ffmpeg2.patch
75 append-cppflags -D__STDC_CONSTANT_MACROS #321945
76 append-ldflags -Wl,-z,noexecstack #212959
79 use debug && myconf='--enable-x-error-output'
85 $(use_enable ieee1394 firewire) \
87 $(use_enable cpu_flags_x86_mmx mmx) \
88 $(use_enable cpu_flags_x86_3dnow 3dnow) \
89 $(use_enable altivec) \
90 $(use_enable opengl) \
91 --with-plugindir=/usr/$(get_libdir)/${PN} \
92 --with-buildinfo=cust/"Gentoo - ${PV}" \
93 --with-external-ffmpeg \
98 emake DESTDIR="${D}" install
99 dohtml -a png,html,texi,sdw -r doc/*
101 rm -rf "${D}"/usr/include
102 mv -vf "${D}"/usr/bin/mpeg3cat{,.hv} || die
103 mv -vf "${D}"/usr/bin/mpeg3dump{,.hv} || die
104 mv -vf "${D}"/usr/bin/mpeg3toc{,.hv} || die
105 dosym /usr/bin/mpeg2enc /usr/$(get_libdir)/${PN}/mpeg2enc.plugin
107 prune_libtool_files --all