Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/virtualgl/, x11-misc/virtualgl/files/
Date: Sun, 27 Dec 2015 10:16:37
Message-Id: 1451176999.bd21e9ce615caa06002d6df6c97444e913e0244a.monsieurp@gentoo
1 commit: bd21e9ce615caa06002d6df6c97444e913e0244a
2 Author: Jason Schulz <jason <AT> schulz <DOT> name>
3 AuthorDate: Sat Dec 26 22:56:29 2015 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 27 00:43:19 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd21e9ce
7
8 x11-misc/virtualgl: race condition fix
9
10 This fixes a race condition in the openrc script.
11
12 Gentoo-Bug: 569226
13 Suggested-By: Jason Schulz <jason <AT> schulz.name>
14
15 x11-misc/virtualgl/files/vgl.initd-r3 | 46 +++++++++++++++
16 x11-misc/virtualgl/virtualgl-2.4.1-r3.ebuild | 86 ++++++++++++++++++++++++++++
17 2 files changed, 132 insertions(+)
18
19 diff --git a/x11-misc/virtualgl/files/vgl.initd-r3 b/x11-misc/virtualgl/files/vgl.initd-r3
20 new file mode 100644
21 index 0000000..970a29e
22 --- /dev/null
23 +++ b/x11-misc/virtualgl/files/vgl.initd-r3
24 @@ -0,0 +1,46 @@
25 +#!/sbin/runscript
26 +# Copyright 1999-2013 Gentoo Foundation
27 +# Distributed under the terms of the GNU General Public License v2
28 +# $Id$
29 +
30 +# TODO: description="*" and other OpenRC 0.9+ candies
31 +
32 +depend() {
33 + need xdm
34 + after sshd
35 +}
36 +
37 +start() {
38 + ebegin "Starting VirtualGL"
39 + truncate --size=0 /var/lib/VirtualGL/vgl_xauth_key
40 +
41 + set_xauth
42 +
43 + if [ -z "$XAUTHORITY" ]; then
44 +
45 + einfo "Waiting for xauthority..."
46 +
47 + # wait for xauth file
48 + while true; do
49 + set_xauth
50 +
51 + if [ -e "$XAUTHORITY" ]; then
52 + break;
53 + fi
54 +
55 + sleep 1
56 + done
57 + fi
58 +
59 +
60 + xauth -f /var/lib/VirtualGL/vgl_xauth_key add $DISPLAY . `xauth -f $XAUTHORITY list | awk '{print $3;exit}'` && \
61 + chmod 644 /var/lib/VirtualGL/vgl_xauth_key
62 + eend $?
63 +}
64 +
65 +stop() {
66 + ebegin "Stopping VirtualGL"
67 + [ -f /var/lib/VirtualGL/vgl_xauth_key ] && \
68 + rm /var/lib/VirtualGL/vgl_xauth_key
69 + eend $?
70 +}
71
72 diff --git a/x11-misc/virtualgl/virtualgl-2.4.1-r3.ebuild b/x11-misc/virtualgl/virtualgl-2.4.1-r3.ebuild
73 new file mode 100644
74 index 0000000..a0454f6
75 --- /dev/null
76 +++ b/x11-misc/virtualgl/virtualgl-2.4.1-r3.ebuild
77 @@ -0,0 +1,86 @@
78 +# Copyright 1999-2015 Gentoo Foundation
79 +# Distributed under the terms of the GNU General Public License v2
80 +# $Id$
81 +
82 +EAPI=5
83 +inherit cmake-multilib multilib systemd
84 +
85 +DESCRIPTION="Run OpenGL applications remotely with full 3D hardware acceleration"
86 +HOMEPAGE="http://www.virtualgl.org/"
87 +
88 +MY_PN="VirtualGL"
89 +MY_P="${MY_PN}-${PV}"
90 +S="${WORKDIR}/${MY_P}"
91 +SRC_URI="mirror://sourceforge/${PN}/files/${PV}/${MY_P}.tar.gz"
92 +
93 +SLOT="0"
94 +LICENSE="LGPL-2.1 wxWinLL-3.1 FLTK"
95 +KEYWORDS="~amd64 ~x86"
96 +IUSE="libressl ssl"
97 +
98 +RDEPEND="
99 + ssl? (
100 + !libressl? ( dev-libs/openssl:0[${MULTILIB_USEDEP}] )
101 + libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
102 + )
103 + media-libs/libjpeg-turbo[${MULTILIB_USEDEP}]
104 + x11-libs/libX11[${MULTILIB_USEDEP}]
105 + x11-libs/libXext[${MULTILIB_USEDEP}]
106 + x11-libs/libXv[${MULTILIB_USEDEP}]
107 + virtual/glu[${MULTILIB_USEDEP}]
108 + virtual/opengl[${MULTILIB_USEDEP}]
109 + amd64? ( abi_x86_32? (
110 + >=media-libs/libjpeg-turbo-1.3.0-r3[abi_x86_32]
111 + >=x11-libs/libX11-1.6.2[abi_x86_32]
112 + >=x11-libs/libXext-1.3.2[abi_x86_32]
113 + >=x11-libs/libXv-1.0.10[abi_x86_32]
114 + >=virtual/glu-9.0-r1[abi_x86_32]
115 + >=virtual/opengl-7.0-r1[abi_x86_32]
116 + ) )
117 +"
118 +DEPEND="${RDEPEND}"
119 +
120 +src_prepare() {
121 + # Use /var/lib, bug #428122
122 + sed -e "s#/etc/opt#/var/lib#g" -i doc/unixconfig.txt doc/index.html doc/advancedopengl.txt \
123 + server/vglrun.in server/vglgenkey server/vglserver_config || die
124 +
125 + default
126 +}
127 +
128 +src_configure() {
129 + abi_configure() {
130 + local mycmakeargs=(
131 + $(cmake-utils_use ssl VGL_USESSL)
132 + -DVGL_DOCDIR=/usr/share/doc/"${PF}"
133 + -DTJPEG_INCLUDE_DIR=/usr/include
134 + -DVGL_LIBDIR=/usr/$(get_libdir)
135 + -DTJPEG_LIBRARY=/usr/$(get_libdir)/libturbojpeg.so
136 + -DCMAKE_LIBRARY_PATH=/usr/$(get_libdir)
137 + -DVGL_FAKELIBDIR=/usr/fakelib/${ABI}
138 + )
139 + cmake-utils_src_configure
140 + }
141 + multilib_parallel_foreach_abi abi_configure
142 +}
143 +
144 +src_install() {
145 + cmake-multilib_src_install
146 +
147 + # Make config dir
148 + dodir /var/lib/VirtualGL
149 + fowners root:video /var/lib/VirtualGL
150 + fperms 0750 /var/lib/VirtualGL
151 + newinitd "${FILESDIR}/vgl.initd-r3" vgl
152 + newconfd "${FILESDIR}/vgl.confd-r2" vgl
153 +
154 + exeinto /usr/libexec
155 + doexe "${FILESDIR}/vgl-helper.sh"
156 + systemd_dounit "${FILESDIR}/vgl.service"
157 +
158 + # Rename glxinfo to vglxinfo to avoid conflict with x11-apps/mesa-progs
159 + mv "${D}"/usr/bin/{,v}glxinfo || die
160 +
161 + # Remove license files, bug 536284
162 + rm "${D}"/usr/share/doc/${PF}/{LGPL.txt*,LICENSE*} || die
163 +}