diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index 88be59462..c09964b94 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -30,6 +30,7 @@ else() endif() if("ssl" IN_LIST FEATURES) list(APPEND ACE_FEATURE_LIST "ssl=1") + list(APPEND ACE_FEATURE_LIST "openssl11=1") else() list(APPEND ACE_FEATURE_LIST "ssl=0") endif() diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL index a88edc424..3a24bd998 100644 --- a/ports/freerdp/CONTROL +++ b/ports/freerdp/CONTROL @@ -1,5 +1,5 @@ Source: freerdp -Version: 2.0.0-rc4-3 +Version: 2.0.0-rc4-4 Homepage: https://github.com/FreeRDP/FreeRDP Description: A free implementation of the Remote Desktop Protocol (RDP) Build-Depends: openssl, glib (!windows) diff --git a/ports/freerdp/openssl_threads.patch b/ports/freerdp/openssl_threads.patch new file mode 100644 index 000000000..a506b580b --- /dev/null +++ b/ports/freerdp/openssl_threads.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 019926901..9db9ed29b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -945,6 +945,7 @@ endif() + if(OPENSSL_FOUND) + add_definitions("-DWITH_OPENSSL") + message(STATUS "Using OpenSSL Version: ${OPENSSL_VERSION}") ++ list(APPEND OPENSSL_LIBRARIES Threads::Threads) + endif() + + if(MBEDTLS_FOUND) diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake index 4386e37f4..2164a0669 100644 --- a/ports/freerdp/portfile.cmake +++ b/ports/freerdp/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES DontInstallSystemRuntimeLibs.patch fix-linux-build.patch + openssl_threads.patch ) if(VCPKG_CRT_LINKAGE STREQUAL "static") diff --git a/ports/freetds/CONTROL b/ports/freetds/CONTROL index 77be05f40..bfd1e44d4 100644 --- a/ports/freetds/CONTROL +++ b/ports/freetds/CONTROL @@ -1,5 +1,5 @@ Source: freetds -Version: 1.1.6-1 +Version: 1.1.17 Homepage: https://www.freetds.org Description: Implementation of the Tabular Data Stream protocol Default-Features: openssl diff --git a/ports/freetds/crypt32.patch b/ports/freetds/crypt32.patch new file mode 100644 index 000000000..a3af75693 --- /dev/null +++ b/ports/freetds/crypt32.patch @@ -0,0 +1,25 @@ +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) diff --git a/ports/freetds/portfile.cmake b/ports/freetds/portfile.cmake index a03fd0c9c..eb833b30a 100644 --- a/ports/freetds/portfile.cmake +++ b/ports/freetds/portfile.cmake @@ -1,14 +1,16 @@ include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "https://www.freetds.org/files/stable/freetds-1.1.6.tar.bz2" - FILENAME "freetds-1.1.6.tar.bz2" - SHA512 160c8638302fd36a3f42d031dbd58525cde899b64d320f6187ce5865ea2c049a1af63be419623e4cd18ccf229dd2ee7ec509bc5721c3371de0f31710dad7470d + 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 ARCHIVE ${ARCHIVE} + PATCHES + crypt32.patch ) set(BUILD_freetds_openssl OFF) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 843459d8a..73840e164 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -113,7 +113,17 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor # Setup PostgreSQL libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PGSQL_INCLUDE_DIR) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpq.lib" PGSQL_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.lib" PGSQL_LIBRARY_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpq.lib" PGSQL_LIBRARY_DBG) + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpgcommon.lib" TMP_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpgcommon.lib" TMP_DBG) + set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}") + set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}") + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpgport.lib" TMP_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpgport.lib" TMP_DBG) + set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}") + set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}") # Setup OpenJPEG libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" OPENJPEG_INCLUDE_DIR) @@ -136,8 +146,8 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib" LZMA_LIBRARY_DBG) # Setup openssl libraries path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libeay32.lib ${CURRENT_INSTALLED_DIR}/lib/ssleay32.lib" OPENSSL_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libeay32.lib ${CURRENT_INSTALLED_DIR}/debug/lib/ssleay32.lib" OPENSSL_LIBRARY_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/lib/libssl.lib" OPENSSL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.lib" OPENSSL_LIBRARY_DBG) # Setup libiconv libraries path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libiconv.lib ${CURRENT_INSTALLED_DIR}/lib/libcharset.lib" ICONV_LIBRARY_REL) diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL index 7c3feb124..64067f15c 100644 --- a/ports/libevent/CONTROL +++ b/ports/libevent/CONTROL @@ -6,7 +6,7 @@ Default-Features: thread Feature: openssl Description: Support for openssl -Build-Depends: openssl +Build-Depends: openssl, libevent[thread] Feature: thread -Description: Support for thread \ No newline at end of file +Description: Support for thread diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 37c42943e..fb236147e 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,5 +1,5 @@ Source: libmysql -Version: 8.0.4-4 +Version: 8.0.4-5 Homepage: https://github.com/mysql/mysql-server Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, liblzma, lz4, zlib Description: A MySQL client library for C development. diff --git a/ports/libmysql/system-libs.patch b/ports/libmysql/system-libs.patch index b5c1cba0d..3fb4d35c8 100644 --- a/ports/libmysql/system-libs.patch +++ b/ports/libmysql/system-libs.patch @@ -97,17 +97,18 @@ diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index 8af9699..2bdfe14 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake -@@ -104,6 +104,16 @@ ENDMACRO() +@@ -104,6 +104,17 @@ ENDMACRO() # Provides the following configure options: # WITH_SSL=[yes|bundled|system|] MACRO (MYSQL_CHECK_SSL) + find_package(OpenSSL REQUIRED) ++ find_package(Threads REQUIRED) + set(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY} CACHE STRING "") + set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE STRING "") + FIND_PROGRAM(OPENSSL_EXECUTABLE openssl + DOC "path to the openssl executable") + SET(SSL_DEFINES "-DHAVE_OPENSSL") -+ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES}) ++ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES} Threads::Threads) +ENDMACRO() + +MACRO (MYSQL_CHECK_SSL_OLD) diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt deleted file mode 100644 index 6a03da19f..000000000 --- a/ports/libpq/CMakeLists.txt +++ /dev/null @@ -1,164 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(libpq VERSION 9.6.1 LANGUAGES C) - -if(NOT CMAKE_SYSTEM_PROCESSOR) - set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}) -endif() - -find_package(OpenSSL REQUIRED) -find_program(PERL NAMES perl) - -set(CMAKE_STATIC_LIBRARY_PREFIX) -set(CMAKE_SHARED_LIBRARY_PREFIX) -set(CMAKE_DEBUG_POSTFIX "d") - -file(REMOVE - ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config_ext.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config_os.h -) - -if(WIN32) - configure_file(src/include/pg_config.h.win32 include/pg_config.h) - configure_file(src/include/pg_config_ext.h.win32 include/pg_config_ext.h) - configure_file(src/include/port/win32.h include/pg_config_os.h) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h" "#include \n#define PG_INT64_TYPE int64_t") - configure_file("${PORT_DIR}/pg_config.darwin.h" include/pg_config.h COPYONLY) - configure_file(src/include/port/darwin.h include/pg_config_os.h COPYONLY) - configure_file(src/backend/port/dynloader/darwin.h include/dynloader.h COPYONLY) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - set(DEFINE_PG_INT128_TYPE "#define PG_INT128_TYPE __int128") - else() - set(DEFINE_PG_INT128_TYPE "#undef PG_INT128_TYPE") - endif() - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h" "#include \n#define PG_INT64_TYPE int64_t") - configure_file(src/include/port/linux.h include/pg_config_os.h COPYONLY) - configure_file("${PORT_DIR}/pg_config.linux.h" include/pg_config.h) - configure_file(src/backend/port/dynloader/linux.h include/dynloader.h COPYONLY) -else() - message(FATAL_ERROR "Unknown system: ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") -endif() -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_paths.h "#define SYSCONFDIR \"\"") - -set(INSTALL_INCLUDES ON CACHE BOOL "Install include files") - -set(pg_port_src - src/port/pgstrcasecmp.c - src/port/pqsignal.c - src/port/thread.c - src/port/crypt.c - src/port/noblock.c - src/port/chklocale.c - src/port/snprintf.c - src/port/dirmod.c - src/port/pgsleep.c - src/port/open.c - src/port/system.c -) -if(WIN32) - list(APPEND pg_port_src - src/port/dirent.c - src/port/inet_aton.c - src/port/inet_net_ntop.c - src/port/win32error.c - src/port/win32setlocale.c - src/port/getaddrinfo.c - src/port/strlcpy.c - ) - include_directories(src/include/port/win32 src/include/port/win32_msvc) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND pg_port_src - src/port/strlcpy.c - src/port/inet_aton.c - src/port/inet_net_ntop.c - src/port/getpeereid.c - ) -endif() - -set(pg_backend_src - src/backend/libpq/md5.c - src/backend/libpq/ip.c - src/backend/utils/mb/wchar.c - src/backend/utils/mb/encnames.c -) -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND pg_backend_src - src/backend/port/dynloader/linux.c - src/backend/port/sysv_sema.c - src/backend/port/sysv_shmem.c - ) -endif() -if(NOT WIN32) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h - COMMAND "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/utils/generate-errcodes.pl" "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/utils/errcodes.txt" > "${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h" - VERBATIM - ) - list(APPEND pg_backend_src - ${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h - ) -endif() - -set(pg_libpq_src - src/interfaces/libpq/fe-auth.c - src/interfaces/libpq/fe-connect.c - src/interfaces/libpq/fe-exec.c - src/interfaces/libpq/fe-lobj.c - src/interfaces/libpq/fe-misc.c - src/interfaces/libpq/fe-print.c - src/interfaces/libpq/fe-protocol2.c - src/interfaces/libpq/fe-protocol3.c - src/interfaces/libpq/fe-secure-openssl.c - src/interfaces/libpq/fe-secure.c - src/interfaces/libpq/libpq-events.c - src/interfaces/libpq/pqexpbuffer.c - src/interfaces/libpq/libpq-dist.rc -) - -if(WIN32) - list(APPEND pg_libpq_src - src/interfaces/libpq/pthread-win32.c - src/interfaces/libpq/win32.c - ) -endif() -set(pg_libpq_interface - src/include/postgres_ext.h - ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h - ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h - src/interfaces/libpq/libpq-fe.h - src/interfaces/libpq/libpq-events.h -) -set(pg_libpq_catalog_interface - src/include/catalog/pg_type.h - src/include/catalog/genbki.h -) -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_DEBUG_POSTFIX "d") -set(CMAKE_INCLUDE_CURRENT_DIR ON) -add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src}) - -target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -DHAVE_CRYPTO_LOCK -D_CRT_SECURE_NO_WARNINGS) -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - target_compile_definitions(libpq PRIVATE -D_GNU_SOURCE) -endif() - -target_link_libraries(libpq PRIVATE OpenSSL::SSL) -if(WIN32) - target_link_libraries(libpq PRIVATE ws2_32 secur32 advapi32 shell32 crypt32) -endif() -target_include_directories(libpq PRIVATE src/include src/port ${CMAKE_CURRENT_BINARY_DIR}/include) -set_target_properties(libpq PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - -install(TARGETS libpq - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin -) - -if(INSTALL_INCLUDES) - install(FILES ${pg_libpq_interface} DESTINATION include) - install(DIRECTORY src/include/libpq DESTINATION include) - install(FILES ${pg_libpq_catalog_interface} DESTINATION include/catalog) -endif() diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL index a11b75c36..724d9acd8 100644 --- a/ports/libpq/CONTROL +++ b/ports/libpq/CONTROL @@ -1,5 +1,82 @@ Source: libpq -Version: 9.6.3 +Version: 12.0 +Build-Depends: libpq[bonjour] (osx) Homepage: https://www.postgresql.org/ Description: The official database access API of postgresql -Build-Depends: openssl, zlib (linux) +Default-Features: zlib, openssl + +Feature: openssl +Build-Depends: openssl +Description: support for encrypted client connections and random number generation on platforms that do not have "/dev/urandom" (except windows) (--with-openssl) + +Feature: zlib +Build-Depends: zlib +Description: Use zlib (else --without-zlib) + +Feature: readline +Build-Depends: readline +Description: Use readline (else --without-readline) + +Feature: libedit +Build-Depends: libedit +Description: prefer libedit (--with-libedit-preferred) + +Feature: perl +Build-Depends: perl +Description: build the server programming language PL/Perl (dynamic only?) (--with-perl) + +Feature: python +Build-Depends: python +Description: build the PL/Python server programming language (dynamic only?) (--with-python) + +Feature: tcl +Build-Depends: tcl +Description: build the PL/Tcl procedural language(dynamic only?) (--with-tcl) + +Feature: nls +Build-Depends: gettext +Description: Native Language Support (--enable-nls[=LANGUAGES]) + +Feature: kerberos +Build-Depends: kerberos +Description: Kerberos Support (--with-gssapi) + +Feature: systemd +Description: Build with support for systemd service notifications. (--with-systemd) + +Feature: ldap +Build-Depends: openldap (linux) +Description: LDAP Support (--with-ldap) + +Feature: bsd +Build-Depends: openbsd +Description: OpenBSD Support (--with-bsd-auth) + +Feature: pam +Build-Depends: pam +Description: Build with PAM (Pluggable Authentication Modules) support. (--with-pam) + +Feature: llvm +Build-Depends: llvm +Description: Build with support for LLVM based JIT compilation (--with-llvm) + +Feature: icu +Build-Depends: icu +Description: Build with support for the ICU library (--with-icu) + +Feature: bonjour +Description: Build with Bonjour support (--with-bonjour) + +Feature: uuid +Description: Build the uuid-ossp module (which provides functions to generate UUIDs) (--with-uuid=LIBRARY LIBRARY=(bsd|e2fs|ossp)) + +Feature: xml +Build-Depends: libxml2 +Description: Build with libxml (--with-libxml) + +Feature: xslt +Build-Depends: libxslt +Description: Build with libxslt (--with-libxslt) + +Feature: client +Description: Build all client tools and libraries. \ No newline at end of file diff --git a/ports/libpq/config.pl b/ports/libpq/config.pl new file mode 100644 index 000000000..cbe605ef0 --- /dev/null +++ b/ports/libpq/config.pl @@ -0,0 +1,27 @@ +our $config = { + asserts => 0, # --enable-cassert + # float4byval=>1, # --disable-float4-byval, on by default + + # float8byval=> $platformbits == 64, # --disable-float8-byval, + # off by default on 32 bit platforms, on by default on 64 bit platforms + + # blocksize => 8, # --with-blocksize, 8kB by default + # wal_blocksize => 8, # --with-wal-blocksize, 8kB by default + ldap => undef, # --with-ldap + extraver => undef, # --with-extra-version= + gss => undef, # --with-gssapi= + icu => undef, # --with-icu= + nls => undef, # --enable-nls= + tap_tests => undef, # --enable-tap-tests + tcl => undef, # --with-tcl= + perl => undef, # --with-perl + python => undef, # --with-python= + openssl => undef, # --with-openssl= + uuid => undef, # --with-ossp-uuid + xml => undef, # --with-libxml= + xslt => undef, # --with-libxslt= + iconv => undef, # (not in configure, path to iconv) + zlib => undef # --with-zlib= +}; + +1; diff --git a/ports/libpq/patches/linux/configure.patch b/ports/libpq/patches/linux/configure.patch new file mode 100644 index 000000000..84ebcbd21 --- /dev/null +++ b/ports/libpq/patches/linux/configure.patch @@ -0,0 +1,22 @@ +diff --git a/configure b/configure +index 54c852aca..96e2c89ba 100644 +--- a/configure ++++ b/configure +@@ -11923,7 +11923,7 @@ if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" ++LIBS="-lcrypto -pthread $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -11958,7 +11958,7 @@ if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then : + #define HAVE_LIBCRYPTO 1 + _ACEOF + +- LIBS="-lcrypto $LIBS" ++ LIBS="-lcrypto -pthread $LIBS" + + else + as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5 diff --git a/ports/libpq/patches/windows/MSBuildProject-static-crt.patch b/ports/libpq/patches/windows/MSBuildProject-static-crt.patch new file mode 100644 index 000000000..03bd832f8 --- /dev/null +++ b/ports/libpq/patches/windows/MSBuildProject-static-crt.patch @@ -0,0 +1,23 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..faa3e336f 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -84,16 +84,16 @@ EOF + defs => "_DEBUG;DEBUG=1", + opt => 'Disabled', + strpool => 'false', +- runtime => 'MultiThreadedDebugDLL' ++ runtime => 'MultiThreadedDebug' + }); + $self->WriteItemDefinitionGroup( + $f, + 'Release', + { + defs => "", + opt => 'Full', + strpool => 'true', +- runtime => 'MultiThreadedDLL' ++ runtime => 'MultiThreaded' + }); + return; + } diff --git a/ports/libpq/patches/windows/MSBuildProject-static-lib.patch b/ports/libpq/patches/windows/MSBuildProject-static-lib.patch new file mode 100644 index 000000000..ba72a82bf --- /dev/null +++ b/ports/libpq/patches/windows/MSBuildProject-static-lib.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..e1dc59aa7 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -262,7 +262,7 @@ sub WriteConfigurationPropertyGroup + my $cfgtype = + ($self->{type} eq "exe") + ? 'Application' +- : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary'); ++ : ($self->{type} eq "dll" ? 'StaticLibrary' : 'StaticLibrary'); + + print $f < diff --git a/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch b/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch new file mode 100644 index 000000000..818134f5c --- /dev/null +++ b/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..4f51c12f2 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -182,7 +182,7 @@ sub mkvcbuild + 'syncrep_gram.y'); + $postgres->AddFiles('src/backend/utils/adt', 'jsonpath_scan.l', + 'jsonpath_gram.y'); +- $postgres->AddDefine('BUILDING_DLL'); ++ # $postgres->AddDefine('BUILDING_DLL'); + $postgres->AddLibrary('secur32.lib'); + $postgres->AddLibrary('ws2_32.lib'); + $postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap}); diff --git a/ports/libpq/patches/windows/Solution.patch b/ports/libpq/patches/windows/Solution.patch new file mode 100644 index 000000000..2259e3e8a --- /dev/null +++ b/ports/libpq/patches/windows/Solution.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -69,9 +69,15 @@ sub DeterminePlatform + my $self = shift; + + # Examine CL help output to determine if we are in 32 or 64-bit mode. +- my $output = `cl /? 2>&1`; ++ my $output = `cl 2>&1`; + $? >> 8 == 0 or die "cl command not found"; +- $self->{platform} = ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32'; ++ if ($output =~ m/x64\n/) { $self->{platform} = 'x64'; ++ } elsif ($output =~ m/x86\n/) { $self->{platform} = 'Win32'; ++ } elsif ($output =~ m/ARM64\n/) { $self->{platform} = 'ARM64'; ++ } elsif ($output =~ m/ARM\n/) { $self->{platform} = 'ARM'; ++ } else { $self->{platform} = 'Unknown' ++ } ++ print "cl output $output."; + print "Detected hardware platform: $self->{platform}\n"; + return; + } +@@ -526,14 +526,14 @@ EOF + || confess "Could not open pg_config_paths.h"; + print $o <{options}->{zlib}) + { + $proj->AddIncludeDir($self->{options}->{zlib} . '\include'); +- $proj->AddLibrary($self->{options}->{zlib} . '\lib\zdll.lib'); ++ $proj->AddLibrary($self->{options}->{zlib} . '\debug\lib\zlibd.lib'); # This must be updated + } + if ($self->{options}->{openssl}) + { +@@ -661,7 +661,7 @@ sub AddProject + # changed their library names from: + # - libeay to libcrypto + # - ssleay to libssl +- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') ++ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') # This must be updated + { + my $dbgsuffix; + my $libsslpath; +@@ -670,27 +670,27 @@ sub AddProject + # The format name of the libraries is slightly + # different between the Win32 and Win64 platform, so + # adapt. +- if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") # This must be updated + { + # Win32 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl32.lib'; +- $libcryptopath = '\lib\VC\libcrypto32.lib'; ++ $libsslpath = '\lib\VC\libssl32.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto32.lib'; # This must be updated + } +- elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") ++ elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") # This must be updated + { + # Win64 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl64.lib'; +- $libcryptopath = '\lib\VC\libcrypto64.lib'; ++ $libsslpath = '\lib\VC\libssl64.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto64.lib'; # This must be updated + } + else + { + # On both Win32 and Win64 the same library + # names are used without a debugging context. + $dbgsuffix = 0; +- $libsslpath = '\lib\libssl.lib'; +- $libcryptopath = '\lib\libcrypto.lib'; ++ $libsslpath = '\debug\lib\libssl.lib'; # This must be updated ++ $libcryptopath = '\debug\lib\libcrypto.lib'; # This must be updated + } + + $proj->AddLibrary($self->{options}->{openssl} . $libsslpath, +@@ -698,16 +698,16 @@ sub AddProject + $proj->AddLibrary($self->{options}->{openssl} . $libcryptopath, + $dbgsuffix); + } +- else ++ else + { + # Choose which set of libraries to use depending on if + # debugging libraries are in place in the installer. +- if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") # This must be updated + { + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); # This must be updated + } + else + { +@@ -715,60 +715,60 @@ sub AddProject + # to be here, so don't ask for it in last + # parameter. + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); ++ $self->{options}->{openssl} . '\debug\lib\ssleay32.lib', 0); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\libeay32.lib', 0); ++ $self->{options}->{openssl} . '\debug\lib\libeay32.lib', 0); # This must be updated + } + } + } + if ($self->{options}->{nls}) + { + $proj->AddIncludeDir($self->{options}->{nls} . '\include'); +- $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); ++ $proj->AddLibrary($self->{options}->{nls} . '\debug\lib\libintl.lib'); # This must be updated + } + if ($self->{options}->{gss}) + { +- $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib'); ++ $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');# This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');# This must be updated + } + if ($self->{options}->{iconv}) + { + $proj->AddIncludeDir($self->{options}->{iconv} . '\include'); +- $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); ++ $proj->AddLibrary($self->{options}->{iconv} . '\debug\lib\iconv.lib'); # This must be updated + } + if ($self->{options}->{icu}) + { + $proj->AddIncludeDir($self->{options}->{icu} . '\include'); + if ($self->{platform} eq 'Win32') + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuind.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); # This must be updated + } + else + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuind.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); # This must be updated + } + } + if ($self->{options}->{xml}) + { + $proj->AddIncludeDir($self->{options}->{xml} . '\include'); + $proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2'); +- $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); ++ $proj->AddLibrary($self->{options}->{xml} . '\debug\lib\libxml2.lib'); # This must be updated + } + if ($self->{options}->{xslt}) + { + $proj->AddIncludeDir($self->{options}->{xslt} . '\include'); +- $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); ++ $proj->AddLibrary($self->{options}->{xslt} . '\debug\lib\libxslt.lib'); # This must be updated + } + if ($self->{options}->{uuid}) + { + $proj->AddIncludeDir($self->{options}->{uuid} . '\include'); +- $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); ++ $proj->AddLibrary($self->{options}->{uuid} . '\debug\lib\uuid.lib'); # This must be updated + } + return $proj; + } diff --git a/ports/libpq/patches/windows/Solution_Release.patch b/ports/libpq/patches/windows/Solution_Release.patch new file mode 100644 index 000000000..442beb6c7 --- /dev/null +++ b/ports/libpq/patches/windows/Solution_Release.patch @@ -0,0 +1,157 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -650,7 +650,7 @@ sub AddProject + if ($self->{options}->{zlib}) + { + $proj->AddIncludeDir($self->{options}->{zlib} . '\include'); +- $proj->AddLibrary($self->{options}->{zlib} . '\lib\zdll.lib'); ++ $proj->AddLibrary($self->{options}->{zlib} . '\lib\zlib.lib'); # This must be updated + } + if ($self->{options}->{openssl}) + { +@@ -661,7 +661,7 @@ sub AddProject + # changed their library names from: + # - libeay to libcrypto + # - ssleay to libssl +- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') ++ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') # This must be updated + { + my $dbgsuffix; + my $libsslpath; +@@ -670,27 +670,27 @@ sub AddProject + # The format name of the libraries is slightly + # different between the Win32 and Win64 platform, so + # adapt. +- if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") # This must be updated + { + # Win32 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl32.lib'; +- $libcryptopath = '\lib\VC\libcrypto32.lib'; ++ $libsslpath = '\lib\VC\libssl32.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto32.lib'; # This must be updated + } +- elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") ++ elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") # This must be updated + { + # Win64 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl64.lib'; +- $libcryptopath = '\lib\VC\libcrypto64.lib'; ++ $libsslpath = '\lib\VC\libssl64.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto64.lib'; # This must be updated + } + else + { + # On both Win32 and Win64 the same library + # names are used without a debugging context. + $dbgsuffix = 0; +- $libsslpath = '\lib\libssl.lib'; +- $libcryptopath = '\lib\libcrypto.lib'; ++ $libsslpath = '\lib\libssl.lib'; # This must be updated ++ $libcryptopath = '\lib\libcrypto.lib'; # This must be updated + } + + $proj->AddLibrary($self->{options}->{openssl} . $libsslpath, +@@ -698,16 +698,16 @@ sub AddProject + $proj->AddLibrary($self->{options}->{openssl} . $libcryptopath, + $dbgsuffix); + } +- else ++ else + { + # Choose which set of libraries to use depending on if + # debugging libraries are in place in the installer. +- if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") # This must be updated + { + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); # This must be updated + } + else + { +@@ -715,60 +715,60 @@ sub AddProject + # to be here, so don't ask for it in last + # parameter. + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); ++ $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\libeay32.lib', 0); ++ $self->{options}->{openssl} . '\lib\libeay32.lib', 0); # This must be updated + } + } + } + if ($self->{options}->{nls}) + { + $proj->AddIncludeDir($self->{options}->{nls} . '\include'); +- $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); ++ $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); # This must be updated + } + if ($self->{options}->{gss}) + { +- $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib'); ++ $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');# This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');# This must be updated + } + if ($self->{options}->{iconv}) + { + $proj->AddIncludeDir($self->{options}->{iconv} . '\include'); +- $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); ++ $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); # This must be updated + } + if ($self->{options}->{icu}) + { + $proj->AddIncludeDir($self->{options}->{icu} . '\include'); + if ($self->{platform} eq 'Win32') + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); # This must be updated + } + else + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); # This must be updated + } + } + if ($self->{options}->{xml}) + { + $proj->AddIncludeDir($self->{options}->{xml} . '\include'); + $proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2'); +- $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); ++ $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); # This must be updated + } + if ($self->{options}->{xslt}) + { + $proj->AddIncludeDir($self->{options}->{xslt} . '\include'); +- $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); ++ $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); # This must be updated + } + if ($self->{options}->{uuid}) + { + $proj->AddIncludeDir($self->{options}->{uuid} . '\include'); +- $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); ++ $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); # This must be updated + } + return $proj; + } diff --git a/ports/libpq/patches/windows/arm.patch b/ports/libpq/patches/windows/arm.patch new file mode 100644 index 000000000..0e47c34b9 --- /dev/null +++ b/ports/libpq/patches/windows/arm.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..4f51c12f2 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -110,8 +110,8 @@ sub mkvcbuild + + if ($vsVersion >= '9.00') + { +- push(@pgportfiles, 'pg_crc32c_sse42_choose.c'); +- push(@pgportfiles, 'pg_crc32c_sse42.c'); ++ #push(@pgportfiles, 'pg_crc32c_sse42_choose.c'); ++ #push(@pgportfiles, 'pg_crc32c_sse42.c'); + push(@pgportfiles, 'pg_crc32c_sb8.c'); + } + else +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..625f32bf8 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -307,9 +307,8 @@ sub WriteItemDefinitionGroup + : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary'); + my $libs = $self->GetAdditionalLinkerDependencies($cfgname, ';'); + +- my $targetmachine = +- $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64'; +- ++ my $targetmachine = $self->{platform} eq 'ARM64' ? 'MachineARM64' : 'MachineARM'; ++ + my $includes = $self->{includes}; + unless ($includes eq '' or $includes =~ /;$/) + { +@@ -347,7 +349,6 @@ sub WriteItemDefinitionGroup + .\\$cfgname\\$self->{name}\\$self->{name}.pdb + false + .\\$cfgname\\$self->{name}\\$self->{name}.map +- false + + + Console diff --git a/ports/libpq/patches/windows/install.patch b/ports/libpq/patches/windows/install.patch new file mode 100644 index 000000000..206dd1da0 --- /dev/null +++ b/ports/libpq/patches/windows/install.patch @@ -0,0 +1,225 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index d109b2c90..75c7446e6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -106,7 +106,7 @@ sub Install + } + }, + @top_dir); +- CopySetOfFiles('config files', $sample_files, $target . '/share/'); ++ CopySetOfFiles('config files', $sample_files, $target . '/share/libpq/'); + CopyFiles( + 'Import libraries', + $target . '/lib/', +@@ -78,10 +78,10 @@ sub Install + my $majorver = DetermineMajorVersion(); + print "Installing version $majorver for $conf in $target\n"; + +- my @client_dirs = ('bin', 'lib', 'share', 'symbols'); ++ my @client_dirs = ('bin', 'lib', 'share', 'tools', 'share/libpq', 'tools/libpq'); + my @all_dirs = ( +- @client_dirs, 'doc', 'doc/contrib', 'doc/extension', 'share/contrib', +- 'share/extension', 'share/timezonesets', 'share/tsearch_data'); ++ @client_dirs, 'doc', 'doc/libpq', 'doc/libpq/contrib', 'doc/libpq/extension', 'share/libpq/contrib', ++ 'share/libpq/extension', 'share/libpq/timezonesets', 'share/libpq/tsearch_data'); + if ($insttype eq "client") + { + EnsureDirectories($target, @client_dirs); +@@ -120,35 +120,35 @@ sub Install + CopySetOfFiles( + 'timezone names', + [ glob('src\timezone\tznames\*.txt') ], +- $target . '/share/timezonesets/'); ++ $target . '/share/libpq/timezonesets/'); + CopyFiles( + 'timezone sets', +- $target . '/share/timezonesets/', ++ $target . '/share/libpq/timezonesets/', + 'src/timezone/tznames/', 'Default', 'Australia', 'India'); + CopySetOfFiles( + 'BKI files', + [ glob("src\\backend\\catalog\\postgres.*") ], +- $target . '/share/'); ++ $target . '/share/libpq/'); + CopySetOfFiles( + 'SQL files', + [ glob("src\\backend\\catalog\\*.sql") ], +- $target . '/share/'); ++ $target . '/share/libpq/'); + CopyFiles( +- 'Information schema data', $target . '/share/', ++ 'Information schema data', $target . '/share/libpq/', + 'src/backend/catalog/', 'sql_features.txt'); + CopyFiles( +- 'Error code data', $target . '/share/', ++ 'Error code data', $target . '/share/libpq/', + 'src/backend/utils/', 'errcodes.txt'); + GenerateTimezoneFiles($target, $conf); + GenerateTsearchFiles($target); + CopySetOfFiles( + 'Stopword files', + [ glob("src\\backend\\snowball\\stopwords\\*.stop") ], +- $target . '/share/tsearch_data/'); ++ $target . '/share/libpq/tsearch_data/'); + CopySetOfFiles( + 'Dictionaries sample files', + [ glob("src\\backend\\tsearch\\dicts\\*_sample*") ], +- $target . '/share/tsearch_data/'); ++ $target . '/share/libpq/tsearch_data/'); + + my $pl_extension_files = []; + my @pldirs = ('src/pl/plpgsql/src'); +@@ -167,7 +167,7 @@ sub Install + }, + @pldirs); + CopySetOfFiles('PL Extension files', +- $pl_extension_files, $target . '/share/extension/'); ++ $pl_extension_files, $target . '/share/libpq/extension/'); + } + + GenerateNLSFiles($target, $config->{nls}, $majorver) if ($config->{nls}); +@@ -282,23 +282,26 @@ sub CopySolutionOutput + { + if ($1 == 1) + { +- push(@{ $install_list{'bin'} }, "exe"); ++ push(@{ $install_list{'tools\\libpq'} }, "exe"); + } + elsif ($1 == 2) + { +- push(@{ $install_list{'lib'} }, "dll"); ++ push(@{ $install_list{'bin'} }, "dll"); + if ($is_sharedlib) + { + push(@{ $install_list{'bin'} }, "dll"); + push(@{ $install_list{'lib'} }, "lib"); + } ++ else ++ { ++ push(@{ $install_list{'lib'} }, "lib"); ++ } + } + else + { +- ++ push(@{ $install_list{'lib'} }, "lib"); + # Static libraries, such as libpgport, only used internally + # during build, don't install. +- next; + } + } + elsif ($vcproj eq 'vcxproj' +@@ -306,11 +309,11 @@ sub CopySolutionOutput + { + if ($1 eq 'Application') + { +- push(@{ $install_list{'bin'} }, "exe"); ++ push(@{ $install_list{'tools\\libpq'} }, "exe"); + } + elsif ($1 eq 'DynamicLibrary') + { +- push(@{ $install_list{'lib'} }, "dll"); ++ push(@{ $install_list{'bin'} }, "dll"); + if ($is_sharedlib) + { + push(@{ $install_list{'bin'} }, "dll"); +@@ -319,10 +322,9 @@ sub CopySolutionOutput + } + else # 'StaticLibrary' + { +- ++ push(@{ $install_list{'lib'} }, "lib"); + # Static lib, such as libpgport, only used internally + # during build, don't install. +- next; + } + } + else +@@ -339,7 +339,7 @@ sub CopySolutionOutput + || croak "Could not copy $pf.$ext\n"; + } + } +- lcopy("$conf\\$pf\\$pf.pdb", "$target\\symbols\\$pf.pdb") ++ lcopy("$conf\\$pf\\$pf.pdb", "$target\\bin\\$pf.pdb") + || croak "Could not copy $pf.pdb\n"; + print "."; + } +@@ -366,7 +366,7 @@ sub GenerateTimezoneFiles + print "Generating timezone files..."; + + my @args = +- ("$conf/zic/zic", '-d', "$target/share/timezone", '-p', "$posixrules"); ++ ("$conf/zic/zic", '-d', "$target/share/libpq/timezone", '-p', "$posixrules"); + foreach (@tzfiles) + { + my $tzfile = $_; +@@ -391,7 +391,7 @@ sub GenerateTsearchFiles + $mf =~ /^LANGUAGES\s*=\s*(.*)$/m + || die "Could not find LANGUAGES line in snowball Makefile\n"; + my @pieces = split /\s+/, $1; +- open($F, '>', "$target/share/snowball_create.sql") ++ open($F, '>', "$target/share/libpq/snowball_create.sql") + || die "Could not write snowball_create.sql"; + print $F read_file('src/backend/snowball/snowball_func.sql.in'); + +@@ -476,7 +476,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f.control", +- "$target/share/extension/$f.control") ++ "$target/share/libpq/extension/$f.control") + || croak("Could not copy file $f.control in contrib $module"); + print '.'; + } +@@ -494,7 +494,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f", +- "$target/share/$moduledir/" . basename($f)) ++ "$target/share/libpq/$moduledir/" . basename($f)) + || croak("Could not copy file $f in contrib $module"); + print '.'; + } +@@ -509,7 +509,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f", +- "$target/share/tsearch_data/" . basename($f)) ++ "$target/share/libpq/tsearch_data/" . basename($f)) + || croak("Could not copy file $f in $subdir $module"); + print '.'; + } +@@ -572,7 +572,7 @@ sub CopySubdirFiles + if ($module eq 'spi'); + foreach my $f (split /\s+/, $flist) + { +- lcopy("$subdir/$module/$f", "$target/doc/$moduledir/$f") ++ lcopy("$subdir/$module/$f", "$target/doc/libpq/$moduledir/$f") + || croak("Could not copy file $f in contrib $module"); + print '.'; + } +@@ -701,7 +701,7 @@ sub GenerateNLSFiles + my $majorver = shift; + + print "Installing NLS files..."; +- EnsureDirectories($target, "share/locale"); ++ EnsureDirectories($target, "share/libpq/locale"); + my @flist; + File::Find::find( + { +@@ -723,12 +723,12 @@ sub GenerateNLSFiles + next unless /([^\/]+)\.po/; + $lang = $1; + +- EnsureDirectories($target, "share/locale/$lang", +- "share/locale/$lang/LC_MESSAGES"); ++ EnsureDirectories($target, "share/libpq/locale/$lang", ++ "share/libpq/locale/$lang/LC_MESSAGES"); + my @args = ( + "$nlspath\\bin\\msgfmt", + '-o', +- "$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", ++ "$target\\share\\libpq\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", + $_); + system(@args) && croak("Could not run msgfmt on $dir\\$_"); + print "."; diff --git a/ports/libpq/patches/windows/minimize_install.patch b/ports/libpq/patches/windows/minimize_install.patch new file mode 100644 index 000000000..1d1eb2b57 --- /dev/null +++ b/ports/libpq/patches/windows/minimize_install.patch @@ -0,0 +1,35 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index d109b2c90..75c7446e6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -19,13 +19,13 @@ our (@ISA, @EXPORT_OK); + + my $insttype; + my @client_contribs = ('oid2name', 'pgbench', 'vacuumlo'); +-my @client_program_files = ( +- 'clusterdb', 'createdb', 'createuser', 'dropdb', +- 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat', +- 'libpgtypes', 'libpq', 'pg_basebackup', 'pg_config', +- 'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal', +- 'pg_recvlogical', 'pg_restore', 'psql', 'reindexdb', +- 'vacuumdb', @client_contribs); ++my @client_program_files = ( 'libecpg','libecpg_compat', 'libpgtypes', 'libpq' ); ++ # 'clusterdb', 'createdb', 'createuser', 'dropdb', ++ # 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat', ++ #'libpgtypes', 'libpq', 'pg_basebackup', 'pg_config', ++ #'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal', ++ #'pg_recvlogical', 'pg_restore', 'psql', 'reindexdb', ++ #'vacuumdb', @client_contribs); + + sub lcopy + { +@@ -110,7 +110,7 @@ sub Install + CopyFiles( + 'Import libraries', + $target . '/lib/', +- "$conf\\", "postgres\\postgres.lib", "libpgcommon\\libpgcommon.lib", ++ "$conf\\", "libpgcommon\\libpgcommon.lib", + "libpgport\\libpgport.lib"); + CopyContribFiles($config, $target); + CopyIncludeFiles($target); + diff --git a/ports/libpq/patches/windows/openssl_exe_path.patch b/ports/libpq/patches/windows/openssl_exe_path.patch new file mode 100644 index 000000000..cf2930f7f --- /dev/null +++ b/ports/libpq/patches/windows/openssl_exe_path.patch @@ -0,0 +1,34 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -127,19 +127,19 @@ sub GetOpenSSLVersion + # openssl.exe is in the specified directory. + my $opensslcmd = + $self->{options}->{openssl} . "\\bin\\openssl.exe version 2>&1"; +- my $sslout = `$opensslcmd`; ++ #my $sslout = `$opensslcmd`; + +- $? >> 8 == 0 +- or croak +- "Unable to determine OpenSSL version: The openssl.exe command wasn't found."; ++ #$? >> 8 == 0 ++ # or croak ++ # "Unable to determine OpenSSL version: The openssl.exe command wasn't found."; + +- if ($sslout =~ /(\d+)\.(\d+)\.(\d+)(\D)/m) +- { +- return ($1, $2, $3); +- } ++ #if ($sslout =~ /(\d+)\.(\d+)\.(\d+)(\D)/m) ++ #{ ++ return (1, 1, 1); ++ #} + +- croak +- "Unable to determine OpenSSL version: The openssl.exe version could not be determined."; ++ #croak ++ # "Unable to determine OpenSSL version: The openssl.exe version could not be determined."; + } + + sub GenerateFiles diff --git a/ports/libpq/patches/windows/win_bison_flex.patch b/ports/libpq/patches/windows/win_bison_flex.patch new file mode 100644 index 000000000..95df3f495 --- /dev/null +++ b/ports/libpq/patches/windows/win_bison_flex.patch @@ -0,0 +1,43 @@ +diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl +index aceed5ffd..f6ed215e8 100644 +--- a/src/tools/msvc/pgflex.pl ++++ b/src/tools/msvc/pgflex.pl +@@ -12,7 +12,7 @@ $ENV{CYGWIN} = 'nodosfilewarning'; + + do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl'; + +-my ($flexver) = `flex -V`; # grab first line ++my ($flexver) = `win_flex -V`; # grab first line + $flexver = (split(/\s+/, $flexver))[1]; + $flexver =~ s/[^0-9.]//g; + my @verparts = split(/\./, $flexver); +@@ -48,7 +47,7 @@ close($mf); + my $basetarg = basename($output); + my $flexflags = ($make =~ /^$basetarg:\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : ''); + +-system("flex $flexflags -o$output $input"); ++system("win_flex $flexflags -o$output $input"); + if ($? == 0) + { + +diff --git a/src/tools/msvc/pgbison.pl b/src/tools/msvc/pgbison.pl +index 895e398c0..f5b524a5d 100644 +--- a/src/tools/msvc/pgbison.pl ++++ b/src/tools/msvc/pgbison.pl +@@ -9,7 +9,7 @@ use File::Basename; + + do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl'; + +-my ($bisonver) = `bison -V`; # grab first line ++my ($bisonver) = `win_bison -V`; # grab first line + $bisonver = (split(/\s+/, $bisonver))[3]; # grab version number + + unless ($bisonver eq '1.875' || $bisonver ge '2.2') +@@ -45,5 +45,5 @@ close($mf); + my $basetarg = basename($output); + my $headerflag = ($make =~ /^$basetarg:\s+BISONFLAGS\b.*-d/m ? '-d' : ''); + +-system("bison $headerflag $input -o $output"); ++system("win_bison $headerflag $input -o $output"); + exit $? >> 8; + diff --git a/ports/libpq/pg_config.darwin.h b/ports/libpq/pg_config.darwin.h deleted file mode 100644 index 5db9f84d2..000000000 --- a/ports/libpq/pg_config.darwin.h +++ /dev/null @@ -1,191 +0,0 @@ -#define ACCEPT_TYPE_ARG1 int -#define ACCEPT_TYPE_ARG2 struct sockaddr * -#define ACCEPT_TYPE_ARG3 socklen_t -#define ACCEPT_TYPE_RETURN int -#define ALIGNOF_DOUBLE 8 -#define ALIGNOF_INT 4 -#define ALIGNOF_LONG 8 -#define ALIGNOF_SHORT 2 -#define BLCKSZ 8192 -#define DEF_PGPORT 5432 -#define DEF_PGPORT_STR "5432" -#define ENABLE_THREAD_SAFETY 1 -#define FLEXIBLE_ARRAY_MEMBER /**/ -#define FLOAT4PASSBYVAL true -#define FLOAT8PASSBYVAL true -#ifdef GETTIMEOFDAY_1ARG -# define gettimeofday(a,b) gettimeofday(a) -#endif -#define HAVE_ATOMICS 1 -#define HAVE_CBRT 1 -#define HAVE_CRYPT 1 -#define HAVE_DECL_FDATASYNC 0 -#define HAVE_DECL_F_FULLFSYNC 1 -#define HAVE_DECL_POSIX_FADVISE 0 -#define HAVE_DECL_SNPRINTF 1 -#define HAVE_DECL_STRLCAT 1 -#define HAVE_DECL_STRLCPY 1 -#define HAVE_DECL_SYS_SIGLIST 1 -#define HAVE_DECL_VSNPRINTF 1 -#define HAVE_DLOPEN 1 -#define HAVE_FDATASYNC 1 -#define HAVE_FLS 1 -#define HAVE_FSEEKO 1 -#define HAVE_FUNCNAME__FUNC 1 -#define HAVE_GCC__ATOMIC_INT32_CAS 1 -#define HAVE_GCC__ATOMIC_INT64_CAS 1 -#define HAVE_GCC__SYNC_CHAR_TAS 1 -#define HAVE_GCC__SYNC_INT32_CAS 1 -#define HAVE_GCC__SYNC_INT32_TAS 1 -#define HAVE_GCC__SYNC_INT64_CAS 1 -#define HAVE_GETADDRINFO 1 -#define HAVE_GETIFADDRS 1 -#define HAVE_GETOPT 1 -#define HAVE_GETOPT_H 1 -#define HAVE_GETOPT_LONG 1 -#define HAVE_GETPEEREID 1 -#define HAVE_GETPWUID_R 1 -#define HAVE_GETRLIMIT 1 -#define HAVE_GETRUSAGE 1 -#define HAVE_HISTORY_TRUNCATE_FILE 1 -#define HAVE_IFADDRS_H 1 -#define HAVE_INET_ATON 1 -#define HAVE_INTPTR_T 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_INT_OPTERR 1 -#define HAVE_INT_OPTRESET 1 -#define HAVE_INT_TIMEZONE 1 -#define HAVE_IPV6 1 -#define HAVE_ISINF 1 -#define HAVE_LANGINFO_H 1 -#define HAVE_LIBM 1 -#define HAVE_LIBREADLINE 1 -#define HAVE_LIBZ 1 -#define HAVE_LOCALE_T 1 -#define HAVE_LONG_INT_64 1 -#define HAVE_LONG_LONG_INT 1 -#define HAVE_MBSTOWCS_L 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 -#define HAVE_MKDTEMP 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_NETINET_TCP_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_POLL 1 -#define HAVE_POLL_H 1 -#define HAVE_PTHREAD 1 -#define HAVE_PTHREAD_IS_THREADED_NP 1 -#define HAVE_PTHREAD_PRIO_INHERIT 1 -#define HAVE_PWD_H 1 -#define HAVE_RANDOM 1 -#define HAVE_READLINE_HISTORY_H 1 -#define HAVE_READLINE_READLINE_H 1 -#define HAVE_READLINK 1 -#define HAVE_RINT 1 -#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1 -#define HAVE_RL_COMPLETION_MATCHES 1 -#define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1 -#define HAVE_SETSID 1 -#define HAVE_SHM_OPEN 1 -#define HAVE_SNPRINTF 1 -#define HAVE_SPINLOCKS 1 -#define HAVE_SRANDOM 1 -#define HAVE_SSL_GET_CURRENT_COMPRESSION 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRERROR 1 -#define HAVE_STRERROR_R 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRLCPY 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRUCT_ADDRINFO 1 -#define HAVE_STRUCT_OPTION 1 -#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1 -#define HAVE_STRUCT_TM_TM_ZONE 1 -#define HAVE_SYMLINK 1 -#define HAVE_SYSLOG 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_IPC_H 1 -#define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_RESOURCE_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_SEM_H 1 -#define HAVE_SYS_SHM_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_SOCKIO_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_UCRED_H 1 -#define HAVE_SYS_UN_H 1 -#define HAVE_TERMIOS_H 1 -#define HAVE_TM_ZONE 1 -#define HAVE_TOWLOWER 1 -#define HAVE_TZNAME 1 -#define HAVE_UINTPTR_T 1 -#define HAVE_UNION_SEMUN 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UNIX_SOCKETS 1 -#define HAVE_UNSETENV 1 -#define HAVE_UNSIGNED_LONG_LONG_INT 1 -#define HAVE_UTIME 1 -#define HAVE_UTIMES 1 -#define HAVE_UTIME_H 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_WCHAR_H 1 -#define HAVE_WCSTOMBS 1 -#define HAVE_WCSTOMBS_L 1 -#define HAVE_WCTYPE_H 1 -#define HAVE__BUILTIN_BSWAP32 1 -#define HAVE__BUILTIN_BSWAP64 1 -#define HAVE__BUILTIN_CONSTANT_P 1 -#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1 -#define HAVE__BUILTIN_UNREACHABLE 1 -#define HAVE__GET_CPUID 1 -#define HAVE__STATIC_ASSERT 1 -#define HAVE__VA_ARGS 1 -#define INT64_MODIFIER "l" -#define LOCALE_T_IN_XLOCALE 1 -#define MAXIMUM_ALIGNOF 8 -#define MEMSET_LOOP_LIMIT 1024 -#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" -#define PACKAGE_NAME "PostgreSQL" -#define PACKAGE_STRING "PostgreSQL 9.6.3" -#define PACKAGE_TARNAME "postgresql" -#define PACKAGE_URL "" -#define PACKAGE_VERSION "9.6.3" -#define PG_INT128_TYPE __int128 -#define PG_INT64_TYPE long int -#define PG_KRB_SRVNAM "postgres" -#define PG_MAJORVERSION "9.6" -#define PG_PRINTF_ATTRIBUTE printf -#define PG_VERSION "9.6.3" -#define PG_VERSION_NUM 90603 -#define PG_VERSION_STR "PostgreSQL 9.6.3 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 7.0.2 (clang-700.1.81), 64-bit" -#define RELSEG_SIZE 131072 -#define SIZEOF_LONG 8 -#define SIZEOF_OFF_T 8 -#define SIZEOF_SIZE_T 8 -#define SIZEOF_VOID_P 8 -#define STDC_HEADERS 1 -#define STRERROR_R_INT 1 -#define USE_FLOAT4_BYVAL 1 -#define USE_FLOAT8_BYVAL 1 -#define USE_INTEGER_DATETIMES 1 -#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1 -#define USE_SYSV_SEMAPHORES 1 -#define USE_SYSV_SHARED_MEMORY 1 -#define WCSTOMBS_L_IN_XLOCALE 1 -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#endif -#define XLOG_BLCKSZ 8192 -#define XLOG_SEG_SIZE (16 * 1024 * 1024) diff --git a/ports/libpq/pg_config.linux.h b/ports/libpq/pg_config.linux.h deleted file mode 100644 index 99ebaa716..000000000 --- a/ports/libpq/pg_config.linux.h +++ /dev/null @@ -1,173 +0,0 @@ -#define ACCEPT_TYPE_ARG1 int -#define ACCEPT_TYPE_ARG2 struct sockaddr * -#define ACCEPT_TYPE_ARG3 socklen_t -#define ACCEPT_TYPE_RETURN int -#define ALIGNOF_DOUBLE 8 -#define ALIGNOF_INT 4 -#define ALIGNOF_LONG 8 -#define ALIGNOF_SHORT 2 -#define BLCKSZ 8192 -#define DEF_PGPORT 5432 -#define DEF_PGPORT_STR "5432" -#define ENABLE_THREAD_SAFETY 1 -#define FLEXIBLE_ARRAY_MEMBER /**/ -#define FLOAT4PASSBYVAL true -#define FLOAT8PASSBYVAL true -#ifdef GETTIMEOFDAY_1ARG -# define gettimeofday(a,b) gettimeofday(a) -#endif -#define HAVE_ATOMICS 1 -#define HAVE_CBRT 1 -#define HAVE_CRYPT 1 -#define HAVE_CRYPT_H 1 -#define HAVE_DECL_FDATASYNC 1 -#define HAVE_DECL_F_FULLFSYNC 0 -#define HAVE_DECL_POSIX_FADVISE 1 -#define HAVE_DECL_SNPRINTF 1 -#define HAVE_DECL_STRLCAT 0 -#define HAVE_DECL_STRLCPY 0 -#define HAVE_DECL_SYS_SIGLIST 1 -#define HAVE_DECL_VSNPRINTF 1 -#define HAVE_DLOPEN 1 -#define HAVE_FDATASYNC 1 -#define HAVE_FSEEKO 1 -#define HAVE_FUNCNAME__FUNC 1 -#define HAVE_GCC__ATOMIC_INT32_CAS 1 -#define HAVE_GCC__ATOMIC_INT64_CAS 1 -#define HAVE_GCC__SYNC_CHAR_TAS 1 -#define HAVE_GCC__SYNC_INT32_CAS 1 -#define HAVE_GCC__SYNC_INT32_TAS 1 -#define HAVE_GCC__SYNC_INT64_CAS 1 -#define HAVE_GETADDRINFO 1 -#define HAVE_GETHOSTBYNAME_R 1 -#define HAVE_GETIFADDRS 1 -#define HAVE_GETOPT 1 -#define HAVE_GETOPT_H 1 -#define HAVE_GETOPT_LONG 1 -#define HAVE_GETPWUID_R 1 -#define HAVE_GETRLIMIT 1 -#define HAVE_GETRUSAGE 1 -#define HAVE_IFADDRS_H 1 -#define HAVE_INET_ATON 1 -#define HAVE_INTPTR_T 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_INT_OPTERR 1 -#define HAVE_INT_TIMEZONE 1 -#define HAVE_IPV6 1 -#define HAVE_ISINF 1 -#define HAVE_LANGINFO_H 1 -#define HAVE_LIBM 1 -#define HAVE_LIBZ 1 -#define HAVE_LOCALE_T 1 -#define HAVE_LONG_INT_64 1 -#define HAVE_LONG_LONG_INT 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 -#define HAVE_MKDTEMP 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_NETINET_TCP_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_POLL 1 -#define HAVE_POLL_H 1 -#define HAVE_POSIX_FADVISE 1 -#define HAVE_PTHREAD 1 -#define HAVE_PTHREAD_PRIO_INHERIT 1 -#define HAVE_PWD_H 1 -#define HAVE_RANDOM 1 -#define HAVE_READLINK 1 -#define HAVE_RINT 1 -#define HAVE_SETSID 1 -#define HAVE_SHM_OPEN 1 -#define HAVE_SNPRINTF 1 -#define HAVE_SPINLOCKS 1 -#define HAVE_SRANDOM 1 -#define HAVE_SSL_GET_CURRENT_COMPRESSION 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRERROR 1 -#define HAVE_STRERROR_R 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRUCT_ADDRINFO 1 -#define HAVE_STRUCT_OPTION 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -#define HAVE_STRUCT_TM_TM_ZONE 1 -#define HAVE_SYMLINK 1 -#define HAVE_SYNC_FILE_RANGE 1 -#define HAVE_SYSLOG 1 -#define HAVE_SYS_EPOLL_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_IPC_H 1 -#define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_RESOURCE_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_SEM_H 1 -#define HAVE_SYS_SHM_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_UN_H 1 -#define HAVE_TERMIOS_H 1 -#define HAVE_TM_ZONE 1 -#define HAVE_TOWLOWER 1 -#define HAVE_TZNAME 1 -#define HAVE_UINTPTR_T 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UNIX_SOCKETS 1 -#define HAVE_UNSETENV 1 -#define HAVE_UNSIGNED_LONG_LONG_INT 1 -#define HAVE_UTIME 1 -#define HAVE_UTIMES 1 -#define HAVE_UTIME_H 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_WCHAR_H 1 -#define HAVE_WCSTOMBS 1 -#define HAVE_WCTYPE_H 1 -#define HAVE__BUILTIN_BSWAP32 1 -#define HAVE__BUILTIN_BSWAP64 1 -#define HAVE__BUILTIN_CONSTANT_P 1 -#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1 -#define HAVE__BUILTIN_UNREACHABLE 1 -#define HAVE__GET_CPUID 1 -#define HAVE__STATIC_ASSERT 1 -#define HAVE__VA_ARGS 1 -#define INT64_MODIFIER "l" -#define MAXIMUM_ALIGNOF 8 -#define MEMSET_LOOP_LIMIT 1024 -#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" -#define PACKAGE_NAME "PostgreSQL" -#define PACKAGE_STRING "PostgreSQL 9.6.3" -#define PACKAGE_TARNAME "postgresql" -#define PACKAGE_URL "" -#define PACKAGE_VERSION "9.6.3" -${DEFINE_PG_INT128_TYPE} -#define PG_INT64_TYPE long int -#define PG_KRB_SRVNAM "postgres" -#define PG_MAJORVERSION "9.6" -#define PG_PRINTF_ATTRIBUTE gnu_printf -#define PG_VERSION "9.6.3" -#define PG_VERSION_NUM 90603 -#define PG_VERSION_STR "PostgreSQL 9.6.3 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904, 64-bit" -#define RELSEG_SIZE 131072 -#define SIZEOF_LONG 8 -#define SIZEOF_OFF_T 8 -#define SIZEOF_SIZE_T 8 -#define SIZEOF_VOID_P 8 -#define STDC_HEADERS 1 -#define USE_FLOAT4_BYVAL 1 -#define USE_FLOAT8_BYVAL 1 -#define USE_INTEGER_DATETIMES 1 -#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1 -#define USE_SYSV_SEMAPHORES 1 -#define USE_SYSV_SHARED_MEMORY 1 -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#endif -#define XLOG_BLCKSZ 8192 -#define XLOG_SEG_SIZE (16 * 1024 * 1024) diff --git a/ports/libpq/portfile.cmake b/ports/libpq/portfile.cmake index 48e6ad71a..2ef9309a2 100644 --- a/ports/libpq/portfile.cmake +++ b/ports/libpq/portfile.cmake @@ -2,29 +2,283 @@ if(VCPKG_TARGET_IS_UWP) message(FATAL_ERROR "${PORT} currently only supports being built for desktop") endif() +macro(feature_unsupported) + foreach(_feat ${ARGN}) + if("${FEATURES}" MATCHES "${_feat}") + message(FATAL_ERROR "Feature ${_feat} not supported by configure script on the target platform") + endif() + endforeach() +endmacro() + +macro(feature_not_implemented_yet) + foreach(_feat ${ARGN}) + if("${FEATURES}" MATCHES "${_feat}") + message(FATAL_ERROR "Feature ${_feat} is not yet implement on the target platform") + endif() + endforeach() +endmacro() + +if(VCPKG_TARGET_IS_WINDOWS) + # on windows libpq seems to only depend on openssl gss(kerberos) and ldap on the soruce site_name + # the configuration header depends on zlib, nls, ldap, uuid, xml, xlst,gss,openssl,icu + feature_unsupported(readline bonjour libedit kerberos bsd systemd llvm pam) + feature_not_implemented_yet(perl python tcl uuid) +elseif(VCPKG_TARGET_IS_OSX) + feature_not_implemented_yet(readline libedit kerberos bsd systemd llvm pam perl python tcl uuid) +else() + feature_not_implemented_yet(readline bonjour libedit kerberos bsd systemd llvm pam perl python tcl uuid) +endif() + +## Download and extract sources vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.postgresql.org/pub/source/v9.6.3/postgresql-9.6.3.tar.bz2" - FILENAME "postgresql-9.6.3.tar.bz2" - SHA512 97141972e154e6b0e756ee6a4e20f26e82022a9fd4c56305314a3a5567a79ece638e4ac3d513b46138737ae6bd27a098f30013a94767db151181aac9c01290a1 + URLS "https://ftp.postgresql.org/pub/source/v12.0/postgresql-12.0.tar.bz2" + FILENAME "postgresql-12.0.tar.bz2" + SHA512 231a0b5c181c33cb01c3f39de1802319b79eceec6997935ab8605dea1f4583a52d0d16e5a70fcdeea313462f062503361d543433ee03d858ba332c72a665f696 ) +set(PATCHES + patches/windows/install.patch + patches/windows/win_bison_flex.patch + patches/windows/openssl_exe_path.patch + patches/windows/Solution.patch + patches/linux/configure.patch) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND PATCHES patches/windows/MSBuildProject-static-lib.patch) + list(APPEND PATCHES patches/windows/Mkvcbuild-static-lib.patch) +endif() +if(VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND PATCHES patches/windows/MSBuildProject-static-crt.patch) +endif() +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + list(APPEND PATCHES patches/windows/arm.patch) +endif() +if(NOT "${FEATURES}" MATCHES "client") + list(APPEND PATCHES patches/windows/minimize_install.patch) +else() + set(HAS_TOOLS TRUE) +endif() vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} + PATCHES ${PATCHES} + ) +unset(buildenv_contents) +# Get paths to required programs +foreach(program_name BISON FLEX PERL) + # Need to rename win_bison and win_flex to just bison and flex + vcpkg_find_acquire_program(${program_name}) + get_filename_component(${program_name}_EXE_PATH ${${program_name}} DIRECTORY) + vcpkg_add_to_path(PREPEND "${${program_name}_EXE_PATH}") + set(buildenv_contents "${buildenv_contents}\n\$ENV{PATH}=\$ENV{PATH} . ';${${program_name}_EXE_PATH}';") +endforeach() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +## Setup build types -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - "-DPORT_DIR=${CMAKE_CURRENT_LIST_DIR}" - OPTIONS_DEBUG - -DINSTALL_INCLUDES=OFF -) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE MATCHES "[Rr][Ee][Ll][Ee][Aa][Ss][Ee]") + set(_buildtype RELEASE) + set(_short rel) + list(APPEND port_config_list ${_buildtype}) + set(INSTALL_PATH_SUFFIX_${_buildtype} "") + set(BUILDPATH_${_buildtype} "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${_short}") + set(PACKAGE_DIR_${_buildtype} ${CURRENT_PACKAGES_DIR}) + unset(_short) + unset(_buildtype) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]") + set(_buildtype DEBUG) + set(_short dbg) + list(APPEND port_config_list ${_buildtype}) + set(INSTALL_PATH_SUFFIX_${_buildtype} "/debug") + set(BUILDPATH_${_buildtype} "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${_short}") + set(PACKAGE_DIR_${_buildtype} ${CURRENT_PACKAGES_DIR}${INSTALL_PATH_SUFFIX_${_buildtype}}) + unset(_short) + unset(_buildtype) +endif() -vcpkg_install_cmake() -vcpkg_copy_pdbs() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) +## Do the build +if(VCPKG_TARGET_IS_WINDOWS) + file(GLOB SOURCE_FILES ${SOURCE_PATH}/*) + foreach(_buildtype ${port_config_list}) + # Copy libpq sources. + message(STATUS "Copying libpq source files to ${BUILDPATH_${_buildtype}}...") + foreach(SOURCE_FILE ${SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${BUILDPATH_${_buildtype}}") + endforeach() + message(STATUS "Copying libpq source files... done") + + vcpkg_apply_patches( + SOURCE_PATH "${BUILDPATH_${_buildtype}}" + PATCHES patches/windows/Solution_${_buildtype}.patch + ) + message(STATUS "Patches applied!") + file(COPY "${CURRENT_PORT_DIR}/config.pl" DESTINATION "${BUILDPATH_${_buildtype}}/src/tools/msvc") + set(CONFIG_FILE "${BUILDPATH_${_buildtype}}/src/tools/msvc/config.pl") + file(READ "${CONFIG_FILE}" _contents) + + ## ldap => undef, # --with-ldap ##done + ## extraver => undef, # --with-extra-version= + ## gss => undef, # --with-gssapi= + ## icu => undef, # --with-icu= ##done + ## nls => undef, # --enable-nls= ##done + ## tap_tests => undef, # --enable-tap-tests + ## tcl => undef, # --with-tcl= + ## perl => undef, # --with-perl + ## python => undef, # --with-python= + ## openssl => undef, # --with-openssl= ##done + ## uuid => undef, # --with-ossp-uuid + ## xml => undef, # --with-libxml= ##done + ## xslt => undef, # --with-libxslt= ##done + ## iconv => undef, # (not in configure, path to iconv) ##done (needed by xml) + ## zlib => undef # --with-zlib= ##done + + ## Setup external dependencies + ##"-DFEATURES=core;openssl;zlib" "-DALL_FEATURES=openssl;zlib;readline;libedit;perl;python;tcl;nls;kerberos;systemd;ldap;bsd;pam;llvm;icu;bonjour;uuid;xml;xslt;" + if("${FEATURES}" MATCHES "ldap") + string(REPLACE "ldap => undef" "ldap => 1" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "icu") + string(REPLACE "icu => undef" "icu => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "nls") + string(REPLACE "nls => undef" "nls => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "openssl") + set(buildenv_contents "${buildenv_contents}\n\$ENV{PATH}=\$ENV{PATH} . ';${CURRENT_INSTALLED_DIR}/tools/openssl';") + #set(_contents "${_contents}\n\$ENV{PATH}=\$ENV{PATH} . ';${CURRENT_INSTALLED_DIR}/tools/openssl';") + string(REPLACE "openssl => undef" "openssl => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + if("${FEATURES}" MATCHES "xml") + string(REPLACE "xml => undef" "xml => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + string(REPLACE "iconv => undef" "iconv => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + if("${FEATURES}" MATCHES "xslt") + string(REPLACE "xslt => undef" "xslt => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + if("${FEATURES}" MATCHES "zlib") + string(REPLACE "zlib => undef" "zlib => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + file(WRITE "${CONFIG_FILE}" "${_contents}") + file(WRITE "${BUILDPATH_${_buildtype}}/src/tools/msvc/buildenv.pl" "${buildenv_contents}") + vcpkg_get_windows_sdk(VCPKG_TARGET_PLATFORM_VERSION) + set(ENV{MSBFLAGS} "/p:PlatformToolset=${VCPKG_PLATFORM_TOOLSET} + /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No + /p:WindowsTargetPlatformVersion=${VCPKG_TARGET_PLATFORM_VERSION} + /m + /p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets + /p:VcpkgTriplet=${TARGET_TRIPLET}" + ) + if(HAS_TOOLS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(ENV{MSBFLAGS} "$ENV{MSBFLAGS} /p:Platform=Win32") + endif() + message(STATUS "Building libpq ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} build.pl ${_buildtype} + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME build-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Building libpq ${TARGET_TRIPLET}-${_buildtype}... done") + else() + set(build_libs libpq libecpg_compat) + foreach(build_lib ${build_libs}) + message(STATUS "Building ${build_lib} ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} build.pl ${_buildtype} ${build_lib} + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME build-${build_lib}-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Building ${build_lib} ${TARGET_TRIPLET}-${_buildtype}... done") + endforeach() + endif() + + message(STATUS "Installing libpq ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} install.pl ${CURRENT_PACKAGES_DIR}${INSTALL_PATH_SUFFIX_${_buildtype}} client + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME install-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Installing libpq ${TARGET_TRIPLET}-${_buildtype}... done") + endforeach() + + + message(STATUS "Cleanup libpq ${TARGET_TRIPLET}...") + #Cleanup + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/symbols) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/symbols) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + if(NOT HAS_TOOLS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + else() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() + #file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) + #vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + message(STATUS "Cleanup libpq ${TARGET_TRIPLET}... - done") +else() + if("${FEATURES}" MATCHES "openssl") + list(APPEND BUILD_OPTS --with-openssl) + endif() + if(NOT "${FEATURES}" MATCHES "zlib") + list(APPEND BUILD_OPTS --without-zlib) + endif() + if(NOT "${FEATURES}" MATCHES "readline") + list(APPEND BUILD_OPTS --without-readline) + endif() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${BUILD_OPTS} + --with-includes=${CURRENT_INSTALLED_DIR}/include + OPTIONS_RELEASE + --exec-prefix=${CURRENT_PACKAGES_DIR}/tools/${PORT} + --datarootdir=${CURRENT_PACKAGES_DIR}/share/${PORT} + --with-libraries=${CURRENT_INSTALLED_DIR}/lib + OPTIONS_DEBUG + --exec-prefix=${CURRENT_PACKAGES_DIR}/debug/tools/${PORT} + --datarootdir=${CURRENT_PACKAGES_DIR}/debug/share/${PORT} + --with-libraries=${CURRENT_INSTALLED_DIR}/debug/lib + --enable-debug + ) + + vcpkg_install_make() + # instead? + # make -C src/include install + # make -C src/interfaces install + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + if(NOT HAS_TOOLS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + else() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() +endif() +#vcpkg_copy_pdbs() + +#if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libpq.lib") + #RENAME debug library due to CMake. In general that is a bad idea but it will have consquences for the generated cmake targets + # of other ports if not renamed. Maybe a vcpkg_cmake_wrapper is required here to correct the target information if the rename is removed? +# file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libpq.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/libpqd.lib") +#endif() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/postgresql) +file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/postgresql) file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libpq/vcpkg-cmake-wrapper.cmake b/ports/libpq/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..4ce0f8579 --- /dev/null +++ b/ports/libpq/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +# Give the CMake module a little bit of help to find the debug libraries +find_library(PostgreSQL_LIBRARY_DEBUG +NAMES pq +PATHS + "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" +NO_DEFAULT_PATH +) +_find_package(${ARGS}) \ No newline at end of file diff --git a/ports/librtmp/CONTROL b/ports/librtmp/CONTROL index 5724eefe2..9afbe903f 100644 --- a/ports/librtmp/CONTROL +++ b/ports/librtmp/CONTROL @@ -1,5 +1,5 @@ Source: librtmp -Version: 2019-11-11 +Version: 2019-11-11_1 Build-Depends: zlib, openssl Homepage: https://rtmpdump.mplayerhq.hu Description: RTMPDump Real-Time Messaging Protocol API diff --git a/ports/librtmp/dh.patch b/ports/librtmp/dh.patch new file mode 100644 index 000000000..4b0345354 --- /dev/null +++ b/ports/librtmp/dh.patch @@ -0,0 +1,136 @@ +diff --git a/librtmp/dh.h b/librtmp/dh.h +index 8e285a60c..ea562d200 100644 +--- a/librtmp/dh.h ++++ b/librtmp/dh.h +@@ -139,11 +139,14 @@ typedef BIGNUM * MP_t; + #define MP_setbin(u,buf,len) BN_bn2bin(u,buf) + #define MP_getbin(u,buf,len) u = BN_bin2bn(buf,len,0) + ++ + #define MDH DH + #define MDH_new() DH_new() + #define MDH_free(dh) DH_free(dh) + #define MDH_generate_key(dh) DH_generate_key(dh) + #define MDH_compute_key(secret, seclen, pub, dh) DH_compute_key(secret, pub, dh) ++#define MPH_set_pqg(dh, p, q, g, res) res = DH_set0_pqg(dh, p, q, g) ++#define MPH_set_length(dh, len, res) res = DH_set_length(dh,len) + + #endif + +@@ -152,7 +155,7 @@ typedef BIGNUM * MP_t; + + /* RFC 2631, Section 2.1.5, http://www.ietf.org/rfc/rfc2631.txt */ + static int +-isValidPublicKey(MP_t y, MP_t p, MP_t q) ++isValidPublicKey(const MP_t y,const MP_t p, MP_t q) + { + int ret = TRUE; + MP_t bn; +@@ -211,20 +214,33 @@ DHInit(int nKeyBits) + if (!dh) + goto failed; + +- MP_new(dh->g); ++ MP_t g,p; ++ MP_new(g); + +- if (!dh->g) ++ if (!g) ++ { + goto failed; ++ } + +- MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */ ++ DH_get0_pqg(dh, (BIGNUM const**)&p, NULL, NULL); ++ MP_gethex(p, P1024, res); /* prime P1024, see dhgroups.h */ + if (!res) + { + goto failed; + } + +- MP_set_w(dh->g, 2); /* base 2 */ +- +- dh->length = nKeyBits; ++ MP_set_w(g, 2); /* base 2 */ ++ MPH_set_pqg(dh,p,NULL,g, res); ++ if (!res) ++ { ++ MP_free(g); ++ goto failed; ++ } ++ MPH_set_length(dh,nKeyBits, res); ++ if (!res) ++ { ++ goto failed; ++ } + return dh; + + failed: +@@ -250,14 +267,11 @@ DHGenerateKey(MDH *dh) + + MP_gethex(q1, Q1024, res); + assert(res); +- +- res = isValidPublicKey(dh->pub_key, dh->p, q1); ++ res = isValidPublicKey(DH_get0_pub_key(dh), DH_get0_p(dh), q1); + if (!res) +- { +- MP_free(dh->pub_key); +- MP_free(dh->priv_key); +- dh->pub_key = dh->priv_key = 0; +- } ++ { ++ MDH_free(dh); // Cannot set priv_key to nullptr so there is no way to generate a new pub/priv key pair in openssl 1.1.1. ++ } + + MP_free(q1); + } +@@ -272,15 +286,16 @@ static int + DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + { + int len; +- if (!dh || !dh->pub_key) ++ MP_t pub = DH_get0_pub_key(dh); ++ if (!dh || !pub) + return 0; + +- len = MP_bytes(dh->pub_key); ++ len = MP_bytes(pub); + if (len <= 0 || len > (int) nPubkeyLen) + return 0; + + memset(pubkey, 0, nPubkeyLen); +- MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len); ++ MP_setbin(pub, pubkey + (nPubkeyLen - len), len); + return 1; + } + +@@ -288,15 +303,16 @@ DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + static int + DHGetPrivateKey(MDH *dh, uint8_t *privkey, size_t nPrivkeyLen) + { +- if (!dh || !dh->priv_key) ++ MP_t priv = DH_get0_priv_key(dh); ++ if (!dh || !priv) + return 0; + +- int len = MP_bytes(dh->priv_key); ++ int len = MP_bytes(priv); + if (len <= 0 || len > (int) nPrivkeyLen) + return 0; + + memset(privkey, 0, nPrivkeyLen); +- MP_setbin(dh->priv_key, privkey + (nPrivkeyLen - len), len); ++ MP_setbin(priv, privkey + (nPrivkeyLen - len), len); + return 1; + } + #endif +@@ -322,7 +338,7 @@ DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen, + MP_gethex(q1, Q1024, len); + assert(len); + +- if (isValidPublicKey(pubkeyBn, dh->p, q1)) ++ if (isValidPublicKey(pubkeyBn, DH_get0_p(dh), q1)) + res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh); + else + res = -1; diff --git a/ports/librtmp/handshake.patch b/ports/librtmp/handshake.patch new file mode 100644 index 000000000..88f5d2458 --- /dev/null +++ b/ports/librtmp/handshake.patch @@ -0,0 +1,35 @@ +diff --git a/librtmp/handshake.h b/librtmp/handshake.h +index 98bf3c877..0819152bd 100644 +--- a/librtmp/handshake.h ++++ b/librtmp/handshake.h +@@ -66,9 +66,9 @@ typedef gcry_cipher_hd_t RC4_handle; + #if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH) + #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256 + #endif +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) ctx = HMAC_CTX_new(); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); HMAC_CTX_free(ctx) + + typedef RC4_KEY * RC4_handle; + #define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY)) +@@ -114,7 +114,7 @@ static void InitRC4Encryption + { + uint8_t digest[SHA256_DIGEST_LENGTH]; + unsigned int digestLen = 0; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + + RC4_alloc(rc4keyIn); + RC4_alloc(rc4keyOut); +@@ -263,7 +263,7 @@ HMACsha256(const uint8_t *message, size_t messageLen, const uint8_t *key, + size_t keylen, uint8_t *digest) + { + unsigned int digestLen; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + + HMAC_setup(ctx, key, keylen); + HMAC_crunch(ctx, message, messageLen); diff --git a/ports/librtmp/hashswf.patch b/ports/librtmp/hashswf.patch new file mode 100644 index 000000000..fb29549f3 --- /dev/null +++ b/ports/librtmp/hashswf.patch @@ -0,0 +1,28 @@ +diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c +index 3c56b6922..964a64d01 100644 +--- a/librtmp/hashswf.c ++++ b/librtmp/hashswf.c +@@ -57,10 +57,10 @@ + #include + #include + #include +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, (unsigned char *)key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, (unsigned char *)buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, (unsigned char *)dig, &dlen); +-#define HMAC_close(ctx) HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) ctx = HMAC_CTX_new(); HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, (unsigned char *)buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, (unsigned char *)dig, &dlen); ++#define HMAC_close(ctx) HMAC_CTX_free(ctx) + #endif + + extern void RTMP_TLS_Init(); +@@ -289,7 +289,7 @@ leave: + struct info + { + z_stream *zs; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + int first; + int zlib; + int size; diff --git a/ports/librtmp/portfile.cmake b/ports/librtmp/portfile.cmake index 6a1203b0f..6f4e73e3d 100644 --- a/ports/librtmp/portfile.cmake +++ b/ports/librtmp/portfile.cmake @@ -5,6 +5,9 @@ vcpkg_from_git( URL https://git.ffmpeg.org/rtmpdump REF ${RTMPDUMP_REVISION} PATCHES + dh.patch #Openssl 1.1.1 patch + handshake.patch #Openssl 1.1.1 patch + hashswf.patch #Openssl 1.1.1 patch fix_strncasecmp.patch hide_netstackdump.patch ) diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index a819253d0..c12fb8f8f 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,5 +1,5 @@ Source: libssh -Version: 0.7.6-1 +Version: 0.9.0 Homepage: https://www.libssh.org/ Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side Build-Depends: openssl diff --git a/ports/libssh/build-one-flavor.patch b/ports/libssh/build-one-flavor.patch index 96e20ba98..64e2c58a7 100644 --- a/ports/libssh/build-one-flavor.patch +++ b/ports/libssh/build-one-flavor.patch @@ -2,19 +2,61 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1012ddf..612f0ba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -225,6 +225,7 @@ include_directories( - ${LIBSSH_PRIVATE_INCLUDE_DIRS} - ) +@@ -313,6 +313,7 @@ if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND) + ) + endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND) +if (NOT WITH_STATIC_LIB) add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) - - target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) -@@ -259,6 +260,7 @@ install( + target_compile_options(${LIBSSH_SHARED_LIBRARY} + PRIVATE +@@ -362,7 +363,7 @@ install( ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries ) +- +endif() - - if (WITH_STATIC_LIB) + if (BUILD_STATIC_LIB) add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS}) + target_compile_options(${LIBSSH_STATIC_LIBRARY} +@@ -370,11 +371,7 @@ if (BUILD_STATIC_LIB) + ${DEFAULT_C_COMPILE_FLAGS} + -D_GNU_SOURCE) + +- if (MSVC) +- set(OUTPUT_SUFFIX static) +- else (MSVC) +- set(OUTPUT_SUFFIX ) +- endif (MSVC) ++ + set_target_properties( + ${LIBSSH_STATIC_LIBRARY} + PROPERTIES +@@ -385,23 +382,18 @@ if (BUILD_STATIC_LIB) + OUTPUT_NAME + ssh + ARCHIVE_OUTPUT_DIRECTORY +- ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_SUFFIX} ++ ${CMAKE_CURRENT_BINARY_DIR} + ) + + if (WIN32) +- set_target_properties( +- ${LIBSSH_STATIC_LIBRARY} +- PROPERTIES +- COMPILE_FLAGS +- "-DLIBSSH_STATIC" +- ) ++ target_compile_definitions(${LIBSSH_STATIC_LIBRARY} PUBLIC LIBSSH_STATIC) + endif (WIN32) + + if (WITH_STATIC_LIB) + install(TARGETS + ${LIBSSH_STATIC_LIBRARY} + DESTINATION +- ${LIB_INSTALL_DIR}/${OUTPUT_SUFFIX} ++ ${LIB_INSTALL_DIR} + COMPONENT + libraries) + endif (WITH_STATIC_LIB) + diff --git a/ports/libssh/fix-config-cmake.patch b/ports/libssh/fix-config-cmake.patch deleted file mode 100644 index bb369359f..000000000 --- a/ports/libssh/fix-config-cmake.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a063556..68e559e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -11,6 +11,8 @@ set(APPLICATION_VERSION_MINOR "7") - set(APPLICATION_VERSION_PATCH "6") - - set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") -+set(CMAKE_INSTALL_DIR lib/cmake/libssh CACHE STRING -+ "The subdirectory where CMake package config files should be installed") - - # SOVERSION scheme: CURRENT.AGE.REVISION - # If there was an incompatible interface change: -@@ -114,14 +116,29 @@ endif (UNIX) - set(LIBSSH_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(LIBSSH_THREADS_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX}) - --configure_file(${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake @ONLY) --configure_file(${PROJECT_NAME}-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake @ONLY) -+include(CMakePackageConfigHelpers) -+configure_package_config_file( -+ ${PROJECT_NAME}-config.cmake.in -+ ${PROJECT_NAME}-config.cmake -+ INSTALL_DESTINATION ${CMAKE_INSTALL_DIR} -+ PATH_VARS -+ INCLUDE_INSTALL_DIR -+ CMAKE_INSTALL_DIR -+) -+configure_package_config_file( -+ ${PROJECT_NAME}-config-version.cmake.in -+ ${PROJECT_NAME}-config-version.cmake -+ INSTALL_DESTINATION ${CMAKE_INSTALL_DIR} -+ PATH_VARS -+ INCLUDE_INSTALL_DIR -+ CMAKE_INSTALL_DIR -+) - install( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake - DESTINATION -- ${CMAKE_INSTALL_DIR}/${PROJECT_NAME} -+ ${CMAKE_INSTALL_DIR} - COMPONENT - devel - ) -diff --git a/libssh-config.cmake.in b/libssh-config.cmake.in -index fa9cecf..b17fdbd 100644 ---- a/libssh-config.cmake.in -+++ b/libssh-config.cmake.in -@@ -1,13 +1,22 @@ - get_filename_component(LIBSSH_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -+get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) - - if (EXISTS "${LIBSSH_CMAKE_DIR}/CMakeCache.txt") - # In build tree - include(${LIBSSH_CMAKE_DIR}/libssh-build-tree-settings.cmake) - else() -- set(LIBSSH_INCLUDE_DIR @INCLUDE_INSTALL_DIR@) -+ set(LIBSSH_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include/") -+ set(LIBSSH_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/") - endif() - --set(LIBSSH_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@) --set(LIBSSH_LIBRARIES @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@) -+if(CMAKE_BUILD_TYPE STREQUAL "Release") -+ set(LIBSSH_LIBRARY "${PACKAGE_PREFIX_DIR}/lib/ssh.lib") -+ set(LIBSSH_LIBRARIES "${PACKAGE_PREFIX_DIR}/lib/ssh.lib") - --set(LIBSSH_THREADS_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_THREADS_LIBRARY_NAME@) -+ set(LIBSSH_THREADS_LIBRARY "${PACKAGE_PREFIX_DIR}/lib/ssh.lib") -+elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") -+ set(LIBSSH_LIBRARY "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib") -+ set(LIBSSH_LIBRARIES "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib") -+ -+ set(LIBSSH_THREADS_LIBRARY "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib") -+endif() diff --git a/ports/libssh/install-config.patch b/ports/libssh/install-config.patch new file mode 100644 index 000000000..4943765d5 --- /dev/null +++ b/ports/libssh/install-config.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b9f6ef485..c910d37eb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -145,8 +145,6 @@ install( + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake + DESTINATION + ${CMAKE_INSTALL_DIR}/${PROJECT_NAME} +- COMPONENT +- devel + ) + + if (WITH_EXAMPLES) +diff --git a/0.9.0-daf25b6f84 - Kopie/libssh-config.cmake.in b/0.9.0-daf25b6f84/libssh-config.cmake.in +index 11388f009..2f826a9b4 100644 +--- a/libssh-config.cmake.in ++++ b/libssh-config.cmake.in +@@ -6,7 +6,16 @@ if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/CMakeCache.txt") + set_and_check(LIBSSH_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/@LIBSSH_LIBRARY_NAME@") + else() ++ # Compute the installation prefix relative to this file. ++get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) ++get_filename_component(PACKAGE_PREFIX_DIR "${PACKAGE_PREFIX_DIR}" PATH) ++get_filename_component(PACKAGE_PREFIX_DIR "${PACKAGE_PREFIX_DIR}" PATH) ++if(PACKAGE_PREFIX_DIR STREQUAL "/") ++ set(PACKAGE_PREFIX_DIR "") ++endif() + set_and_check(LIBSSH_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +- set_and_check(LIBSSH_LIBRARIES "@PACKAGE_LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@") ++ set_and_check(LIBSSH_LIBRARIES_RELEASE "@PACKAGE_LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@") ++ set_and_check(LIBSSH_LIBRARIES_DEBUG "@PACKAGE_LIB_INSTALL_DIR@/../debug/lib/@LIBSSH_LIBRARY_NAME@") ++ set_and_check(LIBSSH_LIBRARIES "optimized;${LIBSSH_LIBRARIES_RELEASE};debug;${LIBSSH_LIBRARIES_DEBUG}") + endif() + + # For backward compatibility diff --git a/ports/libssh/missing-includes.patch b/ports/libssh/missing-includes.patch deleted file mode 100644 index f12d04744..000000000 --- a/ports/libssh/missing-includes.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/libssh/priv.h b/include/libssh/priv.h -index 4cf6d75..13993ea 100644 ---- a/include/libssh/priv.h -+++ b/include/libssh/priv.h -@@ -30,6 +30,8 @@ - #define _LIBSSH_PRIV_H - - #include "config.h" -+#include -+#include - - #if !defined(HAVE_STRTOULL) - # if defined(HAVE___STRTOULL) diff --git a/ports/libssh/only-one-flavor-threads.patch b/ports/libssh/only-one-flavor-threads.patch deleted file mode 100644 index 31b3e1f36..000000000 --- a/ports/libssh/only-one-flavor-threads.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt -index 2ab4e1b..a47620b 100644 ---- a/src/threads/CMakeLists.txt -+++ b/src/threads/CMakeLists.txt -@@ -59,6 +59,7 @@ include_directories( - if (libssh_threads_SRCS) - set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL) - -+ if (NOT WITH_STATIC_LIB) - add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS}) - - target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES}) -@@ -89,7 +90,7 @@ if (libssh_threads_SRCS) - COMPONENT libraries - ) - -- if (WITH_STATIC_LIB) -+ else (WITH_STATIC_LIB) - add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS}) - - if (MSVC) diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index e137f823f..5a87be14b 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -4,18 +4,18 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "WindowsStore not supported") endif() -set(VERSION 0.7.6) +set(VERSION 0.9.0) vcpkg_download_distfile(ARCHIVE - URLS "https://www.libssh.org/files/0.7/libssh-${VERSION}.tar.xz" + URLS "https://www.libssh.org/files/0.9/libssh-${VERSION}.tar.xz" FILENAME "libssh-${VERSION}.tar.xz" - SHA512 2a01402b5a9fab9ecc29200544ed45d3f2c40871ed1c8241ca793f8dc7fdb3ad2150f6a522c4321affa9b8778e280dc7ed10f76adfc4a73f0751ae735a42f56c + SHA512 8c91b31e49652d93c295ca62c2ff1ae30f26c263195a8bc2390e44f6e688959507f609125d342ee8180fc03cec2d73258ac72f864696281b53ba9ad244060865 ) -vcpkg_download_distfile(WINPATCH - URLS "https://bugs.libssh.org/rLIBSSHf81ca6161223e3566ce78a427571235fb6848fe9?diff=1" - FILENAME "libssh-f81ca616.patch" - SHA512 f3f6088f8f1bf8fe6226c1aa7b355d877be7f2aa9482c5e3de74b6a35fc5b28d8f89221d3afa5a5d3a5900519a86e5906516667ed22ad98f058616a8120999cd -) +#vcpkg_download_distfile(WINPATCH +# URLS "https://bugs.libssh.org/rLIBSSHf81ca6161223e3566ce78a427571235fb6848fe9?diff=1" +# FILENAME "libssh-f81ca616.patch" +# SHA512 f3f6088f8f1bf8fe6226c1aa7b355d877be7f2aa9482c5e3de74b6a35fc5b28d8f89221d3afa5a5d3a5900519a86e5906516667ed22ad98f058616a8120999cd +#) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH @@ -23,10 +23,7 @@ vcpkg_extract_source_archive_ex( REF ${VERSION} PATCHES build-one-flavor.patch - only-one-flavor-threads.patch - "${WINPATCH}" - missing-includes.patch - fix-config-cmake.patch + install-config.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB) @@ -47,19 +44,13 @@ vcpkg_configure_cmake( -DWITH_NACL=OFF -DWITH_GSSAPI=OFF -DWITH_ZLIB=${WITH_ZLIB} - -DCMAKE_INSTALL_DIR=share/libssh + "-DCMAKE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share" ) vcpkg_install_cmake() vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) - endif() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) - endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(READ ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h _contents) @@ -67,7 +58,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(WRITE ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h "${_contents}") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) +if(VCPKG_TARGET_IS_WINDOWS) + file(READ ${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake _contents) + string(REPLACE ".dll" ".lib" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake "${_contents}") +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # The installed cmake config files are nonfunctional (0.7.5) diff --git a/ports/libssh/usage b/ports/libssh/usage index 3681ac112..acb7e822c 100644 --- a/ports/libssh/usage +++ b/ports/libssh/usage @@ -2,4 +2,4 @@ The package libssh is compatible with built-in CMake targets: find_package(libssh CONFIG REQUIRED) target_link_libraries(main PRIVATE ${LIBSSH_LIBRARIES}) - target_include_directories(main PRIVATE ${LIBSSH_INCLUDE_DIRS}) + target_include_directories(main PRIVATE ${LIBSSH_INCLUDE_DIR}) diff --git a/ports/libwebsockets/CMakeLists.patch b/ports/libwebsockets/CMakeLists.patch new file mode 100644 index 000000000..c2263f709 --- /dev/null +++ b/ports/libwebsockets/CMakeLists.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4daeec85e..34e5e197d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1822,7 +1822,7 @@ endif() + if (WINCE) + list(APPEND LIB_LIST ws2.lib) + elseif (WIN32) +- list(APPEND LIB_LIST ws2_32.lib userenv.lib psapi.lib iphlpapi.lib) ++ list(APPEND LIB_LIST ws2_32.lib userenv.lib psapi.lib iphlpapi.lib crypt32.lib) + endif() + + if (${CMAKE_SYSTEM_NAME} MATCHES "QNX") diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index 66a4af024..cadb53873 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,5 +1,5 @@ Source: libwebsockets -Version: 3.2.0 +Version: 3.2.0-2 Build-Depends: zlib, openssl Homepage: https://github.com/warmcat/libwebsockets Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server. diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index 6f00115eb..8a9000468 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -6,11 +6,130 @@ vcpkg_from_github( REF v3.2.0 SHA512 afc1c9e259d6d48000b09da111af4129680d50474cdfedbad197ee22260d57a837b67cc6a3f8e6b1aa7ce7dc5d3fd900569783631540501709868125c6d1e4da HEAD_REF master + PATCHES + CMakeLists.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LWS_WITH_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LWS_WITH_SHARED) +## All LWS options could be possible features: +# # +# # Major individual features +# # +# option(LWS_WITH_NETWORK "Compile with network-related code" ON) +# option(LWS_ROLE_H1 "Compile with support for http/1 (needed for ws)" ON) +# option(LWS_ROLE_WS "Compile with support for websockets" ON) +# option(LWS_ROLE_DBUS "Compile with support for DBUS" OFF) +# option(LWS_ROLE_RAW_PROXY "Raw packet proxy" OFF) +# option(LWS_WITH_HTTP2 "Compile with server support for HTTP/2" ON) +# option(LWS_WITH_LWSWS "Libwebsockets Webserver" OFF) +# option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF) +# option(LWS_IPV6 "Compile with support for ipv6" OFF) +# option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" OFF) +# option(LWS_WITH_PLUGINS "Support plugins for protocols and extensions" OFF) +# option(LWS_WITH_HTTP_PROXY "Support for HTTP proxying" OFF) +# option(LWS_WITH_ZIP_FOPS "Support serving pre-zipped files" OFF) +# option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF) +# option(LWS_WITH_GENERIC_SESSIONS "With the Generic Sessions plugin" OFF) +# option(LWS_WITH_PEER_LIMITS "Track peers and restrict resources a single peer can allocate" OFF) +# option(LWS_WITH_ACCESS_LOG "Support generating Apache-compatible access logs" OFF) +# option(LWS_WITH_RANGES "Support http ranges (RFC7233)" OFF) +# option(LWS_WITH_SERVER_STATUS "Support json + jscript server monitoring" OFF) +# option(LWS_WITH_THREADPOOL "Managed worker thread pool support (relies on pthreads)" OFF) +# option(LWS_WITH_HTTP_STREAM_COMPRESSION "Support HTTP stream compression" OFF) +# option(LWS_WITH_HTTP_BROTLI "Also offer brotli http stream compression (requires LWS_WITH_HTTP_STREAM_COMPRESSION)" OFF) +# option(LWS_WITH_ACME "Enable support for ACME automatic cert acquisition + maintenance (letsencrypt etc)" OFF) +# option(LWS_WITH_HUBBUB "Enable libhubbub rewriting support" OFF) +# option(LWS_WITH_FTS "Full Text Search support" OFF) +# # +# # TLS library options... all except mbedTLS are basically OpenSSL variants. +# # +# option(LWS_WITH_SSL "Include SSL support (defaults to OpenSSL or similar, mbedTLS if LWS_WITH_MBEDTLS is set)" ON) +# option(LWS_WITH_MBEDTLS "Use mbedTLS (>=2.0) replacement for OpenSSL. When setting this, you also may need to specify LWS_MBEDTLS_LIBRARIES and LWS_MBEDTLS_INCLUDE_DIRS" OFF) +# option(LWS_WITH_BORINGSSL "Use BoringSSL replacement for OpenSSL" OFF) +# option(LWS_WITH_CYASSL "Use CyaSSL replacement for OpenSSL. When setting this, you also need to specify LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS" OFF) +# option(LWS_WITH_WOLFSSL "Use wolfSSL replacement for OpenSSL. When setting this, you also need to specify LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS" OFF) +# option(LWS_SSL_CLIENT_USE_OS_CA_CERTS "SSL support should make use of the OS-installed CA root certs" ON) +# # +# # Event library options (may select multiple, or none for default poll() +# # +# option(LWS_WITH_LIBEV "Compile with support for libev" OFF) +# option(LWS_WITH_LIBUV "Compile with support for libuv" OFF) +# option(LWS_WITH_LIBEVENT "Compile with support for libevent" OFF) +# # +# # Static / Dynamic build options +# # +# option(LWS_WITH_STATIC "Build the static version of the library" ON) +# option(LWS_WITH_SHARED "Build the shared version of the library" ON) +# option(LWS_LINK_TESTAPPS_DYNAMIC "Link the test apps to the shared version of the library. Default is to link statically" OFF) +# option(LWS_STATIC_PIC "Build the static version of the library with position-independent code" OFF) +# # +# # Specific platforms +# # +# option(LWS_WITH_ESP32 "Build for ESP32" OFF) +# option(LWS_WITH_ESP32_HELPER "Build ESP32 helper" OFF) +# option(LWS_PLAT_OPTEE "Build for OPTEE" OFF) +# # +# # Client / Server / Test Apps build control +# # +# option(LWS_WITHOUT_CLIENT "Don't build the client part of the library" OFF) +# option(LWS_WITHOUT_SERVER "Don't build the server part of the library" OFF) +# option(LWS_WITHOUT_TESTAPPS "Don't build the libwebsocket-test-apps" OFF) +# option(LWS_WITHOUT_TEST_SERVER "Don't build the test server" OFF) +# option(LWS_WITHOUT_TEST_SERVER_EXTPOLL "Don't build the test server version that uses external poll" OFF) +# option(LWS_WITHOUT_TEST_PING "Don't build the ping test application" OFF) +# option(LWS_WITHOUT_TEST_CLIENT "Don't build the client test application" OFF) +# # +# # Extensions (permessage-deflate) +# # +# option(LWS_WITHOUT_EXTENSIONS "Don't compile with extensions" ON) +# # +# # Helpers + misc +# # +# option(LWS_WITHOUT_BUILTIN_GETIFADDRS "Don't use the BSD getifaddrs implementation from libwebsockets if it is missing (this will result in a compilation error) ... The default is to assume that your libc provides it. On some systems such as uclibc it doesn't exist." OFF) +# option(LWS_FALLBACK_GETHOSTBYNAME "Also try to do dns resolution using gethostbyname if getaddrinfo fails" OFF) +# option(LWS_WITHOUT_BUILTIN_SHA1 "Don't build the lws sha-1 (eg, because openssl will provide it" OFF) +# option(LWS_WITH_LATENCY "Build latency measuring code into the library" OFF) +# option(LWS_WITHOUT_DAEMONIZE "Don't build the daemonization api" ON) +# option(LWS_SSL_SERVER_WITH_ECDH_CERT "Include SSL server use ECDH certificate" OFF) +# option(LWS_WITH_LEJP "With the Lightweight JSON Parser" ON) +# option(LWS_WITH_SQLITE3 "Require SQLITE3 support" OFF) +# option(LWS_WITH_STRUCT_JSON "Generic struct serialization to and from JSON" ON) +# option(LWS_WITH_STRUCT_SQLITE3 "Generic struct serialization to and from SQLITE3" OFF) +# option(LWS_WITH_SMTP "Provide SMTP support" OFF) +# if (WIN32 OR LWS_WITH_ESP32) +# option(LWS_WITH_DIR "Directory scanning api support" OFF) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF) +# else() +# option(LWS_WITH_DIR "Directory scanning api support" ON) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" ON) +# endif() +# option(LWS_WITH_NO_LOGS "Disable all logging from being compiled in" OFF) +# option(LWS_AVOID_SIGPIPE_IGN "Android 7+ reportedly needs this" OFF) +# option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF) +# option(LWS_WITH_JOSE "JSON Web Signature / Encryption / Keys (RFC7515/6/) API" OFF) +# option(LWS_WITH_GENCRYPTO "Enable support for Generic Crypto apis independent of TLS backend" OFF) +# option(LWS_WITH_SELFTESTS "Selftests run at context creation" OFF) +# option(LWS_WITH_GCOV "Build with gcc gcov coverage instrumentation" OFF) +# option(LWS_WITH_EXPORT_LWSTARGETS "Export libwebsockets CMake targets. Disable if they conflict with an outer cmake project." ON) +# option(LWS_REPRODUCIBLE "Build libwebsockets reproducible. It removes the build user and hostname from the build" ON) +# option(LWS_WITH_MINIMAL_EXAMPLES "Also build the normally standalone minimal examples, for QA" OFF) +# option(LWS_WITH_LWSAC "lwsac Chunk Allocation api" ON) +# option(LWS_WITH_CUSTOM_HEADERS "Store and allow querying custom HTTP headers (H1 only)" ON) +# option(LWS_WITH_DISKCACHE "Hashed cache directory with lazy LRU deletion to size limit" OFF) +# option(LWS_WITH_ASAN "Build with gcc runtime sanitizer options enabled (needs libasan)" OFF) +# option(LWS_WITH_DIR "Directory scanning api support" OFF) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF) +# option(LWS_WITH_ZLIB "Include zlib support (required for extensions)" OFF) +# option(LWS_WITH_BUNDLED_ZLIB "Use bundled zlib version (Windows only)" ${LWS_WITH_BUNDLED_ZLIB_DEFAULT}) +# option(LWS_WITH_MINIZ "Use miniz instead of zlib" OFF) +# option(LWS_WITH_DEPRECATED_LWS_DLL "Migrate to lws_dll2 instead ASAP" OFF) +# option(LWS_WITH_SEQUENCER "lws_seq_t support" ON) +# option(LWS_WITH_EXTERNAL_POLL "Support external POLL integration using callback messages (not recommended)" OFF) +# option(LWS_WITH_LWS_DSH "Support lws_dsh_t Disordered Shared Heap" OFF) +## + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -21,6 +140,7 @@ vcpkg_configure_cmake( -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON -DLWS_HTTP2=ON + -DLWS_WITH_HTTP_STREAM_COMPRESSION=ON # Since zlib is already a dependency # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 ) diff --git a/ports/mosquitto/CONTROL b/ports/mosquitto/CONTROL index df10ce2d8..126fa2a72 100644 --- a/ports/mosquitto/CONTROL +++ b/ports/mosquitto/CONTROL @@ -1,5 +1,5 @@ Source: mosquitto -Version: 1.6.7 +Version: 1.6.7-1 Build-Depends: c-ares, libwebsockets, openssl, pthreads Description: Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for "machine to machine" messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino. diff --git a/ports/mosquitto/libwebsockets.patch b/ports/mosquitto/libwebsockets.patch new file mode 100644 index 000000000..647ff5d70 --- /dev/null +++ b/ports/mosquitto/libwebsockets.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 473931c8f..a8aa78e5d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,6 +45,7 @@ endif (WITH_TLS) + + option(WITH_SOCKS "Include SOCKS5 support?" ON) + if (WITH_SOCKS) ++ find_package(Libwebsockets CONFIG REQUIRED) + add_definitions("-DWITH_SOCKS") + endif (WITH_SOCKS) + diff --git a/ports/mosquitto/portfile.cmake b/ports/mosquitto/portfile.cmake index b2fe11da9..a59dd6068 100644 --- a/ports/mosquitto/portfile.cmake +++ b/ports/mosquitto/portfile.cmake @@ -1,6 +1,4 @@ -include(vcpkg_common_functions) - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) # This is a lie. mosquitto can be build staticlly it just must be implemented by vcpkg vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,6 +9,7 @@ vcpkg_from_github( PATCHES archive-dest.patch win64-cmake.patch + libwebsockets.patch ) vcpkg_configure_cmake( @@ -35,20 +34,14 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() - -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_passwd${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_passwd${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_pub${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_pub${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_rr${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_rr${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_sub${EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_sub${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_passwd${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_passwd${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_pub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_pub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_rr${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_rr${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_sub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_sub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) #if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") diff --git a/ports/nmap/CONTROL b/ports/nmap/CONTROL index 3ce86d4a9..1ed9ae5da 100644 --- a/ports/nmap/CONTROL +++ b/ports/nmap/CONTROL @@ -1,4 +1,4 @@ Source: nmap -Version: 7.70-1 +Version: 7.70-3 Build-Depends: winpcap (windows), libpcap (!windows), lua, openssl, python2 (windows), libssh2, zlib, pcre Description: A library for scanning network ports. diff --git a/ports/nmap/fix-msvc-prj.patch b/ports/nmap/fix-msvc-prj.patch index cfb9d52ff..25893f137 100644 --- a/ports/nmap/fix-msvc-prj.patch +++ b/ports/nmap/fix-msvc-prj.patch @@ -807,7 +807,7 @@ index a3abbc6..d5e1977 100644 - liblua.lib;nsock.lib;libpcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibstat.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib -+ liblua.lib;nsock.lib;pcred.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibd.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ liblua.lib;nsock.lib;pcred.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibd.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib .\Debug\nmap.exe true ..\libssh2\win32\Release_dll;lib;..\liblua;..\libpcre;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) @@ -853,7 +853,7 @@ index a3abbc6..d5e1977 100644 + false + + -+ liblua.lib;nsock.lib;pcred.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibd.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ liblua.lib;nsock.lib;pcred.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibd.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib + .\Debug\nmap.exe + true + ..\libssh2\win32\Release_dll;lib;..\liblua\x64\Debug;..\libpcre\x64\Debug;..\nsock\x64\Debug;..\nbase\x64\Debug;..\libdnet-stripped\x64\Debug;..\libnetutil\x64\Debug;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear\x64\Debug;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) @@ -876,7 +876,7 @@ index a3abbc6..d5e1977 100644 - liblua.lib;nsock.lib;libpcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibstat.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib -+ liblua.lib;nsock.lib;pcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlib.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ liblua.lib;nsock.lib;pcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlib.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib .\Release/nmap.exe true ..\libssh2\win32\Release_dll;lib;..\liblua;..\libpcre;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) @@ -912,7 +912,7 @@ index a3abbc6..d5e1977 100644 + CompileAsCpp + + -+ liblua.lib;nsock.lib;pcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlib.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ liblua.lib;nsock.lib;pcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlib.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib + .\Release/nmap.exe + true + ..\libssh2\win32\Release_dll;lib;..\liblua\x64\Release;..\libpcre;..\nsock\x64\Release;..\nbase\x64\Release;..\libdnet-stripped\x64\Release;..\libnetutil\x64\Release;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear\x64\Release;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) @@ -1401,7 +1401,7 @@ index fc44dfa..e066b29 100644 + + + -+ nbase.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;nsock.lib;advapi32.lib;libeay32.lib;ssleay32.lib;liblua.lib ++ nbase.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;nsock.lib;advapi32.lib;libcrypto.lib;libssl.lib;liblua.lib + .\Debug\ncat.exe + true + ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblua;%(AdditionalLibraryDirectories) @@ -1449,7 +1449,7 @@ index fc44dfa..e066b29 100644 + CompileAsCpp + + -+ nsock.lib;nbase.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;advapi32.lib;libeay32.lib;ssleay32.lib ++ nsock.lib;nbase.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;advapi32.lib;libcrypto.lib;libssl.lib + .\Release/ncat.exe + true + ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) @@ -1496,7 +1496,7 @@ index fc44dfa..e066b29 100644 + CompileAsCpp + + -+ nsock.lib;nbase.lib;ws2_32.lib;IPHlpAPI.Lib;advapi32.lib;libeay32.lib;ssleay32.lib;user32.lib;gdi32.lib ++ nsock.lib;nbase.lib;ws2_32.lib;IPHlpAPI.Lib;advapi32.lib;libssl.lib;libcrypto.lib;user32.lib;gdi32.lib + .\Release/ncat.exe + true + ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) @@ -1654,7 +1654,7 @@ index 57bd4ed..fa7a604 100644 + CompileAsCpp + + -+ nsock.lib;nbase.lib;libdnet-stripped.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ nsock.lib;nbase.lib;libdnet-stripped.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib + .\Debug\nping.exe + true + ..\mswin32\lib;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) @@ -1701,7 +1701,7 @@ index 57bd4ed..fa7a604 100644 + CompileAsCpp + + -+ nsock.lib;nbase.lib;libdnet-stripped.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ nsock.lib;nbase.lib;libdnet-stripped.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib + .\Release/nping.exe + true + ..\mswin32\lib;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) diff --git a/ports/nmap/portfile.cmake b/ports/nmap/portfile.cmake index 3554fb9ad..8a8d5f843 100644 --- a/ports/nmap/portfile.cmake +++ b/ports/nmap/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - # nmap is a tools, so ignor POST_CHECK SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) @@ -59,11 +57,13 @@ if(VCPKG_TARGET_IS_WINDOWS) DESTINATION ${CURRENT_PACKAGES_DIR}/tools) endif() else() + set(ENV{LDFLAGS} "$ENV{LDFLAGS} -pthread") foreach(BUILD_TYPE rel dbg) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}) file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}) # Since nmap makefile has strong relationshop with codes, copy codes to obj path vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}) + endforeach() set(OPTIONS --without-nmap-update --with-openssl=${CURRENT_INSTALLED_DIR} --with-libssh2=${CURRENT_INSTALLED_DIR} --with-libz=${CURRENT_INSTALLED_DIR} --with-libpcre=${CURRENT_INSTALLED_DIR}) message(STATUS "Building Options: ${OPTIONS}") @@ -71,6 +71,7 @@ else() if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL Release) message(STATUS "Configuring ${TARGET_TRIPLET}-rel") set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/nmap-7.70) + vcpkg_execute_required_process( COMMAND "./configure" ${OPTIONS} WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} @@ -91,6 +92,7 @@ else() if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL Debug) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/nmap-7.70) + vcpkg_execute_required_process( COMMAND "./configure" ${OPTIONS} WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} diff --git a/ports/openssl-unix/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt index f9d94b1a2..c3203cb91 100644 --- a/ports/openssl-unix/CMakeLists.txt +++ b/ports/openssl-unix/CMakeLists.txt @@ -8,8 +8,8 @@ endif() if(CMAKE_SYSTEM_NAME STREQUAL "Android") set(PLATFORM android) elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") - set(PLATFORM linux-generic64) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(PLATFORM linux-x86_64) else() set(PLATFORM linux-generic32) endif() @@ -119,7 +119,6 @@ add_custom_command( ${SHARED} enable-static-engine no-ssl2 - no-krb5 no-idea no-bf no-cast @@ -134,20 +133,13 @@ add_custom_command( WORKING_DIRECTORY "${BUILDDIR}" ) -add_custom_target(depend - COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" - COMMAND "${MAKE}" links # depend MAKEDEPPROG=${CMAKE_C_COMPILER} - VERBATIM - WORKING_DIRECTORY "${BUILDDIR}" - DEPENDS "${BUILDDIR}/Makefile" -) add_custom_target(build_libs ALL COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h" COMMAND "${MAKE}" build_libs VERBATIM WORKING_DIRECTORY "${BUILDDIR}" - DEPENDS depend + DEPENDS "${BUILDDIR}/Makefile" BYPRODUCTS ${INSTALL_LIBS} ) diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL index 873046ca8..b2a55c187 100644 --- a/ports/openssl-unix/CONTROL +++ b/ports/openssl-unix/CONTROL @@ -1,3 +1,3 @@ Source: openssl-unix -Version: 1.0.2s-1 +Version: 1.1.1d-1 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-unix/portfile.cmake b/ports/openssl-unix/portfile.cmake index a5915f1b9..1c1bbae0c 100644 --- a/ports/openssl-unix/portfile.cmake +++ b/ports/openssl-unix/portfile.cmake @@ -13,22 +13,18 @@ endif() vcpkg_find_acquire_program(PERL) -set(OPENSSL_VERSION 1.0.2s) +set(OPENSSL_VERSION 1.1.1d) vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE - URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 9f745452c4f777df694158e95003cde78a2cf8199bc481a563ec36644664c3c1415a774779b9791dd18f2aeb57fa1721cb52b3db12d025955e970071d5b66d2a + SHA512 2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH MASTER_COPY_SOURCE_PATH ARCHIVE ${OPENSSL_SOURCE_ARCHIVE} REF ${OPENSSL_VERSION} - PATCHES - ConfigureIncludeQuotesFix.patch - STRINGIFYPatch.patch - EmbedSymbolsInStaticLibsZ7.patch ) if(CMAKE_HOST_WIN32) diff --git a/ports/openssl-unix/vcpkg-cmake-wrapper.cmake b/ports/openssl-unix/vcpkg-cmake-wrapper.cmake index 82313bdab..044bc7b79 100644 --- a/ports/openssl-unix/vcpkg-cmake-wrapper.cmake +++ b/ports/openssl-unix/vcpkg-cmake-wrapper.cmake @@ -7,4 +7,12 @@ if(OPENSSL_FOUND) set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") endif() endif() + find_package(Threads REQUIRED) + find_package(ZLIB REQUIRED) + list(APPEND OPENSSL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + list(APPEND OPENSSL_LIBRARIES ${ZLIB_LIBRARIES}) + target_link_libraries(OpenSSL::Crypto INTERFACE Threads::Threads) + target_link_libraries(OpenSSL::SSL INTERFACE Threads::Threads) + target_link_libraries(OpenSSL::Crypto INTERFACE ZLIB::ZLIB) + target_link_libraries(OpenSSL::SSL INTERFACE ZLIB::ZLIB) endif() diff --git a/ports/openssl-uwp/CONTROL b/ports/openssl-uwp/CONTROL index c11c10124..7327b57b1 100644 --- a/ports/openssl-uwp/CONTROL +++ b/ports/openssl-uwp/CONTROL @@ -1,3 +1,3 @@ Source: openssl-uwp -Version: 1.0.2r-1 +Version: 1.1.1d Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-uwp/EnableUWPSupport.patch b/ports/openssl-uwp/EnableUWPSupport.patch new file mode 100644 index 000000000..8ec26a6de --- /dev/null +++ b/ports/openssl-uwp/EnableUWPSupport.patch @@ -0,0 +1,175 @@ +diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf +index 3c4299d264..99fcb1f713 100644 +--- a/Configurations/10-main.conf ++++ b/Configurations/10-main.conf +@@ -1287,7 +1287,7 @@ my %targets = ( + }, + "VC-WIN64I" => { + inherit_from => [ "VC-WIN64-common", asm("ia64_asm"), +- sub { $disabled{shared} ? () : "ia64_uplink" } ], ++ sub { $disabled{uplink} ? () : "ia64_uplink" } ], + AS => "ias", + ASFLAGS => "-d debug", + asoutflag => "-o ", +@@ -1299,7 +1299,7 @@ my %targets = ( + }, + "VC-WIN64A" => { + inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), +- sub { $disabled{shared} ? () : "x86_64_uplink" } ], ++ sub { $disabled{uplink} ? () : "x86_64_uplink" } ], + AS => sub { vc_win64a_info()->{AS} }, + ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} }, + asoutflag => sub { vc_win64a_info()->{asoutflag} }, +@@ -1312,7 +1312,7 @@ my %targets = ( + }, + "VC-WIN32" => { + inherit_from => [ "VC-noCE-common", asm("x86_asm"), +- sub { $disabled{shared} ? () : "uplink_common" } ], ++ sub { $disabled{uplink} ? () : "uplink_common" } ], + CFLAGS => add("/WX"), + AS => sub { vc_win32_info()->{AS} }, + ASFLAGS => sub { vc_win32_info()->{ASFLAGS} }, +@@ -1375,7 +1375,7 @@ my %targets = ( + #### MinGW + "mingw" => { + inherit_from => [ "BASE_unix", asm("x86_asm"), +- sub { $disabled{shared} ? () : "x86_uplink" } ], ++ sub { $disabled{uplink} ? () : "x86_uplink" } ], + CC => "gcc", + CFLAGS => picker(default => "-Wall", + debug => "-g -O0", +diff --git a/Configurations/50-win-onecore.conf b/Configurations/50-win-onecore.conf +index d478f42b0f..e0fb70daca 100644 +--- a/Configurations/50-win-onecore.conf ++++ b/Configurations/50-win-onecore.conf +@@ -1,3 +1,4 @@ ++## -*- mode: perl; -*- + # Windows OneCore targets. + # + # OneCore is new API stability "contract" that transcends Desktop, IoT and +@@ -10,6 +11,25 @@ + # TODO: extend error handling to use ETW based eventing + # (Or rework whole error messaging) + ++my $UWP_info = {}; ++sub UWP_info { ++ unless (%$UWP_info) { ++ my $SDKver = `powershell -Command \"& {\$(Get-Item \\\"hklm:\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\\").GetValue(\\\"CurrentVersion\\\")}\"`; ++ $SDKver =~ s|\R$||; ++ my @SDKver_split = split(/\./, $SDKver); ++ # SDK version older than 10.0.17763 don't support our ASM builds ++ if ($SDKver_split[0] < 10 ++ || ($SDKver_split[0] == 10 ++ && $SDKver_split[1] == 0 ++ && $SDKver_split[2] < 17763)) { ++ $UWP_info->{disable} = [ 'asm' ]; ++ } else { ++ $UWP_info->{disable} = [ ]; ++ } ++ } ++ return $UWP_info; ++} ++ + my %targets = ( + "VC-WIN32-ONECORE" => { + inherit_from => [ "VC-WIN32" ], +@@ -61,4 +81,57 @@ my %targets = ( + ex_libs => "onecore.lib", + multilib => "-arm64", + }, ++ ++ # Universal Windows Platform (UWP) App Support ++ ++ # TODO ++ # ++ # The 'disable' attribute should have 'uplink'. ++ # however, these are checked in some 'inherit_from', which is processed ++ # very early, before the 'disable' attributes are seen. ++ # This is a problem that needs to be resolved in Configure first. ++ # ++ # But if you want to build library with Windows 10 Version 1809 SDK or ++ # earlier, the 'disable' attribute should also have 'asm'. ++ ++ "VC-WIN32-UWP" => { ++ inherit_from => [ "VC-WIN32-ONECORE" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN64A-UWP" => { ++ inherit_from => [ "VC-WIN64A-ONECORE" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN32-ARM-UWP" => { ++ inherit_from => [ "VC-WIN32-ARM" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN64-ARM-UWP" => { ++ inherit_from => [ "VC-WIN64-ARM" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, + ); +diff --git a/Configure b/Configure +index 5a699836f3..de45f1e299 100755 +--- a/Configure ++++ b/Configure +@@ -1,4 +1,5 @@ + #! /usr/bin/env perl ++#! /usr/bin/env perl + # -*- mode: perl; -*- + # Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. + # +@@ -407,6 +408,7 @@ my @disablables = ( + "ubsan", + "ui-console", + "unit-test", ++ "uplink", + "whirlpool", + "weak-ssl-ciphers", + "zlib", +@@ -479,7 +481,7 @@ my @disable_cascades = ( + + # Without position independent code, there can be no shared libraries or DSOs + "pic" => [ "shared" ], +- "shared" => [ "dynamic-engine" ], ++ "shared" => [ "dynamic-engine", "uplink" ], + "engine" => [ "afalgeng", "devcryptoeng" ], + + # no-autoalginit is only useful when building non-shared +diff --git a/INSTALL b/INSTALL +index 2119cbae9e..ee54e8c215 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -560,6 +560,10 @@ + likely to complement configuration command line with + suitable compiler-specific option. + ++ no-uplink ++ Don't build support for UPLINK interface. ++ ++ + no- + Don't build support for negotiating the specified SSL/TLS + protocol (one of ssl, ssl3, tls, tls1, tls1_1, tls1_2, diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index 0a80bc326..c11763ee6 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -30,63 +30,166 @@ get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/openssl - REF OpenSSL_1_0_2r_WinRT - SHA512 3045693fca4b042b69675f6164d8cc82106582cf31081d65a0adbd528f04e77fa48b3761f3be7bdf8ab962a093b28fec0ae6d7da02058f2b049f79b784c39c2e - HEAD_REF master - PATCHES - fix-uwp-configure-unicode.patch +set(OPENSSL_VERSION 1.1.1d) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" + FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" + SHA512 2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7 ) -file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll) -file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll) -file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll) - -file( - COPY ${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat - DESTINATION ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + EnableUWPSupport.patch ) -message(STATUS "Build ${TARGET_TRIPLET}") -vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM} - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME make-openssl-${TARGET_TRIPLET} -) -message(STATUS "Build ${TARGET_TRIPLET} done") +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") -file( - COPY ${SOURCE_PATH}/inc32/openssl - DESTINATION ${CURRENT_PACKAGES_DIR}/include +vcpkg_find_acquire_program(JOM) + +set(CONFIGURE_COMMAND ${PERL} Configure + enable-static-engine + enable-capieng + no-unit-test + no-ssl2 + no-asm + no-uplink + -utf-8 + shared ) -file(INSTALL - ${SOURCE_PATH}/out32dll/libeay32.dll - ${SOURCE_PATH}/out32dll/libeay32.pdb - ${SOURCE_PATH}/out32dll/ssleay32.dll - ${SOURCE_PATH}/out32dll/ssleay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(OPENSSL_ARCH VC-WIN32-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPENSSL_ARCH VC-WIN64A-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPENSSL_ARCH VC-WIN32-ARM-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPENSSL_ARCH VC-WIN64-ARM-UWP) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() -file(INSTALL - ${SOURCE_PATH}/out32dll/libeay32.lib - ${SOURCE_PATH}/out32dll/ssleay32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +set(OPENSSL_MAKEFILE "makefile") -file(INSTALL - ${SOURCE_PATH}/out32dll/libeay32.dll - ${SOURCE_PATH}/out32dll/libeay32.pdb - ${SOURCE_PATH}/out32dll/ssleay32.dll - ${SOURCE_PATH}/out32dll/ssleay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -file(INSTALL - ${SOURCE_PATH}/out32dll/libeay32.lib - ${SOURCE_PATH}/out32dll/ssleay32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + + # Copy openssl sources. + message(STATUS "Copying openssl release source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + endforeach() + message(STATUS "Copying openssl release source files... done") + set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) + + message(STATUS "Configure ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel + ) + message(STATUS "Configure ${TARGET_TRIPLET}-rel done") + + message(STATUS "Build ${TARGET_TRIPLET}-rel") + # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. + # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. + make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} build_libs + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install_dev + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME build-${TARGET_TRIPLET}-rel-1) + + message(STATUS "Build ${TARGET_TRIPLET}-rel done") +endif() + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Copy openssl sources. + message(STATUS "Copying openssl debug source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + endforeach() + message(STATUS "Copying openssl debug source files... done") + set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) + + message(STATUS "Configure ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg + ) + message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Build ${TARGET_TRIPLET}-dbg") + make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} build_libs + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install_dev + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME build-${TARGET_TRIPLET}-dbg-1) + + message(STATUS "Build ${TARGET_TRIPLET}-dbg done") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/certs) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/private) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/engines-1_1) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/certs) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/private) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + + +file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf + ${CURRENT_PACKAGES_DIR}/openssl.cnf + ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf + ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist + ${CURRENT_PACKAGES_DIR}/openssl.cnf.dist + ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf + ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist +) + + +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) +string(REPLACE "" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") + +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents) +string(REPLACE "# include " "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}") + +vcpkg_copy_pdbs() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) diff --git a/ports/openssl-windows/CONTROL b/ports/openssl-windows/CONTROL index eb1d910c8..18f2afc5e 100644 --- a/ports/openssl-windows/CONTROL +++ b/ports/openssl-windows/CONTROL @@ -1,3 +1,3 @@ Source: openssl-windows -Version: 1.0.2s-2 +Version: 1.1.1d Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake index 22dfe8274..f8319d2fd 100644 --- a/ports/openssl-windows/portfile.cmake +++ b/ports/openssl-windows/portfile.cmake @@ -12,26 +12,20 @@ endif() vcpkg_find_acquire_program(PERL) -set(OPENSSL_VERSION 1.0.2s) +set(OPENSSL_VERSION 1.1.1d) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") vcpkg_download_distfile(ARCHIVE - URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 9f745452c4f777df694158e95003cde78a2cf8199bc481a563ec36644664c3c1415a774779b9791dd18f2aeb57fa1721cb52b3db12d025955e970071d5b66d2a + SHA512 2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - PATCHES - ConfigureIncludeQuotesFix.patch - STRINGIFYPatch.patch - EnableWinARM32.patch - EmbedSymbolsInStaticLibsZ7.patch - EnableWinARM64.patch ) vcpkg_find_acquire_program(NASM) @@ -40,42 +34,32 @@ set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") vcpkg_find_acquire_program(JOM) +set(OPENSSL_SHARED no-shared) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPENSSL_SHARED shared) +endif() + set(CONFIGURE_COMMAND ${PERL} Configure enable-static-engine enable-capieng no-ssl2 -utf-8 + ${OPENSSL_SHARED} ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(OPENSSL_ARCH VC-WIN32) - set(OPENSSL_DO "ms\\do_nasm.bat") elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(OPENSSL_ARCH VC-WIN64A) - set(OPENSSL_DO "ms\\do_win64a.bat") elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(OPENSSL_ARCH VC-WIN32) - set(OPENSSL_DO "ms\\do_ms.bat") - set(CONFIGURE_COMMAND ${CONFIGURE_COMMAND} - no-asm - -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE - ) + set(OPENSSL_ARCH VC-WIN32-ARM) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(OPENSSL_ARCH VC-WIN32) - set(OPENSSL_DO "ms\\do_ms.bat") - set(CONFIGURE_COMMAND ${CONFIGURE_COMMAND} - no-asm - -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE - ) + set(OPENSSL_ARCH VC-WIN64-ARM) else() message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(OPENSSL_MAKEFILE "ms\\ntdll.mak") -else() - set(OPENSSL_MAKEFILE "ms\\nt.mak") -endif() +set(OPENSSL_MAKEFILE "makefile") file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) @@ -99,11 +83,6 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel ) - vcpkg_execute_required_process( - COMMAND ${OPENSSL_DO} - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel - ) message(STATUS "Configure ${TARGET_TRIPLET}-rel done") message(STATUS "Build ${TARGET_TRIPLET}-rel") @@ -143,11 +122,6 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg ) - vcpkg_execute_required_process( - COMMAND ${OPENSSL_DO} - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg - ) message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") message(STATUS "Build ${TARGET_TRIPLET}-dbg") @@ -166,11 +140,25 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Build ${TARGET_TRIPLET}-dbg done") endif() - +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/certs) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/private) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/engines-1_1) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/certs) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/private) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + + file(REMOVE + ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf + ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist + ${CURRENT_PACKAGES_DIR}/openssl.cnf.dist ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf + ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist ) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openssl/) diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL index d3e48fa42..d105decf5 100644 --- a/ports/pdal/CONTROL +++ b/ports/pdal/CONTROL @@ -1,4 +1,4 @@ Source: pdal -Version: 1.7.1-7 +Version: 1.7.1-8 Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data. Build-Depends: gdal, geos, jsoncpp, libgeotiff, laszip, boost-system, boost-filesystem diff --git a/ports/pdal/libpq.patch b/ports/pdal/libpq.patch new file mode 100644 index 000000000..3aac2188c --- /dev/null +++ b/ports/pdal/libpq.patch @@ -0,0 +1,33 @@ +diff --git a/cmake/postgres.cmake b/cmake/postgres.cmake +index 0dad71069..32fdae2f8 100644 +--- a/cmake/postgres.cmake ++++ b/cmake/postgres.cmake +@@ -7,3 +7,27 @@ find_package(PostgreSQL REQUIRED) + mark_as_advanced(CLEAR POSTGRESQL_INCLUDE_DIR) + mark_as_advanced(CLEAR POSTGRESQL_LIBRARIES) + include_directories(${POSTGRESQL_INCLUDE_DIR}) ++ ++include(SelectLibraryConfigurations) ++ ++find_library(PostgreSQLCommon_LIBRARY_DEBUG ++NAMES libpgcommond pgcommond pgcommon libpgcommon ++NAMES_PER_DIR ++) ++find_library(PostgreSQLCommon_LIBRARY_RELEASE ++NAMES pgcommon libpgcommon ++NAMES_PER_DIR ++) ++select_library_configurations(PostgreSQLCommon) ++ ++find_library(PostgreSQLPort_LIBRARY_DEBUG ++NAMES pgportd libpgportd pgport libpgport ++NAMES_PER_DIR ++) ++find_library(PostgreSQLPort_LIBRARY_RELEASE ++NAMES pgport libpgport ++NAMES_PER_DIR ++) ++select_library_configurations(PostgreSQLPort) ++ ++list(APPEND POSTGRESQL_LIBRARIES ${PostgreSQLPort_LIBRARIES} ${PostgreSQLCommon_LIBRARIES}) +\ No newline at end of file diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index d9b8a0a69..ef792f3a0 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_extract_source_archive_ex( 0003-fix-copy-vendor.patch PDALConfig.patch fix-dependency.patch + libpq.patch ) file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") diff --git a/ports/qt5-base/qtdeploy.ps1 b/ports/qt5-base/qtdeploy.ps1 index 117456a14..2372801a7 100644 --- a/ports/qt5-base/qtdeploy.ps1 +++ b/ports/qt5-base/qtdeploy.ps1 @@ -44,10 +44,10 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str deployPlugins "styles" } elseif ($targetBinaryName -match "Qt5Networkd?.dll") { deployPlugins "bearer" - if (Test-Path "$binDir\libeay32.dll") + if (Test-Path "$binDir\libcrypto-1_1.dll") { - deployBinary "$targetBinaryDir" "$binDir" "libeay32.dll" - deployBinary "$targetBinaryDir" "$binDir" "ssleay32.dll" + deployBinary "$targetBinaryDir" "$binDir" "libcrypto-1_1.dll" + deployBinary "$targetBinaryDir" "$binDir" "libssl-1_1.dll" } } elseif ($targetBinaryName -match "Qt5Sqld?.dll") { deployPlugins "sqldrivers" diff --git a/ports/qt5-graphicaleffects/CONTROL b/ports/qt5-graphicaleffects/CONTROL index 12cfc4775..111dfd7b4 100644 --- a/ports/qt5-graphicaleffects/CONTROL +++ b/ports/qt5-graphicaleffects/CONTROL @@ -1,4 +1,4 @@ Source: qt5-graphicaleffects -Version: 5.12.5 +Version: 5.12.5-1 Description: Qt5 GraphicalEffects Module. Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-imageformats/portfile.cmake b/ports/qt5-imageformats/portfile.cmake index 91e83883a..f7ce7466e 100644 --- a/ports/qt5-imageformats/portfile.cmake +++ b/ports/qt5-imageformats/portfile.cmake @@ -8,7 +8,7 @@ list(APPEND CORE_OPTIONS -jasper -no-mng # must be explicitly disabled to not automatically pick up mng -verbose) - + find_library(TIFF_RELEASE NAMES tiff PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on lzma find_library(TIFF_DEBUG NAMES tiffd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) diff --git a/ports/quickfix/CONTROL b/ports/quickfix/CONTROL index 243a18fee..03989a169 100644 --- a/ports/quickfix/CONTROL +++ b/ports/quickfix/CONTROL @@ -1,5 +1,5 @@ Source: quickfix -Version: 1.15.1-1 +Version: 1.15.1-3 Build-Depends: openssl Homepage: https://github.com/quickfix/quickfix Description: QuickFIX is a free and open source implementation of the FIX protocol. diff --git a/ports/quickfix/fix_wsl_symlink_error.patch b/ports/quickfix/fix_wsl_symlink_error.patch new file mode 100644 index 000000000..ce6465a4e --- /dev/null +++ b/ports/quickfix/fix_wsl_symlink_error.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/QuickfixPrebuildSetup.cmake b/cmake/QuickfixPrebuildSetup.cmake +index 9e53126ec..1c3368fcb 100644 +--- a/cmake/QuickfixPrebuildSetup.cmake ++++ b/cmake/QuickfixPrebuildSetup.cmake +@@ -3,8 +3,9 @@ + if (NOT WIN32) + add_custom_target(QUICKFIX_HEADERS_LINK ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/include/ +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/src/C++ ${CMAKE_SOURCE_DIR}/include/quickfix ++ #COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/src/C++ ${CMAKE_SOURCE_DIR}/include/quickfix + ) ++ include_directories(${CMAKE_SOURCE_DIR}/src/C++) + else() + add_custom_target(QUICKFIX_HEADERS_COPY ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/include/ diff --git a/ports/quickfix/portfile.cmake b/ports/quickfix/portfile.cmake index e560bed94..6af17a211 100644 --- a/ports/quickfix/portfile.cmake +++ b/ports/quickfix/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( SHA512 6c3dc53f25932c9b7516ab9228f634511ae0f399719f87f0ec2b38c380c0a7d1c808f0f9a14a70a063e1956118550d1121222283a9139f23cd4f8f038f595f70 HEAD_REF master PATCHES 00001-fix-build.patch + fix_wsl_symlink_error.patch ) file(GLOB_RECURSE SRC_FILES RELATIVE ${SOURCE_PATH} diff --git a/ports/slikenet/CONTROL b/ports/slikenet/CONTROL index f43c31256..d3f350570 100644 --- a/ports/slikenet/CONTROL +++ b/ports/slikenet/CONTROL @@ -1,5 +1,5 @@ Source: slikenet -Version: 2019-10-22 +Version: 2019-10-22_1 Homepage: https://github.com/SLikeSoft/SLikeNet Description: SLikeNetT is an Open Source/Free Software cross-platform network engine written in C++ and specifially designed for games (and applications which have comparable requirements on a network engine like games) building upon the discontinued RakNet network engine which had more than 13 years of active development. Build-Depends: openssl diff --git a/ports/slikenet/portfile.cmake b/ports/slikenet/portfile.cmake index da57e055d..d1c037a2b 100644 --- a/ports/slikenet/portfile.cmake +++ b/ports/slikenet/portfile.cmake @@ -9,6 +9,8 @@ vcpkg_from_github( PATCHES fix-install.patch ) +#Uses an outdated OpenSSL version and is in an experimental namespace any way. As such we delete it here +file(REMOVE_RECURSE "${SOURCE_PATH}/Source/src/crypto" "${SOURCE_PATH}/Source/include/slikenet/crypto") if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(SLIKENET_ENABLE_STATIC TRUE) diff --git a/ports/xmlsec/CMakeLists.txt b/ports/xmlsec/CMakeLists.txt index 75b10f887..43664633a 100644 --- a/ports/xmlsec/CMakeLists.txt +++ b/ports/xmlsec/CMakeLists.txt @@ -146,7 +146,9 @@ if(INSTALL_HEADERS_TOOLS) if(BUILD_SHARED_LIBS) target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_DYNAMIC_LOADING) else() + find_package(Threads REQUIRED) target_compile_definitions(xmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC) + target_link_libraries(xmlsec PUBLIC Threads::Threads) endif() install(TARGETS xmlsec DESTINATION tools/xmlsec) endif() diff --git a/ports/xmlsec/CONTROL b/ports/xmlsec/CONTROL index 6e0dbe9b3..a4512a967 100644 --- a/ports/xmlsec/CONTROL +++ b/ports/xmlsec/CONTROL @@ -1,5 +1,5 @@ Source: xmlsec -Version: 1.2.29 +Version: 1.2.29-1 Homepage: https://www.aleksey.com/xmlsec/ Description: XML Security Library is a C library based on LibXML2. The library supports major XML security standards. Build-Depends: libxml2, openssl diff --git a/ports/yara/CMakeLists.txt b/ports/yara/CMakeLists.txt index 8b9f66113..5b01e1c3b 100644 --- a/ports/yara/CMakeLists.txt +++ b/ports/yara/CMakeLists.txt @@ -101,6 +101,9 @@ set( ${JANSSON_LIBRARY} ) +IF(CMAKE_SYSTEM_NAME MATCHES "Windows") +list(APPEND libyara_dependencies Crypt32.lib Ws2_32.lib) +endif() if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") list(APPEND libyara_dependencies m) endif() diff --git a/ports/yara/CONTROL b/ports/yara/CONTROL index 209495ea7..15095947b 100644 --- a/ports/yara/CONTROL +++ b/ports/yara/CONTROL @@ -1,5 +1,5 @@ Source: yara -Version: 3.10.0 +Version: 3.10.0-1 Homepage: https://github.com/VirusTotal/yara Description: The pattern matching swiss knife Build-Depends: openssl, jansson diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 28981aedd..64969ecb5 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -562,6 +562,8 @@ graphite2:arm-uwp=fail graphite2:x64-uwp=fail graphqlparser:arm-uwp=fail graphqlparser:x64-uwp=fail +grpc:arm-uwp=fail +grpc:x64-uwp=fail gsl:arm-uwp=fail gsl:x64-uwp=fail gsoap:arm-uwp=ignore @@ -1421,6 +1423,8 @@ quickfix:x64-linux=ignore quickfix:x64-windows=ignore quickfix:x64-windows-static=ignore quickfix:x86-windows=ignore +quickfix:x64-uwp=fail +quickfix:arm-uwp=fail quirc:arm64-windows = skip quirc:arm-uwp = skip quirc:x64-linux = skip @@ -1792,6 +1796,8 @@ xerces-c:arm64-windows=fail xerces-c:arm-uwp=fail xerces-c:x64-uwp=fail xeus:x64-linux=ignore +xmlsec:arm-uwp=fail +xmlsec:x64-uwp=fail xmsh:arm64-windows=fail xmsh:arm-uwp=fail xmsh:x64-uwp=fail