neovim-gtk: version bump to 0.2.0 #43

Merged
kapsh merged 1 commits from kapsh/hasufell-repository:nvim into master 2021-01-07 02:07:40 +00:00
4 changed files with 78 additions and 32 deletions

View File

@ -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

View File

@ -11,16 +11,13 @@ DEPENDENCIES="
app-editors/neovim app-editors/neovim
dev-libs/glib:2 dev-libs/glib:2
x11-libs/cairo x11-libs/cairo
x11-libs/gtk+:3[>=3.10.0] x11-libs/gtk+:3[>=3.22.0]
x11-libs/pango x11-libs/pango
run:
gnome-desktop/gsettings-desktop-schemas
" "
src_install() { DEFAULT_SRC_PREPARE_PATCHES=(
ecargo_install "${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
}

View File

@ -1,7 +1,7 @@
# Copyright 2018 Julian Ospald <hasufell@posteo.de> # Copyright 2018 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
require neovim-gtk gtk-icon-cache require neovim-gtk
DOWNLOADS="" DOWNLOADS=""
@ -15,27 +15,11 @@ DEPENDENCIES="
x11-libs/cairo x11-libs/cairo
x11-libs/gtk+:3[>=3.22.0] x11-libs/gtk+:3[>=3.22.0]
x11-libs/pango[>=1.38] x11-libs/pango[>=1.38]
run:
gnome-desktop/gsettings-desktop-schemas
Outdated
Review

(NeovimGtk:23745): GLib-GIO-ERROR **: 01:45:31.695: Settings schema 'org.gnome.desktop.interface' is not installed

(NeovimGtk:23745): GLib-GIO-ERROR **: 01:45:31.695: Settings schema 'org.gnome.desktop.interface' is not installed
" "
src_unpack() { src_unpack() {
cargo_src_unpack cargo_src_unpack
} }
src_install() {
Review

Moved into exlib, build+install tested for both versions.

Moved into exlib, build+install tested for both versions.
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
}

View File

@ -11,11 +11,26 @@ HOMEPAGE="https://github.com/daa84/neovim-gtk ${HOMEPAGE}"
LICENCES="GPL-3.0" LICENCES="GPL-3.0"
MYOPTIONS="" MYOPTIONS=""
BUGS_TO="hasufell@posteo.de" src_install() {
Review

Removed from recommended metadata in 8886e87da9

Removed from recommended metadata in https://gitlab.exherbo.org/exherbo-misc/docs/-/commit/8886e87da9dfd3818892e334f2c96d83d1d6fb7d
ecargo_install
src_prepare() { insinto /usr/share/nvim-gtk
default doins -r runtime
export PREFIX=/usr
Review

Guess it's fine without PREFIX set:

❯ cave files neovim-gtk
/usr
/usr/share
/usr/share/applications
/usr/share/applications/org.daa.NeovimGtk.desktop
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/128x128
/usr/share/icons/hicolor/128x128/apps
/usr/share/icons/hicolor/128x128/apps/org.daa.NeovimGtk.png
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/hicolor/48x48/apps/org.daa.NeovimGtk.png
/usr/share/icons/hicolor/scalable
/usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/scalable/apps/org.daa.NeovimGtk.png
/usr/share/icons/hicolor/symbolic
/usr/share/icons/hicolor/symbolic/apps
/usr/share/icons/hicolor/symbolic/apps/org.daa.NeovimGtk.png
/usr/share/nvim-gtk
/usr/share/nvim-gtk/runtime
/usr/share/nvim-gtk/runtime/plugin
/usr/share/nvim-gtk/runtime/plugin/nvim_gui_shim.vim
/usr/x86_64-pc-linux-gnu
/usr/x86_64-pc-linux-gnu/bin
/usr/x86_64-pc-linux-gnu/bin/nvim-gtk
Guess it's fine without PREFIX set: ``` ❯ cave files neovim-gtk /usr /usr/share /usr/share/applications /usr/share/applications/org.daa.NeovimGtk.desktop /usr/share/icons /usr/share/icons/hicolor /usr/share/icons/hicolor/128x128 /usr/share/icons/hicolor/128x128/apps /usr/share/icons/hicolor/128x128/apps/org.daa.NeovimGtk.png /usr/share/icons/hicolor/48x48 /usr/share/icons/hicolor/48x48/apps /usr/share/icons/hicolor/48x48/apps/org.daa.NeovimGtk.png /usr/share/icons/hicolor/scalable /usr/share/icons/hicolor/scalable/apps /usr/share/icons/hicolor/scalable/apps/org.daa.NeovimGtk.png /usr/share/icons/hicolor/symbolic /usr/share/icons/hicolor/symbolic/apps /usr/share/icons/hicolor/symbolic/apps/org.daa.NeovimGtk.png /usr/share/nvim-gtk /usr/share/nvim-gtk/runtime /usr/share/nvim-gtk/runtime/plugin /usr/share/nvim-gtk/runtime/plugin/nvim_gui_shim.vim /usr/x86_64-pc-linux-gnu /usr/x86_64-pc-linux-gnu/bin /usr/x86_64-pc-linux-gnu/bin/nvim-gtk ```
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

I'm pedantic, but unset s, although it's not needed here... I consider it good practice in bash.

I'm pedantic, but `unset s`, although it's not needed here... I consider it good practice in bash.
Outdated
Review

As usual, I forgot to local it. Fixed.

As usual, I forgot to `local` it. Fixed.
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() { pkg_postinst() {