summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaco Kroon <jaco@uls.co.za>2020-02-21 14:05:54 +0200
committerJoonas Niilola <juippis@gentoo.org>2020-03-15 19:51:49 +0200
commit2e3e6e6cdc1801a03deb52856dd875892e4ad14f (patch)
treee546b764397d125ddbe7ed5022136d40c4c8ae8e /dev-db/mariadb-connector-odbc
parentsci-libs/libgeodecomp: Fix boost detection (diff)
downloadgentoo-2e3e6e6cdc1801a03deb52856dd875892e4ad14f.tar.gz
gentoo-2e3e6e6cdc1801a03deb52856dd875892e4ad14f.tar.bz2
gentoo-2e3e6e6cdc1801a03deb52856dd875892e4ad14f.zip
dev-db/mariadb-connector-odbc: new package.
mariadb-connector-odbc is MariaDB's version of myodbc package, and uses mariadb-connector-c instead of mysql-connector-c. Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/14729 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-db/mariadb-connector-odbc')
-rw-r--r--dev-db/mariadb-connector-odbc/Manifest1
-rw-r--r--dev-db/mariadb-connector-odbc/files/odbcinst.ini4
-rw-r--r--dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild63
-rw-r--r--dev-db/mariadb-connector-odbc/metadata.xml12
4 files changed, 80 insertions, 0 deletions
diff --git a/dev-db/mariadb-connector-odbc/Manifest b/dev-db/mariadb-connector-odbc/Manifest
new file mode 100644
index 000000000000..8e1ff5fecee7
--- /dev/null
+++ b/dev-db/mariadb-connector-odbc/Manifest
@@ -0,0 +1 @@
+DIST mariadb-connector-odbc-3.1.6-ga-src.tar.gz 536871 BLAKE2B c41f1fb00b5a93b3618d79ee457dc84c8b98e216083ec315870dc2ab46f1f56db345c1a2fae51e78e8b6c42b81183ce9c161ac5a051e52481cd687138f3dadd3 SHA512 ec0e244fc1b62c27f619f0ed3025906b02fc897c75dd74799df396beb5009bfdd27d609b5629ea0e6f5172ca8521b60bf7f3efc6dac44e84e835e4a05273ba3d
diff --git a/dev-db/mariadb-connector-odbc/files/odbcinst.ini b/dev-db/mariadb-connector-odbc/files/odbcinst.ini
new file mode 100644
index 000000000000..e196e032362f
--- /dev/null
+++ b/dev-db/mariadb-connector-odbc/files/odbcinst.ini
@@ -0,0 +1,4 @@
+[maodbc]
+Description=MariaDB ODBC Driver
+Driver=/usr/lib/libmaodbc.so
+Threading=0
diff --git a/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild b/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild
new file mode 100644
index 000000000000..dc1668302aa7
--- /dev/null
+++ b/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2018-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+DESCRIPTION="MariaDB Connector/ODBC"
+HOMEPAGE="https://downloads.mariadb.org/connector-odbc/"
+SRC_URI="https://downloads.mariadb.org/interstitial/connector-odbc-${PV}/${P}-ga-src.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/3.1"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnutls ssl"
+
+S="${S}-ga-src"
+
+DEPEND="=dev-db/mariadb-connector-c-$(ver_cut 1-2)*
+ dev-db/unixODBC"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ cp "${FILESDIR}/odbcinst.ini" . || die
+ sed -e "s,lib/lib,$(get_libdir)/lib,g" -i "odbcinst.ini" || die
+}
+
+multilib_src_configure() {
+ append-cppflags $(mariadb_config --cflags || die)
+ local mycmakeargs=(
+ -DWITH_SSL:STRING=$(usex ssl $(usex gnutls GNUTLS OPENSSL) OFF)
+ -DMARIADB_LINK_DYNAMIC=YES
+ -DUSE_SYSTEM_INSTALLED_LIB=YES
+ -DINSTALL_DOC_DIR="/usr/share/doc/${P}"
+ -DINSTALL_LICENSE_DIR="/usr/share/doc/${P}"
+ #-DCMAKE_C_FLAGS="$(mariadb_config --cflags)"
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ insinto /usr/share/${PN}
+ doins odbcinst.ini
+}
+
+pkg_postinst() {
+ elog "Please remember to use emerge --config =${P} to install the ODBC ini files."
+ elog "Alterantively run: /usr/bin/odbcinst -i -d -f /usr/share/${PN}/odbcinst.ini"
+}
+
+pkg_config() {
+ [[ -n "${ROOT}" ]] && die "Sorry, non-standard ROOT setting is not supported."
+
+ if /usr/bin/odbcinst -q -d -n maodbc &>/dev/null; then
+ einfo "maodbc (MariaDB ODBC driver) has already been installed."
+ else
+ ebegin "Installing maodbc (MariaDB ODBC driver)"
+ /usr/bin/odbcinst -i -d -f /usr/share/${PN}/odbcinst.ini
+ eend ${?} || die
+ fi
+}
diff --git a/dev-db/mariadb-connector-odbc/metadata.xml b/dev-db/mariadb-connector-odbc/metadata.xml
new file mode 100644
index 000000000000..64b17e08bff5
--- /dev/null
+++ b/dev-db/mariadb-connector-odbc/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jaco@uls.co.za</email>
+ <name>Jaco Kroon</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>