From 4e48f39b336f9535c3bbf03e043f4a50370fbd1b Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Tue, 29 Jun 2021 16:32:26 -0400 Subject: games-board/camato: fix crash on keyboard events Signed-off-by: Ionen Wolkens --- games-board/camato/camato-0.7.4-r1.ebuild | 39 -------------------- games-board/camato/camato-0.7.4-r2.ebuild | 43 ++++++++++++++++++++++ .../files/camato-0.7.4-implicit-string.patch | 8 ++++ 3 files changed, 51 insertions(+), 39 deletions(-) delete mode 100644 games-board/camato/camato-0.7.4-r1.ebuild create mode 100644 games-board/camato/camato-0.7.4-r2.ebuild create mode 100644 games-board/camato/files/camato-0.7.4-implicit-string.patch (limited to 'games-board/camato') diff --git a/games-board/camato/camato-0.7.4-r1.ebuild b/games-board/camato/camato-0.7.4-r1.ebuild deleted file mode 100644 index 92df74471f24..000000000000 --- a/games-board/camato/camato-0.7.4-r1.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -USE_RUBY="ruby25 ruby26 ruby27" -inherit desktop ruby-ng - -DESCRIPTION="Map editor for the game gnocatan" -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" -SRC_URI=" - mirror://gentoo/${PN}-$(ver_rs 1- _).tar.gz - https://dev.gentoo.org/~ionen/distfiles/${PN}.png" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -ruby_add_rdepend dev-ruby/ruby-gtk2 - -all_ruby_prepare() { - # this is really single target, but ruby-single is too limited - local ruby=$(ruby_get_use_implementations) - sed -i "1c\\#!$(ruby_implementation_command ${ruby##* })" ${PN} || die - - rm Makefile || die -} - -all_ruby_install() { - dobin ${PN} - - insinto /usr/share/${PN} - doins -r *.rb img - - einstalldocs - - doicon "${DISTDIR}"/${PN}.png - make_desktop_entry ${PN} Camato -} diff --git a/games-board/camato/camato-0.7.4-r2.ebuild b/games-board/camato/camato-0.7.4-r2.ebuild new file mode 100644 index 000000000000..7dc2af199883 --- /dev/null +++ b/games-board/camato/camato-0.7.4-r2.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +USE_RUBY="ruby25 ruby26 ruby27" +inherit desktop ruby-ng + +DESCRIPTION="Map editor for the game gnocatan" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" +SRC_URI=" + mirror://gentoo/${PN}-$(ver_rs 1- _).tar.gz + https://dev.gentoo.org/~ionen/distfiles/${PN}.png" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +ruby_add_rdepend dev-ruby/ruby-gtk2 + +PATCHES=( + "${FILESDIR}"/${P}-implicit-string.patch +) + +all_ruby_prepare() { + # this is really single target, but ruby-single is too limited + local ruby=$(ruby_get_use_implementations) + sed -i "1c\\#!$(ruby_implementation_command ${ruby##* })" ${PN} || die + + rm Makefile || die +} + +all_ruby_install() { + dobin ${PN} + + insinto /usr/share/${PN} + doins -r *.rb img + + einstalldocs + + doicon "${DISTDIR}"/${PN}.png + make_desktop_entry ${PN} Camato +} diff --git a/games-board/camato/files/camato-0.7.4-implicit-string.patch b/games-board/camato/files/camato-0.7.4-implicit-string.patch new file mode 100644 index 000000000000..e631b07a87a8 --- /dev/null +++ b/games-board/camato/files/camato-0.7.4-implicit-string.patch @@ -0,0 +1,8 @@ +Crashes on keyboard events otherwise. +--- a/map.rb ++++ b/map.rb +@@ -35,3 +35,3 @@ + if i < 0 or i > 255 then i = 0 end +- my_str[0] = i ++ my_str[0] = i.to_s + set_resource(my_str) -- cgit v1.2.3-65-gdbad