forked from hasufell/hasufell-repository
neovim-gtk: version bump to 0.2.0
This commit is contained in:
parent
8b391c4392
commit
71f5fd7e1d
@ -0,0 +1,50 @@
|
||||
Upstream: yes
|
||||
Reason: https://github.com/daa84/neovim-gtk/issues/208
|
||||
|
||||
From c1dbe9b9549383b22807a2de9c76094ca9204f51 Mon Sep 17 00:00:00 2001
|
||||
From: daa <daa@localhost.localdomain>
|
||||
Date: Tue, 26 Nov 2019 19:25:42 +0300
|
||||
Subject: [PATCH] Try to fix render issues due to changes in pango_1.44 (#208)
|
||||
|
||||
---
|
||||
src/render/context.rs | 20 +++++++++-----------
|
||||
1 file changed, 9 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/render/context.rs b/src/render/context.rs
|
||||
index 8168296..0c19437 100644
|
||||
--- a/src/render/context.rs
|
||||
+++ b/src/render/context.rs
|
||||
@@ -111,21 +111,19 @@ pub struct CellMetrics {
|
||||
|
||||
impl CellMetrics {
|
||||
fn new(font_metrics: &pango::FontMetrics, line_space: i32) -> Self {
|
||||
+ let ascent = (f64::from(font_metrics.get_ascent()) / f64::from(pango::SCALE)).ceil();
|
||||
+ let descent = (f64::from(font_metrics.get_descent()) / f64::from(pango::SCALE)).ceil();
|
||||
+ let underline_position = (f64::from(font_metrics.get_underline_position()) / f64::from(pango::SCALE)).ceil();
|
||||
CellMetrics {
|
||||
pango_ascent: font_metrics.get_ascent(),
|
||||
pango_descent: font_metrics.get_descent(),
|
||||
pango_char_width: font_metrics.get_approximate_digit_width(),
|
||||
- ascent: f64::from(font_metrics.get_ascent()) / f64::from(pango::SCALE),
|
||||
- line_height: f64::from(font_metrics.get_ascent() + font_metrics.get_descent())
|
||||
- / f64::from(pango::SCALE)
|
||||
- + f64::from(line_space),
|
||||
- char_width: f64::from(font_metrics.get_approximate_digit_width())
|
||||
- / f64::from(pango::SCALE),
|
||||
- underline_position: f64::from(
|
||||
- font_metrics.get_ascent() - font_metrics.get_underline_position(),
|
||||
- ) / f64::from(pango::SCALE),
|
||||
- underline_thickness: f64::from(font_metrics.get_underline_thickness())
|
||||
- / f64::from(pango::SCALE),
|
||||
+ ascent,
|
||||
+ line_height: ascent + descent + f64::from(line_space),
|
||||
+ char_width: (f64::from(font_metrics.get_approximate_digit_width())
|
||||
+ / f64::from(pango::SCALE)).ceil(),
|
||||
+ underline_position: ascent - underline_position,
|
||||
+ underline_thickness: f64::from(font_metrics.get_underline_thickness()) / f64::from(pango::SCALE),
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
@ -11,16 +11,13 @@ DEPENDENCIES="
|
||||
app-editors/neovim
|
||||
dev-libs/glib:2
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3[>=3.10.0]
|
||||
x11-libs/gtk+:3[>=3.22.0]
|
||||
x11-libs/pango
|
||||
run:
|
||||
gnome-desktop/gsettings-desktop-schemas
|
||||
"
|
||||
|
||||
src_install() {
|
||||
ecargo_install
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}"/Try-to-fix-render-issues-due-to-changes-in-pango_1.4.patch
|
||||
)
|
||||
|
||||
insinto /usr/share/applications
|
||||
doins desktop/*.desktop
|
||||
|
||||
insinto /usr/share/icons/hicolor/128x128/apps
|
||||
doins desktop/nvim-gtk.png
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
# Copyright 2018 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require neovim-gtk gtk-icon-cache
|
||||
require neovim-gtk
|
||||
|
||||
DOWNLOADS=""
|
||||
|
||||
@ -15,27 +15,11 @@ DEPENDENCIES="
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3[>=3.22.0]
|
||||
x11-libs/pango[>=1.38]
|
||||
run:
|
||||
gnome-desktop/gsettings-desktop-schemas
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
cargo_src_unpack
|
||||
}
|
||||
|
||||
src_install() {
|
||||
ecargo_install
|
||||
|
||||
insinto /usr/share/nvim-gtk
|
||||
doins -r runtime
|
||||
|
||||
insinto /usr/share/applications
|
||||
doins desktop/*.desktop
|
||||
|
||||
insinto /usr/share/icons/hicolor/128x128/apps
|
||||
newins desktop/org.daa.NeovimGtk_128.png org.daa.NeovimGtk.png
|
||||
insinto /usr/share/icons/hicolor/48x48/apps
|
||||
newins desktop/org.daa.NeovimGtk_48.png org.daa.NeovimGtk.png
|
||||
insinto /usr/share/icons/hicolor/scalable/apps
|
||||
newins desktop/org.daa.NeovimGtk.svg org.daa.NeovimGtk.png
|
||||
insinto /usr/share/icons/hicolor/symbolic/apps
|
||||
newins desktop/org.daa.NeovimGtk-symbolic.svg org.daa.NeovimGtk.png
|
||||
}
|
||||
|
@ -11,11 +11,26 @@ HOMEPAGE="https://github.com/daa84/neovim-gtk ${HOMEPAGE}"
|
||||
LICENCES="GPL-3.0"
|
||||
MYOPTIONS=""
|
||||
|
||||
BUGS_TO="hasufell@posteo.de"
|
||||
src_install() {
|
||||
ecargo_install
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
export PREFIX=/usr
|
||||
insinto /usr/share/nvim-gtk
|
||||
doins -r runtime
|
||||
|
||||
insinto /usr/share/applications
|
||||
doins desktop/*.desktop
|
||||
|
||||
local s
|
||||
for s in 48 128; do
|
||||
insinto /usr/share/icons/hicolor/${s}x${s}/apps
|
||||
newins desktop/org.daa.NeovimGtk_${s}.png org.daa.NeovimGtk.png
|
||||
done
|
||||
|
||||
insinto /usr/share/icons/hicolor/scalable/apps
|
||||
newins desktop/org.daa.NeovimGtk.svg org.daa.NeovimGtk.png
|
||||
|
||||
insinto /usr/share/icons/hicolor/symbolic/apps
|
||||
newins desktop/org.daa.NeovimGtk-symbolic.svg org.daa.NeovimGtk.png
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
Loading…
Reference in New Issue
Block a user