mirror of
https://github.com/gryf/gryf-overlay.git
synced 2025-12-25 07:32:30 +01:00
Added patched version of rxvt-unicode 9.22.
This commit is contained in:
11
x11-terms/rxvt-unicode/Manifest
Normal file
11
x11-terms/rxvt-unicode/Manifest
Normal file
@@ -0,0 +1,11 @@
|
||||
AUX rxvt-unicode-9.06-case-insensitive-fs.patch 238 BLAKE2B 887eec8ec419900765ede1a8b75ea0acde945275af0e524e4382610a40d1e42b2f0be9879bf7c25cb00da6ae410e554567efdcc2f43ceff52e37c44060e6c4a7 SHA512 5257b1d33e25a6a390da2f23100fc3a2b8dcc4787205273933c2ba64ecf72e663cdc0cb86273a1ffa1a87b04bbeeff9edbc8c028c521ae612722f21cf6c40762
|
||||
AUX rxvt-unicode-9.21-xsubpp.patch 640 BLAKE2B 51b9f626436153239ca98df1094c5bbadaca463cf3624d39094cf5dce75a42c23568584292cd55b891439a45bc7d9e3fbf098ec80743b44267e6c3c1d0b339ca SHA512 70f4c5cb7b6a440f009f693c4dc2f8595051e198250d375cd18704c35059596d77938a3d062740bd26f947bfebdb67ea7d46f59f8cbf08fc73193a62267723ec
|
||||
AUX rxvt-unicode-9.22-add-space-to-extent_test_chars.patch 662 BLAKE2B a8b177701531b071152a51f56f942741ed8b95e9e367012b898c64625e9b226a8ee8396d552b4794a285f42f3981fb5a4c08bad1b3aef07e761cafbbedf4326e SHA512 e28da6449d273b855eeacb4605e19b34f245acc34a82fe2be6505c27f0f4fc1e56410160256871444e4b95f5f61da67ac705d1742df773a1f596440c71915bce
|
||||
AUX rxvt-unicode-9.22-enable-wide-glyphs.patch 10182 BLAKE2B ed535140ffda4a870c1d058e26d7552c85a19860d8239d0140d8ddee76645ddc9a992d8d94551338c8ba581d14277af1cb3f4524755519ea144c5819a4c9f12e SHA512 30a419f699807408f34638e202df8390546f247de9c4f4c9b4e8872287c3379b7a75e57b706c2497ac143e3e791906a9d733931767d3a9aa354619a8fe6ac0f9
|
||||
AUX rxvt-unicode-9.22-font-width-fix.patch 993 BLAKE2B 40a35433bb78cdec5c6469f9a0d80b608dba39c6ecbb57bcc9bf9999e4ae071793bf843f3efaeef5d0947c8b5f0b8334db3a235d0b3d9db0cd6bf3fba0d408ec SHA512 dd468475ec2eefd36616b59563306cbb1779c9b9634c9bdc8a5119a82a6b6ceeecdb560cc20543cf9ab13feb6dbd621ea7d40b72c598245da630890b73a2e99f
|
||||
AUX rxvt-unicode-9.22-line-spacing-fix.patch 1875 BLAKE2B 4069b20fb1fc5f3e97e9d6f03ca92c6e28ea086de341e3e835d7e059d398cbf97b44f97f4440bf5d573d7dbe7362de57d67ff3173b25aae17ab43186bb15c38f SHA512 2803c48b8e581136000e324a97ddc30b9a1188267717ef47b285d3814a8ed4a68345cc5aeb63f6795bede73349cbdfe8cf11c41b4fa1f413035c39b568503efe
|
||||
AUX rxvt-unicode-9.22-sgr-mouse-mode-flag.patch 5613 BLAKE2B 28cf8af70841027ba254704b3bb94e2bcf7f8f6743963056c046279aeef4fc8f866711144880ac6a3ad6acd4ed86332f497dff905f3836775579ba5e90328218 SHA512 b6bf180cd25f46fd22841aa8322839886712312341950e3abeeec1a44d73bbec8e7467ce09878c84b86263ab7067443529a89f017e54dceb84b189477e58f10e
|
||||
AUX urxvtd.service 145 BLAKE2B 9199c81f02ff161caf6f72bac95808d4ba584bf09fb68cf7fef1bdf883873fe360816d8736835987a61c1cf0ac1be469aa47f2b74e96d8215a3ac17de896d6a5 SHA512 a77606d11e80c8d117917ab34a6d2ca430c667372ee713cf8519e49df4d972f289399d49bd808a9d31fa343d11c2fd2eb761b813be3f2892784d1dd9c281fc38
|
||||
DIST rxvt-unicode-9.22.tar.bz2 931198 BLAKE2B ea9a12e4a8396ed6be12b4d50ae260a0376902dbd47b0628bb14ce0509c5d89f5a80370b413fdb9df9b8b81728ec26e115cbf0d88ab6e9cb2a87b03b5d79c432 SHA512 b39f1b2cbe6dd3fbd2a0ad6a9d391a2b6f49d7c5e67bc65fe44a9c86937f8db379572c67564c6e21ff6e09b447cdfd4e540544e486179e94da0e0db679c04dd9
|
||||
DIST rxvt-unicode-9.22_24-bit-color_cpixl-20201108.patch.xz 8116 BLAKE2B 27940ad42ee3f26c357a50b7fae1e1539acec71f5ff43e7ed16167d0adb175c4de20ba84880f25eec0817703d937d097fda228541d16511811efe5816109e71b SHA512 2b8bbb90c6bb223f622c1e99d62a70a812604d1f8e57cea37a8faf0af578588d3888ea8009568d623710cc03e020a69269770e23476fd9ff9e46dbd9ea23f540
|
||||
EBUILD rxvt-unicode-9.22-r10.ebuild 3350 BLAKE2B 75e69a1276d1ede1263ef046eba9c1a2cc86e78e3bc17d0441814d088d1f4bc560b9cca256aba88369fe3c4dd17e5593d6cc0ae193944d1596522c0712962819 SHA512 7b821e69795b761835952bf157c4ead5f0b4750e69bcab721ecf2f8dc2916f812721a2bf8d8386a5a87a084791fe341533bf4dad64f1c874b88edf025d7e8c2e
|
||||
@@ -0,0 +1,10 @@
|
||||
Avoid "make: `install' is up to date." on case insensitive filesystems
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -86,3 +86,5 @@
|
||||
dist: tar.bz2
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
+
|
||||
+.PHONY: install
|
||||
11
x11-terms/rxvt-unicode/files/rxvt-unicode-9.21-xsubpp.patch
Normal file
11
x11-terms/rxvt-unicode/files/rxvt-unicode-9.21-xsubpp.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -136,7 +136,7 @@
|
||||
$(PERL) -MExtUtils::Embed -e xsinit -- -std urxvt
|
||||
|
||||
rxvtperl.C: rxvtperl.xs iom_perl.h iom_perl.xs typemap typemap.iom
|
||||
- PERL="$(PERL)" $(PERL) @PERLPRIVLIBEXP@/ExtUtils/xsubpp -C++ -typemap @PERLPRIVLIBEXP@/ExtUtils/typemap -typemap 'typemap.iom' -typemap 'typemap' -prototypes $(srcdir)/rxvtperl.xs >$@
|
||||
+ PERL="$(PERL)" $(PERL) /usr/bin/xsubpp -C++ -typemap @PERLPRIVLIBEXP@/ExtUtils/typemap -typemap 'typemap.iom' -typemap 'typemap' -prototypes $(srcdir)/rxvtperl.xs >$@
|
||||
|
||||
rxvtperl.o: rxvtperl.C perlxsi.c
|
||||
$(COMPILE) $(PERLFLAGS) -DLIBDIR="\"$(libdir)/urxvt\"" -c $<
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C rxvt-unicode-9.22-b/src/rxvtfont.C
|
||||
--- rxvt-unicode-9.22-a/src/rxvtfont.C 2021-01-26 13:41:32.889882053 +0100
|
||||
+++ rxvt-unicode-9.22-b/src/rxvtfont.C 2021-01-26 13:43:25.909883427 +0100
|
||||
@@ -155,7 +155,7 @@
|
||||
// these characters are used to guess the font height and width
|
||||
// pango uses a similar algorithm and doesn't trust the font either.
|
||||
static uint16_t extent_test_chars[] = {
|
||||
- '0', '1', '8', 'a', 'd', 'x', 'm', 'y', 'g', 'W', 'X', '\'', '_',
|
||||
+ ' ', '0', '1', '8', 'a', 'd', 'x', 'm', 'y', 'g', 'W', 'X', '\'', '_',
|
||||
0x00cd, 0x00d5, 0x0114, 0x0177, 0x0643, // ÍÕĔŷﻙ
|
||||
0x304c, 0x672c, // が本
|
||||
};
|
||||
@@ -0,0 +1,300 @@
|
||||
diff -ur rxvt-unicode-9.22-a/config.h.in rxvt-unicode-9.22-b/config.h.in
|
||||
--- rxvt-unicode-9.22-a/config.h.in 2015-06-17 13:57:42.000000000 +0200
|
||||
+++ rxvt-unicode-9.22-b/config.h.in 2021-01-26 13:41:32.889882053 +0100
|
||||
@@ -18,6 +18,9 @@
|
||||
/* Define if you want your background to use the parent window background */
|
||||
#undef ENABLE_TRANSPARENCY
|
||||
|
||||
+/* Define if you want to display wide glyphs */
|
||||
+#undef ENABLE_WIDE_GLYPHS
|
||||
+
|
||||
/* Define if you want european extended codesets */
|
||||
#undef ENCODING_EU
|
||||
|
||||
diff -ur rxvt-unicode-9.22-a/configure rxvt-unicode-9.22-b/configure
|
||||
--- rxvt-unicode-9.22-a/configure 2016-01-23 21:08:12.000000000 +0100
|
||||
+++ rxvt-unicode-9.22-b/configure 2021-01-26 13:41:32.889882053 +0100
|
||||
@@ -717,6 +717,7 @@
|
||||
enable_combining
|
||||
enable_xft
|
||||
enable_font_styles
|
||||
+enable_wide_glyphs
|
||||
enable_pixbuf
|
||||
enable_startup_notification
|
||||
enable_transparency
|
||||
@@ -1390,6 +1391,7 @@
|
||||
--enable-combining enable composition of base and combining characters
|
||||
--enable-xft enable xft support on systems that have it
|
||||
--enable-font-styles enable bold and italic support
|
||||
+ --enable-wide-glyphs enable displaying of wide glyphs
|
||||
--enable-pixbuf enable integration with gdk-pixbuf for background images
|
||||
--enable-startup-notification enable freedesktop startup notification support
|
||||
--enable-transparency enable transparent backgrounds
|
||||
@@ -4780,6 +4782,7 @@
|
||||
support_8bitctrls=no
|
||||
support_iso14755=no
|
||||
support_styles=no
|
||||
+ support_wide_glyphs=no
|
||||
support_perl=no
|
||||
codesets=
|
||||
fi
|
||||
@@ -4808,6 +4811,7 @@
|
||||
#support_8bitctrls=yes
|
||||
support_iso14755=yes
|
||||
support_styles=yes
|
||||
+ support_wide_glyphs=yes
|
||||
support_perl=yes
|
||||
codesets=all
|
||||
fi
|
||||
@@ -4909,6 +4913,14 @@
|
||||
fi
|
||||
|
||||
|
||||
+# Check whether --enable-wide-glyphs was given.
|
||||
+if test "${enable_wide_glyphs+set}" = set; then :
|
||||
+ enableval=$enable_wide_glyphs; if test x$enableval = xyes -o x$enableval = xno; then
|
||||
+ support_wide_glyphs=$enableval
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
+
|
||||
# Check whether --enable-pixbuf was given.
|
||||
if test "${enable_pixbuf+set}" = set; then :
|
||||
enableval=$enable_pixbuf; if test x$enableval = xyes -o x$enableval = xno; then
|
||||
@@ -7734,6 +7746,11 @@
|
||||
$as_echo "#define ENABLE_STYLES 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
+if test x$support_wide_glyphs = xyes; then
|
||||
+
|
||||
+$as_echo "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
if test x$support_iso14755 = xyes; then
|
||||
|
||||
$as_echo "#define ISO_14755 1" >>confdefs.h
|
||||
diff -ur rxvt-unicode-9.22-a/configure.ac rxvt-unicode-9.22-b/configure.ac
|
||||
--- rxvt-unicode-9.22-a/configure.ac 2015-06-17 13:57:42.000000000 +0200
|
||||
+++ rxvt-unicode-9.22-b/configure.ac 2021-01-26 13:41:32.889882053 +0100
|
||||
@@ -132,6 +132,7 @@
|
||||
support_8bitctrls=no
|
||||
support_iso14755=no
|
||||
support_styles=no
|
||||
+ support_wide_glyphs=no
|
||||
support_perl=no
|
||||
codesets=
|
||||
fi
|
||||
@@ -160,6 +161,7 @@
|
||||
#support_8bitctrls=yes
|
||||
support_iso14755=yes
|
||||
support_styles=yes
|
||||
+ support_wide_glyphs=yes
|
||||
support_perl=yes
|
||||
codesets=all
|
||||
fi
|
||||
@@ -225,6 +227,12 @@
|
||||
support_styles=$enableval
|
||||
fi])
|
||||
|
||||
+AC_ARG_ENABLE(wide-glyphs,
|
||||
+ [ --enable-wide-glyphs enable displaying of wide glyphs],
|
||||
+ [if test x$enableval = xyes -o x$enableval = xno; then
|
||||
+ support_wide_glyphs=$enableval
|
||||
+ fi])
|
||||
+
|
||||
AC_ARG_ENABLE(pixbuf,
|
||||
[ --enable-pixbuf enable integration with gdk-pixbuf for background images],
|
||||
[if test x$enableval = xyes -o x$enableval = xno; then
|
||||
@@ -648,6 +656,9 @@
|
||||
if test x$support_styles = xyes; then
|
||||
AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support)
|
||||
fi
|
||||
+if test x$support_wide_glyphs = xyes; then
|
||||
+ AC_DEFINE(ENABLE_WIDE_GLYPHS, 1, Define if you want to display wide glyphs)
|
||||
+fi
|
||||
if test x$support_iso14755 = xyes; then
|
||||
AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support)
|
||||
fi
|
||||
diff -ur rxvt-unicode-9.22-a/src/command.C rxvt-unicode-9.22-b/src/command.C
|
||||
--- rxvt-unicode-9.22-a/src/command.C 2016-01-18 20:35:08.000000000 +0100
|
||||
+++ rxvt-unicode-9.22-b/src/command.C 2021-01-26 13:41:32.889882053 +0100
|
||||
@@ -237,7 +237,9 @@
|
||||
# endif
|
||||
scr_overlay_set (11, y + 1, ch, r);
|
||||
|
||||
+#if !ENABLE_WIDE_GLYPHS
|
||||
if (WCWIDTH (ch) >= 2)
|
||||
+#endif
|
||||
scr_overlay_set (12, y + 1, NOCHAR, r);
|
||||
}
|
||||
|
||||
diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C rxvt-unicode-9.22-b/src/rxvtfont.C
|
||||
--- rxvt-unicode-9.22-a/src/rxvtfont.C 2021-01-26 13:39:13.257880354 +0100
|
||||
+++ rxvt-unicode-9.22-b/src/rxvtfont.C 2021-01-26 13:41:32.889882053 +0100
|
||||
@@ -471,6 +471,7 @@
|
||||
else
|
||||
switch (t)
|
||||
{
|
||||
+ case ' ':
|
||||
case '\t':
|
||||
case ZERO_WIDTH_CHAR:
|
||||
case NOCHAR:
|
||||
@@ -1026,8 +1027,10 @@
|
||||
|
||||
careful = xcs->lbearing < 0 || xcs->rbearing > prop->width * wcw;
|
||||
|
||||
+#if !ENABLE_WIDE_GLYPHS
|
||||
if (careful && !OVERLAP_OK (w, wcw, prop))
|
||||
return false;
|
||||
+#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1365,12 +1368,14 @@
|
||||
|
||||
careful = g.x > 0 || w > prop->width * wcw;
|
||||
|
||||
+#if !ENABLE_WIDE_GLYPHS
|
||||
if (careful && !OVERLAP_OK (w, wcw, prop))
|
||||
return false;
|
||||
|
||||
// this weeds out _totally_ broken fonts, or glyphs
|
||||
if (!OVERLAP_OK (g.xOff, wcw, prop))
|
||||
return false;
|
||||
+#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1415,6 +1420,10 @@
|
||||
|
||||
ep->glyph = glyph;
|
||||
ep->x = x_ + (cwidth - extents.xOff >> 1);
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+ /* Left-align to bounding box, do not overlap to the left. */
|
||||
+ max_it(ep->x, x_);
|
||||
+#endif
|
||||
ep->y = y_ + ascent;
|
||||
|
||||
if (extents.xOff == 0)
|
||||
diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C.orig rxvt-unicode-9.22-b/src/rxvtfont.C.orig
|
||||
--- rxvt-unicode-9.22-a/src/rxvtfont.C.orig 2021-01-26 13:38:12.669879617 +0100
|
||||
+++ rxvt-unicode-9.22-b/src/rxvtfont.C.orig 2021-01-26 13:39:13.257880354 +0100
|
||||
@@ -1239,11 +1239,22 @@
|
||||
|
||||
FT_Face face = XftLockFace (f);
|
||||
|
||||
+/*
|
||||
+ * use ascent, descent and height from XftFont *f instead of FT_Face face.
|
||||
+ * this somehow reproduces the behaviour of the line height as seen on xterm.
|
||||
+
|
||||
ascent = (face->size->metrics.ascender + 63) >> 6;
|
||||
descent = (-face->size->metrics.descender + 63) >> 6;
|
||||
height = max (ascent + descent, (face->size->metrics.height + 63) >> 6);
|
||||
width = 0;
|
||||
|
||||
+ */
|
||||
+
|
||||
+ ascent = f->ascent;
|
||||
+ descent = f->descent;
|
||||
+ height = max (ascent + descent, f->height);
|
||||
+ width = 0;
|
||||
+
|
||||
bool scalable = face->face_flags & FT_FACE_FLAG_SCALABLE;
|
||||
|
||||
XftUnlockFace (f);
|
||||
diff -ur rxvt-unicode-9.22-a/src/screen.C rxvt-unicode-9.22-b/src/screen.C
|
||||
--- rxvt-unicode-9.22-a/src/screen.C 2016-01-18 20:35:08.000000000 +0100
|
||||
+++ rxvt-unicode-9.22-b/src/screen.C 2021-01-26 13:41:32.889882053 +0100
|
||||
@@ -936,7 +936,61 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));
|
||||
+ rend_t rend;
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+ // Re-use previous font for space characters.
|
||||
+ // This allows for better display of wider chars with regard to
|
||||
+ // backtracking (which uses RS_SAME).
|
||||
+ if (c != ' ')
|
||||
+ {
|
||||
+#endif
|
||||
+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ // Code taken from ENABLE_COMBINING - might get refactored.
|
||||
+ line_t *linep;
|
||||
+ text_t *tp;
|
||||
+ rend_t *rp = NULL;
|
||||
+
|
||||
+ if (screen.cur.col > 0)
|
||||
+ {
|
||||
+ linep = line;
|
||||
+ tp = line->t + screen.cur.col - 1;
|
||||
+ rp = line->r + screen.cur.col - 1;
|
||||
+ }
|
||||
+ else if (screen.cur.row > 0
|
||||
+ && ROW(screen.cur.row - 1).is_longer ())
|
||||
+ {
|
||||
+ linep = &ROW(screen.cur.row - 1);
|
||||
+ tp = linep->t + ncol - 1;
|
||||
+ rp = linep->r + ncol - 1;
|
||||
+ }
|
||||
+
|
||||
+ if (rp)
|
||||
+ {
|
||||
+ // XXX: this font does not show up in iso-14755 mode for the space!?
|
||||
+ if (*tp == NOCHAR)
|
||||
+ {
|
||||
+ while (*tp == NOCHAR && tp > linep->t)
|
||||
+ tp--, rp--;
|
||||
+
|
||||
+ // first try to find a precomposed character
|
||||
+ unicode_t n = rxvt_compose (*tp, c);
|
||||
+ if (n == NOCHAR)
|
||||
+ n = rxvt_composite.compose (*tp, c);
|
||||
+
|
||||
+ *tp = n;
|
||||
+ *rp = SET_FONT (*rp, FONTSET (*rp)->find_font (*tp));
|
||||
+ }
|
||||
+ rend = SET_FONT (rstyle, GET_FONT(*rp));
|
||||
+ }
|
||||
+ else
|
||||
+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
// if the character doesn't fit into the remaining columns...
|
||||
if (ecb_unlikely (screen.cur.col > ncol - width && ncol >= width))
|
||||
@@ -2387,7 +2441,12 @@
|
||||
text--, count++, xpixel -= fwidth;
|
||||
|
||||
// force redraw after "careful" characters to avoid pixel droppings
|
||||
- for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1; i++)
|
||||
+ for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+ // But not for spaces.
|
||||
+ && stp[col + i + 1] != ' '
|
||||
+#endif
|
||||
+ ; i++)
|
||||
drp[col + i + 1] = srp[col + i + 1] ^ RS_redraw;
|
||||
|
||||
// force redraw before "careful" characters to avoid pixel droppings
|
||||
diff -ur rxvt-unicode-9.22-a/src/xdefaults.C rxvt-unicode-9.22-b/src/xdefaults.C
|
||||
--- rxvt-unicode-9.22-a/src/xdefaults.C 2016-01-23 19:38:47.000000000 +0100
|
||||
+++ rxvt-unicode-9.22-b/src/xdefaults.C 2021-01-26 13:41:32.889882053 +0100
|
||||
@@ -305,6 +305,9 @@
|
||||
#if ENABLE_STYLES
|
||||
"styles,"
|
||||
#endif
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+ "wide-glyphs,"
|
||||
+#endif
|
||||
#if ENABLE_COMBINING
|
||||
"combining,"
|
||||
#endif
|
||||
Only in rxvt-unicode-9.22-b/src: xdefaults.C.orig
|
||||
Only in rxvt-unicode-9.22-b: wide-glyphs-after.png
|
||||
Only in rxvt-unicode-9.22-b: wide-glyphs-before.png
|
||||
@@ -0,0 +1,26 @@
|
||||
diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C rxvt-unicode-9.22-b/src/rxvtfont.C
|
||||
--- rxvt-unicode-9.22-a/src/rxvtfont.C 2015-09-07 16:49:33.000000000 +0200
|
||||
+++ rxvt-unicode-9.22-b/src/rxvtfont.C 2021-01-26 13:38:12.669879617 +0100
|
||||
@@ -1267,12 +1267,21 @@
|
||||
XGlyphInfo g;
|
||||
XftTextExtents16 (disp, f, &ch, 1, &g);
|
||||
|
||||
+/*
|
||||
+ * bukind: don't use g.width as a width of a character!
|
||||
+ * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial
|
||||
+
|
||||
g.width -= g.x;
|
||||
|
||||
int wcw = WCWIDTH (ch);
|
||||
if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
|
||||
|
||||
if (width < g.width ) width = g.width;
|
||||
+ */
|
||||
+ int wcw = WCWIDTH (ch);
|
||||
+ if (wcw > 1) g.xOff = g.xOff / wcw;
|
||||
+ if (width < g.xOff) width = g.xOff;
|
||||
+
|
||||
if (height < g.height ) height = g.height;
|
||||
if (glheight < g.height - g.y) glheight = g.height - g.y;
|
||||
}
|
||||
Only in rxvt-unicode-9.22-b/src: rxvtfont.C.orig
|
||||
@@ -0,0 +1,51 @@
|
||||
diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C rxvt-unicode-9.22-b/src/rxvtfont.C
|
||||
--- rxvt-unicode-9.22-a/src/rxvtfont.C 2021-01-26 13:38:12.669879617 +0100
|
||||
+++ rxvt-unicode-9.22-b/src/rxvtfont.C 2021-01-26 13:39:13.257880354 +0100
|
||||
@@ -1239,11 +1239,22 @@
|
||||
|
||||
FT_Face face = XftLockFace (f);
|
||||
|
||||
+/*
|
||||
+ * use ascent, descent and height from XftFont *f instead of FT_Face face.
|
||||
+ * this somehow reproduces the behaviour of the line height as seen on xterm.
|
||||
+
|
||||
ascent = (face->size->metrics.ascender + 63) >> 6;
|
||||
descent = (-face->size->metrics.descender + 63) >> 6;
|
||||
height = max (ascent + descent, (face->size->metrics.height + 63) >> 6);
|
||||
width = 0;
|
||||
|
||||
+ */
|
||||
+
|
||||
+ ascent = f->ascent;
|
||||
+ descent = f->descent;
|
||||
+ height = max (ascent + descent, f->height);
|
||||
+ width = 0;
|
||||
+
|
||||
bool scalable = face->face_flags & FT_FACE_FLAG_SCALABLE;
|
||||
|
||||
XftUnlockFace (f);
|
||||
diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C.orig rxvt-unicode-9.22-b/src/rxvtfont.C.orig
|
||||
--- rxvt-unicode-9.22-a/src/rxvtfont.C.orig 2015-09-07 16:49:33.000000000 +0200
|
||||
+++ rxvt-unicode-9.22-b/src/rxvtfont.C.orig 2021-01-26 13:38:12.669879617 +0100
|
||||
@@ -1267,12 +1267,21 @@
|
||||
XGlyphInfo g;
|
||||
XftTextExtents16 (disp, f, &ch, 1, &g);
|
||||
|
||||
+/*
|
||||
+ * bukind: don't use g.width as a width of a character!
|
||||
+ * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial
|
||||
+
|
||||
g.width -= g.x;
|
||||
|
||||
int wcw = WCWIDTH (ch);
|
||||
if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
|
||||
|
||||
if (width < g.width ) width = g.width;
|
||||
+ */
|
||||
+ int wcw = WCWIDTH (ch);
|
||||
+ if (wcw > 1) g.xOff = g.xOff / wcw;
|
||||
+ if (width < g.xOff) width = g.xOff;
|
||||
+
|
||||
if (height < g.height ) height = g.height;
|
||||
if (glheight < g.height - g.y) glheight = g.height - g.y;
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
diff --git a/config.h.in b/config.h.in
|
||||
index 914d606..b869bfb 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -9,6 +9,9 @@
|
||||
/* Define if you want handling for rarely used but handy features */
|
||||
#undef ENABLE_FRILLS
|
||||
|
||||
+/* Define if you want support for SGR mouse mode 1006 */
|
||||
+#undef ENABLE_SGRMOUSE
|
||||
+
|
||||
/* Define if you can embed a perl interpreter */
|
||||
#undef ENABLE_PERL
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0da3b59..c8b9c80 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -76,6 +76,7 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
|
||||
AC_SEARCH_LIBS(socket, socket)
|
||||
|
||||
support_frills=yes
|
||||
+support_sgrmouse=yes
|
||||
support_inheritpixmap=yes
|
||||
support_fading=yes
|
||||
support_keepscrolling=yes
|
||||
@@ -109,6 +110,7 @@ AC_ARG_ENABLE(everything,
|
||||
[
|
||||
if test x$enableval = xno; then
|
||||
support_frills=no
|
||||
+ support_sgrmouse=no
|
||||
support_inheritpixmap=no
|
||||
support_fading=no
|
||||
support_keepscrolling=no
|
||||
@@ -137,6 +139,7 @@ AC_ARG_ENABLE(everything,
|
||||
fi
|
||||
if test x$enableval = xyes; then
|
||||
support_frills=yes
|
||||
+ support_sgrmouse=yes
|
||||
support_inheritpixmap=yes
|
||||
support_fading=yes
|
||||
support_keepscrolling=yes
|
||||
@@ -359,6 +362,12 @@ AC_ARG_ENABLE(frills,
|
||||
support_frills=$enableval
|
||||
fi])
|
||||
|
||||
+AC_ARG_ENABLE(sgrmouse,
|
||||
+ [ --enable-sgrmouse enable support for SGR mouse mode 1006],
|
||||
+ [if test x$enableval = xyes -o x$enableval = xno; then
|
||||
+ support_sgrmouse=$enableval
|
||||
+ fi])
|
||||
+
|
||||
AC_ARG_ENABLE(keepscrolling,
|
||||
[ --enable-keepscrolling enable continual scrolling on scrollbar arrow press],
|
||||
[if test x$enableval = xyes -o x$enableval = xno; then
|
||||
@@ -666,6 +675,9 @@ fi
|
||||
if test x$support_frills = xyes; then
|
||||
AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features)
|
||||
fi
|
||||
+if test x$support_sgrmouse = xyes; then
|
||||
+ AC_DEFINE(ENABLE_SGRMOUSE, 1, Define if you want support for SGR mouse mode 1006)
|
||||
+fi
|
||||
if test x$support_mousewheel = xyes; then
|
||||
AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll)
|
||||
fi
|
||||
diff --git a/src/command.C b/src/command.C
|
||||
index 7b79f51..a62ef87 100644
|
||||
--- a/src/command.C
|
||||
+++ b/src/command.C
|
||||
@@ -1282,6 +1282,13 @@ rxvt_term::mouse_report (XButtonEvent &ev)
|
||||
int button_number, key_state = 0;
|
||||
int x, y;
|
||||
int code = 32;
|
||||
+ bool mode_sgr = false;
|
||||
+
|
||||
+#if ENABLE_SGRMOUSE
|
||||
+ if (priv_modes & PrivMode_ExtMouseSgr) mode_sgr = true;
|
||||
+#endif
|
||||
+
|
||||
+ if (mode_sgr) code = 0;
|
||||
|
||||
x = Pixel2Col (ev.x) + 1;
|
||||
y = Pixel2Row (ev.y) + 1;
|
||||
@@ -1296,11 +1303,18 @@ rxvt_term::mouse_report (XButtonEvent &ev)
|
||||
code += 32;
|
||||
}
|
||||
|
||||
- if (MEvent.button == AnyButton)
|
||||
+ if (!(mode_sgr) && MEvent.button == AnyButton)
|
||||
button_number = 3;
|
||||
else
|
||||
{
|
||||
- button_number = MEvent.button - Button1;
|
||||
+ if (ev.type == MotionNotify) {
|
||||
+ if (ev.state & Button1Mask) button_number = 0;
|
||||
+ else if (ev.state & Button2Mask) button_number = 1;
|
||||
+ else if (ev.state & Button3Mask) button_number = 2;
|
||||
+ else return;
|
||||
+ } else {
|
||||
+ button_number = ev.button - Button1;
|
||||
+ }
|
||||
/* add 0x3D for wheel events, like xterm does */
|
||||
if (button_number >= 3)
|
||||
button_number += 64 - 3;
|
||||
@@ -1361,6 +1375,15 @@ rxvt_term::mouse_report (XButtonEvent &ev)
|
||||
wint_t (32 + x),
|
||||
wint_t (32 + y));
|
||||
else
|
||||
+#endif
|
||||
+#if ENABLE_SGRMOUSE
|
||||
+ if (mode_sgr)
|
||||
+ tt_printf ("\033[<%d;%d;%d%c",
|
||||
+ code + button_number + key_state,
|
||||
+ x,
|
||||
+ y,
|
||||
+ (ev.type == ButtonRelease ? 'm' : 'M'));
|
||||
+ else
|
||||
#endif
|
||||
tt_printf ("\033[M%c%c%c",
|
||||
code + button_number + key_state,
|
||||
@@ -2904,7 +2927,7 @@ rxvt_term::process_csi_seq ()
|
||||
scr_soft_reset ();
|
||||
|
||||
static const int pm_h[] = { 7, 25 };
|
||||
- static const int pm_l[] = { 1, 3, 4, 5, 6, 9, 66, 1000, 1001, 1005, 1015, 1049 };
|
||||
+ static const int pm_l[] = { 1, 3, 4, 5, 6, 9, 66, 1000, 1001, 1002, 1003, 1005, 1006, 1015, 1049 };
|
||||
|
||||
process_terminal_mode ('h', 0, ecb_array_length (pm_h), pm_h);
|
||||
process_terminal_mode ('l', 0, ecb_array_length (pm_l), pm_l);
|
||||
@@ -3710,6 +3733,9 @@ rxvt_term::process_terminal_mode (int mode, int priv ecb_unused, unsigned int na
|
||||
{ 1003, PrivMode_MouseAnyEvent },
|
||||
#if ENABLE_FRILLS
|
||||
{ 1005, PrivMode_ExtModeMouse },
|
||||
+#endif
|
||||
+#if ENABLE_SGRMOUSE
|
||||
+ { 1006, PrivMode_ExtMouseSgr },
|
||||
#endif
|
||||
{ 1010, PrivMode_TtyOutputInh }, // rxvt extension
|
||||
{ 1011, PrivMode_Keypress }, // rxvt extension
|
||||
diff --git a/src/rxvt.h b/src/rxvt.h
|
||||
index 5c7cf66..2ffd3fb 100644
|
||||
--- a/src/rxvt.h
|
||||
+++ b/src/rxvt.h
|
||||
@@ -645,6 +645,7 @@ enum {
|
||||
#define PrivMode_ExtModeMouse (1UL<<23) // xterm pseudo-utf-8 hack
|
||||
#define PrivMode_ExtMouseRight (1UL<<24) // xterm pseudo-utf-8, but works in non-utf-8-locales
|
||||
#define PrivMode_BlinkingCursor (1UL<<25)
|
||||
+#define PrivMode_ExtMouseSgr (1UL<<27) // sgr mouse extension
|
||||
|
||||
#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent)
|
||||
|
||||
diff --git a/src/xdefaults.C b/src/xdefaults.C
|
||||
index 894aa8d..e5952b7 100644
|
||||
--- a/src/xdefaults.C
|
||||
+++ b/src/xdefaults.C
|
||||
@@ -359,6 +359,9 @@ static const char optionsstring[] = "options: "
|
||||
#if defined(ENABLE_FRILLS)
|
||||
"frills,"
|
||||
#endif
|
||||
+#if defined(ENABLE_SGRMOUSE)
|
||||
+ "sgrmouse,"
|
||||
+#endif
|
||||
#if defined(SELECTION_SCROLLING)
|
||||
"selectionscrolling,"
|
||||
#endif
|
||||
9
x11-terms/rxvt-unicode/files/urxvtd.service
Normal file
9
x11-terms/rxvt-unicode/files/urxvtd.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=rxvt-unicode terminal daemon
|
||||
Documentation=man:urxvtd
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/urxvtd
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
118
x11-terms/rxvt-unicode/rxvt-unicode-9.22-r10.ebuild
Normal file
118
x11-terms/rxvt-unicode/rxvt-unicode-9.22-r10.ebuild
Normal file
@@ -0,0 +1,118 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools desktop systemd
|
||||
|
||||
COLOUR_PATCH_NAME="${PN}-9.22_24-bit-color_cpixl-20201108.patch"
|
||||
|
||||
DESCRIPTION="rxvt clone with xft and unicode support"
|
||||
HOMEPAGE="http://software.schmorp.de/pkg/rxvt-unicode.html"
|
||||
SRC_URI="http://dist.schmorp.de/rxvt-unicode/Attic/${P}.tar.bz2
|
||||
https://dev.gentoo.org/~marecki/dists/${PN}/${COLOUR_PATCH_NAME}.xz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
|
||||
IUSE="-24-bit-color 256-color blink fading-colors +font-styles gdk-pixbuf iso14755 +mousewheel
|
||||
+perl -sgrmouse smart-resize startup-notification unicode3 +utmp +wide-glyphs +wtmp xft"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND=">=sys-libs/ncurses-5.7-r6:=
|
||||
media-libs/fontconfig
|
||||
x11-libs/libX11
|
||||
x11-libs/libXrender
|
||||
gdk-pixbuf? ( x11-libs/gdk-pixbuf )
|
||||
kernel_Darwin? ( dev-perl/Mac-Pasteboard )
|
||||
perl? ( dev-lang/perl:= )
|
||||
startup-notification? ( x11-libs/startup-notification )
|
||||
xft? ( x11-libs/libXft )"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-base/xorg-proto"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-9.06-case-insensitive-fs.patch
|
||||
"${FILESDIR}"/${PN}-9.21-xsubpp.patch
|
||||
"${FILESDIR}"/${PN}-9.22-sgr-mouse-mode-flag.patch
|
||||
"${FILESDIR}"/${PN}-9.22-font-width-fix.patch
|
||||
"${FILESDIR}"/${PN}-9.22-line-spacing-fix.patch
|
||||
"${FILESDIR}"/${PN}-9.22-enable-wide-glyphs.patch
|
||||
"${FILESDIR}"/${PN}-9.22-add-space-to-extent_test_chars.patch
|
||||
"${WORKDIR}"/${COLOUR_PATCH_NAME}
|
||||
)
|
||||
DOCS=(
|
||||
Changes
|
||||
README.FAQ
|
||||
doc/README.xvt
|
||||
doc/changes.txt
|
||||
doc/etc/${PN}.term{cap,info}
|
||||
doc/rxvt-tabbed
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# kill the rxvt-unicode terminfo file - #192083
|
||||
sed -i -e "/rxvt-unicode.terminfo/d" doc/Makefile.in || die "sed failed"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# --enable-everything goes first: the order of the arguments matters
|
||||
econf --enable-everything \
|
||||
$(use_enable 24-bit-color) \
|
||||
$(use_enable 256-color) \
|
||||
$(use_enable blink text-blink) \
|
||||
$(use_enable fading-colors fading) \
|
||||
$(use_enable font-styles) \
|
||||
$(use_enable gdk-pixbuf pixbuf) \
|
||||
$(use_enable iso14755) \
|
||||
$(use_enable mousewheel) \
|
||||
$(use_enable perl) \
|
||||
$(use_enable sgrmouse) \
|
||||
$(use_enable smart-resize) \
|
||||
$(use_enable startup-notification) \
|
||||
$(use_enable unicode3) \
|
||||
$(use_enable utmp) \
|
||||
$(use_enable wide-glyphs) \
|
||||
$(use_enable wtmp) \
|
||||
$(use_enable xft)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e 's/RXVT_BASENAME = "rxvt"/RXVT_BASENAME = "urxvt"/' \
|
||||
"${S}"/doc/rxvt-tabbed || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
systemd_douserunit "${FILESDIR}"/urxvtd.service
|
||||
|
||||
make_desktop_entry urxvt rxvt-unicode utilities-terminal \
|
||||
"System;TerminalEmulator"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use 24-bit-color; then
|
||||
ewarn
|
||||
ewarn "You have enabled 24-bit colour support in ${PN}, which is UNOFFICIAL and INCOMPLETE."
|
||||
ewarn "You may or may not encounter visual glitches or stability issues. When in doubt,"
|
||||
ewarn "rebuild =${CATEGORY}/${PF} with USE=-24-bit-color (the default setting)."
|
||||
ewarn
|
||||
fi
|
||||
|
||||
if use sgrmouse; then
|
||||
ewarn
|
||||
ewarn "Support for the SGR 1006 mouse extension in ${PN} is UNOFFICIAL and provided as-is."
|
||||
ewarn "When in doubt, rebuild =${CATEGORY}/${PF} with USE=-sgrmouse (the default setting)."
|
||||
ewarn
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user