pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/mlterm x11/mlterm: Fix color of sixel image on X s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/144b4cbd9406
branches:  trunk
changeset: 381201:144b4cbd9406
user:      rin <rin%pkgsrc.org@localhost>
date:      Sat Jul 02 03:17:04 2022 +0000

description:
x11/mlterm: Fix color of sixel image on X server of opposite byte-order.

This patch has been pull-requested to upstream:
https://github.com/arakiken/mlterm/pull/45

Bump revision.

diffstat:

 x11/mlterm/Makefile                                    |   4 +-
 x11/mlterm/distinfo                                    |   3 +-
 x11/mlterm/patches/patch-uitoolkit_xlib_ui__imagelib.c |  45 ++++++++++++++++++
 3 files changed, 49 insertions(+), 3 deletions(-)

diffs (77 lines):

diff -r b8a21b633c80 -r 144b4cbd9406 x11/mlterm/Makefile
--- a/x11/mlterm/Makefile       Sat Jul 02 03:11:43 2022 +0000
+++ b/x11/mlterm/Makefile       Sat Jul 02 03:17:04 2022 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.170 2022/04/18 19:12:24 adam Exp $
+# $NetBSD: Makefile,v 1.171 2022/07/02 03:17:04 rin Exp $
 
 DISTNAME=      mlterm-3.9.2
 DIST_SUBDIR=   ${PKGNAME_NOREV}        # for re-tagged 3.9.2
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    x11
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=arakiken/}
 GITHUB_PROJECT= ${PKGBASE}
diff -r b8a21b633c80 -r 144b4cbd9406 x11/mlterm/distinfo
--- a/x11/mlterm/distinfo       Sat Jul 02 03:11:43 2022 +0000
+++ b/x11/mlterm/distinfo       Sat Jul 02 03:17:04 2022 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.90 2022/01/18 14:38:34 tsutsui Exp $
+$NetBSD: distinfo,v 1.91 2022/07/02 03:17:04 rin Exp $
 
 BLAKE2s (mlterm-3.9.2/mlterm-3.9.2.tar.gz) = 3bd490eb661bc802cb05ebbb17a73956f5a62ca3838dcf5cb7baad0c01c3ebdb
 SHA512 (mlterm-3.9.2/mlterm-3.9.2.tar.gz) = 3076dafbc98a01738d88acf0e0f52e15d33862b3e9b7a851a4496f1be07ee9e51103daf7842954bcae1f1ba62bd6645b0bd60af7f66ee98721bdf3786b9fcbaf
 Size (mlterm-3.9.2/mlterm-3.9.2.tar.gz) = 4259208 bytes
 SHA1 (patch-configure) = 266b3e8383c425c7ef8cd180f07e1199890521ba
 SHA1 (patch-etc_font-fb) = 52c18f512c67ff530c0c326394fdf43956d71cb0
+SHA1 (patch-uitoolkit_xlib_ui__imagelib.c) = 310558eb0796486aa1d2acab2c9e9a2d204ce0f0
 SHA1 (patch-vtemu_Makefile.in) = 172f12f73408489f782d63c8b0b7915af441d368
diff -r b8a21b633c80 -r 144b4cbd9406 x11/mlterm/patches/patch-uitoolkit_xlib_ui__imagelib.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/mlterm/patches/patch-uitoolkit_xlib_ui__imagelib.c    Sat Jul 02 03:17:04 2022 +0000
@@ -0,0 +1,45 @@
+$NetBSD: patch-uitoolkit_xlib_ui__imagelib.c,v 1.3 2022/07/02 03:17:04 rin Exp $
+
+Fix color of sixel image on X server whose byte-order is opposite to client.
+
+This patch has been pull-requested to upstream:
+https://github.com/arakiken/mlterm/pull/45
+
+--- uitoolkit/xlib/ui_imagelib.c.orig  2022-07-02 10:56:15.200011767 +0900
++++ uitoolkit/xlib/ui_imagelib.c       2022-07-02 10:58:10.298442685 +0900
+@@ -580,6 +580,11 @@ static int load_sixel(ui_display_t *disp
+   image = XCreateImage(disp->display, disp->visual, disp->depth, ZPixmap, 0, data, w, h,
+                        /* in case depth isn't multiple of 8 */
+                        bytes_per_pixel * 8, w * bytes_per_pixel);
++#ifdef WORDS_BIGENDIAN
++  image->byte_order = MSBFirst;
++#else
++  image->byte_order = LSBFirst;
++#endif
+ 
+   *pixmap = XCreatePixmap(disp->display, ui_display_get_group_leader(disp), w, h, disp->depth);
+ 
+@@ -944,6 +949,11 @@ static XImage *pixbuf_to_ximage_truecolo
+ 
+     return NULL;
+   }
++#ifdef WORDS_BIGENDIAN
++  image->byte_order = MSBFirst;
++#else
++  image->byte_order = LSBFirst;
++#endif
+ 
+   /* set num of bytes per pixel of pixbuf */
+   bytes_per_pixel = (gdk_pixbuf_get_has_alpha(pixbuf)) ? 4 : 3;
+@@ -1617,6 +1627,11 @@ Pixmap ui_imagelib_get_transparent_backg
+ 
+       return None;
+     }
++#ifdef WORDS_BIGENDIAN
++    image->byte_order = MSBFirst;
++#else
++    image->byte_order = LSBFirst;
++#endif
+ 
+     vinfo_template.visualid =
+         XVisualIDFromVisual(DefaultVisual(win->disp->display, DefaultScreen(win->disp->display)));



Home | Main Index | Thread Index | Old Index