diff options
author | Brian Evans <grknight@gentoo.org> | 2017-06-13 10:59:47 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2017-06-13 10:59:47 -0400 |
commit | 67988f7a829f49c62543ac520875526913fbbcf7 (patch) | |
tree | 15d06140b566bc9cd923a4689a80539d261a86a1 /dev-db/myodbc | |
parent | net-p2p/syncthing: bump to 0.14.30 (diff) | |
download | gentoo-67988f7a829f49c62543ac520875526913fbbcf7.tar.gz gentoo-67988f7a829f49c62543ac520875526913fbbcf7.tar.bz2 gentoo-67988f7a829f49c62543ac520875526913fbbcf7.zip |
dev-db/myodbc: Add binary based ebuild from upstream
Rationale: This package depends on non-public API calls to libmysqlclient.
It requires a lot of time and effort to keep patching this to not use those calls
or the library providers which vary from implementation to implementation.
Instead, use the upstream provided files for this rarely used package.
Most systems use their native library calls instead of ODBC these days.
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-db/myodbc')
-rw-r--r-- | dev-db/myodbc/Manifest | 2 | ||||
-rw-r--r-- | dev-db/myodbc/myodbc-5.3.8-r1.ebuild | 115 |
2 files changed, 117 insertions, 0 deletions
diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest index 86f8f8e52f31..dfdb34451992 100644 --- a/dev-db/myodbc/Manifest +++ b/dev-db/myodbc/Manifest @@ -1,2 +1,4 @@ DIST mysql-connector-odbc-5.2.7-src.tar.gz 606472 SHA256 0ad8fcccb4c41c7100fe02ec0aa87938d33329d23f7b68d1b9031c87750392c9 SHA512 f54ac8a23ade71da85e1335e95eccdccfd68a8687d17a584ced103812bdc5aee8014769a84eaa22724bb2cb23d34c7188c964d3283723defeaef5157a4b3c60f WHIRLPOOL 928808ac5b623ec345c8c1b8495ca1de7f10e65f0d14720e9bee6ab154ccf818ca690745a57fa7fa1c008ba57b24705657398cd9146fbf2e385c178deca0e499 +DIST mysql-connector-odbc-5.3.8-linux-debian8-x86-32bit.tar.gz 11295329 SHA256 67b7648f896c059aa7686b6384eadaddfe7043160b6f23edf3f78499e02cff45 SHA512 5d13d8545f3868eeaceb6e5d8b0f1a3ba8e5ce916ffa6d94467f0b5a0c057129d09fedb0084b25fe36da250aaf8bb21ba991696c1ed0def338792c2e4b592b56 WHIRLPOOL 00fd263c7eec68108b0f53c726a656f66a77627798c13ec9ec15aa3b6e4c51f8ef3562f7fbc3872b33320262b913fe646adc0013e8f8ba9c0dd931bc8f46b94f +DIST mysql-connector-odbc-5.3.8-linux-debian8-x86-64bit.tar.gz 11782557 SHA256 e224456af3af1121e655c04cf809aad97471fcf2ff0082a21ed7b3ac69437776 SHA512 c28c1851a6ca560db78f96610b631edeeefb0006032eb17e3bd55da955abbbdfcf72d4a9b305a21151bb08a28b141ac89b3688cf778bfbc91393bfabb5e63783 WHIRLPOOL 4b9fd8169c77323247f61c6d2f3c843d5f8b3f5b89f9b134a3eec2d2a24c1b8a6a5b1d54241e6f3a6a05636d7701be5fac9a8f4b559555e7b12d65c4eda3172c DIST mysql-connector-odbc-5.3.8-src.tar.gz 690403 SHA256 eca40e1ad359cd1d7e23b6692e60179c8e3daa66337e7a0232de4162664d9885 SHA512 4703deab548f2953a58421b20977ced8dfd197d5274f89dd9e080cebdf35da007e558d5d52b6b09109744eddc2905c834f1e3e2ac83df4249d069d5e14fd34ee WHIRLPOOL 9286058a7d57e13e9a2e683682d87e0226e0e451880a20579867b673144d69f7941fbe16706267ca2caa058b1aef15fb4516445af8ab164fb745cd81a0c2814f diff --git a/dev-db/myodbc/myodbc-5.3.8-r1.ebuild b/dev-db/myodbc/myodbc-5.3.8-r1.ebuild new file mode 100644 index 000000000000..8dafc3edf903 --- /dev/null +++ b/dev-db/myodbc/myodbc-5.3.8-r1.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +MULTILIB_COMPAT=( abi_x86_{32,64} ) +inherit multilib-minimal versionator + +MAJOR="$(get_version_component_range 1-2 $PV)" +MY_PN="mysql-connector-odbc" +MY_P="${MY_PN}-${PV/_p/r}-linux-debian8-x86" + +DESCRIPTION="ODBC driver for MySQL" +HOMEPAGE="http://www.mysql.com/products/myodbc/" +BASE_URI="https://cdn.mysql.com/Downloads/Connector-ODBC/${MAJOR}/${MY_P}" +#https://cdn.mysql.com//Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.8-linux-debian8-x86-64bit.tar.gz +SRC_URI="amd64? ( ${BASE_URI}-64bit.tar.gz abi_x86_32? ( ${BASE_URI}-32bit.tar.gz ) ) + x86? ( ${BASE_URI}-32bit.tar.gz )" + +LICENSE="GPL-2" +SLOT="${MAJOR}" +KEYWORDS="-* ~amd64 ~x86" +IUSE="" + +RDEPEND=" + dev-db/unixODBC[${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + abi_x86_32? ( + !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] + ) +" +S=${WORKDIR} + +#src_configure(){ :; } + +src_compile(){ :; } + +multilib_src_install() { + cd "${S}" || die + local prefix + if use amd64 && multilib_is_native_abi ; then + prefix="${MY_P}-64bit" + else + prefix="${MY_P}-32bit" + fi + exeinto /usr/$(get_libdir)/${PN}-${MAJOR} + doexe ${prefix}/lib/libmyodbc5a.so ${prefix}/lib/libmyodbc5w.so +# use gtk && doexe ${prefix}/lib/libmyodbc5S.so +} + +multilib_src_install_all() { + local DRIVER_NAME="${PN}-${SLOT}" + local prefix + if use amd64 ; then + prefix="${MY_P}-64bit" + else + prefix="${MY_P}-32bit" + fi + exeinto /usr/bin + newexe "${prefix}/bin/myodbc-installer" myodbc-installer-${MAJOR} + + 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__,${MAJOR},g" \ + -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \ + >"${D}/usr/share/${DRIVER_NAME}/${i}" \ + <"${FILESDIR}"/${i}.m4 \ + || die "Failed to build $i" + done; + + dodoc ${prefix}/{ChangeLog,INSTALL,README,Licenses_for_Third-Party_Components.txt} +} + +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." + elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}" +} |