summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2018-07-27 07:20:42 +0200
committerHans de Graaff <graaff@gentoo.org>2018-07-27 07:22:39 +0200
commit5a1fde69591c721fad86009bda19acbceb5f449f (patch)
treef362dd588aa5b8213250506c7babc668b4ad6d85 /dev-ruby/mysql2
parentapp-misc/sphinx: add mariadb USE flag (diff)
downloadgentoo-5a1fde69591c721fad86009bda19acbceb5f449f.tar.gz
gentoo-5a1fde69591c721fad86009bda19acbceb5f449f.tar.bz2
gentoo-5a1fde69591c721fad86009bda19acbceb5f449f.zip
dev-ruby/mysql2: add mariadb and mysql USE flag
Compile against the mysql or mariadb C Connectors. Add mariadb and mysql USE flags to determine which connector is used. Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-ruby/mysql2')
-rw-r--r--dev-ruby/mysql2/metadata.xml3
-rw-r--r--dev-ruby/mysql2/mysql2-0.4.10-r1.ebuild44
-rw-r--r--dev-ruby/mysql2/mysql2-0.5.2-r1.ebuild44
3 files changed, 91 insertions, 0 deletions
diff --git a/dev-ruby/mysql2/metadata.xml b/dev-ruby/mysql2/metadata.xml
index 91fbcba571b..9ee135bb6b8 100644
--- a/dev-ruby/mysql2/metadata.xml
+++ b/dev-ruby/mysql2/metadata.xml
@@ -8,4 +8,7 @@
<upstream>
<remote-id type="github">brianmario/mysql2</remote-id>
</upstream>
+ <use>
+ <flag name="mariadb">Use mariadb bindings</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-ruby/mysql2/mysql2-0.4.10-r1.ebuild b/dev-ruby/mysql2/mysql2-0.4.10-r1.ebuild
new file mode 100644
index 00000000000..0c94423e474
--- /dev/null
+++ b/dev-ruby/mysql2/mysql2-0.4.10-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby23 ruby24 ruby25"
+
+# Tests require a live MySQL database but should all pass.
+RUBY_FAKEGEM_TASK_TEST=""
+
+RUBY_FAKEGEM_TASK_DOC=""
+
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+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.4"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+IUSE="mysql mariadb"
+REQUIRED_USE="mysql? ( !mariadb ) 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
+}
+
+each_ruby_compile() {
+ emake V=1 -Cext/mysql2
+ cp ext/mysql2/mysql2$(get_modname) lib/mysql2/ || die
+}
diff --git a/dev-ruby/mysql2/mysql2-0.5.2-r1.ebuild b/dev-ruby/mysql2/mysql2-0.5.2-r1.ebuild
new file mode 100644
index 00000000000..3772cc9b80f
--- /dev/null
+++ b/dev-ruby/mysql2/mysql2-0.5.2-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby23 ruby24 ruby25"
+
+# Tests require a live MySQL database but should all pass.
+RUBY_FAKEGEM_TASK_TEST=""
+
+RUBY_FAKEGEM_TASK_DOC=""
+
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+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 ~ppc64 ~x86"
+IUSE="mysql mariadb"
+REQUIRED_USE="mysql? ( !mariadb ) 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
+}
+
+each_ruby_compile() {
+ emake V=1 -Cext/mysql2
+ cp ext/mysql2/mysql2$(get_modname) lib/mysql2/ || die
+}