neovim-gtk: version bump to 0.2.0 #43
| @ -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() { | ||||
| 
				
					
						kapsh
						commented  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 | ||||
| } | ||||
|  | ||||
| @ -11,11 +11,26 @@ HOMEPAGE="https://github.com/daa84/neovim-gtk ${HOMEPAGE}" | ||||
| LICENCES="GPL-3.0" | ||||
| MYOPTIONS="" | ||||
| 
 | ||||
| BUGS_TO="hasufell@posteo.de" | ||||
| 
				
					
						kapsh
						commented  Removed from recommended metadata in  Removed from recommended metadata in https://gitlab.exherbo.org/exherbo-misc/docs/-/commit/8886e87da9dfd3818892e334f2c96d83d1d6fb7d | ||||
| src_install() { | ||||
|     ecargo_install | ||||
| 
 | ||||
| src_prepare() { | ||||
|     default | ||||
|     export PREFIX=/usr | ||||
| 
				
					
						kapsh
						commented  Guess it's fine without PREFIX set: 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/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 | ||||
| 
				
					
						hasufell
						commented  I'm pedantic, but  I'm pedantic, but `unset s`, although it's not needed here... I consider it good practice in bash. 
				
					
						kapsh
						commented  As usual, I forgot to  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() { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
(NeovimGtk:23745): GLib-GIO-ERROR **: 01:45:31.695: Settings schema 'org.gnome.desktop.interface' is not installed