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/
Date: Mon, 06 Dec 2021 23:37:03
Message-Id: 1638833774.c1cdfd13843b40362a3b0a538f0a9bdbe564f050.sam@gentoo
1 commit: c1cdfd13843b40362a3b0a538f0a9bdbe564f050
2 Author: Jan Psota <jasiupsota <AT> gmail <DOT> com>
3 AuthorDate: Mon Dec 6 21:36:38 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 6 23:36:14 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1cdfd13
7
8 net-misc/tigervnc: live ebuild for xorg-server-21.1.1 support
9
10 [sam: Includes its own copy of xserver for now (not ideal, but this package
11 already uses a bunch of patched versions of things).]
12
13 Closes: https://bugs.gentoo.org/828469
14 Signed-off-by: Jan Psota <jasiupsota <AT> gmail.com>
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 net-misc/tigervnc/Manifest | 1 +
18 net-misc/tigervnc/tigervnc-9999.ebuild | 185 +++++++++++++++++++++++++++++++++
19 2 files changed, 186 insertions(+)
20
21 diff --git a/net-misc/tigervnc/Manifest b/net-misc/tigervnc/Manifest
22 index 7c7e79a01771..4f5a3da9f469 100644
23 --- a/net-misc/tigervnc/Manifest
24 +++ b/net-misc/tigervnc/Manifest
25 @@ -1,3 +1,4 @@
26 DIST tigervnc-1.11.0.tar.gz 1346992 BLAKE2B 4935f78154ea1567d58f542962f1a87688cd195e9d1aff8295e99aedc91a87cea7b686e9ef34e68f4abb1e3ce7a93122baff1d6f3564e4cc60b967a7bca6f8ac SHA512 262676f065de6dfb72b1482c0ef1e6d8b764f53360ae6114debbe0986eede45d27e283e1452a72cb9b7540657ab347fd36df5b30b72d6db4a0f8cbea5b591025
27 DIST tigervnc-1.9.0.tar.gz 1506520 BLAKE2B 292c2e5fb9ffe2573e216257e889d259abfdca5964559492c318e24ea00563211e7477a4f1b2b09d0e962343d4aeb2c12dcfdd6857a3282882ee9f91fdf8103a SHA512 333910f567e6b5e4a5a22d898b2d4c3f4b834cb4cc8fc13ff55d31401894c0d5122a127692ec5eb51e412c945ff3ea5b8146f9ab22cbe1e47541e09239ec8c9d
28 DIST xorg-server-1.20.0.tar.bz2 6096838 BLAKE2B 34ee6d6dbbde54d54e082a0791e85ad52d728e239a7d8fadb75ebcbdbaab8752b90ca6d075f096d971db7ec68ce4ecac5c70fcf536ce23c20b8dce8f32e2c046 SHA512 1489e8511c9da682ef0460182dfeeddd241c72d4ef4d206d9706f1e39572c09953df851fab18cefb65a1ee4c6710c6ba13c63c9c9fc0bc1b5f12c50780412cde
29 +DIST xorg-server-21.1.1.tar.xz 4958508 BLAKE2B fadac208773700b91003ef18d46e6f2c6b501e59b7491c943f406641e9ff3837a8126034c023e9b6d2d4131ee438c1ef94fa458af1828d4be325519b47069a79 SHA512 8608ed9c1537c95e8a3adea5e3e372a3c5eb841f8e27c84283093f22fb1909e16a800006510da684b13f8f237f33b8a4be3e2537f5f9ab9af4c5ad12770eef0d
30
31 diff --git a/net-misc/tigervnc/tigervnc-9999.ebuild b/net-misc/tigervnc/tigervnc-9999.ebuild
32 new file mode 100644
33 index 000000000000..01ff15488f6e
34 --- /dev/null
35 +++ b/net-misc/tigervnc/tigervnc-9999.ebuild
36 @@ -0,0 +1,185 @@
37 +# Copyright 1999-2021 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=7
41 +CMAKE_IN_SOURCE_BUILD=1
42 +
43 +inherit autotools cmake flag-o-matic git-r3 systemd xdg
44 +
45 +XSERVER_VERSION="21.1.1"
46 +
47 +DESCRIPTION="Remote desktop viewer display system"
48 +HOMEPAGE="http://www.tigervnc.org"
49 +SRC_URI="server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.xz )"
50 +EGIT_REPO_URI="https://github.com/TigerVNC/tigervnc/"
51 +
52 +LICENSE="GPL-2"
53 +SLOT="0"
54 +KEYWORDS=""
55 +IUSE="dri3 +drm gnutls nls +opengl pam server xinerama +xorgmodule"
56 +
57 +CDEPEND="
58 + virtual/jpeg:0
59 + sys-libs/zlib:=
60 + >=x11-libs/fltk-1.3.1
61 + gnutls? ( net-libs/gnutls:= )
62 + nls? ( virtual/libiconv )
63 + pam? ( sys-libs/pam )
64 + x11-libs/libX11
65 + x11-libs/libXext
66 + x11-libs/libXrender
67 + x11-libs/libxcvt
68 + x11-libs/pixman
69 + server? (
70 + x11-libs/libXau
71 + x11-libs/libXdamage
72 + x11-libs/libXdmcp
73 + x11-libs/libXfont2
74 + x11-libs/libXtst
75 + >=x11-libs/pixman-0.27.2
76 + >=x11-apps/xauth-1.0.3
77 + x11-apps/xsetroot
78 + >=x11-misc/xkeyboard-config-2.4.1-r3
79 + xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
80 + drm? ( x11-libs/libdrm )
81 + dev-libs/openssl:0=
82 + )
83 + xinerama? ( x11-libs/libXinerama )
84 + "
85 +
86 +RDEPEND="${CDEPEND}
87 + !net-misc/tightvnc
88 + !net-misc/vnc
89 + !net-misc/xf4vnc"
90 +
91 +DEPEND="${CDEPEND}
92 + nls? ( sys-devel/gettext )
93 + x11-base/xorg-proto
94 + media-libs/fontconfig
95 + x11-libs/libICE
96 + x11-libs/libSM
97 + x11-libs/libXcursor
98 + x11-libs/libXfixes
99 + x11-libs/libXft
100 + x11-libs/libXi
101 + server? (
102 + dev-libs/libbsd
103 + x11-libs/libxkbfile
104 + x11-libs/libxshmfence
105 + virtual/pkgconfig
106 + media-fonts/font-util
107 + x11-misc/util-macros
108 + >=x11-libs/xtrans-1.3.3
109 + opengl? ( >=media-libs/mesa-10.3.4-r1 )
110 + )"
111 +
112 +src_unpack() {
113 + git-r3_src_unpack
114 + unpack xorg-server-${XSERVER_VERSION}.tar.xz
115 +}
116 +
117 +src_prepare() {
118 + if use server; then
119 + cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/. unix/xserver || die
120 + fi
121 +
122 + cmake_src_prepare
123 +
124 + if use server; then
125 + cd unix/xserver || die
126 + eapply ../xserver${XSERVER_VERSION}.patch
127 + eautoreconf
128 + sed -i 's:\(present.h\):../present/\1:' os/utils.c || die
129 + sed -i '/strcmp.*-fakescreenfps/,/^ \}/d' os/utils.c || die
130 + fi
131 + cd "${WORKDIR}" && sed -i 's:\(drm_fourcc.h\):libdrm/\1:' $(grep drm_fourcc.h -rl .) || die
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 + -DENABLE_PAM=$(usex pam)
143 + -DBUILD_JAVA=no
144 + )
145 +
146 + cmake_src_configure
147 +
148 + if use server; then
149 + cd unix/xserver || die
150 + econf \
151 + $(use_enable opengl glx) \
152 + $(use_enable drm libdrm) \
153 + --disable-config-hal \
154 + --disable-config-udev \
155 + --disable-devel-docs \
156 + --disable-dmx \
157 + --disable-dri \
158 + $(use_enable dri3) \
159 + --disable-glamor \
160 + --disable-kdrive \
161 + --disable-libunwind \
162 + --disable-linux-acpi \
163 + --disable-record \
164 + --disable-selective-werror \
165 + --disable-static \
166 + --disable-unit-tests \
167 + --disable-xephyr \
168 + $(use_enable xinerama) \
169 + --disable-xnest \
170 + --disable-xorg \
171 + --disable-xvfb \
172 + --disable-xwin \
173 + --disable-xwayland \
174 + --enable-dri2 \
175 + --with-pic \
176 + --without-dtrace \
177 + --disable-present \
178 + --with-sha1=libcrypto
179 + fi
180 +}
181 +
182 +src_compile() {
183 + cmake_src_compile
184 +
185 + if use server; then
186 + # deps of the vnc module and the module itself
187 + local d subdirs=(
188 + fb xfixes Xext dbe $(usex opengl glx "") $(usev dri3) randr render
189 + damageext miext Xi xkb composite dix mi os hw/vnc
190 + )
191 + for d in "${subdirs[@]}"; do
192 + emake -C unix/xserver/"${d}"
193 + done
194 + fi
195 +}
196 +
197 +src_install() {
198 + cmake_src_install
199 +
200 + if use server; then
201 + emake -C unix/xserver/hw/vnc DESTDIR="${D}" install
202 + if ! use xorgmodule; then
203 + rm -rv "${ED}"/usr/$(get_libdir)/xorg || die
204 + else
205 + rm -v "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la || die
206 + fi
207 +
208 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
209 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
210 +
211 + systemd_douserunit unix/vncserver/vncserver@.service
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 + fi
221 +}