cinelerra-20150908.ebuild 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils multilib flag-o-matic
  5. CINCV_VER=2.3
  6. DESCRIPTION="The most advanced non-linear video editor and compositor"
  7. HOMEPAGE="http://www.cinelerra.org/"
  8. SRC_URI="https://cinelerra-cv.org/releases/CinelerraCV-${CINCV_VER}.tar.xz -> ${P}.tar.xz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~ppc ~x86"
  12. IUSE="cpu_flags_x86_3dnow alsa altivec css debug ieee1394 cpu_flags_x86_mmx opengl oss"
  13. RDEPEND="media-libs/a52dec:=
  14. media-libs/faac:=
  15. media-libs/faad2:=
  16. >=media-libs/freetype-2
  17. media-libs/fontconfig
  18. media-libs/libdv:=
  19. >=media-libs/libogg-1.2:=
  20. media-libs/libpng:0=
  21. media-libs/libsndfile:=
  22. >=media-libs/libtheora-1.1:=
  23. >=media-libs/libvorbis-1.3:=
  24. >=media-libs/openexr-1.5:=
  25. media-libs/tiff:0=
  26. media-libs/x264:=
  27. media-sound/lame:=
  28. >=media-video/mjpegtools-2
  29. >=sci-libs/fftw-3
  30. x11-libs/libX11:=
  31. x11-libs/libXext:=
  32. x11-libs/libXft:=
  33. x11-libs/libXv:=
  34. x11-libs/libXvMC:=
  35. x11-libs/libXxf86vm:=
  36. virtual/ffmpeg
  37. || ( media-video/ffmpeg:0[postproc(-)] media-libs/libpostproc )
  38. virtual/jpeg:0
  39. alsa? ( media-libs/alsa-lib:= )
  40. ieee1394? (
  41. media-libs/libiec61883:=
  42. >=sys-libs/libraw1394-1.2.0:=
  43. >=sys-libs/libavc1394-0.5.0:=
  44. )
  45. opengl? (
  46. virtual/glu
  47. virtual/opengl
  48. )"
  49. DEPEND="${RDEPEND}
  50. app-arch/xz-utils
  51. virtual/pkgconfig
  52. cpu_flags_x86_mmx? ( dev-lang/nasm )"
  53. S="${WORKDIR}/CinelerraCV-${CINCV_VER}"
  54. src_prepare() {
  55. epatch \
  56. "${FILESDIR}"/${PN}-20140710-validate_desktop_entry.patch \
  57. "${FILESDIR}"/${PN}-ffmpeg.patch \
  58. "${FILESDIR}"/${PN}-20140710-underlinking.patch \
  59. "${FILESDIR}"/${PN}-20140710-ffmpeg-0.11.patch \
  60. "${FILESDIR}"/${PN}-libav9.patch \
  61. "${FILESDIR}"/${PN}-pngtoh.patch \
  62. "${FILESDIR}"/${PN}-putbits-gcc52.patch \
  63. "${FILESDIR}"/${PN}-implicit_decls.patch \
  64. "${FILESDIR}"/${PN}-includes.patch
  65. if has_version '>=media-video/ffmpeg-2' ; then
  66. epatch "${FILESDIR}"/${PN}-ffmpeg2.patch
  67. fi
  68. if has_version '>=media-video/ffmpeg-2.9' ; then
  69. epatch "${FILESDIR}"/${PN}-ffmpeg29.patch
  70. fi
  71. eautoreconf
  72. }
  73. src_configure() {
  74. append-cppflags -D__STDC_CONSTANT_MACROS #321945
  75. append-ldflags -Wl,-z,noexecstack #212959
  76. local myconf
  77. use debug && myconf='--enable-x-error-output'
  78. econf \
  79. $(use_enable oss) \
  80. $(use_enable alsa) \
  81. --disable-esd \
  82. $(use_enable ieee1394 firewire) \
  83. $(use_enable css) \
  84. $(use_enable cpu_flags_x86_mmx mmx) \
  85. $(use_enable cpu_flags_x86_3dnow 3dnow) \
  86. $(use_enable altivec) \
  87. $(use_enable opengl) \
  88. --with-plugindir=/usr/$(get_libdir)/${PN} \
  89. --with-buildinfo=cust/"Gentoo - ${PV}" \
  90. --with-external-ffmpeg \
  91. ${myconf}
  92. }
  93. src_install() {
  94. emake DESTDIR="${D}" install
  95. dohtml -a png,html,texi,sdw -r doc/*
  96. rm -rf "${D}"/usr/include
  97. mv -vf "${D}"/usr/bin/mpeg3cat{,.hv} || die
  98. mv -vf "${D}"/usr/bin/mpeg3dump{,.hv} || die
  99. mv -vf "${D}"/usr/bin/mpeg3toc{,.hv} || die
  100. dosym /usr/bin/mpeg2enc /usr/$(get_libdir)/${PN}/mpeg2enc.plugin
  101. prune_libtool_files --all
  102. }