1 |
commit: 360b91d81237a8627bd2909d5800b31a1e2e1ca7 |
2 |
Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Apr 12 08:58:57 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 14 01:03:26 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=360b91d8 |
7 |
|
8 |
net-misc/tigervnc: Drop USE flag xorgmodule |
9 |
|
10 |
Always build the xorg module |
11 |
Do not depend on a specific version of xorg, add a metapackage instead |
12 |
Revbump so we can stabilize net-misc/tigervnc-1.12.0-r5 |
13 |
|
14 |
Closes: https://bugs.gentoo.org/481928 |
15 |
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com> |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
net-misc/tigervnc/tigervnc-1.12.0-r6.ebuild | 206 ++++++++++++++++++++++++++++ |
19 |
1 file changed, 206 insertions(+) |
20 |
|
21 |
diff --git a/net-misc/tigervnc/tigervnc-1.12.0-r6.ebuild b/net-misc/tigervnc/tigervnc-1.12.0-r6.ebuild |
22 |
new file mode 100644 |
23 |
index 000000000000..2bb25923bd56 |
24 |
--- /dev/null |
25 |
+++ b/net-misc/tigervnc/tigervnc-1.12.0-r6.ebuild |
26 |
@@ -0,0 +1,206 @@ |
27 |
+# Copyright 1999-2022 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=7 |
31 |
+ |
32 |
+CMAKE_IN_SOURCE_BUILD=1 |
33 |
+inherit autotools cmake flag-o-matic java-pkg-opt-2 optfeature systemd xdg |
34 |
+ |
35 |
+XSERVER_VERSION="21.1.1" |
36 |
+ |
37 |
+DESCRIPTION="Remote desktop viewer display system" |
38 |
+HOMEPAGE="https://www.tigervnc.org" |
39 |
+SRC_URI="https://github.com/TigerVNC/tigervnc/archive/v${PV}.tar.gz -> ${P}.tar.gz |
40 |
+ server? ( |
41 |
+ ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.xz |
42 |
+ https://github.com/TigerVNC/tigervnc/commit/0c5a2b2e7759c2829c07186cfce4d24aa9b5274e.patch -> ${P}-xserver-21.patch |
43 |
+ )" |
44 |
+ |
45 |
+LICENSE="GPL-2" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" |
48 |
+IUSE="dri3 +drm gnutls java nls +opengl +server xinerama" |
49 |
+REQUIRED_USE=" |
50 |
+ dri3? ( drm ) |
51 |
+ opengl? ( server ) |
52 |
+" |
53 |
+ |
54 |
+CDEPEND=" |
55 |
+ media-libs/libjpeg-turbo:= |
56 |
+ sys-libs/zlib:= |
57 |
+ x11-libs/fltk:1 |
58 |
+ x11-libs/libX11 |
59 |
+ x11-libs/libXext |
60 |
+ x11-libs/libXi |
61 |
+ x11-libs/libXrandr |
62 |
+ x11-libs/libXrender |
63 |
+ x11-libs/pixman |
64 |
+ gnutls? ( net-libs/gnutls:= ) |
65 |
+ nls? ( virtual/libiconv ) |
66 |
+ server? ( |
67 |
+ dev-libs/libbsd |
68 |
+ dev-libs/openssl:0= |
69 |
+ sys-libs/pam |
70 |
+ x11-libs/libXau |
71 |
+ x11-libs/libXdamage |
72 |
+ x11-libs/libXdmcp |
73 |
+ x11-libs/libXfixes |
74 |
+ x11-libs/libXfont2 |
75 |
+ x11-libs/libXtst |
76 |
+ x11-libs/pixman |
77 |
+ x11-libs/xtrans |
78 |
+ x11-apps/xauth |
79 |
+ x11-apps/xinit |
80 |
+ x11-apps/xkbcomp |
81 |
+ x11-apps/xsetroot |
82 |
+ x11-misc/xkeyboard-config |
83 |
+ opengl? ( media-libs/libglvnd[X] ) |
84 |
+ ) |
85 |
+ " |
86 |
+ |
87 |
+RDEPEND="${CDEPEND} |
88 |
+ java? ( virtual/jre:1.8 ) |
89 |
+ server? ( |
90 |
+ dev-lang/perl |
91 |
+ sys-process/psmisc |
92 |
+ )" |
93 |
+ |
94 |
+DEPEND="${CDEPEND} |
95 |
+ drm? ( x11-libs/libdrm ) |
96 |
+ server? ( |
97 |
+ media-fonts/font-util |
98 |
+ x11-base/xorg-proto |
99 |
+ x11-libs/libxcvt |
100 |
+ x11-libs/libxkbfile |
101 |
+ x11-misc/util-macros |
102 |
+ opengl? ( media-libs/mesa ) |
103 |
+ )" |
104 |
+ |
105 |
+BDEPEND=" |
106 |
+ virtual/pkgconfig |
107 |
+ nls? ( sys-devel/gettext ) |
108 |
+ " |
109 |
+ |
110 |
+PATCHES=( |
111 |
+ # Restore Java viewer |
112 |
+ "${FILESDIR}"/${PN}-1.11.0-install-java-viewer.patch |
113 |
+ "${FILESDIR}"/${PN}-1.12.0-xsession-path.patch |
114 |
+) |
115 |
+ |
116 |
+src_prepare() { |
117 |
+ if use server; then |
118 |
+ cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/. unix/xserver || die |
119 |
+ eapply "${FILESDIR}"/${P}-xorg-1.21.patch |
120 |
+ eapply "${DISTDIR}"/${P}-xserver-21.patch |
121 |
+ fi |
122 |
+ |
123 |
+ cmake_src_prepare |
124 |
+ |
125 |
+ if use server; then |
126 |
+ cd unix/xserver || die |
127 |
+ eapply ../xserver${XSERVER_VERSION}.patch |
128 |
+ eautoreconf |
129 |
+ sed -i 's:\(present.h\):../present/\1:' os/utils.c || die |
130 |
+ sed -i '/strcmp.*-fakescreenfps/,/^ \}/d' os/utils.c || die |
131 |
+ fi |
132 |
+} |
133 |
+ |
134 |
+src_configure() { |
135 |
+ if use arm || use hppa; then |
136 |
+ append-flags "-fPIC" |
137 |
+ fi |
138 |
+ |
139 |
+ local mycmakeargs=( |
140 |
+ -DENABLE_GNUTLS=$(usex gnutls) |
141 |
+ -DENABLE_NLS=$(usex nls) |
142 |
+ -DBUILD_JAVA=$(usex java) |
143 |
+ ) |
144 |
+ |
145 |
+ cmake_src_configure |
146 |
+ |
147 |
+ if use server; then |
148 |
+ cd unix/xserver || die |
149 |
+ econf \ |
150 |
+ $(use_enable opengl glx) \ |
151 |
+ $(use_enable drm libdrm) \ |
152 |
+ --disable-config-hal \ |
153 |
+ --disable-config-udev \ |
154 |
+ --disable-devel-docs \ |
155 |
+ --disable-dri \ |
156 |
+ $(use_enable dri3) \ |
157 |
+ --disable-glamor \ |
158 |
+ --disable-kdrive \ |
159 |
+ --disable-libunwind \ |
160 |
+ --disable-linux-acpi \ |
161 |
+ --disable-record \ |
162 |
+ --disable-selective-werror \ |
163 |
+ --disable-static \ |
164 |
+ --disable-unit-tests \ |
165 |
+ --disable-xephyr \ |
166 |
+ $(use_enable xinerama) \ |
167 |
+ --disable-xnest \ |
168 |
+ --disable-xorg \ |
169 |
+ --disable-xvfb \ |
170 |
+ --disable-xwin \ |
171 |
+ --enable-dri2 \ |
172 |
+ --with-pic \ |
173 |
+ --without-dtrace \ |
174 |
+ --disable-present \ |
175 |
+ --with-sha1=libcrypto |
176 |
+ fi |
177 |
+} |
178 |
+ |
179 |
+src_compile() { |
180 |
+ cmake_src_compile |
181 |
+ |
182 |
+ if use server; then |
183 |
+ # deps of the vnc module and the module itself |
184 |
+ local d subdirs=( |
185 |
+ fb xfixes Xext dbe $(usex opengl glx "") $(usev dri3) randr render |
186 |
+ damageext miext Xi xkb composite dix mi os hw/vnc |
187 |
+ ) |
188 |
+ for d in "${subdirs[@]}"; do |
189 |
+ emake -C unix/xserver/"${d}" |
190 |
+ done |
191 |
+ fi |
192 |
+} |
193 |
+ |
194 |
+src_install() { |
195 |
+ cmake_src_install |
196 |
+ |
197 |
+ if use server; then |
198 |
+ emake -C unix/xserver/hw/vnc DESTDIR="${D}" install |
199 |
+ rm -v "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la || die |
200 |
+ |
201 |
+ newconfd "${FILESDIR}"/${PN}-${PV}.confd ${PN} |
202 |
+ newinitd "${FILESDIR}"/${PN}-${PV}.initd ${PN} |
203 |
+ |
204 |
+ systemd_douserunit unix/vncserver/vncserver@.service |
205 |
+ |
206 |
+ # comment out pam_selinux.so, the server does not start if missing |
207 |
+ # part of bug #746227 |
208 |
+ sed -i -e '/pam_selinux/s/^/#/' "${ED}"/etc/pam.d/tigervnc || die |
209 |
+ |
210 |
+ # install vncserver to /usr/bin too, see bug #836620 |
211 |
+ dosym -r /usr/libexec/vncserver /usr/bin/vncserver |
212 |
+ else |
213 |
+ local f |
214 |
+ for f in x0vncserver vncconfig; do |
215 |
+ rm "${ED}"/usr/bin/${f} || die |
216 |
+ rm "${ED}"/usr/share/man/man1/${f}.1 || die |
217 |
+ done |
218 |
+ rm -r "${ED}"/usr/{sbin,libexec} || die |
219 |
+ rm -r "${ED}"/usr/share/man/man8 || die |
220 |
+ rm -r "${ED}"/etc || die |
221 |
+ fi |
222 |
+} |
223 |
+ |
224 |
+pkg_postinst() { |
225 |
+ xdg_pkg_postinst |
226 |
+ |
227 |
+ local OPTIONAL_DM="gnome-base/gdm x11-misc/lightdm x11-misc/sddm x11-misc/slim" |
228 |
+ use server && \ |
229 |
+ optfeature "keeping track of the xorg-server module" net-misc/tigervnc-xorg-module && \ |
230 |
+ optfeature_header "Install any additional display manager package:" && \ |
231 |
+ optfeature "proper session support" ${OPTIONAL_DM} |
232 |
+} |