diff options
author | Hans de Graaff <graaff@gentoo.org> | 2022-08-02 07:33:14 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2022-08-02 07:35:31 +0200 |
commit | c8f2bbe848a1ad81f23db9f8fba1e2d65f433b46 (patch) | |
tree | 424f3b11f237d52f8baab18d55802fc48dba415d /dev-ruby | |
parent | media-sound/abcmidi: bump to 2022.07.31 (diff) | |
download | gentoo-c8f2bbe848a1ad81f23db9f8fba1e2d65f433b46.tar.gz gentoo-c8f2bbe848a1ad81f23db9f8fba1e2d65f433b46.tar.bz2 gentoo-c8f2bbe848a1ad81f23db9f8fba1e2d65f433b46.zip |
dev-ruby/crack: add rexml dep to gemspec file
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/crack/crack-0.4.4-r3.ebuild | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dev-ruby/crack/crack-0.4.4-r3.ebuild b/dev-ruby/crack/crack-0.4.4-r3.ebuild new file mode 100644 index 000000000000..7f44edcffee6 --- /dev/null +++ b/dev-ruby/crack/crack-0.4.4-r3.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby27 ruby30 ruby31" + +RUBY_FAKEGEM_EXTRADOC="README.md History" + +RUBY_FAKEGEM_GEMSPEC="crack.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="Really simple JSON and XML parsing, ripped from Merb and Rails" +HOMEPAGE="https://github.com/jnunemaker/crack" +SRC_URI="https://github.com/jnunemaker/crack/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +PATCHES=( "${FILESDIR}/${P}-psych4.patch" ) + +ruby_add_rdepend "dev-ruby/rexml" + +ruby_add_bdepend "test? ( dev-ruby/minitest )" + +all_ruby_prepare() { + sed -i -e 's/git ls-files --/find/' ${RUBY_FAKEGEM_GEMSPEC} || die + + # Also list rexml in the gemspec. This is fixed upstream in 0.4.5 but that version is not tagged. + sed -i -e '17igem.add_runtime_dependency("rexml")' ${RUBY_FAKEGEM_GEMSPEC} || die +} + +each_ruby_prepare() { + # Remove tests which fail when run by portage but pass when run by hand + sed -i -e '/{"regex": \/foo.*\/}/d' test/json_test.rb || die + sed -i -e '/{"regex": \/foo.*\/i}/d' test/json_test.rb || die + sed -i -e '/{"regex": \/foo.*\/mix}/d' test/json_test.rb || die +} + +each_ruby_test() { + ${RUBY} -Itest -Ilib -e 'Dir["test/*_test.rb"].each { |f| load f }' || die +} |