transcode-1.1.7-r3.ebuild 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils libtool multilib
  5. DESCRIPTION="A suite of utilities for transcoding video and audio codecs in different containers"
  6. HOMEPAGE="http://www.transcoding.org/ https://bitbucket.org/france/transcode-tcforge"
  7. SRC_URI="https://www.bitbucket.org/france/${PN}-tcforge/downloads/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
  11. IUSE="cpu_flags_x86_3dnow a52 aac alsa altivec dv dvd +iconv imagemagick jpeg lzo mjpeg cpu_flags_x86_mmx mp3 mpeg nuv ogg oss pic postproc quicktime sdl cpu_flags_x86_sse cpu_flags_x86_sse2 theora truetype v4l vorbis X x264 xml xvid"
  12. RDEPEND="
  13. >=virtual/ffmpeg-0.10
  14. a52? ( media-libs/a52dec )
  15. aac? ( media-libs/faac )
  16. alsa? ( media-libs/alsa-lib )
  17. dv? ( media-libs/libdv )
  18. dvd? ( media-libs/libdvdread )
  19. iconv? ( virtual/libiconv )
  20. imagemagick? ( media-gfx/imagemagick:= )
  21. jpeg? ( virtual/jpeg:0= )
  22. lzo? ( >=dev-libs/lzo-2 )
  23. mjpeg? ( media-video/mjpegtools )
  24. mp3? ( media-sound/lame )
  25. mpeg? ( media-libs/libmpeg2 )
  26. ogg? ( media-libs/libogg )
  27. postproc? ( >=virtual/ffmpeg-0.10 )
  28. quicktime? ( >=media-libs/libquicktime-1 )
  29. sdl? ( >=media-libs/libsdl-1.2.5[X?] )
  30. theora? ( media-libs/libtheora )
  31. truetype? ( >=media-libs/freetype-2 )
  32. v4l? ( media-libs/libv4l )
  33. vorbis? ( media-libs/libvorbis )
  34. X? ( x11-libs/libXpm x11-libs/libXaw x11-libs/libXv )
  35. x264? ( media-libs/x264 )
  36. xml? ( dev-libs/libxml2 )
  37. xvid? ( media-libs/xvid )
  38. "
  39. DEPEND="
  40. ${RDEPEND}
  41. virtual/pkgconfig
  42. v4l? ( >=sys-kernel/linux-headers-2.6.11 )
  43. "
  44. REQUIRED_USE="
  45. cpu_flags_x86_sse? ( cpu_flags_x86_mmx )
  46. cpu_flags_x86_sse2? ( cpu_flags_x86_mmx cpu_flags_x86_sse )
  47. cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
  48. nuv? ( lzo )
  49. "
  50. PATCHES=(
  51. "${FILESDIR}"/${P}-ffmpeg.patch
  52. "${FILESDIR}"/${P}-ffmpeg-0.10.patch
  53. "${FILESDIR}"/${P}-ffmpeg-0.11.patch
  54. "${FILESDIR}"/${P}-preset-free.patch
  55. "${FILESDIR}"/${P}-libav-9.patch
  56. "${FILESDIR}"/${P}-libav-10.patch
  57. "${FILESDIR}"/${P}-preset-force.patch
  58. "${FILESDIR}"/${P}-ffmpeg2.patch
  59. "${FILESDIR}"/${P}-freetype251.patch
  60. "${FILESDIR}"/${P}-ffmpeg24.patch
  61. )
  62. src_prepare() {
  63. if has_version '>=media-video/ffmpeg-2.8' ||
  64. has_version '>=media-video/libav-12'; then
  65. PATCHES+=( "${FILESDIR}"/${P}-ffmpeg29.patch )
  66. fi
  67. default
  68. elibtoolize
  69. }
  70. src_configure() {
  71. local myconf
  72. use x86 && myconf="$(use_enable !pic x86-textrels)" #271476
  73. econf \
  74. $(use_enable cpu_flags_x86_mmx mmx) \
  75. $(use_enable cpu_flags_x86_3dnow 3dnow) \
  76. $(use_enable cpu_flags_x86_sse sse) \
  77. $(use_enable cpu_flags_x86_sse2 sse2) \
  78. $(use_enable altivec) \
  79. $(use_enable v4l libv4l2) \
  80. $(use_enable v4l libv4lconvert) \
  81. $(use_enable mpeg libmpeg2) \
  82. $(use_enable mpeg libmpeg2convert) \
  83. --enable-experimental \
  84. --enable-deprecated \
  85. $(use_enable v4l) \
  86. $(use_enable oss) \
  87. $(use_enable alsa) \
  88. $(use_enable postproc libpostproc) \
  89. $(use_enable truetype freetype2) \
  90. $(use_enable mp3 lame) \
  91. $(use_enable xvid) \
  92. $(use_enable x264) \
  93. $(use_enable ogg) \
  94. $(use_enable vorbis) \
  95. $(use_enable theora) \
  96. $(use_enable dvd libdvdread) \
  97. $(use_enable dv libdv) \
  98. $(use_enable quicktime libquicktime) \
  99. $(use_enable lzo) \
  100. $(use_enable a52) \
  101. $(use_enable aac faac) \
  102. $(use_enable xml libxml2) \
  103. $(use_enable mjpeg mjpegtools) \
  104. $(use_enable sdl) \
  105. $(use_enable imagemagick) \
  106. $(use_enable jpeg libjpeg) \
  107. $(use_enable iconv) \
  108. $(use_enable nuv) \
  109. $(use_with X x) \
  110. --with-mod-path=/usr/$(get_libdir)/transcode \
  111. ${myconf}
  112. }
  113. src_install() {
  114. emake DESTDIR="${D}" docsdir=/usr/share/doc/${PF} install
  115. dodoc AUTHORS ChangeLog README STYLE TODO
  116. prune_libtool_files --all
  117. }