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/mysql2/
Date: Sun, 07 Nov 2021 12:06:17
Message-Id: 1636286767.8b243a91bfa00b49155e5628af1fa1ffb5874e8d.graaff@gentoo
1 commit: 8b243a91bfa00b49155e5628af1fa1ffb5874e8d
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 7 12:05:54 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 7 12:06:07 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b243a91
7
8 dev-ruby/mysql2: add snapshot
9
10 Upstream has a lot of fixes for ruby 2.7 and newer that should help with
11 various crashes and incompatibilities. With no release forthcoming we'll
12 add this snapshot to make these fixes available.
13
14 Package-Manager: Portage-3.0.28, Repoman-3.0.3
15 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
16
17 dev-ruby/mysql2/Manifest | 1 +
18 dev-ruby/mysql2/mysql2-0.5.3.20210920.ebuild | 52 ++++++++++++++++++++++++++++
19 2 files changed, 53 insertions(+)
20
21 diff --git a/dev-ruby/mysql2/Manifest b/dev-ruby/mysql2/Manifest
22 index 879c4a4d024..38b38a14806 100644
23 --- a/dev-ruby/mysql2/Manifest
24 +++ b/dev-ruby/mysql2/Manifest
25 @@ -1 +1,2 @@
26 +DIST mysql2-0.5.3.20210920.tar.gz 114492 BLAKE2B 589ee721838f956f90474e859d0dd2e8cf11c8622a8f89410929f9c52c82c240a5a7eea7e6b132e0212dd6e9cd13c5ca950e6cacac368d158aeca9feacc98a7c SHA512 3bec768b69ecc3b54db84048b633602e80f09c4b4631daf1fbd81810c33038410f6112b467ab7ac86051ba91e4660abb3546e55cb52d26b96531f3305b43871f
27 DIST mysql2-0.5.3.gem 74240 BLAKE2B 9de25a34173ab952f6842f01d9207405c8bc6ed5937fdf66de4062129fc20f425635956f6d12f78466c8c341c49916f7d00df845f84a4101d34a98b1585b9919 SHA512 59a0ee00261b09e8bbfc586a6f75af840a465a94fd8c9463a3d7767e5ea6b7e64507c9571fb90c6d0cdde3cfff560c97fbf3f3c32b3916aca852ef5c41e1bce9
28
29 diff --git a/dev-ruby/mysql2/mysql2-0.5.3.20210920.ebuild b/dev-ruby/mysql2/mysql2-0.5.3.20210920.ebuild
30 new file mode 100644
31 index 00000000000..f5fb4b506bc
32 --- /dev/null
33 +++ b/dev-ruby/mysql2/mysql2-0.5.3.20210920.ebuild
34 @@ -0,0 +1,52 @@
35 +# Copyright 1999-2021 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=8
39 +USE_RUBY="ruby26 ruby27 ruby30"
40 +
41 +# Tests require a live MySQL database but should all pass.
42 +RUBY_FAKEGEM_TASK_TEST=""
43 +
44 +RUBY_FAKEGEM_TASK_DOC=""
45 +
46 +RUBY_FAKEGEM_EXTRADOC="README.md"
47 +
48 +RUBY_FAKEGEM_EXTENSIONS=(ext/mysql2/extconf.rb)
49 +RUBY_FAKEGEM_EXTENSION_LIBDIR=lib/mysql2
50 +
51 +RUBY_FAKEGEM_GEMSPEC="mysql2.gemspec"
52 +
53 +COMMIT=6652da20010ddfbbe6bceb8e41666d05e512346c
54 +
55 +inherit ruby-fakegem
56 +
57 +DESCRIPTION="A modern, simple and very fast Mysql library for Ruby - binding to libmysql"
58 +HOMEPAGE="https://github.com/brianmario/mysql2"
59 +SRC_URI="https://github.com/brianmario/mysql2/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
60 +RUBY_S="mysql2-${COMMIT}"
61 +
62 +LICENSE="MIT"
63 +SLOT="$(ver_cut 1-2)"
64 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
65 +IUSE="mysql mariadb"
66 +REQUIRED_USE="^^ ( mariadb mysql )"
67 +
68 +MDEPEND="mysql? ( dev-db/mysql-connector-c:= ) mariadb? ( dev-db/mariadb-connector-c:= )"
69 +DEPEND="${DEPEND} ${MDEPEND}"
70 +RDEPEND="${RDEPEND} ${MDEPEND}"
71 +
72 +all_ruby_prepare() {
73 + sed -i -e '/s.version/ s/Mysql2::VERSION/"'${PV}'"/' ${RUBY_FAKEGEM_GEMSPEC} || die
74 +}
75 +
76 +each_ruby_configure() {
77 + local config
78 + if use mysql ; then
79 + config="${EPREFIX}/usr/bin/mysql_config"
80 + fi
81 + if use mariadb ; then
82 + config="${EPREFIX}/usr/bin/mariadb_config"
83 + fi
84 +
85 + ${RUBY} -Cext/mysql2 extconf.rb --with-mysql-config="${config}" || die
86 +}