diff options
| author | Griffin Downs <grdowns@microsoft.com> | 2019-03-12 11:29:31 -0700 |
|---|---|---|
| committer | Griffin Downs <grdowns@microsoft.com> | 2019-03-12 11:29:31 -0700 |
| commit | b29b874ae9007a4450b736cabbf3cd94a4ec6359 (patch) | |
| tree | 09a031509ccb697d20dc0745bae6541bb694a2b0 | |
| parent | fe626490f0f3537fc85f47f76d5bcd16ea539dea (diff) | |
| parent | f24bd414ceeed5f4faad80405b87da4394c02d63 (diff) | |
| download | vcpkg-b29b874ae9007a4450b736cabbf3cd94a4ec6359.tar.gz vcpkg-b29b874ae9007a4450b736cabbf3cd94a4ec6359.zip | |
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/grdowns/5580
115 files changed, 2597 insertions, 329 deletions
diff --git a/docs/about/faq.md b/docs/about/faq.md index b7c9d67c8..b83674d05 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -26,7 +26,7 @@ To see an example of this, look at [`ports\opengl\portfile.cmake`](https://githu We currently target Windows Desktop (x86 and x64) as well as the Universal Windows Platform (x86, x64, and ARM). See `vcpkg help triplet` for the current list. ## Does Vcpkg run on Linux/OSX? -Yes! We continously test on OSX and Ubuntu 16.04, however we know users have been successful with Arch, Fedora, and FreeBSD. If you have trouble with your favorite Linux distribution, let us know in an issue and we'd be happy to help! +Yes! We continuously test on OSX and Ubuntu 16.04, however we know users have been successful with Arch, Fedora, and FreeBSD. If you have trouble with your favorite Linux distribution, let us know in an issue and we'd be happy to help! ## How do I use different versions of a library on one machine? Within a single instance of Vcpkg (e.g. one set of `installed\`, `packages\`, `ports\` and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). For those with experience with system-wide package managers, packages in Vcpkg correspond to the `X-dev` or `X-devel` packages. diff --git a/docs/maintainers/vcpkg_add_to_path.md b/docs/maintainers/vcpkg_add_to_path.md index 3657a5ea7..b84f6b36f 100644 --- a/docs/maintainers/vcpkg_add_to_path.md +++ b/docs/maintainers/vcpkg_add_to_path.md @@ -16,5 +16,10 @@ Prepends the directory. The default is to append. +## Examples: +* [curl][https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L75] +* [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) +* [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) + ## Source -[scripts/cmake/vcpkg_add_to_path.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_add_to_path.cmake)
+[scripts/cmake/vcpkg_add_to_path.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_add_to_path.cmake) diff --git a/docs/maintainers/vcpkg_build_msbuild.md b/docs/maintainers/vcpkg_build_msbuild.md index 862587eb4..9f458f352 100644 --- a/docs/maintainers/vcpkg_build_msbuild.md +++ b/docs/maintainers/vcpkg_build_msbuild.md @@ -1,6 +1,6 @@ # vcpkg_build_msbuild -Build an msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. +Build a msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. ## Usage ```cmake diff --git a/docs/maintainers/vcpkg_from_gitlab.md b/docs/maintainers/vcpkg_from_gitlab.md index bc312f37a..75ad95952 100644 --- a/docs/maintainers/vcpkg_from_gitlab.md +++ b/docs/maintainers/vcpkg_from_gitlab.md @@ -56,6 +56,9 @@ At least one of `REF` and `HEAD_REF` must be specified, however it is preferable This exports the `VCPKG_HEAD_VERSION` variable during head builds. +## Examples: + +* [tiny-process-library](https://github.com/Microsoft/vcpkg/blob/master/ports/tiny-process-library/portfile.cmake#L3) ## Source -[scripts/cmake/vcpkg_from_gitlab.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_gitlab.cmake)
+[scripts/cmake/vcpkg_from_gitlab.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_gitlab.cmake) diff --git a/docs/maintainers/vcpkg_install_msbuild.md b/docs/maintainers/vcpkg_install_msbuild.md index 1de68ce70..46a92ddf7 100644 --- a/docs/maintainers/vcpkg_install_msbuild.md +++ b/docs/maintainers/vcpkg_install_msbuild.md @@ -1,6 +1,6 @@ # vcpkg_install_msbuild -Build and install an msbuild-based project. This replaces `vcpkg_build_msbuild()`. +Build and install a msbuild-based project. This replaces `vcpkg_build_msbuild()`. ## Usage ```cmake diff --git a/docs/specifications/export-command.md b/docs/specifications/export-command.md index aaa95cb1c..4111bfed4 100644 --- a/docs/specifications/export-command.md +++ b/docs/specifications/export-command.md @@ -5,7 +5,7 @@ ### A. Build once and share Customers want to be able to build their set of required libraries once, and then distribute the resulting binaries to all members of the "group". This has been brought up in -- Enterprise environments, in which there are dedicated teams to acquire libraries and then share them with other team to consume them +- Enterprise environments, in which there are dedicated teams to acquire libraries and then share them with other teams to consume them - Academic environments, in which the professor/teacher wants to build the required libraries and then provide them to all the students - CI Systems, in which developers want to quickly distribute their exact set of dependencies to a cloud-based farm of build machines @@ -167,6 +167,6 @@ Alice gives to Bob: a) The links to her project and b) The zip file "vcpkg-expor ## 5. Technical model - Each exported library, must be accompanied with all of its dependencies, even if they are not explicitly specified in the `vcpkg export` command. -- When exporting a library, a dependency graph will be built, similarly to install, to figure out which packages needs to be exported. +- When exporting a library, a dependency graph will be built, similarly to install, to figure out which packages need to be exported. - It is allowed to have packages from different triplets, so users can include 32/64-bit and dynamic/static binaries in the same export. - The exported archives also include the files needed to integrate with MSBuild and/or CMake.
\ No newline at end of file diff --git a/docs/specifications/feature-packages.md b/docs/specifications/feature-packages.md index 198a602ba..81afba080 100644 --- a/docs/specifications/feature-packages.md +++ b/docs/specifications/feature-packages.md @@ -1,6 +1,6 @@ # Proposal: Features / Feature packages (Feb 23 2017)
-**Note: this is the proposal as it was initially accepted and does not neccessarily reflect the current behavior.**
+**Note: this is the proposal as it was initially accepted and does not necessarily reflect the current behavior.**
## 1. Motivation
@@ -14,7 +14,7 @@ Therefore, there is significant value in enabling users to choose whether they f The community around [OpenCV][] has built up a library of extensions called [OpenCV_contrib][]. However, these extensions are a source-level patch onto the main OpenCV codebase and therefore must be applied _during_ the core OpenCV build. Further confounding the problem, it is the author's understanding that these community extensions have only been developed with [CUDA][] enabled and cannot be built without that dependency.
-Therefore, if CUDA is disabled, OpenCV\_contrib must also be disabled. Likewise, when a user requests OpenCV\_contrib, CUDA must be enabled. It would be convienent, but not a requirement, to enable CUDA without enabling the community extensions.
+Therefore, if CUDA is disabled, OpenCV\_contrib must also be disabled. Likewise, when a user requests OpenCV\_contrib, CUDA must be enabled. It would be convenient, but not a requirement, to enable CUDA without enabling the community extensions.
Finally, these extensions add additional exports and headers which could be depended upon by other libraries. For maintainers, there must be a way to specify this requirement such that `vcpkg install mylib-depends-ocv-contrib` will verify/build/rebuild OpenCV with the community extensions enabled.
diff --git a/docs/users/integration.md b/docs/users/integration.md index 6d56c7c70..cd5f61e9d 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -139,7 +139,7 @@ You can set `VCPKG_TARGET_TRIPLET` on the configure line: ```no-highlight cmake ../my/project -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=... ``` -If you use `VCPKG_DEFAULT_TRIPLET` [environment variable](config-environment.md) to contoll the unqualified triplet in vcpkg command lines you can default `VCPKG_TARGET_TRIPLET` in CMake like [Using an environment variable instead of a command line option](#using-an-environment-variable-instead-of-a-command-line-option): +If you use `VCPKG_DEFAULT_TRIPLET` [environment variable](config-environment.md) to control the unqualified triplet in vcpkg command lines you can default `VCPKG_TARGET_TRIPLET` in CMake like [Using an environment variable instead of a command line option](#using-an-environment-variable-instead-of-a-command-line-option): ```cmake if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET) diff --git a/ports/3fd/CONTROL b/ports/3fd/CONTROL index 13f769c9c..32e1e5d07 100644 --- a/ports/3fd/CONTROL +++ b/ports/3fd/CONTROL @@ -1,4 +1,4 @@ Source: 3fd
-Version: 2.6.2
+Version: 2.6.2-1
Description: C++ Framework For Fast Development
Build-Depends: boost-lockfree (windows), boost-regex (windows), poco (windows), sqlite3, rapidxml
diff --git a/ports/3fd/DataException.patch b/ports/3fd/DataException.patch new file mode 100644 index 000000000..106411cc0 --- /dev/null +++ b/ports/3fd/DataException.patch @@ -0,0 +1,107 @@ +diff --git a/3FD/broker_impl_reader.cpp b/3FD/broker_impl_reader.cpp
+index 98bd68a..d5948b5 100644
+--- a/3FD/broker_impl_reader.cpp
++++ b/3FD/broker_impl_reader.cpp
+@@ -185,7 +185,7 @@ namespace broker
+
+ core::Logger::Write(oss.str(), core::Logger::PRIO_INFORMATION);
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ CALL_STACK_TRACE;
+ std::ostringstream oss;
+@@ -264,7 +264,7 @@ namespace broker
+
+ m_messages.reserve(msgCountStepLimit);
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ CALL_STACK_TRACE;
+ std::ostringstream oss;
+@@ -317,7 +317,7 @@ namespace broker
+ {
+ core::Logger::Write(ex, core::Logger::PRIO_CRITICAL);
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ std::ostringstream oss;
+ oss << "Failed to end transaction reading messages from broker queue. "
+@@ -520,7 +520,7 @@ namespace broker
+ m_dbSession.rollback();
+ return true;
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ std::ostringstream oss;
+ oss << "Failed to rollback transaction reading messages from broker queue. "
+@@ -563,7 +563,7 @@ namespace broker
+ m_dbSession.commit();
+ return true;
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ std::ostringstream oss;
+ oss << "Failed to commit transaction reading messages from broker queue. "
+diff --git a/3FD/broker_impl_writer.cpp b/3FD/broker_impl_writer.cpp
+index b237ba4..f9531c4 100644
+--- a/3FD/broker_impl_writer.cpp
++++ b/3FD/broker_impl_writer.cpp
+@@ -241,7 +241,7 @@ namespace broker
+
+ core::Logger::Write(oss.str(), core::Logger::PRIO_INFORMATION);
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ CALL_STACK_TRACE;
+ std::ostringstream oss;
+@@ -348,7 +348,7 @@ namespace broker
+ {
+ core::Logger::Write(ex, core::Logger::PRIO_CRITICAL);
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ std::ostringstream oss;
+ oss << "Failed to end transaction writing messages into broker queue. "
+@@ -405,7 +405,7 @@ namespace broker
+ {
+ m_future->get();
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ std::ostringstream oss;
+ oss << "Failed to write messages into broker queue. "
+@@ -455,7 +455,7 @@ namespace broker
+ m_dbSession.rollback();
+ return true;
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ std::ostringstream oss;
+ oss << "Failed to rollback transaction writing messages into broker queue. "
+@@ -498,7 +498,7 @@ namespace broker
+ m_dbSession.commit();
+ return true;
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ std::ostringstream oss;
+ oss << "Failed to commit transaction writing messages into broker queue. "
+@@ -589,7 +589,7 @@ namespace broker
+ {
+ throw; // just forward exceptions from errors known to have been already handled
+ }
+- catch (Poco::Data::DataException &ex)
++ catch (Poco::DataException &ex)
+ {
+ std::ostringstream oss;
+ oss << "Failed to write messages into broker queue. "
diff --git a/ports/3fd/portfile.cmake b/ports/3fd/portfile.cmake index 69fc60ccb..513bb9a03 100644 --- a/ports/3fd/portfile.cmake +++ b/ports/3fd/portfile.cmake @@ -31,6 +31,7 @@ vcpkg_from_github( HEAD_REF master
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/remove-seekpos.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/DataException.patch"
)
# Copy the sources to ensure a clean, out-of-source build
diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 9f8070e17..d0f1e6292 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.5.4 +Version: 6.5.4-1 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index f3dcbc6bf..105cd31aa 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -3,18 +3,24 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) + set(MPC_STATIC_FLAG -static) + set(DLL_DECORATOR s) endif() include(vcpkg_common_functions) +set(ACE_ROOT ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers) +set(ENV{ACE_ROOT} ${ACE_ROOT}) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_4/ACE-6.5.4.zip" - FILENAME ACE-6.5.4.zip - SHA512 d18248f1fcea0e4993d5ba9c62ff99883d4eaecfb0b6b88062961723c0f30ac423c9f550ada98042cd7913d2586feb2f8d47b5779403017afaa89a622613d1ae + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_4/ACE-src-6.5.4.zip" + FILENAME ACE-src-6.5.4.zip + SHA512 e699b24aa65c44137b7bdbe3c045b6c8d76c43ff4c78a05efe6d0d7fd05acdd1166b74529cc4d7ba9440b6b29cce3aa2dcc97f574c94afc05b0fef18475d6ce3 ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_PATH}) + if (TRIPLET_SYSTEM_ARCH MATCHES "arm") message(FATAL_ERROR "ARM is currently not supported.") elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86") @@ -30,10 +36,18 @@ else() endif() # Add ace/config.h file -# see http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#win32 +# see https://htmlpreview.github.io/?https://github.com/DOCGroup/ACE_TAO/blob/master/ACE/ACE-INSTALL.html file(WRITE ${SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"") + +# Invoke mwc.pl to generate the necessary solution and project files +vcpkg_execute_required_process( + COMMAND ${PERL} ${ACE_ROOT}/bin/mwc.pl -type ${SOLUTION_TYPE} ace ${MPC_STATIC_FLAG} + WORKING_DIRECTORY ${ACE_ROOT} + LOGNAME mwc +) + vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/ace_${SOLUTION_TYPE}.sln + PROJECT_PATH ${SOURCE_PATH}/ace.sln PLATFORM ${MSBUILD_PLATFORM} ) @@ -54,6 +68,7 @@ file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/ace/) install_ace_headers_subdirectory(${SOURCE_PATH} "Compression") install_ace_headers_subdirectory(${SOURCE_PATH} "Compression/rle") install_ace_headers_subdirectory(${SOURCE_PATH} "ETCL") +install_ace_headers_subdirectory(${SOURCE_PATH} "QoS") install_ace_headers_subdirectory(${SOURCE_PATH} "Monitor_Control") install_ace_headers_subdirectory(${SOURCE_PATH} "os_include") install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/arpa") @@ -63,37 +78,49 @@ install_ace_headers_subdirectory(${SOURCE_PATH} "os_include/sys") # Install the libraries function(install_ace_library SOURCE_PATH ACE_LIBRARY) - set(LIB_PATH ${SOURCE_PATH}/../lib/) - file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}d.dll - ${LIB_PATH}/${ACE_LIBRARY}d_dll.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) + set(LIB_PATH ${SOURCE_PATH}/lib/) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + # Install the DLL files + file(INSTALL + ${LIB_PATH}/${ACE_LIBRARY}d.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${LIB_PATH}/${ACE_LIBRARY}.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) - file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}.dll - ${LIB_PATH}/${ACE_LIBRARY}.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) + # Install the pdb files + file(INSTALL + ${LIB_PATH}/${ACE_LIBRARY}${DLL_DECORATOR}d_dll.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${LIB_PATH}/${ACE_LIBRARY}${DLL_DECORATOR}.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + endif() + # Install the lib files file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}d.lib + ${LIB_PATH}/${ACE_LIBRARY}${DLL_DECORATOR}d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}.lib + ${LIB_PATH}/${ACE_LIBRARY}${DLL_DECORATOR}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) endfunction() -install_ace_library(${SOURCE_PATH} "ACE") -install_ace_library(${SOURCE_PATH} "ACE_Compression") -install_ace_library(${SOURCE_PATH} "ACE_ETCL") -install_ace_library(${SOURCE_PATH} "ACE_Monitor_Control") -install_ace_library(${SOURCE_PATH} "ACE_QoS") -install_ace_library(${SOURCE_PATH} "ACE_RLECompression") +install_ace_library(${ACE_ROOT} "ACE") +install_ace_library(${ACE_ROOT} "ACE_Compression") +install_ace_library(${ACE_ROOT} "ACE_ETCL") +install_ace_library(${ACE_ROOT} "ACE_ETCL_Parser") +install_ace_library(${ACE_ROOT} "ACE_Monitor_Control") +install_ace_library(${ACE_ROOT} "ACE_QoS") +install_ace_library(${ACE_ROOT} "ACE_RLECompression") # Handle copyright -file(COPY ${SOURCE_PATH}/../COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ace) +file(COPY ${ACE_ROOT}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ace) file(RENAME ${CURRENT_PACKAGES_DIR}/share/ace/COPYING ${CURRENT_PACKAGES_DIR}/share/ace/copyright) diff --git a/ports/antlr4/CONTROL b/ports/antlr4/CONTROL index 900f2622e..4af73fb8a 100644 --- a/ports/antlr4/CONTROL +++ b/ports/antlr4/CONTROL @@ -1,3 +1,4 @@ Source: antlr4 -Version: 4.7.1-2 -Description: ANother Tool for Language Recognition
\ No newline at end of file +Version: 4.7.1-3 +Description: ANother Tool for Language Recognition +Build-Depends: libuuid (!uwp&!windows&!osx)
\ No newline at end of file diff --git a/ports/antlr4/crt_mt.patch b/ports/antlr4/crt_mt.patch deleted file mode 100644 index 22d91efc3..000000000 --- a/ports/antlr4/crt_mt.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/runtime/antlr4cpp-vs2015.vcxproj b/runtime/antlr4cpp-vs2015.vcxproj -index 85fa3da..540f031 100644 ---- a/runtime/antlr4cpp-vs2015.vcxproj -+++ b/runtime/antlr4cpp-vs2015.vcxproj -@@ -201,6 +201,7 @@ - <DisableSpecificWarnings>4251</DisableSpecificWarnings> - <MultiProcessorCompilation>true</MultiProcessorCompilation> - <MinimalRebuild>false</MinimalRebuild> -+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> -@@ -239,6 +240,7 @@ - <DisableSpecificWarnings>4251</DisableSpecificWarnings> - <MultiProcessorCompilation>true</MultiProcessorCompilation> - <MinimalRebuild>false</MinimalRebuild> -+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> -@@ -281,6 +283,7 @@ - </ForcedIncludeFiles> - <DisableSpecificWarnings>4251</DisableSpecificWarnings> - <MultiProcessorCompilation>true</MultiProcessorCompilation> -+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> -@@ -325,6 +328,7 @@ - </ForcedIncludeFiles> - <DisableSpecificWarnings>4251</DisableSpecificWarnings> - <MultiProcessorCompilation>true</MultiProcessorCompilation> -+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> diff --git a/ports/antlr4/export_guid.patch b/ports/antlr4/export_guid.patch new file mode 100644 index 000000000..a92c034db --- /dev/null +++ b/ports/antlr4/export_guid.patch @@ -0,0 +1,22 @@ +diff -urN c/runtime/src/support/guid.h d/runtime/src/support/guid.h +--- c/runtime/src/support/guid.h 2017-07-01 09:51:22.000000000 +0800 ++++ d/runtime/src/support/guid.h 2018-09-05 10:16:23.847717700 +0800 +@@ -38,7 +38,7 @@ + // 16 byte value that can be passed around by value. It also supports + // conversion to string (via the stream operator <<) and conversion from a + // string via constructor. +-class Guid ++class ANTLR4CPP_PUBLIC Guid + { + public: + +@@ -90,7 +90,7 @@ + // function would no longer be cross-platform if we parameterized the android + // version. Instead, construction of the GuidGenerator may be different on + // each platform, but the use of newGuid is uniform. +-class GuidGenerator ++class ANTLR4CPP_PUBLIC GuidGenerator + { + public: + #ifdef GUID_ANDROID +
\ No newline at end of file diff --git a/ports/antlr4/fixed_build.patch b/ports/antlr4/fixed_build.patch new file mode 100644 index 000000000..72697a388 --- /dev/null +++ b/ports/antlr4/fixed_build.patch @@ -0,0 +1,28 @@ +diff -urN a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt +--- a/runtime/CMakeLists.txt 2017-11-29 09:51:54.000000000 +0800 ++++ b/runtime/CMakeLists.txt 2018-08-30 19:06:03.718401800 +0800 +@@ -25,7 +25,7 @@ + add_library(antlr4_shared SHARED ${libantlrcpp_SRC}) + add_library(antlr4_static STATIC ${libantlrcpp_SRC}) + +-set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here. ++# set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here. + message(STATUS "Output libraries to ${LIB_OUTPUT_DIR}") + + # make sure 'make' works fine even if ${LIB_OUTPUT_DIR} is deleted. +@@ -63,10 +63,10 @@ + set(extra_share_compile_flags "-DANTLR4CPP_EXPORTS") + set(extra_static_compile_flags "-DANTLR4CPP_STATIC") + endif(WIN32) +-if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") +- target_compile_options(antlr4_shared PRIVATE "/MD$<$<CONFIG:Debug>:d>") +- target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>") +-endif() ++# if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") ++# target_compile_options(antlr4_shared PRIVATE "/MD$<$<CONFIG:Debug>:d>") ++# target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>") ++# endif() + + set(static_lib_suffix "") + if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") +
\ No newline at end of file diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake index 3663a9347..b0749e123 100644..100755 --- a/ports/antlr4/portfile.cmake +++ b/ports/antlr4/portfile.cmake @@ -7,7 +7,7 @@ include(vcpkg_common_functions) set(VERSION 4.7.1)
vcpkg_download_distfile(ARCHIVE
- URLS "http://www.antlr.org/download/antlr4-cpp-runtime-4.7.1-source.zip"
+ URLS "http://www.antlr.org/download/antlr4-cpp-runtime-${VERSION}-source.zip"
FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip"
SHA512 24d53278db56b199e6787242f22339f74e07d2cd3ed56f851ad905b110c2ba3cb001e1e2fcbc8624f0e93e00ba1fe1b23630dd1a736558c694655aeb1c3129da
)
@@ -15,7 +15,7 @@ vcpkg_download_distfile(ARCHIVE # license not exist in antlr folder.
vcpkg_download_distfile(LICENSE
URLS https://raw.githubusercontent.com/antlr/antlr4/${VERSION}/LICENSE.txt
- FILENAME "antlr4-copyright_${VERSION}"
+ FILENAME "antlr4-copyright-${VERSION}"
SHA512 1e8414de5fdc211e3188a8ec3276c6b3c55235f5edaf48522045ae18fa79fd9049719cb8924d25145016f223ac9a178defada1eeb983ccff598a08b0c0f67a3b
)
@@ -23,59 +23,71 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
NO_REMOVE_ONE_LEVEL
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/crt_mt.patch
+ REF ${VERSION}
+ PATCHES fixed_build.patch
+ uuid_discovery_fix.patch
+ export_guid.patch
)
-if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- set(DEBUG_CONFIG "Debug Static")
- set(RELEASE_CONFIG "Release Static")
-else()
- set(DEBUG_CONFIG "Debug DLL")
- set(RELEASE_CONFIG "Release DLL")
-endif()
-
-vcpkg_build_msbuild(
- PROJECT_PATH ${SOURCE_PATH}/runtime/antlr4cpp-vs2015.vcxproj
- DEBUG_CONFIGURATION ${DEBUG_CONFIG}
- RELEASE_CONFIGURATION ${RELEASE_CONFIG}
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/dist
+ OPTIONS_RELEASE -DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/dist
)
-file (MAKE_DIRECTORY
- ${CURRENT_PACKAGES_DIR}/include)
-FILE(COPY ${SOURCE_PATH}/runtime/src/
- DESTINATION ${CURRENT_PACKAGES_DIR}/include
- FILES_MATCHING PATTERN "*.h")
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc
+ ${CURRENT_PACKAGES_DIR}/debug/share
+ ${CURRENT_PACKAGES_DIR}/debug/include
+)
-file (MAKE_DIRECTORY
- ${CURRENT_PACKAGES_DIR}/lib
- ${CURRENT_PACKAGES_DIR}/debug/lib)
+if (NOT VCPKG_CMAKE_SYSTEM_NAME)
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime-static.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime-static.lib
+ )
-file(COPY ${SOURCE_PATH}/runtime/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-file(COPY ${SOURCE_PATH}/runtime/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.dll ${CURRENT_PACKAGES_DIR}/bin/antlr4-runtime.dll)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.dll ${CURRENT_PACKAGES_DIR}/debug/bin/antlr4-runtime.dll)
+ else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.lib
+ ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.dll
+ ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.dll
+ )
-if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/static.patch
- )
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime-static.lib ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime-static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.lib)
+ endif()
else()
- file (MAKE_DIRECTORY
- ${CURRENT_PACKAGES_DIR}/bin
- ${CURRENT_PACKAGES_DIR}/debug/bin)
-
- file(COPY
- ${SOURCE_PATH}/runtime/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.dll
- ${SOURCE_PATH}/runtime/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(COPY
- ${SOURCE_PATH}/runtime/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.dll
- ${SOURCE_PATH}/runtime/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.a
+ ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.a
+ )
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.so
+ ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.so.${VERSION}
+ ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.so
+ ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.so.${VERSION}
+ )
+ else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.dylib
+ ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.${VERSION}.dylib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.dylib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.${VERSION}.dylib
+ )
+ endif()
endif()
+file(GLOB HDRS LIST_DIRECTORIES true ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime/*)
+file(COPY ${HDRS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime)
+
+vcpkg_copy_pdbs()
+
file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/antlr4 RENAME copyright)
-message(STATUS "Installing done")
-#
\ No newline at end of file +message(STATUS "Installing done")
\ No newline at end of file diff --git a/ports/antlr4/static.patch b/ports/antlr4/static.patch deleted file mode 100644 index e66787233..000000000 --- a/ports/antlr4/static.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/antlr4-common.h b/antlr4-common.h -index ce45e9e..3162795 100644 ---- a/antlr4-common.h -+++ b/antlr4-common.h -@@ -48,6 +48,7 @@ - #endif - - #define GUID_WINDOWS -+ #define ANTLR4CPP_STATIC - - #ifdef _WIN64 - typedef __int64 ssize_t; diff --git a/ports/antlr4/uuid_discovery_fix.patch b/ports/antlr4/uuid_discovery_fix.patch new file mode 100644 index 000000000..6d6e6fab7 --- /dev/null +++ b/ports/antlr4/uuid_discovery_fix.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f4940c0..978b6ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,8 +38,10 @@ if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR + endif() + + if(CMAKE_SYSTEM_NAME MATCHES "Linux") +- find_package(PkgConfig REQUIRED) +- pkg_check_modules(UUID REQUIRED uuid) ++ find_path(UUID_INCLUDE_DIR uuid/uuid.h) ++ find_library(UUID_LIBRARY NAMES uuid) ++ include_directories(${UUID_INCLUDE_DIR}) ++ link_libraries(${UUID_LIBRARY}) + endif() + if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) +@@ -115,7 +117,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_SYSTEM_NAME MATCHES + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + elseif ( MSVC_VERSION GREATER 1800 OR MSVC_VERSION EQUAL 1800 ) +- # Visual Studio 2012+ supports c++11 features ++ # Visual Studio 2012+ supports c++11 features + else () + message(FATAL_ERROR "Your C++ compiler does not support C++11.") + endif () +@@ -129,10 +131,10 @@ endif(WITH_DEMO) + if( EXISTS LICENSE.txt) + install(FILES LICENSE.txt + DESTINATION "share/doc/libantlr4") +-elseif(EXISTS ../../LICENSE.txt) ++elseif(EXISTS ../../LICENSE.txt) + install(FILES ../../LICENSE.txt + DESTINATION "share/doc/libantlr4") + endif() + +-install(FILES README.md VERSION ++install(FILES README.md VERSION + DESTINATION "share/doc/libantlr4") +diff --git a/runtime/src/support/guid.cpp b/runtime/src/support/guid.cpp +index b6105d7..5baadb0 100644 +--- a/runtime/src/support/guid.cpp ++++ b/runtime/src/support/guid.cpp +@@ -21,7 +21,7 @@ + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ +- ++#include "antlr4-common.h" + #include "guid.h" + + #ifdef GUID_LIBUUID +
\ No newline at end of file diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index a84c50ce1..7412e414a 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,5 +1,5 @@ Source: cgal -Version: 4.13-2 +Version: 4.13-3 Build-Depends: mpfr, mpir, zlib, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random, boost-foreach, boost-graph, boost-heap, boost-logic Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 40475b7c2..e73547afc 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DCGAL_HEADER_ONLY=ON -DCGAL_INSTALL_CMAKE_DIR=share/cgal -DWITH_CGAL_Qt5=${WITH_CGAL_Qt5} ) @@ -28,12 +29,11 @@ vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() # Clean -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) else() - foreach(ROOT ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + foreach(ROOT ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE ${ROOT}/cgal_create_CMakeLists ${ROOT}/cgal_create_cmake_script diff --git a/ports/coroutine/CONTROL b/ports/coroutine/CONTROL index 4b193d5bd..af2c5d0e9 100644 --- a/ports/coroutine/CONTROL +++ b/ports/coroutine/CONTROL @@ -1,4 +1,4 @@ Source: coroutine -Version: 1.4.0 +Version: 1.4.0-1 Build-Depends: ms-gsl Description: C++ coroutine helper/example library diff --git a/ports/coroutine/portfile.cmake b/ports/coroutine/portfile.cmake index 17e7596af..78a076fe4 100644 --- a/ports/coroutine/portfile.cmake +++ b/ports/coroutine/portfile.cmake @@ -1,10 +1,14 @@ include(vcpkg_common_functions) +# The tagged commit for release 1.4 was changed by the library's author. +# The current commit for release 1.4 is 3f804ca0f9ec94e3c85e3c5cc00aecc577fb8aad +# We use the commit's hash to avoid the tag changing again it in the future. +set(VERSION_1_4_COMMIT 3f804ca0f9ec94e3c85e3c5cc00aecc577fb8aad) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO luncliff/coroutine - REF 1.4 - SHA512 981c9c728c7888995880a97e8533fa31f41085ef57e1c61e53e555f329d20d4a882d9de724d9e93e3d009dc3fe0669fe4d1af403654a9373e4aab44c933628a3 + REF ${VERSION_1_4_COMMIT} + SHA512 a77d66a8d485a99278f15652d26f255653824c47bd3653233e89ddb6368bc3b45ab0a8049e504c5acc8cf051da582bf6b4d8461c8f7f57bf5a0b7dcaddc0afbb HEAD_REF master ) diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index 05a8bd84e..8e34f77a1 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest -Version: 10.1.1 +Version: 10.1.1-1 Description: Template library of tree data structures diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake index b618233f5..cc0189711 100644 --- a/ports/forest/portfile.cmake +++ b/ports/forest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xorz57/forest - REF 10.1.1 - SHA512 145f60bc202c7a0ab0dad514e08606ace45780855f71d9ba6a9461c5242b751a3fefa25101387f797ecc53198cd792859927b6bd2c2aa4a1f114a311d0b74e26 + REF 10.1.7 + SHA512 104cf76817faf7f6cf82b8c5168b7e611a29de13cf948c55bea02ae97909756d726a8130380a6bc8c96b86466eb779a178f6ffceac16cbc24af468eb19e7dcc9 HEAD_REF master ) diff --git a/ports/freeopcua/CONTROL b/ports/freeopcua/CONTROL new file mode 100644 index 000000000..ad224b863 --- /dev/null +++ b/ports/freeopcua/CONTROL @@ -0,0 +1,4 @@ +Source: freeopcua +Version: 20190125 +Description: OPC-UA server and client library written in C++ and with a lot of code auto-generated from xml specification using python. +Build-Depends: boost-asio,boost-system,boost-program-options,boost-filesystem,boost-thread,boost-format,boost-foreach,boost-property-tree,boost-date-time diff --git a/ports/freeopcua/cmakelists_fixes.patch b/ports/freeopcua/cmakelists_fixes.patch new file mode 100644 index 000000000..6c9798766 --- /dev/null +++ b/ports/freeopcua/cmakelists_fixes.patch @@ -0,0 +1,204 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index de03564..2637355 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,6 +6,8 @@ if( NOT CMAKE_BUILD_TYPE ) + endif() + + project(freeopcua) ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + option(BUILD_CLIENT "Build Client" ON) + option(BUILD_SERVER "Build Server" ON) +@@ -16,28 +18,6 @@ option(BUILD_PYTHON "Build Python bindings" ON) + option(BUILD_TESTING "Build and run tests" OFF) + OPTION(BUILD_SHARED_LIBS "Build shared libraries." ON) + +-IF (NOT DEFINED CMAKE_INSTALL_LIBDIR) +- SET(CMAKE_INSTALL_LIBDIR lib) +-ENDIF () +- +-SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY +- ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} +- CACHE PATH +- "" +- ) +- +-SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY +- ${PROJECT_BINARY_DIR}/bin +- CACHE PATH +- "" +- ) +- +-SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY +- ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} +- CACHE PATH +- "" +- ) +- + # Helper function to generate a pkg-config file for a single library + # Takes the filename of the .pc file as a parameter and replaces all + # placeholders in the .pc.in file with the actual values +@@ -60,23 +40,12 @@ function(generate_pkgconfig BASENAME) + endif() + endfunction(generate_pkgconfig) + if(MSVC) +- SET(STATIC_LIBRARY_CXX_FLAGS /MDd CACHE STRING "") +- SET(EXECUTABLE_CXX_FLAGS /MDd CACHE STRING "") +- SET(DYNAMIC_LIBRARY_CXX_FLAGS /MDd CACHE STRING "") +- SET(D /D) +- +- add_definitions(/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32 /D_WINDOWS /FS /D_WIN32_WINNT=0x0600) +- add_compile_options(/Zi /Od /EHsc /W4) +-else(MSVC) +- set(CMAKE_CXX_FLAGS_DEBUG " -Wall -ggdb -o0 ${CMAKE_CXX_FLAGS_DEBUG}") +- +- SET(STATIC_LIBRARY_CXX_FLAGS) +- SET(EXECUTABLE_CXX_FLAGS) +- SET(DYNAMIC_LIBRARY_CXX_FLAGS) +- SET(D -D) +- set(CMAKE_CXX_FLAGS " -std=c++11 -Wall -fPIC ${CMAKE_CXX_FLAGS} ") +- SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}) +- #set(CMAKE_SHARED_LINKER_FLAGS "--no-undefined" ) ++ add_definitions(-D_SCL_SECURE_NO_WARNINGS) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ add_definitions(-D_WIN32) ++ add_definitions(-D_WINDOWS) ++ add_definitions(-D_WIN32_WINNT=0x0600) ++ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + endif() + + if(WIN32) +@@ -105,7 +74,7 @@ else(WIN32) + + endif(WIN32) + +-find_package( Boost COMPONENTS system program_options filesystem thread REQUIRED ) ++find_package( Boost COMPONENTS system program_options filesystem thread date_time REQUIRED ) + include_directories( ${Boost_INCLUDE_DIRS} ) + link_directories( ${Boost_LIBRARY_DIRS} ) + message(STATUS "Boost INCLUDE DIR IS: " ${Boost_INCLUDE_DIRS}) +@@ -185,9 +154,6 @@ add_library(opcuaprotocol + src/protocol/subscriptions.cpp + ) + +-if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaprotocol PUBLIC ${STATIC_LIBRARY_CXX_FLAGS}) +-endif () + target_link_libraries(opcuaprotocol ${ADDITIONAL_LINK_LIBRARIES}) + target_include_directories(opcuaprotocol PUBLIC $<INSTALL_INTERFACE:include>) + install(TARGETS opcuaprotocol EXPORT FreeOpcUa +@@ -227,10 +193,6 @@ if (BUILD_TESTING) + gtest_main + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(test_opcuaprotocol PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () +- + add_test(NAME opcuaprotocol COMMAND test_opcuaprotocol) + endif() + +@@ -266,11 +228,7 @@ SET(opcuacore_SOURCES + + add_library(opcuacore ${opcuacore_SOURCES}) + +-if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuacore PUBLIC ${STATIC_LIBRARY_CXX_FLAGS}) +-endif () +- +-target_link_libraries(opcuacore ${ADDITIONAL_LINK_LIBRARIES} opcuaprotocol ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}) ++target_link_libraries(opcuacore ${ADDITIONAL_LINK_LIBRARIES} opcuaprotocol ${Boost_LIBRARIES}) + target_include_directories(opcuacore PUBLIC $<INSTALL_INTERFACE:include>) + install(TARGETS opcuacore EXPORT FreeOpcUa + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -306,7 +264,7 @@ if (BUILD_TESTING) + ) + + if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(test_opcuacore PUBLIC ${D}DYNAMIC_ADDON_PATH="${DYNAMIC_ADDON_PATH}" ${D}TEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}" ${EXECUTABLE_CXX_FLAGS}) ++ target_compile_options(test_opcuacore PUBLIC ${D}DYNAMIC_ADDON_PATH="${DYNAMIC_ADDON_PATH}" ${D}TEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}" ) + endif () + + add_test(NAME opcuacore COMMAND test_opcuacore) +@@ -327,9 +285,6 @@ if (BUILD_CLIENT) + src/client/client.cpp + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaclient PUBLIC ${STATIC_LIBRARY_CXX_FLAGS}) +- endif () + target_link_libraries(opcuaclient + opcuacore + ${ADDITIONAL_LINK_LIBRARIES} +@@ -371,9 +326,6 @@ if (BUILD_CLIENT) + opcuacore + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaclient PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () + endif(BUILD_CLIENT) + + +@@ -423,10 +375,7 @@ if(BUILD_SERVER) + src/server/subscription_service_internal.cpp + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaserver PUBLIC ${STATIC_LIBRARY_CXX_FLAGS}) +- endif () +- target_link_libraries(opcuaserver ${ADDITIONAL_LINK_LIBRARIES} opcuacore opcuaprotocol ${Boost_SYSTEM_LIBRARY}) ++ target_link_libraries(opcuaserver ${ADDITIONAL_LINK_LIBRARIES} opcuacore opcuaprotocol ${Boost_LIBRARIES}) + target_include_directories(opcuaserver PUBLIC $<INSTALL_INTERFACE:include>) + install(TARGETS opcuaserver EXPORT FreeOpcUa + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -481,7 +430,7 @@ if(BUILD_SERVER) + + target_include_directories(test_opcuaserver PUBLIC .) + if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(test_opcuaserver PUBLIC ${D}TEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}" ${STATIC_LIBRARY_CXX_FLAGS}) ++ target_compile_options(test_opcuaserver PUBLIC ${D}TEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}") + endif () + + add_test(NAME opcuaserverapp COMMAND test_opcuaserver) +@@ -510,9 +459,6 @@ if(BUILD_SERVER) + opcuaserver + ${Boost_PROGRAM_OPTIONS_LIBRARY} + ) +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaserverapp PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () + + endif(BUILD_SERVER) + +@@ -533,9 +479,6 @@ if (BUILD_CLIENT) + ${SSL_SUPPORT_LINK_LIBRARIES} + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(example_client PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () + + endif (BUILD_CLIENT) + +@@ -555,9 +498,6 @@ if(BUILD_SERVER) + opcuaserver + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(example_server PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () + if(MSVC) + set_target_properties(example_server PROPERTIES LINK_FLAGS /STACK:3000000) + endif(MSVC) +@@ -572,7 +512,7 @@ if (BUILD_PYTHON) + add_subdirectory(python) + endif (BUILD_PYTHON) + +-install(EXPORT FreeOpcUa DESTINATION lib/cmake/FreeOpcUa FILE FreeOpcUaConfig.cmake) ++install(EXPORT FreeOpcUa DESTINATION share/freeopcua FILE FreeOpcUaConfig.cmake) + + SET(CPACK_GENERATOR "DEB") + SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "FreeOpcUa") diff --git a/ports/freeopcua/improve_compatibility_with_recent_boost.patch b/ports/freeopcua/improve_compatibility_with_recent_boost.patch new file mode 100644 index 000000000..14e78a68e --- /dev/null +++ b/ports/freeopcua/improve_compatibility_with_recent_boost.patch @@ -0,0 +1,54 @@ +diff --git a/include/opc/ua/services/services.h b/include/opc/ua/services/services.h +index f138831..4732a59 100644 +--- a/include/opc/ua/services/services.h ++++ b/include/opc/ua/services/services.h +@@ -26,20 +26,7 @@ + #include <vector> + + #include <boost/version.hpp> +- +- +-namespace boost +-{ +-namespace asio +-{ +-#if BOOST_VERSION < 106600 +- class io_service; +-#else +- class io_context; +- typedef io_context io_service; +-#endif +-} +-} ++#include <boost/asio/io_service.hpp> + + namespace OpcUa + { +diff --git a/src/server/internal_subscription.cpp b/src/server/internal_subscription.cpp +index edf4715..69ef74a 100644 +--- a/src/server/internal_subscription.cpp ++++ b/src/server/internal_subscription.cpp +@@ -14,7 +14,7 @@ InternalSubscription::InternalSubscription(SubscriptionServiceInternal & service + , CurrentSession(SessionAuthenticationToken) + , Callback(callback) + , io(service.GetIOService()) +- , Timer(io, boost::posix_time::milliseconds(data.RevisedPublishingInterval)) ++ , Timer(io, boost::posix_time::milliseconds((int)data.RevisedPublishingInterval)) + , LifeTimeCount(data.RevisedLifetimeCount) + , Logger(logger) + { +@@ -105,7 +105,7 @@ void InternalSubscription::PublishResults(const boost::system::error_code & erro + } + + TimerStopped = false; +- Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds(Data.RevisedPublishingInterval)); ++ Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds((int)Data.RevisedPublishingInterval)); + std::shared_ptr<InternalSubscription> self = shared_from_this(); + Timer.async_wait([self](const boost::system::error_code & error) { self->PublishResults(error); }); + } +@@ -615,5 +615,3 @@ std::vector<Variant> InternalSubscription::GetEventFields(const EventFilter & fi + + } + } +- +- diff --git a/ports/freeopcua/include_asio_first.patch b/ports/freeopcua/include_asio_first.patch new file mode 100644 index 000000000..d540a38ab --- /dev/null +++ b/ports/freeopcua/include_asio_first.patch @@ -0,0 +1,138 @@ +diff --git a/src/core/subscription.cpp b/src/core/subscription.cpp +index b690d3a..fdac2f3 100644 +--- a/src/core/subscription.cpp ++++ b/src/core/subscription.cpp +@@ -17,11 +17,10 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ******************************************************************************/ + +- +-#include <opc/ua/subscription.h> ++#include <boost/asio.hpp> + #include <opc/ua/protocol/string_utils.h> ++#include <opc/ua/subscription.h> + +-#include <boost/asio.hpp> + #include <iostream> + + namespace OpcUa +diff --git a/src/server/asio_addon.cpp b/src/server/asio_addon.cpp +index 795a6b2..532ac3c 100644 +--- a/src/server/asio_addon.cpp ++++ b/src/server/asio_addon.cpp +@@ -17,9 +17,9 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ******************************************************************************/ + ++#include <boost/asio.hpp> + #include <opc/ua/server/addons/asio_addon.h> + +-#include <boost/asio.hpp> + #include <iostream> + #include <thread> + +diff --git a/src/server/internal_subscription.h b/src/server/internal_subscription.h +index d42aa65..dd193a9 100644 +--- a/src/server/internal_subscription.h ++++ b/src/server/internal_subscription.h +@@ -1,6 +1,7 @@ + + #pragma once + ++#include <boost/asio.hpp> + //#include "address_space_internal.h" + #include "subscription_service_internal.h" + +@@ -11,7 +12,6 @@ + #include <opc/ua/protocol/string_utils.h> + #include <opc/ua/services/attributes.h> + +-#include <boost/asio.hpp> + #include <boost/thread/shared_mutex.hpp> + #include <chrono> + #include <iostream> +@@ -115,5 +115,3 @@ private: + + } + } +- +- +diff --git a/src/server/opc_tcp_async.cpp b/src/server/opc_tcp_async.cpp +index dc700c2..f3a66b8 100644 +--- a/src/server/opc_tcp_async.cpp ++++ b/src/server/opc_tcp_async.cpp +@@ -17,6 +17,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ******************************************************************************/ + ++#include <boost/asio.hpp> + #include "opc_tcp_processor.h" + + #include <opc/ua/server/opc_tcp_async.h> +@@ -29,7 +30,6 @@ + #include <opc/ua/protocol/input_from_buffer.h> + + #include <array> +-#include <boost/asio.hpp> + #include <future> + #include <iostream> + #include <set> +diff --git a/src/server/subscription_service_internal.h b/src/server/subscription_service_internal.h +index 6b16e1d..f7e5dfe 100644 +--- a/src/server/subscription_service_internal.h ++++ b/src/server/subscription_service_internal.h +@@ -9,6 +9,7 @@ + + #pragma once + ++#include <boost/asio.hpp> + #include "address_space_addon.h" + #include "internal_subscription.h" + +@@ -20,7 +21,6 @@ + #include <opc/ua/protocol/strings.h> + #include <opc/ua/protocol/string_utils.h> + +-#include <boost/asio.hpp> + #include <boost/thread/shared_mutex.hpp> + #include <ctime> + #include <limits> +@@ -76,4 +76,3 @@ private: + } + + } +- +diff --git a/src/server/tcp_server.cpp b/src/server/tcp_server.cpp +index b4f2000..2430820 100644 +--- a/src/server/tcp_server.cpp ++++ b/src/server/tcp_server.cpp +@@ -8,9 +8,6 @@ + /// http://www.gnu.org/licenses/lgpl.html) + /// + +-#ifdef _WIN32 +-#include <windows.h> +-#endif + + #include "tcp_server.h" + +@@ -34,8 +31,18 @@ + #include <string.h> + #include <sys/types.h> + +- + #ifdef _WIN32 ++#include <WinSock2.h> ++#include <windows.h> ++#if !defined SHUT_RD && defined SD_RECEIVE ++#define SHUT_RD SD_RECEIVE ++#endif ++#if !defined SHUT_WR && defined SD_SEND ++#define SHUT_WR SD_SEND ++#endif ++#if !defined SHUT_RDWR && defined SD_BOTH ++#define SHUT_RDWR SD_BOTH ++#endif + #else + #include <arpa/inet.h> + #include <netdb.h> diff --git a/ports/freeopcua/portfile.cmake b/ports/freeopcua/portfile.cmake new file mode 100644 index 000000000..e329f12e6 --- /dev/null +++ b/ports/freeopcua/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FreeOpcUa/freeopcua + REF 2f2c886eb2da46b9dc8944c8f79ac31a9f116a81 + SHA512 f19c1489eb116224ac3192e646c08cf3967c9a07064a09c4cbdef89d93e98c7541bb3edd030be22f6daf3f831ff92a324bc3734a8fe34cdd9d5a5ff7cb7f2f19 + HEAD_REF master + PATCHES + cmakelists_fixes.patch + improve_compatibility_with_recent_boost.patch + use_another_implementation_of_has_begin_end.patch + uri_facade_win.patch + serverObj.patch + include_asio_first.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_PYTHON=OFF + -DBUILD_TESTING=OFF + -DSSL_SUPPORT_MBEDTLS=OFF +) + +vcpkg_install_cmake() + +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/freeopcua/FreeOpcUaConfig-debug.cmake ${CURRENT_PACKAGES_DIR}/share/freeopcua/FreeOpcUaConfig-debug.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/freeopcua/FreeOpcUaConfig.cmake ${CURRENT_PACKAGES_DIR}/share/freeopcua/FreeOpcUaConfig.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeopcua RENAME copyright) diff --git a/ports/freeopcua/serverObj.patch b/ports/freeopcua/serverObj.patch new file mode 100644 index 000000000..6680e587b --- /dev/null +++ b/ports/freeopcua/serverObj.patch @@ -0,0 +1,14 @@ +diff --git a/src/server/server_object.cpp b/src/server/server_object.cpp +index f35b168..b6c816a 100644 +--- a/src/server/server_object.cpp ++++ b/src/server/server_object.cpp +@@ -25,9 +25,6 @@ + #include <functional> + #include <iostream> + +-#ifdef WIN32 +-#undef GetObject +-#endif + + namespace + { diff --git a/ports/freeopcua/uri_facade_win.patch b/ports/freeopcua/uri_facade_win.patch new file mode 100644 index 000000000..e6cc601dc --- /dev/null +++ b/ports/freeopcua/uri_facade_win.patch @@ -0,0 +1,28 @@ +diff --git a/src/core/common/uri_facade_win.cpp b/src/core/common/uri_facade_win.cpp +index 1a807fb..c579e2d 100644 +--- a/src/core/common/uri_facade_win.cpp ++++ b/src/core/common/uri_facade_win.cpp +@@ -19,7 +19,7 @@ + namespace Common + { + +-void Uri::Initialize(const char * uriString, std::size_t size) ++void Uri::Initialize(const std::string& uriString) + { + URL_COMPONENTS url = {0}; + url.dwStructSize = sizeof(url); +@@ -31,7 +31,7 @@ void Uri::Initialize(const char * uriString, std::size_t size) + + // TODO msdn says do not use this function in services and in server patforms. :( + // TODO http://msdn.microsoft.com/en-us/library/windows/desktop/aa384376(v=vs.85).aspx +- if (!InternetCrackUrl(uriString, size, options, &url)) ++ if (!InternetCrackUrl(uriString.c_str(), uriString.size(), options, &url)) + { + THROW_ERROR1(CannotParseUri, uriString); + } +@@ -50,5 +50,3 @@ void Uri::Initialize(const char * uriString, std::size_t size) + } + + } // namespace Common +- +- diff --git a/ports/freeopcua/use_another_implementation_of_has_begin_end.patch b/ports/freeopcua/use_another_implementation_of_has_begin_end.patch new file mode 100644 index 000000000..34fa77f7c --- /dev/null +++ b/ports/freeopcua/use_another_implementation_of_has_begin_end.patch @@ -0,0 +1,39 @@ +diff --git a/include/opc/ua/protocol/variant.h b/include/opc/ua/protocol/variant.h +index 9dc5b15..317cb17 100644 +--- a/include/opc/ua/protocol/variant.h ++++ b/include/opc/ua/protocol/variant.h +@@ -76,22 +76,25 @@ public: + template <typename T> + struct has_begin_end + { +- template<typename C> static char (&f(typename std::enable_if < +- std::is_same<decltype(static_cast<typename C::const_iterator(C::*)() const>(&C::begin)), +- typename C::const_iterator(C::*)() const>::value, void >::type *))[1]; ++ struct Dummy { typedef void const_iterator; }; ++ typedef typename std::conditional<has_const_iterator<T>::value, T, Dummy>::type TType; ++ typedef typename TType::const_iterator iter; + +- template<typename C> static char (&f(...))[2]; ++ struct Fallback { iter begin() const; iter end() const; }; ++ struct Derived : TType, Fallback { }; + +- template<typename C> static char (&g(typename std::enable_if < +- std::is_same<decltype(static_cast<typename C::const_iterator(C::*)() const>(&C::end)), +- typename C::const_iterator(C::*)() const>::value, void >::type *))[1]; ++ template<typename C, C> struct ChT; + ++ template<typename C> static char (&f(ChT<iter (Fallback::*)() const, &C::begin>*))[1]; ++ template<typename C> static char (&f(...))[2]; ++ template<typename C> static char (&g(ChT<iter (Fallback::*)() const, &C::end>*))[1]; + template<typename C> static char (&g(...))[2]; + +- static bool const beg_value = sizeof(f<T>(0)) == 1; +- static bool const end_value = sizeof(g<T>(0)) == 1; ++ static bool const beg_value = sizeof(f<Derived>(0)) == 2; ++ static bool const end_value = sizeof(g<Derived>(0)) == 2; + }; + ++ + template<typename T> + struct is_container_not_string : std::integral_constant < bool, has_const_iterator<T>::value && has_begin_end<T>::beg_value && has_begin_end<T>::end_value > + { }; diff --git a/ports/geotrans/CMakeLists.txt b/ports/geotrans/CMakeLists.txt new file mode 100644 index 000000000..ba2af5868 --- /dev/null +++ b/ports/geotrans/CMakeLists.txt @@ -0,0 +1,142 @@ +cmake_minimum_required(VERSION 3.10) +project(geotrans CXX) + +file(GLOB_RECURSE DTCC_CPP CCS/src/dtcc/*.cpp) +include_directories( +CCS/src/dtcc +CCS/src/dtcc/Enumerations +CCS/src/dtcc/Exception +CCS/src/dtcc/CoordinateSystemParameters +CCS/src/dtcc/CoordinateSystems +CCS/src/dtcc/CoordinateSystems/albers +CCS/src/dtcc/CoordinateSystems/bonne +CCS/src/dtcc/CoordinateSystems/datum +CCS/src/dtcc/CoordinateSystems/ellipse +CCS/src/dtcc/CoordinateSystems/geocent +CCS/src/dtcc/CoordinateSystems/grinten +CCS/src/dtcc/CoordinateSystems/mercator +CCS/src/dtcc/CoordinateSystems/misc +CCS/src/dtcc/CoordinateSystems/nzmg +CCS/src/dtcc/CoordinateSystems/polarst +CCS/src/dtcc/CoordinateSystems/stereogr +CCS/src/dtcc/CoordinateSystems/trcyleqa +CCS/src/dtcc/CoordinateSystems/utm +CCS/src/dtcc/CoordinateSystems/azeq +CCS/src/dtcc/CoordinateSystems/cassini +CCS/src/dtcc/CoordinateSystems/eckert4 +CCS/src/dtcc/CoordinateSystems/eqdcyl +CCS/src/dtcc/CoordinateSystems/georef +CCS/src/dtcc/CoordinateSystems/lambert +CCS/src/dtcc/CoordinateSystems/mgrs +CCS/src/dtcc/CoordinateSystems/mollweid +CCS/src/dtcc/CoordinateSystems/omerc +CCS/src/dtcc/CoordinateSystems/polycon +CCS/src/dtcc/CoordinateSystems/threads +CCS/src/dtcc/CoordinateSystems/ups +CCS/src/dtcc/CoordinateSystems/webmerc +CCS/src/dtcc/CoordinateSystems/bng +CCS/src/dtcc/CoordinateSystems/cyleqa +CCS/src/dtcc/CoordinateSystems/eckert6 +CCS/src/dtcc/CoordinateSystems/gars +CCS/src/dtcc/CoordinateSystems/gnomonic +CCS/src/dtcc/CoordinateSystems/loccart +CCS/src/dtcc/CoordinateSystems/miller +CCS/src/dtcc/CoordinateSystems/neys +CCS/src/dtcc/CoordinateSystems/orthogr +CCS/src/dtcc/CoordinateSystems/sinusoid +CCS/src/dtcc/CoordinateSystems/tranmerc +CCS/src/dtcc/CoordinateSystems/usng +CCS/src/dtcc/CoordinateTuples +) +set(DTCC_INCLUDES +include/dtcc/ +include/dtcc/Enumerations +include/dtcc/Exception +include/dtcc/CoordinateSystemParameters +include/dtcc/CoordinateSystems +include/dtcc/CoordinateSystems/albers +include/dtcc/CoordinateSystems/bonne +include/dtcc/CoordinateSystems/datum +include/dtcc/CoordinateSystems/ellipse +include/dtcc/CoordinateSystems/geocent +include/dtcc/CoordinateSystems/grinten +include/dtcc/CoordinateSystems/mercator +include/dtcc/CoordinateSystems/misc +include/dtcc/CoordinateSystems/nzmg +include/dtcc/CoordinateSystems/polarst +include/dtcc/CoordinateSystems/stereogr +include/dtcc/CoordinateSystems/trcyleqa +include/dtcc/CoordinateSystems/utm +include/dtcc/CoordinateSystems/azeq +include/dtcc/CoordinateSystems/cassini +include/dtcc/CoordinateSystems/eckert4 +include/dtcc/CoordinateSystems/eqdcyl +include/dtcc/CoordinateSystems/georef +include/dtcc/CoordinateSystems/lambert +include/dtcc/CoordinateSystems/mgrs +include/dtcc/CoordinateSystems/mollweid +include/dtcc/CoordinateSystems/omerc +include/dtcc/CoordinateSystems/polycon +include/dtcc/CoordinateSystems/threads +include/dtcc/CoordinateSystems/ups +include/dtcc/CoordinateSystems/webmerc +include/dtcc/CoordinateSystems/bng +include/dtcc/CoordinateSystems/cyleqa +include/dtcc/CoordinateSystems/eckert6 +include/dtcc/CoordinateSystems/gars +include/dtcc/CoordinateSystems/gnomonic +include/dtcc/CoordinateSystems/loccart +include/dtcc/CoordinateSystems/miller +include/dtcc/CoordinateSystems/neys +include/dtcc/CoordinateSystems/orthogr +include/dtcc/CoordinateSystems/sinusoid +include/dtcc/CoordinateSystems/tranmerc +include/dtcc/CoordinateSystems/usng +include/dtcc/CoordinateTuples +) + + +add_library(MSPdtcc ${DTCC_CPP}) +add_library(MSPCoordinateConversionService CCS/src/CoordinateConversion/CoordinateConversionService.cpp ${DTCC_CPP}) + +target_include_directories(MSPdtcc INTERFACE "$<INSTALL_INTERFACE:${DTCC_INCLUDES}>") +target_include_directories(MSPCoordinateConversionService INTERFACE $<INSTALL_INTERFACE:include/CoordinateConversion>) + +if(WIN32) + if (BUILD_SHARED_LIBS) + add_definitions( + -DMSP_CCS_EXPORTS + -D_USRDLL + ) + endif() + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +else() + find_package(Threads REQUIRED) + target_link_libraries(MSPdtcc PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) +endif() + + +install( + TARGETS MSPdtcc + EXPORT geotrans + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + TARGETS MSPCoordinateConversionService + EXPORT geotrans + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(DIRECTORY "${CMAKE_SOURCE_DIR}/CCS/src/" + DESTINATION "include" + CONFIGURATIONS Release + FILES_MATCHING + PATTERN "*.h" +) + +install(EXPORT geotrans NAMESPACE geotrans:: DESTINATION share/geotrans CONFIGURATIONS Release) diff --git a/ports/geotrans/CONTROL b/ports/geotrans/CONTROL new file mode 100644 index 000000000..1d3373aae --- /dev/null +++ b/ports/geotrans/CONTROL @@ -0,0 +1,3 @@ +Source: geotrans +Version: 3.7 +Description: Geotrans is a library that allows you convert geographic coordinates among a wide variety of coordinate systems, map projections, and datums. diff --git a/ports/geotrans/geotrans-config.in.cmake b/ports/geotrans/geotrans-config.in.cmake new file mode 100644 index 000000000..f25224c0b --- /dev/null +++ b/ports/geotrans/geotrans-config.in.cmake @@ -0,0 +1,7 @@ + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/geotrans.cmake) diff --git a/ports/geotrans/portfile.cmake b/ports/geotrans/portfile.cmake new file mode 100644 index 000000000..4b63ba58a --- /dev/null +++ b/ports/geotrans/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +set(VCPKG_LIBRARY_LINKAGE "dynamic") + +# We specify the Linux URL, but the only difference between the Windows/Linux packages are the included libraries +# which we re-build anyway. There is no source only package provided or it would be preferred (and smaller). +vcpkg_download_distfile(ARCHIVE + URLS "http://earth-info.nga.mil/GandG/geotrans/geotrans3.7/linux_dev.tgz" + FILENAME "geotrans-3.7.tgz" + SHA512 20bdc870026e95154f1d7f9560cbfa2c0b2dc39042aa544f093b502a0609121cb47df5729248e0d79ccf8f9908bf01bbcea8e777ae4f45e25472b7ce2bcb9742 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/geotrans-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/geotrans/geotrans-config.cmake + @ONLY +) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY) + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/GEOTRANS3/docs/MSP_Geotrans_Terms_Of_Use.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotrans RENAME copyright) + +# Install the geo model data +file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotrans) diff --git a/ports/geotrans/usage b/ports/geotrans/usage new file mode 100644 index 000000000..83430e426 --- /dev/null +++ b/ports/geotrans/usage @@ -0,0 +1,11 @@ +The package geotrans provides CMake targets: + + find_package(geotrans CONFIG REQUIRED) + target_link_libraries(main PRIVATE geotrans::MSPdtcc geotrans::MSPCoordinateConversionService) + + +The geotrans library depends on being able to read it's model data so you'll need to +set an environment variable to let geotrans know where the models are installed: + +export MSPCCS_DATA=@CURRENT_INSTALLED_DIR@/share/@PORT@/data + diff --git a/ports/google-cloud-cpp/CONTROL b/ports/google-cloud-cpp/CONTROL index 195d3d6f5..a23a885b4 100644 --- a/ports/google-cloud-cpp/CONTROL +++ b/ports/google-cloud-cpp/CONTROL @@ -1,4 +1,4 @@ Source: google-cloud-cpp
-Version: 0.6.0
-Build-Depends: grpc, gtest, curl, crc32c
+Version: 0.7.0
+Build-Depends: grpc, curl, crc32c
Description: C++ Client Libraries for Google Cloud Platform APIs.
diff --git a/ports/google-cloud-cpp/portfile.cmake b/ports/google-cloud-cpp/portfile.cmake index 0f8b14d84..b9ca818b1 100644 --- a/ports/google-cloud-cpp/portfile.cmake +++ b/ports/google-cloud-cpp/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GoogleCloudPlatform/google-cloud-cpp - REF v0.5.0 - SHA512 48c5f4828bc85ae2c4bfe52b5bb51ff5da6a4cd6759f819aefaf9c23d7fffeb0a10390274f0e83f030f66f59a364c05583240e426143073187f104345e0b05d5 + REF v0.7.0 + SHA512 8e01096b569e78f74ee0015fa7f04729354f9001234acd098333c883247ede209582c929903460264f1155bfa0225837fd770f75ba021f8287cafa78e87e6975 HEAD_REF master ) diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL index 76b43da14..c50a53849 100644 --- a/ports/http-parser/CONTROL +++ b/ports/http-parser/CONTROL @@ -1,3 +1,3 @@ Source: http-parser -Version: 2.8.1 +Version: 2.9.0 Description: HTTP Parser.
\ No newline at end of file diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake index 17a410135..5e9929789 100644 --- a/ports/http-parser/portfile.cmake +++ b/ports/http-parser/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nodejs/http-parser - REF v2.8.1 - SHA512 6f52f543d979f39688ccefae236527a8183929b3d30f5370570107b01cf89d0338b448249a81102b78d31615d2e8f6e7c708f8961f55ece08e7d3a40e5ad0883 + REF v2.9.0 + SHA512 40acecbf71b9f0b4ae857c74c3ec0784d7f341a0cb83cf82b308387d0c5b56d38b282241aaf8ca93816970f2a9e67989f3d9d456459f3986c29fe51ab520155e HEAD_REF master ) diff --git a/ports/intel-ipsec/CMakeLists.txt b/ports/intel-ipsec/CMakeLists.txt new file mode 100644 index 000000000..4d778eb30 --- /dev/null +++ b/ports/intel-ipsec/CMakeLists.txt @@ -0,0 +1,59 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(ipsec C) + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +INCLUDE(ProcessorCount) +PROCESSORCOUNT(PROCS) + +FIND_PROGRAM(NASM nasm) +IF (NOT NASM) + MESSAGE(FATAL_ERROR "NASM not found") +ENDIF () + +FIND_PROGRAM(MAKE make) +IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") +ENDIF () + +IF (EXEC_ENV STREQUAL "Windows") + FIND_PROGRAM(MAKE nmake) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "nmake not found") + ENDIF () +ENDIF () + +SET(MAKE_FLAGS) + +IF (EXEC_ENV STREQUAL Windows) + LIST(APPEND MAKE_FLAGS /f win_x64.mak) +ENDIF () + +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LIST(APPEND MAKE_FLAGS DEBUG=y) +ENDIF () + +IF (LIBRARY_LINKAGE STREQUAL "static") + LIST(APPEND MAKE_FLAGS SHARED=n) +ENDIF () + +MESSAGE(STATUS "${MAKE_FLAGS}") +ADD_CUSTOM_TARGET(ipsec-mb ALL + COMMAND ${MAKE} -j ${MAKE_FLAGS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ +# VERBATIM + ) + +SET(LIB_PATH ${CMAKE_SOURCE_DIR}/) +IF (LIBRARY_LINKAGE STREQUAL "dynamic") + STRING(APPEND LIB_PATH libIPSec_MB.so) +ELSEIF (LIBRARY_LINKAGE STREQUAL "static") + STRING(APPEND LIB_PATH libIPSec_MB.a) +ELSE () + MESSAGE(FATAL_ERROR "Unknown linkage type ${LIBRARY_LINKAGE}") +ENDIF () +INSTALL(FILES ${LIB_PATH} + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/lib/) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) diff --git a/ports/intel-ipsec/CONTROL b/ports/intel-ipsec/CONTROL new file mode 100644 index 000000000..0056f00f0 --- /dev/null +++ b/ports/intel-ipsec/CONTROL @@ -0,0 +1,4 @@ +Source: intel-ipsec +Version: 0.52 +Description: Intel(R) Multi-Buffer Crypto for IPsec Library + diff --git a/ports/intel-ipsec/intel-ipsecConfig.cmake b/ports/intel-ipsec/intel-ipsecConfig.cmake new file mode 100644 index 000000000..3861032d5 --- /dev/null +++ b/ports/intel-ipsec/intel-ipsecConfig.cmake @@ -0,0 +1,17 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) + +SET_LIBRARY_TARGET("IPSEC" "ipsec" "${ROOT}/debug/lib/libIPSec_MB.a" "${ROOT}/lib/libIPSec_MB.a" "${ROOT}/include/intel-ipsec") diff --git a/ports/intel-ipsec/portfile.cmake b/ports/intel-ipsec/portfile.cmake new file mode 100644 index 000000000..988e25219 --- /dev/null +++ b/ports/intel-ipsec/portfile.cmake @@ -0,0 +1,62 @@ +INCLUDE(vcpkg_common_functions) + +IF (NOT VCPKG_CMAKE_SYSTEM_NAME) + SET(EXEC_ENV "Windows") +ELSE () + SET(EXEC_ENV "${VCPKG_CMAKE_SYSTEM_NAME}") +ENDIF () + +IF (NOT EXEC_ENV STREQUAL "Linux") + MESSAGE(FATAL_ERROR "Intel(R) Multi-Buffer Crypto for IPsec Library currently only supports Linux/Windows platforms") + MESSAGE(STATUS "Well, it is not true, but I didnt manage to get it working on Windows") +ENDIF () + +IF (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + MESSAGE(FATAL_ERROR "Intel(R) Multi-Buffer Crypto for IPsec Library currently only supports x64 architecture") +ELSEIF (NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + MESSAGE(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/intel-ipsec-mb + REF v0.52 + SHA512 3b115fb6df53801800a63a3b62198165824a9262d579a7696f1ec365a5680282b172ffac742fe6453ae53b97043c19136adf558a85a0e51d163b27be2abc9e63 + HEAD_REF master +) + +VCPKG_FIND_ACQUIRE_PROGRAM(NASM) + +EXEC_PROGRAM(${NASM} + ARGS -v + OUTPUT_VARIABLE NASM_OUTPUT + ) +STRING(REGEX REPLACE "NASM version ([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" + NASM_VERSION + ${NASM_OUTPUT}) +IF (NASM_VERSION VERSION_LESS 2.13.03) + MESSAGE(FATAL_ERROR "NASM version 2.13.03 (or newer) is required to build this package") +ENDIF () + +GET_FILENAME_COMPONENT(NASM_PATH ${NASM} DIRECTORY) +SET(ENV{PATH} " $ENV{PATH};${NASM_PATH} ") + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} + -DEXEC_ENV=${VCPKG_CMAKE_SYSTEM_NAME} + -DLIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} +) + +VCPKG_INSTALL_CMAKE() + +FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/intel-ipsecConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${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 ${PORT}) diff --git a/ports/intel-ipsec/usage b/ports/intel-ipsec/usage new file mode 100644 index 000000000..083bbca19 --- /dev/null +++ b/ports/intel-ipsec/usage @@ -0,0 +1,4 @@ +The package intel-ipsec is compatible with built-in CMake targets:
+
+ FIND_PACKAGE(intel-ipsec CONFIG REQUIRED)
+ TARGET_LINK_LIBRARIES(main PRIVATE IPSEC::ipsec)
diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL index a2cc426e8..2957c8742 100644 --- a/ports/itk/CONTROL +++ b/ports/itk/CONTROL @@ -1,5 +1,5 @@ Source: itk -Version: 4.13.0 +Version: 4.13.0-2 Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, hdf5[cpp] diff --git a/ports/itk/hdf5_config_mode_find_package.patch b/ports/itk/hdf5_config_mode_find_package.patch new file mode 100644 index 000000000..f106d7151 --- /dev/null +++ b/ports/itk/hdf5_config_mode_find_package.patch @@ -0,0 +1,68 @@ +diff --git a/Modules/ThirdParty/HDF5/CMakeLists.txt b/Modules/ThirdParty/HDF5/CMakeLists.txt +index 6caa63b..f118c73 100644 +--- a/Modules/ThirdParty/HDF5/CMakeLists.txt ++++ b/Modules/ThirdParty/HDF5/CMakeLists.txt +@@ -1,7 +1,7 @@ + project(ITKHDF5) + set(ITKHDF5_THIRD_PARTY 1) + +-if (BUILD_SHARED_LIBS) ++if (ITK_BUILD_SHARED_LIBS) + add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB=1) + endif() + if(ITK_USE_SYSTEM_HDF5) +@@ -20,11 +20,10 @@ endif() + ") + endif() + +- set(ITKHDF5_LIBRARIES ) +- if(BUILD_SHARED_LIBS) +- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_SHARED_LIBRARY} ${HDF5_CXX_SHARED_LIBRARY}) ++ if(ITK_BUILD_SHARED_LIBS) ++ set(ITKHDF5_LIBRARIES hdf5::hdf5-shared hdf5::hdf5_cpp-shared) + else() +- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_STATIC_LIBRARY} ${HDF5_CXX_STATIC_LIBRARY}) ++ set(ITKHDF5_LIBRARIES hdf5::hdf5-static hdf5::hdf5_cpp-static) + endif() + + set(ITKHDF5_INCLUDE_DIRS +@@ -33,11 +32,6 @@ endif() + set(ITKHDF5_SYSTEM_INCLUDE_DIRS + ${HDF5_INCLUDE_DIR} + ${HDF5_INCLUDE_DIR_CPP} +- ${HDF5_INCLUDE_DIRS} +- ${HDF5_INCLUDE_DIR_CPP} +- ) +- list(APPEND ITKHDF5_LIBRARIES +- ${HDF5_LIBRARIES} + ) + set(ITKHDF5_NO_SRC 1) + else() +@@ -45,7 +39,7 @@ else() + ${ITKHDF5_SOURCE_DIR}/src + ${ITKHDF5_BINARY_DIR}/src + ) +- if(BUILD_SHARED_LIBS) ++ if(ITK_BUILD_SHARED_LIBS) + set(ITKHDF5_LIBRARIES hdf5_cpp-shared hdf5-shared) + else() + set(ITKHDF5_LIBRARIES hdf5_cpp-static hdf5-static) +diff --git a/Modules/ThirdParty/HDF5/itk-module-init.cmake b/Modules/ThirdParty/HDF5/itk-module-init.cmake +index a9207a8..e36c2d9 100644 +--- a/Modules/ThirdParty/HDF5/itk-module-init.cmake ++++ b/Modules/ThirdParty/HDF5/itk-module-init.cmake +@@ -2,12 +2,8 @@ option(ITK_USE_SYSTEM_HDF5 "Use an outside build of HDF5." ${ITK_USE_SYSTEM_LIBR + mark_as_advanced(ITK_USE_SYSTEM_HDF5) + if(ITK_USE_SYSTEM_HDF5) + if(BUILD_SHARED_LIBS) +- find_package(HDF5 QUIET NO_MODULE COMPONENTS CXX C shared) ++ find_package(HDF5 REQUIRED NO_MODULE COMPONENTS CXX C shared) + else() +- find_package(HDF5 QUIET NO_MODULE COMPONENTS CXX C static) +- endif() +- +- if(NOT HDF5_FOUND) +- find_package(HDF5 REQUIRED COMPONENTS CXX C) ++ find_package(HDF5 REQUIRED NO_MODULE COMPONENTS CXX C static) + endif() + endif() diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index b42d8be75..6d0445caf 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( REF d92873e33e8a54e933e445b92151191f02feab42 SHA512 0e3ebd27571543e1c497377dd9576a9bb0711129be12131109fe9b3c8413655ad14ce4d9ac6e281bac83c57e6032b614bc9ff53ed357d831544ca52f41513b62 HEAD_REF master + PATCHES hdf5_config_mode_find_package.patch ) if ("vtk" IN_LIST FEATURES) @@ -44,16 +45,18 @@ vcpkg_configure_cmake( -DITK_USE_SYSTEM_PNG=ON -DITK_USE_SYSTEM_TIFF=ON -DITK_USE_SYSTEM_ZLIB=ON + # This should be turned on some day, however for now ITK does download specific versions so it shouldn't spontaneously break -DITK_FORBID_DOWNLOADS=OFF + -DITK_SKIP_PATH_LENGTH_CHECKS=ON + # I havn't tried Python wrapping in vcpkg #-DITK_WRAP_PYTHON=ON #-DITK_PYTHON_VERSION=3 - # HDF5 must NOT be installed, otherwise it causes: ...\installed\x64-windows-static\include\H5Tpkg.h(25): fatal error C1189: #error: "Do not include this file outside the H5T package!" - -DITK_USE_SYSTEM_HDF5=ON # if ON, causes: ...\buildtrees\itk\x64-windows-static-rel\Modules\ThirdParty\HDF5\src\itk_H5Cpp.h(25): fatal error C1083: Cannot open include file: 'H5Cpp.h': No such file or directory - + -DITK_USE_SYSTEM_HDF5=ON -DModule_ITKVtkGlue=${ITKVtkGlue} # this option requires VTK to be a dependency in CONTROL file. VTK depends on HDF5! + -DModule_IOSTL=ON # example how to turn on a non-default module -DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module -DModule_RLEImage=ON # example how to turn on a remote module diff --git a/ports/libbf/CONTROL b/ports/libbf/CONTROL new file mode 100644 index 000000000..3b51a52e1 --- /dev/null +++ b/ports/libbf/CONTROL @@ -0,0 +1,3 @@ +Source: libbf +Version: 1.0.0 +Description: Bloom filters for C++11.
\ No newline at end of file diff --git a/ports/libbf/portfile.cmake b/ports/libbf/portfile.cmake new file mode 100644 index 000000000..b339e94cc --- /dev/null +++ b/ports/libbf/portfile.cmake @@ -0,0 +1,27 @@ +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "libbf does not support MSVC") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mavam/libbf + REF v1.0.0 + SHA512 04db7adbeb4bc6b20aed7f2676840499ed1afe499b4cab67f27d4a0ad234c1fb06eced24259f37870ec4760fe74d6d6307b5d11b3cd928b975661eb2966d4db8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbf) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbf/COPYING ${CURRENT_PACKAGES_DIR}/share/libbf/copyright)
\ No newline at end of file diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL index ba378b8ff..8dc420fda 100644 --- a/ports/libraw/CONTROL +++ b/ports/libraw/CONTROL @@ -1,4 +1,4 @@ Source: libraw -Version: 0.19.0-2 +Version: 0.19.0-3 Build-Depends: lcms, jasper Description: raw image decoder library diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake index 1ed02eab4..e62079ad3 100644 --- a/ports/libraw/portfile.cmake +++ b/ports/libraw/portfile.cmake @@ -79,6 +79,10 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Rename cmake module into a config in order to allow more flexible lookup rules file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/FindLibRaw.cmake ${CURRENT_PACKAGES_DIR}/share/libraw/LibRaw-config.cmake) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraw) +endif() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraw) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/COPYRIGHT ${CURRENT_PACKAGES_DIR}/share/libraw/copyright) diff --git a/ports/libraw/vcpkg-cmake-wrapper.cmake b/ports/libraw/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..c0ecc48f0 --- /dev/null +++ b/ports/libraw/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,7 @@ +_find_package(${ARGS})
+find_package(Jasper REQUIRED)
+if (Jasper_FOUND)
+ list(APPEND LibRaw_LIBRARIES ${JASPER_LIBRARIES})
+ list(APPEND LibRaw_r_LIBRARIES ${JASPER_LIBRARIES})
+endif ()
+
diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index 02adfafe0..f7eabbc22 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,3 +1,3 @@ Source: libusb -Version: 1.0.22-1 +Version: 1.0.22-2 Description: a cross-platform library to access USB devices diff --git a/ports/libusb/fix_c2001.patch b/ports/libusb/fix_c2001.patch new file mode 100644 index 000000000..38c4774a1 --- /dev/null +++ b/ports/libusb/fix_c2001.patch @@ -0,0 +1,92 @@ +diff --git a/msvc/libusb_dll_2015.vcxproj b/msvc/libusb_dll_2015.vcxproj +index ce562f1..e5a19fd 100644 +--- a/msvc/libusb_dll_2015.vcxproj ++++ b/msvc/libusb_dll_2015.vcxproj +@@ -53,10 +53,18 @@ + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <Optimization>Disabled</Optimization> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <ClCompile Condition="'$(Configuration)'=='Release'"> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <Link> + <EmbedManagedResourceFile>libusb-1.0.rc;%(EmbedManagedResourceFile)</EmbedManagedResourceFile> +diff --git a/msvc/libusb_dll_2017.vcxproj b/msvc/libusb_dll_2017.vcxproj +index 8311300..f635aed 100644 +--- a/msvc/libusb_dll_2017.vcxproj ++++ b/msvc/libusb_dll_2017.vcxproj +@@ -53,10 +53,18 @@ + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <Optimization>Disabled</Optimization> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <ClCompile Condition="'$(Configuration)'=='Release'"> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <Link> + <EmbedManagedResourceFile>libusb-1.0.rc;%(EmbedManagedResourceFile)</EmbedManagedResourceFile> +diff --git a/msvc/libusb_static_2015.vcxproj b/msvc/libusb_static_2015.vcxproj +index a182171..ce4cc66 100644 +--- a/msvc/libusb_static_2015.vcxproj ++++ b/msvc/libusb_static_2015.vcxproj +@@ -54,10 +54,18 @@ + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <Optimization>Disabled</Optimization> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <ClCompile Condition="'$(Configuration)'=='Release'"> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)libusb-1.0.lib</OutputFile> +diff --git a/msvc/libusb_static_2017.vcxproj b/msvc/libusb_static_2017.vcxproj +index 1341693..8908450 100644 +--- a/msvc/libusb_static_2017.vcxproj ++++ b/msvc/libusb_static_2017.vcxproj +@@ -54,10 +54,18 @@ + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <Optimization>Disabled</Optimization> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <ClCompile Condition="'$(Configuration)'=='Release'"> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> ++ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)libusb-1.0.lib</OutputFile> diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index 92d008206..d2a96c73b 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -10,6 +10,8 @@ vcpkg_from_github( REF v1.0.22 SHA512 b1fed66aafa82490889ee488832c6884a95d38ce7b28fb7c3234b9bce1f749455d7b91cde397a0abc25101410edb13ab2f9832c59aa7b0ea8c19ba2cf4c63b00 HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix_c2001.patch" ) if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") diff --git a/ports/ms-angle/001-fix-uwp.patch b/ports/ms-angle/001-fix-uwp.patch new file mode 100644 index 000000000..0e83f07fa --- /dev/null +++ b/ports/ms-angle/001-fix-uwp.patch @@ -0,0 +1,56 @@ +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp +index 7c769e147..08e7a663f 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp +@@ -209,12 +209,12 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWind + + static float GetLogicalDpi() + { +- ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties; ++ ComPtr<ABI::Windows::Graphics::Display::IDisplayInformation> displayInformation; + +- if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), displayProperties.GetAddressOf()))) ++ if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), displayInformation.GetAddressOf()))) + { + float dpi = 96.0f; +- if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi))) ++ if (SUCCEEDED(displayInformation->get_LogicalDpi(&dpi))) + { + return dpi; + } +diff --git a/src/common/mathutil.h b/src/common/mathutil.h +index dcb7d8d62..774b80506 100644 +--- a/src/common/mathutil.h ++++ b/src/common/mathutil.h +@@ -150,7 +150,7 @@ inline bool supportsSSE2() + return supports; + } + +-#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) ++#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) && !defined(_M_ARM64) + { + int info[4]; + __cpuid(info, 0); +@@ -884,7 +884,7 @@ inline uint32_t BitfieldReverse(uint32_t value) + + // Count the 1 bits. + #if defined(ANGLE_PLATFORM_WINDOWS) +-#if defined(_M_ARM) ++#if defined(_M_ARM) || defined(_M_ARM64) + inline int BitCount(uint32_t bits) + { + bits = bits - ((bits >> 1) & 0x55555555); +diff --git a/src/common/platform.h b/src/common/platform.h +index 8287f5b2e..6de52b500 100644 +--- a/src/common/platform.h ++++ b/src/common/platform.h +@@ -84,7 +84,7 @@ + # undef far + #endif + +-#if defined(_MSC_VER) && !defined(_M_ARM) ++#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) + #include <intrin.h> + #define ANGLE_USE_SSE + #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) +
\ No newline at end of file diff --git a/ports/ms-angle/CMakeLists.txt b/ports/ms-angle/CMakeLists.txt new file mode 100644 index 000000000..a0ec171d3 --- /dev/null +++ b/ports/ms-angle/CMakeLists.txt @@ -0,0 +1,221 @@ +cmake_minimum_required(VERSION 3.8) +project(angle CXX) + +if(WIN32 AND NOT WINDOWS_STORE) + set(WINDOWS_DESKTOP 1) +else() + set(WINDOWS_DESKTOP 0) +endif() + +add_compile_options(/d2guard4 /Wv:18) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf") +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") + +add_definitions( + -D_CRT_SECURE_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + -D_HAS_EXCEPTIONS=0 + -DNOMINMAX + -DANGLE_STANDALONE_BUILD + -DANGLE_ENABLE_DEBUG_ANNOTATIONS +) + +configure_file(src/commit.h include/id/commit.h COPYONLY) +include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) + +########## +# angle::common +file(GLOB ANGLE_COMMON_SOURCES + "src/common/*.h" + "src/common/*.inl" + "src/common/*.cpp" + "src/common/third_party/base/*.h" + "src/common/third_party/base/anglebase/*.cc" + "src/common/third_party/base/anglebase/*.h" + "src/common/third_party/smhasher/src/*.h" + "src/common/third_party/smhasher/src/*.cpp") +list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) +target_include_directories(angle_common PUBLIC src/common/third_party/base) +add_library(angle::common ALIAS angle_common) + +########## +# angle::image_util +file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") +add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) +target_link_libraries(angle_image_util PRIVATE angle::common) +add_library(angle::image_util ALIAS angle_image_util) + +########## +# angle::translator +file(GLOB TRANSLATOR_SOURCES + "src/compiler/translator/glslang.l" + "src/compiler/translator/glslang.y" + "src/compiler/translator/*.h" + "src/compiler/translator/*.cpp" + "src/third_party/compiler/ArrayBoundsClamper.cpp" +) +add_library(angle_translator STATIC ${TRANSLATOR_SOURCES}) +target_compile_definitions(angle_translator PUBLIC + -DANGLE_ENABLE_ESSL + -DANGLE_ENABLE_GLSL + -DANGLE_ENABLE_HLSL +) +target_link_libraries(angle_translator PRIVATE angle::common) +add_library(angle::translator ALIAS angle_translator) + +########## +# angle::preprocessor +file(GLOB PREPROCESSOR_SOURCES + "src/compiler/preprocessor/*.h" + "src/compiler/preprocessor/*.cpp" +) +add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES}) +target_link_libraries(angle_preprocessor PRIVATE angle::common) +add_library(angle::preprocessor ALIAS angle_preprocessor) + +########## +# libANGLE + +## OpenGL Renderer +if(WINDOWS_DESKTOP) + file(GLOB LIBANGLE_GL_SOURCES + "src/libANGLE/renderer/gl/*.cpp" + "src/libANGLE/renderer/gl/*.inl" + "src/libANGLE/renderer/gl/*.h" + + "src/libANGLE/renderer/gl/wgl/*.cpp" + "src/libANGLE/renderer/gl/wgl/*.inl" + "src/libANGLE/renderer/gl/wgl/*.h" + ) + list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest") + add_library(angle_renderer_opengl INTERFACE) + target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES}) + target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL) + add_library(angle::renderer::opengl ALIAS angle_renderer_opengl) +endif() + +## All D3D Sources +file(GLOB_RECURSE LIBANGLE_D3D_SOURCES + "src/libANGLE/renderer/d3d/*.cpp" + "src/libANGLE/renderer/d3d/*.inl" + "src/libANGLE/renderer/d3d/*.h" +) +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest") + +## WinRT D3D Renderer +if(WINDOWS_STORE) + set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt") + add_library(angle_renderer_winrt INTERFACE) + target_sources(angle_renderer_winrt INTERFACE ${LIBANGLE_D3D_WINRT_SOURCES}) + add_library(angle::renderer::winrt ALIAS angle_renderer_winrt) +endif() + +## Win32/d3d9 D3D Renderer +if(WINDOWS_DESKTOP) + set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32") + find_library(D3D9_LIB NAMES d3d9) + add_library(angle_renderer_win32 INTERFACE) + target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES}) + target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9) + target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB}) + add_library(angle::renderer::win32 ALIAS angle_renderer_win32) +endif() + +## D3D11 Base renderer +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32") +find_library(DXGUID_LIB NAMES dxguid) +find_library(D3D11_LIB NAMES d3d11) +add_library(angle_renderer_d3d INTERFACE) +target_sources(angle_renderer_d3d INTERFACE ${LIBANGLE_D3D_SOURCES}) +target_compile_definitions(angle_renderer_d3d INTERFACE + -DANGLE_ENABLE_D3D11 + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" +) +target_link_libraries(angle_renderer_d3d INTERFACE ${D3D11_LIB} ${DXGUID_LIB}) +add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) + +## Core libANGLE library +file(GLOB LIBANGLE_SOURCES + "src/third_party/systeminfo/SystemInfo.cpp" + "src/common/third_party/murmurhash/MurmurHash3.cpp" + "src/common/event_tracer.cpp" + + "src/libANGLE/*.cpp" + "src/libANGLE/*.inl" + "src/libANGLE/*.h" + + "src/libANGLE/renderer/*.cpp" + "src/libANGLE/renderer/*.inl" + "src/libANGLE/renderer/*.h" + + "src/libANGLE/renderer/null/*.cpp" + "src/libANGLE/renderer/null/*.inl" + "src/libANGLE/renderer/null/*.h" +) +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") + +add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) +target_link_libraries(libANGLE PRIVATE + angle::common + angle::image_util + angle::translator + angle::preprocessor + angle::renderer::d3d + $<$<BOOL:${WINDOWS_STORE}>:angle::renderer::winrt> + $<$<BOOL:${WINDOWS_DESKTOP}>:angle::renderer::win32> + $<$<BOOL:${WINDOWS_DESKTOP}>:angle::renderer::opengl> + $<$<BOOL:${WINDOWS_DESKTOP}>:gdi32> +) +target_include_directories(libANGLE PRIVATE "src/third_party/khronos") +target_compile_definitions(libANGLE + PRIVATE -DANGLE_ENABLE_NULL + PUBLIC -DLIBANGLE_IMPLEMENTATION +) +add_library(angle::libANGLE ALIAS libANGLE) + +########## +# libGLESv2 +file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") +add_library(libGLESv2 ${LIBGLESV2_SOURCES}) +target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE) +target_compile_definitions(libGLESv2 + PRIVATE -DLIBGLESV2_IMPLEMENTATION + PUBLIC + -DGL_GLEXT_PROTOTYPES + -DGL_APICALL= + -DEGLAPI= +) +target_include_directories(libGLESv2 PUBLIC "$<INSTALL_INTERFACE:include>") + +########## +# libEGL +add_library(libEGL + "src/libEGL/libEGL.def" + "src/libEGL/libEGL.cpp" + "src/libEGL/libEGL.rc" + "src/libEGL/resource.h" +) +target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) +target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>") + +install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(EXPORT ANGLEExport FILE ms-angle-config.cmake NAMESPACE ms-angle:: DESTINATION share/ms-angle) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" + PATTERN "GLSLANG" EXCLUDE + PATTERN "export.h" EXCLUDE + ) +endif() diff --git a/ports/ms-angle/CONTROL b/ports/ms-angle/CONTROL new file mode 100644 index 000000000..c3cf500b3 --- /dev/null +++ b/ports/ms-angle/CONTROL @@ -0,0 +1,4 @@ +Source: ms-angle
+Version: 2018-04-18
+Description: The UWP version of a conformant OpenGL ES implementation for Windows, Mac and Linux.
+ The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support.
diff --git a/ports/ms-angle/portfile.cmake b/ports/ms-angle/portfile.cmake new file mode 100644 index 000000000..afaec0bf3 --- /dev/null +++ b/ports/ms-angle/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions)
+
+if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ message(FATAL_ERROR "This portfile does not support Linux or OSX")
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(STATUS "ANGLE currently only supports being built as a dynamic library")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO microsoft/angle
+ REF ms-master
+ SHA512 eecdb7012c0630b24fde540fb6a558f4ee5326fc1218773b779953d0fe0ef02da68ceb2577822cfc0374392a88b871201bfe291e3b85c3dd005edc83f84fec1f
+)
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/ms-angle)
+
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ms-angle RENAME copyright)
diff --git a/ports/nmap/CONTROL b/ports/nmap/CONTROL new file mode 100644 index 000000000..8dcace63e --- /dev/null +++ b/ports/nmap/CONTROL @@ -0,0 +1,4 @@ +Source: nmap +Version: 7.70 +Build-Depends: winpcap, lua, openssl, python2, libssh2 +Description: A library for scanning network ports. diff --git a/ports/nmap/build.sh b/ports/nmap/build.sh new file mode 100644 index 000000000..f4e5d4b29 --- /dev/null +++ b/ports/nmap/build.sh @@ -0,0 +1,24 @@ +#!/usr/bin/bash +set -e +export PATH=/usr/bin:$PATH +# Export HTTP(S)_PROXY as http(s)_proxy: +if [ "$HTTP_PROXY" ]; then + export http_proxy=$HTTP_PROXY +fi +if [ "$HTTPS_PROXY" ]; then + export https_proxy=$HTTPS_PROXY +fi + +PATH_TO_BUILD_DIR="`cygpath "$1"`" +PATH_TO_SRC_DIR="`cygpath "$2"`" +PATH_TO_PACKAGE_DIR="`cygpath "$3"`" +# Note: $4 is extra configure options + +cd "$PATH_TO_BUILD_DIR" +echo "=== CONFIGURING ===" +echo "building nmap package $PATH_TO_SRC_DIR" +"$PATH_TO_SRC_DIR/configure" CC=cl.exe LD=link.exe CXX=lc.exe "--prefix=$PATH_TO_PACKAGE_DIR" $4 +echo "=== BUILDING ===" +make -j6 +echo "=== INSTALLING ===" +make install diff --git a/ports/nmap/detect-crypto-library.patch b/ports/nmap/detect-crypto-library.patch new file mode 100644 index 000000000..243735b9e --- /dev/null +++ b/ports/nmap/detect-crypto-library.patch @@ -0,0 +1,75 @@ +--- a/configure 2017-11-01 23:55:49.000000000 +0100 ++++ b/configure 2019-03-05 03:35:21.753268300 +0100 +@@ -5989,13 +5989,13 @@ + + # use_openssl="yes" given explicitly in next 2 rules to avoid adding lib to $LIBS + if test "$use_openssl" = "yes"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIO_int_ctrl in -lcrypto" >&5 +-$as_echo_n "checking for BIO_int_ctrl in -lcrypto... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIO_int_ctrl in -llibeay32" >&5 ++$as_echo_n "checking for BIO_int_ctrl in -llibeay32... " >&6; } + if ${ac_cv_lib_crypto_BIO_int_ctrl+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" ++LIBS="-llibeay32 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -6030,23 +6030,23 @@ + else + use_openssl="no" + if test "$with_openssl" = "yes"; then +- as_fn_error $? "OpenSSL was explicitly requested but libcrypto was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." "$LINENO" 5 ++ as_fn_error $? "OpenSSL was explicitly requested but libeay32 was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." "$LINENO" 5 + fi +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find libcrypto so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 +-$as_echo "$as_me: WARNING: Failed to find libcrypto so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find libeay32 so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 ++$as_echo "$as_me: WARNING: Failed to find libeay32 so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} + + fi + + fi + + if test "$use_openssl" = "yes"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 +-$as_echo_n "checking for SSL_new in -lssl... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssleay32" >&5 ++$as_echo_n "checking for SSL_new in -lssleay32... " >&6; } + if ${ac_cv_lib_ssl_SSL_new+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lssl -lcrypto $LIBS" ++LIBS="-lssleay32 -llibeay32 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -6090,13 +6090,13 @@ + fi + + if test "$use_openssl" = "yes"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_get1_EC_KEY in -lcrypto" >&5 +-$as_echo_n "checking for EVP_PKEY_get1_EC_KEY in -lcrypto... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_get1_EC_KEY in -llibeay32" >&5 ++$as_echo_n "checking for EVP_PKEY_get1_EC_KEY in -llibeay32... " >&6; } + if ${ac_cv_lib_crypto_EVP_PKEY_get1_EC_KEY+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" ++LIBS="-llibeay32 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -6144,7 +6144,7 @@ + + $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h + +- OPENSSL_LIBS="-lssl -lcrypto" ++ OPENSSL_LIBS="-lssleay32 -llibeay32" + else + trace_no_use="$trace_no_use openssl" + fi diff --git a/ports/nmap/portfile.cmake b/ports/nmap/portfile.cmake new file mode 100644 index 000000000..5e2e05787 --- /dev/null +++ b/ports/nmap/portfile.cmake @@ -0,0 +1,134 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://nmap.org/dist/nmap-7.70.tar.bz2" + FILENAME "nmap-7.70.tar.bz2" + SHA512 084c148b022ff6550e269d976d0077f7932a10e2ef218236fe13aa3a70b4eb6506df03329868fc68cb3ce78e4360b200f5a7a491d3145028fed679ef1c9ecae5 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${SQLITE_VERSION} +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/detect-crypto-library.patch +) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make) +else() + vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make) +endif() +set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) +set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") +set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}") + +set(_csc_PROJECT_PATH nmap) + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") + set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") + set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") + + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + vcpkg_find_acquire_program(GASPREPROCESSOR) + foreach(GAS_PATH ${GASPREPROCESSOR}) + get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${GAS_ITEM_PATH}") + endforeach(GAS_PATH) + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + else() + message(FATAL_ERROR "Unsupported architecture") + endif() +endif() + + +set(OPTIONS "--with-openssl=${VCPKG_ROOT_DIR}/installed/x64-windows/bin/ --with-libssh2=${VCPKG_ROOT_DIR}/installed/x64-windows/bin/") + +message(STATUS "Building Options: ${OPTIONS}") + +set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html +set(OPTIONS_RELEASE "") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPTIONS "${OPTIONS} --disable-static --enable-shared") + if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") + endif() +endif() + +message(STATUS "Building Options: ${OPTIONS}") + +message(STATUS "Building ${_csc_PROJECT_PATH} for Release") +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" # BUILD DIR + "${SOURCE_PATH}" # SOURCE DIR + "${CURRENT_PACKAGES_DIR}" # PACKAGE DIR + "${OPTIONS} ${OPTIONS_RELEASE}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel +) + +message(STATUS "Building ${_csc_PROJECT_PATH} for Debug") +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" # BUILD DIR + "${SOURCE_PATH}" # SOURCE DIR + "${CURRENT_PACKAGES_DIR}/debug" # PACKAGE DIR + "${OPTIONS} ${OPTIONS_DEBUG}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg +) + +file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(LIB_MACHINE_ARG /machine:ARM) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(LIB_MACHINE_ARG /machine:x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(LIB_MACHINE_ARG /machine:x64) +else() + message(FATAL_ERROR "Unsupported target architecture") +endif() + +foreach(DEF_FILE ${DEF_FILES}) + get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY) + get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME) + string(REGEX REPLACE "-[0-9]*\\.def" ".lib" OUT_FILE_NAME "${DEF_FILE_NAME}") + file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE) + file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE) + message(STATUS "Generating ${OUT_FILE_NATIVE}") + vcpkg_execute_required_process( + COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG} + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR} + LOGNAME libconvert-${TARGET_TRIPLET} + ) +endforeach() + +file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp) +file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) +file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +set(FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${DEF_FILES} ${EXE_FILES}) +list(LENGTH FILES_TO_REMOVE FILES_TO_REMOVE_LEN) +if(FILES_TO_REMOVE_LEN GREATER 0) + file(REMOVE ${FILES_TO_REMOVE}) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +# Handle copyright +# TODO: Examine build log and confirm that this license matches the build output +file(RENAME ${CURRENT_PACKAGES_DIR}/COPYING ${CURRENT_PACKAGES_DIR}/copyright) diff --git a/ports/nmap/usage b/ports/nmap/usage new file mode 100644 index 000000000..d910c7d2e --- /dev/null +++ b/ports/nmap/usage @@ -0,0 +1,5 @@ +The package curl is compatible with built-in CMake targets: + + find_package(NMAP REQUIRED) + target_link_libraries(main PRIVATE ${NMAP_LIBRARIES}) + target_include_directories(main PRIVATE ${NMAP_INCLUDE_DIRS}) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 03328915d..88ade6e28 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.4.3-6 +Version: 3.4.3-7 Build-Depends: zlib Description: computer vision library Default-Features: opengl, jpeg, png, tiff, eigen, flann @@ -80,3 +80,6 @@ Description: JPEG 2000 support for opencv Feature: eigen Build-Depends: eigen3 Description: Eigen support for opencv + +Feature: nonfree +Description: allow nonfree and unredistributable libraries diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 49e42466a..7c6594e1b 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -212,6 +212,11 @@ if("eigen" IN_LIST FEATURES) set(WITH_EIGEN ON) endif() +set(OPENCV_ENABLE_NONFREE OFF) +if("nonfree" IN_LIST FEATURES) + set(OPENCV_ENABLE_NONFREE ON) +endif() + if(BUILD_opencv_contrib) vcpkg_from_github( OUT_SOURCE_PATH CONTRIB_SOURCE_PATH @@ -278,6 +283,7 @@ vcpkg_configure_cmake( # ENABLE -DENABLE_CXX11=ON -DENABLE_PYLINT=OFF + -DOPENCV_ENABLE_NONFREE=${OPENCV_ENABLE_NONFREE} # INSTALL -DINSTALL_FORCE_UNIX_PATHS=ON -DINSTALL_LICENSE=OFF diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 5817429fa..640d9b91c 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,8 +1,16 @@ Source: poco -Version: 1.9.0-1 -Build-Depends: zlib, pcre, sqlite3, expat -Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. +Version: 2.0.0-pre +Build-Depends: expat, libpq, pcre, sqlite3, zlib +Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. (https://github.com/pocoproject/poco) Feature: mysql Build-Depends: libmysql Description: Mysql support for POCO + +Feature: mariadb +Build-Depends: libmariadb +Description: MariaDB support for POCO + +Feature: postgresql +Build-Depends: libpqxx +Description: PostgreSQL support for POCO diff --git a/ports/poco/config_h.patch b/ports/poco/config_h.patch deleted file mode 100644 index 1387fd0c9..000000000 --- a/ports/poco/config_h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Foundation/include/Poco/Config.h b/Foundation/include/Poco/Config.h -index 003b6dc..55b8eed 100644 ---- a/Foundation/include/Poco/Config.h -+++ b/Foundation/include/Poco/Config.h -@@ -31,7 +31,7 @@ - - - // Define to disable implicit linking --// #define POCO_NO_AUTOMATIC_LIBS -+#define POCO_NO_AUTOMATIC_LIBS - - - // Define to disable automatic initialization diff --git a/ports/poco/find_pcre.patch b/ports/poco/find_pcre.patch index b846660f7..1a07882bc 100644 --- a/ports/poco/find_pcre.patch +++ b/ports/poco/find_pcre.patch @@ -1,13 +1,13 @@ -diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake -index 03f07df..4da1895 100644 ---- a/cmake/FindPCRE.cmake -+++ b/cmake/FindPCRE.cmake -@@ -16,7 +16,7 @@ ENDIF (PCRE_INCLUDE_DIRS) - - FIND_PATH(PCRE_INCLUDE_DIR pcre.h) - --SET(PCRE_NAMES pcre) -+SET(PCRE_NAMES pcred pcre) - FIND_LIBRARY(PCRE_LIBRARY NAMES ${PCRE_NAMES} ) - - # handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if +diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake
+index 41a99cb..77f3a42 100644
+--- a/cmake/FindPCRE.cmake
++++ b/cmake/FindPCRE.cmake
+@@ -14,7 +14,7 @@ ENDIF (PCRE_INCLUDE_DIRS)
+
+ FIND_PATH(PCRE_INCLUDE_DIR pcre.h)
+
+-SET(PCRE_NAMES pcre)
++SET(PCRE_NAMES pcred pcre)
+ FIND_LIBRARY(PCRE_LIBRARY NAMES ${PCRE_NAMES} )
+
+ # handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
diff --git a/ports/poco/foundation-public-include-pcre.patch b/ports/poco/include_pcre.patch index ab4403ad8..6594a30fe 100644 --- a/ports/poco/foundation-public-include-pcre.patch +++ b/ports/poco/include_pcre.patch @@ -1,12 +1,12 @@ -diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt -index 76005b1..efc99b6 100644 ---- a/Foundation/CMakeLists.txt -+++ b/Foundation/CMakeLists.txt -@@ -166,6 +166,7 @@ target_link_libraries( "${LIBNAME}" ${SYSLIBS}) - target_include_directories( "${LIBNAME}" - PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> -+ $<BUILD_INTERFACE:${PCRE_INCLUDE_DIRS}> - $<INSTALL_INTERFACE:include> - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src - ) +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
+index 5b7df96..4fedfd5 100644
+--- a/Foundation/CMakeLists.txt
++++ b/Foundation/CMakeLists.txt
+@@ -101,6 +101,7 @@ target_link_libraries(Foundation PUBLIC ${PCRE_LIBRARIES} ${ZLIB_LIBRARIES})
+ target_include_directories(Foundation
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
++ $<BUILD_INTERFACE:${PCRE_INCLUDE_DIRS}>
+ $<INSTALL_INTERFACE:include>
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
+ )
diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 0eb160daa..2aaa89295 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -1,55 +1,125 @@ include(vcpkg_common_functions) +# Poco 2.0.0 (pre) +# commit 46e00c8 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pocoproject/poco - REF poco-1.9.0-release - SHA512 de2346d62b2e89ba04abe62a83f6ede7a496e80bcbe53a880a1aa8e87a8ebd9a430dd70fdc6aada836bb1021c6df21375fd0cbcf62dbb6e29a2f65d6d90cf2b9 + REF 46e00c8d6f6d03864397c3e517a165e82f9efd5e + SHA512 2c2f5048b7bfbbfe47ac303ed79213197c97f3d90362dd2d7629c8b353a6c8bd303b1bcf477e3493cc6c984645822ca043dd0a77e9186e001e6808dc2d17a5b4 HEAD_REF develop PATCHES - config_h.patch + # Find pcre in debug find_pcre.patch - foundation-public-include-pcre.patch - fix-static-internal-pcre.patch + # Add include path to public interface for static build + include_pcre.patch + # Fix embedded copy of pcre in static linking mode + static_pcre.patch + # Fix source path of PDF + unbundled_pdf.patch ) +# define Poco linkage type string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT) -if("mysql" IN_LIST FEATURES) - # enabling MySQL support - set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") - set(MYSQL_LIB "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") - set(MYSQL_LIB_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") +# MySQL / MariaDDB feature +if("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES) + if("mysql" IN_LIST FEATURES) + # enabling MySQL support + set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") + set(MYSQL_LIBRARY "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") + set(MYSQL_LIBRARY_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") + endif() + if("mariadb" IN_LIST FEATURES) + # enabling MariaDB support + set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") + set(MYSQL_LIBRARY "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib") + set(MYSQL_LIBRARY_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib") + endif() endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + #PREFER_NINJA OPTIONS + # Set to OFF|ON (default is OFF) to control linking dependencies as external + -DPOCO_UNBUNDLED=ON + # Define linking feature -DPOCO_STATIC=${POCO_STATIC} -DPOCO_MT=${POCO_MT} - -DENABLE_SEVENZIP=ON - -DENABLE_TESTS=OFF - -DPOCO_UNBUNDLED=ON # OFF means: using internal copy of sqlite, libz, pcre, expat, ... + # Set to OFF|ON (default is OFF) to control build of POCO tests + -DPOCO_ENABLE_TESTS=OFF + # Set to OFF|ON (default is OFF) to control build of POCO samples + -DPOCO_ENABLE_SAMPLES=OFF + # Allow enabling and disabling components + # POCO_ENABLE_SQL_ODBC, POCO_ENABLE_SQL_MYSQL and POCO_ENABLE_SQL_POSTGRESQL are + # defined on the fly if the required librairies are present + -DPOCO_ENABLE_ENCODINGS=ON + -DPOCO_ENABLE_ENCODINGS_COMPILER=ON + -DPOCO_ENABLE_XML=ON + -DPOCO_ENABLE_JSON=ON + -DPOCO_ENABLE_MONGODB=ON + -DPOCO_ENABLE_SQL_SQLITE=ON + -DPOCO_ENABLE_REDIS=ON + -DPOCO_ENABLE_PDF=ON + -DPOCO_ENABLE_UTIL=ON + -DPOCO_ENABLE_NET=ON + -DPOCO_ENABLE_SEVENZIP=ON + -DPOCO_ENABLE_ZIP=ON + -DPOCO_ENABLE_CPPPARSER=ON + -DPOCO_ENABLE_POCODOC=ON + -DPOCO_ENABLE_PAGECOMPILER=ON + -DPOCO_ENABLE_PAGECOMPILER_FILE2PAGE=ON + -DPOCO_ENABLE_WSTRING=ON + -DPOCO_ENABLE_FPENVIRONMENT=ON + -DPOCO_ENABLE_CPPUNIT=ON + # -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} OPTIONS_RELEASE - -DMYSQL_LIB=${MYSQL_LIB} + -DMYSQL_LIBRARY=${MYSQL_LIBRARY} OPTIONS_DEBUG - -DMYSQL_LIB=${MYSQL_LIB_DEBUG} + -DMYSQL_LIBRARY=${MYSQL_LIBRARY_DEBUG} ) vcpkg_install_cmake() + +# Copy additional include files not part of any libraries +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL") + file(COPY ${SOURCE_PATH}/Data/include DESTINATION ${CURRENT_PACKAGES_DIR}) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/MySQL") + file(COPY ${SOURCE_PATH}/Data/MySQL/include DESTINATION ${CURRENT_PACKAGES_DIR}) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/ODBC") + file(COPY ${SOURCE_PATH}/Data/ODBC/include DESTINATION ${CURRENT_PACKAGES_DIR}) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/PostgreSQL") + file(COPY ${SOURCE_PATH}/Data/PostgreSQL/include DESTINATION ${CURRENT_PACKAGES_DIR}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libpq) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/SQLite") + file(COPY ${SOURCE_PATH}/Data/SQLite/include DESTINATION ${CURRENT_PACKAGES_DIR}) +endif() + + +# Move apps to the tools folder file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/cpspc.exe") file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc.exe ${CURRENT_PACKAGES_DIR}/tools/cpspc.exe) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.exe ${CURRENT_PACKAGES_DIR}/tools/f2cpsp.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/PocoDoc.exe ${CURRENT_PACKAGES_DIR}/tools/PocoDoc.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tec.exe ${CURRENT_PACKAGES_DIR}/tools/tec.exe) else() file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc ${CURRENT_PACKAGES_DIR}/tools/cpspc) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp ${CURRENT_PACKAGES_DIR}/tools/f2cpsp) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/PocoDoc ${CURRENT_PACKAGES_DIR}/tools/PocoDoc) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tec ${CURRENT_PACKAGES_DIR}/tools/tec) endif() + +# if (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin @@ -58,15 +128,30 @@ else() file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/cpspc.pdb ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.pdb + ${CURRENT_PACKAGES_DIR}/bin/PocoDoc.pdb + ${CURRENT_PACKAGES_DIR}/bin/tec.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.exe ${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.pdb) + ${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/PocoDoc.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/PocoDoc.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/tec.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/tec.pdb) endif() +# +if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/Poco") + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Poco") +endif() + +# remove unused files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Poco) # copy license file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/poco) file(RENAME ${CURRENT_PACKAGES_DIR}/share/poco/LICENSE ${CURRENT_PACKAGES_DIR}/share/poco/copyright) + +vcpkg_copy_pdbs()
\ No newline at end of file diff --git a/ports/poco/fix-static-internal-pcre.patch b/ports/poco/static_pcre.patch index 970f9e246..b9bac7629 100644 --- a/ports/poco/fix-static-internal-pcre.patch +++ b/ports/poco/static_pcre.patch @@ -1,27 +1,27 @@ -diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt -index d47ced2..ddead59 100644 ---- a/Foundation/CMakeLists.txt -+++ b/Foundation/CMakeLists.txt -@@ -48,6 +48,22 @@ if (POCO_UNBUNDLED) - - add_definitions(-DPOCO_UNBUNDLED) - -+ add_definitions( -+ -D_pcre_utf8_table1=_poco_pcre_utf8_table1 -+ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size -+ -D_pcre_utf8_table2=_poco_pcre_utf8_table2 -+ -D_pcre_utf8_table3=_poco_pcre_utf8_table3 -+ -D_pcre_utf8_table4=_poco_pcre_utf8_table4 -+ -D_pcre_utt_names=_poco_pcre_utt_names -+ -D_pcre_utt=_poco_pcre_utt -+ -D_pcre_utt_size=_poco_pcre_utt_size -+ -D_pcre_OP_lengths=_poco_pcre_OP_lengths -+ -D_pcre_hspace_list=_poco_pcre_hspace_list -+ -D_pcre_vspace_list=_poco_pcre_vspace_list -+ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype -+ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable -+ ) -+ - else() - # pcre - POCO_SOURCES( SRCS pcre +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
+index 4fedfd5..741313b 100644
+--- a/Foundation/CMakeLists.txt
++++ b/Foundation/CMakeLists.txt
+@@ -35,6 +35,22 @@ if (POCO_UNBUNDLED)
+ find_package(PCRE REQUIRED)
+ find_package(ZLIB REQUIRED)
+
++ add_definitions(
++ -D_pcre_utf8_table1=_poco_pcre_utf8_table1
++ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size
++ -D_pcre_utf8_table2=_poco_pcre_utf8_table2
++ -D_pcre_utf8_table3=_poco_pcre_utf8_table3
++ -D_pcre_utf8_table4=_poco_pcre_utf8_table4
++ -D_pcre_utt_names=_poco_pcre_utt_names
++ -D_pcre_utt=_poco_pcre_utt
++ -D_pcre_utt_size=_poco_pcre_utt_size
++ -D_pcre_OP_lengths=_poco_pcre_OP_lengths
++ -D_pcre_hspace_list=_poco_pcre_hspace_list
++ -D_pcre_vspace_list=_poco_pcre_vspace_list
++ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype
++ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable
++ )
++
+ #HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
+ POCO_SOURCES( SRCS RegExp
+ src/pcre_ucd.c
diff --git a/ports/poco/unbundled_pdf.patch b/ports/poco/unbundled_pdf.patch new file mode 100644 index 000000000..b7abcf541 --- /dev/null +++ b/ports/poco/unbundled_pdf.patch @@ -0,0 +1,17 @@ +diff --git a/PDF/CMakeLists.txt b/PDF/CMakeLists.txt
+index b377035..9cfbd32 100644
+--- a/PDF/CMakeLists.txt
++++ b/PDF/CMakeLists.txt
+@@ -31,6 +31,12 @@ endif (POCO_UNBUNDLED)
+ # TODO: Currently only bundled is supported, in future this should also be possible
+ # with an unbundled version of hpdf
+ # hpdf
++if (POCO_UNBUNDLED)
++ POCO_SOURCES( SRCS hpdf
++ src/bmpread.c
++ )
++endif (POCO_UNBUNDLED)
++
+ POCO_SOURCES(SRCS hpdf
+ src/hpdf_3dmeasure.c
+ src/hpdf_annotation.c
diff --git a/ports/pthreads/CMakeLists.txt b/ports/pthreads/CMakeLists.txt index b40c14037..32f25e716 100644 --- a/ports/pthreads/CMakeLists.txt +++ b/ports/pthreads/CMakeLists.txt @@ -197,17 +197,20 @@ set(PTHREADS_COMPILER V) set(PTHREADS_LIBRARY "pthread${PTHREADS_COMPILER}${PTHREADS_EXCEPTION_SCHEME}${PTHREADS_COMPATIBILITY_VERSION}") -include_directories(.) - -add_library(${PTHREADS_LIBRARY} ${PTHREAD_SOURCES}) +add_library(pthreads ${PTHREAD_SOURCES}) +target_include_directories(pthreads PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +set_target_properties(pthreads PROPERTIES OUTPUT_NAME ${PTHREADS_LIBRARY}) +if(NOT DISABLE_INSTALL_HEADERS) + set_property(TARGET pthreads PROPERTY PUBLIC_HEADER ${PTHREAD_PUBLIC_HEADERS}) +endif() install( - TARGETS ${PTHREADS_LIBRARY} + TARGETS pthreads EXPORT pthreads-config RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include + INCLUDES DESTINATION include ) +install(EXPORT pthreads-config DESTINATION share/pthreads) -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES ${PTHREAD_PUBLIC_HEADERS} DESTINATION include) -endif() diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL index 9abc926f9..d22280d90 100644 --- a/ports/pthreads/CONTROL +++ b/ports/pthreads/CONTROL @@ -1,3 +1,3 @@ Source: pthreads -Version: 2.9.1-4 +Version: 2.9.1-5 Description: pthreads for windows diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 18627aba1..43489adb6 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -26,6 +26,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + vcpkg_copy_pdbs() file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/*.h") diff --git a/ports/qt5-base/configure_qt.cmake b/ports/qt5-base/configure_qt.cmake index b66f6d22e..332c003ec 100644 --- a/ports/qt5-base/configure_qt.cmake +++ b/ports/qt5-base/configure_qt.cmake @@ -32,9 +32,9 @@ function(configure_qt) -debug -prefix ${CURRENT_INSTALLED_DIR}/debug -extprefix ${CURRENT_PACKAGES_DIR}/debug - -hostbindir ${CURRENT_INSTALLED_DIR}/debug/tools/qt5 - -archdatadir ${CURRENT_INSTALLED_DIR}/share/qt5/debug - -datadir ${CURRENT_INSTALLED_DIR}/share/qt5/debug + -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug + -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug -plugindir ${CURRENT_INSTALLED_DIR}/debug/plugins -qmldir ${CURRENT_INSTALLED_DIR}/debug/qml -headerdir ${CURRENT_PACKAGES_DIR}/include @@ -53,7 +53,7 @@ function(configure_qt) -release -prefix ${CURRENT_INSTALLED_DIR} -extprefix ${CURRENT_PACKAGES_DIR} - -hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5 + -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 -archdatadir ${CURRENT_INSTALLED_DIR}/share/qt5 -datadir ${CURRENT_INSTALLED_DIR}/share/qt5 -plugindir ${CURRENT_INSTALLED_DIR}/plugins diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 8f7d0f012..8a5de56d7 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -127,7 +127,6 @@ file(REMOVE ${BINARY_TOOLS}) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*")
list(FILTER BINARY_TOOLS EXCLUDE REGEX "\\.dll\$")
file(REMOVE ${BINARY_TOOLS})
-file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL index a06c8abcb..950afc00f 100644 --- a/ports/sdl2-gfx/CONTROL +++ b/ports/sdl2-gfx/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-gfx -Version: 1.0.3-3 +Version: 1.0.4 Build-Depends: sdl2 Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake index f7c2d63f6..9cc6a6ca8 100644 --- a/ports/sdl2-gfx/portfile.cmake +++ b/ports/sdl2-gfx/portfile.cmake @@ -1,11 +1,19 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_gfx-1.0.3) + +set(VERSION 1.0.4) + vcpkg_download_distfile(ARCHIVE - URLS "http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.3.zip" - FILENAME "SDL2_gfx-1.0.3.zip" - SHA512 f68485f71acf979aba68f3575f260fbc95a59496a9639498bcff80ffbfdb157c82a44bb5a0b0e3b1e157376ea4ff2f196f50466e6f24d850f94cfe7c24b1a497 + URLS "http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-${VERSION}.zip" + FILENAME "SDL2_gfx-${VERSION}.zip" + SHA512 213b481469ba2161bd8558a7a5427b129420193b1c3895923d515f69f87991ed2c99bbc44349c60b4bcbb7d7d2255c1f15ee8a3523c26502070cfaacccaa5242 ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index e1ef48bd9..6f9a843ac 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -44,6 +44,7 @@ add_library(SDL2_image IMG_xpm.c IMG_xv.c IMG_xxx.c + IMG_WIC.c version.rc ) diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index c91b0c838..93edd3909 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-image -Version: 2.0.2-3 +Version: 2.0.4 Build-Depends: sdl2, libpng Description: SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV diff --git a/ports/sdl2-image/portfile.cmake b/ports/sdl2-image/portfile.cmake index 82adedaaf..5262bdc50 100644 --- a/ports/sdl2-image/portfile.cmake +++ b/ports/sdl2-image/portfile.cmake @@ -1,12 +1,18 @@ include(vcpkg_common_functions) -set(SDL2_IMAGE_VERSION "2.0.2") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_image-${SDL2_IMAGE_VERSION}) + +set(SDL2_IMAGE_VERSION "2.0.4") + vcpkg_download_distfile(ARCHIVE URLS "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${SDL2_IMAGE_VERSION}.zip" FILENAME "SDL2_image-${SDL2_IMAGE_VERSION}.zip" - SHA512 bf143bdbd3cb7cfad61b8dcc35950584304deac802bad6c0c8144e914401a5ddef01f674d2dc1214371d0f371f76e87a45873e2655947e8e1da83fb44d8285f4 + SHA512 b26ef2546718754481385ddad800ee61c84c58a9e141127c0a12215362d41c23603bfb21d556803396c0cb17bd7f48a45dd1b2e66573a1b2e32f590cc3fa48d0 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${SDL2_IMAGE_VERSION} ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 5edb15906..c8934abd3 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -45,6 +45,15 @@ if(SDL_MIXER_ENABLE_OGGVORBIS) list(APPEND SDL_MIXER_DEFINES MUSIC_OGG) endif() +# Opus support +if(SDL_MIXER_ENABLE_OPUS) + find_path(OPUS_INCLUDE_DIR opus/opusfile.h) + find_library(OPUSFILE_LIBRARY opusfile) + list(APPEND SDL_MIXER_INCLUDES ${OPUS_INCLUDE_DIR}) + list(APPEND SDL_MIXER_LIBRARIES ${OPUSFILE_LIBRARY}) + list(APPEND SDL_MIXER_DEFINES MUSIC_OPUS) +endif() + add_library(SDL2_mixer effect_position.c effect_stereoreverse.c @@ -61,7 +70,7 @@ add_library(SDL2_mixer music_modplug.c music_mpg123.c music_ogg.c - music_smpeg.c + music_opus.c music_timidity.c music_wav.c version.rc) diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index 77cf2ae0d..5e209401d 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-mixer -Version: 2.0.2-6 +Version: 2.0.4 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2 @@ -18,3 +18,7 @@ Build-Depends: libmodplug Feature: libvorbis Description: Support for OGG Vorbis audio format. Build-Depends: libvorbis + +Feature: opusfile +Description: Support for Opus audio format. +Build-Depends: opusfile diff --git a/ports/sdl2-mixer/portfile.cmake b/ports/sdl2-mixer/portfile.cmake index b0cb9af14..cfc76055f 100644 --- a/ports/sdl2-mixer/portfile.cmake +++ b/ports/sdl2-mixer/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SDL2_MIXER_VERSION 2.0.2) +set(SDL2_MIXER_VERSION 2.0.4) vcpkg_download_distfile(ARCHIVE URLS "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${SDL2_MIXER_VERSION}.zip" FILENAME "SDL2_mixer-${SDL2_MIXER_VERSION}.zip" - SHA512 da0c27c560a153d57d69a1b6c58a288f017762afc654749957072900a904d3dac19a0efcb68516cb166546d29ff570462385016e0041dae6f393ccb4bbd2ffbc + SHA512 359b4f9877804f9c4b3cb608ca6082aab684f07a20a816ab71c8cdf85d26f76d67eeb5aee44daf52b7935d82aa3b45941f8f53f07ca3dd5150d6c58ed99e1492 ) vcpkg_extract_source_archive_ex( @@ -33,6 +33,11 @@ if("libvorbis" IN_LIST FEATURES) set(USE_OGGVORBIS ON) endif() +set(USE_OPUS OFF) +if("opusfile" IN_LIST FEATURES) + set(USE_OPUS ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -40,7 +45,8 @@ vcpkg_configure_cmake( -DSDL_MIXER_ENABLE_MP3=${USE_MP3} # mpg123 -DSDL_MIXER_ENABLE_FLAC=${USE_FLAC} # libflac -DSDL_MIXER_ENABLE_MOD=${USE_MOD} # libmodplug - -DSDL_MIXER_ENABLE_OGGVORBIS=${USE_OGGVORBIS} # libvorbis + -DSDL_MIXER_ENABLE_OGGVORBIS=${USE_OGGVORBIS} # libvorbis + -DSDL_MIXER_ENABLE_OPUS=${USE_OPUS} # opusfile OPTIONS_DEBUG -DSDL_MIXER_SKIP_HEADERS=ON ) diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL index 362daf221..78207393e 100644 --- a/ports/sdl2-ttf/CONTROL +++ b/ports/sdl2-ttf/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-ttf -Version: 2.0.14-4 +Version: 2.0.15 Description: A library for rendering TrueType fonts with SDL Build-Depends: sdl2, freetype diff --git a/ports/sdl2-ttf/portfile.cmake b/ports/sdl2-ttf/portfile.cmake index 5cbb0a2d0..2efd91116 100644 --- a/ports/sdl2-ttf/portfile.cmake +++ b/ports/sdl2-ttf/portfile.cmake @@ -1,12 +1,18 @@ - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_ttf-2.0.14) + +set(VERSION 2.0.15) + vcpkg_download_distfile(ARCHIVE - URLS "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz" - FILENAME "SDL2_ttf-2.0.14.tar.gz" - SHA512 4db817573fd216e26180f4c401cc869ce407589a461032fd7167dc612d35e038cca1ab67be7909b6b49c741581a68125ab46362ad8e3c0a2cdd39624ad847099) - -vcpkg_extract_source_archive(${ARCHIVE}) + URLS "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${VERSION}.tar.gz" + FILENAME "SDL2_ttf-${VERSION}.tar.gz" + SHA512 30d685932c3dd6f2c94e2778357a5c502f0421374293d7102a64d92f9c7861229bf36bedf51c1a698b296a58c858ca442d97afb908b7df1592fc8d4f8ae8ddfd +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/shaderc/0001-Add-a-virtual-destructor.patch b/ports/shaderc/0001-Add-a-virtual-destructor.patch new file mode 100644 index 000000000..0fa695036 --- /dev/null +++ b/ports/shaderc/0001-Add-a-virtual-destructor.patch @@ -0,0 +1,23 @@ +From 563bc6e87a43c38b5495469307922c768edbd191 Mon Sep 17 00:00:00 2001 +From: neil <neil@codeplay.com> +Date: Thu, 1 Feb 2018 06:49:44 +0000 +Subject: [PATCH] Add a virtual destructor, otherwise Clang 6.0complains about + delete being called on an abstract class. + +--- + libshaderc/include/shaderc/shaderc.hpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp +index 1c557431..335f0df9 100644 +--- a/libshaderc/include/shaderc/shaderc.hpp ++++ b/libshaderc/include/shaderc/shaderc.hpp +@@ -180,6 +180,8 @@ class CompileOptions { + + // Handles shaderc_include_result_release_fn callbacks. + virtual void ReleaseInclude(shaderc_include_result* data) = 0; ++ ++ virtual ~IncluderInterface() = default; + }; + + // Sets the includer instance for libshaderc to call during compilation, as diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index c77110dbe..5f1f70572 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( HEAD_REF master PATCHES 0001-Do-not-generate-build-version.inc.patch + 0001-Add-a-virtual-destructor.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) diff --git a/ports/simdjson/CONTROL b/ports/simdjson/CONTROL new file mode 100644 index 000000000..8c71eeee5 --- /dev/null +++ b/ports/simdjson/CONTROL @@ -0,0 +1,3 @@ +Source: simdjson
+Version: 2019-03-09
+Description: A extremely fast JSON library that can parse gigabytes of JSON per second
diff --git a/ports/simdjson/portfile.cmake b/ports/simdjson/portfile.cmake new file mode 100644 index 000000000..f6b2f347a --- /dev/null +++ b/ports/simdjson/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions)
+
+# https://github.com/Microsoft/vcpkg/issues/5418#issuecomment-470519894
+if(TARGET_TRIPLET MATCHES "^(x86|arm-)")
+ message(FATAL_ERROR "simdjson doesn't support x86 or 32-bit ARM architecture.")
+elseif(TARGET_TRIPLET MATCHES "^arm64")
+ message(FATAL_ERROR "simdjson doesn't support ARM64 architecture currently.")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lemire/simdjson
+ REF d2fa086198b77df44e7fa48b25200e118fa81eb0
+ SHA512 fe92b65e44502381d286b6a7c949055d185e56e7c244a5ab3086b2fe7da76ce81a966daa2d8459794ff0a911b426b1c77e1fc9ef0d616e20868621b1bb30cf67
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMDJSON_BUILD_STATIC)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DSIMDJSON_BUILD_STATIC=${SIMDJSON_BUILD_STATIC}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+#vcpkg_test_cmake(PACKAGE_NAME ${PORT})
diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 8e05a6da9..bf9868021 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.24.2 +Version: 5.5.24.3 Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels. diff --git a/ports/sobjectizer/portfile.cmake b/ports/sobjectizer/portfile.cmake index df10f6792..8b1e53be9 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 5.5.24.2) +set(VERSION 5.5.24.3) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev) vcpkg_download_distfile(ARCHIVE URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip" FILENAME "so-${VERSION}.zip" - SHA512 50c80efc780850c394f3966f202ce45cde2cbef470ee6ead9c62239a1e9b60b28a970d8b217eca713b09118fbe4a8fc974a35f754d2f3ed395e2752bccd3e330 + SHA512 b3421dd2c84d9143a425f2144ce8810a75a55182316107f72513ee931d737e7f86867640010cab0e67ff6d3ea79ebe9eda22b7f1876b632b1575dfc52de3eeef ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/tgui/CONTROL b/ports/tgui/CONTROL index 521a36c48..b69819c8d 100644 --- a/ports/tgui/CONTROL +++ b/ports/tgui/CONTROL @@ -1,4 +1,7 @@ Source: tgui
-Version: 0.8.4-1
-Description: TGUI is an easy to use, cross-platform, c++ GUI for SFML.
+Version: 0.8.4-2
+Description: TGUI is an easy to use, cross-platform, C++ GUI for SFML.
Build-Depends: sfml
+
+Feature: tool
+Description: Build GUI builder
diff --git a/ports/tgui/portfile.cmake b/ports/tgui/portfile.cmake index 9350e8480..d0f400eca 100644 --- a/ports/tgui/portfile.cmake +++ b/ports/tgui/portfile.cmake @@ -11,16 +11,25 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE}
)
+set(TGUI_SHARE_PATH ${CURRENT_PACKAGES_DIR}/share/tgui)
+set(TGUI_TOOLS_PATH ${CURRENT_PACKAGES_DIR}/tools/tgui)
+
# Enable static build
-file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindSFML.cmake)
-string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" TGUI_SHARED_LIBS)
+file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindSFML.cmake")
+string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" TGUI_SHARED_LIBS)
+
+# gui-builder
+set(BUILD_GUI_BUILDER OFF)
+if("tool" IN_LIST FEATURES)
+ set(BUILD_GUI_BUILDER ON)
+endif()
vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ SOURCE_PATH "${SOURCE_PATH}"
+ PREFER_NINJA
OPTIONS
- -DTGUI_BUILD_GUI_BUILDER=OFF
- -DTGUI_MISC_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/share/tgui
+ -DTGUI_BUILD_GUI_BUILDER=${BUILD_GUI_BUILDER}
+ -DTGUI_MISC_INSTALL_PREFIX=${TGUI_SHARE_PATH}
-DTGUI_SHARED_LIBS=${TGUI_SHARED_LIBS}
)
@@ -28,7 +37,27 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/TGUI)
vcpkg_copy_pdbs()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+if(BUILD_GUI_BUILDER)
+ set(EXECUTABLE_SUFFIX "")
+ if (WIN32)
+ set(EXECUTABLE_SUFFIX ".exe")
+ endif()
+
+ message(STATUS "Check for: ${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}")
+ if(EXISTS "${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}")
+ file(MAKE_DIRECTORY "${TGUI_TOOLS_PATH}")
+ file(RENAME
+ "${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}"
+ "${TGUI_TOOLS_PATH}/gui-builder${EXECUTABLE_SUFFIX}")
+ # Need to copy `resources` and `themes` directories
+ file(COPY "${TGUI_SHARE_PATH}/gui-builder/resources" DESTINATION "${TGUI_TOOLS_PATH}")
+ file(COPY "${TGUI_SHARE_PATH}/gui-builder/themes" DESTINATION "${TGUI_TOOLS_PATH}")
+ file(REMOVE_RECURSE "${TGUI_SHARE_PATH}/gui-builder")
+ vcpkg_copy_tool_dependencies("${TGUI_TOOLS_PATH}")
+ endif()
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/tgui/license.txt ${CURRENT_PACKAGES_DIR}/share/tgui/copyright)
+file(RENAME "${CURRENT_PACKAGES_DIR}/share/tgui/license.txt" "${CURRENT_PACKAGES_DIR}/share/tgui/copyright")
diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL index c5958f4a1..63b4e9ad1 100644 --- a/ports/xerces-c/CONTROL +++ b/ports/xerces-c/CONTROL @@ -1,7 +1,11 @@ Source: xerces-c -Version: 3.2.2-6 +Version: 3.2.2-7 Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. Feature: icu Description: ICU support Build-Depends: icu + +Feature: xmlch_wchar +Description: XMLCh type uses wchar_t + diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index 80e56b0f6..aa5700121 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -13,6 +13,9 @@ set(DISABLE_ICU ON) if("icu" IN_LIST FEATURES) set(DISABLE_ICU OFF) endif() +if ("xmlch_wchar" IN_LIST FEATURES) + set(XMLCHTYPE -Dxmlch-type=wchar_t) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -22,6 +25,7 @@ vcpkg_configure_cmake( -DDISABLE_DOC=ON -DDISABLE_SAMPLES=ON -DCMAKE_DISABLE_FIND_PACKAGE_ICU=${DISABLE_ICU} + ${XMLCHTYPE} ) vcpkg_install_cmake() diff --git a/ports/yoga/CONTROL b/ports/yoga/CONTROL index a9fcd9419..805d688d5 100644 --- a/ports/yoga/CONTROL +++ b/ports/yoga/CONTROL @@ -1,3 +1,3 @@ Source: yoga -Version: 1.10.0 +Version: 1.13.0 Description: Yoga is a cross-platform layout engine which implements Flexbox diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake index a8d532474..6aa6a1fb3 100644 --- a/ports/yoga/portfile.cmake +++ b/ports/yoga/portfile.cmake @@ -1,28 +1,16 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# include(vcpkg_common_functions) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(WARNING "Dynamic not supported, building static") - set(VCPKG_LIBRARY_LINKAGE static) -elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds not supported yet.") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/yoga - REF 1.10.0 - SHA512 629d9fbc4e4ad3c495a92896803bf7a0fca8dd986068d9862ba2c9aa0a70f8542a35c0e9ce9974ccdc004827e5e072f45b6eabff1d00462ec437b48de9dfacf4 + REF v1.13.0 + SHA512 ca87c4526956ccb0693c4e1cdf825b2d9cfd97b20f6c11a06b3966c99903e06c0ca1013f9c72546bbf1d0f56b501f422dfb18dbcfee82ba340e18dcea80b3caf HEAD_REF master ) @@ -43,5 +31,4 @@ endif() vcpkg_copy_pdbs() -# Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/yoga RENAME copyright)
\ No newline at end of file diff --git a/ports/z3/CONTROL b/ports/z3/CONTROL new file mode 100644 index 000000000..f06d776bb --- /dev/null +++ b/ports/z3/CONTROL @@ -0,0 +1,3 @@ +Source: z3 +Version: 4.8.4 +Description: An SMT solver diff --git a/ports/z3/LICENSE b/ports/z3/LICENSE new file mode 100644 index 000000000..cc90bed74 --- /dev/null +++ b/ports/z3/LICENSE @@ -0,0 +1,10 @@ +Z3 +Copyright (c) Microsoft Corporation +All rights reserved. +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file diff --git a/ports/z3/fix_cmake_long_dir.patch b/ports/z3/fix_cmake_long_dir.patch new file mode 100644 index 000000000..f7dc505d6 --- /dev/null +++ b/ports/z3/fix_cmake_long_dir.patch @@ -0,0 +1,61 @@ +diff --git a/cmake/z3_add_component.cmake b/cmake/z3_add_component.cmake +index 8ab6e045d..ac6d1ec06 100644 +--- a/cmake/z3_add_component.cmake ++++ b/cmake/z3_add_component.cmake +@@ -262,18 +262,20 @@ macro(z3_add_install_tactic_rule) + GLOBAL + PROPERTY Z3_${dependency}_TACTIC_HEADERS + ) +- list(APPEND _tactic_header_files ${_component_tactic_header_files}) ++ list(APPEND _tactic_header_files "${_component_tactic_header_files}") + endforeach() + unset(_component_tactic_header_files) + ++ string(REPLACE ";" "\n" _tactic_header_files "${_tactic_header_files}") ++ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/install_tactic.deps" ${_tactic_header_files}) + add_custom_command(OUTPUT "install_tactic.cpp" + COMMAND "${PYTHON_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/scripts/mk_install_tactic_cpp.py" + "${CMAKE_CURRENT_BINARY_DIR}" +- ${_tactic_header_files} ++ "${CMAKE_CURRENT_BINARY_DIR}/install_tactic.deps" + DEPENDS "${CMAKE_SOURCE_DIR}/scripts/mk_install_tactic_cpp.py" + ${Z3_GENERATED_FILE_EXTRA_DEPENDENCIES} +- ${_tactic_header_files} ++ "${CMAKE_CURRENT_BINARY_DIR}/install_tactic.deps" + COMMENT "Generating \"${CMAKE_CURRENT_BINARY_DIR}/install_tactic.cpp\"" + ${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG} + VERBATIM +diff --git a/scripts/mk_install_tactic_cpp.py b/scripts/mk_install_tactic_cpp.py +index a152eff14..b82e71354 100755 +--- a/scripts/mk_install_tactic_cpp.py ++++ b/scripts/mk_install_tactic_cpp.py +@@ -14,19 +14,22 @@ def main(args): + logging.basicConfig(level=logging.INFO) + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("destination_dir", help="destination directory") +- parser.add_argument("header_files", nargs="+", +- help="One or more header files to parse") ++ parser.add_argument("deps", help="file with header file names to parse") + pargs = parser.parse_args(args) + + if not mk_genfile_common.check_dir_exists(pargs.destination_dir): + return 1 + +- if not mk_genfile_common.check_files_exist(pargs.header_files): ++ if not mk_genfile_common.check_files_exist([pargs.deps]): + return 1 + +- h_files_full_path = [] +- for header_file in pargs.header_files: +- h_files_full_path.append(os.path.abspath(header_file)) ++ with open(pargs.deps, 'r') as f: ++ lines = f.read().split('\n') ++ h_files_full_path = [os.path.abspath(header_file) ++ for header_file in lines if header_file] ++ ++ if not mk_genfile_common.check_files_exist(h_files_full_path): ++ return 1 + + output = mk_genfile_common.mk_install_tactic_cpp_internal( + h_files_full_path, diff --git a/ports/z3/portfile.cmake b/ports/z3/portfile.cmake new file mode 100644 index 000000000..46182793d --- /dev/null +++ b/ports/z3/portfile.cmake @@ -0,0 +1,63 @@ +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + message(FATAL_ERROR "Z3 doesn't currently support ARM64") +endif() + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Z3 doesn't currently support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path("${PYTHON2_DIR}") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Z3Prover/z3 + REF z3-4.8.4 + SHA512 4660ba6ab33a6345b2e8396c332d4afcfc73eda66ceb2595a39f152df4d62a9ea0f349b0f9212389ba84ecba6bdae6ad9b62b376ba44dc4d9c74f80d7a818bf4 + HEAD_REF master + PATCHES fix_cmake_long_dir.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(BUILD_STATIC "-DBUILD_LIBZ3_SHARED=OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${BUILD_STATIC} +) + +vcpkg_build_cmake() + + +function(install_z3 SHORT_BUILDTYPE DEBUG_DIR) + set(LIBS ".so" ".lib" ".dylib" ".a") + set(DLLS ".dll" ".pdb") + file(GLOB FILES ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}/libz3.*) + + foreach (FILE in ${FILES}) + get_filename_component(FILEXT ${FILE} EXT) + if ("${FILEXT}" IN_LIST LIBS) + file(INSTALL ${FILE} DESTINATION ${CURRENT_PACKAGES_DIR}${DEBUG_DIR}/lib) + elseif ("${FILEXT}" IN_LIST DLLS) + file(INSTALL ${FILE} DESTINATION ${CURRENT_PACKAGES_DIR}${DEBUG_DIR}/bin) + endif() + endforeach() +endfunction() + +if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + install_z3("dbg" "/debug") +endif() +if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + install_z3("rel" "") +endif() + +file(GLOB HEADERS ${SOURCE_PATH}/src/api/z3*.h) +file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/z3 RENAME copyright) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 85bee72f7..9d1570874 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,7 @@ Source: zeromq Version: 2019-01-30 Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products + +Feature: sodium +Description: Using libsodium for CURVE security +Build-Depends: libsodium diff --git a/ports/zeromq/portfile.cmake b/ports/zeromq/portfile.cmake index 2ceba5e3a..35875540b 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -14,6 +14,12 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} \"-I${SOURCE_PATH}/builds/msvc\"") set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} \"-I${SOURCE_PATH}/builds/msvc\"") +if("sodium" IN_LIST FEATURES) + set(WITH_LIBSODIUM ON) +else() + set(WITH_LIBSODIUM OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -22,6 +28,7 @@ vcpkg_configure_cmake( -DPOLLER=select -DBUILD_STATIC=${BUILD_STATIC} -DBUILD_SHARED=${BUILD_SHARED} + -DWITH_LIBSODIUM=${WITH_LIBSODIUM} -DWITH_PERF_TOOL=OFF OPTIONS_DEBUG "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" @@ -38,6 +45,13 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/ZeroMQ) vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/zmq.h + "defined ZMQ_STATIC" + "1 //defined ZMQ_STATIC" + ) +endif() + file(READ ${CURRENT_PACKAGES_DIR}/share/zeromq/ZeroMQConfig.cmake _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") string(REPLACE "get_target_property(ZeroMQ_STATIC_LIBRARY libzmq-static LOCATION)" "add_library(libzmq-static INTERFACE IMPORTED)\nset_target_properties(libzmq-static PROPERTIES INTERFACE_LINK_LIBRARIES libzmq)" _contents "${_contents}") diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 1f856b69e..d46013a72 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -140,10 +140,10 @@ function(vcpkg_find_acquire_program VAR) else() set(SCRIPTNAME meson) endif() - set(PATHS ${DOWNLOADS}/tools/meson/meson-0.47.1) - set(URL "https://github.com/mesonbuild/meson/archive/0.47.1.zip") - set(ARCHIVE "meson-0.47.1.zip") - set(HASH 0f6462835583a51707bee82d852018cfcb7444c0dad95b2ba08814e500a5cfe3f731dc6c1fb73c765d1120ee2a2d6600e15d8d393bab1993e84bd4354b2e6855) + set(PATHS ${DOWNLOADS}/tools/meson/meson-0.50.0) + set(URL "https://github.com/mesonbuild/meson/archive/0.50.0.zip") + set(ARCHIVE "meson-0.50.0.zip") + set(HASH 587cafe0cd551e3fb3507ecab904912dc3e053aa95c864b435526a20d52406536ba970a50be6c9f20d83314c5853aaefa102c5ca14623d0928b091a43e7b6d64) elseif(VAR MATCHES "FLEX") if(CMAKE_HOST_WIN32) set(PROGNAME win_flex) diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index f9bce8631..1740b6f6d 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -216,7 +216,7 @@ namespace vcpkg::Files { return fs::stdfs::copy_file(oldpath, newpath, opts, ec); } - virtual void copy_symlink(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) + virtual void copy_symlink(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) override { return fs::stdfs::copy_symlink(oldpath, newpath, ec); } diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index c9d52c572..83ddea014 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -13,16 +13,37 @@ namespace vcpkg::Commands::Edit std::vector<fs::path> output; #if defined(_WIN32) - static const std::array<const char*, 3> REGKEYS = { - R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", - R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", - R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", + struct RegKey + { + HKEY root; + const char *subkey; + } REGKEYS[] = { + { + HKEY_LOCAL_MACHINE, + R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)" + }, + { + HKEY_LOCAL_MACHINE, + R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)" + }, + { + HKEY_LOCAL_MACHINE, + R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)" + }, + { + HKEY_CURRENT_USER, + R"(Software\Microsoft\Windows\CurrentVersion\Uninstall\{771FD6B0-FA20-440A-A002-3B3BAC16DC50}_is1)" + }, + { + HKEY_LOCAL_MACHINE, + R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EA457B21-F73E-494C-ACAB-524FDE069978}_is1)" + }, }; for (auto&& keypath : REGKEYS) { const Optional<std::string> code_installpath = - System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, "InstallLocation"); + System::get_registry_string(keypath.root, keypath.subkey, "InstallLocation"); if (const auto c = code_installpath.get()) { const fs::path install_path = fs::path(*c); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index c1d3a8c8d..acac3293f 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -443,7 +443,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console System::print("Adding vcpkg completion entry to %s\n", bashrc_path.u8string()); bashrc_content.push_back(Strings::format("source %s", completion_script_path.u8string())); - fs.write_contents(bashrc_path, Strings::join("\n", bashrc_content)); + fs.write_contents(bashrc_path, Strings::join("\n", bashrc_content) + '\n'); Checks::exit_success(VCPKG_LINE_INFO); } #endif diff --git a/toolsrc/src/vcpkg/tools.cpp b/toolsrc/src/vcpkg/tools.cpp index b713b2752..99a2f4fb8 100644 --- a/toolsrc/src/vcpkg/tools.cpp +++ b/toolsrc/src/vcpkg/tools.cpp @@ -364,7 +364,7 @@ Type 'NuGet help <command>' for help on a specific command. virtual const std::string& exe_stem() const override { return m_exe; } virtual std::array<int, 3> default_min_version() const override { return {2, 7, 4}; } - virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const + virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const override { #if defined(_WIN32) const auto& program_files = System::get_program_files_platform_bitness(); @@ -403,7 +403,7 @@ git version 2.17.1.windows.2 virtual const std::string& exe_stem() const override { return m_exe; } virtual std::array<int, 3> default_min_version() const override { return {0, 0, 0}; } - virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const + virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const override { // TODO: Uncomment later // const std::vector<fs::path> from_path = Files::find_from_PATH("installerbase"); |
