diff options
Diffstat (limited to 'dev-db/myodbc')
-rw-r--r-- | dev-db/myodbc/Manifest | 2 | ||||
-rw-r--r-- | dev-db/myodbc/myodbc-8.0.24-r1.ebuild | 129 |
2 files changed, 131 insertions, 0 deletions
diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest index d4e03d1d40a4..769a97cf8969 100644 --- a/dev-db/myodbc/Manifest +++ b/dev-db/myodbc/Manifest @@ -4,6 +4,8 @@ AUX odbc.ini.m4 406 BLAKE2B 3a20c28b1971753a14a4aa4d30efcc7de833488501a41d940498 AUX odbcinst.ini.m4 118 BLAKE2B 6da835746e063f415ad7d640233cfd96e744cd56e12aaab4a21a2bf0bd5f1bd1e5c3d1c9a28522e3aa07c1261abac92301819d4112ac6a000a729aca9f7f7ad6 SHA512 6d929bbffd602a9f060a05998149a6b16334f8a5e3db30d02ff5d38c0065085d085042521e700b87a63766e32aa27ae92be72cef33c2a7aa8f6767b6b71c82c8 DIST mysql-connector-odbc-8.0.22-src.tar.gz 3726015 BLAKE2B 055920446767b0c9a30a0ca4773e71d662b398a9849df1a0b7975d71a21cfb23f540d8dda5430c717569f173e63673d3e51b025bb098e51202093d33e19bc142 SHA512 c613ae60346cea2e57bade89d813fd5ac21d0712d3d751e3acbc275421da6ac7593afc3da9fb6d161ee413f60e76e670f0c84876591f331925c980d969db4e8c DIST mysql-connector-odbc-8.0.23-src.tar.gz 3726277 BLAKE2B 21b5e6f3f7e77d6107268800441675a230c79071e52db39093fade6e02031c12c96371d165af9459e9739e069e5b4196f0169dff54c0fa300e7a3023e8a82722 SHA512 2f66b5e1796176d638b1209b7d3381c2600a11cc88fa0dfb1f29b16a6c59386926674d5581d4843036d061af09312d58620484730bd7cdad36c0a0dcd45d49a9 +DIST mysql-connector-odbc-8.0.24-src.tar.gz 3736373 BLAKE2B 8d03566471343239dd49f09bc02a0852f73544e0a91532e75d7871fa2842880213df0241691ab5449597bfed9dae3a74d87d2ed43092aad6bd66bee511542863 SHA512 1e182fd017092a47e38c96006a55d2d21496b2e5b67c211f9ea5b3c3cae44035bc9d401fc90c4f4e8ef6a347dbbbf78870b5dbc3711613fc28cddea468efa6f3 EBUILD myodbc-8.0.22.ebuild 3113 BLAKE2B e27fc21290dfa09309813f047e0c72bad42c2cc5ca6aa54c3698b0456b42007d3c7676c5062838be9ecb8033d8b1e12dae01a7bc213cd7ce3356bdd30dee7a86 SHA512 f34dc7a7aaa9825c42ffca24cb9ffa136a8e0abeb5de0871bb3413f7b28cc8587fb01768d60ca55434787ca818acb29d97b13b6ba3ef9e3791e38c8f7b445652 EBUILD myodbc-8.0.23.ebuild 3225 BLAKE2B c0cf4254bb89e23bd358454addbc27f2c27ebef6923766433a5a7e0b5071787d41b9eedea1dff3efc9544788f52a23383800dae0376512fa04d56d53a7363f2f SHA512 f1b2950e6f30ef9f623f53ab7634aeff21a533fb6889e8593461a88987e8bbf15a70fdaf9d3ea1608c3fb7d446e71ab366ae2ff07cd1dc7c5d266dea7044eb24 +EBUILD myodbc-8.0.24-r1.ebuild 3407 BLAKE2B 2f596bc6c032d70039e9e3addfd0e612fcbb7954ae9991386c60e5bfee2cd5aa29d447927d332f1d284095146c697eb82e887f1606a9498bb3576516e97a2a01 SHA512 a04e9445df5c54c5c8ee3fa7f04b6034801e19238e8680b593f7dbca0fa13adc4eb91ee334ed37363f9f2d1d46fe13e983b4fd1d34f3155eabcafd204ad9dd58 MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b diff --git a/dev-db/myodbc/myodbc-8.0.24-r1.ebuild b/dev-db/myodbc/myodbc-8.0.24-r1.ebuild new file mode 100644 index 000000000000..888d9f95fe16 --- /dev/null +++ b/dev-db/myodbc/myodbc-8.0.24-r1.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-multilib + +MAJOR="$(ver_cut 1-2)" +MY_PN="mysql-connector-odbc" +MY_P="${MY_PN}-${PV/_p/r}-src" + +DESCRIPTION="ODBC driver for MySQL" +HOMEPAGE="https://dev.mysql.com/downloads/connector/odbc/" +SRC_URI="https://dev.mysql.com/get/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="${MAJOR}" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +RDEPEND=" + dev-db/unixODBC[${MULTILIB_USEDEP}] + >=dev-db/mysql-connector-c-8.0:0=[${MULTILIB_USEDEP}] +" +DEPEND="${RDEPEND}" +S=${WORKDIR}/${MY_P} + +# Careful! +DRIVER_NAME="${PN}-${SLOT}" + +# Patch document path so it doesn't install files to /usr +PATCHES=( + "${FILESDIR}/${MAJOR}-cmake-doc-path.patch" + "${FILESDIR}/${PN}-8.0.19-cxxlinkage.patch" +) + +src_prepare() { + # Remove Tests + sed -i -e "s/ADD_SUBDIRECTORY(test)//" \ + "${S}/CMakeLists.txt" + + cmake-utils_src_prepare +} + +multilib_src_configure() { + CMAKE_BUILD_TYPE="RelWithDebInfo" + + mycmakeargs+=( + -DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG + -DMYSQLCLIENT_STATIC_LINKING=OFF + -DMYSQL_CXX_LINKAGE=YES + -DWITH_UNIXODBC=YES + -DWITH_DOCUMENTATION_INSTALL_PATH=${EPREFIX}/usr/share/doc/${PF} + -DLIB_SUBDIR="$(get_libdir)/${PN}-${MAJOR}" + -DMYSQLCLIENT_NO_THREADS=ON + -DDISABLE_GUI=ON + # Don't build "libmysql_strings.so" and "libmysql_sys.so" which are only + # used internally + -DBUILD_SHARED_LIBS=OFF + # The NUMA and LIBWRAP options are not really used. + # They are just copied from the server code + -DWITH_NUMA=OFF + -DWITH_LIBWRAP=OFF + ) + + cmake-utils_src_configure +} + +multilib_src_install_all() { + debug-print-function ${FUNCNAME} "$@" + + 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,lib/libmyodbc3.so,$(get_libdir)/${PN}-${MAJOR}/libmyodbc${SLOT:0:1}a.so,g" \ + >"${D}"/usr/share/${PN}-${SLOT}/${i} \ + <"${FILESDIR}"/${i}.m4 \ + || die "Failed to build $i" + done + + rm -rf "${ED}/usr/$(get_libdir)/${PN}-${MAJOR}/private" \ + || die "failed to remove bundled libs" + + mv "${D}/usr/bin/myodbc-installer" \ + "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary" +} + +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}" +} |