From nobody Thu Feb 2 23:47:11 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P7FnW6yV5z3kjvl; Thu, 2 Feb 2023 23:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P7FnW68jFz3lhN; Thu, 2 Feb 2023 23:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675381631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eA6d14D1zwSQb1Z5c0aTdzdKpARlUL4ecipbyK8oI2w=; b=MPwwZJoHKFpUk9SusW4c644W5S1x+pEHmNkmjcZBETu7uekDGqjAMVX0wiAvHrq2noLKsk JC/qhwfv71vuNnSCKi8ddipF5oyf5kgd+jlpVYSAGe9T6J3Wj69Gt9aGURp2nL82nLbTM+ 2SWDTVicKqLcsSIg5WmRDdVrTMYcxzX8IiTP4+noz0dgwbjeTJdNWmdGmzWN59JL21D9UT 9uKW2WAERtR8UXTlDbldlRhgN98ScbAppayk5B2i2rQEyBu13xWFKW0kU9nvKRS6/DyjvC y09swckuucwHiROXNI7NHyZeqDg2xxm1vOPmyOCa3NW02t/UnBMIb/h55EyAtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675381631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eA6d14D1zwSQb1Z5c0aTdzdKpARlUL4ecipbyK8oI2w=; b=y0jAHzw/lXZiapF9zuuIsNw+BMu+Ian1t6zMX3gNnAl73XQIusq3nxpqb9CjnjCrDotZ3z 32OioDeIjPWjUwh8JVIlGWF8m7Te7OQVLo1l3gZ8+uktaNxuZSprZ7+/P+Z5go1ASHIZHi PYy8Wj48sKdThYWhTIkVKHGKP2t6LdNUNb/1QMGJt/ZvjaoPYAsWQTxDoQueBGYU21z+mG hzftYK91ALcQH0+kX2qi1GdWORu0Ng2WvFcYT276Eqzt0Wtuv37wH4aCfkvxLj34t7vWDz luVQO18s8qGXB/sQZvMT6ZiGTehEXX1YlK+E8n8wJ94sS7vBRqNyo8Hx5FHPcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675381631; a=rsa-sha256; cv=none; b=HQA3gPmFZ186pNH4GeQ3REqgK6zBK5b2NnS6Ic98wIOJeT212MQ+0yMO6PRakn20eSYXGc /rMI/xdHETB+2mRrCPFd9Cks8+/y2rQnpoP9DkmByB7FspmerqUJloxo8eCDpj6W2vWiVZ EvqDmNFeipQ9s2btLH7LCuE0p+IUPv9JVr+iWeCo/5ZwWkJT73axhHn8J08EdFBGvtCZHG ed/fTScbe+D/w8wx4sHOrO+HPDYRa8dcZM3j0/+pXzHYjZDCXHDHfLN+cVcd3hb4FqBr8V 7LDVyVY6srVDzztiBiVBcL6AAQghBOr7pJ0cOVw0zvb3JiPY1AO5e2qC3cldgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P7FnW52NVz1Cwq; Thu, 2 Feb 2023 23:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 312NlBnK048875; Thu, 2 Feb 2023 23:47:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 312NlBYD048874; Thu, 2 Feb 2023 23:47:11 GMT (envelope-from git) Date: Thu, 2 Feb 2023 23:47:11 GMT Message-Id: <202302022347.312NlBYD048874@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 4ca987b79b39 - main - databases/mysql-connector-odbc-80: New port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ca987b79b39ecaaab4f8ab3a433f14884f2cd28 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=4ca987b79b39ecaaab4f8ab3a433f14884f2cd28 commit 4ca987b79b39ecaaab4f8ab3a433f14884f2cd28 Author: Muhammad Moinur Rahman AuthorDate: 2023-02-02 23:45:42 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2023-02-02 23:45:42 +0000 databases/mysql-connector-odbc-80: New port MySQL Connector ODBC is an ODBC driver for interfacing to MySQL databases. This is specific to mysql version 8.0.X branch. --- databases/Makefile | 1 + databases/mysql-connector-odbc-80/Makefile | 39 ++++ databases/mysql-connector-odbc-80/distinfo | 3 + .../files/patch-CMakeLists.txt | 234 +++++++++++++++++++++ .../files/patch-driver_dll.cc | 11 + .../files/patch-include_mysql-8.0_my__sys.h | 24 +++ databases/mysql-connector-odbc-80/pkg-descr | 1 + 7 files changed, 313 insertions(+) diff --git a/databases/Makefile b/databases/Makefile index d474d4765cdc..3a6cbb867cc9 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -205,6 +205,7 @@ SUBDIR += mysql-connector-java SUBDIR += mysql-connector-java51 SUBDIR += mysql-connector-odbc + SUBDIR += mysql-connector-odbc-80 SUBDIR += mysql-q4m SUBDIR += mysql-udf SUBDIR += mysql2pgsql diff --git a/databases/mysql-connector-odbc-80/Makefile b/databases/mysql-connector-odbc-80/Makefile new file mode 100644 index 000000000000..d19d0dc17b65 --- /dev/null +++ b/databases/mysql-connector-odbc-80/Makefile @@ -0,0 +1,39 @@ +PORTNAME= mysql-connector-odbc +PORTVERSION= 8.0.32 +CATEGORIES= databases +MASTER_SITES= MYSQL/Connector-ODBC/8.0 +PKGNAMESUFFIX= -${DRIVER_MANAGER}-mysql${MYSQL_VER} +DISTNAME= ${PORTNAME}-${PORTVERSION}-src + +MAINTAINER= bofh@FreeBSD.org +COMMENT= ODBC driver for MySQL${MYSQL_VER} / ${DRIVER_MANAGER} +WWW= https://www.mysql.com/ + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +LIB_DEPENDS= libodbc.so:databases/unixODBC \ + libunwind.so:devel/libunwind \ + libzstd.so:archivers/zstd + +USES= cmake compiler:c++11-lang localbase:ldflags mysql:80 ssl +IGNORE_WITH_MYSQL= 56 57 101m 102m 103m 57p 57w +USE_LDCONFIG= yes + +CMAKE_ARGS= -DWITH_UNIXODBC=1 -DDISABLE_GUI=1 + +DRIVER_MANAGER= unixodbc + +PLIST_FILES= bin/myodbc-installer \ + lib/libmyodbc8a.so \ + lib/libmyodbc8w.so \ + test/dltest +PORTDOCS= * + +OPTIONS_DEFINE= DOCS + +post-install: + @${RM} ${STAGEDIR}${PREFIX}/INFO_BIN + @${RM} ${STAGEDIR}${PREFIX}/INFO_SRC + +.include diff --git a/databases/mysql-connector-odbc-80/distinfo b/databases/mysql-connector-odbc-80/distinfo new file mode 100644 index 000000000000..6348964715af --- /dev/null +++ b/databases/mysql-connector-odbc-80/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1675358550 +SHA256 (mysql-connector-odbc-8.0.32-src.tar.gz) = 068f275afccc69e2ea5ea0d59ea0ecf0380710f9a9f6158e4751f07d5eec84a2 +SIZE (mysql-connector-odbc-8.0.32-src.tar.gz) = 3845574 diff --git a/databases/mysql-connector-odbc-80/files/patch-CMakeLists.txt b/databases/mysql-connector-odbc-80/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..366b09a1ecf7 --- /dev/null +++ b/databases/mysql-connector-odbc-80/files/patch-CMakeLists.txt @@ -0,0 +1,234 @@ +--- CMakeLists.txt.orig 2022-12-10 21:58:26 UTC ++++ CMakeLists.txt +@@ -458,7 +458,7 @@ IF(WIN32) + + if (FIX_WARNINGS) + +- # TODO: Increase warning level and once all warnings are cleared, enable ++ # TODO: Increase warning level and once all warnings are cleared, enable + # higher warning level in MAINTAINER_MODE. We start with no warnings on + # level /W1 + +@@ -478,7 +478,7 @@ ELSE(WIN32) + if(FIX_WARNINGS) + + # TODO: Fix the compile warnings generated without `-w`. Once done, +- # remove this option in MAINTAINER_MODE so that we see when new ++ # remove this option in MAINTAINER_MODE so that we see when new + # warnings appear. Then proceed to `-w extra`. + + add_compile_options(-Werror) +@@ -486,7 +486,7 @@ ELSE(WIN32) + else() + + add_compile_options( -w ) +- ++ + endif() + + ENDIF(WIN32) +@@ -517,7 +517,6 @@ ADD_SUBDIRECTORY(installer) + + ADD_SUBDIRECTORY(dltest) + ADD_SUBDIRECTORY(installer) +-ADD_SUBDIRECTORY(test) + + # For dynamic linking use the built-in sys and strings + IF(NOT MYSQLCLIENT_STATIC_LINKING) +@@ -591,10 +590,10 @@ INCLUDE(cmake/info_bin.cmake) + #------------ Installation --------------------------- + INCLUDE(cmake/info_bin.cmake) + +-INSTALL(FILES LICENSE.txt DESTINATION .) ++INSTALL(FILES LICENSE.txt DESTINATION ./share/doc/mysql-connector-odbc/) + + if(EXISTS "${CMAKE_SOURCE_DIR}/README.txt") +- INSTALL(FILES README.txt DESTINATION .) ++ INSTALL(FILES README.txt DESTINATION ./share/doc/mysql-connector-odbc/) + else() + INSTALL(FILES README.md DESTINATION .) + INSTALL(FILES CONTRIBUTING.md DESTINATION .) +@@ -658,7 +657,7 @@ ELSE(WIN32) + + ELSE(WIN32) + +- INSTALL(FILES ChangeLog DESTINATION .) ++ INSTALL(FILES ChangeLog DESTINATION ./share/doc/mysql-connector-odbc/) + + ENDIF(WIN32) + +@@ -666,16 +665,16 @@ ENDIF(WIN32) + # Bundle 3rd party dependencies if needed + # ======================================= + +-# If build is configured with BUNDEL_DEPENDENCIES enabled then client-side +-# plugins, their dependencies and other dependencies of the client library that +-# are found at the client library installation location are copied to the ++# If build is configured with BUNDEL_DEPENDENCIES enabled then client-side ++# plugins, their dependencies and other dependencies of the client library that ++# are found at the client library installation location are copied to the + # location where ODBC driver is installed. + # +-# The lists of known plugins and 3rd party libraries are specified below. Only +-# the specified plugins and libraries will be bundled. Also plugins and +-# libraries that can be found with the server but which should be ignored are +-# specified below. When building in MAINTAINER_MODE cmake will report error if +-# it finds a plugin or 3rd party librariy which is not listed here. When that ++# The lists of known plugins and 3rd party libraries are specified below. Only ++# the specified plugins and libraries will be bundled. Also plugins and ++# libraries that can be found with the server but which should be ignored are ++# specified below. When building in MAINTAINER_MODE cmake will report error if ++# it finds a plugin or 3rd party librariy which is not listed here. When that + # happens the lists should be updated. + # + # TODO: Move these checks to cmake/FindMySQL.cmake ? +@@ -697,20 +696,20 @@ endif() + # Plugin dependencies. + # + # Warning: If one library name is a prefix of the other, the longer name +-# should be listed first, otherwise the logic detecting missing dependencies ++# should be listed first, otherwise the logic detecting missing dependencies + # will break... For example: `krb5support` must go before `krb5` + + set(AUTH_DEPS_fido fido2) + + if(WIN32) +- set(AUTH_DEPS_kerberos ++ set(AUTH_DEPS_kerberos + comerr gssapi k5sprt krbcc xpprof krb5 + ) + else() + set(AUTH_DEPS_kerberos gssapi_krb5 k5crypto krb5support krb5 com_err) + endif() + +-# Note: On Solaris and macOS all dependencies of ldap_sasl plugin are assumed ++# Note: On Solaris and macOS all dependencies of ldap_sasl plugin are assumed + # to be part of the OS. + + if(NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS") +@@ -730,7 +729,7 @@ set(BUNDLED_LIBS + libssl libcrypto ssleay libeay + ) + +-# List plugins and other libraries that can be found bundled with the server ++# List plugins and other libraries that can be found bundled with the server + # but which are not relevant on client-side and can be safely ignored. + + set(IGNORED_PLUGINS qa_auth_client) +@@ -797,11 +796,11 @@ endfunction(bundle_lib) + + + # Bundle libraries listed in a list variable ${to_bundle}. +-# Libraries that were found and bundled are removed from ${to_bundle} list. +-# Other libraries found but not listed in ${to_bundle} are returned ++# Libraries that were found and bundled are removed from ${to_bundle} list. ++# Other libraries found but not listed in ${to_bundle} are returned + # in ${ignored} variable. +-# If additional arguments are given, they are used as glob expressions to find +-# the libraries to be bundled, otherwise 3rd parties bundled in with the server ++# If additional arguments are given, they are used as glob expressions to find ++# the libraries to be bundled, otherwise 3rd parties bundled in with the server + # are searched in ${MYSQL_LIB_DIR} locations. + + macro(bundle_libs to_bundle ignored) +@@ -811,12 +810,12 @@ macro(bundle_libs to_bundle ignored) + if(ARGN) + + file(GLOB _bundled ${ARGN}) +- ++ + else() + + file(GLOB _bundled + "${MYSQL_LIB_DIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*" +- "${MYSQL_LIB_DIR}/private/*${CMAKE_SHARED_LIBRARY_SUFFIX}*" ++ "${MYSQL_LIB_DIR}/private/*${CMAKE_SHARED_LIBRARY_SUFFIX}*" + ) + + # On windows, libs are in bin directory +@@ -865,9 +864,9 @@ endmacro(bundle_libs) + endmacro(bundle_libs) + + +-# Bundle plugins listed in PLUGINS list. Each bundled plugin P is removed from +-# the list and its dependedencies listed in DEPS_${P} are also bundled. Client +-# side plugins found with the server and not listed in PLUGINS are returned ++# Bundle plugins listed in PLUGINS list. Each bundled plugin P is removed from ++# the list and its dependedencies listed in DEPS_${P} are also bundled. Client ++# side plugins found with the server and not listed in PLUGINS are returned + # in ${ignored} list. + + macro(bundle_plugins ignored) +@@ -888,7 +887,7 @@ macro(bundle_plugins ignored) + + #message("== looking at client-side plugin: ${lib_name}") + +- # Match plugin name against names in PLUGINS list and in case of match ++ # Match plugin name against names in PLUGINS list and in case of match + # remove that name from the list + + unset(plugin) +@@ -926,7 +925,7 @@ macro(bundle_plugins ignored) + set(sasl_bundled 1) + endif() + +- # On Windows the MIT Kerberos library uses ccapiserver.exe application ++ # On Windows the MIT Kerberos library uses ccapiserver.exe application + # in some scenarios - we need to bundle it as well. + + if(WIN32 AND "${DEPS_${plugin}}" MATCHES "krb5") +@@ -1000,7 +999,7 @@ if(BUNDLE_DEPENDENCIES) + endforeach() + + # Bundle the plugins and their dependencies. +- ++ + unset(ingored) + bundle_plugins(ignored) + +@@ -1012,7 +1011,7 @@ if(BUNDLE_DEPENDENCIES) + + foreach(plugin ${IGNORED_PLUGINS}) + +- # Note: Old cmake (seen with 3.13.4) generates this error on ++ # Note: Old cmake (seen with 3.13.4) generates this error on + # list(FILTER...) if the list is empty: + # "list sub-command FILTER requires list to be present" + +@@ -1037,8 +1036,8 @@ if(BUNDLE_DEPENDENCIES) + + message(STATUS "Looking for bundled client lib dependencies") + +- # Bundle additional libraries listed in BUNDLED_LIBS +- # For OpenSSL libs, first look in the location of the library that ++ # Bundle additional libraries listed in BUNDLED_LIBS ++ # For OpenSSL libs, first look in the location of the library that + # is actually being used in the build. + + #message("== BUNDLED_LIBS: ${BUNDLED_LIBS}") +@@ -1052,12 +1051,12 @@ if(BUNDLE_DEPENDENCIES) + unset(extra_libs) + bundle_libs(BUNDLED_LIBS extra_libs) + +- # In MAINTAINER_MODE check whether all 3rd party libs found but not bundled ++ # In MAINTAINER_MODE check whether all 3rd party libs found but not bundled + # are listed in IGNORED_LIBS + + if(MAINTAINER_MODE) + +- # Extend ignore list with libraries that are dependencies of known plugins ++ # Extend ignore list with libraries that are dependencies of known plugins + # and are not listed in BUNDLED_LIBS. Otherwise we would get false errors + # below. + +@@ -1065,8 +1064,8 @@ if(BUNDLE_DEPENDENCIES) + list(APPEND IGNORED_LIBS ${DEPS_${plugin}}) + endforeach() + +- # Remove from ${extra_libs} the libraries that we know we should ignore. +- # Also the openssl libs that might end up in ${extra_libs} bacause of two ++ # Remove from ${extra_libs} the libraries that we know we should ignore. ++ # Also the openssl libs that might end up in ${extra_libs} bacause of two + # stage search logic above. + + #message("== extra_libs: ${extra_libs}") diff --git a/databases/mysql-connector-odbc-80/files/patch-driver_dll.cc b/databases/mysql-connector-odbc-80/files/patch-driver_dll.cc new file mode 100644 index 000000000000..59db345c06bb --- /dev/null +++ b/databases/mysql-connector-odbc-80/files/patch-driver_dll.cc @@ -0,0 +1,11 @@ +--- driver/dll.cc.orig 2022-12-10 21:58:26 UTC ++++ driver/dll.cc +@@ -145,7 +145,7 @@ void myodbc_end() + This eliminates the delay when mysys_end() is called and other threads + have been initialized but not ended. + */ +- my_thread_end_wait_time= 0; ++ static uint my_thread_end_wait_time= 0; + #endif + + mysql_library_end(); diff --git a/databases/mysql-connector-odbc-80/files/patch-include_mysql-8.0_my__sys.h b/databases/mysql-connector-odbc-80/files/patch-include_mysql-8.0_my__sys.h new file mode 100644 index 000000000000..f56fd61ce3bf --- /dev/null +++ b/databases/mysql-connector-odbc-80/files/patch-include_mysql-8.0_my__sys.h @@ -0,0 +1,24 @@ +--- include/mysql-8.0/my_sys.h.orig 2022-12-10 21:58:26 UTC ++++ include/mysql-8.0/my_sys.h +@@ -34,8 +34,12 @@ + #include "my_config.h" + + #ifdef HAVE_ALLOCA_H ++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) ++#include ++#else + #include + #endif ++#endif + #include + #ifdef _WIN32 + #include +@@ -322,6 +326,8 @@ typedef int (*IO_CACHE_CALLBACK)(IO_CACHE *); + + struct IO_CACHE; + typedef int (*IO_CACHE_CALLBACK)(IO_CACHE *); ++ ++typedef unsigned long ulong; + + struct IO_CACHE_SHARE { + mysql_mutex_t mutex; /* To sync on reads into buffer. */ diff --git a/databases/mysql-connector-odbc-80/pkg-descr b/databases/mysql-connector-odbc-80/pkg-descr new file mode 100644 index 000000000000..0441dd6a5d7f --- /dev/null +++ b/databases/mysql-connector-odbc-80/pkg-descr @@ -0,0 +1 @@ +MySQL Connector ODBC is an ODBC driver for interfacing to MySQL databases.