pkgsrc-Changes archive

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

CVS commit: pkgsrc/www



Module Name:    pkgsrc
Committed By:   nat
Date:           Mon Jul 28 09:59:32 UTC 2025

Modified Files:
        pkgsrc/www/links: distinfo
        pkgsrc/www/links-gui: Makefile
        pkgsrc/www/links/patches: patch-x.c

Log Message:
Fix color selection for bit depths lower than 8bpp.
Most noticable with scrollbars and fix image display for 4bpp.

Bump PKG_REVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 pkgsrc/www/links/distinfo
cvs rdiff -u -r1.122 -r1.123 pkgsrc/www/links-gui/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/www/links/patches/patch-x.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/links/distinfo
diff -u pkgsrc/www/links/distinfo:1.87 pkgsrc/www/links/distinfo:1.88
--- pkgsrc/www/links/distinfo:1.87      Wed Jul 31 18:39:43 2024
+++ pkgsrc/www/links/distinfo   Mon Jul 28 09:59:31 2025
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.87 2024/07/31 18:39:43 nia Exp $
+$NetBSD: distinfo,v 1.88 2025/07/28 09:59:31 nat Exp $
 
 BLAKE2s (links-2.30.tar.bz2) = f03339bf8c581e1e328a0adc578f3b765f3a5acc834694c55ac0fbb5ea7f64e0
 SHA512 (links-2.30.tar.bz2) = 265f71fcd80a160b48b9572c4ca326c26a45032fbca69be3f3b6e60af136152daa22884e097ef719db950607425eb0e8c7f8714047f2476000301fd2b76c3806
 Size (links-2.30.tar.bz2) = 6569493 bytes
 SHA1 (patch-configure) = 38044f43a6985c50dd0275e9927dcc98a91dcc47
-SHA1 (patch-x.c) = 20302ed35c0e422ce6cd6867d7a5ee126d9a2d7e
+SHA1 (patch-x.c) = 3ef8b785609bcedc12a0982ec2408a245ef503f8

Index: pkgsrc/www/links-gui/Makefile
diff -u pkgsrc/www/links-gui/Makefile:1.122 pkgsrc/www/links-gui/Makefile:1.123
--- pkgsrc/www/links-gui/Makefile:1.122 Thu Apr 24 14:16:04 2025
+++ pkgsrc/www/links-gui/Makefile       Mon Jul 28 09:59:32 2025
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.122 2025/04/24 14:16:04 wiz Exp $
+# $NetBSD: Makefile,v 1.123 2025/07/28 09:59:32 nat Exp $
 
 PKGNAME=       ${DISTNAME:S/links/&-gui/}
-PKGREVISION=   6
+PKGREVISION=   7
 COMMENT=       Lynx-like text and graphics WWW browser
 
 USE_TOOLS+=            pkg-config

Index: pkgsrc/www/links/patches/patch-x.c
diff -u pkgsrc/www/links/patches/patch-x.c:1.4 pkgsrc/www/links/patches/patch-x.c:1.5
--- pkgsrc/www/links/patches/patch-x.c:1.4      Wed Apr 17 14:08:26 2024
+++ pkgsrc/www/links/patches/patch-x.c  Mon Jul 28 09:59:31 2025
@@ -1,10 +1,21 @@
-$NetBSD: patch-x.c,v 1.4 2024/04/17 14:08:26 nat Exp $
+$NetBSD: patch-x.c,v 1.5 2025/07/28 09:59:31 nat Exp $
 
 Fix display for all color depths lower than 8bpp.
+Fix image display for 4 color displays.
+Fix color selection for bit depths < 8.
 
---- x.c.orig   2024-04-12 21:04:10.197723954 +0000
+--- x.c.orig   2024-07-27 13:01:09.000000000 +0000
 +++ x.c
-@@ -1667,12 +1667,12 @@ static unsigned char *x_init_driver(unsi
+@@ -583,7 +583,7 @@ retry:
+       }
+ 
+       if (!some_valid) {
+-              if (vinfo.class == StaticColor) {
++              if (vinfo.class == StaticColor || vinfo.class == StaticGray) {
+                       return stracpy(cast_uchar "Could not query static colormap.\n");
+               } else {
+                       x_fill_color_table(static_color_map, X_STATIC_COLORS);
+@@ -1712,12 +1712,12 @@ static unsigned char *x_init_driver(unsi
  
        /* find best visual */
        {
@@ -20,7 +31,7 @@ Fix display for all color depths lower t
                                continue;
                        if (classes[b] == TrueColor && depths[a] <= 8)
                                continue;
-@@ -1700,11 +1700,13 @@ bytes_per_pixel_found:
+@@ -1745,11 +1745,13 @@ bytes_per_pixel_found:
                                /* test misordered flag */
                                /*debug("x_depth %d, x_bitmap_bpp %d %lx %lx %lx %s", x_depth, x_bitmap_bpp, vinfo.red_mask, vinfo.green_mask, vinfo.blue_mask, x_bitmap_bit_order == MSBFirst ? 
"MSBFirst" : "LSBFirst");*/
                                switch (x_depth) {
@@ -35,7 +46,7 @@ Fix display for all color depths lower t
                                                        misordered = 0;
                                                        goto visual_found;
                                                }
-@@ -1759,7 +1761,7 @@ visual_found:
+@@ -1804,7 +1806,7 @@ visual_found:
        x_driver.flags &= ~GD_SWITCH_PALETTE;
        x_have_palette = 0;
        x_use_static_color_table = 0;
@@ -44,7 +55,7 @@ Fix display for all color depths lower t
                if (x_depth > 8)
                        return stracpy(cast_uchar "Static color supported for up to 8-bit depth.\n");
                if ((err = x_query_palette()))
-@@ -2223,13 +2225,58 @@ static void x_translate_colors(unsigned 
+@@ -2293,13 +2295,58 @@ static void x_translate_colors(unsigned 
                return;
        }
  
@@ -79,7 +90,7 @@ Fix display for all color depths lower t
 +                      }
 +                      for (; i < x; i++) {
 +                              mypic[n] |= mypic[i];
-+                              mypic[n] << 2;
++                              mypic[n] <<= 2;
 +                      }
 +                      mypic += skip;
 +              }
@@ -104,3 +115,12 @@ Fix display for all color depths lower t
        }
  }
  
+@@ -2496,6 +2543,8 @@ static long x_get_color(int rgb)
+ 
+ static inline void x_set_color(long color)
+ {
++      if (x_depth < 8 && color >= (1 << x_depth))
++              color >>= 8 - x_depth;
+       if (color != x_normal_gc_color) {
+               x_normal_gc_color = color;
+               XSetForeground(x_display, x_normal_gc, color);



Home | Main Index | Thread Index | Old Index