summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2003-10-27 01:59:22 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2003-10-27 01:59:22 +0000
commit02e57d19ac2878996b894bcfd12bbdc316c063fc (patch)
treed3a45495d96eccf5a19f7f0bc9f73dcd540d94f6 /dev-db/myodbc
parentinitial commit, bug #15546, submitted by Zhen Lin <lowzl@hotmail.com>. major... (diff)
downloadhistorical-02e57d19ac2878996b894bcfd12bbdc316c063fc.tar.gz
historical-02e57d19ac2878996b894bcfd12bbdc316c063fc.tar.bz2
historical-02e57d19ac2878996b894bcfd12bbdc316c063fc.zip
initial commit, bug #15546, submitted by Zhen Lin <lowzl@hotmail.com>. major changes made for auto-configuration of driver and DSN.
Diffstat (limited to 'dev-db/myodbc')
-rw-r--r--dev-db/myodbc/Manifest5
-rw-r--r--dev-db/myodbc/files/digest-myodbc-3.51.061
-rw-r--r--dev-db/myodbc/files/odbc.ini.m418
-rw-r--r--dev-db/myodbc/files/odbcinst.ini.m46
-rw-r--r--dev-db/myodbc/myodbc-3.51.06.ebuild86
5 files changed, 115 insertions, 1 deletions
diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest
index 523d12085c97..466bf081b109 100644
--- a/dev-db/myodbc/Manifest
+++ b/dev-db/myodbc/Manifest
@@ -1,2 +1,5 @@
-MD5 eb858cfe47b1405f3d46ada3c81699d9 myodbc-3.51.06.ebuild 1475
+MD5 9c875ec7d0f2630b9874c79dfb0d58a0 myodbc-3.51.06.ebuild 2355
+MD5 7a2c77727fe2814481cfbb62619298cc ChangeLog 571
MD5 af6071c0c469470111c00d957ccad675 files/digest-myodbc-3.51.06 66
+MD5 74033102ea20855ca5efbc4951cf83dd files/odbcinst.ini.m4 229
+MD5 20366b35a236f41aeef13d0f8fd33a29 files/odbc.ini.m4 513
diff --git a/dev-db/myodbc/files/digest-myodbc-3.51.06 b/dev-db/myodbc/files/digest-myodbc-3.51.06
new file mode 100644
index 000000000000..fecb2686315a
--- /dev/null
+++ b/dev-db/myodbc/files/digest-myodbc-3.51.06
@@ -0,0 +1 @@
+MD5 5a59b4f01592fc9ec96e985bc7d6aada MyODBC-3.51.06.tar.gz 322059
diff --git a/dev-db/myodbc/files/odbc.ini.m4 b/dev-db/myodbc/files/odbc.ini.m4
new file mode 100644
index 000000000000..f3db4e7463b3
--- /dev/null
+++ b/dev-db/myodbc/files/odbc.ini.m4
@@ -0,0 +1,18 @@
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/files/odbc.ini.m4,v 1.1 2003/10/27 01:59:20 robbat2 Exp $
+# vim:ts=4 noexpandtab ft=dosini:
+#
+[ODBC Data Sources]
+__PN__-test = MySQL ODBC __PF__ Driver Testing DSN
+
+# see http://www.mysql.com/products/myodbc/faq_toc.html
+# for details about the following entry
+[__PN__-test]
+Description = MySQL ODBC __PF__ Driver Testing DSN
+Driver = __PN__
+Socket = /var/run/mysqld/mysqld.sock
+Server = localhost
+User = root
+Database = test
+Option = 3
+#Port =
+#Password =
diff --git a/dev-db/myodbc/files/odbcinst.ini.m4 b/dev-db/myodbc/files/odbcinst.ini.m4
new file mode 100644
index 000000000000..20e1f996b5b4
--- /dev/null
+++ b/dev-db/myodbc/files/odbcinst.ini.m4
@@ -0,0 +1,6 @@
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/files/odbcinst.ini.m4,v 1.1 2003/10/27 01:59:20 robbat2 Exp $
+# vim:ts=4 noexpandtab ft=dosini:
+#
+[__PN__]
+Description = MySQL ODBC __PF__ Driver
+Driver = /usr/lib/libmyodbc3.so
diff --git a/dev-db/myodbc/myodbc-3.51.06.ebuild b/dev-db/myodbc/myodbc-3.51.06.ebuild
new file mode 100644
index 000000000000..dc429ab77778
--- /dev/null
+++ b/dev-db/myodbc/myodbc-3.51.06.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/myodbc-3.51.06.ebuild,v 1.1 2003/10/27 01:59:20 robbat2 Exp $
+
+MY_PN="MyODBC"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="http://www.mysql.com/products/myodbc/"
+SRC_URI="mirror://mysql/Downloads/MyODBC3/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+RDEPEND=">=dev-db/mysql-4 dev-db/unixODBC sys-devel/m4"
+# perl is required for building docs
+DEPEND="${RDEPEND} docs? ( dev-lang/perl )"
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ local myconf="--enable-static"
+ use static \
+ && myconf="${myconf} --disable-shared" \
+ || myconf="${myconf} --enable-shared"
+
+ myconf="${myconf} `use_with doc docs` `use_with debug`"
+
+ econf \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc/myodbc \
+ --localstatedir=/var/lib/myodbc \
+ --with-mysql-libs=/usr/lib/mysql \
+ --with-mysql-includes=/usr/include/mysql \
+ --with-odbc-ini=/etc/unixODBC/odbc.ini \
+ --with-unixODBC=/usr \
+ ${myconf} || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ einstall \
+ libexecdir=${D}/usr/sbin \
+ sysconfdir=${D}/etc/myodbc \
+ localstatedir=${D}/var/lib/myodbc
+ dodoc INSTALL RELEASE-NOTES README
+}
+
+pkg_config() {
+ [ "${ROOT}" != "/" ] && \
+ die "Sorry, non-standard \$ROOT setting is not supported :-("
+
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ /usr/bin/m4 -D__PN__=${PN} -D__PF__=${PF} ${FILESDIR}/${i}.m4 >${T}/${i}
+ done;
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+ if echo $drivers | grep -vq "^\[${PN}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f ${T}/odbcinst.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+
+ local sources=$(/usr/bin/odbcinst -q -s)
+ msg='sample MySQL ODBC DSN'
+ if echo $sources | grep -vq "^\[${PN}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f ${T}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+ einfo "If this is a new install, please run the following command"
+ einfo "to configure the MySQL ODBC drivers and sources:"
+ einfo "ebuild ${PORTDIR}/${CATEGORY}/${PN}/${PF}.ebuild config"
+}