Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/sqlite3/
Date: Tue, 05 Feb 2019 06:02:12
Message-Id: 1549346420.c8b432988412fd12a724b472e62e1323ab2dad2a.graaff@gentoo
1 commit: c8b432988412fd12a724b472e62e1323ab2dad2a
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 5 06:00:20 2019 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 5 06:00:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8b43298
7
8 dev-ruby/sqlite3: add 1.4.0
9
10 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 dev-ruby/sqlite3/Manifest | 1 +
14 dev-ruby/sqlite3/sqlite3-1.4.0.ebuild | 83 +++++++++++++++++++++++++++++++++++
15 2 files changed, 84 insertions(+)
16
17 diff --git a/dev-ruby/sqlite3/Manifest b/dev-ruby/sqlite3/Manifest
18 index eaa0a01340c..c2503b4282c 100644
19 --- a/dev-ruby/sqlite3/Manifest
20 +++ b/dev-ruby/sqlite3/Manifest
21 @@ -1 +1,2 @@
22 DIST sqlite3-1.3.13.gem 64512 BLAKE2B a36e3161e44004a0510297d16bf491df3dc29434432208ad231f5e46ddecb4607add417e105f5ae8472a768f80efef3f74b703b2a441396b4c9b6c9ff90bf31e SHA512 5d3eab7c788cc62c497de179919054324e53595294ec3a9df2a10d23151a406ee9a88f1c3ac945777f138e78cec61018c388b023456b873131d678a6788a505f
23 +DIST sqlite3-1.4.0.gem 70144 BLAKE2B 4900db2ffefb1658d1001d3d334c95b6e140abceb99b60c1aff78ffe8ca8055b58a1ea87040dc54893542a55d55aa2c1a91975a61edec18d211bf8dbbd786642 SHA512 7db9ca4bc12becd41224be77694453e8ba428303b69e58663f7888746558112e147c5f9076aa8baf3c23ac3e895cac079cb645d281e5eb06f98e0d8e8268562a
24
25 diff --git a/dev-ruby/sqlite3/sqlite3-1.4.0.ebuild b/dev-ruby/sqlite3/sqlite3-1.4.0.ebuild
26 new file mode 100644
27 index 00000000000..a8d2de67e09
28 --- /dev/null
29 +++ b/dev-ruby/sqlite3/sqlite3-1.4.0.ebuild
30 @@ -0,0 +1,83 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +USE_RUBY="ruby23 ruby24 ruby25 ruby26"
36 +
37 +RUBY_FAKEGEM_TASK_DOC="faq"
38 +RUBY_FAKEGEM_DOCDIR="doc faq"
39 +RUBY_FAKEGEM_EXTRADOC="API_CHANGES.rdoc README.rdoc ChangeLog.cvs CHANGELOG.rdoc"
40 +
41 +inherit multilib ruby-fakegem
42 +
43 +DESCRIPTION="An extension library to access a SQLite database from Ruby"
44 +HOMEPAGE="https://github.com/sparklemotion/sqlite3-ruby"
45 +LICENSE="BSD"
46 +
47 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
48 +SLOT="0"
49 +IUSE=""
50 +
51 +RDEPEND+=" >=dev-db/sqlite-3.6.16:3"
52 +DEPEND+=" >=dev-db/sqlite-3.6.16:3"
53 +
54 +ruby_add_bdepend "
55 + dev-ruby/rake-compiler
56 + doc? ( dev-ruby/rdoc dev-ruby/redcloth )
57 + test? ( dev-ruby/minitest:5 )"
58 +
59 +all_ruby_prepare() {
60 + # We remove the vendor_sqlite3 rake task because it's used to
61 + # bundle SQlite3 which we definitely don't want.
62 + rm -f rakelib/vendor_sqlite3.rake || die
63 +
64 + # Remove gem tasks since we don't need them and they require hoe.
65 + rm -f rakelib/gem.rake || die
66 +
67 + sed -i -e 's:, HOE.spec::' -e '/task :test/d' rakelib/native.rake || die
68 +}
69 +
70 +each_ruby_configure() {
71 + ${RUBY} -Cext/sqlite3 extconf.rb || die
72 +}
73 +
74 +all_ruby_compile() {
75 + all_fakegem_compile
76 +
77 + if use doc; then
78 + rdoc --title "${P} Dcoumentation" -o doc --main README.rdoc lib *.rdoc ext/*/*.c || die
79 + fi
80 +}
81 +
82 +each_ruby_compile() {
83 + emake -Cext/sqlite3 V=1
84 + mv ext/sqlite3/sqlite3_native$(get_modname) lib/sqlite3/ || die
85 +}
86 +
87 +each_ruby_test() {
88 + ${RUBY} -Ilib:test:. -e 'Dir["test/test_*.rb"].each{|f| require f}' || die
89 +}
90 +
91 +each_ruby_install() {
92 + each_fakegem_install
93 +
94 + # sqlite3 was called sqlite3-ruby before, so add a spec file that
95 + # simply loads sqlite3 to make sure that old projects load correctly
96 + # we don't even need to create a file to load this: the `require
97 + # sqlite3` was already part of sqlite3-ruby requirements.
98 + cat - <<EOF > "${T}/sqlite3-ruby.gemspec"
99 +# generated by ebuild
100 +# $CATEGORY/$PF
101 +Gem::Specification.new do |s|
102 + s.name = "sqlite3-ruby"
103 + s.version = "${RUBY_FAKEGEM_VERSION}"
104 + s.summary = "Fake gem to load sqlite3"
105 + s.homepage = "${HOMEPAGE}"
106 + s.specification_version = 3
107 + s.add_runtime_dependency("${RUBY_FAKEGEM_NAME}", ["= ${RUBY_FAKEGEM_VERSION}"])
108 +end
109 +EOF
110 + RUBY_FAKEGEM_NAME=sqlite3-ruby \
111 + RUBY_FAKEGEM_GEMSPEC="${T}/sqlite3-ruby.gemspec" \
112 + ruby_fakegem_install_gemspec
113 +}