1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools eutils ltprune multilib flag-o-matic
7 DESCRIPTION="The most advanced non-linear video editor and compositor"
8 HOMEPAGE="http://www.cinelerra.org/"
9 SRC_URI="https://cinelerra-cv.org/releases/CinelerraCV-${PV}.tar.xz
10 https://dev.gentoo.org/~mgorny/dist/${P}-patchset.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
23 >=media-libs/libogg-1.2:=
25 media-libs/libsndfile:=
26 >=media-libs/libtheora-1.1:=
27 >=media-libs/libvorbis-1.3:=
28 >=media-libs/openexr-1.5:=
32 >=media-video/mjpegtools-2
41 || ( media-video/ffmpeg:0[postproc(-)] media-libs/libpostproc )
43 alsa? ( media-libs/alsa-lib:= )
45 media-libs/libiec61883:=
46 >=sys-libs/libraw1394-1.2.0:=
47 >=sys-libs/libavc1394-0.5.0:=
56 cpu_flags_x86_mmx? ( dev-lang/nasm )"
58 S="${WORKDIR}/CinelerraCV-${PV}"
62 "${WORKDIR}"/${P}-patchset/${PN}-20140710-validate_desktop_entry.patch \
63 "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg.patch \
64 "${WORKDIR}"/${P}-patchset/${PN}-20140710-underlinking.patch \
65 "${WORKDIR}"/${P}-patchset/${PN}-20140710-ffmpeg-0.11.patch \
66 "${WORKDIR}"/${P}-patchset/${PN}-libav9.patch \
67 "${WORKDIR}"/${P}-patchset/${PN}-pngtoh.patch \
68 "${WORKDIR}"/${P}-patchset/${PN}-putbits-gcc52.patch \
69 "${WORKDIR}"/${P}-patchset/${PN}-implicit_decls.patch \
70 "${WORKDIR}"/${P}-patchset/${PN}-includes.patch
72 if has_version '>=media-video/ffmpeg-2' ; then
73 epatch "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg2.patch
76 if has_version '>=media-video/ffmpeg-2.9' ; then
77 epatch "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg29.patch
80 if has_version '>=media-video/ffmpeg-3.5' ; then
81 epatch "${FILESDIR}/ffmpeg4.patch"
88 append-cppflags -D__STDC_CONSTANT_MACROS #321945
89 append-ldflags -Wl,-z,noexecstack #212959
92 use debug && myconf='--enable-x-error-output'
98 $(use_enable ieee1394 firewire) \
100 $(use_enable cpu_flags_x86_mmx mmx) \
101 $(use_enable cpu_flags_x86_3dnow 3dnow) \
102 $(use_enable altivec) \
103 $(use_enable opengl) \
104 --with-plugindir=/usr/$(get_libdir)/${PN} \
105 --with-buildinfo=cust/"Gentoo - ${PV}" \
106 --with-external-ffmpeg \
111 emake DESTDIR="${D}" install
112 dohtml -a png,html,texi,sdw -r doc/*
114 rm -rf "${D}"/usr/include
115 mv -vf "${D}"/usr/bin/mpeg3cat{,.hv} || die
116 mv -vf "${D}"/usr/bin/mpeg3dump{,.hv} || die
117 mv -vf "${D}"/usr/bin/mpeg3toc{,.hv} || die
118 dosym /usr/bin/mpeg2enc /usr/$(get_libdir)/${PN}/mpeg2enc.plugin
120 prune_libtool_files --all