mediainfo-0.7.92.1.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. WX_GTK_VER="3.0"
  5. inherit eutils autotools wxwidgets
  6. DESCRIPTION="MediaInfo supplies technical and tag information about media files"
  7. HOMEPAGE="http://mediaarea.net/mediainfo/"
  8. SRC_URI="http://mediaarea.net/download/source/${PN}/${PV}/${P/-/_}.tar.xz"
  9. LICENSE="BSD-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="curl mms wxwidgets"
  13. RDEPEND="sys-libs/zlib
  14. >=media-libs/libzen-0.4.34
  15. ~media-libs/lib${P}[curl=,mms=]
  16. wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
  17. DEPEND="${RDEPEND}
  18. virtual/pkgconfig"
  19. S=${WORKDIR}/MediaInfo
  20. pkg_setup() {
  21. TARGETS="CLI"
  22. use wxwidgets && TARGETS+=" GUI"
  23. }
  24. src_prepare() {
  25. eapply_user
  26. local target
  27. for target in ${TARGETS}; do
  28. cd "${S}"/Project/GNU/${target}
  29. sed -i -e "s:-O2::" configure.ac
  30. eautoreconf
  31. done
  32. }
  33. src_configure() {
  34. local target
  35. for target in ${TARGETS}; do
  36. cd "${S}"/Project/GNU/${target}
  37. local args=""
  38. [[ ${target} == "GUI" ]] && args="--with-wxwidgets --with-wx-gui"
  39. econf ${args}
  40. done
  41. }
  42. src_compile() {
  43. local target
  44. for target in ${TARGETS}; do
  45. cd "${S}"/Project/GNU/${target}
  46. default
  47. done
  48. }
  49. src_install() {
  50. local target
  51. for target in ${TARGETS}; do
  52. cd "${S}"/Project/GNU/${target}
  53. default
  54. dodoc "${S}"/History_${target}.txt
  55. if [[ ${target} == "GUI" ]]; then
  56. newicon "${S}"/Source/Resource/Image/MediaInfo.png ${PN}.png
  57. make_desktop_entry ${PN}-gui MediaInfo ${PN} "AudioVideo;GTK"
  58. fi
  59. done
  60. }