summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2021-02-13 10:15:19 +0100
committerHans de Graaff <graaff@gentoo.org>2021-02-13 10:48:39 +0100
commit5131c8c4a20f3b712ba0da7aa26bfd3c89dd6573 (patch)
treeabc45a1e065968cf0b5eeb4a2e701ede8332082f /dev-ruby/mysql2
parentwww-servers/puma: fix extension installation (diff)
downloadgentoo-5131c8c4a20f3b712ba0da7aa26bfd3c89dd6573.tar.gz
gentoo-5131c8c4a20f3b712ba0da7aa26bfd3c89dd6573.tar.bz2
gentoo-5131c8c4a20f3b712ba0da7aa26bfd3c89dd6573.zip
dev-ruby/mysql2: fix extension installation
Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/mysql2')
-rw-r--r--dev-ruby/mysql2/mysql2-0.5.3-r1.ebuild42
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-ruby/mysql2/mysql2-0.5.3-r1.ebuild b/dev-ruby/mysql2/mysql2-0.5.3-r1.ebuild
new file mode 100644
index 000000000000..8346b4781854
--- /dev/null
+++ b/dev-ruby/mysql2/mysql2-0.5.3-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+USE_RUBY="ruby25 ruby26 ruby27 ruby30"
+
+# Tests require a live MySQL database but should all pass.
+RUBY_FAKEGEM_TASK_TEST=""
+
+RUBY_FAKEGEM_TASK_DOC=""
+
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_EXTENSIONS=(ext/mysql2/extconf.rb)
+RUBY_FAKEGEM_EXTENSION_LIBDIR=lib/mysql2
+
+inherit multilib ruby-fakegem
+
+DESCRIPTION="A modern, simple and very fast Mysql library for Ruby - binding to libmysql"
+HOMEPAGE="https://github.com/brianmario/mysql2"
+
+LICENSE="MIT"
+SLOT="0.5"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="mysql mariadb"
+REQUIRED_USE="^^ ( mariadb mysql )"
+
+MDEPEND="mysql? ( dev-db/mysql-connector-c:= ) mariadb? ( dev-db/mariadb-connector-c:= )"
+DEPEND="${DEPEND} ${MDEPEND}"
+RDEPEND="${RDEPEND} ${MDEPEND}"
+
+each_ruby_configure() {
+ local config
+ if use mysql ; then
+ config="${EPREFIX}/usr/bin/mysql_config"
+ fi
+ if use mariadb ; then
+ config="${EPREFIX}/usr/bin/mariadb_config"
+ fi
+
+ ${RUBY} -Cext/mysql2 extconf.rb --with-mysql-config="${config}" || die
+}