gentoo-ebuilds/dev-ruby/gettext_i18n_rails/gettext_i18n_rails-1.13.0.ebuild
Hans de Graaff 3b44d44658
dev-ruby/gettext_i18n_rails: enable ruby33
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
2024-09-24 07:09:03 +02:00

48 lines
1.2 KiB
Bash

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
USE_RUBY="ruby31 ruby32 ruby33"
RUBY_FAKEGEM_EXTRADOC="Readme.md"
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
RUBY_FAKEGEM_GEMSPEC="gettext_i18n_rails.gemspec"
inherit ruby-fakegem
DESCRIPTION="FastGettext / Rails integration"
HOMEPAGE="https://github.com/grosser/gettext_i18n_rails"
SRC_URI="https://github.com/grosser/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="public-domain"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
PATCHES=( "${FILESDIR}/${P}-rails71.patch" )
ruby_add_bdepend "test? (
dev-ruby/rails:7.1
dev-ruby/activerecord:7.1[sqlite]
dev-ruby/temple
dev-ruby/ruby-gettext
dev-ruby/haml
dev-ruby/slim
)"
ruby_add_rdepend ">=dev-ruby/fast_gettext-0.9.0:*"
all_ruby_prepare() {
rm Gemfile Gemfile.lock || die
sed -i -e 's/git ls-files/find/' ${RUBY_FAKEGEM_GEMSPEC} || die
# Remove specs for slim and hamlet, template engines we don't package.
rm spec/gettext_i18n_rails/slim_parser_spec.rb spec/gettext_i18n_rails/haml_parser_spec.rb || die
# Test against specific Rails version
sed -e '1igem "rails", "~>7.1.0"' -i spec/spec_helper.rb || die
}