From 3149532ff14c6b5d4e00e9458a39daae60b07fca Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Thu, 4 Jul 2024 11:45:49 +0200 Subject: [PATCH] package/rdesktop: update the patches to be applied with fuzz 0 Commit 8f88a644ed "support/scripts/apply-patches.sh: set the maximum fuzz factor to 0" reduced the fuzz factor. Due to this change, rdesktop fails to build with output: Applying 0001-8bit-colors.patch using patch: patching file xwin.c Hunk #1 succeeded at 1801 (offset 340 lines). Hunk #2 FAILED at 1568. 1 out of 2 hunks FAILED -- saving rejects to file xwin.c.rej This commit refreshes the package patches on the current package version. The original patch was not generated with "git format-patch", and had no information (no commit log, no author, no date, ...). Since it was introduced in commit [1], the author and date is set to this commit. The "Upstream:" tag is also added to the patch, mentioning the upstream project is reported as unmaintained on its homepage (at the time of this commit). Finally, the ".checkpackageignore" entry is removed, since it is no longer needed. [1] https://gitlab.com/buildroot.org/buildroot/-/commit/e2dde9c7cdc2f9ed851acfb7daa858ffa1744246 Signed-off-by: Julien Olivain Signed-off-by: Romain Naour --- .checkpackageignore | 1 - package/rdesktop/0001-8bit-colors.patch | 21 ---------- .../rdesktop/0001-Allow-8-bit-colors.patch | 38 +++++++++++++++++++ 3 files changed, 38 insertions(+), 22 deletions(-) delete mode 100644 package/rdesktop/0001-8bit-colors.patch create mode 100644 package/rdesktop/0001-Allow-8-bit-colors.patch diff --git a/.checkpackageignore b/.checkpackageignore index 69b8dece38..63a27410ca 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -1226,7 +1226,6 @@ package/quotatool/0001-fix-missing-__P-definition-for-musl-compile.patch lib_pat package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch lib_patch.Upstream package/rapidxml/0001-ensure-internal-print-operations-are-declared-before.patch lib_patch.Upstream package/raspberrypi-usbboot/0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch lib_patch.Upstream -package/rdesktop/0001-8bit-colors.patch lib_patch.Sob lib_patch.Upstream package/read-edid/0001-Fix-install-file-list.patch lib_patch.Upstream package/read-edid/0002-Fix-compiler-check.patch lib_patch.Upstream package/read-edid/0003-fix-build-with-gcc-10.patch lib_patch.Upstream diff --git a/package/rdesktop/0001-8bit-colors.patch b/package/rdesktop/0001-8bit-colors.patch deleted file mode 100644 index 710f8debef..0000000000 --- a/package/rdesktop/0001-8bit-colors.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -urpN rdesktop-1.5.0-orig/xwin.c rdesktop-1.5.0/xwin.c ---- rdesktop-1.5.0-orig/xwin.c 2007-01-17 12:01:18.000000000 +0100 -+++ rdesktop-1.5.0/xwin.c 2007-01-17 12:05:02.000000000 +0100 -@@ -1461,7 +1461,7 @@ select_visual(int screen_num) - } - - /* we use a colourmap, so the default visual should do */ -- g_owncolmap = True; -+// g_owncolmap = True; - g_visual = vmatches[0].visual; - g_depth = vmatches[0].depth; - } -@@ -1568,7 +1568,7 @@ ui_init(void) - { - g_xcolmap = - XCreateColormap(g_display, RootWindowOfScreen(g_screen), g_visual, -- AllocNone); -+ (g_depth <= 8) ? AllocAll : AllocNone); - if (g_depth <= 8) - warning("Display colour depth is %d bit: you may want to use -C for a private colourmap.\n", g_depth); - } diff --git a/package/rdesktop/0001-Allow-8-bit-colors.patch b/package/rdesktop/0001-Allow-8-bit-colors.patch new file mode 100644 index 0000000000..0c2b820a45 --- /dev/null +++ b/package/rdesktop/0001-Allow-8-bit-colors.patch @@ -0,0 +1,38 @@ +From 2159684f1287b6bca2bd74c129b752a636ee807f Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 17 Jan 2007 13:58:01 +0000 +Subject: [PATCH] Allow 8-bit colors + +Upstream: Reported as unmaintained on homepage http://www.rdesktop.org/ +Signed-off-by: Peter Korsgaard +[Julien: refreshed the patch to be applied with fuzz factor 0] +Signed-off-by: Julien Olivain +--- + xwin.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xwin.c b/xwin.c +index d96d0f4..d11f4a6 100644 +--- a/xwin.c ++++ b/xwin.c +@@ -1801,7 +1801,7 @@ select_visual(int screen_num) + } + + /* we use a colourmap, so the default visual should do */ +- g_owncolmap = True; ++// g_owncolmap = True; + g_visual = vmatches[0].visual; + g_depth = vmatches[0].depth; + } +@@ -2010,7 +2010,7 @@ ui_init(void) + { + g_xcolmap = + XCreateColormap(g_display, RootWindowOfScreen(g_screen), g_visual, +- AllocNone); ++ (g_depth <= 8) ? AllocAll : AllocNone); + if (g_depth <= 8) + logger(GUI, Warning, + "Display colour depth is %d bit: you may want to use -C for a private colourmap", +-- +2.45.2 +