cinelerra-20140710.ebuild 2.8 KB

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