/media-video/handbrake/handbrake-0.9.3.ebuild

http://github.com/stsquad/Gentoo-Overlay · Unknown · 99 lines · 78 code · 21 blank · 0 comment · 0 complexity · f2ac7c813015062a1ec530a036558e6e MD5 · raw file

  1. # Copyright 1999-2007 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: $
  4. EAPI="1"
  5. inherit eutils
  6. DESCRIPTION="Open-source DVD to MPEG-4 converter."
  7. HOMEPAGE="http://handbrake.fr/"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. #real link is http://handbrake.fr/rotation.php?file=HandBrake-0.9.3.tar.gz
  11. #However, wget does not treat this correctly, and neither does the unpack process.
  12. SRC_URI="http://handbrake.fr/HandBrake-${PV}.tar.gz"
  13. KEYWORDS="x86 amd64"
  14. RESTRICT="fetch"
  15. #qt4 UI is broke, may just need dependancies. This USE flag does nothing.
  16. #Maybe you have better luck ;
  17. IUSE="-gtk -qt4"
  18. RDEPEND="
  19. gtk? ( >=x11-libs/gtk+-2.8
  20. >=gnome-extra/gtkhtml-3.14
  21. )"
  22. DEPEND="sys-libs/zlib
  23. dev-util/ftjam
  24. $RDEPEND"
  25. S="${WORKDIR}/HandBrake-${PV}"
  26. GTK="${S}/gtk/src"
  27. pkg_nofetch() {
  28. einfo "Just download the source code from"
  29. einfo "${HOMEPAGE}"
  30. einfo "and save it in ${DISTDIR} "
  31. }
  32. src_unpack() {
  33. unpack "${A}"
  34. }
  35. src_compile() {
  36. cd "${S}"
  37. #for local testing purposes; to prevent redownload of contribs.
  38. # cp -v /tmp/handbrake/HandBrake-0.9.3/contrib/*.tar.gz ./contrib
  39. einfo "Building HandBrakeCLI."
  40. make || die "make HandBrakeCLI failed"
  41. if use gtk ; then
  42. cd ${S}/gtk
  43. einfo "Building ghb."
  44. ./autogen.sh || die "gtk autogen.sh failed"
  45. make || die "make ghb failed"
  46. fi
  47. # if use qt4 ; then
  48. # cd ${S}/qt4
  49. # einfo "Building qtHB."
  50. # qmake || die "qmake failed"
  51. # make || die "make qtHB failed"
  52. # fi
  53. }
  54. src_install() {
  55. into /usr
  56. dobin HandBrakeCLI
  57. dodoc AUTHORS BUILD CREDITS NEWS THANKS TRANSLATIONS
  58. if use gtk ; then
  59. dobin ${GTK}/ghb
  60. insinto /usr/share/applications/
  61. newins ${GTK}/ghb.desktop ghb.desktop
  62. for res in 64 128; do
  63. insinto /usr/share/icons/hicolor/${res}x${res}/apps/
  64. newins ${GTK}/hb-icon${res}.png handbrake.png
  65. done
  66. fi
  67. # if use qt4 ; then
  68. # dobin ./qt4/qtHB
  69. # fi
  70. }
  71. pkg_postinst() {
  72. einfo "HandBrakeCLI had been installed."
  73. if use gtk; then
  74. einfo "So has ghb, the Handbrake GUI."
  75. einfo "ghb.desktop has been installed to"
  76. einfo "/usr/share/applications/"
  77. fi
  78. }