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