[freetds] Update to v1.2.5 and update source to github. (#14120)

This commit is contained in:
Billy O'Neal 2020-10-20 16:13:43 -07:00 коммит произвёл GitHub
Родитель 4e3e210e8d
Коммит b14aa50824
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 178 добавлений и 61 удалений

Просмотреть файл

@ -1,9 +0,0 @@
Source: freetds
Version: 1.1.17
Homepage: https://www.freetds.org
Description: Implementation of the Tabular Data Stream protocol
Default-Features: openssl
Feature: openssl
Build-Depends: openssl
Description: OpenSSL support

Просмотреть файл

@ -1,25 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 796625e17..fc9076f54 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,6 +149,9 @@ if(OPENSSL_FOUND)
config_write("#define HAVE_OPENSSL 1\n\n")
include_directories(${OPENSSL_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
+ if(WIN32)
+ list(APPEND CMAKE_REQUIRED_LIBRARIES crypt32 ws2_32)
+ endif()
check_function_exists_define(BIO_get_data)
check_function_exists_define(RSA_get0_key)
check_function_exists_define(ASN1_STRING_get0_data)
@@ -441,7 +444,10 @@ else(WIN32)
endif(WIN32)
if(OPENSSL_FOUND)
set(lib_NETWORK ${lib_NETWORK} ${OPENSSL_LIBRARIES})
+ if(WIN32)
+ list(APPEND lib_NETWORK crypt32)
+ endif()
elseif(GNUTLS_FOUND)
set(lib_NETWORK ${lib_NETWORK} ${lib_GNUTLS})
endif(OPENSSL_FOUND)

Просмотреть файл

@ -0,0 +1,45 @@
diff --git a/src/odbc/CMakeLists.txt b/src/odbc/CMakeLists.txt
index 5d036a1..031b9a2 100644
--- a/src/odbc/CMakeLists.txt
+++ b/src/odbc/CMakeLists.txt
@@ -30,7 +30,7 @@ add_library(tdsodbc SHARED
target_compile_definitions(tdsodbc PUBLIC DLL_EXPORT=1)
# TODO libiconv, odbcinstlib and other dynamics
target_link_libraries(tdsodbc tds replacements tdsutils ${libs} ${lib_NETWORK} ${lib_BASE})
-
+add_dependencies(tdsodbc generate_encodings_h)
if(MINGW OR CYGWIN)
set_target_properties(tdsodbc PROPERTIES LINK_FLAGS "--static -Wl,--kill-at -Wl,--enable-stdcall-fixup")
endif(MINGW OR CYGWIN)
@@ -41,6 +41,7 @@ add_library(tdsodbc_static STATIC
native.c sql2tds.c error.c odbc_checks.c sqlwchar.c sqlwparams.h
odbc_export.h error_export.h odbc_data.c ${win_SRCS}
)
+add_dependencies(tdsodbc_static generate_encodings_h)
if (NOT WIN32)
set_target_properties(tdsodbc_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
diff --git a/src/tds/CMakeLists.txt b/src/tds/CMakeLists.txt
index d8be1a0..42b6a4d 100644
--- a/src/tds/CMakeLists.txt
+++ b/src/tds/CMakeLists.txt
@@ -29,6 +29,8 @@ if(PERL_FOUND AND NOT EXISTS "${CMAKE_SOURCE_DIR}/configure")
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
endif(PERL_FOUND AND NOT EXISTS "${CMAKE_SOURCE_DIR}/configure")
+add_custom_target(generate_encodings_h DEPENDS "${CMAKE_BINARY_DIR}/include/freetds/encodings.h")
+
if(WIN32)
set(add_SRCS sspi.c)
else(WIN32)
@@ -44,9 +46,9 @@ add_library(tds STATIC
bulk.c packet.c stream.c random.c
sec_negotiate_gnutls.h sec_negotiate_openssl.h sec_negotiate.c gssapi.c
tds_willconvert.h num_limits.h tds_types.h
- "${CMAKE_BINARY_DIR}/include/freetds/encodings.h"
${add_SRCS}
)
+add_dependencies(tds generate_encodings_h)
if (NOT WIN32)
set_target_properties(tds PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()

Просмотреть файл

@ -1,28 +1,37 @@
include(vcpkg_common_functions) vcpkg_from_github(
vcpkg_download_distfile(ARCHIVE
URLS "https://www.freetds.org/files/stable/freetds-1.1.17.tar.bz2"
FILENAME "freetds-1.1.17.tar.bz2"
SHA512 3746ea009403960950fd619ffaf6433cfc92c34a8261b15e61009f01a1446e5a5a59413cd48e5511bbf3a0224f54b40daa713187bd20ca43105c5f8c68f4b88e
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE} REPO freetds/freetds
REF fbf3bbbbc27283b35a5a6aec9992521e684c9abf # 1.2.5
HEAD_REF master
SHA512 e18dba16705db951ea52055476fac342c1bb62e90629ef82064ad9d3d4a7f2078e8f7674b1602bc21798240e005052dcbc67cdd0912b47163bd95956128c4677
PATCHES PATCHES
crypt32.patch skip-unit-tests.patch
fix-encoding-h-dependency.patch
) )
set(BUILD_freetds_openssl OFF) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
if("openssl" IN_LIST FEATURES) FEATURES
set(BUILD_freetds_openssl ON) openssl WITH_OPENSSL
)
vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
vcpkg_add_to_path(${PERL_PATH})
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_find_acquire_program(GPERF)
get_filename_component(GPERF_PATH ${GPERF} DIRECTORY)
vcpkg_add_to_path(${GPERF_PATH})
else()
if (NOT EXISTS /usr/bin/gperf)
message(FATAL_ERROR "freetds requires gperf, these can be installed on Ubuntu systems via apt-get install gperf.")
endif()
endif() endif()
vcpkg_configure_cmake( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA PREFER_NINJA
OPTIONS OPTIONS ${FEATURE_OPTIONS}
-DWITH_OPENSSL=${BUILD_freetds_openssl}
) )
vcpkg_install_cmake() vcpkg_install_cmake()
@ -62,4 +71,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif() endif()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

Просмотреть файл

@ -0,0 +1,89 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e3840ae..19a22bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,9 +64,9 @@ math(EXPR BUILD_NUMBER "${BUILD_NUMBER}")
set(FREETDS_TOPDIR ${CMAKE_CURRENT_LIST_DIR})
-enable_testing()
-set(CMAKE_CTEST_COMMAND ctest)
-add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
+#enable_testing()
+#set(CMAKE_CTEST_COMMAND ctest)
+#add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
# TODO depends on configure
add_definitions(-D_REENTRANT -D_THREAD_SAFE)
@@ -464,7 +464,7 @@ add_subdirectory(src/dblib)
add_subdirectory(src/odbc)
add_subdirectory(src/apps)
add_subdirectory(src/server)
-add_subdirectory(src/pool)
+#add_subdirectory(src/pool)
configure_file(${CMAKE_BINARY_DIR}/include/config.h.in ${CMAKE_BINARY_DIR}/include/config.h)
configure_file(${CMAKE_SOURCE_DIR}/include/tds_sysdep_public.h.in ${CMAKE_BINARY_DIR}/include/tds_sysdep_public.h)
diff --git a/src/ctlib/CMakeLists.txt b/src/ctlib/CMakeLists.txt
index e83b0b1..017d571 100644
--- a/src/ctlib/CMakeLists.txt
+++ b/src/ctlib/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_subdirectory(unittests)
+#add_subdirectory(unittests)
set(static_lib_name ct)
if(WIN32)
diff --git a/src/dblib/CMakeLists.txt b/src/dblib/CMakeLists.txt
index aa8a179..b626000 100644
--- a/src/dblib/CMakeLists.txt
+++ b/src/dblib/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_subdirectory(unittests)
+#add_subdirectory(unittests)
if(WIN32)
set(win_SRCS winmain.c dblib.def dbopen.c)
diff --git a/src/odbc/CMakeLists.txt b/src/odbc/CMakeLists.txt
index 7fad8db..3d90456 100644
--- a/src/odbc/CMakeLists.txt
+++ b/src/odbc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_subdirectory(unittests)
+#add_subdirectory(unittests)
# TODO checks
add_definitions(-DUNIXODBC -DHAVE_SQLGETPRIVATEPROFILESTRING)
diff --git a/src/replacements/CMakeLists.txt b/src/replacements/CMakeLists.txt
index 37b47e3..ba17bed 100644
--- a/src/replacements/CMakeLists.txt
+++ b/src/replacements/CMakeLists.txt
@@ -35,7 +35,7 @@ if (NOT WIN32)
set_target_properties(replacements PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
-add_subdirectory(unittests)
+#add_subdirectory(unittests)
INSTALL(TARGETS replacements
diff --git a/src/tds/CMakeLists.txt b/src/tds/CMakeLists.txt
index fee56b3..e7a71f0 100644
--- a/src/tds/CMakeLists.txt
+++ b/src/tds/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_subdirectory(unittests)
+#add_subdirectory(unittests)
if(PERL_FOUND AND NOT EXISTS "${CMAKE_SOURCE_DIR}/configure")
# get name of null device
diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt
index 2a1935c..a46483e 100644
--- a/src/utils/CMakeLists.txt
+++ b/src/utils/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_subdirectory(unittests)
+#add_subdirectory(unittests)
if(WIN32)
set(add_SRCS md5.c)

18
ports/freetds/vcpkg.json Normal file
Просмотреть файл

@ -0,0 +1,18 @@
{
"name": "freetds",
"version-string": "1.2.5",
"description": "Implementation of the Tabular Data Stream protocol",
"homepage": "https://www.freetds.org",
"supports": "windows & !uwp",
"default-features": [
"openssl"
],
"features": {
"openssl": {
"description": "OpenSSL support",
"dependencies": [
"openssl"
]
}
}
}

Просмотреть файл

@ -423,10 +423,6 @@ freeglut:x64-uwp=fail
freeglut:x64-osx=fail freeglut:x64-osx=fail
# Needs /bigobj # Needs /bigobj
freeopcua:arm64-windows=fail freeopcua:arm64-windows=fail
freetds:arm-uwp=fail
freetds:x64-linux=fail
freetds:x64-osx=fail
freetds:x64-uwp=fail
freetype-gl:x64-uwp=fail freetype-gl:x64-uwp=fail
freexl:arm-uwp=fail freexl:arm-uwp=fail
freexl:x64-uwp=fail freexl:x64-uwp=fail
@ -1835,9 +1831,3 @@ clapack:x86-windows=skip
clapack:x64-uwp=skip clapack:x64-uwp=skip
lapack-reference:arm64-windows=skip lapack-reference:arm64-windows=skip
lapack-reference:arm-uwp=skip lapack-reference:arm-uwp=skip
# freetds upstream is gone
freetds:x86-windows=fail
freetds:x64-windows=fail
freetds:x64-windows-static=fail
freetds:arm64-windows=fail