virtualgl-2.4.1-r3.ebuild 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  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[${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. $(cmake-utils_use ssl VGL_USESSL)
  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. -DVGL_FAKELIBDIR=/usr/fakelib/${ABI}
  52. )
  53. cmake-utils_src_configure
  54. }
  55. multilib_parallel_foreach_abi abi_configure
  56. }
  57. src_install() {
  58. cmake-multilib_src_install
  59. # Make config dir
  60. dodir /var/lib/VirtualGL
  61. fowners root:video /var/lib/VirtualGL
  62. fperms 0750 /var/lib/VirtualGL
  63. newinitd "${FILESDIR}/vgl.initd-r3" vgl
  64. newconfd "${FILESDIR}/vgl.confd-r2" vgl
  65. exeinto /usr/libexec
  66. doexe "${FILESDIR}/vgl-helper.sh"
  67. systemd_dounit "${FILESDIR}/vgl.service"
  68. # Rename glxinfo to vglxinfo to avoid conflict with x11-apps/mesa-progs
  69. mv "${D}"/usr/bin/{,v}glxinfo || die
  70. # Remove license files, bug 536284
  71. rm "${D}"/usr/share/doc/${PF}/{LGPL.txt*,LICENSE*} || die
  72. }