early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,12 @@
diff --git a/nanodbc/nanodbc.cpp b/nanodbc/nanodbc.cpp
index e6ca73f..3ad724a 100644
--- a/nanodbc/nanodbc.cpp
+++ b/nanodbc/nanodbc.cpp
@@ -23,6 +23,7 @@
#include <cstring>
#include <ctime>
#include <iomanip>
+#include <limits>
#include <map>
#include <type_traits>

View File

@@ -0,0 +1,24 @@
--- "a/CMakeLists.txt"
+++ "b/CMakeLists.txt"
@@ -110,6 +110,13 @@ message(STATUS "nanodbc feature: Enable SQL_NO_DATA bug workaround - ${NANODBC_E
## find unixODBC or iODBC config binary
########################################
if(UNIX)
+ # Try to find unixodbc package first
+ find_package(unixodbc)
+ if(unixodbc_FOUND)
+ message(STATUS "nanodbc build: unixODBC package found")
+ set(ODBCLIB UNIX::odbc)
+ set(ODBC_CONFIG true)
+ else()
# Try to find unixODBC first via odbc_config program.
find_program(ODBC_CONFIG odbc_config
PATHS $ENV{ODBC_PATH}/bin /usr/bin /usr/local/bin)
@@ -158,6 +165,7 @@ if(UNIX)
endif()
endif()
endif()
+ endif()
if(NOT ODBC_CONFIG)
message(FATAL_ERROR "can not find a suitable odbc driver manager")

40
externals/vcpkg/ports/nanodbc/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,40 @@
# Only static libraries are supported.
# See https://github.com/nanodbc/nanodbc/issues/13
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nanodbc/nanodbc
REF 7404a4dd7697e188df5724ab95a7553d2fc404eb # v2.13.0
SHA512 35ca098e783d771f3df611bce84e9b8207a6a5b72c492d2f3909977bc91a7c22bb262c34768b0d97ebfbdf12eeda0214064a8ea171e7bdda7b759f93ff346f45
HEAD_REF master
PATCHES
rename-version.patch
add-missing-include.patch
find-unixodbc.patch
)
file(RENAME "${SOURCE_PATH}/VERSION" "${SOURCE_PATH}/VERSION.txt")
if(DEFINED NANODBC_ODBC_VERSION)
set(NANODBC_ODBC_VERSION -DNANODBC_ODBC_VERSION=${NANODBC_ODBC_VERSION})
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DNANODBC_DISABLE_EXAMPLES=ON
-DNANODBC_DISABLE_TESTS=ON
-DNANODBC_ENABLE_UNICODE=OFF
${NANODBC_ODBC_VERSION}
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
else()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
endif()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@@ -0,0 +1,13 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,8 +20,8 @@
########################################
## nanodbc version
########################################
-file(STRINGS VERSION NANODBC_VERSION REGEX "[0-9]+\\.[0-9]+\\.[0-9]+")
+file(STRINGS "VERSION.txt" NANODBC_VERSION REGEX "[0-9]+\\.[0-9]+\\.[0-9]+")
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" NANODBC_VERSION_MAJOR "${NANODBC_VERSION}")
string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" NANODBC_VERSION_MINOR "${NANODBC_VERSION}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" NANODBC_VERSION_PATCH "${NANODBC_VERSION}")
message(STATUS "nanodbc version: ${NANODBC_VERSION}")

21
externals/vcpkg/ports/nanodbc/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,21 @@
{
"name": "nanodbc",
"version": "2.13.0",
"port-version": 6,
"description": "A small C++ wrapper for the native C ODBC API.",
"homepage": "https://github.com/nanodbc/nanodbc",
"dependencies": [
{
"name": "unixodbc",
"platform": "!windows"
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}