From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1518043-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4CD7B158649
	for <garchives@archives.gentoo.org>; Sat, 13 May 2023 03:35:01 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5B3E7E08D3;
	Sat, 13 May 2023 03:35:00 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 2FC93E08D3
	for <gentoo-commits@lists.gentoo.org>; Sat, 13 May 2023 03:35:00 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 73C22340E85
	for <gentoo-commits@lists.gentoo.org>; Sat, 13 May 2023 03:34:59 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 11C6FA6A
	for <gentoo-commits@lists.gentoo.org>; Sat, 13 May 2023 03:34:58 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1683948847.28383056c56dc281ddba30f18757d73337319ecf.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mariadb-connector-odbc/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-db/mariadb-connector-odbc/Manifest dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.18.ebuild
X-VCS-Directories: dev-db/mariadb-connector-odbc/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 28383056c56dc281ddba30f18757d73337319ecf
X-VCS-Branch: master
Date: Sat, 13 May 2023 03:34:58 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: a2994bf3-6db7-443a-a0f7-12fb097a24bf
X-Archives-Hash: 1055c6d0bc09866219e9a30af4dbbdcb

commit:     28383056c56dc281ddba30f18757d73337319ecf
Author:     Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Wed May 10 09:25:51 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 13 03:34:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28383056

dev-db/mariadb-connector-odbc: add 3.1.18

Closes: https://bugs.gentoo.org/895272
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mariadb-connector-odbc/Manifest             |  1 +
 .../mariadb-connector-odbc-3.1.18.ebuild           | 67 ++++++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/dev-db/mariadb-connector-odbc/Manifest b/dev-db/mariadb-connector-odbc/Manifest
index e030dd17121f..ca867fe9f53f 100644
--- a/dev-db/mariadb-connector-odbc/Manifest
+++ b/dev-db/mariadb-connector-odbc/Manifest
@@ -1 +1,2 @@
 DIST mariadb-connector-odbc-3.1.14-src.tar.gz 549698 BLAKE2B 612879086805c57b42036bb224b14ef1ab287d2ff288a5ec5ec6db7334fc8b82acd648476eca1dee282393486d117cadf1bbdcb0e78eae52bab26a0c05cb1fbe SHA512 bb3cb74ccd17a8df39456ccf3091579bbdfc56431954a978f488928df54e3f9ad1c5b67cb411be4b661ba0e0bdd69ccd4d00ea4bfd72c3f448b560031830512d
+DIST mariadb-connector-odbc-3.1.18-src.tar.gz 556590 BLAKE2B 9644521f91136b3bc30846d8c9df7cfa21c8fff0e9219bf0c758a0294f34783a57f1200834b84833284624160652315adb4f6eb465a90378e676e5767c7bd40a SHA512 1d240988d03dbb0ef2f4eb0667ff973a35d700f319caaea78db6d5c0ca569ed5adcee978fb10cd9f067c0c5aecbfe697e5adb3d736e564bae82cf6c11cd0dba2

diff --git a/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.18.ebuild b/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.18.ebuild
new file mode 100644
index 000000000000..62623dc60a49
--- /dev/null
+++ b/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.18.ebuild
@@ -0,0 +1,67 @@
+# Copyright 2018-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib flag-o-matic
+
+DESCRIPTION="MariaDB Connector/ODBC"
+HOMEPAGE="https://downloads.mariadb.org/connector-odbc/"
+SRC_URI="mirror://mariadb/connector-odbc-${PV}/${P}-src.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/3.1"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+S="${S}-src"
+
+# USE=ssl merely enables the configuration options (seemingly for interactive
+# sessions) and does not cause direct linking to any SSL libraries.  However,
+# it doesn't make sense enable these configuration options unless the
+# underlying mariadb-connector-c has ssl enabled, thus if we have USE=ssl,
+# require mariadb-connector-c to have it too.
+DEPEND="dev-db/mariadb-connector-c:=[ssl?]
+	dev-db/unixODBC"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+	cmake_src_prepare
+
+	sed -e "s,/lib/,/$(get_libdir)/,g" "${FILESDIR}/odbcinst2.ini" > odbcinst.ini || die
+}
+
+multilib_src_configure() {
+	append-cppflags $(mariadb_config --cflags || die)
+	local mycmakeargs=(
+		-DWITH_SSL=$(usex ssl OPENSSL OFF)
+		-DMARIADB_LINK_DYNAMIC=YES
+		-DUSE_SYSTEM_INSTALLED_LIB=YES
+		-DINSTALL_DOCDIR="/usr/share/doc/${PF}"
+		-DINSTALL_LICENSEDIR="/usr/share/doc/${PF}"
+		#-DCMAKE_C_FLAGS="$(mariadb_config --cflags)"
+	)
+	cmake_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 "Alternatively 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
+}