commit:     c1df34700f5d2deec94934df567e81733cb75a61
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Apr 23 00:54:12 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Apr 23 00:54:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=c1df3470

x11-misc/x11vnc: add 0.9.16-r8

Upstream-PR: https://github.com/LibVNC/x11vnc/pull/224
Signed-off-by: orbea <orbea <AT> riseup.net>

 ...1vnc-0.9.16-implicit-function-declaration.patch | 26 ++++++++
 x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch | 20 +++----
 x11-misc/x11vnc/files/x11vnc.init.d                | 70 ----------------------
 x11-misc/x11vnc/files/x11vnc.init.d-r1             |  8 +--
 ...nc-0.9.16-r7.ebuild => x11vnc-0.9.16-r8.ebuild} |  5 +-
 5 files changed, 43 insertions(+), 86 deletions(-)

diff --git 
a/x11-misc/x11vnc/files/x11vnc-0.9.16-implicit-function-declaration.patch 
b/x11-misc/x11vnc/files/x11vnc-0.9.16-implicit-function-declaration.patch
new file mode 100644
index 0000000..c6d1c49
--- /dev/null
+++ b/x11-misc/x11vnc/files/x11vnc-0.9.16-implicit-function-declaration.patch
@@ -0,0 +1,26 @@
+From 351d27d4a846e3d0e5c724e067f44b52e04402f1 Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <[email protected]>
+Date: Mon, 6 Mar 2023 00:57:20 +0300
+Subject: [PATCH] Drop AC_FUNC_STAT macro
+
+This macro is obsolescent and doesn't work with
+-Werror=implicit-function-declaration compiler flag
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6b62ac5..5a386db 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -474,7 +474,6 @@ if test $inaddrt = no ; then
+ fi
+ # Checks for library functions.
+ AC_FUNC_MEMCMP
+-AC_FUNC_STAT
+ AC_FUNC_STRFTIME
+ AC_FUNC_VPRINTF
+ AC_FUNC_FORK
+-- 
+2.39.2
+

diff --git a/x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch 
b/x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch
index cad9f5e..0f86d05 100644
--- a/x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch
+++ b/x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch
@@ -1,25 +1,25 @@
-Upstream-PR: https://github.com/LibVNC/x11vnc/pull/202
+https://github.com/LibVNC/x11vnc/pull/224
 
-From d81e9d8e56ccc1b346b5aeb4b64fa0a32737c22d Mon Sep 17 00:00:00 2001
 From: orbea <[email protected]>
-Date: Tue, 5 Jul 2022 08:57:29 -0700
-Subject: [PATCH] Support LibreSSL
+Date: Tue, 11 Apr 2023 09:35:26 -0700
+Subject: [PATCH] sslhelper: Update for LibreSSL >= 3.6.0
 
-This builds with LibreSSL 3.5.x.
+Since LibreSSL 3.6.0 SSL_CTX_set_security_level() has been available.
 ---
- src/sslhelper.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ src/sslhelper.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/sslhelper.c b/src/sslhelper.c
-index ba680b35..bd5ef0fb 100644
+index 04c2e27..4608750 100644
 --- a/src/sslhelper.c
 +++ b/src/sslhelper.c
-@@ -1596,7 +1596,7 @@ static int switch_to_anon_dh(void) {
+@@ -1596,7 +1596,8 @@ static int switch_to_anon_dh(void) {
        if (ssl_client_mode) {
                return 1;
        }
 -#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && 
!defined(LIBRESSL_VERSION_NUMBER)) || \
++      (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER >= 
0x3060000fL))
        /* Security level must be set to 0 for unauthenticated suites. */
        SSL_CTX_set_security_level(ctx, 0);
  #endif

diff --git a/x11-misc/x11vnc/files/x11vnc.init.d 
b/x11-misc/x11vnc/files/x11vnc.init.d
deleted file mode 100644
index b6b16da..0000000
--- a/x11-misc/x11vnc/files/x11vnc.init.d
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="The x11vnc daemon init script"
-
-depend() {
-       need net
-       need xdm
-}
-
-checkconfig() {
-
-       # Set Defaults
-       X11VNC_RFBAUTH=${X11VNC_RFBAUTH:-/etc/x11vnc.pass}
-       X11VNC_RFBPORT=${X11VNC_RFBPORT:-5900}
-       X11VNC_DISPLAY=${X11VNC_DISPLAY:-:0}
-       X11VNC_LOG=${X11VNC_LOG:-/var/log/x11vnc}
-       
-       X11VNC_AUTH="/var/run/x11vnc-${X11VNC_DISPLAY}" 
-
-       if [ -n "${X11VNC_AUTOPORT}" ]; then
-               X11VNC_PORT=""
-       fi
-
-       if [ ! -f "${X11VNC_RFBAUTH}" -o ! -s "${X11VNC_RFBAUTH}" ]; then
-               eerror "VNC Password not set, please set one by running: 
\`x11vnc -storepasswd ${X11VNC_RFBAUTH}\`"
-               return 1
-       fi
-       checkpath -q -f -m 0600 -o root:root "${X11VNC_RFBAUTH}"
-
-       # Attempt to find X-Auth file
-       if ! type xauth > /dev/null 2>&1 ||
-                       ! xauth -f /root/.Xauthority extract - 
"${X11VNC_DISPLAY}" > "${X11VNC_AUTH}" 2>/dev/null ||
-                       [ ! -s "${X11VNC_AUTH}" ]; then
-               # Let x11vnc guess at auth
-               X11VNC_AUTH_OPTS="--env FD_XDM=1 -auth guess"
-       else
-               # We found the proper auth
-               X11VNC_AUTH_OPTS="-auth ${X11VNC_AUTH}"
-       fi
-
-       if [ ! -f "${X11VNC_AUTH}" ]; then
-               eerror "Specified X-Authority file '${X11VNC_AUTH}' not found!"
-               return 1
-       fi      
-}
-
-start() {
-       checkconfig || return 1
-
-       ebegin "Starting ${SVCNAME}"
-       start-stop-daemon --start \
-               --exec /usr/bin/x11vnc -- \
-                       ${X11VNC_AUTH_OPTS} \
-                       -rfbauth ${X11VNC_RFBAUTH} \
-                       ${X11VNC_RFBPORT:+-rfbport} ${X11VNC_RFBPORT} \
-                       ${X11VNC_AUTOPORT:+-autoport} ${X11VNC_AUTOPORT} \
-                       -display ${X11VNC_DISPLAY} \
-                       -o ${X11VNC_LOG} \
-                       -bg -forever \
-                       ${X11VNC_OPTS}
-       eend $?
-}
-
-stop() {
-       ebegin "Stopping ${SVCNAME}"
-       start-stop-daemon --stop /usr/bin/x11vnc
-       eend $?
-}

diff --git a/x11-misc/x11vnc/files/x11vnc.init.d-r1 
b/x11-misc/x11vnc/files/x11vnc.init.d-r1
index 04c36ea..8907b38 100644
--- a/x11-misc/x11vnc/files/x11vnc.init.d-r1
+++ b/x11-misc/x11vnc/files/x11vnc.init.d-r1
@@ -16,8 +16,8 @@ checkconfig() {
        X11VNC_RFBPORT=${X11VNC_RFBPORT:-5900}
        X11VNC_DISPLAY=${X11VNC_DISPLAY:-:0}
        X11VNC_LOG=${X11VNC_LOG:-/var/log/x11vnc}
-       
-       X11VNC_AUTH="/var/run/x11vnc-${X11VNC_DISPLAY}" 
+
+       X11VNC_AUTH="/var/run/x11vnc-${X11VNC_DISPLAY}"
 
        if [ -n "${X11VNC_AUTOPORT}" ]; then
                X11VNC_PORT=""
@@ -30,7 +30,7 @@ checkconfig() {
        checkpath -q -f -m 0600 -o root:root "${X11VNC_RFBAUTH}"
 
        # Attempt to find X-Auth file
-       if ! type xauth > /dev/null 2>&1 ||
+       if ! command -v xauth > /dev/null 2>&1 ||
                        ! xauth -f /root/.Xauthority extract - 
"${X11VNC_DISPLAY}" > "${X11VNC_AUTH}" 2>/dev/null ||
                        [ ! -s "${X11VNC_AUTH}" ]; then
                # Let x11vnc guess at auth
@@ -43,7 +43,7 @@ checkconfig() {
        if [ ! -f "${X11VNC_AUTH}" ]; then
                eerror "Specified X-Authority file '${X11VNC_AUTH}' not found!"
                return 1
-       fi      
+       fi
 }
 
 start() {

diff --git a/x11-misc/x11vnc/x11vnc-0.9.16-r7.ebuild 
b/x11-misc/x11vnc/x11vnc-0.9.16-r8.ebuild
similarity index 95%
rename from x11-misc/x11vnc/x11vnc-0.9.16-r7.ebuild
rename to x11-misc/x11vnc/x11vnc-0.9.16-r8.ebuild
index 9ce245d..eaaef2f 100644
--- a/x11-misc/x11vnc/x11vnc-0.9.16-r7.ebuild
+++ b/x11-misc/x11vnc/x11vnc-0.9.16-r8.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools
 
@@ -44,6 +44,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-libressl.patch
        "${FILESDIR}"/${P}-fno-common.patch
        "${FILESDIR}"/${P}-CVE-2020-29074.patch
+       "${FILESDIR}"/${P}-implicit-function-declaration.patch
 )
 
 src_prepare() {

Reply via email to