From 64e107b9b6058580ff0432107eb37cefb0b2a7d8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 22 Oct 2018 11:09:47 +0100 Subject: gentoo resync : 22.10.2018 --- dev-db/myodbc/Manifest | 6 - .../myodbc/files/5.2.7-mariadb-dynamic-array.patch | 79 ------------- dev-db/myodbc/files/5.2.7-my_malloc.patch | 18 --- dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch | 40 ------- dev-db/myodbc/myodbc-5.2.7-r1.ebuild | 117 ------------------ dev-db/myodbc/myodbc-5.2.7-r3.ebuild | 131 --------------------- 6 files changed, 391 deletions(-) delete mode 100644 dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch delete mode 100644 dev-db/myodbc/files/5.2.7-my_malloc.patch delete mode 100644 dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch delete mode 100644 dev-db/myodbc/myodbc-5.2.7-r1.ebuild delete mode 100644 dev-db/myodbc/myodbc-5.2.7-r3.ebuild (limited to 'dev-db/myodbc') diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest index e67d2e7e2ee7..56040f63084b 100644 --- a/dev-db/myodbc/Manifest +++ b/dev-db/myodbc/Manifest @@ -1,18 +1,12 @@ -AUX 5.2.7-mariadb-dynamic-array.patch 3053 BLAKE2B 1c72b7318dcfd035655285c433a88d76d09200560db1530f76ab69e9ff765f17351b88aedabb297bb55f07aee5197cf29757534fc5373f95bad65fc49db93fe5 SHA512 26d35effbf4e74ef634c6e42dced40830402aa0925571f4bd55acd3dfe06f1c8c8f3bab4e9bb4bcd3f72dc87ecc3a093b984df4837548710899f97d8bdeca7b6 -AUX 5.2.7-my_malloc.patch 594 BLAKE2B c9d9aad2e9b9e3e2b30ff41e6ec68343557123517b808df6888d91f48e68cbb1de852f31b057dffea40264a717077e4bbce6f78438535eb11cb660986f469892 SHA512 bcd26b2f8de21404c741fec51bb7e7bec32a5d3fbc90471c157ee275dc6136a44a6ef4d2ad8dd170e2852679d3fcb0cc74cf4acca0570702206b4cded1cb1fa5 -AUX 5.2.7-r1-cxxlinkage.patch 1707 BLAKE2B aaf7ef0f319f2e00034307f51406c82580f5d257b61d722d7d610e731b9c549ff54b88279689c226df72837c5af35911ee1f4dd756b989f4018a78d3e3d5e940 SHA512 3d0f1839e1b200d7746d2c7161ee2a85813bf40517a70777d361e482efd6d6b0be88415d339d6dccc49de865a0d714fbbce2b74abb1bbc12c4f4681a5bd5abf8 AUX 5.3-cmake-doc-path.patch 1480 BLAKE2B 5f89253a86fa97fbf4103fbe797f60449245195e9c8d0f6d7f065e654a402de0461459dd11d9d878f0794089261ee5ee9fac3240bf90f7c8382edb54d84b27a6 SHA512 aa2303161af2b53608acc127464951cf77492a1a90e869a58893ba10a014077d7f8f319325b77713fffceeaa002943f4ce52b6cb9571b0b3d3d7ab562601968d AUX 5.3.10-cxxlinkage.patch 1027 BLAKE2B b3df78658e4fb3243debb6f95cea6c5530db309ffc50f3a6afaff8bce143d147b4645a4bef4a54f6d04203ea132d4245812f5a2473ad7e9899f6e6b3c0799213 SHA512 f4d6df55313ccba995c8bd2e182397ce2652c2fbc0f0706474386654fb890fc47cad3a18f306206e840a47b729569e9a0ccb1cc2401c5280792afc4f544b41fd AUX 5.3.10-mariadb.patch 1744 BLAKE2B a9e33c86f999394d77757f69f1f314238123fa4158297961b4ce0f501e6fb743927e892c1f6640945842e843da56a826e5da1a968d84f7e5dcf3b2b4a590c0e8 SHA512 ebf62a2e0cc901fce81d0ad358f62d1c41494a5e35fb5a4df6913d1f4d5b8bbb638a23cabfe483818efa39688744b7be8b98d922b4bdff830de701c665da0fa0 AUX cmake-doc-path.patch 1498 BLAKE2B b79110c92b7fc80c64fdf05b469c4bb333d68610ff4fadc78bd307689651e41bcd66f33fd782db1b69c863ef81faee3d5eb485d5c9bd284db8be3948d2bec7e7 SHA512 2e48af11efb55a1508402d5d1d717a3dfc9897bf0ccce5aa190792fb673ac78b27a9480e951a6347a2c8d0e2fe08a28c11fd08c55dbea835a93f525decaaf09e AUX odbc.ini.m4 406 BLAKE2B 3a20c28b1971753a14a4aa4d30efcc7de833488501a41d9404987567623d48250ce1daea1d3138adaef36741c4f2e0eafc60eba554e5262b45084f93f5205160 SHA512 84ab2a3aab594123d42b65205a7faf8e91fe9416a9e3c4c4c354533b9a298395f59172649c91dc0b671392bfbe5baeaddb6aa47119ce4c825917f3977d9dd521 AUX odbcinst.ini.m4 118 BLAKE2B 6da835746e063f415ad7d640233cfd96e744cd56e12aaab4a21a2bf0bd5f1bd1e5c3d1c9a28522e3aa07c1261abac92301819d4112ac6a000a729aca9f7f7ad6 SHA512 6d929bbffd602a9f060a05998149a6b16334f8a5e3db30d02ff5d38c0065085d085042521e700b87a63766e32aa27ae92be72cef33c2a7aa8f6767b6b71c82c8 -DIST mysql-connector-odbc-5.2.7-src.tar.gz 606472 BLAKE2B 297f1ae57802f682616283bae9c3ff7ef88f8f016274884794f6b476bf9b92bc1da8af9cb89f41fa2a74238f91fbc39b9427529b806ac4ffb52aecd895cd8cd8 SHA512 f54ac8a23ade71da85e1335e95eccdccfd68a8687d17a584ced103812bdc5aee8014769a84eaa22724bb2cb23d34c7188c964d3283723defeaef5157a4b3c60f DIST mysql-connector-odbc-5.3.10-src.tar.gz 2646571 BLAKE2B e85e179ee8a54c8c98dd254e949c08227adc72141d52bc15935eafd60edaf95f47c12ca51fa9472ae29c761d5de2149277c58e6d3f02a566668be17f595ca7ba SHA512 ebe56b95a1690332959a7a37e8ed381b46730fb9f6fbd6522ddc1a6961e4c8cdac59681a957b33abeb6cae12f210278e4063daa59ce952d92acf427bc188e22b DIST mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit.tar.gz 11501665 BLAKE2B e41dd65d940c0c91c67e6ec4c46ea2c3327e96d372c493635d05833862f2aa73919410a9e9a9c090a6fa65fd29e022a9b088c07a5e11089aee04b3b86005ad1e SHA512 02fcf6ac88f6052206aa55b6fc2b37f499da26e596e8e64b1c20e87dc4a24f745416da56c6e1268feff60321f54cb45864b8d34e055ea2f99da37b6efeedc844 DIST mysql-connector-odbc-5.3.9-linux-debian9-x86-64bit.tar.gz 12013057 BLAKE2B e372cfb6ca49f9f01e9e60d7cd497fc009ec38dee76ca2cfb74cc95213b84ef1eebca85e1400f19c9715c0f9b2ef40fc212196e14189f5506be8d0e887507ce4 SHA512 b54ca167f762b4d8b988b4a91f14dc6a4bf49f55bc639ce8eecc9eba6c11400bd3494d74ef77ebe3348bdefd8fb5b8c1b62b3a6beebb926a1899da17ea4a1b44 -EBUILD myodbc-5.2.7-r1.ebuild 3300 BLAKE2B 9cc0f8a8ddf448c286594d7f27a85c113b98de2ded3eee1cc16661c54f48075fded3a8b0906a542a4a268e1144ab6d9c1b221d850b06faf9553bde8b4ca731bd SHA512 d8ffec3733dd3a811155fe03296081d3d54c17ed2d46b41e48213cf5f996ae7a4955d216355a8c0afa20142ccd243ebbbbfb8d40826fcd3f1a1e681b34126879 -EBUILD myodbc-5.2.7-r3.ebuild 3698 BLAKE2B 150992141e50dad64396392399791f02a8920485dae1d23c776a89cce3f648b9d0fac1c59202409be03c5bc27b7ca582d31ab1ff3480d9beef5847eda0e0380d SHA512 ee50335e1dff98d7b5b2a4248972c8423a4aaa8293a9404f659a789b9bb915f43e2d174482e07a9179af1cf6bf822de6a5a2e746f7410de7b06a350a3d03f9d2 EBUILD myodbc-5.3.10-r2.ebuild 3588 BLAKE2B db9749af6dd80c60ae359485e3526258e43ea7003b2302076b0ef39a72098663b27f9413d050809328fe4348f5c129135f163da8d895f65d8c9f76bd53415eb4 SHA512 33d3aced0bc4575baa860dc53f1a6b35b6a5dc2e1815d88922d66c5270e570deaa0dc20018d9329c4651cef00f48b902b208671dd0836e7224d11972491b9e66 EBUILD myodbc-5.3.9.ebuild 3072 BLAKE2B 4922ed231672f11742590007b7b1f5c5dfa27263a6c98893b373793da06088f29c5401917179d479f4c57b24b2a1be9c3507caa752db79f3268fceff4719013d SHA512 4da8b034a745c453a310391a38e5cb1697bfa51838edc6903ee643e7dbe28fa5fb8f7d34264f88bb79b2aba83fa042212c0a2dd251c15150f7f0a2fcf561e052 MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b diff --git a/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch b/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch deleted file mode 100644 index 6cfe7cd274b3..000000000000 --- a/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff -aurN a/driver/catalog_no_i_s.c b/driver/catalog_no_i_s.c ---- a/driver/catalog_no_i_s.c 2014-06-18 18:50:16.000000000 -0400 -+++ b/driver/catalog_no_i_s.c 2014-08-20 14:08:33.997339096 -0400 -@@ -1093,7 +1093,11 @@ - unsigned long *lengths; - SQLRETURN rc= SQL_SUCCESS; - -+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 -+ my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0, MYF(0)); -+#else - my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0); -+#endif - - /* Get the list of tables that match szCatalog and szTable */ - pthread_mutex_lock(&stmt->dbc->lock); -diff -aurN a/driver/desc.c b/driver/desc.c ---- a/driver/desc.c 2014-06-18 18:50:16.000000000 -0400 -+++ b/driver/desc.c 2014-08-20 14:07:37.409169269 -0400 -@@ -63,8 +63,12 @@ - but in desc_get_rec we manually get a pointer to it. This avoids - having to call set_dynamic after modifying the DESCREC. - */ -+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 -+ if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0, MYF(0))) -+#else - if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0)) -+#endif - { - x_free((char *)desc); - return NULL; - } -@@ -995,9 +1003,15 @@ - - /* copy the records */ - delete_dynamic(&dest->records); -+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 -+ if (my_init_dynamic_array(&dest->records, sizeof(DESCREC), -+ src->records.max_element, -+ src->records.alloc_increment, MYF(0))) -+#else - if (my_init_dynamic_array(&dest->records, sizeof(DESCREC), - src->records.max_element, - src->records.alloc_increment)) -+#endif - { - return set_desc_error(dest, "HY001", - "Memory allocation error", -diff -aurN a/driver/handle.c b/driver/handle.c ---- a/driver/handle.c 2014-06-18 18:50:16.000000000 -0400 -+++ b/driver/handle.c 2014-08-20 14:05:00.364248403 -0400 -@@ -403,7 +403,11 @@ - } - } - -+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 -+ my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10, MYF(0)); -+#else - my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10); -+#endif - memset((*param_bind)->buffer, 0, sizeof(MYSQL_BIND) * - (*param_bind)->max_element); - -diff -aurN a/driver/parse.c b/driver/parse.c ---- a/driver/parse.c 2014-06-18 18:50:16.000000000 -0400 -+++ b/driver/parse.c 2014-08-20 14:03:54.336383876 -0400 -@@ -129,8 +129,13 @@ - - /* TODO: Store offsets rather than ptrs. In this case we will be fine - if work with copy of the originally parsed string */ -+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 -+ my_init_dynamic_array(&pq->token, sizeof(uint), 20, 10, MYF(0)); -+ my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10, MYF(0)); -+#else - my_init_dynamic_array(&pq->token, sizeof(uint), 20, 10); - my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10); -+#endif - } - - return pq; diff --git a/dev-db/myodbc/files/5.2.7-my_malloc.patch b/dev-db/myodbc/files/5.2.7-my_malloc.patch deleted file mode 100644 index bc6c65ef3011..000000000000 --- a/dev-db/myodbc/files/5.2.7-my_malloc.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -Brau a/util/odbcinstw.c b/util/odbcinstw.c ---- a/util/odbcinstw.c 2014-04-23 21:54:40.000000000 +0200 -+++ b/util/odbcinstw.c 2015-05-08 15:29:09.400568356 +0200 -@@ -68,13 +68,7 @@ - - if (lpszRetBuffer && cbRetBuffer) - { -- ret= malloc(cbRetBuffer + 1); -- /* -- We cannot rely on getting correct results from the next call of -- SQLGetPrivateProfileString. So, taking precautions against unititialized -- values in the allocated buffer. -- */ -- memset(ret, 0, cbRetBuffer + 1); -+ ret= my_malloc(cbRetBuffer + 1, MYF(MY_ZEROFILL)); - } - else - ret= NULL; diff --git a/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch b/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch deleted file mode 100644 index 2bdb4a581c89..000000000000 --- a/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -uarN a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake ---- a/cmake/FindMySQL.cmake 2014-06-18 18:50:16.000000000 -0400 -+++ b/cmake/FindMySQL.cmake 2014-08-20 10:05:00.191485304 -0400 -@@ -105,16 +105,16 @@ - # Finally remove the dot - STRING(REGEX REPLACE "[.]" "" MYSQL_NUM_VERSION "${MYSQL_NUM_VERSION}") - -- IF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) -+ IF(MYSQL_CXX_LINKAGE) - EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cxxflags" - OUTPUT_VARIABLE _mysql_config_output - ) - SET(MYSQL_CXX_LINKAGE 1) -- ELSE (MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) -+ ELSE (MYSQL_CXX_LINKAGE) - EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags" - OUTPUT_VARIABLE _mysql_config_output - ) -- ENDIF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) -+ ENDIF(MYSQL_CXX_LINKAGE) - - # Remove the stl4port dependency - STRING(REGEX REPLACE "-library=stlport4" "" _mysql_config_output "${_mysql_config_output}") -diff -aurN mysql-connector-odbc-5.2.7-src.orig/CMakeLists.txt mysql-connector-odbc-5.2.7-src/CMakeLists.txt ---- a/CMakeLists.txt 2014-08-27 13:51:27.050553560 -0400 -+++ b/CMakeLists.txt 2014-08-27 13:55:41.702359680 -0400 -@@ -256,10 +256,9 @@ - SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") - SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib") - --SET(LIB_SUBDIR "lib") --IF(RPM_BUILD AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64|ppc64p7|s390x|sparc64)") -- SET(LIB_SUBDIR "lib64") --ENDIF() -+IF(NOT LIB_SUBDIR) -+ MESSAGE(ERROR "LIB_SUBDIR is not set") -+ENDIF(NOT LIB_SUBDIR) - MESSAGE(STATUS "Installation library subdir: ${LIB_SUBDIR}") - - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) diff --git a/dev-db/myodbc/myodbc-5.2.7-r1.ebuild b/dev-db/myodbc/myodbc-5.2.7-r1.ebuild deleted file mode 100644 index 2698ccabd5da..000000000000 --- a/dev-db/myodbc/myodbc-5.2.7-r1.ebuild +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit cmake-multilib eutils flag-o-matic versionator - -MAJOR="$(get_version_component_range 1-2 $PV)" -MY_PN="mysql-connector-odbc" -MY_P="${MY_PN}-${PV/_p/r}-src" - -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="" - -RDEPEND=" - dev-db/unixODBC[${MULTILIB_USEDEP}] - ~virtual/libmysqlclient-18[${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND}" -S=${WORKDIR}/${MY_P} - -# Careful! -DRIVER_NAME="${PN}-${SLOT}" - -src_prepare() { - # Remove Tests - sed -i -e "s/ADD_SUBDIRECTORY(test)//" \ - "${S}/CMakeLists.txt" - - # Fix as-needed on the installer binary - echo "TARGET_LINK_LIBRARIES(myodbc-installer odbc)" >> "${S}/installer/CMakeLists.txt" - - # Patch document path so it doesn't install files to /usr - epatch "${FILESDIR}/cmake-doc-path.patch" \ - "${FILESDIR}/${PVR}-cxxlinkage.patch" \ - "${FILESDIR}/${PV}-mariadb-dynamic-array.patch" - - # Fix undefined references due to standards change - append-cflags -std=gnu89 -} - -multilib_src_configure() { - # The RPM_BUILD flag does nothing except install to /usr/lib64 when "x86_64" - # MYSQL_CXX_LINKAGE expects "mysql_config --cxxflags" which doesn't exist on MariaDB - mycmakeargs+=( - -DMYSQL_CXX_LINKAGE=0 - -DWITH_UNIXODBC=1 - -DMYSQLCLIENT_LIB_NAME="libmysqlclient.so" - -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF} - -DMYSQL_LIB_DIR="${ROOT}/usr/$(get_libdir)" - -DLIB_SUBDIR="$(get_libdir)" - ) - 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,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \ - >"${D}"/usr/share/${PN}-${SLOT}/${i} \ - <"${FILESDIR}"/${i}.m4 \ - || die "Failed to build $i" - done; - 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}" -} diff --git a/dev-db/myodbc/myodbc-5.2.7-r3.ebuild b/dev-db/myodbc/myodbc-5.2.7-r3.ebuild deleted file mode 100644 index f44807fe599e..000000000000 --- a/dev-db/myodbc/myodbc-5.2.7-r3.ebuild +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit cmake-multilib flag-o-matic versionator - -MAJOR="$(get_version_component_range 1-2 $PV)" -MY_PN="mysql-connector-odbc" -MY_P="${MY_PN}-${PV/_p/r}-src" - -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="" - -# Does not build with mysql-connector-c -RDEPEND=" - dev-db/unixODBC[${MULTILIB_USEDEP}] - ~virtual/libmysqlclient-18[${MULTILIB_USEDEP}] - !dev-db/mysql-connector-c - !>=dev-db/mariadb-10.2.0 -" -DEPEND="${RDEPEND}" -S=${WORKDIR}/${MY_P} - -# Careful! -DRIVER_NAME="${PN}-${SLOT}" - -src_prepare() { - # Remove Tests - sed -i -e "s/ADD_SUBDIRECTORY(test)//" \ - "${S}/CMakeLists.txt" - - # Fix as-needed on the installer binary - echo "TARGET_LINK_LIBRARIES(myodbc-installer odbc)" >> "${S}/installer/CMakeLists.txt" - - # Patch document path so it doesn't install files to /usr - local FILES=( "${FILESDIR}/cmake-doc-path.patch" - "${FILESDIR}/${PV}-r1-cxxlinkage.patch" - "${FILESDIR}/${PV}-mariadb-dynamic-array.patch" - "${FILESDIR}/${PV}-my_malloc.patch" ) - - # Fix undefined references due to standards change - append-cflags -std=gnu89 - - MYSQL_SERVER_INCLUDE=$(mysql_config --include | cut -d ' ' -f 1) - append-cflags "${MYSQL_SERVER_INCLUDE}/server" - - append-cppflags -DSTACK_DIRECTION=1 - - cmake-utils_src_prepare -} - -multilib_src_configure() { - # The RPM_BUILD flag does nothing except install to /usr/lib64 when "x86_64" - # MYSQL_CXX_LINKAGE expects "mysql_config --cxxflags" which doesn't exist on MariaDB - mycmakeargs+=( - -DMYSQL_CXX_LINKAGE=0 - -DWITH_UNIXODBC=1 - -DMYSQLCLIENT_LIB_NAME="libmysqlclient.so" - -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF} - -DMYSQL_LIB_DIR="${ROOT}/usr/$(get_libdir)" - -DLIB_SUBDIR="$(get_libdir)" - -DNO_THREADS=ON - ) - 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,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \ - -e "s,lib/libmyodbc,$(get_libdir)/${DRIVER_NAME}/libmyodbc,g" \ - >"${D}"/usr/share/${PN}-${SLOT}/${i} \ - <"${FILESDIR}"/${i}.m4 \ - || die "Failed to build $i" - done; - 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}" -} -- cgit v1.2.3