From d6d78bc82a73bfa992e43646c112813dd95365c1 Mon Sep 17 00:00:00 2001 From: haarp Date: Fri, 11 Aug 2023 16:27:00 +0200 Subject: Upgrade screenruler to GTK3 version Signed-off-by: haarp --- app-misc/screenruler/Manifest | 4 +- app-misc/screenruler/files/fix-ruby-2.5.0.patch | 43 ------------------ app-misc/screenruler/screenruler-0.9.6-r2.ebuild | 55 ------------------------ app-misc/screenruler/screenruler-9999.ebuild | 28 ++++++++++++ 4 files changed, 29 insertions(+), 101 deletions(-) delete mode 100644 app-misc/screenruler/files/fix-ruby-2.5.0.patch delete mode 100644 app-misc/screenruler/screenruler-0.9.6-r2.ebuild create mode 100644 app-misc/screenruler/screenruler-9999.ebuild diff --git a/app-misc/screenruler/Manifest b/app-misc/screenruler/Manifest index 7ed42ea..57c4f2c 100644 --- a/app-misc/screenruler/Manifest +++ b/app-misc/screenruler/Manifest @@ -1,3 +1 @@ -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-r2.ebuild 1304 BLAKE2B 0c6d9593ce894b38366745f87ea93c97af96d4b7cf81e7e8f70d816b37f9f35d882c2ae94c4b07e3b4a23a2fbd581a1d629f607fc9b57047231823247a464294 SHA512 d46c7c7ed776ae94b9ad8a474a98d218e1ba80d2f51f18db10a929873cff442d172ec728c4c09b193abc657b285db32a78d883f1c3494bd3a8c2133cea772cb6 +EBUILD screenruler-9999.ebuild 653 BLAKE2B e758bf7e862ea0073ad30cbbfb9a9f049d92b5dc158c8f019e203cb77d79f23993f1e74e5a97425f5217a388dce2589e6e158b922c75ccc7815844d7536fde64 SHA512 fda9a0c7b476688df5570639ef5294687ad91587b87fe271f8f5bb0c1f06966318d93aaaea8f6f613f16cb053733a3f203a8f2937658c0b871dbbe289ba09823 diff --git a/app-misc/screenruler/files/fix-ruby-2.5.0.patch b/app-misc/screenruler/files/fix-ruby-2.5.0.patch deleted file mode 100644 index 9707ddc..0000000 --- a/app-misc/screenruler/files/fix-ruby-2.5.0.patch +++ /dev/null @@ -1,43 +0,0 @@ -https://bugs.launchpad.net/screenruler/+bug/1900364 - ---- a/ruler_window.glade -+++ b/ruler_window.glade -@@ -11,7 +11,6 @@ - 36 - dialog - False -- False - - - ---- 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-r2.ebuild b/app-misc/screenruler/screenruler-0.9.6-r2.ebuild deleted file mode 100644 index 8a3efe8..0000000 --- a/app-misc/screenruler/screenruler-0.9.6-r2.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit desktop xdg - -DESCRIPTION="Measure objects on your desktop using six different metrics" -HOMEPAGE="https://gnomecoder.wordpress.com/screenruler/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" -SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" - -RDEPEND="dev-lang/ruby - dev-ruby/ruby-gettext - dev-ruby/ruby-gtk2" - -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 || die -} - -# There is no installation mechanism, so just put everything in the right place -src_install() { - insinto /usr/share/${PN} - doins *.rb - doins *.glade - doins *.png - insinto /usr/share/${PN}/utils - doins utils/* - - exeinto /usr/share/${PN} - doexe screenruler.rb - - 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;" -} - -pkg_postinst() { - xdg_desktop_database_update -} -pkg_postrm() { - xdg_desktop_database_update -} diff --git a/app-misc/screenruler/screenruler-9999.ebuild b/app-misc/screenruler/screenruler-9999.ebuild new file mode 100644 index 0000000..55060f5 --- /dev/null +++ b/app-misc/screenruler/screenruler-9999.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop git-r3 xdg + +DESCRIPTION="Measure objects on your desktop using six different metrics" +HOMEPAGE="https://salsa.debian.org/georgesk/screenruler" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +EGIT_REPO_URI="https://salsa.debian.org/georgesk/screenruler.git" + +RDEPEND="dev-ruby/ruby-gettext + dev-ruby/ruby-gtk3" + +pkg_postinst() { + xdg_desktop_database_update + + elog "If the app starts to a blank window," + elog "right-click on it and play around with the DPI settings" +} +pkg_postrm() { + xdg_desktop_database_update +} -- cgit v1.2.3-65-gdbad