summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-graphics/x11vnc')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch111
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch37
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/endian-fix.patch24
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch30
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch6
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.13.bb34
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb41
7 files changed, 222 insertions, 61 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 00000000..d44445fa
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,111 @@
+From 8ab672ccc67b64058cffac2cd19a0d3b75d5aa25 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 11:43:32 -0800
+Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Upstream-Status: Submitted [https://github.com/LibVNC/x11vnc/pull/117]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/uinput.c | 28 ++++++++++++++++++++++++----
+ 1 file changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/uinput.c b/src/uinput.c
+index 28fbad3..343b7c5 100644
+--- a/src/uinput.c
++++ b/src/uinput.c
+@@ -54,6 +54,11 @@ so, delete this exception statement from your version.
+ #include <linux/input.h>
+ #include <linux/uinput.h>
+
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #if !defined(EV_SYN) || !defined(SYN_REPORT)
+ #undef UINPUT_OK
+ #endif
+@@ -710,6 +715,7 @@ void parse_uinput_str(char *in) {
+ static void ptr_move(int dx, int dy) {
+ #ifdef UINPUT_OK
+ struct input_event ev;
++ struct timeval tval;
+ int d = direct_rel_fd < 0 ? fd : direct_rel_fd;
+
+ if (injectable && strchr(injectable, 'M') == NULL) {
+@@ -720,7 +726,9 @@ static void ptr_move(int dx, int dy) {
+
+ if (db) fprintf(stderr, "ptr_move(%d, %d) fd=%d\n", dx, dy, d);
+
+- gettimeofday(&ev.time, NULL);
++ gettimeofday(&tval, NULL);
++ ev.input_event_sec = tval.tv_sec;
++ ev.input_event_usec = tval.tv_usec;
+ ev.type = EV_REL;
+ ev.code = REL_Y;
+ ev.value = dy;
+@@ -755,6 +763,7 @@ static void apply_tslib(int *x, int *y) {
+ static void ptr_abs(int x, int y, int p) {
+ #ifdef UINPUT_OK
+ struct input_event ev;
++ struct timeval tval;
+ int x0, y0;
+ int d = direct_abs_fd < 0 ? fd : direct_abs_fd;
+
+@@ -773,7 +782,9 @@ static void ptr_abs(int x, int y, int p) {
+
+ if (db) fprintf(stderr, "ptr_abs(%d, %d => %d %d, p=%d) fd=%d\n", x0, y0, x, y, p, d);
+
+- gettimeofday(&ev.time, NULL);
++ gettimeofday(&tval, NULL);
++ ev.input_event_sec = tval.tv_sec;
++ ev.input_event_usec = tval.tv_usec;
+ ev.type = EV_ABS;
+ ev.code = ABS_Y;
+ ev.value = y;
+@@ -950,6 +961,7 @@ if (0) {usleep(100*1000) ;}
+ static void button_click(int down, int btn) {
+ #ifdef UINPUT_OK
+ struct input_event ev;
++ struct timeval tval;
+ int d = direct_btn_fd < 0 ? fd : direct_btn_fd;
+
+ if (injectable && strchr(injectable, 'B') == NULL) {
+@@ -959,7 +971,12 @@ static void button_click(int down, int btn) {
+ if (db) fprintf(stderr, "button_click: btn %d %s fd=%d\n", btn, down ? "down" : "up", d);
+
+ memset(&ev, 0, sizeof(ev));
+- gettimeofday(&ev.time, NULL);
++ gettimeofday(&tval, NULL);
++ gettimeofday(&tval, NULL);
++ ev.input_event_sec = tval.tv_sec;
++ ev.input_event_usec = tval.tv_usec;
++ ev.input_event_sec = tval.tv_sec;
++ ev.input_event_usec = tval.tv_usec;
+ ev.type = EV_KEY;
+ ev.value = down;
+
+@@ -1230,6 +1247,7 @@ void uinput_pointer_command(int mask, int x, int y, rfbClientPtr client) {
+ void uinput_key_command(int down, int keysym, rfbClientPtr client) {
+ #ifdef UINPUT_OK
+ struct input_event ev;
++ struct timeval tval;
+ int scancode;
+ allowed_input_t input;
+ int d = direct_key_fd < 0 ? fd : direct_key_fd;
+@@ -1253,7 +1271,9 @@ void uinput_key_command(int down, int keysym, rfbClientPtr client) {
+ if (db) fprintf(stderr, "uinput_key_command: %d -> %d %s fd=%d\n", keysym, scancode, down ? "down" : "up", d);
+
+ memset(&ev, 0, sizeof(ev));
+- gettimeofday(&ev.time, NULL);
++ gettimeofday(&tval, NULL);
++ ev.input_event_sec = tval.tv_sec;
++ ev.input_event_usec = tval.tv_usec;
+ ev.type = EV_KEY;
+ ev.code = (unsigned char) scancode;
+ ev.value = down;
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch
new file mode 100644
index 00000000..a15f3fe5
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch
@@ -0,0 +1,37 @@
+From 686491573827b98ba031adaa5da373366079d3d8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Dagenais?= <jeff.dagenais@gmail.com>
+Date: Mon, 11 Feb 2019 11:42:59 -0500
+Subject: [PATCH] misc/Makefile.am: don't install Xdummy when configured
+ --without-x
+
+Upstream-status: submitted https://github.com/jeff-dagenais/x11vnc/pull/1
+
+Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
+---
+ misc/Makefile.am | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/misc/Makefile.am b/misc/Makefile.am
+index c0b98c8..e4a22c1 100644
+--- a/misc/Makefile.am
++++ b/misc/Makefile.am
+@@ -18,7 +18,10 @@ EXTRA_DIST = \
+ uinput.pl \
+ ultravnc_repeater.pl \
+ vcinject.pl \
+- x11vnc_loop \
++ x11vnc_loop
++
++if HAVE_X11
++EXTRA_DIST += \
+ Xdummy.c \
+ Xdummy.in
+
+@@ -32,3 +35,4 @@ do_dummy_c_subst = $(SED) \
+ Xdummy: $(srcdir)/Xdummy.in $(srcdir)/Xdummy.c
+ $(do_dummy_c_subst) < $< > $@.tmp
+ mv -f $@.tmp $@
++endif
+--
+2.17.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/endian-fix.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/endian-fix.patch
deleted file mode 100644
index f2a538bf..00000000
--- a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/endian-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-libvncserver: replace LIBVNCSERVER_WORDS_BIGENDIAN with WORDS_BIGENDIAN
-
-since macro AC_C_BIGENDIAN is used in autoconf and WORDS_BIGENDIAN is
-automatically set for different arch, it is better to use WORDS_BIGENDIAN
-instead of LIBVNCSERVER_WORDS_BIGENDIAN, which cuase issue in mips.
-
-Signed-off-by: Yu Ke <ke.yu@intel.com>
-
-Upstream-Status: Pending
-
-diff --git a/libvncserver/main.c b/libvncserver/main.c
-index b6bd930..8bbb7bf 100644
---- a/libvncserver/main.c
-+++ b/libvncserver/main.c
-@@ -47,7 +47,7 @@ static MUTEX(extMutex);
-
- static int rfbEnableLogging=1;
-
--#ifdef LIBVNCSERVER_WORDS_BIGENDIAN
-+#ifdef WORDS_BIGENDIAN
- char rfbEndianTest = (1==0);
- #else
- char rfbEndianTest = (1==1);
-
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch
new file mode 100644
index 00000000..a571ba28
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch
@@ -0,0 +1,30 @@
+From 95a10ab64c2dbbec2c8dad91a5ffb73a0d68474b Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Mon, 16 Mar 2020 20:04:06 +1100
+Subject: [PATCH] src/cursor: fix xfc NULL pointer dereference
+
+xfc->width and xfc->height for the XFixes cursor image returned from
+XFixesGetCursorImage(dpy) are accessed without first checking that xfc
+is not NULL. This can result in the server sometimes crashing when
+moving a Google Chrome window.
+
+Fixes: 37c946191a0f ("Broken cursor bugfix for 64 bit systems (#49)")
+Upstream-Status: Accepted
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ src/cursor.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cursor.c b/src/cursor.c
+index 39e73a6..74a08c6 100644
+--- a/src/cursor.c
++++ b/src/cursor.c
+@@ -1311,7 +1311,7 @@ static int get_exact_cursor(int init) {
+
+ /* retrieve the cursor info + pixels from server: */
+ xfc = XFixesGetCursorImage(dpy);
+- {
++ if (xfc) {
+ /* 2017-07-09, Stephan Fuhrmann: This fixes an implementation flaw for 64 bit systems.
+ * The XFixesCursorImage structure says xfc->pixels is (unsigned long*) in the structure, but
+ * the protocol spec says it's 32 bit per pixel
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch
index f62e405d..060319c7 100644
--- a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch
+++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch
@@ -10,10 +10,10 @@ Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Upstream-Status: Inappropriate [configuration]
-Index: x11vnc-0.9.12/x11vnc/x11vnc.desktop
+Index: x11vnc-0.9.12/x11vnc.desktop
===================================================================
---- x11vnc-0.9.12.orig/x11vnc/x11vnc.desktop 2011-03-03 10:33:18.000000000 +0800
-+++ x11vnc-0.9.12/x11vnc/x11vnc.desktop 2011-03-03 10:35:20.000000000 +0800
+--- x11vnc-0.9.12.orig/x11vnc.desktop 2011-03-03 10:33:18.000000000 +0800
++++ x11vnc-0.9.12/x11vnc.desktop 2011-03-03 10:35:20.000000000 +0800
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=X11VNC Server
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.13.bb b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.13.bb
deleted file mode 100644
index b047bc46..00000000
--- a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.13.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Exports your X session on-the-fly via VNC"
-HOMEPAGE = "http://www.karlrunge.com/x11vnc/"
-
-SECTION = "x11/utils"
-AUTHOR = "Karl Runge"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=361b6b837cad26c6900a926b62aada5f \
- file://x11vnc/x11vnc.h;endline=33;md5=6f95dc6535467d7ee1563fd434fb372e"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/x11vnc/${PV}/x11vnc-${PV}.tar.gz\
- file://starting-fix.patch \
- file://endian-fix.patch \
- file://remove-redundant-RPATH.patch \
-"
-
-SRC_URI[md5sum] = "a372ec4fe8211221547b1c108cf56e4c"
-SRC_URI[sha256sum] = "f6829f2e629667a5284de62b080b13126a0736499fe47cdb447aedb07a59f13b"
-
-DEPENDS = "openssl virtual/libx11 libxext jpeg zlib libxfixes libxrandr libxdamage libxtst libtasn1 p11-kit"
-
-inherit autotools-brokensep distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} libvncserver"
-PACKAGECONFIG[avahi] = "--with-avahi,--without-avahi,avahi"
-PACKAGECONFIG[xinerama] = "--with-xinerama,--without-xinerama,libxinerama"
-PACKAGECONFIG[libvncserver] = "--with-system-libvncserver,--without-system-libvncserver,libvncserver"
-
-do_prepare_sources () {
- # Remove old libtool macros from acinclude.m4
- sed -i -e '/^# libtool.m4/q' ${S}/acinclude.m4
-}
-do_patch[postfuncs] += "do_prepare_sources"
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
new file mode 100644
index 00000000..e3a1914f
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Exports your X session or FrameBuffer(fbdev) on-the-fly via VNC"
+HOMEPAGE = "http://www.karlrunge.com/x11vnc/"
+
+SECTION = "x11/utils"
+AUTHOR = "Karl Runge"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/x11vnc.h;endline=31;md5=e871a2ad004776794b616822dcab6314"
+
+SRCREV = "4ca006fed80410bd9b061a1519bd5d9366bb0bc8"
+SRC_URI = "git://github.com/LibVNC/x11vnc \
+ file://starting-fix.patch \
+ file://0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch \
+ file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+ file://src-cursor-fix-xfc-NULL-pointer-dereference.patch \
+ "
+S = "${WORKDIR}/git"
+
+DEPENDS = "\
+ jpeg \
+ libtasn1 \
+ libvncserver \
+ openssl \
+ p11-kit \
+ zlib \
+"
+
+inherit pkgconfig autotools features_check
+
+ANY_OF_DISTRO_FEATURES = "x11 fbdev"
+
+PACKAGECONFIG ??= "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
+"
+
+PACKAGECONFIG[avahi] = "--with-avahi,--without-avahi,avahi"
+PACKAGECONFIG[xinerama] = "--with-xinerama,--without-xinerama,libxinerama"
+PACKAGECONFIG[x11] = "--with-x,--without-x, libxdamage libxext libxfixes libxrandr libxtst virtual/libx11"
+
+RRECOMMENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'fbdev', 'kernel-module-uinput', '', d)}"