vdr-xineliboutput-9999.ebuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. GENTOO_VDR_CONDITIONAL=yes
  5. inherit vdr-plugin-2 cvs toolchain-funcs
  6. DESCRIPTION="Video Disk Recorder Xinelib PlugIn"
  7. HOMEPAGE="https://sourceforge.net/projects/xineliboutput/"
  8. ECVS_SERVER="xineliboutput.cvs.sourceforge.net:/cvsroot/xineliboutput"
  9. ECVS_MODULE="${PN}"
  10. SLOT="0"
  11. LICENSE="GPL-2"
  12. KEYWORDS=""
  13. IUSE="bluray caps cec dbus fbcon jpeg libextractor nls opengl +vdr vdpau +X +xine xinerama"
  14. COMMON_DEPEND="
  15. vdr? (
  16. >=media-video/vdr-1.6.0
  17. libextractor? ( >=media-libs/libextractor-0.5.20 )
  18. caps? ( sys-libs/libcap )
  19. )
  20. xine? (
  21. ( >=media-libs/xine-lib-1.2
  22. virtual/ffmpeg )
  23. fbcon? ( jpeg? ( virtual/jpeg:* ) )
  24. X? (
  25. x11-libs/libX11
  26. x11-libs/libXext
  27. x11-libs/libXrender
  28. xinerama? ( x11-libs/libXinerama )
  29. dbus? ( dev-libs/dbus-glib dev-libs/glib:2 )
  30. vdpau? ( x11-libs/libvdpau >=media-libs/xine-lib-1.2 )
  31. jpeg? ( virtual/jpeg:* )
  32. bluray? ( media-libs/libbluray )
  33. opengl? ( virtual/opengl )
  34. )
  35. )
  36. cec? ( dev-libs/libcec )"
  37. DEPEND="${COMMON_DEPEND}
  38. virtual/pkgconfig
  39. sys-kernel/linux-headers
  40. nls? ( sys-devel/gettext )
  41. xine? (
  42. X? (
  43. x11-proto/xproto
  44. x11-libs/libXxf86vm
  45. )
  46. )"
  47. RDEPEND="${COMMON_DEPEND}"
  48. S=${WORKDIR}/${PN}
  49. VDR_CONFD_FILE="${FILESDIR}/confd-2.0.0"
  50. pkg_setup() {
  51. if ! use vdr && ! use xine; then
  52. die "You either need at least one of these flags: vdr xine"
  53. fi
  54. vdr-plugin-2_pkg_setup
  55. if use xine; then
  56. XINE_PLUGIN_DIR=$(pkg-config --variable=plugindir libxine)
  57. [ -z "${XINE_PLUGIN_DIR}" ] && die "Could not find xine plugin dir"
  58. fi
  59. }
  60. src_prepare() {
  61. # Allow user patches to be applied without modifyfing the ebuild
  62. epatch_user
  63. vdr-plugin-2_src_prepare
  64. # UINT64_C is needed by ffmpeg headers
  65. append-cxxflags -D__STDC_CONSTANT_MACROS
  66. }
  67. src_configure() {
  68. local myconf
  69. if has_version ">=media-libs/xine-lib-1.2"; then
  70. myconf="${myconf} --enable-libavutil"
  71. else
  72. myconf="${myconf} --disable-libavutil"
  73. fi
  74. # No autotools based configure script
  75. ./configure \
  76. --cc=$(tc-getCC) \
  77. --cxx=$(tc-getCXX) \
  78. $(use_enable X x11) \
  79. $(use_enable X xshm) \
  80. $(use_enable X xdpms) \
  81. $(use_enable X xshape) \
  82. $(use_enable X xrender) \
  83. $(use_enable fbcon fb) \
  84. $(use_enable vdr) \
  85. $(use_enable xine libxine) \
  86. $(use_enable libextractor) \
  87. $(use_enable caps libcap) \
  88. $(use_enable jpeg libjpeg) \
  89. $(use_enable xinerama) \
  90. $(use_enable vdpau) \
  91. $(use_enable dbus dbus-glib-1) \
  92. $(use_enable nls i18n) \
  93. $(use_enable bluray libbluray) \
  94. $(use_enable opengl) \
  95. $(use_enable cec libcec) \
  96. ${myconf} \
  97. || die
  98. }
  99. src_install() {
  100. if use vdr; then
  101. vdr-plugin-2_src_install
  102. # bug 346989
  103. insinto /etc/vdr/plugins/xineliboutput/
  104. doins examples/allowed_hosts.conf
  105. fowners -R vdr:vdr /etc/vdr/
  106. if use nls; then
  107. emake DESTDIR="${D}" i18n
  108. fi
  109. if use xine; then
  110. doinitd "${FILESDIR}"/vdr-frontend
  111. insinto $XINE_PLUGIN_DIR
  112. doins xineplug_inp_xvdr.so
  113. insinto $XINE_PLUGIN_DIR/post
  114. doins xineplug_post_*.so
  115. if use fbcon; then
  116. dobin vdr-fbfe
  117. insinto $VDR_PLUGIN_DIR
  118. doins libxineliboutput-fbfe.so.*
  119. fi
  120. if use X; then
  121. dobin vdr-sxfe
  122. insinto $VDR_PLUGIN_DIR
  123. doins libxineliboutput-sxfe.so.*
  124. fi
  125. fi
  126. else
  127. emake DESTDIR="${D}" install
  128. dodoc HISTORY README
  129. fi
  130. }