summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-01-31 06:26:54 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-01-31 06:26:54 +0000
commit325f7c1d8562d9c47b25ad001c33d8a5b72347b1 (patch)
tree103b45ebc3c228dba4545e9d085ba03adeddb77e /dev-db
parentFix multilib handling, more implicit decls, and improve crc output. (diff)
downloadgentoo-2-325f7c1d8562d9c47b25ad001c33d8a5b72347b1.tar.gz
gentoo-2-325f7c1d8562d9c47b25ad001c33d8a5b72347b1.tar.bz2
gentoo-2-325f7c1d8562d9c47b25ad001c33d8a5b72347b1.zip
Version bump for 5.1 slot, now includes support for Qt Gui.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/myodbc/ChangeLog8
-rw-r--r--dev-db/myodbc/files/myodbc-5.1.6-qt4-includedir.patch15
-rw-r--r--dev-db/myodbc/myodbc-5.1.6.ebuild129
3 files changed, 151 insertions, 1 deletions
diff --git a/dev-db/myodbc/ChangeLog b/dev-db/myodbc/ChangeLog
index 56a747aa57e9..27f04002c896 100644
--- a/dev-db/myodbc/ChangeLog
+++ b/dev-db/myodbc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-db/myodbc
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.20 2010/01/31 05:25:46 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.21 2010/01/31 06:26:53 robbat2 Exp $
+
+*myodbc-5.1.6 (31 Jan 2010)
+
+ 31 Jan 2010; Robin H. Johnson <robbat2@gentoo.org> +myodbc-5.1.6.ebuild,
+ +files/myodbc-5.1.6-qt4-includedir.patch:
+ Version bump for 5.1 slot, now includes support for Qt Gui.
*myodbc-3.51.27_p695 (31 Jan 2010)
diff --git a/dev-db/myodbc/files/myodbc-5.1.6-qt4-includedir.patch b/dev-db/myodbc/files/myodbc-5.1.6-qt4-includedir.patch
new file mode 100644
index 000000000000..a79ddc4fa201
--- /dev/null
+++ b/dev-db/myodbc/files/myodbc-5.1.6-qt4-includedir.patch
@@ -0,0 +1,15 @@
+diff -Nuar mysql-connector-odbc-5.1.6.orig/qt.m4 mysql-connector-odbc-5.1.6/qt.m4
+--- mysql-connector-odbc-5.1.6.orig/qt.m4 2009-11-05 13:34:53.000000000 -0800
++++ mysql-connector-odbc-5.1.6/qt.m4 2010-01-30 22:12:02.105400463 -0800
+@@ -91,6 +91,10 @@
+ AC_SUBST(QTVERSION)
+ AC_SUBST(MOC)
+ AC_SUBST(UIC)
++ if expr "$QTVERSION" '>=' "040000" > /dev/null ; then
++ QT_CXXFLAGS="-I$qt_includes -I$qt_includes/QtCore -I$qt_includes/QtGui"
++ else
++ QT_CXXFLAGS="-I$qt_includes"
++ fi
+- QT_CXXFLAGS="-I$qt_includes"
+ AC_SUBST(QT_CXXFLAGS)
+ QT_LDFLAGS="-L$qt_libraries"
diff --git a/dev-db/myodbc/myodbc-5.1.6.ebuild b/dev-db/myodbc/myodbc-5.1.6.ebuild
new file mode 100644
index 000000000000..6b42bf7f1fbf
--- /dev/null
+++ b/dev-db/myodbc/myodbc-5.1.6.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/myodbc-5.1.6.ebuild,v 1.1 2010/01/31 06:26:53 robbat2 Exp $
+
+EAPI=2
+inherit eutils versionator autotools
+
+MAJOR="$(get_version_component_range 1-2 $PV)"
+MY_PN="mysql-connector-odbc"
+MY_P="${MY_PN}-${PV/_p/r}"
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="http://www.mysql.com/products/myodbc/"
+SRC_URI="mirror://mysql/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
+RESTRICT="primaryuri"
+LICENSE="GPL-2"
+SLOT="${MAJOR}"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc static qt4"
+RDEPEND=">=virtual/mysql-4.0
+ dev-db/unixODBC
+ qt4? ( >=x11-libs/qt-gui-4 )"
+# perl is required for building docs
+DEPEND="${RDEPEND}
+ doc? ( dev-lang/perl )"
+S=${WORKDIR}/${MY_P}
+
+# Careful!
+DRIVER_NAME="${PN}-${SLOT}"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/myodbc-5.1.6-qt4-includedir.patch
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ local myconf="--enable-static"
+ use static \
+ && myconf="${myconf} --disable-shared" \
+ || myconf="${myconf} --enable-shared"
+
+ myconf="${myconf} $(use_with doc docs) $(use_with debug)"
+ #myconf="${myconf} --disable-gui"
+ #TODO: the configure test against qt 4 enter in an endless loop
+ myconf="${myconf}
+ $(use_enable qt4 gui)
+ $(use_with qt4 qt-libraries /usr/$(get_libdir)/qt4/)"
+
+ 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 \
+ --enable-myodbc3i \
+ --enable-myodbc3m \
+ --disable-test \
+ --without-samples \
+ ${myconf} \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake \
+ || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ einstall \
+ libexecdir="${D}"/usr/sbin \
+ sysconfdir="${D}"/etc/myodbc \
+ localstatedir="${D}"/var/lib/myodbc \
+ pkgdatadir="${D}"/usr/share/doc/${PF}
+ dodoc INSTALL README
+ prepalldocs
+ dodir /usr/share/${PN}-${SLOT}
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ sed \
+ -e "s,__PN__,${DRIVER_NAME},g" \
+ -e "s,__PF__,${PF},g" \
+ -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}.so,g" \
+ >"${D}"/usr/share/${PN}-${SLOT}/${i} \
+ <"${FILESDIR}"/${i}.m4 \
+ || die "Failed to build $i"
+ done;
+}
+
+pkg_config() {
+ [ "${ROOT}" != "/" ] && \
+ die 'Sorry, non-standard ROOT setting is not supported :-('
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+ if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/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 "^\[${DRIVER_NAME}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+ elog "If this is a new install, please run the following command"
+ elog "to configure the MySQL ODBC drivers and sources:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Please note that the driver name used to form the DSN now includes the SLOT."
+}