commit:     0749b7b0c9b42454bc168632b95dcec7f2fcda3e
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 12 11:04:37 2024 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Tue Nov 12 11:04:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0749b7b0

dev-ruby/sqlite3: add 2.2.0

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 dev-ruby/sqlite3/Manifest             |  1 +
 dev-ruby/sqlite3/sqlite3-2.2.0.ebuild | 66 +++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/dev-ruby/sqlite3/Manifest b/dev-ruby/sqlite3/Manifest
index c8db7cd3ab1a..8457ce94a753 100644
--- a/dev-ruby/sqlite3/Manifest
+++ b/dev-ruby/sqlite3/Manifest
@@ -1,2 +1,3 @@
 DIST sqlite3-1.7.3.gem 3307008 BLAKE2B 
0df742c7cb4a8f920196106b5701eae07e60e668f040ca6e3276afdd0dfdeed3fb19ed455425f332e13082ca740f42d914536ccdf565ed151b6eb0f6ccd7c676
 SHA512 
b6ed36a5618134ca1f993b21a351ac279ebb7e1370be521eae67ed9224a1fac11d71ddd7573b3b14da47657756cb68b3eab0164b6e6ed058d3f64fa95699bc2f
 DIST sqlite3-2.0.4.tar.gz 82136 BLAKE2B 
636e4e246e1a572a975b4df4a1ed82da6924934ee59a48ad0bac98b7e5c76f4342ad1bc91f794179e2954acebcd00d3ec30872441957fcaed5d36218b6167a80
 SHA512 
3bdf8733b119f8fb71ab2e60667f2ca9c9c8be6d01e02509ed93e1bb1c525408d93c888f5291b464eecb6ab150d940d357d7abf913b32dc253768bf6fc33d168
+DIST sqlite3-2.2.0.tar.gz 89095 BLAKE2B 
51f9279049795c6e54e0b5787f6a19eadba5b848ca52dbc8f2fe89757bac825da34246bd35217c092d43b7af33f85dd0fc2c5171a5aaa23aab6c577f8158ec07
 SHA512 
4a4a012fe092bc7f5ccad6d48e3fcd76f0eaf7d099ed41e4ab99c62c0dc8e7f55b630d8ae10cea39debab00e169f7c8c9ae524f1b7cca7663165c5b38cba28ea

diff --git a/dev-ruby/sqlite3/sqlite3-2.2.0.ebuild 
b/dev-ruby/sqlite3/sqlite3-2.2.0.ebuild
new file mode 100644
index 000000000000..8fafcd982423
--- /dev/null
+++ b/dev-ruby/sqlite3/sqlite3-2.2.0.ebuild
@@ -0,0 +1,66 @@
+# 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_BINWRAP=""
+RUBY_FAKEGEM_TASK_DOC="faq"
+RUBY_FAKEGEM_DOCDIR="doc faq"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
+
+RUBY_FAKEGEM_EXTENSIONS=(ext/sqlite3/extconf.rb)
+RUBY_FAKEGEM_EXTENSION_LIBDIR=lib/sqlite3
+RUBY_FAKEGEM_GEMSPEC="sqlite3.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="An extension library to access a SQLite database from Ruby"
+HOMEPAGE="https://github.com/sparklemotion/sqlite3-ruby";
+SRC_URI="https://github.com/sparklemotion/sqlite3-ruby/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
+RUBY_S="sqlite3-ruby-${PV}"
+LICENSE="BSD"
+
+SLOT="$(ver_cut 1)"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc test"
+
+# We track the bundled sqlite version here
+RDEPEND=" >=dev-db/sqlite-3.47.0:3"
+DEPEND=" >=dev-db/sqlite-3.47.0:3"
+
+ruby_add_bdepend "
+       doc? ( dev-ruby/rdoc )
+       test? ( dev-ruby/minitest:5 )
+"
+
+all_ruby_prepare() {
+       sed -i -e 's/enable_config("system-libraries")/true/' 
ext/sqlite3/extconf.rb || die
+
+       # Remove the runtime dependency on mini_portile2. We build without
+       # it and it is not a runtime dependency for us.
+       sed -e '/mini_portile2/ s:^:#:' \
+               -e '/WARNING/ s:^:#:' \
+               -e "s/0.0.0/${PV}/" \
+               -i ${RUBY_FAKEGEM_GEMSPEC} || die
+
+       # Avoid a failing spec for reprepares stats. Upstream indicates that
+       # the stats data should not be relied on other than for human
+       # debugging.
+       sed -e '/def test_stat_reprepares/askip "Fails on Gentoo"' \
+               -i test/test_statement.rb || die
+}
+
+all_ruby_compile() {
+       all_fakegem_compile
+
+       if use doc; then
+               rdoc --title "${P} Documentation" -o doc --main README.rdoc lib 
*.rdoc ext/*/*.c || die
+               rm -f doc/js/*.gz || die
+       fi
+}
+
+each_ruby_test() {
+       ${RUBY} -Ilib:test:. -e 'Dir["test/test_*.rb"].each{|f| require f}' || 
die
+}

Reply via email to