spacepaste

  1.  
  2. # Copyright 1999-2017 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. EAPI=6
  5. PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
  6. inherit autotools eutils git-r3 ltprune python-any-r1 readme.gentoo-r1 xdg-utils
  7. DESCRIPTION="SPICE server"
  8. HOMEPAGE="https://www.spice-space.org/"
  9. SRC_URI=""
  10. EGIT_REPO_URI="https://anongit.freedesktop.org/git/spice/spice.git"
  11. LICENSE="LGPL-2.1"
  12. SLOT="0"
  13. KEYWORDS=""
  14. IUSE="libressl lz4 sasl smartcard static-libs gstreamer"
  15. # the libspice-server only uses the headers of libcacard
  16. RDEPEND="
  17. >=dev-libs/glib-2.22:2[static-libs(+)?]
  18. >=media-libs/celt-0.11.1-r1:0[static-libs(+)?]
  19. media-libs/opus[static-libs(+)?]
  20. sys-libs/zlib[static-libs(+)?]
  21. virtual/jpeg:0=[static-libs(+)?]
  22. >=x11-libs/pixman-0.17.7[static-libs(+)?]
  23. !libressl? ( dev-libs/openssl:0=[static-libs(+)?] )
  24. libressl? ( dev-libs/libressl:0=[static-libs(+)?] )
  25. lz4? ( app-arch/lz4:0=[static-libs(+)?] )
  26. smartcard? ( >=app-emulation/libcacard-0.1.2 )
  27. sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
  28. gstreamer? (
  29. media-libs/gstreamer:1.0
  30. media-libs/gst-plugins-base:1.0
  31. )"
  32. DEPEND="${RDEPEND}
  33. ${PYTHON_DEPS}
  34. =app-emulation/spice-protocol-9999
  35. virtual/pkgconfig
  36. $(python_gen_any_dep '
  37. >=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
  38. dev-python/six[${PYTHON_USEDEP}]
  39. ')
  40. smartcard? ( app-emulation/qemu[smartcard] )"
  41. python_check_deps() {
  42. has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
  43. has_version "dev-python/six[${PYTHON_USEDEP}]"
  44. }
  45. pkg_setup() {
  46. [[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
  47. }
  48. src_prepare() {
  49. default
  50. eautoreconf
  51. # Change the libs flag of celt
  52. sed -i -e 's/celt051/celt0/' configure || die "Sed failed!"
  53. sed -i -e 's/CELT051/CELT0/' configure || die "Sed failed!"
  54. sed -i -e 's/0.5.1.1/0.11.1-r1/' configure || die "Sed failed!"
  55. }
  56. src_configure() {
  57. # Prevent sandbox violations, bug #586560
  58. # https://bugzilla.gnome.org/show_bug.cgi?id=744134
  59. # https://bugzilla.gnome.org/show_bug.cgi?id=744135
  60. addpredict /dev
  61. xdg_environment_reset
  62. local myconf="
  63. $(use_enable static-libs static)
  64. $(use_enable lz4)
  65. $(use_with sasl)
  66. $(use_enable smartcard)
  67. --enable-gstreamer=$(usex gstreamer "1.0" "no")
  68. --enable-celt051
  69. --disable-gui
  70. "
  71. econf ${myconf}
  72. }
  73. src_compile() {
  74. # Prevent sandbox violations, bug #586560
  75. # https://bugzilla.gnome.org/show_bug.cgi?id=744134
  76. # https://bugzilla.gnome.org/show_bug.cgi?id=744135
  77. addpredict /dev
  78. default
  79. }
  80. src_install() {
  81. default
  82. use static-libs || prune_libtool_files
  83. readme.gentoo_create_doc
  84. }
  85. pkg_postinst() {
  86. readme.gentoo_print_elog
  87. }
  88.