xpra-1.0.3-r1.ebuild 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. # PyCObject_Check and PyCObject_AsVoidPtr vanished with python 3.3, and setup.py not python3.2 compat
  5. PYTHON_COMPAT=( python2_7 )
  6. inherit distutils-r1 eutils flag-o-matic user tmpfiles
  7. DESCRIPTION="X Persistent Remote Apps (xpra) and Partitioning WM (parti) based on wimpiggy"
  8. HOMEPAGE="http://xpra.org/ http://xpra.org/src/"
  9. SRC_URI="http://xpra.org/src/${P}.tar.xz"
  10. LICENSE="GPL-2 BSD"
  11. SLOT="0"
  12. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  13. IUSE="+client +clipboard csc cups dec_av2 enc_ffmpeg libav +lz4 lzo opengl pulseaudio server sound vpx webcam webp x264 x265"
  14. REQUIRED_USE="${PYTHON_REQUIRED_USE}
  15. clipboard? ( || ( server client ) )
  16. opengl? ( client )
  17. || ( client server )
  18. client? ( x264? ( dec_av2 ) x265? ( dec_av2 ) )"
  19. # x264/old-libav.path situation see bug 459218
  20. COMMON_DEPEND=""${PYTHON_DEPS}"
  21. dev-python/pygobject:2[${PYTHON_USEDEP}]
  22. dev-python/pygtk:2[${PYTHON_USEDEP}]
  23. x11-libs/gtk+:2
  24. x11-libs/libX11
  25. x11-libs/libXcomposite
  26. x11-libs/libXdamage
  27. x11-libs/libXfixes
  28. x11-libs/libXrandr
  29. x11-libs/libXtst
  30. csc? (
  31. !libav? ( >=media-video/ffmpeg-1.2.2:0= )
  32. libav? ( media-video/libav:0= )
  33. )
  34. dec_av2? (
  35. !libav? ( >=media-video/ffmpeg-2:0= )
  36. libav? ( media-video/libav:0= )
  37. )
  38. enc_ffmpeg? (
  39. !libav? ( >=media-video/ffmpeg-3.2.2:0= )
  40. libav? ( media-video/libav:0= )
  41. )
  42. opengl? ( dev-python/pygtkglext )
  43. pulseaudio? ( media-sound/pulseaudio )
  44. sound? ( media-libs/gstreamer:1.0
  45. media-libs/gst-plugins-base:1.0
  46. dev-python/gst-python:1.0 )
  47. vpx? ( media-libs/libvpx virtual/ffmpeg )
  48. webp? ( media-libs/libwebp )
  49. x264? ( media-libs/x264
  50. !libav? ( >=media-video/ffmpeg-1.0.4:0= )
  51. libav? ( media-video/libav:0= )
  52. )
  53. x265? ( media-libs/x265
  54. !libav? ( >=media-video/ffmpeg-2:0= )
  55. libav? ( media-video/libav:0= )
  56. )"
  57. RDEPEND="${COMMON_DEPEND}
  58. dev-python/dbus-python[${PYTHON_USEDEP}]
  59. dev-python/ipython[${PYTHON_USEDEP}]
  60. dev-python/numpy[${PYTHON_USEDEP}]
  61. dev-python/pillow[${PYTHON_USEDEP}]
  62. dev-python/rencode[${PYTHON_USEDEP}]
  63. virtual/ssh
  64. x11-apps/xmodmap
  65. cups? ( dev-python/pycups[${PYTHON_USEDEP}] )
  66. lz4? ( dev-python/lz4[${PYTHON_USEDEP}] )
  67. lzo? ( >=dev-python/python-lzo-0.7.0[${PYTHON_USEDEP}] )
  68. opengl? (
  69. client? ( dev-python/pyopengl_accelerate[${PYTHON_USEDEP}] )
  70. )
  71. server? ( x11-base/xorg-server[-minimal,xvfb]
  72. x11-drivers/xf86-input-void
  73. x11-drivers/xf86-video-dummy
  74. )
  75. webcam? ( media-libs/opencv[python]
  76. dev-python/pyinotify[${PYTHON_USEDEP}] )"
  77. DEPEND="${COMMON_DEPEND}
  78. virtual/pkgconfig
  79. >=dev-python/cython-0.16[${PYTHON_USEDEP}]"
  80. PATCHES=( "${FILESDIR}"/${PN}-0.13.1-ignore-gentoo-no-compile.patch
  81. "${FILESDIR}"/${PN}-0.17.4-deprecated-avcodec.patch )
  82. pkg_postinst() {
  83. enewgroup ${PN}
  84. tmpfiles_process /usr/lib/tmpfiles.d/xpra.conf
  85. }
  86. python_prepare_all() {
  87. rm -rf rencode || die
  88. sed -e "s:/var/run/xpra:${EROOT}run/xpra:" \
  89. -i tmpfiles.d/xpra.conf
  90. if use libav ; then
  91. if ! has_version ">=media-video/libav-9" ; then
  92. epatch patches/old-libav.patch
  93. fi
  94. fi
  95. if ! use pulseaudio ; then #bug 608126
  96. sed -e '/pulseaudio/s:bstr(not OSX and not WIN32):bstr(False):' \
  97. -i setup.py || die
  98. fi
  99. distutils-r1_python_prepare_all
  100. }
  101. python_configure_all() {
  102. mydistutilsargs=(
  103. $(use_with client)
  104. $(use_with clipboard)
  105. $(use_with csc csc_swscale)
  106. $(use_with cups printing)
  107. $(use_with dec_av2 dec_avcodec2)
  108. $(use_with enc_ffmpeg)
  109. $(use_with opengl)
  110. $(use_with server shadow)
  111. $(use_with server)
  112. $(use_with sound)
  113. $(use_with vpx)
  114. $(use_with webp)
  115. $(use_with x264 enc_x264)
  116. $(use_with x265 enc_x265)
  117. $(use_with webcam)
  118. --with-Xdummy
  119. --with-gtk2
  120. --without-gtk3
  121. --with-strict
  122. --with-warn
  123. --with-x11
  124. --without-PIC
  125. --without-debug )
  126. # see https://www.xpra.org/trac/ticket/1080
  127. # and http://trac.cython.org/ticket/395
  128. append-cflags -fno-strict-aliasing
  129. export XPRA_SOCKET_DIRS="${EROOT}run/xpra"
  130. }