gst-rtsp-server-0.10.8-r1.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils gstreamer python-r1 vala
  6. DESCRIPTION="A GStreamer based RTSP server"
  7. HOMEPAGE="https://people.freedesktop.org/~wtay/"
  8. SRC_URI="https://gstreamer.freedesktop.org/src/${PN}/${PN/-server/}-${PV}.tar.bz2"
  9. LICENSE="GPL-2"
  10. SLOT="0.10"
  11. KEYWORDS="amd64 x86"
  12. IUSE="examples +introspection nls python static-libs test vala"
  13. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  14. S="${WORKDIR}/${P/-server/}"
  15. # ./configure is broken, so PYGOBJECT_REQ must be defined
  16. PYGOBJECT_REQ=2.11.2
  17. # FIXME: check should depend on USE=test but check is losy
  18. # libxml2 required in python binding
  19. RDEPEND="
  20. >=dev-libs/glib-2.10.0:2[${MULTILIB_USEDEP}]
  21. dev-libs/libxml2:2[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
  22. >=dev-python/pygobject-${PYGOBJECT_REQ}:2[${PYTHON_USEDEP}]
  23. >=media-libs/gstreamer-0.10.29:0.10[introspection?,${MULTILIB_USEDEP}]
  24. >=media-libs/gst-plugins-base-0.10.29:0.10[introspection?,${MULTILIB_USEDEP}]
  25. introspection? ( >=dev-libs/gobject-introspection-0.6.3 )
  26. python? ( dev-python/gst-python:0.10[${PYTHON_USEDEP}] )
  27. vala? ( $(vala_depend) )
  28. "
  29. DEPEND="${RDEPEND}
  30. >=dev-libs/check-0.9.2
  31. >=dev-util/gtk-doc-am-1.3
  32. virtual/pkgconfig
  33. nls? ( >=sys-devel/gettext-0.17 )
  34. "
  35. # Does not provide any unittest
  36. RESTRICT="test"
  37. src_prepare() {
  38. if ! use test; then
  39. # don't waste time building tests
  40. sed -e 's/^\(SUBDIRS =.*\)tests\(.*\)$/\1\2/' \
  41. -i Makefile.am Makefile.in \
  42. || die
  43. fi
  44. # don't waste time building examples
  45. sed -e 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' \
  46. -i Makefile.am Makefile.in \
  47. || die
  48. use vala && vala_src_prepare
  49. }
  50. multilib_src_configure() {
  51. if use python ; then
  52. python_setup
  53. fi
  54. # debug: only adds -g to CFLAGS
  55. # docbook: nothing behing that switch
  56. gstreamer_multilib_src_configure \
  57. --disable-docbook \
  58. --disable-gtk-doc \
  59. $(multilib_native_use_enable introspection) \
  60. $(use_enable nls) \
  61. $(use_enable static-libs static) \
  62. $(use_enable vala) \
  63. PYTHON=$(multilib_native_usex python "${PYTHON}" false) \
  64. PYGOBJECT_REQ=${PYGOBJECT_REQ}
  65. # work-around gtk-doc out-of-source brokedness
  66. if multilib_is_native_abi ; then
  67. ln -s "${S}"/docs/libs/${d}/html docs/libs/${d}/html || die
  68. fi
  69. }
  70. multilib_src_install() {
  71. emake install DESTDIR="${D}"
  72. # Handle broken upstream modifications to defaults of gtk-doc
  73. emake install -C docs/libs DESTDIR="${D}"
  74. prune_libtool_files
  75. }
  76. multilib_src_install_all() {
  77. einstalldocs
  78. if use examples ; then
  79. insinto /usr/share/doc/${PF}/examples
  80. doins "${S}"/examples/*.c
  81. fi
  82. }