1 |
commit: 44f736a28ec3082a25596bcc439b83f8766b396b |
2 |
Author: orbea <orbea <AT> riseup <DOT> net> |
3 |
AuthorDate: Tue Jul 5 16:03:44 2022 +0000 |
4 |
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> |
5 |
CommitDate: Tue Jul 5 21:18:57 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=44f736a2 |
7 |
|
8 |
net-libs/libvncserver: Add package |
9 |
|
10 |
Upstream-Commit: 97fbbd678b2012e64acddd523677bc55a177bc58 |
11 |
Upstream-PR: https://github.com/LibVNC/libvncserver/pull/522 |
12 |
Signed-off-by: orbea <orbea <AT> riseup.net> |
13 |
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> |
14 |
|
15 |
net-libs/libvncserver/Manifest | 1 + |
16 |
.../files/libvncserver-0.9.13-libressl.patch | 66 +++++++++++++++++++ |
17 |
.../libvncserver-0.9.13-test-fix-includetest.patch | 54 +++++++++++++++ |
18 |
.../libvncserver-0.9.13-test-fix-tjunittest.patch | 29 +++++++++ |
19 |
net-libs/libvncserver/libvncserver-0.9.13.ebuild | 76 ++++++++++++++++++++++ |
20 |
net-libs/libvncserver/metadata.xml | 26 ++++++++ |
21 |
6 files changed, 252 insertions(+) |
22 |
|
23 |
diff --git a/net-libs/libvncserver/Manifest b/net-libs/libvncserver/Manifest |
24 |
new file mode 100644 |
25 |
index 0000000..c7569e5 |
26 |
--- /dev/null |
27 |
+++ b/net-libs/libvncserver/Manifest |
28 |
@@ -0,0 +1 @@ |
29 |
+DIST LibVNCServer-0.9.13.tar.gz 567491 BLAKE2B 138c7ca63f8cd30a21dc1b58aafa744e12a1a9eca503ffec18a63d18791d7a5df4eef176d7e4e797a2aadda1dd04d1b051abfd76bf5c6806d558c09ffee78cce SHA512 18b0a1698d32bbdbfe6f65f76130b2a95860e3cc76e8adb904269663698c7c0ae982f451fda1f25e5461f096045d40a89d9014258f439366d5b4feaa4999d643 |
30 |
|
31 |
diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-libressl.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-libressl.patch |
32 |
new file mode 100644 |
33 |
index 0000000..952ef53 |
34 |
--- /dev/null |
35 |
+++ b/net-libs/libvncserver/files/libvncserver-0.9.13-libressl.patch |
36 |
@@ -0,0 +1,66 @@ |
37 |
+From: https://github.com/LibVNC/libvncserver/commit/97fbbd678b2012e64acddd523677bc55a177bc58 |
38 |
+ |
39 |
+From 97fbbd678b2012e64acddd523677bc55a177bc58 Mon Sep 17 00:00:00 2001 |
40 |
+From: Fabrice Fontaine <fontaine.fabrice@×××××.com> |
41 |
+Date: Thu, 12 May 2022 20:41:50 +0200 |
42 |
+Subject: [PATCH] common/crypto_openssl.c: fix build with libressl >= 3.5.0 |
43 |
+ (#522) |
44 |
+ |
45 |
+Fix the following build failure with libressl >= 3.5.0: |
46 |
+ |
47 |
+/nvmedata/autobuild/instance-26/output-1/build/libvncserver-0.9.13/common/crypto_openssl.c: In function 'dh_generate_keypair': |
48 |
+/nvmedata/autobuild/instance-26/output-1/build/libvncserver-0.9.13/common/crypto_openssl.c:149:7: error: dereferencing pointer to incomplete type 'DH' {aka 'struct dh_st'} |
49 |
+ 149 | dh->p = BN_bin2bn(prime, keylen, NULL); |
50 |
+ | ^~ |
51 |
+ |
52 |
+Fixes: |
53 |
+ - http://autobuild.buildroot.org/results/49b3940b9d0432cb5fb0c5d22dfa017b18c6e233 |
54 |
+ |
55 |
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@×××××.com> |
56 |
+--- |
57 |
+ common/crypto_openssl.c | 12 ++++++++---- |
58 |
+ 1 file changed, 8 insertions(+), 4 deletions(-) |
59 |
+ |
60 |
+diff --git a/common/crypto_openssl.c b/common/crypto_openssl.c |
61 |
+index 60d4bd4df..51d7ec2d9 100644 |
62 |
+--- a/common/crypto_openssl.c |
63 |
++++ b/common/crypto_openssl.c |
64 |
+@@ -138,14 +138,16 @@ int dh_generate_keypair(uint8_t *priv_out, uint8_t *pub_out, const uint8_t *gen, |
65 |
+ { |
66 |
+ int result = 0; |
67 |
+ DH *dh; |
68 |
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L |
69 |
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L || \ |
70 |
++ (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x30500000) |
71 |
+ const BIGNUM *pub_key = NULL; |
72 |
+ const BIGNUM *priv_key = NULL; |
73 |
+ #endif |
74 |
+ |
75 |
+ if(!(dh = DH_new())) |
76 |
+ goto out; |
77 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER |
78 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ |
79 |
++ (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000) |
80 |
+ dh->p = BN_bin2bn(prime, keylen, NULL); |
81 |
+ dh->g = BN_bin2bn(gen, gen_len, NULL); |
82 |
+ #else |
83 |
+@@ -154,7 +156,8 @@ int dh_generate_keypair(uint8_t *priv_out, uint8_t *pub_out, const uint8_t *gen, |
84 |
+ #endif |
85 |
+ if(!DH_generate_key(dh)) |
86 |
+ goto out; |
87 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER |
88 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ |
89 |
++ (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000) |
90 |
+ if(BN_bn2bin(dh->priv_key, priv_out) == 0) |
91 |
+ goto out; |
92 |
+ if(BN_bn2bin(dh->pub_key, pub_out) == 0) |
93 |
+@@ -181,7 +184,8 @@ int dh_compute_shared_key(uint8_t *shared_out, const uint8_t *priv, const uint8_ |
94 |
+ |
95 |
+ if(!(dh = DH_new())) |
96 |
+ goto out; |
97 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER |
98 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ |
99 |
++ (defined LIBRESSL_VERSION_NUMBER && LIBRESSL_VERSION_NUMBER < 0x30500000) |
100 |
+ dh->p = BN_bin2bn(prime, keylen, NULL); |
101 |
+ dh->priv_key = BN_bin2bn(priv, keylen, NULL); |
102 |
+ #else |
103 |
|
104 |
diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch |
105 |
new file mode 100644 |
106 |
index 0000000..7677082 |
107 |
--- /dev/null |
108 |
+++ b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch |
109 |
@@ -0,0 +1,54 @@ |
110 |
+From 39cff3dd6b5d9ebcf86f01e2c7e0bef62abd9d6f Mon Sep 17 00:00:00 2001 |
111 |
+From: Alexander Tsoy <alexander@××××.me> |
112 |
+Date: Thu, 25 Jun 2020 11:35:04 +0300 |
113 |
+Subject: [PATCH 1/2] test: fix includetest to use CMAKE_MAKE_PROGRAM (#431) |
114 |
+ |
115 |
+includetest currently fais if, for example, ninja is used as a CMake |
116 |
+generator. Fix it by using CMAKE_MAKE_PROGRAM in the test. |
117 |
+--- |
118 |
+ CMakeLists.txt | 2 +- |
119 |
+ test/includetest.sh | 7 ++++--- |
120 |
+ 2 files changed, 5 insertions(+), 4 deletions(-) |
121 |
+ |
122 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
123 |
+index 0b6228a2..290deb38 100644 |
124 |
+--- a/CMakeLists.txt |
125 |
++++ b/CMakeLists.txt |
126 |
+@@ -680,7 +680,7 @@ endif(LIBVNCSERVER_WITH_WEBSOCKETS) |
127 |
+ |
128 |
+ add_test(NAME cargs COMMAND test_cargstest) |
129 |
+ if(UNIX) |
130 |
+- add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) |
131 |
++ add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_MAKE_PROGRAM}) |
132 |
+ endif(UNIX) |
133 |
+ if(FOUND_LIBJPEG_TURBO) |
134 |
+ add_test(NAME turbojpeg COMMAND test_tjunittest) |
135 |
+diff --git a/test/includetest.sh b/test/includetest.sh |
136 |
+index 23d602e6..6b064208 100755 |
137 |
+--- a/test/includetest.sh |
138 |
++++ b/test/includetest.sh |
139 |
+@@ -5,10 +5,11 @@ |
140 |
+ |
141 |
+ # expects install prefix like /usr as an argument |
142 |
+ PREFIX=$1 |
143 |
++CMAKE_MAKE_PROGRAM=$2 |
144 |
+ |
145 |
+ TMPDIR=$(mktemp -d) |
146 |
+ |
147 |
+-make install DESTDIR=$TMPDIR |
148 |
++DESTDIR="$TMPDIR" $CMAKE_MAKE_PROGRAM install |
149 |
+ |
150 |
+ echo \ |
151 |
+ " |
152 |
+@@ -19,6 +20,6 @@ int main() |
153 |
+ { |
154 |
+ return 0; |
155 |
+ } |
156 |
+-" > $TMPDIR/includetest.c |
157 |
++" > "$TMPDIR"/includetest.c |
158 |
+ |
159 |
+-cc -I $TMPDIR/$PREFIX $TMPDIR/includetest.c |
160 |
++cc -I "$TMPDIR/$PREFIX" "$TMPDIR"/includetest.c |
161 |
+-- |
162 |
+2.26.2 |
163 |
+ |
164 |
|
165 |
diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch |
166 |
new file mode 100644 |
167 |
index 0000000..98e3a65 |
168 |
--- /dev/null |
169 |
+++ b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch |
170 |
@@ -0,0 +1,29 @@ |
171 |
+From 8244fab5421fd14d4c75ce488ad18d38b7a6edb4 Mon Sep 17 00:00:00 2001 |
172 |
+From: Christian Beier <info@××××××××××××××.net> |
173 |
+Date: Thu, 25 Jun 2020 12:21:50 +0200 |
174 |
+Subject: [PATCH 2/2] CMake: only add turbojpeg test if configured WITH_JPEG |
175 |
+ |
176 |
+Closes #430 |
177 |
+--- |
178 |
+ CMakeLists.txt | 4 ++-- |
179 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
180 |
+ |
181 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
182 |
+index 290deb38..fdca4d81 100644 |
183 |
+--- a/CMakeLists.txt |
184 |
++++ b/CMakeLists.txt |
185 |
+@@ -682,9 +682,9 @@ add_test(NAME cargs COMMAND test_cargstest) |
186 |
+ if(UNIX) |
187 |
+ add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_MAKE_PROGRAM}) |
188 |
+ endif(UNIX) |
189 |
+-if(FOUND_LIBJPEG_TURBO) |
190 |
++if(WITH_JPEG AND FOUND_LIBJPEG_TURBO) |
191 |
+ add_test(NAME turbojpeg COMMAND test_tjunittest) |
192 |
+-endif(FOUND_LIBJPEG_TURBO) |
193 |
++endif(WITH_JPEG AND FOUND_LIBJPEG_TURBO) |
194 |
+ if(LIBVNCSERVER_WITH_WEBSOCKETS) |
195 |
+ add_test(NAME wstest COMMAND test_wstest) |
196 |
+ endif(LIBVNCSERVER_WITH_WEBSOCKETS) |
197 |
+-- |
198 |
+2.26.2 |
199 |
+ |
200 |
|
201 |
diff --git a/net-libs/libvncserver/libvncserver-0.9.13.ebuild b/net-libs/libvncserver/libvncserver-0.9.13.ebuild |
202 |
new file mode 100644 |
203 |
index 0000000..7fbb4db |
204 |
--- /dev/null |
205 |
+++ b/net-libs/libvncserver/libvncserver-0.9.13.ebuild |
206 |
@@ -0,0 +1,76 @@ |
207 |
+# Copyright 1999-2021 Gentoo Authors |
208 |
+# Distributed under the terms of the GNU General Public License v2 |
209 |
+ |
210 |
+EAPI=7 |
211 |
+ |
212 |
+inherit cmake |
213 |
+ |
214 |
+MY_P="LibVNCServer-${PV}" |
215 |
+ |
216 |
+DESCRIPTION="library for creating vnc servers" |
217 |
+HOMEPAGE="https://libvnc.github.io/" |
218 |
+SRC_URI="https://github.com/LibVNC/${PN}/archive/${MY_P}.tar.gz" |
219 |
+S="${WORKDIR}/${PN}-${MY_P}" |
220 |
+ |
221 |
+# common/d3des.*: https://github.com/LibVNC/libvncserver/issues/88 |
222 |
+LICENSE="GPL-2 GPL-2+ LGPL-2.1+ BSD MIT" |
223 |
+# no sub slot wanted (yet), see #578958 |
224 |
+SLOT="0" |
225 |
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" |
226 |
+IUSE="+24bpp +filetransfer gcrypt gnutls ipv6 +jpeg lzo +png sasl ssl systemd +threads +zlib" |
227 |
+# https://bugs.gentoo.org/690202 |
228 |
+# https://bugs.gentoo.org/435326 |
229 |
+# https://bugs.gentoo.org/550916 |
230 |
+REQUIRED_USE=" |
231 |
+ filetransfer? ( threads ) |
232 |
+ jpeg? ( zlib ) |
233 |
+ png? ( zlib ) |
234 |
+ ssl? ( !gnutls? ( threads ) ) |
235 |
+" |
236 |
+ |
237 |
+DEPEND=" |
238 |
+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0= ) |
239 |
+ ssl? ( |
240 |
+ !gnutls? ( |
241 |
+ >=dev-libs/openssl-1.0.2:0= |
242 |
+ ) |
243 |
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6:0= ) |
244 |
+ ) |
245 |
+ jpeg? ( >=virtual/jpeg-0-r2:0 ) |
246 |
+ lzo? ( dev-libs/lzo ) |
247 |
+ png? ( >=media-libs/libpng-1.6.10:0= ) |
248 |
+ sasl? ( dev-libs/cyrus-sasl ) |
249 |
+ systemd? ( sys-apps/systemd:= ) |
250 |
+ zlib? ( >=sys-libs/zlib-1.2.8-r1:0= ) |
251 |
+" |
252 |
+RDEPEND="${DEPEND}" |
253 |
+ |
254 |
+DOCS=( AUTHORS ChangeLog NEWS.md README.md TODO.md ) |
255 |
+ |
256 |
+PATCHES=( |
257 |
+ "${FILESDIR}"/${P}-test-fix-includetest.patch |
258 |
+ "${FILESDIR}"/${P}-test-fix-tjunittest.patch |
259 |
+ "${FILESDIR}"/${P}-libressl.patch |
260 |
+) |
261 |
+ |
262 |
+src_configure() { |
263 |
+ local mycmakeargs=( |
264 |
+ -DWITH_FFMPEG=OFF |
265 |
+ -DWITH_GTK=OFF |
266 |
+ -DWITH_SDL=OFF |
267 |
+ -DWITH_24BPP=$(usex 24bpp ON OFF) |
268 |
+ -DWITH_TIGHTVNC_FILETRANSFER=$(usex filetransfer ON OFF) |
269 |
+ -DWITH_GCRYPT=$(usex gcrypt ON OFF) |
270 |
+ -DWITH_GNUTLS=$(usex gnutls $(usex ssl ON OFF) OFF) |
271 |
+ -DWITH_IPv6=$(usex ipv6 ON OFF) |
272 |
+ -DWITH_JPEG=$(usex jpeg ON OFF) |
273 |
+ -DWITH_LZO=$(usex lzo ON OFF) |
274 |
+ -DWITH_OPENSSL=$(usex gnutls OFF $(usex ssl ON OFF)) |
275 |
+ -DWITH_PNG=$(usex png ON OFF) |
276 |
+ -DWITH_SASL=$(usex sasl ON OFF) |
277 |
+ -DWITH_SYSTEMD=$(usex systemd ON OFF) |
278 |
+ -DWITH_THREADS=$(usex threads ON OFF) |
279 |
+ -DWITH_ZLIB=$(usex zlib ON OFF) |
280 |
+ ) |
281 |
+ cmake_src_configure |
282 |
+} |
283 |
|
284 |
diff --git a/net-libs/libvncserver/metadata.xml b/net-libs/libvncserver/metadata.xml |
285 |
new file mode 100644 |
286 |
index 0000000..09a7b34 |
287 |
--- /dev/null |
288 |
+++ b/net-libs/libvncserver/metadata.xml |
289 |
@@ -0,0 +1,26 @@ |
290 |
+<?xml version="1.0" encoding="UTF-8"?> |
291 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
292 |
+<pkgmetadata> |
293 |
+ <maintainer type="person" proxied="yes"> |
294 |
+ <email>alexander@××××.me</email> |
295 |
+ <name>Alexander Tsoy</name> |
296 |
+ </maintainer> |
297 |
+ <maintainer type="project" proxied="proxy"> |
298 |
+ <email>proxy-maint@g.o</email> |
299 |
+ <name>Proxy Maintainers</name> |
300 |
+ </maintainer> |
301 |
+ <longdescription> |
302 |
+ LibVNCServer/LibVNCClient are cross-platform C libraries that allow you |
303 |
+ to easily implement VNC server or client functionality in your program. |
304 |
+ </longdescription> |
305 |
+ <use> |
306 |
+ <flag name="24bpp">Enable 24bpp support</flag> |
307 |
+ <flag name="filetransfer">Enable support for TightVNC's file transfer protocol</flag> |
308 |
+ <flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> as crypto backend</flag> |
309 |
+ <flag name="lzo">Enable LZO support via <pkg>dev-libs/lzo</pkg> instead of using internal miniLZO implementation</flag> |
310 |
+ </use> |
311 |
+ <upstream> |
312 |
+ <remote-id type="github">LibVNC/libvncserver</remote-id> |
313 |
+ <remote-id type="sourceforge">libvncserver</remote-id> |
314 |
+ </upstream> |
315 |
+</pkgmetadata> |