virtualgl-2.5.1.ebuild 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-multilib multilib systemd
  5. DESCRIPTION="Run OpenGL applications remotely with full 3D hardware acceleration"
  6. HOMEPAGE="http://www.virtualgl.org/"
  7. MY_PN="VirtualGL"
  8. MY_P="${MY_PN}-${PV}"
  9. S="${WORKDIR}/${MY_P}"
  10. SRC_URI="mirror://sourceforge/${PN}/files/${PV}/${MY_P}.tar.gz"
  11. SLOT="0"
  12. LICENSE="LGPL-2.1 wxWinLL-3.1 FLTK"
  13. KEYWORDS="~amd64 ~x86"
  14. IUSE="libressl ssl"
  15. RDEPEND="
  16. ssl? (
  17. !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
  18. libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
  19. )
  20. media-libs/libjpeg-turbo[${MULTILIB_USEDEP}]
  21. x11-libs/libX11[${MULTILIB_USEDEP}]
  22. x11-libs/libXext[${MULTILIB_USEDEP}]
  23. x11-libs/libXv[${MULTILIB_USEDEP}]
  24. virtual/glu[${MULTILIB_USEDEP}]
  25. virtual/opengl[${MULTILIB_USEDEP}]
  26. amd64? ( abi_x86_32? (
  27. >=media-libs/libjpeg-turbo-1.3.0-r3[abi_x86_32]
  28. >=x11-libs/libX11-1.6.2[abi_x86_32]
  29. >=x11-libs/libXext-1.3.2[abi_x86_32]
  30. >=x11-libs/libXv-1.0.10[abi_x86_32]
  31. >=virtual/glu-9.0-r1[abi_x86_32]
  32. >=virtual/opengl-7.0-r1[abi_x86_32]
  33. ) )
  34. "
  35. DEPEND="${RDEPEND}"
  36. src_prepare() {
  37. # Use /var/lib, bug #428122
  38. sed -e "s#/etc/opt#/var/lib#g" -i doc/unixconfig.txt doc/index.html doc/advancedopengl.txt \
  39. server/vglrun.in server/vglgenkey server/vglserver_config || die
  40. default
  41. }
  42. src_configure() {
  43. abi_configure() {
  44. local mycmakeargs=(
  45. -DVGL_USESSL="$(usex ssl)"
  46. -DVGL_DOCDIR=/usr/share/doc/"${PF}"
  47. -DTJPEG_INCLUDE_DIR=/usr/include
  48. -DVGL_LIBDIR=/usr/$(get_libdir)
  49. -DTJPEG_LIBRARY=/usr/$(get_libdir)/libturbojpeg.so
  50. -DCMAKE_LIBRARY_PATH=/usr/$(get_libdir)
  51. )
  52. cmake-utils_src_configure
  53. }
  54. multilib_parallel_foreach_abi abi_configure
  55. }
  56. src_install() {
  57. cmake-multilib_src_install
  58. # Make config dir
  59. dodir /var/lib/VirtualGL
  60. fowners root:video /var/lib/VirtualGL
  61. fperms 0750 /var/lib/VirtualGL
  62. newinitd "${FILESDIR}/vgl.initd-r3" vgl
  63. newconfd "${FILESDIR}/vgl.confd-r2" vgl
  64. exeinto /usr/libexec
  65. doexe "${FILESDIR}/vgl-helper.sh"
  66. systemd_dounit "${FILESDIR}/vgl.service"
  67. # Rename glxinfo to vglxinfo to avoid conflict with x11-apps/mesa-progs
  68. mv "${D}"/usr/bin/{,v}glxinfo || die
  69. # Remove license files, bug 536284
  70. rm "${D}"/usr/share/doc/${PF}/{LGPL.txt*,LICENSE*} || die
  71. }