Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/tigervnc/files/, net-misc/tigervnc/
Date: Mon, 04 Jul 2022 00:33:04
Message-Id: 1656894773.81782dbff6cb3d7c601a09f3e4cdf84fea4b36c2.sam@gentoo
1 commit: 81782dbff6cb3d7c601a09f3e4cdf84fea4b36c2
2 Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
3 AuthorDate: Sat Jun 18 09:53:32 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 4 00:32:53 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81782dbf
7
8 net-misc/tigervnc: Fix for USE=-server and no pam
9
10 Don't build server files instead of erasing them afterwards
11 Drop xorgmodule local use flag from metadata (no longer used)
12
13 Closes: https://bugs.gentoo.org/852830
14 Signed-off-by: Nick Bowler <nbowler <AT> draconx.ca>
15 Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
16 Closes: https://github.com/gentoo/gentoo/pull/26034
17 Signed-off-by: Sam James <sam <AT> gentoo.org>
18
19 .../tigervnc-1.12.0-disable-server-and-pam.patch | 57 ++++++++++++++++++++++
20 .../tigervnc-1.12.80-disable-server-and-pam.patch | 57 ++++++++++++++++++++++
21 net-misc/tigervnc/metadata.xml | 1 -
22 ...ervnc-9999.ebuild => tigervnc-1.12.0-r7.ebuild} | 48 ++++++++----------
23 net-misc/tigervnc/tigervnc-9999.ebuild | 30 +++++-------
24 5 files changed, 146 insertions(+), 47 deletions(-)
25
26 diff --git a/net-misc/tigervnc/files/tigervnc-1.12.0-disable-server-and-pam.patch b/net-misc/tigervnc/files/tigervnc-1.12.0-disable-server-and-pam.patch
27 new file mode 100644
28 index 000000000000..5ae07007d467
29 --- /dev/null
30 +++ b/net-misc/tigervnc/files/tigervnc-1.12.0-disable-server-and-pam.patch
31 @@ -0,0 +1,57 @@
32 +See https://bugs.gentoo.org/852830
33 +
34 +--- a/CMakeLists.txt
35 ++++ b/CMakeLists.txt
36 +@@ -234,6 +234,7 @@
37 + add_subdirectory(java)
38 + endif()
39 +
40 ++option(BUILD_SERVER "Build TigerVNC server" ON)
41 + option(BUILD_VIEWER "Build TigerVNC viewer" ON)
42 + if(BUILD_VIEWER)
43 + # Check for FLTK
44 +@@ -276,7 +277,7 @@
45 + endif()
46 +
47 + # Check for PAM library
48 +-if(UNIX AND NOT APPLE)
49 ++if(BUILD_SERVER AND UNIX AND NOT APPLE)
50 + check_include_files(security/pam_appl.h HAVE_PAM_H)
51 + set(CMAKE_REQUIRED_LIBRARIES -lpam)
52 + check_function_exists(pam_start HAVE_PAM_START)
53 +@@ -315,9 +316,6 @@
54 + add_subdirectory(media)
55 + endif()
56 +
57 +-add_subdirectory(tests)
58 +-
59 +-
60 + if(BUILD_VIEWER)
61 + add_subdirectory(release)
62 + endif()
63 +--- a/common/rfb/CMakeLists.txt
64 ++++ b/common/rfb/CMakeLists.txt
65 +@@ -75,7 +75,7 @@
66 +
67 + set(RFB_LIBRARIES ${JPEG_LIBRARIES} ${PIXMAN_LIBRARY} os rdr)
68 +
69 +-if(UNIX AND NOT APPLE)
70 ++if(BUILD_SERVER AND UNIX AND NOT APPLE)
71 + set(RFB_SOURCES ${RFB_SOURCES} UnixPasswordValidator.cxx
72 + UnixPasswordValidator.h pam.c pam.h)
73 + set(RFB_LIBRARIES ${RFB_LIBRARIES} ${PAM_LIBS})
74 +--- a/unix/CMakeLists.txt
75 ++++ b/unix/CMakeLists.txt
76 +@@ -1,6 +1,8 @@
77 + add_subdirectory(tx)
78 + add_subdirectory(common)
79 +-add_subdirectory(vncconfig)
80 +-add_subdirectory(vncpasswd)
81 +-add_subdirectory(vncserver)
82 +-add_subdirectory(x0vncserver)
83 ++if(BUILD_SERVER)
84 ++ add_subdirectory(vncconfig)
85 ++ add_subdirectory(vncpasswd)
86 ++ add_subdirectory(vncserver)
87 ++ add_subdirectory(x0vncserver)
88 ++endif()
89
90 diff --git a/net-misc/tigervnc/files/tigervnc-1.12.80-disable-server-and-pam.patch b/net-misc/tigervnc/files/tigervnc-1.12.80-disable-server-and-pam.patch
91 new file mode 100644
92 index 000000000000..e61f099d397a
93 --- /dev/null
94 +++ b/net-misc/tigervnc/files/tigervnc-1.12.80-disable-server-and-pam.patch
95 @@ -0,0 +1,57 @@
96 +See https://bugs.gentoo.org/852830
97 +
98 +--- a/CMakeLists.txt
99 ++++ b/CMakeLists.txt
100 +@@ -234,6 +234,7 @@
101 + add_subdirectory(java)
102 + endif()
103 +
104 ++option(BUILD_SERVER "Build TigerVNC server" ON)
105 + option(BUILD_VIEWER "Build TigerVNC viewer" ON)
106 + if(BUILD_VIEWER)
107 + # Check for FLTK
108 +@@ -276,7 +277,7 @@
109 + endif()
110 +
111 + # Check for PAM library
112 +-if(UNIX AND NOT APPLE)
113 ++if(BUILD_SERVER AND UNIX AND NOT APPLE)
114 + check_include_files(security/pam_appl.h HAVE_PAM_H)
115 + set(CMAKE_REQUIRED_LIBRARIES -lpam)
116 + check_function_exists(pam_start HAVE_PAM_START)
117 +@@ -315,9 +316,6 @@
118 + add_subdirectory(media)
119 + endif()
120 +
121 +-add_subdirectory(tests)
122 +-
123 +-
124 + if(BUILD_VIEWER)
125 + add_subdirectory(release)
126 + endif()
127 +--- a/common/rfb/CMakeLists.txt
128 ++++ b/common/rfb/CMakeLists.txt
129 +@@ -88,7 +88,7 @@
130 + target_sources(rfb PRIVATE WinPasswdValidator.cxx)
131 + endif(WIN32)
132 +
133 +-if(UNIX AND NOT APPLE)
134 ++if(BUILD_SERVER AND UNIX AND NOT APPLE)
135 + target_sources(rfb PRIVATE UnixPasswordValidator.cxx pam.c)
136 + target_link_libraries(rfb ${PAM_LIBS})
137 + endif()
138 +--- a/unix/CMakeLists.txt
139 ++++ b/unix/CMakeLists.txt
140 +@@ -1,6 +1,8 @@
141 + add_subdirectory(tx)
142 + add_subdirectory(common)
143 +-add_subdirectory(vncconfig)
144 +-add_subdirectory(vncpasswd)
145 +-add_subdirectory(vncserver)
146 +-add_subdirectory(x0vncserver)
147 ++if(BUILD_SERVER)
148 ++ add_subdirectory(vncconfig)
149 ++ add_subdirectory(vncpasswd)
150 ++ add_subdirectory(vncserver)
151 ++ add_subdirectory(x0vncserver)
152 ++endif()
153
154 diff --git a/net-misc/tigervnc/metadata.xml b/net-misc/tigervnc/metadata.xml
155 index 9717615f517c..68efa8f862da 100644
156 --- a/net-misc/tigervnc/metadata.xml
157 +++ b/net-misc/tigervnc/metadata.xml
158 @@ -12,7 +12,6 @@
159 <use>
160 <flag name="drm">Build with DRM support</flag>
161 <flag name="server">Build TigerVNC server</flag>
162 - <flag name="xorgmodule">Build the Xorg module</flag>
163 <flag name="dri3">Build with DRI3 support</flag>
164 </use>
165 <upstream>
166
167 diff --git a/net-misc/tigervnc/tigervnc-9999.ebuild b/net-misc/tigervnc/tigervnc-1.12.0-r7.ebuild
168 similarity index 77%
169 copy from net-misc/tigervnc/tigervnc-9999.ebuild
170 copy to net-misc/tigervnc/tigervnc-1.12.0-r7.ebuild
171 index 903570b2dd06..ada6c94f5d44 100644
172 --- a/net-misc/tigervnc/tigervnc-9999.ebuild
173 +++ b/net-misc/tigervnc/tigervnc-1.12.0-r7.ebuild
174 @@ -4,19 +4,26 @@
175 EAPI=7
176
177 CMAKE_IN_SOURCE_BUILD=1
178 -inherit autotools cmake flag-o-matic git-r3 java-pkg-opt-2 optfeature systemd xdg
179 +inherit autotools cmake flag-o-matic java-pkg-opt-2 optfeature systemd xdg
180
181 XSERVER_VERSION="21.1.1"
182
183 DESCRIPTION="Remote desktop viewer display system"
184 HOMEPAGE="https://tigervnc.org"
185 -SRC_URI="server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.xz )"
186 -EGIT_REPO_URI="https://github.com/TigerVNC/tigervnc/"
187 +SRC_URI="https://github.com/TigerVNC/tigervnc/archive/v${PV}.tar.gz -> ${P}.tar.gz
188 + server? (
189 + ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.xz
190 + https://github.com/TigerVNC/tigervnc/commit/0c5a2b2e7759c2829c07186cfce4d24aa9b5274e.patch -> ${P}-xserver-21.patch
191 + )"
192
193 LICENSE="GPL-2"
194 SLOT="0"
195 -KEYWORDS=""
196 -IUSE="dri3 +drm gnutls java nls +opengl server xinerama +xorgmodule"
197 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
198 +IUSE="dri3 +drm gnutls java nls +opengl +server xinerama"
199 +REQUIRED_USE="
200 + dri3? ( drm )
201 + opengl? ( server )
202 +"
203
204 CDEPEND="
205 media-libs/libjpeg-turbo:=
206 @@ -48,7 +55,6 @@ CDEPEND="
207 x11-apps/xsetroot
208 x11-misc/xkeyboard-config
209 opengl? ( media-libs/libglvnd[X] )
210 - xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
211 )
212 "
213
214 @@ -79,16 +85,14 @@ PATCHES=(
215 # Restore Java viewer
216 "${FILESDIR}"/${PN}-1.11.0-install-java-viewer.patch
217 "${FILESDIR}"/${PN}-1.12.0-xsession-path.patch
218 + "${FILESDIR}"/${PN}-1.12.0-disable-server-and-pam.patch
219 )
220
221 -src_unpack() {
222 - git-r3_src_unpack
223 - unpack xorg-server-${XSERVER_VERSION}.tar.xz
224 -}
225 -
226 src_prepare() {
227 if use server; then
228 cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/. unix/xserver || die
229 + eapply "${FILESDIR}"/${P}-xorg-1.21.patch
230 + eapply "${DISTDIR}"/${P}-xserver-21.patch
231 fi
232
233 cmake_src_prepare
234 @@ -100,7 +104,6 @@ src_prepare() {
235 sed -i 's:\(present.h\):../present/\1:' os/utils.c || die
236 sed -i '/strcmp.*-fakescreenfps/,/^ \}/d' os/utils.c || die
237 fi
238 - cd "${WORKDIR}" && sed -i 's:\(drm_fourcc.h\):libdrm/\1:' $(grep drm_fourcc.h -rl .) || die
239 }
240
241 src_configure() {
242 @@ -112,6 +115,7 @@ src_configure() {
243 -DENABLE_GNUTLS=$(usex gnutls)
244 -DENABLE_NLS=$(usex nls)
245 -DBUILD_JAVA=$(usex java)
246 + -DBUILD_SERVER=$(usex server)
247 )
248
249 cmake_src_configure
250 @@ -168,14 +172,10 @@ src_install() {
251
252 if use server; then
253 emake -C unix/xserver/hw/vnc DESTDIR="${D}" install
254 - if ! use xorgmodule; then
255 - rm -rv "${ED}"/usr/$(get_libdir)/xorg || die
256 - else
257 - rm -v "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la || die
258 - fi
259 + rm -v "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la || die
260
261 - newconfd "${FILESDIR}"/${PN}-1.12.0.confd ${PN}
262 - newinitd "${FILESDIR}"/${PN}-1.12.0.initd ${PN}
263 + newconfd "${FILESDIR}"/${PN}-${PV}.confd ${PN}
264 + newinitd "${FILESDIR}"/${PN}-${PV}.initd ${PN}
265
266 systemd_douserunit unix/vncserver/vncserver@.service
267
268 @@ -185,15 +185,6 @@ src_install() {
269
270 # install vncserver to /usr/bin too, see bug #836620
271 dosym -r /usr/libexec/vncserver /usr/bin/vncserver
272 - else
273 - local f
274 - for f in x0vncserver vncconfig; do
275 - rm "${ED}"/usr/bin/${f} || die
276 - rm "${ED}"/usr/share/man/man1/${f}.1 || die
277 - done
278 - rm -r "${ED}"/usr/{sbin,libexec} || die
279 - rm -r "${ED}"/usr/share/man/man8 || die
280 - rm -r "${ED}"/etc || die
281 fi
282 }
283
284 @@ -202,6 +193,7 @@ pkg_postinst() {
285
286 local OPTIONAL_DM="gnome-base/gdm x11-misc/lightdm x11-misc/sddm x11-misc/slim"
287 use server && \
288 + optfeature "keeping track of the xorg-server module" net-misc/tigervnc-xorg-module && \
289 optfeature_header "Install any additional display manager package:" && \
290 optfeature "proper session support" ${OPTIONAL_DM}
291 }
292
293 diff --git a/net-misc/tigervnc/tigervnc-9999.ebuild b/net-misc/tigervnc/tigervnc-9999.ebuild
294 index 903570b2dd06..437a5aef9438 100644
295 --- a/net-misc/tigervnc/tigervnc-9999.ebuild
296 +++ b/net-misc/tigervnc/tigervnc-9999.ebuild
297 @@ -16,7 +16,11 @@ EGIT_REPO_URI="https://github.com/TigerVNC/tigervnc/"
298 LICENSE="GPL-2"
299 SLOT="0"
300 KEYWORDS=""
301 -IUSE="dri3 +drm gnutls java nls +opengl server xinerama +xorgmodule"
302 +IUSE="dri3 +drm gnutls java nls +opengl +server xinerama"
303 +REQUIRED_USE="
304 + dri3? ( drm )
305 + opengl? ( server )
306 +"
307
308 CDEPEND="
309 media-libs/libjpeg-turbo:=
310 @@ -48,7 +52,6 @@ CDEPEND="
311 x11-apps/xsetroot
312 x11-misc/xkeyboard-config
313 opengl? ( media-libs/libglvnd[X] )
314 - xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
315 )
316 "
317
318 @@ -79,11 +82,12 @@ PATCHES=(
319 # Restore Java viewer
320 "${FILESDIR}"/${PN}-1.11.0-install-java-viewer.patch
321 "${FILESDIR}"/${PN}-1.12.0-xsession-path.patch
322 + "${FILESDIR}"/${PN}-1.12.80-disable-server-and-pam.patch
323 )
324
325 src_unpack() {
326 git-r3_src_unpack
327 - unpack xorg-server-${XSERVER_VERSION}.tar.xz
328 + use server && unpack xorg-server-${XSERVER_VERSION}.tar.xz
329 }
330
331 src_prepare() {
332 @@ -99,8 +103,9 @@ src_prepare() {
333 eautoreconf
334 sed -i 's:\(present.h\):../present/\1:' os/utils.c || die
335 sed -i '/strcmp.*-fakescreenfps/,/^ \}/d' os/utils.c || die
336 +
337 + cd "${WORKDIR}" && sed -i 's:\(drm_fourcc.h\):libdrm/\1:' $(grep drm_fourcc.h -rl .) || die
338 fi
339 - cd "${WORKDIR}" && sed -i 's:\(drm_fourcc.h\):libdrm/\1:' $(grep drm_fourcc.h -rl .) || die
340 }
341
342 src_configure() {
343 @@ -112,6 +117,7 @@ src_configure() {
344 -DENABLE_GNUTLS=$(usex gnutls)
345 -DENABLE_NLS=$(usex nls)
346 -DBUILD_JAVA=$(usex java)
347 + -DBUILD_SERVER=$(usex server)
348 )
349
350 cmake_src_configure
351 @@ -168,11 +174,7 @@ src_install() {
352
353 if use server; then
354 emake -C unix/xserver/hw/vnc DESTDIR="${D}" install
355 - if ! use xorgmodule; then
356 - rm -rv "${ED}"/usr/$(get_libdir)/xorg || die
357 - else
358 - rm -v "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la || die
359 - fi
360 + rm -v "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la || die
361
362 newconfd "${FILESDIR}"/${PN}-1.12.0.confd ${PN}
363 newinitd "${FILESDIR}"/${PN}-1.12.0.initd ${PN}
364 @@ -185,15 +187,6 @@ src_install() {
365
366 # install vncserver to /usr/bin too, see bug #836620
367 dosym -r /usr/libexec/vncserver /usr/bin/vncserver
368 - else
369 - local f
370 - for f in x0vncserver vncconfig; do
371 - rm "${ED}"/usr/bin/${f} || die
372 - rm "${ED}"/usr/share/man/man1/${f}.1 || die
373 - done
374 - rm -r "${ED}"/usr/{sbin,libexec} || die
375 - rm -r "${ED}"/usr/share/man/man8 || die
376 - rm -r "${ED}"/etc || die
377 fi
378 }
379
380 @@ -202,6 +195,7 @@ pkg_postinst() {
381
382 local OPTIONAL_DM="gnome-base/gdm x11-misc/lightdm x11-misc/sddm x11-misc/slim"
383 use server && \
384 + optfeature "keeping track of the xorg-server module" net-misc/tigervnc-xorg-module && \
385 optfeature_header "Install any additional display manager package:" && \
386 optfeature "proper session support" ${OPTIONAL_DM}
387 }