summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2012-07-26 18:46:41 +0000
committerPacho Ramos <pacho@gentoo.org>2012-07-26 18:46:41 +0000
commit747e873e1a85f10e1894a5d49b8e4eb780f3af2c (patch)
tree90ae9d4d060b3dfaadbcccff4b682d77720359c0 /x11-misc/virtualgl
parentRun paxctl only if the toolchain supports the PT_PAX_FLAGS program header, (diff)
downloadgentoo-2-747e873e1a85f10e1894a5d49b8e4eb780f3af2c.tar.gz
gentoo-2-747e873e1a85f10e1894a5d49b8e4eb780f3af2c.tar.bz2
gentoo-2-747e873e1a85f10e1894a5d49b8e4eb780f3af2c.zip
Version bump, also adds support for lxdm (#425044 by MZ) and uses proper locations for generated data files (#428122 by Andreas Steinmetz).
(Portage version: 2.1.11.9/cvs/Linux x86_64)
Diffstat (limited to 'x11-misc/virtualgl')
-rw-r--r--x11-misc/virtualgl/ChangeLog10
-rw-r--r--x11-misc/virtualgl/files/vgl.confd-r127
-rw-r--r--x11-misc/virtualgl/files/vgl.initd-r130
-rw-r--r--x11-misc/virtualgl/virtualgl-2.3.1.ebuild116
4 files changed, 181 insertions, 2 deletions
diff --git a/x11-misc/virtualgl/ChangeLog b/x11-misc/virtualgl/ChangeLog
index 57e8e0283059..4af42f23409f 100644
--- a/x11-misc/virtualgl/ChangeLog
+++ b/x11-misc/virtualgl/ChangeLog
@@ -1,6 +1,13 @@
# 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.3 2012/06/06 11:54:11 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/virtualgl/ChangeLog,v 1.4 2012/07/26 18:46:41 pacho Exp $
+
+*virtualgl-2.3.1 (26 Jul 2012)
+
+ 26 Jul 2012; Pacho Ramos <pacho@gentoo.org> +files/vgl.confd-r1,
+ +files/vgl.initd-r1, +virtualgl-2.3.1.ebuild:
+ Version bump, also adds support for lxdm (#425044 by MZ) and uses proper
+ locations for generated data files (#428122 by Andreas Steinmetz).
06 Jun 2012; Pacho Ramos <pacho@gentoo.org> virtualgl-2.3.ebuild:
Drop postinst message as it's common to have conf.d files for configuration of
@@ -15,4 +22,3 @@
+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/files/vgl.confd-r1 b/x11-misc/virtualgl/files/vgl.confd-r1
new file mode 100644
index 000000000000..d56414d41110
--- /dev/null
+++ b/x11-misc/virtualgl/files/vgl.confd-r1
@@ -0,0 +1,27 @@
+# /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}"
+
+# lxdm:
+# XAUTHORITY="/var/run/lxdm/lxdm-${DISPLAY}.auth"
+
+}
+set_xauth
diff --git a/x11-misc/virtualgl/files/vgl.initd-r1 b/x11-misc/virtualgl/files/vgl.initd-r1
new file mode 100644
index 000000000000..431e4448cbff
--- /dev/null
+++ b/x11-misc/virtualgl/files/vgl.initd-r1
@@ -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-r1,v 1.1 2012/07/26 18:46:41 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/virtualgl-2.3.1.ebuild b/x11-misc/virtualgl/virtualgl-2.3.1.ebuild
new file mode 100644
index 000000000000..dbc8a3268988
--- /dev/null
+++ b/x11-misc/virtualgl/virtualgl-2.3.1.ebuild
@@ -0,0 +1,116 @@
+# 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.1.ebuild,v 1.1 2012/07/26 18:46:41 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() {
+ # Use /var/lib, bug #428122
+ sed -e "s#/etc/opt#/var/lib#g" -i doc/unixconfig.txt doc/index.html doc/advancedopengl.txt \
+ server/vglrun server/vglgenkey server/vglserver_config || die
+
+ default
+}
+
+src_configure() {
+ # Configure 32bit version on multilib
+ use amd64 && use multilib && (
+ 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 /var/lib/VirtualGL
+ fowners root:video /var/lib/VirtualGL
+ fperms 0750 /var/lib/VirtualGL
+ newinitd "${FILESDIR}/vgl.initd" vgl
+ newconfd "${FILESDIR}/vgl.confd" vgl
+
+ # Rename glxinfo to vglxinfo to avoid conflict with x11-apps/mesa-progs
+ mv "${D}"/usr/bin/{,v}glxinfo || die
+}