diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-04-21 13:14:47 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-04-21 13:14:47 +0000 |
commit | 8644a46f84e14ac44c1e8aa64c1c5d96ca980a83 (patch) | |
tree | 4b1a7a539f426c063f9452bfab854e55179c4a58 /x11-misc | |
parent | Initial commit from bumblebee overlay, this fixes bug #384083. Thanks a lot t... (diff) | |
download | gentoo-2-8644a46f84e14ac44c1e8aa64c1c5d96ca980a83.tar.gz gentoo-2-8644a46f84e14ac44c1e8aa64c1c5d96ca980a83.tar.bz2 gentoo-2-8644a46f84e14ac44c1e8aa64c1c5d96ca980a83.zip |
Initial commit from bumblebee overlay, this fixes bug #384083. Thanks a lot to mva and rei4dan for their work.
(Portage version: 2.1.10.56/cvs/Linux x86_64)
Diffstat (limited to 'x11-misc')
-rw-r--r-- | x11-misc/virtualgl/ChangeLog | 11 | ||||
-rw-r--r-- | x11-misc/virtualgl/Manifest | 5 | ||||
-rw-r--r-- | x11-misc/virtualgl/files/vgl.confd | 24 | ||||
-rw-r--r-- | x11-misc/virtualgl/files/vgl.initd | 30 | ||||
-rw-r--r-- | x11-misc/virtualgl/metadata.xml | 20 | ||||
-rw-r--r-- | x11-misc/virtualgl/virtualgl-2.3.ebuild | 121 |
6 files changed, 211 insertions, 0 deletions
diff --git a/x11-misc/virtualgl/ChangeLog b/x11-misc/virtualgl/ChangeLog new file mode 100644 index 000000000000..7588cad534d3 --- /dev/null +++ b/x11-misc/virtualgl/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for x11-misc/virtualgl +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/virtualgl/ChangeLog,v 1.1 2012/04/21 13:14:47 pacho Exp $ + +*virtualgl-2.3 (21 Apr 2012) + + 21 Apr 2012; Pacho Ramos <pacho@gentoo.org> +files/vgl.confd, + +files/vgl.initd, +metadata.xml, +virtualgl-2.3.ebuild: + Initial commit from bumblebee overlay, this fixes bug #384083. Thanks a lot to + mva and rei4dan for their work. + diff --git a/x11-misc/virtualgl/Manifest b/x11-misc/virtualgl/Manifest new file mode 100644 index 000000000000..f2d093375ec7 --- /dev/null +++ b/x11-misc/virtualgl/Manifest @@ -0,0 +1,5 @@ +AUX vgl.confd 577 RMD160 2b8d3f25281b750bd54ec2b370b7abdf7479cac7 SHA1 e91e9e3741b1c9d9ab8e683f30902ad269dc1a29 SHA256 c14f83c0fbcb728b635550362fcdf9209921abec017c34ab9add3b99874acafe +AUX vgl.initd 763 RMD160 9cd374e82886b20240b4d71abd6d64d379a1f306 SHA1 cd3c568f79c31b4916fa25fa9cd75f318c4b078c SHA256 1e4733596e32e8121ae353ccc8dd511deb4d8c4569866c2a28b7d75dbed65e71 +DIST VirtualGL-2.3.tar.gz 2756897 RMD160 622945fd9ed80053cad2b153e6783c8a0c588855 SHA1 6f7f91cfbb14ec1e4d7b7b790e6fb01e02bb4cef SHA256 2f00c4eb20b0ae88e957a23fb66882e4ade2faa208abd30aa8c4f61570ecd4b9 +EBUILD virtualgl-2.3.ebuild 2919 RMD160 a478e6eaafb2892c7695d662eb26659f727a165f SHA1 bab07bc4b16ac2b1402d362f5eecb8b48fb3770a SHA256 ecab0b3c3f39d4d304c914cee8f9cf04b69821997638faba77ae18c0f67eccae +MISC metadata.xml 592 RMD160 3249787812627eb49736e26bff2619f11b59d2af SHA1 2efcbbc25f4c294a1339a09de2c7cb0651b19de6 SHA256 7d1d5f6546baa8427fe831bd8bba1fbb548ea6c58f69f52aed6073a49fb5b6cc diff --git a/x11-misc/virtualgl/files/vgl.confd b/x11-misc/virtualgl/files/vgl.confd new file mode 100644 index 000000000000..a7a4e0ac1283 --- /dev/null +++ b/x11-misc/virtualgl/files/vgl.confd @@ -0,0 +1,24 @@ +# /etc/conf.d/vgl + +DISPLAY="${DISPLAY:-:0}" + +# Make it a function in case we have to repeat it in init script later +set_xauth() { + +# common case (works in almost all tested environments (except of lightdm)): +XAUTHORITY="$(ps wwax -C X,Xorg -o args= --sort=-stime | grep -m 1 -o '\B[-]auth\s*/var\S*auth\S*' | cut -d ' ' -f 2)" + +# kdm and some others: +# XAUTHORITY="$(find /var/run/xauth/A${DISPLAY}-*|tail -n1)" + +# gdm: +# XAUTHORITY="/var/gdm/${DISPLAY}.Xauth" + +# slim: +# XAUTHORITY="/var/run/slim.auth" + +# lightdm: +# XAUTHORITY="/var/run/lightdm/root/${DISPLAY}" + +} +set_xauth diff --git a/x11-misc/virtualgl/files/vgl.initd b/x11-misc/virtualgl/files/vgl.initd new file mode 100644 index 000000000000..b1257b904cfa --- /dev/null +++ b/x11-misc/virtualgl/files/vgl.initd @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/virtualgl/files/vgl.initd,v 1.1 2012/04/21 13:14:47 pacho Exp $ + +# TODO: description="*" and other OpenRC 0.9+ candies + +depend() { + need xdm + after sshd +} + +start() { + ebegin "Starting VirtualGL" + truncate --size=0 /etc/VirtualGL/vgl_xauth_key + + # Check if XAUTHORITY was set successfully, if not wait a bit and let X to start + [ -z "$XAUTHORITY" ] && sleep 3 && set_xauth + [ -e "$XAUTHORITY" ] || sleep 3 + xauth -f /etc/VirtualGL/vgl_xauth_key add $DISPLAY . `xauth -f $XAUTHORITY list | awk '{print $3}'` && \ + chmod 644 /etc/VirtualGL/vgl_xauth_key + eend $? +} + +stop() { + ebegin "Stopping VirtualGL" + [ -f /etc/VirtualGL/vgl_xauth_key ] && \ + rm /etc/VirtualGL/vgl_xauth_key + eend $? +} diff --git a/x11-misc/virtualgl/metadata.xml b/x11-misc/virtualgl/metadata.xml new file mode 100644 index 000000000000..c5546aba64b1 --- /dev/null +++ b/x11-misc/virtualgl/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>pacho@gentoo.org</email> + <name>Pacho Ramos</name> +</maintainer> +<maintainer> + <email>mva@mva.name</email> + <name>Vadim A. Misbakh-Soloviev</name> +</maintainer> +<maintainer> + <email>rei4dan@gmail.com</email> + <name>My Th</name> +</maintainer> +<longdescription> + An open source package that gives any Unix or Linux remote display software + the ability to run OpenGL applications with full 3D hardware acceleration. +</longdescription> +</pkgmetadata> diff --git a/x11-misc/virtualgl/virtualgl-2.3.ebuild b/x11-misc/virtualgl/virtualgl-2.3.ebuild new file mode 100644 index 000000000000..6be017b6481f --- /dev/null +++ b/x11-misc/virtualgl/virtualgl-2.3.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/virtualgl/virtualgl-2.3.ebuild,v 1.1 2012/04/21 13:14:47 pacho Exp $ + +EAPI="4" + +inherit cmake-utils multilib + +DESCRIPTION="Run OpenGL applications remotely with full 3D hardware acceleration" +HOMEPAGE="http://www.virtualgl.org/" + +MY_PN="VirtualGL" +MY_P="${MY_PN}-${PV}" +S="${WORKDIR}/${MY_P}" +SRC_URI="mirror://sourceforge/${PN}/${MY_PN}/${PV}/${MY_P}.tar.gz" + +SLOT="0" +LICENSE="LGPL-2.1 wxWinLL-3.1 FLTK" +KEYWORDS="~amd64 ~x86" +IUSE="multilib ssl" + +RDEPEND="ssl? ( dev-libs/openssl ) + media-libs/libjpeg-turbo + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXv + multilib? ( app-emulation/emul-linux-x86-xlibs app-emulation/emul-linux-x86-baselibs ) + virtual/opengl" +DEPEND="${RDEPEND}" + +CMAKE_VERBOSE=1 +build32_dir="${WORKDIR}/${P}_build32" + +src_prepare() { + for file in rr/vglgenkey rr/vglrun rr/vglserver_config doc/index.html; do + sed -e "s#/etc/opt#/etc#g" -i ${file} || die + done + + default +} + +src_configure() { + # Configure 32bit version on multilib + use amd64 && use multilib && ( + einfo "Multilib build enabled!" + einfo "Configuring 32bit libs..." + + local ABI=x86 + local CFLAGS="${CFLAGS--O2 -march=native -pipe} -m32" + local CXXFLAGS="${CFLAGS}" + local LDFLAGS="${LDFLAGS} -m32" + local CMAKE_BUILD_DIR="${build32_dir}" + + mycmakeargs=( + $(cmake-utils_use ssl VGL_USESSL) + -DVGL_DOCDIR=/usr/share/doc/"${P}" + -DVGL_LIBDIR=/usr/$(get_libdir) + -DTJPEG_INCLUDE_DIR=/usr/include + -DTJPEG_LIBRARY=/usr/$(get_libdir)/libturbojpeg.so + -DCMAKE_LIBRARY_PATH=/usr/lib32 + -DVGL_FAKELIBDIR=/usr/fakelib/32 + ) + cmake-utils_src_configure + + einfo "Configuring 64bit libs..." + ) + + # Configure native version + mycmakeargs=( + $(cmake-utils_use ssl VGL_USESSL) + -DVGL_DOCDIR=/usr/share/doc/"${P}" + -DVGL_LIBDIR=/usr/$(get_libdir) + -DTJPEG_INCLUDE_DIR=/usr/include + -DTJPEG_LIBRARY=/usr/$(get_libdir)/libturbojpeg.so + -DCMAKE_LIBRARY_PATH=/usr/lib64 + -DVGL_FAKELIBDIR=/usr/fakelib/64 + ) + cmake-utils_src_configure +} + +src_compile() { + # Make 32bit version on multilib + use amd64 && use multilib && ( + einfo "Building 32bit libs..." + local CMAKE_BUILD_DIR="${build32_dir}" + cmake-utils_src_compile + + einfo "Building 64bit libs..." + ) + + # Make native version + cmake-utils_src_compile +} + +src_install() { + # Install 32bit version on multilib + use amd64 && use multilib && ( + einfo "Installing 32bit libs..." + local CMAKE_BUILD_DIR="${build32_dir}" + cmake-utils_src_install + + einfo "Installing 64bit libs..." + ) + + # Install native version + cmake-utils_src_install + + # Make config dir + dodir /etc/VirtualGL + fowners root:video /etc/VirtualGL + fperms 0750 /etc/VirtualGL + newinitd "${FILESDIR}/vgl.initd" vgl + newconfd "${FILESDIR}/vgl.confd" vgl + + # Rename glxinfo to vglxinfo to avoid conflict with x11-apps/mesa-progs + mv "${ED}"/usr/bin/{,v}glxinfo || die +} + +pkg_postinst() { + ewarn "You might need to adjust /etc/conf.d/vgl for your setup!" +} |