summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaarp <main.haarp@gmail.com>2020-10-19 23:13:58 +0200
committerhaarp <main.haarp@gmail.com>2020-10-19 23:13:58 +0200
commit1a1cb5af2e7614a7cb1910c55d2847bd74828837 (patch)
tree5a305dba2db397946642b35de371492654467b63
parentMore system libs for Zandronum, make use flags (diff)
downloadhaarp-1a1cb5af2e7614a7cb1910c55d2847bd74828837.tar.gz
haarp-1a1cb5af2e7614a7cb1910c55d2847bd74828837.tar.bz2
haarp-1a1cb5af2e7614a7cb1910c55d2847bd74828837.zip
Fix Screenruler for Ruby-2.5.0+ and fix some other things, #750026
Signed-off-by: haarp <main.haarp@gmail.com>
-rw-r--r--app-misc/screenruler/Manifest3
-rw-r--r--app-misc/screenruler/files/fix-ruby-2.5.0.patch43
-rw-r--r--app-misc/screenruler/screenruler-0.9.6-r2.ebuild (renamed from app-misc/screenruler/screenruler-0.9.6-r1.ebuild)31
3 files changed, 64 insertions, 13 deletions
diff --git a/app-misc/screenruler/Manifest b/app-misc/screenruler/Manifest
index 54f3364..f228f80 100644
--- a/app-misc/screenruler/Manifest
+++ b/app-misc/screenruler/Manifest
@@ -1,2 +1,3 @@
+AUX fix-ruby-2.5.0.patch 1581 BLAKE2B 3260ccb254074be3907c99fdac7f84b3f72081041a074d7a7496c9aa5116b7b31abcaf51f38f7ba1d2dd8b31e74d51aa43117a08bc4cd12fc5b6b76fcca668bc SHA512 90f037b8600f800c20934b8b1cc3c48ab41cdc5334e4b8dff1a7b3b74d4c98ede7be78bf79363310234fce0c18a80bc283736d93339be9ce2239b0a79b092050
DIST screenruler-0.9.6.tar.gz 22804 BLAKE2B e0dde2b9738e21dceeae321a2c467bc1022001561a3f17f400c7b1cf46a8bf791c286d51d5be3d9f8e9d4ef13fffa844e6abc670103bcc3e0fd5ce45e05ab868 SHA512 e10eb88f878c3744f68d8146ee127e3559a2339e4073bf423b5b49cb4dd1ab64fc4273a645c243c3f4898747bf59085a406e7b3e5f033e002ec274bff26f41a2
-EBUILD screenruler-0.9.6-r1.ebuild 1164 BLAKE2B 3577d1abfe00e875dfb836ca4e7c552cfbb0449d6686f92fdd68afa798338357fdad9e3d8237ea584b438391ed65a1a795c66e245262bb5de0e7079e5620b723 SHA512 5be37ac9b713b89c66debd6d163664537d332f3c3521d78f778400770012ebb288be799d40fd03ebd4c880872fa6ac6194efc133b8c16c1edd9fd0139a984f7f
+EBUILD screenruler-0.9.6-r2.ebuild 1332 BLAKE2B dd7b40706a950e0515e97f2b7790d3258d09bf0993dbbaa7994bee3ba100239dd066a797d75a8106f8c540321a8d0ea7a6aee3d962515ec59ac0ac9ffd442e46 SHA512 898b8a1bb9e1b7f6beabacecc656393ee2966c8f534a7fb04eacb3aa6eb6d51e5a8d0faaaa90c3896a70c94f41516db425e80fd7828ed62d8d41f7280fbe058c
diff --git a/app-misc/screenruler/files/fix-ruby-2.5.0.patch b/app-misc/screenruler/files/fix-ruby-2.5.0.patch
new file mode 100644
index 0000000..9707ddc
--- /dev/null
+++ b/app-misc/screenruler/files/fix-ruby-2.5.0.patch
@@ -0,0 +1,43 @@
+https://bugs.launchpad.net/screenruler/+bug/1900364
+
+--- a/ruler_window.glade
++++ b/ruler_window.glade
+@@ -11,7 +11,6 @@
+ <property name="default_height">36</property>
+ <property name="type_hint">dialog</property>
+ <property name="decorated">False</property>
+- <property name="has_resize_grip">False</property>
+ <signal name="button-press-event" handler="on_button_press_event" swapped="no"/>
+ <signal name="key-press-event" handler="on_key_press_event" swapped="no"/>
+ <signal name="delete-event" handler="on_delete_event" swapped="no"/>
+--- a/ruler_window.rb
++++ b/ruler_window.rb
+@@ -243,7 +243,7 @@
+
+ # Loop, drawing ticks (top and bottom) and labels
+ repetitions, tick_index = 0, 0
+- loop(pixels_per_tick, length + OVERDRAW, pixels_per_tick) { |x|
++ loopn(pixels_per_tick, length + OVERDRAW, pixels_per_tick) { |x|
+ x = x.floor + 0.5 # Cairo likes lines in the 'center' of pixels
+
+ tick_size = @@tick_sizes[ unit.tick_pattern[tick_index, 1].to_s ]
+@@ -332,7 +332,7 @@
+
+ # Fill with 'horizontal' lines
+ cr.set_source_color($preferences_window.foreground_color)
+- loop(@menu_box.y + 2.5, @menu_box.y + @menu_box.height + -1.5, 2) { |y|
++ loopn(@menu_box.y + 2.5, @menu_box.y + @menu_box.height + -1.5, 2) { |y|
+ cr.move_to(@menu_box.x + 2.0, y)
+ cr.line_to(@menu_box.x + @menu_box.width - 1, y)
+ }
+--- a/utils/addons_ruby.rb
++++ b/utils/addons_ruby.rb
+@@ -59,7 +59,7 @@
+ list.each { |file| orig_require(file) }
+ end
+
+- def loop(from, to, step=1)
++ def loopn(from, to, step=1)
+ i = from
+ while i <= to
+ yield i
diff --git a/app-misc/screenruler/screenruler-0.9.6-r1.ebuild b/app-misc/screenruler/screenruler-0.9.6-r2.ebuild
index a82fc6d..67364ab 100644
--- a/app-misc/screenruler/screenruler-0.9.6-r1.ebuild
+++ b/app-misc/screenruler/screenruler-0.9.6-r2.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit eutils
+inherit desktop xdg
DESCRIPTION="Measure objects on your desktop using six different metrics"
-HOMEPAGE="http://gnomecoder.wordpress.com/screenruler/"
+HOMEPAGE="https://gnomecoder.wordpress.com/screenruler/"
LICENSE="GPL-2"
SLOT="0"
@@ -21,6 +21,8 @@ RDEPEND="dev-lang/ruby
S="${WORKDIR}/screenruler"
src_prepare() {
+ eapply "${FILESDIR}/fix-ruby-2.5.0.patch"
+
eapply_user
sed -i -e "/\$LOAD_PATH << '.\/utils'/a\$LOAD_PATH << '.'" screenruler.rb
@@ -28,21 +30,26 @@ src_prepare() {
# There is no installation mechanism, so just put everything in the right place
src_install() {
- cd "${S}"
-
insinto /usr/share/${PN}
- doins *.rb
- doins *.glade
- doins *.png
+ doins *.rb || die
+ doins *.glade || die
+ doins *.png || die
insinto /usr/share/${PN}/utils
- doins utils/*
+ doins utils/* || die
exeinto /usr/share/${PN}
- doexe screenruler.rb
+ doexe screenruler.rb || die
dosym /usr/share/${PN}/screenruler.rb /usr/bin/screenruler
dosym /usr/share/${PN}/screenruler-icon-64x64.png /usr/share/pixmaps/screenruler.png
# it won't launch if stderr is not a terminal/pipe??!
- make_desktop_entry "sh -c 'screenruler 2>/dev/null'" "Screen Ruler" screenruler "Utility;GTK;"
+ make_desktop_entry 'sh -c "screenruler 2>/dev/null"' "Screen Ruler" screenruler "Utility;GTK;"
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+}
+pkg_postrm() {
+ xdg_desktop_database_update
}