rxvt-unicode-cvs-opt with some patches from rxvt-unicode-patched

This commit is contained in:
Von Random 2018-02-21 19:27:42 +03:00
parent aa5ae9e46c
commit d025a7935b
4 changed files with 74 additions and 9 deletions

View file

@ -1,4 +1,5 @@
# Maintainer: Adriaan Zonnenberg <amz@adriaan.xyz> # Maintainer: Von Random <von@vdrandom.org>
# Contributor: Adriaan Zonnenberg <amz@adriaan.xyz>
# Contributor: Florian Bruhin (The-Compiler) <archlinux.org@the-compiler.org> # Contributor: Florian Bruhin (The-Compiler) <archlinux.org@the-compiler.org>
# Contributor: Daniel Micay <danielmicay@gmail.com> # Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: Sébastien Luttringer # Contributor: Sébastien Luttringer
@ -7,8 +8,8 @@
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
_pkgname=rxvt-unicode _pkgname=rxvt-unicode
pkgname=rxvt-unicode-cvs pkgname=rxvt-unicode-cvs-opt
pkgver=20170518 pkgver=20180221
pkgrel=1 pkgrel=1
pkgdesc='A unicode enabled rxvt-clone terminal emulator (urxvt) - latest cvs revision' pkgdesc='A unicode enabled rxvt-clone terminal emulator (urxvt) - latest cvs revision'
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -17,19 +18,32 @@ license=('GPL')
depends=('libxft' 'perl' 'startup-notification' 'rxvt-unicode-terminfo') depends=('libxft' 'perl' 'startup-notification' 'rxvt-unicode-terminfo')
makedepends=('cvs') makedepends=('cvs')
optdepends=('gtk2-perl: to use the urxvt-tabbed') optdepends=('gtk2-perl: to use the urxvt-tabbed')
source=(
'font-width-fix.patch'
'line-spacing-fix.patch'
'urxvt-sgr.patch'
)
sha256sums=(
'686770fe4e8d6bb0ba497ad2e1f217d17515f2544d80abe76496c63ead2bfaa4'
'546a388d0595404a59c71c3eaeba331031032a75f96c57e9a860f27bbd7ebfcc'
'f36110dce2dce4d6e275410de820f314b72a02dbad08f637c64b0da769c0c8f4'
)
prefix='/opt/rxvt-unicode'
prepare() { prepare() {
cd ${srcdir}
cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co ${_pkgname} cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co ${_pkgname}
cd ${_pkgname}
patch -p0 -i ../font-width-fix.patch
patch -p0 -i ../line-spacing-fix.patch
patch -p0 -i ../urxvt-sgr.patch
} }
build() { build() {
cd ${srcdir}/${_pkgname} cd ${_pkgname}
patch -p0 < ../../urxvt-sgr.patch
# we disable smart-resize (FS#34807)
# do not specify --with-terminfo (FS#46424) # do not specify --with-terminfo (FS#46424)
./configure \ ./configure \
--prefix=/opt/urxvt \ --prefix=${prefix} \
--enable-256-color \ --enable-256-color \
--enable-combining \ --enable-combining \
--enable-fading \ --enable-fading \
@ -44,7 +58,7 @@ build() {
--enable-rxvt-scroll \ --enable-rxvt-scroll \
--enable-selectionscrolling \ --enable-selectionscrolling \
--enable-slipwheeling \ --enable-slipwheeling \
--disable-smart-resize \ --enable-smart-resize \
--enable-startup-notification \ --enable-startup-notification \
--enable-transparency \ --enable-transparency \
--enable-unicode3 \ --enable-unicode3 \

View file

@ -0,0 +1,26 @@
--- src/rxvtfont.C.bukind 2007-11-30 14:36:33.000000000 +0600
+++ src/rxvtfont.C 2007-11-30 14:39:29.000000000 +0600
@@ -1171,12 +1171,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;
}

View file

@ -0,0 +1,25 @@
--- src/rxvtfont.C.orig 2011-07-20 22:19:29.878012201 -0300
+++ src/rxvtfont.C 2011-07-20 22:19:33.634671723 -0300
@@ -1237,11 +1237,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);