diff --git a/rxvt-unicode/Manifest b/rxvt-unicode/Manifest new file mode 100644 index 0000000..434a617 --- /dev/null +++ b/rxvt-unicode/Manifest @@ -0,0 +1,21 @@ +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-disable-graphics-query.patch 1001 BLAKE2B 594376fa4b7d11558d54930e91cfd5aaf4afb05bbe326e5ba93ff7a6b2c9ae5da98206c9c3be506eec5bb9760a7abbe53ca3c45db03859c8e4bd44c59b5caf25 SHA512 71f3580965c809ceb0f90bc96cfe2b3e6790c3e3093a9bd09e5004cae96c5746295af0c1dbf42fbd2c4ead24751e0e442562cc78ac48acae3bc668621dfc0876 +AUX rxvt-unicode-9.22-enable-wide-glyphs.patch 9098 BLAKE2B 5741ca2d7d38639f521037aaf3a2bca6e13973d6e8f8793310ec592f861c62e2ab89b779855003cc29fd9579c70a081e140ceade3d724a36afd0ef099d43527a SHA512 8e3a64387cbc6dfad737cce7abc984147fdccd4b3437f4a4cf5e36108b2f32327aa2423984ec13c6d42fe511793de09c4f0de95d4b8f62846fd20c00521d1d6a +AUX rxvt-unicode-9.22-font-width-fix.patch 993 BLAKE2B 40a35433bb78cdec5c6469f9a0d80b608dba39c6ecbb57bcc9bf9999e4ae071793bf843f3efaeef5d0947c8b5f0b8334db3a235d0b3d9db0cd6bf3fba0d408ec SHA512 dd468475ec2eefd36616b59563306cbb1779c9b9634c9bdc8a5119a82a6b6ceeecdb560cc20543cf9ab13feb6dbd621ea7d40b72c598245da630890b73a2e99f +AUX rxvt-unicode-9.22-line-spacing-fix.patch 911 BLAKE2B fcd71e94b979987e56459f52f0ddcfac0b6b64df97bc60d22ad3e23195c8a0e6b61227c4157332029f6d9116c6f876f0565bf5ddface2a79cc88876e1be959c2 SHA512 87f7c8847111420846c6b5f925953cc69ae3b765cb2af6702ed86ac5a0e450d8a14fc02731c3210ccc7ab99ea4729c406c1dee15bfde356b3e139b4658792c2b +AUX rxvt-unicode-9.22-sgr-mouse-mode-flag.patch 5613 BLAKE2B 28cf8af70841027ba254704b3bb94e2bcf7f8f6743963056c046279aeef4fc8f866711144880ac6a3ad6acd4ed86332f497dff905f3836775579ba5e90328218 SHA512 b6bf180cd25f46fd22841aa8322839886712312341950e3abeeec1a44d73bbec8e7467ce09878c84b86263ab7067443529a89f017e54dceb84b189477e58f10e +AUX rxvt-unicode-9.26-enable-wide-glyphs.patch 9040 BLAKE2B d3b722e81b20c0ff83dc8cfbe39554a6428d11ac8c41b60488935c529818bcf09fae6c0b0b0af9f1ff2e34050dda90d73955d5489b0e8db3262d4497638e0e0a SHA512 4b6b373deed4365cd91d3066453720c5a7a8373f90edfab5a25d5dfaedfbc753b9cfb37b615472dce876d44e9260290a1841bde97c5128c396193449cb8c070d +AUX rxvt-unicode-9.30-enable-wide-glyphs.patch 9318 BLAKE2B 7e52ad2620072ac52622813ead870843f9648b8ea08e957998f8cb6a1b53e592df109ca0f9f72dfbf41ce58c05869cb330b5271d056d9159c837a3cda326e866 SHA512 0420991757b71472805dec8625c1e209111af8377d227a4fbe0828489fc5b4a542dfe3f271b204bc0b318f94ad795de7ecab7138f6ab40c3d0943bc039144861 +AUX urxvtd.service 145 BLAKE2B 9199c81f02ff161caf6f72bac95808d4ba584bf09fb68cf7fef1bdf883873fe360816d8736835987a61c1cf0ac1be469aa47f2b74e96d8215a3ac17de896d6a5 SHA512 a77606d11e80c8d117917ab34a6d2ca430c667372ee713cf8519e49df4d972f289399d49bd808a9d31fa343d11c2fd2eb761b813be3f2892784d1dd9c281fc38 +AUX urxvtd.socket 133 BLAKE2B d685c78de25a3f2d661f180a6a5cc227c500e873dab049587f0742330910c3867f60871a96a237787d85f66b8999b397281b36ed9b92bda2422e1e2295accfee SHA512 20c7d7a00bd41deefb738b6795ecbea8098ec81d3356cceab4de39408de3552d385fc48ef74a087f3724d436b77de54adb67d0858a0949b9595820ee3d9cf7e4 +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 +DIST rxvt-unicode-9.26.tar.bz2 904950 BLAKE2B 1790d02eeadf630cc9bc718288af2f6bd19c3e320d3dbfa44c8cef516c8e790e0abfbfe4e557795749ddd3ec41b8358f6eac623c060240f091b3e84a549151ad SHA512 35560b57730e17c9542ea4a615fd86ce703c4e6421323e8fe1570007737a880fde90d17943e5af9e170be4111b9769f4aa7e57efca5428421fdc1c299112f8e0 +DIST rxvt-unicode-9.26_24-bit-color_aur-20210516+eautoreconf.patch.xz 11716 BLAKE2B 7e18b0f884dbb9574515db8cfb4e1521e1e3287ac194750db288409c7e4d0bb120964e4559ce7e3b91e169935ded93f3af3045fc7c1737a5a6de2710ee2e107b SHA512 8cbcc1c04bdb83996ce08ece559ef9e7f5f530140a2a66291e0ffd049808da60787a68520b4a990dc12e1272de861a85b199ddd10ac8b245eafbfe16dc521199 +DIST rxvt-unicode-9.29_24-bit-color_aur-9.26-20210712.patch.xz 7568 BLAKE2B 8ea5d813e00fd4012d145acf70e3d9b0974dddffd203fbec4bf06a0da1c9368ec316fc2903dccae3a5d71d684fd93b2a09ed208f26be1e85f77c702494db4e54 SHA512 baa226ca9adf6025a72dea925ec3be16186502bb4aab21dd61ef1f7c3e2eb793e7a1dc9619ed8228166758daa2879a465da2ace3f3b14545808955388bd2b74b +DIST rxvt-unicode-9.30.tar.bz2 877186 BLAKE2B 645164e37e9e484c66f5047836689e4e4727575dfdcbefc64affb70d9110497529fdcc7d476f77737efed5cee4af314e1e1ccbcb42b506bb7e653b827c24a0c7 SHA512 048d5f635a61bc1a739d5cbc09e7a9f77cee18c81df468ce1ff0a62866ced06fc4ec258bb015d2484a7e7bad2339f0bdd79bd824d649c2553a80bdef9f199e99 +EBUILD rxvt-unicode-9.22-r10.ebuild 3405 BLAKE2B 6babcef442d1438f50f55acdd27e9750c3264f5dd46dbf794b2d62c75e58163fdb2d4a0eb0ec145615d395407777504790b56410cb6bc7907a385be32169cd91 SHA512 32b9435c7ff7df0f160eab21cea494de7c755045861f439133170a32e78216d4bc365a1825d09bfd5e56ceca314303e51bfe1e0547cd383143fadda7988c0389 +EBUILD rxvt-unicode-9.26-r10.ebuild 4298 BLAKE2B 098e96d91281611d85422a566010e6cd6963337061249c6693cef3a4c81b4daaf661a3c93704ff24347dd82cd0f92a02b1efb89f5c97455beff35b0c2ed1060c SHA512 195daa5986cfe2393c65189852f3cee72777bc3591735cd93030e98443723be4a51374df03231b9f702365401d50bd3328fedf273042480c5fb5666945525ba8 +EBUILD rxvt-unicode-9.30-r10.ebuild 4165 BLAKE2B 5d2866770dc1a69186d41f9777e4470f588fe29a70f25191b89565517648f5c4ae9f8deea661174e59b9b5db0f98fb2d346e1cabe7547f1b082c00b6f307b412 SHA512 d107a9b96b9bcd5a9d59f3086fecfc7eae4bbdbf41fefa116010bb94e76b066432df550e4f5bf40cbda27c098345fe08bca170f9cd8e1f36d3d3326e6343e6fa diff --git a/rxvt-unicode/files/rxvt-unicode-9.06-case-insensitive-fs.patch b/rxvt-unicode/files/rxvt-unicode-9.06-case-insensitive-fs.patch new file mode 100644 index 0000000..916e24a --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.06-case-insensitive-fs.patch @@ -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 diff --git a/rxvt-unicode/files/rxvt-unicode-9.21-xsubpp.patch b/rxvt-unicode/files/rxvt-unicode-9.21-xsubpp.patch new file mode 100644 index 0000000..1d71e96 --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.21-xsubpp.patch @@ -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 $< diff --git a/rxvt-unicode/files/rxvt-unicode-9.22-add-space-to-extent_test_chars.patch b/rxvt-unicode/files/rxvt-unicode-9.22-add-space-to-extent_test_chars.patch new file mode 100644 index 0000000..380b9c2 --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.22-add-space-to-extent_test_chars.patch @@ -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, // が本 + }; diff --git a/rxvt-unicode/files/rxvt-unicode-9.22-disable-graphics-query.patch b/rxvt-unicode/files/rxvt-unicode-9.22-disable-graphics-query.patch new file mode 100644 index 0000000..53f33b2 --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.22-disable-graphics-query.patch @@ -0,0 +1,23 @@ +diff -ur rxvt-unicode-9.22-orig/src/command.C rxvt-unicode-9.22/src/command.C +--- rxvt-unicode-9.22-orig/src/command.C 2016-01-18 20:35:08.000000000 +0100 ++++ rxvt-unicode-9.22/src/command.C 2021-05-17 21:22:29.068263084 +0200 +@@ -2722,12 +2722,13 @@ + } + break; + +- /* kidnapped escape sequence: Should be 8.3.48 */ +- case C1_ESA: /* ESC G */ +- // used by original rxvt for rob nations own graphics mode +- if (cmd_getc () == 'Q') +- tt_printf ("\033G0\012"); /* query graphics - no graphics */ +- break; ++// disabled because embedded newlines can make exploits easier ++// /* kidnapped escape sequence: Should be 8.3.48 */ ++// case C1_ESA: /* ESC G */ ++// // used by original rxvt for rob nations own graphics mode ++// if (cmd_getc () == 'Q') ++// tt_printf ("\033G0\012"); /* query graphics - no graphics */ ++// break; + + /* 8.3.63: CHARACTER TABULATION SET */ + case C1_HTS: /* ESC H */ diff --git a/rxvt-unicode/files/rxvt-unicode-9.22-enable-wide-glyphs.patch b/rxvt-unicode/files/rxvt-unicode-9.22-enable-wide-glyphs.patch new file mode 100644 index 0000000..be366ea --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.22-enable-wide-glyphs.patch @@ -0,0 +1,271 @@ +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/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 diff --git a/rxvt-unicode/files/rxvt-unicode-9.22-font-width-fix.patch b/rxvt-unicode/files/rxvt-unicode-9.22-font-width-fix.patch new file mode 100644 index 0000000..d7bda51 --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.22-font-width-fix.patch @@ -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 diff --git a/rxvt-unicode/files/rxvt-unicode-9.22-line-spacing-fix.patch b/rxvt-unicode/files/rxvt-unicode-9.22-line-spacing-fix.patch new file mode 100644 index 0000000..19588dd --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.22-line-spacing-fix.patch @@ -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 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 --git a/rxvt-unicode/files/rxvt-unicode-9.22-sgr-mouse-mode-flag.patch b/rxvt-unicode/files/rxvt-unicode-9.22-sgr-mouse-mode-flag.patch new file mode 100644 index 0000000..3f6f5d9 --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.22-sgr-mouse-mode-flag.patch @@ -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 diff --git a/rxvt-unicode/files/rxvt-unicode-9.26-enable-wide-glyphs.patch b/rxvt-unicode/files/rxvt-unicode-9.26-enable-wide-glyphs.patch new file mode 100644 index 0000000..31fd46d --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.26-enable-wide-glyphs.patch @@ -0,0 +1,271 @@ +diff -ur rxvt-unicode-9.26/config.h.in rxvt-unicode-9.26_wide/config.h.in +--- rxvt-unicode-9.26/config.h.in 2020-01-22 14:41:54.000000000 +0100 ++++ rxvt-unicode-9.26_wide/config.h.in 2021-07-13 19:50:20.006549931 +0200 +@@ -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.26/configure rxvt-unicode-9.26_wide/configure +--- rxvt-unicode-9.26/configure 2021-05-14 15:50:48.000000000 +0200 ++++ rxvt-unicode-9.26_wide/configure 2021-07-13 20:12:01.802581704 +0200 +@@ -744,6 +744,7 @@ + enable_combining + enable_xft + enable_font_styles ++enable_wide_glyphs + enable_pixbuf + enable_startup_notification + enable_transparency +@@ -1425,6 +1426,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 +@@ -5182,6 +5184,7 @@ + support_8bitctrls=no + support_iso14755=no + support_styles=no ++ support_wide_glyphs=no + support_perl=no + codesets= + fi +@@ -5210,6 +5213,7 @@ + #support_8bitctrls=yes + support_iso14755=yes + support_styles=yes ++ support_wide_glyphs=yes + support_perl=yes + codesets=all + fi +@@ -5319,6 +5323,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+y} + then : +@@ -8542,6 +8554,11 @@ + printf "%s\n" "#define ISO_14755 1" >>confdefs.h + + fi ++if test x$support_wide_glyphs = xyes; then ++ ++printf "%s\n" "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h ++ ++fi + if test x$support_8bitctrls = xyes; then + + printf "%s\n" "#define EIGHT_BIT_CONTROLS 1" >>confdefs.h +diff -ur rxvt-unicode-9.26/configure.ac rxvt-unicode-9.26_wide/configure.ac +--- rxvt-unicode-9.26/configure.ac 2021-05-13 21:40:55.000000000 +0200 ++++ rxvt-unicode-9.26_wide/configure.ac 2021-07-13 19:55:10.702557026 +0200 +@@ -134,6 +134,7 @@ + support_8bitctrls=no + support_iso14755=no + support_styles=no ++ support_wide_glyphs=no + support_perl=no + codesets= + fi +@@ -162,6 +163,7 @@ + #support_8bitctrls=yes + support_iso14755=yes + support_styles=yes ++ support_wide_glyphs=yes + support_perl=yes + codesets=all + fi +@@ -227,6 +229,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 +@@ -650,6 +658,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.26/src/command.C rxvt-unicode-9.26_wide/src/command.C +--- rxvt-unicode-9.26/src/command.C 2021-05-13 21:40:55.000000000 +0200 ++++ rxvt-unicode-9.26_wide/src/command.C 2021-07-13 19:55:52.990558058 +0200 +@@ -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.26/src/rxvtfont.C rxvt-unicode-9.26_wide/src/rxvtfont.C +--- rxvt-unicode-9.26/src/rxvtfont.C 2020-01-20 10:19:11.000000000 +0100 ++++ rxvt-unicode-9.26_wide/src/rxvtfont.C 2021-07-13 19:58:46.890562302 +0200 +@@ -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; + } +@@ -1345,12 +1348,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; + } +@@ -1395,6 +1400,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.26/src/screen.C rxvt-unicode-9.26_wide/src/screen.C +--- rxvt-unicode-9.26/src/screen.C 2021-05-13 21:40:55.000000000 +0200 ++++ rxvt-unicode-9.26_wide/src/screen.C 2021-07-13 20:01:29.694566276 +0200 +@@ -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)) +@@ -2395,7 +2449,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.26/src/xdefaults.C rxvt-unicode-9.26_wide/src/xdefaults.C +--- rxvt-unicode-9.26/src/xdefaults.C 2019-09-17 22:38:30.000000000 +0200 ++++ rxvt-unicode-9.26_wide/src/xdefaults.C 2021-07-13 20:02:34.230567851 +0200 +@@ -294,6 +294,9 @@ + #if ENABLE_STYLES + "styles," + #endif ++#if ENABLE_WIDE_GLYPHS ++ "wide-glyphs," ++#endif + #if ENABLE_COMBINING + "combining," + #endif diff --git a/rxvt-unicode/files/rxvt-unicode-9.30-enable-wide-glyphs.patch b/rxvt-unicode/files/rxvt-unicode-9.30-enable-wide-glyphs.patch new file mode 100644 index 0000000..7bc55bb --- /dev/null +++ b/rxvt-unicode/files/rxvt-unicode-9.30-enable-wide-glyphs.patch @@ -0,0 +1,271 @@ +diff -ur rxvt-unicode-9.30/config.h.in rxvt-unicode-9.30-wide-glyphs/config.h.in +--- rxvt-unicode-9.30/config.h.in 2021-07-23 22:57:20.000000000 +0200 ++++ rxvt-unicode-9.30-wide-glyphs/config.h.in 2022-01-16 16:10:47.000676909 +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.30/configure rxvt-unicode-9.30-wide-glyphs/configure +--- rxvt-unicode-9.30/configure 2021-11-27 21:07:00.000000000 +0100 ++++ rxvt-unicode-9.30-wide-glyphs/configure 2022-01-16 16:14:15.100672381 +0100 +@@ -744,6 +744,7 @@ + enable_fading + enable_rxvt_scroll + enable_next_scroll ++enable_wide_glyphs + enable_xterm_scroll + enable_perl + with_codesets +@@ -1412,6 +1413,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 +@@ -5023,6 +5025,7 @@ + support_8bitctrls=no + support_iso14755=no + support_styles=no ++ support_wide_glyphs=no + support_perl=no + codesets= + fi +@@ -5048,6 +5051,7 @@ + #support_8bitctrls=yes + support_iso14755=yes + support_styles=yes ++ support_wide_glyphs=yes + support_perl=yes + codesets=all + fi +@@ -5165,6 +5169,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+y} + then : +@@ -7675,6 +7687,11 @@ + printf "%s\n" "#define ISO_14755 1" >>confdefs.h + + fi ++if test x$support_wide_glyphs = xyes; then ++ ++printf "%s\n" "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h ++ ++fi + if test x$support_8bitctrls = xyes; then + + printf "%s\n" "#define EIGHT_BIT_CONTROLS 1" >>confdefs.h +diff -ur rxvt-unicode-9.30/configure.ac rxvt-unicode-9.30-wide-glyphs/configure.ac +--- rxvt-unicode-9.30/configure.ac 2021-11-27 21:07:00.000000000 +0100 ++++ rxvt-unicode-9.30-wide-glyphs/configure.ac 2022-01-16 16:15:41.224670506 +0100 +@@ -123,6 +123,7 @@ + support_8bitctrls=no + support_iso14755=no + support_styles=no ++ support_wide_glyphs=no + support_perl=no + codesets= + fi +@@ -148,6 +149,7 @@ + #support_8bitctrls=yes + support_iso14755=yes + support_styles=yes ++ support_wide_glyphs=yes + support_perl=yes + codesets=all + fi +@@ -221,6 +223,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 +@@ -643,6 +651,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.30/src/command.C rxvt-unicode-9.30-wide-glyphs/src/command.C +--- rxvt-unicode-9.30/src/command.C 2021-11-22 00:34:29.000000000 +0100 ++++ rxvt-unicode-9.30-wide-glyphs/src/command.C 2022-01-16 16:16:34.580669345 +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.30/src/rxvtfont.C rxvt-unicode-9.30-wide-glyphs/src/rxvtfont.C +--- rxvt-unicode-9.30/src/rxvtfont.C 2021-11-21 20:33:25.000000000 +0100 ++++ rxvt-unicode-9.30-wide-glyphs/src/rxvtfont.C 2022-01-16 16:27:54.948654540 +0100 +@@ -471,6 +471,7 @@ + else + switch (t) + { ++ case ' ': + case '\t': + case ZERO_WIDTH_CHAR: + case NOCHAR: +@@ -1038,8 +1039,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; + } +@@ -1410,12 +1413,14 @@ + + careful = g.x > 0 || w > cwidth; + ++#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; + } +@@ -1502,6 +1507,11 @@ + // in which case we use the average between the two. + ep->x += xOff ? cwidth - xOff >> 1 : 0; + ++#if ENABLE_WIDE_GLYPHS ++ /* Left-align to bounding box, do not overlap to the left. */ ++ max_it(ep->x, x_); ++#endif ++ + // xft/freetype represent combining characters as characters with zero + // width rendered over the previous character with some fonts, while + // in other fonts, they are considered normal characters, while yet +diff -ur rxvt-unicode-9.30/src/screen.C rxvt-unicode-9.30-wide-glyphs/src/screen.C +--- rxvt-unicode-9.30/src/screen.C 2021-07-03 05:55:47.000000000 +0200 ++++ rxvt-unicode-9.30-wide-glyphs/src/screen.C 2022-01-16 16:31:19.644650086 +0100 +@@ -936,7 +936,60 @@ + # 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)) +@@ -2395,7 +2448,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.30/src/xdefaults.C rxvt-unicode-9.30-wide-glyphs/src/xdefaults.C +--- rxvt-unicode-9.30/src/xdefaults.C 2021-07-03 18:36:13.000000000 +0200 ++++ rxvt-unicode-9.30-wide-glyphs/src/xdefaults.C 2022-01-16 16:31:59.204649225 +0100 +@@ -298,6 +298,9 @@ + #if ENABLE_STYLES + "styles," + #endif ++#if ENABLE_WIDE_GLYPHS ++ "wide-glyphs," ++#endif + #if ENABLE_COMBINING + "combining," + #endif diff --git a/rxvt-unicode/files/urxvtd.service b/rxvt-unicode/files/urxvtd.service new file mode 100644 index 0000000..758e815 --- /dev/null +++ b/rxvt-unicode/files/urxvtd.service @@ -0,0 +1,9 @@ +[Unit] +Description=rxvt-unicode terminal daemon +Documentation=man:urxvtd + +[Service] +ExecStart=/usr/bin/urxvtd + +[Install] +WantedBy=default.target diff --git a/rxvt-unicode/files/urxvtd.socket b/rxvt-unicode/files/urxvtd.socket new file mode 100644 index 0000000..4da0499 --- /dev/null +++ b/rxvt-unicode/files/urxvtd.socket @@ -0,0 +1,8 @@ +[Unit] +Description=rxvt-unicode terminal daemon socket + +[Socket] +ListenStream=%h/.urxvt/urxvtd-%H + +[Install] +WantedBy=sockets.target diff --git a/rxvt-unicode/rxvt-unicode-9.22-r10.ebuild b/rxvt-unicode/rxvt-unicode-9.22-r10.ebuild new file mode 100644 index 0000000..f529c2b --- /dev/null +++ b/rxvt-unicode/rxvt-unicode-9.22-r10.ebuild @@ -0,0 +1,119 @@ +# 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 + "${WORKDIR}"/${COLOUR_PATCH_NAME} + "${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 + "${FILESDIR}"/${PN}-9.22-disable-graphics-query.patch +) +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 +} diff --git a/rxvt-unicode/rxvt-unicode-9.26-r10.ebuild b/rxvt-unicode/rxvt-unicode-9.26-r10.ebuild new file mode 100644 index 0000000..d93192b --- /dev/null +++ b/rxvt-unicode/rxvt-unicode-9.26-r10.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools desktop flag-o-matic systemd prefix + +COLOUR_PATCH_NAME="${PN}-9.26_24-bit-color_aur-20210516+eautoreconf.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" +# NOTE(gryf): this ebuild differ from official one by using 3rd party patches, +# and configuration options, which are absent in official ebuild, but are +# accepted by configure script: +# enabled options as a use flags: +# - smart-resize +# 3rd party patches (by flags): +# - font-width - use xOff instead of width attribute for a glyph. +# - line-spacing - use ascent, descent and height from XftFont *f instead of +# FT_Face face. +# - use-space - add space for characters to figure out width and height of +# chars +# - wide-glyphs - add support for wide glyphs +IUSE="-24-bit-color 256-color blink fading-colors +font-styles -font-width + gdk-pixbuf iso14755 -line-spacing +mousewheel +perl -smart-resize + -use-space startup-notification unicode3 +utmp -wide-glyphs +wtmp + xft" + +RDEPEND=">=sys-libs/ncurses-5.7-r6:= + media-libs/fontconfig + x11-libs/libX11 + x11-libs/libXrender + x11-libs/libXt + 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" +# WARNING: will bdepend on >=sys-devel/autoconf-2.71 (masked as of 2021-07-07) if eautoreconf has to be called + +PATCHES=( + "${FILESDIR}"/${PN}-9.06-case-insensitive-fs.patch + "${FILESDIR}"/${PN}-9.21-xsubpp.patch +) +DOCS=( + Changes + README.FAQ + doc/README.xvt + doc/changes.txt + doc/etc/${PN}.term{cap,info} + doc/rxvt-tabbed +) + +src_prepare() { + default + + # Current patch is too aggressive to apply unconditionally, see Bug #801571 + if use 24-bit-color; then + eapply "${WORKDIR}"/${COLOUR_PATCH_NAME} + fi + + # custom patches + if use font-width; then + eapply "${FILESDIR}"/${PN}-9.22-font-width-fix.patch + fi + if use line-spacing; then + eapply "${FILESDIR}"/${PN}-9.22-line-spacing-fix.patch + fi + if use wide-glyphs; then + eapply "${FILESDIR}"/${PN}-9.26-enable-wide-glyphs.patch + fi + if use use-space; then + eapply "${FILESDIR}"/${PN}-9.22-add-space-to-extent_test_chars.patch + fi + + # kill the rxvt-unicode terminfo file - #192083 + sed -i -e "/rxvt-unicode.terminfo/d" doc/Makefile.in || die "sed failed" + + # use xsubpp from Prefix - #506500 + hprefixify -q '"' -w "/xsubpp/" src/Makefile.in +} + +src_configure() { + # --enable-everything goes first: the order of the arguments matters + local myconf=( + --enable-everything + $(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 smart-resize) + $(use_enable startup-notification) + $(use_enable unicode3) + $(use_enable utmp) + $(use_enable wide-glyphs) + $(use_enable wtmp) + $(use_enable xft) + ) + if use 24-bit-color; then + myconf+=( --enable-24-bit-color ) + fi + if use wide-glyphs; then + myconf+=( --enable-wide-glyphs ) + fi + econf "${myconf[@]}" +} + +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 + systemd_douserunit "${FILESDIR}"/urxvtd.socket + + 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 +} diff --git a/rxvt-unicode/rxvt-unicode-9.30-r10.ebuild b/rxvt-unicode/rxvt-unicode-9.30-r10.ebuild new file mode 100644 index 0000000..273d35f --- /dev/null +++ b/rxvt-unicode/rxvt-unicode-9.30-r10.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# NOTE(gryf): this ebuild differ from official one by using 3rd party patches, +# and configuration options, which are absent in official ebuild, but are +# accepted by configure script: +# enabled options as a use flags: +# - smart-resize +# 3rd party patches (by flags): +# - font-width - use xOff instead of width attribute for a glyph. +# - line-spacing - use ascent, descent and height from XftFont *f instead of +# FT_Face face. +# - use-space - add space for characters to figure out width and height of +# chars +# - wide-glyphs - add support for wide glyphs +EAPI=8 + +inherit autotools desktop systemd prefix + +COLOUR_PATCH_NAME="${PN}-9.29_24-bit-color_aur-9.26-20210712.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="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="24-bit-color 256-color blink fading-colors +font-styles -font-width + gdk-pixbuf iso14755 -line-spacing +mousewheel +perl -smart-resize + -use-space startup-notification unicode3 -wide-glyphs xft" + +RDEPEND=">=sys-libs/ncurses-5.7-r6:= + dev-libs/libptytty + media-libs/fontconfig + x11-libs/libX11 + x11-libs/libXrender + x11-libs/libXt + 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" +# autoconf dependency hopefully temporary, see Bug #827852 +BDEPEND="virtual/pkgconfig + >=sys-devel/autoconf-2.71" + +PATCHES=( + "${FILESDIR}"/${PN}-9.06-case-insensitive-fs.patch + "${FILESDIR}"/${PN}-9.21-xsubpp.patch +) +DOCS=( + Changes + README.FAQ + doc/README.xvt + doc/changes.txt + doc/etc/${PN}.term{cap,info} + doc/rxvt-tabbed +) + +src_prepare() { + default + + # Current patch is too aggressive to apply unconditionally, see Bug #801571 + if use 24-bit-color; then + eapply "${WORKDIR}"/${COLOUR_PATCH_NAME} + eautoreconf + fi + + # custom patches + if use font-width; then + eapply "${FILESDIR}"/${PN}-9.22-font-width-fix.patch + fi + if use line-spacing; then + eapply "${FILESDIR}"/${PN}-9.22-line-spacing-fix.patch + fi + if use wide-glyphs; then + eapply "${FILESDIR}"/${PN}-9.30-enable-wide-glyphs.patch + fi + if use use-space; then + eapply "${FILESDIR}"/${PN}-9.22-add-space-to-extent_test_chars.patch + fi + + # kill the rxvt-unicode terminfo file - #192083 + sed -i -e "/rxvt-unicode.terminfo/d" doc/Makefile.in || die "sed failed" + + # use xsubpp from Prefix - #506500 + hprefixify -q '"' -w "/xsubpp/" src/Makefile.in +} + +src_configure() { + # --enable-everything goes first: the order of the arguments matters + local myconf=( + --enable-everything + $(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 smart-resize) + $(use_enable startup-notification) + $(use_enable unicode3) + $(use_enable wide-glyphs) + $(use_enable xft) + ) + if use 24-bit-color; then + myconf+=( --enable-24-bit-color ) + fi + if use wide-glyphs; then + myconf+=( --enable-wide-glyphs ) + fi + econf "${myconf[@]}" +} + +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 + systemd_douserunit "${FILESDIR}"/urxvtd.socket + + 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 +}