mkvtoolnix-9.8.0.ebuild 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils multilib toolchain-funcs versionator multiprocessing autotools
  5. DESCRIPTION="Tools to create, alter, and inspect Matroska files"
  6. HOMEPAGE="http://www.bunkus.org/videotools/mkvtoolnix"
  7. SRC_URI="http://www.bunkus.org/videotools/mkvtoolnix/sources/${P}.tar.xz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
  11. IUSE="debug pch test qt5"
  12. RDEPEND="
  13. >=dev-libs/boost-1.46.0:=
  14. >=dev-libs/libebml-1.3.3:=
  15. dev-libs/jsoncpp:=
  16. dev-libs/pugixml
  17. media-libs/flac
  18. >=media-libs/libmatroska-1.4.4:=
  19. media-libs/libogg
  20. media-libs/libvorbis
  21. sys-apps/file
  22. sys-libs/zlib
  23. qt5? (
  24. dev-qt/qtcore:5
  25. dev-qt/qtgui:5
  26. dev-qt/qtnetwork:5
  27. dev-qt/qtwidgets:5
  28. dev-qt/qtconcurrent:5
  29. )
  30. "
  31. DEPEND="${RDEPEND}
  32. dev-ruby/rake
  33. sys-devel/gettext
  34. virtual/pkgconfig
  35. test? ( dev-cpp/gtest )
  36. "
  37. pkg_pretend() {
  38. # https://bugs.gentoo.org/419257
  39. local ver=4.6
  40. local msg="You need at least GCC ${ver}.x for C++11 range-based 'for' and nullptr support."
  41. if ! version_is_at_least ${ver} $(gcc-version); then
  42. eerror ${msg}
  43. die ${msg}
  44. fi
  45. }
  46. src_prepare() {
  47. default
  48. eautoreconf
  49. }
  50. src_configure() {
  51. local myconf
  52. if use qt5 ; then
  53. # ac/qt5.m4 finds default Qt version set by qtchooser, bug #532600
  54. myconf+=(
  55. --with-moc=/usr/$(get_libdir)/qt5/bin/moc
  56. --with-uic=/usr/$(get_libdir)/qt5/bin/uic
  57. --with-rcc=/usr/$(get_libdir)/qt5/bin/rcc
  58. )
  59. fi
  60. econf \
  61. $(use_enable debug) \
  62. $(use_enable qt5 qt) \
  63. $(usex pch "" --disable-precompiled-headers) \
  64. "${myconf[@]}" \
  65. --disable-optimization \
  66. --docdir="${EPREFIX}"/usr/share/doc/${PF} \
  67. --with-boost="${EPREFIX}"/usr \
  68. --with-boost-libdir="${EPREFIX}"/usr/$(get_libdir)
  69. }
  70. src_compile() {
  71. rake V=1 -j$(makeopts_jobs) || die
  72. }
  73. src_test() {
  74. rake V=1 -j$(makeopts_jobs) tests:unit || die
  75. rake V=1 -j$(makeopts_jobs) tests:run_unit || die
  76. }
  77. src_install() {
  78. DESTDIR="${D}" rake -j$(makeopts_jobs) install || die
  79. dodoc AUTHORS ChangeLog README.md
  80. doman doc/man/*.1
  81. }