diff options
| author | Griffin Downs <35574547+grdowns@users.noreply.github.com> | 2019-04-12 02:30:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-12 02:30:59 -0700 |
| commit | 0e000644053015b7f7a0985e14f0bd384c847d17 (patch) | |
| tree | 7e456fd12b3bf281b28587338f1650017c8b32ab | |
| parent | 93ce6b4f27602cd18f4327c2cfd84093d472b8bb (diff) | |
| parent | 39ba5b2b30c9f7b49e777a62093cdd49d05b53a9 (diff) | |
| download | vcpkg-0e000644053015b7f7a0985e14f0bd384c847d17.tar.gz vcpkg-0e000644053015b7f7a0985e14f0bd384c847d17.zip | |
Merge branch 'master' into master
820 files changed, 14451 insertions, 6252 deletions
diff --git a/.gitignore b/.gitignore index befc51d8e..d0e202f1d 100644 --- a/.gitignore +++ b/.gitignore @@ -309,3 +309,4 @@ __pycache__/ ############################################################ # vcpkg - End ############################################################ +archives diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh index a7643894c..7165a725f 100755 --- a/bootstrap-vcpkg.sh +++ b/bootstrap-vcpkg.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) . "$vcpkgRootDir/scripts/bootstrap.sh" 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..b47d86cef 100644 --- a/docs/maintainers/vcpkg_add_to_path.md +++ b/docs/maintainers/vcpkg_add_to_path.md @@ -16,5 +16,11 @@ 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)
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_download_distfile.md b/docs/maintainers/vcpkg_download_distfile.md index 80ea7559a..2e86b8f7c 100644 --- a/docs/maintainers/vcpkg_download_distfile.md +++ b/docs/maintainers/vcpkg_download_distfile.md @@ -33,6 +33,11 @@ Skip SHA512 hash check for file. This switch is only valid when building with the `--head` command line flag. +### HEADERS +A list of headers to append to the download request. This can be used for authentication during a download. + +Headers should be specified as "<header-name>: <header-value>". + ## Notes The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downloading from GitHub projects. diff --git a/docs/maintainers/vcpkg_from_gitlab.md b/docs/maintainers/vcpkg_from_gitlab.md index bc312f37a..fe75ecf93 100644 --- a/docs/maintainers/vcpkg_from_gitlab.md +++ b/docs/maintainers/vcpkg_from_gitlab.md @@ -56,6 +56,11 @@ 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: +* [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_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/config-environment.md b/docs/users/config-environment.md index f25df89a3..bffa07278 100644 --- a/docs/users/config-environment.md +++ b/docs/users/config-environment.md @@ -40,3 +40,10 @@ This environment variable can be set to a triplet name which will be used for un #### VCPKG_FORCE_SYSTEM_BINARIES
This environment variable, if set, suppresses the downloading of CMake and Ninja and forces the use of the system binaries.
+
+### VCPKG_KEEP_ENV_VARS
+
+This environment variable can be set to a list of environment variables, separated by `;`, which will be propagated to
+the build environment.
+
+Example: `FOO_SDK_DIR;BAR_SDK_DIR`
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/docs/users/triplets.md b/docs/users/triplets.md index 87fa72fd3..7b75956e8 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -33,6 +33,13 @@ Valid options include any CMake system name, such as: - `Darwin` (Mac OSX) - `Linux` (Linux) +### VCPKG_CMAKE_SYSTEM_VERSION +Specifies the target platform system version. + +This field is optional and, if present, will be passed into the build as `CMAKE_SYSTEM_VERSION`. + +See also the CMake documentation for `CMAKE_SYSTEM_VERSION`: https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_VERSION.html. + ### VCPKG_CHAINLOAD_TOOLCHAIN_FILE Specifies an alternate CMake Toolchain file to use. diff --git a/ports/3fd/CONTROL b/ports/3fd/CONTROL index 13f769c9c..6f278f762 100644 --- a/ports/3fd/CONTROL +++ b/ports/3fd/CONTROL @@ -1,4 +1,4 @@ Source: 3fd
-Version: 2.6.2
+Version: 2.6.2-2
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/RapidXML.patch b/ports/3fd/RapidXML.patch new file mode 100644 index 000000000..fdb6cd18e --- /dev/null +++ b/ports/3fd/RapidXML.patch @@ -0,0 +1,13 @@ +diff --git a/3FD/configuration.cpp b/3FD/configuration.cpp +index b9ca804..207a397 100644 +--- a/3FD/configuration.cpp ++++ b/3FD/configuration.cpp +@@ -2,7 +2,7 @@ + #include "configuration.h"
+ #include "exceptions.h"
+ #include "utils_io.h"
+-#include <rapidxml.hpp>
++#include <rapidxml/rapidxml.hpp>
+
+ #ifdef _3FD_PLATFORM_WINRT
+ # include "utils_winrt.h"
diff --git a/ports/3fd/portfile.cmake b/ports/3fd/portfile.cmake index 69fc60ccb..1e7e9d601 100644 --- a/ports/3fd/portfile.cmake +++ b/ports/3fd/portfile.cmake @@ -31,6 +31,8 @@ vcpkg_from_github( HEAD_REF master
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/remove-seekpos.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/DataException.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/RapidXML.patch"
)
# Copy the sources to ensure a clean, out-of-source build
diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 2e0e0b9bd..9893bf7f8 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil
-Version: 2019-01-30 +Version: 2019_01_30-1 Description: an open-source collection designed to augment the C++ standard library.
Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.
diff --git a/ports/abseil/fix-usage-lnk-error.patch b/ports/abseil/fix-usage-lnk-error.patch new file mode 100644 index 000000000..5335d144b --- /dev/null +++ b/ports/abseil/fix-usage-lnk-error.patch @@ -0,0 +1,232 @@ +diff --git a/absl/strings/ascii.cc b/absl/strings/ascii.cc
+index c9481e8..5c155e1 100644
+--- a/absl/strings/ascii.cc
++++ b/absl/strings/ascii.cc
+@@ -49,109 +49,6 @@ namespace ascii_internal {
+ // print ' //', Hex2(i & 0x78)
+ // elif i % 16 == 15:
+ // print
+-
+-// clang-format off
+-// Array of bitfields holding character information. Each bit value corresponds
+-// to a particular character feature. For readability, and because the value
+-// of these bits is tightly coupled to this implementation, the individual bits
+-// are not named. Note that bitfields for all characters above ASCII 127 are
+-// zero-initialized.
+-const unsigned char kPropertyBits[256] = {
+- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 0x00
+- 0x40, 0x68, 0x48, 0x48, 0x48, 0x48, 0x40, 0x40,
+- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 0x10
+- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
+- 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 0x20
+- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
+- 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, // 0x30
+- 0x84, 0x84, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
+- 0x10, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x05, // 0x40
+- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
+- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // 0x50
+- 0x05, 0x05, 0x05, 0x10, 0x10, 0x10, 0x10, 0x10,
+- 0x10, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x05, // 0x60
+- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
+- 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // 0x70
+- 0x05, 0x05, 0x05, 0x10, 0x10, 0x10, 0x10, 0x40,
+-};
+-
+-// Array of characters for the ascii_tolower() function. For values 'A'
+-// through 'Z', return the lower-case character; otherwise, return the
+-// identity of the passed character.
+-const char kToLower[256] = {
+- '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
+- '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
+- '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
+- '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f',
+- '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27',
+- '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f',
+- '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37',
+- '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f',
+- '\x40', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+- 'x', 'y', 'z', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f',
+- '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67',
+- '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f',
+- '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77',
+- '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f',
+- '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
+- '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f',
+- '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
+- '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f',
+- '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7',
+- '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf',
+- '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7',
+- '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf',
+- '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7',
+- '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf',
+- '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7',
+- '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf',
+- '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7',
+- '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef',
+- '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7',
+- '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff',
+-};
+-
+-// Array of characters for the ascii_toupper() function. For values 'a'
+-// through 'z', return the upper-case character; otherwise, return the
+-// identity of the passed character.
+-const char kToUpper[256] = {
+- '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
+- '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
+- '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
+- '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f',
+- '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27',
+- '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f',
+- '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37',
+- '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f',
+- '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47',
+- '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f',
+- '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57',
+- '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f',
+- '\x60', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+- 'X', 'Y', 'Z', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f',
+- '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
+- '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f',
+- '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
+- '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f',
+- '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7',
+- '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf',
+- '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7',
+- '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf',
+- '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7',
+- '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf',
+- '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7',
+- '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf',
+- '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7',
+- '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef',
+- '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7',
+- '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff',
+-};
+-// clang-format on
+-
+ } // namespace ascii_internal
+
+ void AsciiStrToLower(std::string* s) {
+diff --git a/absl/strings/ascii.h b/absl/strings/ascii.h
+index 48a9da2..9d70382 100644
+--- a/absl/strings/ascii.h
++++ b/absl/strings/ascii.h
+@@ -61,14 +61,105 @@
+ namespace absl {
+ namespace ascii_internal {
+
+-// Declaration for an array of bitfields holding character information.
+-extern const unsigned char kPropertyBits[256];
+-
+-// Declaration for the array of characters to upper-case characters.
+-extern const char kToUpper[256];
+-
+-// Declaration for the array of characters to lower-case characters.
+-extern const char kToLower[256];
++// Array of bitfields holding character information. Each bit value corresponds
++// to a particular character feature. For readability, and because the value
++// of these bits is tightly coupled to this implementation, the individual bits
++// are not named. Note that bitfields for all characters above ASCII 127 are
++// zero-initialized.
++const unsigned char kPropertyBits[256] = {
++ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 0x00
++ 0x40, 0x68, 0x48, 0x48, 0x48, 0x48, 0x40, 0x40,
++ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 0x10
++ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
++ 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 0x20
++ 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
++ 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, // 0x30
++ 0x84, 0x84, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
++ 0x10, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x05, // 0x40
++ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
++ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // 0x50
++ 0x05, 0x05, 0x05, 0x10, 0x10, 0x10, 0x10, 0x10,
++ 0x10, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x05, // 0x60
++ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
++ 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // 0x70
++ 0x05, 0x05, 0x05, 0x10, 0x10, 0x10, 0x10, 0x40,
++};
++
++// Array of characters for the ascii_tolower() function. For values 'A'
++// through 'Z', return the lower-case character; otherwise, return the
++// identity of the passed character.
++const char kToLower[256] = {
++ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
++ '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
++ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
++ '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f',
++ '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27',
++ '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f',
++ '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37',
++ '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f',
++ '\x40', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
++ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
++ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
++ 'x', 'y', 'z', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f',
++ '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67',
++ '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f',
++ '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77',
++ '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f',
++ '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
++ '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f',
++ '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
++ '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f',
++ '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7',
++ '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf',
++ '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7',
++ '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf',
++ '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7',
++ '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf',
++ '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7',
++ '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf',
++ '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7',
++ '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef',
++ '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7',
++ '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff',
++};
++
++// Array of characters for the ascii_toupper() function. For values 'a'
++// through 'z', return the upper-case character; otherwise, return the
++// identity of the passed character.
++const char kToUpper[256] = {
++ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
++ '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
++ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
++ '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f',
++ '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27',
++ '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f',
++ '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37',
++ '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f',
++ '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47',
++ '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f',
++ '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57',
++ '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f',
++ '\x60', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
++ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
++ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
++ 'X', 'Y', 'Z', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f',
++ '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
++ '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f',
++ '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
++ '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f',
++ '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7',
++ '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf',
++ '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7',
++ '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf',
++ '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7',
++ '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf',
++ '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7',
++ '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf',
++ '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7',
++ '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef',
++ '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7',
++ '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff',
++};
+
+ } // namespace ascii_internal
+
diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 7aca199a0..ddf17c87c 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,9 +7,10 @@ endif() vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO abseil/abseil-cpp
- REF 540e2537b92cd4abfae6ceddfe24304345461f32 + REF 540e2537b92cd4abfae6ceddfe24304345461f32
SHA512 3cabab23ad159592562a30531052bb18c66fce75f93f84a6de17a7488b7d6651f645950c1adb8dfbacc651f2bc0db82c316de132baab38e3ef95ea5b5a0eb6d2
HEAD_REF master
+ PATCHES fix-usage-lnk-error.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@@ -23,14 +24,6 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil TARGET_PATH share/unofficial-abseil)
-file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/*)
-foreach(FILE ${HEADERS})
- file(READ "${FILE}" _contents)
- string(REPLACE "std::min(" "(std::min)(" _contents "${_contents}")
- string(REPLACE "std::max(" "(std::max)(" _contents "${_contents}")
- file(WRITE "${FILE}" "${_contents}")
-endforeach()
-
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright)
diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 9f8070e17..9d4d36cd5 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.5.4 +Version: 6.5.5-1 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index f3dcbc6bf..d33028c9a 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -3,18 +3,26 @@ 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) + if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(DLL_DECORATOR s) + endif() + set(MPC_STATIC_FLAG -static) 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_5/ACE-src-6.5.5.zip" + FILENAME ACE-src-6.5.5.zip + SHA512 65696e6f2776fd9c015adb78a92f1c87edacde62ff11f20f88c416d4420a6fc6e5176412c5f93262d06e67b89717499f8108f68582f70fea6ce05466c53415e9 ) 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") @@ -23,20 +31,57 @@ else () set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) endif() -if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") +# Add ace/config.h file +# see https://htmlpreview.github.io/?https://github.com/DOCGroup/ACE_TAO/blob/master/ACE/ACE-INSTALL.html +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(LIB_RELEASE_SUFFIX .lib) + set(LIB_DEBUG_SUFFIX d.lib) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(SOLUTION_TYPE vs2019) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(SOLUTION_TYPE vs2017) -else() + else() set(SOLUTION_TYPE vc14) + endif() + file(WRITE ${SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"") endif() -# Add ace/config.h file -# see http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#win32 -file(WRITE ${SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"") -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/ace_${SOLUTION_TYPE}.sln - PLATFORM ${MSBUILD_PLATFORM} +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(DLL_DECORATOR) + set(LIB_RELEASE_SUFFIX .a) + set(LIB_DEBUG_SUFFIX .a) + set(LIB_PREFIX lib) + set(SOLUTION_TYPE gnuace) + file(WRITE ${SOURCE_PATH}/config.h "#include \"ace/config-linux.h\"") + file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)include/makeinclude/platform_linux.GNU") +endif() + +# 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-${TARGET_TRIPLET} ) +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/ace.sln + PLATFORM ${MSBUILD_PLATFORM} + ) +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + FIND_PROGRAM(MAKE make) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") + ENDIF () + vcpkg_execute_required_process( + COMMAND make + WORKING_DIRECTORY ${ACE_ROOT}/ace + LOGNAME make-${TARGET_TRIPLET} + ) +endif() + # ACE itself does not define an install target, so it is not clear which # headers are public and which not. For the moment we install everything # that is in the source path and ends in .h, .inl @@ -54,6 +99,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 +109,43 @@ 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 + ) + endif() + # Install the lib files file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}.dll - ${LIB_PATH}/${ACE_LIBRARY}.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - - file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}d.lib + ${LIB_PATH}/${LIB_PREFIX}${ACE_LIBRARY}${DLL_DECORATOR}${LIB_DEBUG_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) file(INSTALL - ${LIB_PATH}/${ACE_LIBRARY}.lib + ${LIB_PATH}/${LIB_PREFIX}${ACE_LIBRARY}${DLL_DECORATOR}${LIB_RELEASE_SUFFIX} 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") +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + install_ace_library(${ACE_ROOT} "ACE_QoS") +endif() +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) + +vcpkg_copy_pdbs() diff --git a/ports/activemq-cpp/CONTROL b/ports/activemq-cpp/CONTROL new file mode 100644 index 000000000..ee3c4300c --- /dev/null +++ b/ports/activemq-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: activemq-cpp
+Version: 3.9.5
+Build-Depends: apr
+Description: Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server.
diff --git a/ports/activemq-cpp/FunctionLevelLinkingOn.diff b/ports/activemq-cpp/FunctionLevelLinkingOn.diff new file mode 100644 index 000000000..8d00b1da6 --- /dev/null +++ b/ports/activemq-cpp/FunctionLevelLinkingOn.diff @@ -0,0 +1,76 @@ +diff --git a/vs2010-build/activemq-cpp.vcxproj b/vs2010-build/activemq-cpp.vcxproj +index a43f072..54b4822 100644 +--- a/vs2010-build/activemq-cpp.vcxproj ++++ b/vs2010-build/activemq-cpp.vcxproj +@@ -2576,7 +2576,7 @@ + <AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> +- <FunctionLevelLinking>false</FunctionLevelLinking> ++ <FunctionLevelLinking>true</FunctionLevelLinking> + <CreateHotpatchableImage>false</CreateHotpatchableImage> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeaderFile> +@@ -2602,7 +2602,7 @@ + <AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> +- <FunctionLevelLinking>false</FunctionLevelLinking> ++ <FunctionLevelLinking>true</FunctionLevelLinking> + <CreateHotpatchableImage>false</CreateHotpatchableImage> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeaderFile> +@@ -2628,7 +2628,7 @@ + <AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> +- <FunctionLevelLinking>false</FunctionLevelLinking> ++ <FunctionLevelLinking>true</FunctionLevelLinking> + <CreateHotpatchableImage>false</CreateHotpatchableImage> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeaderFile> +@@ -2656,7 +2656,7 @@ + <AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> +- <FunctionLevelLinking>false</FunctionLevelLinking> ++ <FunctionLevelLinking>true</FunctionLevelLinking> + <CreateHotpatchableImage>false</CreateHotpatchableImage> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeaderFile> +@@ -2684,7 +2684,7 @@ + <AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> +- <FunctionLevelLinking>false</FunctionLevelLinking> ++ <FunctionLevelLinking>true</FunctionLevelLinking> + <CreateHotpatchableImage>false</CreateHotpatchableImage> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeaderFile> +@@ -2710,7 +2710,7 @@ + <AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> +- <FunctionLevelLinking>false</FunctionLevelLinking> ++ <FunctionLevelLinking>true</FunctionLevelLinking> + <CreateHotpatchableImage>false</CreateHotpatchableImage> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeaderFile> +@@ -2736,7 +2736,7 @@ + <AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> +- <FunctionLevelLinking>false</FunctionLevelLinking> ++ <FunctionLevelLinking>true</FunctionLevelLinking> + <CreateHotpatchableImage>false</CreateHotpatchableImage> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeaderFile> +@@ -2764,7 +2764,7 @@ + <AdditionalIncludeDirectories>../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> +- <FunctionLevelLinking>false</FunctionLevelLinking> ++ <FunctionLevelLinking>true</FunctionLevelLinking> + <CreateHotpatchableImage>false</CreateHotpatchableImage> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeaderFile> diff --git a/ports/activemq-cpp/portfile.cmake b/ports/activemq-cpp/portfile.cmake new file mode 100644 index 000000000..b165efbcd --- /dev/null +++ b/ports/activemq-cpp/portfile.cmake @@ -0,0 +1,84 @@ +include(vcpkg_common_functions)
+
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(FATAL_ERROR "${PORT} does not currently support UWP")
+endif()
+
+set(VERSION 3.9.5)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/activemq-cpp-library-${VERSION})
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.apache.org/dist/activemq/activemq-cpp/${VERSION}/activemq-cpp-library-${VERSION}-src.tar.bz2"
+ FILENAME "activemq-cpp-library-${VERSION}-src.tar.bz2"
+ SHA512 83692d3dfd5ecf557fc88d204a03bf169ce6180bcff27be41b09409b8f7793368ffbeed42d98ef6374c6b6b477d9beb8a4a9ac584df9e56725ec59ceceaa6ae2
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/FunctionLevelLinkingOn.diff
+)
+
+set(RELEASE_CONF "ReleaseDLL")
+set(DEBUG_CONF "DebugDLL")
+
+if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
+ set(BUILD_ARCH "Win32")
+ set(OUTPUT_DIR "Win32")
+elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
+ set(BUILD_ARCH "x64")
+ set(OUTPUT_DIR "Win64")
+else()
+ message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
+endif()
+
+
+vcpkg_build_msbuild(
+ PROJECT_PATH ${SOURCE_PATH}/vs2010-build/activemq-cpp.vcxproj
+ RELEASE_CONFIGURATION ${RELEASE_CONF}
+ DEBUG_CONFIGURATION ${DEBUG_CONF}
+ PLATFORM ${BUILD_ARCH}
+ USE_VCPKG_INTEGRATION
+)
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/activemq-cpp)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/activemq-cpp/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/activemq-cpp/copyright)
+
+
+file(
+ COPY
+ ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib
+)
+file(
+ COPY
+ ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+)
+file(
+ COPY
+ ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+)
+file(
+ COPY
+ ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cppd.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
+)
+file(
+ COPY
+ ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cppd.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+)
+file(
+ COPY
+ ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cppd.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+)
+
+file(COPY ${SOURCE_PATH}/src/main/activemq DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h)
+file(COPY ${SOURCE_PATH}/src/main/cms DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h)
+file(COPY ${SOURCE_PATH}/src/main/decaf DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h)
diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 7e2bc233f..1f01136b3 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -1,5 +1,12 @@ include(vcpkg_common_functions) +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) + message(WARNING "Alembic's buildsystem uses very long paths and may fail on your system.\n" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) +endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) message(STATUS "Alembic does not support static linkage. Building dynamically.") set(VCPKG_LIBRARY_LINKAGE dynamic) diff --git a/ports/ampl-mp/CONTROL b/ports/ampl-mp/CONTROL index 8a8c27b3f..84523e281 100644 --- a/ports/ampl-mp/CONTROL +++ b/ports/ampl-mp/CONTROL @@ -1,3 +1,3 @@ Source: ampl-mp -Version: 2019-02-08 +Version: 2019-03-21 Description: An open-source library for mathematical programming diff --git a/ports/ampl-mp/portfile.cmake b/ports/ampl-mp/portfile.cmake index 45bcb6478..dafdb10fd 100644 --- a/ports/ampl-mp/portfile.cmake +++ b/ports/ampl-mp/portfile.cmake @@ -2,11 +2,15 @@ include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Cross-compiling is not supported") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ampl/mp - REF d305155b047b69fc5c6e5fda8630c753d7973b9a - SHA512 2c8ffd6de946a6f8ea94a8e0c00f03f67753ad99534e0d5fcaaaeb472fe76a3383324bcb628a31d8c01bc5f60254790f5508c8394096a4f05672f814dbd6fe2e + REF 67875b71ef68511277ec2dc8224f613487cefce9 + SHA512 fad2496c10b843ddad7c4dba1eea1b4cd22e90be12dec2ad598fbd1ed5e1c492d92c5130490c7045ea608bc9ea2af191661c39b3bee3bc5159663f306ce50950 HEAD_REF master PATCHES disable-matlab-mex.patch diff --git a/ports/ampl-mp/workaround-msvc-optimizer-ice.patch b/ports/ampl-mp/workaround-msvc-optimizer-ice.patch index cd55be8c0..7e6d736bd 100644 --- a/ports/ampl-mp/workaround-msvc-optimizer-ice.patch +++ b/ports/ampl-mp/workaround-msvc-optimizer-ice.patch @@ -1,14 +1,28 @@ ---- a/src/asl/CMakeLists.txt 2019-02-07 22:45:15.191909400 -0600 -+++ b/src/asl/CMakeLists.txt 2019-02-07 22:47:10.364936600 -0600 -@@ -216,6 +216,11 @@ add_mp_library(asl-core OBJECT ${ASL_COR - COMPILE_DEFINITIONS ${ASL_COMPILE_DEFINITIONS} - INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}) +diff --git a/src/asl/solvers/avltree.c b/src/asl/solvers/avltree.c +index 7a9adaba..4dd97054 100644 +--- a/src/asl/solvers/avltree.c ++++ b/src/asl/solvers/avltree.c +@@ -54,6 +54,9 @@ AVL_Tree { + void (*Free)(void*); + }; -+if (MSVC) -+ set_source_files_properties(solvers/avltree.c solvers/sphes.c -+ PROPERTIES COMPILE_OPTIONS /Od) -+endif () -+ - # Public ASL headers. - set(ASL_HEADERS aslbuilder.h aslexpr.h aslexpr-visitor.h - aslproblem.h aslinterface.h ${CMAKE_CURRENT_BINARY_DIR}/stdio1.h) ++#if defined(_MSC_VER) && _MSC_VER < 1917 ++#pragma optimize("", off) ++#endif + AVL_Tree* + AVL_Tree_alloc2(void *v, AVL_Elcomp cmp, void *(*Malloc)(size_t), void (*Free)(void*)) + { +diff --git a/src/asl/solvers/sphes.c b/src/asl/solvers/sphes.c +index 326d997f..ae8952ed 100644 +--- a/src/asl/solvers/sphes.c ++++ b/src/asl/solvers/sphes.c +@@ -452,6 +452,9 @@ compar(const void *a, const void *b) + #undef del_mblk + #define del_mblk(b,c) Del_mblk_ASL(a,b,(Char*)(c)) + ++#if defined(_MSC_VER) && _MSC_VER < 1917 ++#pragma optimize("", off) ++#endif + static void + new_Hesoprod(ASL_pfgh *asl, ograd *L, ograd *R, real coef) + { diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL index 12be38d11..459692ac5 100644 --- a/ports/anax/CONTROL +++ b/ports/anax/CONTROL @@ -1,3 +1,3 @@ Source: anax -Version: 2.1.0-3 +Version: 2.1.0-4 Description: An open source C++ entity system. <https://github.com/miguelmartin75/anax> diff --git a/ports/anax/portfile.cmake b/ports/anax/portfile.cmake index 8881957fc..49fbb372d 100644 --- a/ports/anax/portfile.cmake +++ b/ports/anax/portfile.cmake @@ -1,11 +1,3 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - include(vcpkg_common_functions) vcpkg_from_github( @@ -14,17 +6,15 @@ vcpkg_from_github( REF v2.1.0 SHA512 b573733b5f9634bf8cfc5b0715074f9a8ee29ecb48dc981d9371254a1f6ff8afbbb9ba6aa0877d53e518e5486ecc398a6d331fb9b5dbfd17d8707679216e11a3 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/Add-bin-output.patch + PATCHES + Add-bin-output.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE OPTIONS - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() diff --git a/ports/angle/001-fix-uwp.patch b/ports/angle/001-fix-uwp.patch index bae1c8724..818282ee2 100644 --- a/ports/angle/001-fix-uwp.patch +++ b/ports/angle/001-fix-uwp.patch @@ -1,8 +1,89 @@ -diff --git "a//src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" -index dd37ace8..9116b9e6 100644 ---- "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" -+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" -@@ -141,6 +141,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, +diff --git a/src/common/system_utils_win.cpp b/src/common/system_utils_win.cpp +index e4c146091..974b1b3ba 100644 +--- a/src/common/system_utils_win.cpp ++++ b/src/common/system_utils_win.cpp +@@ -110,7 +110,7 @@ class Win32Library : public Library + int ret = snprintf(buffer, MAX_PATH, "%s.%s", libraryName, GetSharedLibraryExtension()); + if (ret > 0 && ret < MAX_PATH) + { +- mModule = LoadLibraryA(buffer); ++ // mModule = LoadLibraryA(buffer); + } + } + +diff --git a/src/libANGLE/renderer/d3d/RendererD3D.cpp b/src/libANGLE/renderer/d3d/RendererD3D.cpp +index 2a8d0221b..362c95a6f 100644 +--- a/src/libANGLE/renderer/d3d/RendererD3D.cpp ++++ b/src/libANGLE/renderer/d3d/RendererD3D.cpp +@@ -229,7 +229,6 @@ GLenum DefaultGLErrorCode(HRESULT hr) + { + switch (hr) + { +- case D3DERR_OUTOFVIDEOMEMORY: + case E_OUTOFMEMORY: + return GL_OUT_OF_MEMORY; + default: +diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +index 9da5cfdae..6eaab6aa7 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp ++++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +@@ -14,6 +14,7 @@ + + #include "common/tls.h" + #include "common/utilities.h" ++#include "common/debug.h" + #include "libANGLE/Buffer.h" + #include "libANGLE/Context.h" + #include "libANGLE/Display.h" +@@ -1189,10 +1190,11 @@ void Renderer11::generateDisplayExtensions(egl::DisplayExtensions *outExtensions + outExtensions->robustResourceInitialization = true; + + // Compositor Native Window capabilies require WinVer >= 1803 +- if (CompositorNativeWindow11::IsSupportedWinRelease()) +- { +- outExtensions->windowsUIComposition = true; +- } ++#ifdef ANGLE_ENABLE_WINDOWS_STORE ++ outExtensions->windowsUIComposition = NativeWindow11WinRT::IsSupportedWin10Release(); ++#else ++outExtensions->windowsUIComposition = CompositorNativeWindow11::IsSupportedWinRelease(); ++#endif + } + + angle::Result Renderer11::flush(Context11 *context11) +@@ -1266,16 +1268,24 @@ NativeWindowD3D *Renderer11::createNativeWindow(EGLNativeWindowType window, + const egl::Config *config, + const egl::AttributeMap &attribs) const + { +- auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window); ++#ifdef ANGLE_ENABLE_WINDOWS_STORE ++ auto useWinUiComp = window != nullptr && !NativeWindow11WinRT::IsValidNativeWindow(window); ++#else ++ auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window); ++#endif + + if (useWinUiComp) + { +- return new CompositorNativeWindow11(window, config->alphaSize > 0); ++#ifdef ANGLE_ENABLE_WINDOWS_STORE ++ return new NativeWindow11WinRT(window, config->alphaSize > 0); ++#else ++ return new CompositorNativeWindow11(window, config->alphaSize > 0); ++#endif + } + else + { + #ifdef ANGLE_ENABLE_WINDOWS_STORE +- UNUSED_VARIABLE(attribs); ++ ANGLE_UNUSED_VARIABLE(attribs); + return new NativeWindow11WinRT(window, config->alphaSize > 0); + #else + return new NativeWindow11Win32( +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp +index cb2f279e4..a8761e29c 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp +@@ -145,6 +145,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, unsigned int width, unsigned int height, bool containsAlpha, @@ -10,54 +91,83 @@ index dd37ace8..9116b9e6 100644 IDXGISwapChain1 **swapChain) { if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 || -@@ -154,7 +155,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, - swapChainDesc.Height = height; - swapChainDesc.Format = format; - swapChainDesc.Stereo = FALSE; -- swapChainDesc.SampleDesc.Count = 1; -+ swapChainDesc.SampleDesc.Count = samples; - swapChainDesc.SampleDesc.Quality = 0; +@@ -158,6 +159,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, + swapChainDesc.Height = height; + swapChainDesc.Format = format; + swapChainDesc.Stereo = FALSE; ++ swapChainDesc.SampleDesc.Count = samples; + swapChainDesc.SampleDesc.Count = 1; + swapChainDesc.SampleDesc.Quality = 0; swapChainDesc.BufferUsage = - DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER; -diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" -index d43bf0ba..77b4ae95 100644 ---- "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" -+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" -@@ -32,7 +32,8 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, public std::enabl - DXGI_FORMAT format, +@@ -213,11 +215,9 @@ 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> displayProperties; + +- if (SUCCEEDED(GetActivationFactory( +- HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), +- displayProperties.GetAddressOf()))) ++ if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), displayProperties.GetAddressOf()))) + { + float dpi = 96.0f; + if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi))) +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h +index ae57cfb83..983a20ada 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h +@@ -36,6 +36,7 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, unsigned int width, unsigned int height, -- bool containsAlpha, -+ bool containsAlpha, -+ unsigned int samples, + bool containsAlpha, ++ unsigned int samples, IDXGISwapChain1 **swapChain) override; protected: -diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" -index 3e67269f..a66935ce 100644 ---- "a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" -+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" +@@ -49,7 +50,7 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, + ComPtr<IMap<HSTRING, IInspectable *>> mPropertyMap; + }; + +-[uuid(7F924F66 - EBAE - 40E5 - A10B - B8F35E245190)] class CoreWindowSizeChangedHandler ++[uuid(7F924F66-EBAE-40E5-A10B-B8F35E245190)] class CoreWindowSizeChangedHandler + : public Microsoft::WRL::RuntimeClass< + Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, + IWindowSizeChangedEventHandler> +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h +index 708e8a212..aa6c6f375 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h @@ -53,6 +53,7 @@ class InspectableNativeWindow unsigned int width, unsigned int height, bool containsAlpha, -+ unsigned int samples, - IDXGISwapChain1 **swapChain) = 0; ++ unsigned int samples, + IDXGISwapChain1 **swapChain) = 0; bool getClientRect(RECT *rect) -diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" -index 2ef2235c..284fccbb 100644 ---- "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" -+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" -@@ -89,6 +89,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp +index 8972ca227..ed3576a8c 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp +@@ -13,6 +13,8 @@ + #include "libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" + #include "libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" + ++#include <windows.foundation.metadata.h> ++ + using namespace Microsoft::WRL; + using namespace Microsoft::WRL::Wrappers; + +@@ -88,6 +90,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, DXGI_FORMAT format, UINT width, UINT height, -+ UINT samples, ++ UINT samples, IDXGISwapChain **swapChain) { if (mImpl) -@@ -96,7 +97,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, +@@ -95,7 +98,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, IDXGIFactory2 *factory2 = d3d11::DynamicCastComObject<IDXGIFactory2>(factory); IDXGISwapChain1 *swapChain1 = nullptr; HRESULT result = @@ -66,23 +176,74 @@ index 2ef2235c..284fccbb 100644 SafeRelease(factory2); *swapChain = static_cast<IDXGISwapChain *>(swapChain1); return result; -diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" -index 996fd3a1..97a2c2c4 100644 ---- "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" -+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" -@@ -34,6 +34,7 @@ class NativeWindow11WinRT : public NativeWindow11 +@@ -119,4 +122,44 @@ bool NativeWindow11WinRT::IsValidNativeWindow(EGLNativeWindowType window) + return IsCoreWindow(window) || IsSwapChainPanel(window) || IsEGLConfiguredPropertySet(window); + } + ++bool NativeWindow11WinRT::IsSupportedWin10Release() ++{ ++ HSTRING className, contractName; ++ HSTRING_HEADER classNameHeader, contractNameHeader; ++ boolean isSupported = false; ++ ++ const wchar_t *str = static_cast<const wchar_t *>(RuntimeClass_Windows_Foundation_Metadata_ApiInformation); ++ unsigned int length; ++ SizeTToUInt32(::wcslen(str), &length); ++ HRESULT hr = WindowsCreateStringReference(RuntimeClass_Windows_Foundation_Metadata_ApiInformation, length, &classNameHeader, &className); ++ ++ if (FAILED(hr)) ++ { ++ return isSupported; ++ } ++ ++ Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Metadata::IApiInformationStatics> api; ++ ++ hr = RoGetActivationFactory(className, __uuidof(ABI::Windows::Foundation::Metadata::IApiInformationStatics), &api); ++ ++ if (FAILED(hr)) ++ { ++ return isSupported; ++ } ++ ++ str = static_cast<const wchar_t *>(L"Windows.Foundation.UniversalApiContract"); ++ SizeTToUInt32(::wcslen(str), &length); ++ hr = WindowsCreateStringReference(L"Windows.Foundation.UniversalApiContract", length, &contractNameHeader, ++ &contractName); ++ ++ if (FAILED(hr)) ++ { ++ return isSupported; ++ } ++ ++ api->IsApiContractPresentByMajor(contractName, 6, &isSupported); ++ ++ return isSupported; ++} ++ + } // namespace rx +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h +index eac5b21b7..36b20371e 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h +@@ -34,11 +34,13 @@ class NativeWindow11WinRT : public NativeWindow11 DXGI_FORMAT format, UINT width, UINT height, -+ UINT samples, ++ UINT samples, IDXGISwapChain **swapChain) override; void commitChange() override; -diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" -index c6d07fc8..89d9f870 100644 ---- "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" -+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" -@@ -246,6 +246,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device, + + static bool IsValidNativeWindow(EGLNativeWindowType window); ++ static bool IsSupportedWin10Release(); + + private: + bool mHasAlpha; +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp +index af0beb635..9f7face1b 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp +@@ -247,6 +247,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device, unsigned int width, unsigned int height, bool containsAlpha, @@ -90,24 +251,24 @@ index c6d07fc8..89d9f870 100644 IDXGISwapChain1 **swapChain) { if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 || -@@ -259,7 +260,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device, - swapChainDesc.Height = height; - swapChainDesc.Format = format; - swapChainDesc.Stereo = FALSE; -- swapChainDesc.SampleDesc.Count = 1; -+ swapChainDesc.SampleDesc.Count = samples; - swapChainDesc.SampleDesc.Quality = 0; - swapChainDesc.BufferUsage = - DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER; -diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" -index f9a2fc0e..dc5c804e 100644 ---- "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" -+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" -@@ -27,6 +27,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, public std::e +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h +index 09642eec5..1f2c090d5 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h +@@ -28,6 +28,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, unsigned int width, unsigned int height, bool containsAlpha, -+ unsigned int samples, ++ unsigned int samples, IDXGISwapChain1 **swapChain) override; protected: +@@ -43,7 +44,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, + ComPtr<IDXGISwapChain1> mSwapChain; + }; + +-[uuid(8ACBD974 - 8187 - 4508 - AD80 - AEC77F93CF36)] class SwapChainPanelSizeChangedHandler ++[uuid(8ACBD974-8187-4508-AD80-AEC77F93CF36)] class SwapChainPanelSizeChangedHandler + : public Microsoft::WRL::RuntimeClass< + Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, + ABI::Windows::UI::Xaml::ISizeChangedEventHandler> diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index 2616b4d48..f83f6294e 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -1,16 +1,11 @@ cmake_minimum_required(VERSION 3.8)
-project(angle)
+project(angle CXX C)
if(WIN32 AND NOT WINDOWS_STORE)
set(WINDOWS_DESKTOP 1)
else()
set(WINDOWS_DESKTOP 0)
endif()
-if (WINDOWS_DESKTOP OR WINDOWS_STORE)
- set(WINDOWS_ANY 1)
-else()
- set(WINDOWS_ANY 0)
-endif()
if(UNIX AND NOT APPLE)
set(LINUX 1)
@@ -18,10 +13,12 @@ else() set(LINUX 0)
endif()
-if(WINDOWS_ANY)
- add_compile_options(/d2guard4 /Wv:18 /guard:cf)
+if(MSVC)
+ add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive)
else()
- add_compile_options(-std=c++17 -fPIC)
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
if (APPLE)
@@ -44,7 +41,7 @@ include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) ##########
# angle::common
-if(WINDOWS_ANY)
+if(WIN32)
set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix")
elseif(LINUX)
set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac")
@@ -52,15 +49,18 @@ elseif(APPLE) set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win")
endif()
file(GLOB ANGLE_COMMON_SOURCES
- "src/common/*.h"
- "src/common/*.inl"
- "src/common/*.cpp"
- "src/common/third_party/smhasher/src/*.h"
- "src/common/third_party/smhasher/src/*.cpp"
- "src/common/third_party/xxhash/*.h"
- "src/common/third_party/xxhash/*.c"
- "src/common/third_party/base/anglebase/*.h"
- "src/common/third_party/base/anglebase/*.cc")
+ "src/common/*.h"
+ "src/common/*.inl"
+ "src/common/*.cpp"
+ "src/common/third_party/base/anglebase/*.h"
+ "src/common/third_party/base/anglebase/*.cc"
+ "src/common/third_party/base/anglebase/containers/*.h"
+ "src/common/third_party/base/anglebase/numerics/*.h"
+ "src/common/third_party/base/anglebase/numerics/*.cc"
+ "src/common/third_party/xxhash/*.h"
+ "src/common/third_party/xxhash/*.c"
+ "src/common/third_party/smhasher/src/*.h"
+ "src/common/third_party/smhasher/src/*.cpp")
list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}")
add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES})
target_include_directories(angle_common PUBLIC src/common/third_party/base)
@@ -80,10 +80,10 @@ file(GLOB TRANSLATOR_SOURCES "src/compiler/translator/glslang.y"
"src/compiler/translator/*.h"
"src/compiler/translator/*.cpp"
- "src/compiler/translator/tree_util/*.h"
- "src/compiler/translator/tree_util/*.cpp"
"src/compiler/translator/tree_ops/*.h"
"src/compiler/translator/tree_ops/*.cpp"
+ "src/compiler/translator/tree_util/*.h"
+ "src/compiler/translator/tree_util/*.cpp"
"src/third_party/compiler/ArrayBoundsClamper.cpp"
)
add_library(angle_translator STATIC ${TRANSLATOR_SOURCES})
@@ -147,7 +147,7 @@ if(WINDOWS_DESKTOP OR LINUX OR APPLE) endif()
# D3D Renderers
-if(WINDOWS_ANY)
+if(WIN32)
## All D3D Sources
file(GLOB_RECURSE LIBANGLE_D3D_SOURCES
"src/libANGLE/renderer/d3d/*.cpp"
@@ -168,7 +168,7 @@ if(WINDOWS_ANY) ## 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")
+ list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32|converged")
find_library(D3D9_LIB NAMES d3d9)
add_library(angle_renderer_win32 INTERFACE)
target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES})
@@ -178,7 +178,7 @@ if(WINDOWS_ANY) endif()
## D3D11 Base renderer
- list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32")
+ list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32|converged")
find_library(DXGUID_LIB NAMES dxguid)
find_library(D3D11_LIB NAMES d3d11)
add_library(angle_renderer_d3d INTERFACE)
@@ -187,12 +187,12 @@ if(WINDOWS_ANY) -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})
+ target_link_libraries(angle_renderer_d3d INTERFACE d3d11 dxguid)
add_library(angle::renderer::d3d ALIAS angle_renderer_d3d)
endif()
## Core libANGLE library
-if(WINDOWS_ANY)
+if(WIN32)
set(LIBANGLE_SOURCES_PLATFORM
"src/third_party/systeminfo/SystemInfo.cpp"
)
@@ -267,7 +267,7 @@ add_library(angle::libANGLE ALIAS libANGLE) ##########
# libGLESv2
-file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def")
+file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2_autogen.def")
add_library(libGLESv2 ${LIBGLESV2_SOURCES})
target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE)
target_compile_definitions(libGLESv2
@@ -277,6 +277,7 @@ target_compile_definitions(libGLESv2 -DGL_API=
-DGL_APICALL=
-DEGLAPI=
+ -DGL_API=
)
target_include_directories(libGLESv2 PUBLIC "$<INSTALL_INTERFACE:include>")
@@ -290,6 +291,7 @@ add_library(libEGL )
target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2)
target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>")
+target_include_directories(libEGL PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "")
diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL index dc348c48d..8fd8e8523 100644 --- a/ports/angle/CONTROL +++ b/ports/angle/CONTROL @@ -1,5 +1,5 @@ Source: angle
-Version: 2019-01-14-c2ee2cc
+Version: 2019-03-13-c2ee2cc-2
Description: 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.
Build-Depends: egl-registry
diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index 16179fee7..2ad6a7553 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -15,19 +15,13 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
-if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- message(FATAL_ERROR "ANGLE currently only supports being built for desktop")
-endif()
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/angle
REF chromium/3672
SHA512 dd6a05f0f1f4544b8646c41ffcb4d5e3b41f5261771ada47889345a24d4e55e6370df55a26c354a7073efcde307644cec6c6064ea6fe498ed6b52c3017249f81
-)
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch
+ PATCHES
+ 001-fix-uwp.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@@ -43,8 +37,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/angle ${CURRENT_PACKAGES_DIR}/share/unofficial-angle)
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle)
vcpkg_copy_pdbs()
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/apr-util/CONTROL b/ports/apr-util/CONTROL index 81814a2ca..1ff406efd 100644 --- a/ports/apr-util/CONTROL +++ b/ports/apr-util/CONTROL @@ -1,4 +1,4 @@ Source: apr-util -Version: 1.6.0-1 +Version: 1.6.0-2 Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation Build-Depends: expat, apr, openssl diff --git a/ports/apr-util/portfile.cmake b/ports/apr-util/portfile.cmake index abff4b47d..6ac311d76 100644 --- a/ports/apr-util/portfile.cmake +++ b/ports/apr-util/portfile.cmake @@ -13,16 +13,24 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-expat.patch" ) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DAPU_DECLARE_EXPORT=ON + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DAPU_DECLARE_STATIC=ON + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + ) +endif() vcpkg_install_cmake() - file(READ ${CURRENT_PACKAGES_DIR}/include/apu.h APU_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) string(REPLACE "defined(APU_DECLARE_EXPORT)" "1" APU_H "${APU_H}") diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index b4ea1f213..19be22b19 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,3 +1,6 @@ Source: apr -Version: 1.6.5 +Version: 1.6.5-1 Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. + +Feature: private-headers +Description: Install non-standard files required for building Apache httpd diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index 40ced3049..1e9de7ffb 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -14,9 +14,19 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if("private-headers" IN_LIST FEATURES) + set(INSTALL_PRIVATE_H ON) +else() + set(INSTALL_PRIVATE_H OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DINSTALL_PDB=OFF -DMIN_WINDOWS_VER=Windows7 -DAPR_HAVE_IPV6=ON + OPTIONS + -DINSTALL_PDB=OFF + -DMIN_WINDOWS_VER=Windows7 + -DAPR_HAVE_IPV6=ON + -DAPR_INSTALL_PRIVATE_H=${INSTALL_PRIVATE_H} # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index cedc63bf4..aaf6c0535 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,4 +1,4 @@ Source: arrow -Version: 0.11.1 +Version: 0.13.0 Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags, thrift, double-conversion, glog Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/all.patch b/ports/arrow/all.patch index 31be15f5b..2e994af9b 100644 --- a/ports/arrow/all.patch +++ b/ports/arrow/all.patch @@ -1,1350 +1,297 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4448b98..d6aa484 100644 +index 52081c4..e1e13b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -743,10 +743,10 @@ elseif (PTHREAD_LIBRARY) - # linking order. - set(ARROW_LINK_LIBS - ${ARROW_LINK_LIBS} -- ${PTHREAD_LIBRARY}) -+ pthreadshared) - set(ARROW_STATIC_LINK_LIBS - ${ARROW_STATIC_LINK_LIBS} -- ${PTHREAD_LIBRARY}) -+ pthreadshared) +@@ -804,6 +804,9 @@ if(ARROW_USE_GLOG) + list(APPEND ARROW_LINK_LIBS GLOG::glog) + list(APPEND ARROW_STATIC_LINK_LIBS GLOG::glog) + list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS GLOG::glog) ++ if(ARROW_NEED_GFLAGS) ++ list(APPEND ARROW_STATIC_LINK_LIBS gflags::gflags) ++ endif() + add_definitions("-DARROW_USE_GLOG") endif() - ############################################################ -@@ -780,3 +780,4 @@ endif() - if(ARROW_GANDIVA) - add_subdirectory(src/gandiva) - endif() -+ diff --git a/cmake_modules/FindBrotli.cmake b/cmake_modules/FindBrotli.cmake -index ea971f0..e8dfb3c 100644 +index e1429a2..6dee036 100644 --- a/cmake_modules/FindBrotli.cmake +++ b/cmake_modules/FindBrotli.cmake -@@ -39,57 +39,27 @@ elseif ( Brotli_HOME ) - endif() - - find_path( BROTLI_INCLUDE_DIR NAMES brotli/decode.h -- PATHS ${_brotli_roots} -- NO_DEFAULT_PATH - PATH_SUFFIXES "include" ) - --find_library( BROTLI_LIBRARY_ENC NAMES libbrotlienc.a libbrotlienc-static.a brotlienc -- PATHS ${_brotli_roots} -- NO_DEFAULT_PATH -- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) -+find_library( BROTLI_LIBRARY_ENC NAMES libbrotlienc libbrotlienc-static brotlienc brotlienc-static -+ PATH_SUFFIXES "lib" ) +@@ -18,6 +18,7 @@ + # find_package(Brotli) --find_library( BROTLI_LIBRARY_DEC NAMES libbrotlidec.a libbrotlidec-static.a brotlidec -- PATHS ${_brotli_roots} -- NO_DEFAULT_PATH -- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) -+find_library( BROTLI_LIBRARY_DEC NAMES libbrotlidec libbrotlidec-static brotlidec brotlidec-static -+ PATH_SUFFIXES "lib" ) - --find_library( BROTLI_LIBRARY_COMMON NAMES libbrotlicommon.a libbrotlicommon-static.a brotlicommon -- PATHS ${_brotli_roots} -- NO_DEFAULT_PATH -- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) -+find_library( BROTLI_LIBRARY_COMMON NAMES libbrotlicommon libbrotlicommon-static brotlicommon brotlicommon-static -+ PATH_SUFFIXES "lib" ) - - set(BROTLI_LIBRARIES ${BROTLI_LIBRARY_ENC} ${BROTLI_LIBRARY_DEC} - ${BROTLI_LIBRARY_COMMON}) -- -+ - if (BROTLI_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR BROTLI_LIBRARIES)) - set(BROTLI_FOUND TRUE) -- get_filename_component( BROTLI_LIBS ${BROTLI_LIBRARY_ENC} PATH ) -- set(BROTLI_LIB_NAME brotli) -- if (BROTLI_MSVC_STATIC_LIB_SUFFIX) -- set(BROTLI_STATIC_LIB_SUFFIX "${BROTLI_MSVC_STATIC_LIB_SUFFIX}") -- endif() -- if (NOT BROTLI_STATIC_LIB_SUFFIX) -- if (EXISTS "${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc-static${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(BROTLI_STATIC_LIB_SUFFIX -static) -- else() -- if (MSVC) -- set(BROTLI_STATIC_LIB_SUFFIX _static) -- else() -- set(BROTLI_STATIC_LIB_SUFFIX "") -- endif() -- endif() -- endif() -- set(BROTLI_STATIC_LIB -- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} -- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} -- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) -- set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) -- set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) -- set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) -- set(BROTLI_SHARED_LIB -- ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${CMAKE_SHARED_LIBRARY_SUFFIX} -- ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${CMAKE_SHARED_LIBRARY_SUFFIX} -- ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${CMAKE_SHARED_LIBRARY_SUFFIX}) -+ set(BROTLI_STATIC_LIB ${BROTLI_LIBRARIES}) -+ set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBRARY_ENC}) -+ set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBRARY_DEC}) -+ set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBRARY_COMMON}) -+ set(BROTLI_SHARED_LIB ${BROTLI_LIBRARIES}) - else () - set(BROTLI_FOUND FALSE) - endif () -diff --git a/cmake_modules/FindFlatbuffers.cmake b/cmake_modules/FindFlatbuffers.cmake -index 975c869..9cee8a0 100644 ---- a/cmake_modules/FindFlatbuffers.cmake -+++ b/cmake_modules/FindFlatbuffers.cmake -@@ -31,31 +31,26 @@ - # FLATBUFFERS_STATIC_LIB, path to libflatbuffers.a - # FLATBUFFERS_FOUND, whether flatbuffers has been found - --if( NOT "${FLATBUFFERS_HOME}" STREQUAL "") -- file( TO_CMAKE_PATH "${FLATBUFFERS_HOME}" _native_path ) -- list( APPEND _flatbuffers_roots "${_native_path}" ) --elseif ( Flatbuffers_HOME ) -- list( APPEND _flatbuffers_roots "${Flatbuffers_HOME}" ) -+if(WIN32) -+ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(FLATBUFFERS_LIB_SUFFIX mdd) -+ else() -+ set(FLATBUFFERS_LIB_SUFFIX md) -+ endif() -+else() -+ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(FLATBUFFERS_LIB_SUFFIX "d") -+ else() -+ set(FLATBUFFERS_LIB_SUFFIX "") -+ endif() + pkg_check_modules(BROTLI_PC libbrotlicommon libbrotlienc libbrotlidec) ++ + if(BROTLI_PC_FOUND) + set(BROTLI_INCLUDE_DIR "${BROTLI_PC_libbrotlicommon_INCLUDEDIR}") + +@@ -25,80 +26,16 @@ if(BROTLI_PC_FOUND) + list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlicommon_LIBDIR}") + list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlienc_LIBDIR}") + list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlidec_LIBDIR}") +- +- find_library(BROTLI_COMMON_LIBRARY brotlicommon +- PATHS ${BROTLI_PC_LIBRARY_DIRS} +- NO_DEFAULT_PATH) +- find_library(BROTLI_ENC_LIBRARY brotlienc +- PATHS ${BROTLI_PC_LIBRARY_DIRS} +- NO_DEFAULT_PATH) +- find_library(BROTLI_DEC_LIBRARY brotlidec +- PATHS ${BROTLI_PC_LIBRARY_DIRS} +- NO_DEFAULT_PATH) + elseif(BROTLI_ROOT) +- find_library( +- BROTLI_COMMON_LIBRARY +- NAMES brotlicommon +- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlicommon${CMAKE_SHARED_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon-static${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon_static${CMAKE_STATIC_LIBRARY_SUFFIX} +- PATHS ${BROTLI_ROOT} "${BROTLI_ROOT}/Library" +- PATH_SUFFIXES "lib64" "lib" "bin" +- NO_DEFAULT_PATH) +- find_library( +- BROTLI_ENC_LIBRARY +- NAMES brotlienc +- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlienc${CMAKE_SHARED_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc-static${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc_static${CMAKE_STATIC_LIBRARY_SUFFIX} +- PATHS ${BROTLI_ROOT} "${BROTLI_ROOT}/Library" +- PATH_SUFFIXES "lib64" "lib" "bin" +- NO_DEFAULT_PATH) +- find_library( +- BROTLI_DEC_LIBRARY +- NAMES brotlidec +- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlidec${CMAKE_SHARED_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec-static${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec_static${CMAKE_STATIC_LIBRARY_SUFFIX} +- PATHS ${BROTLI_ROOT} "${BROTLI_ROOT}/Library" +- PATH_SUFFIXES "lib64" "lib" "bin" +- NO_DEFAULT_PATH) +- find_path(BROTLI_INCLUDE_DIR +- NAMES brotli/decode.h +- PATHS ${BROTLI_ROOT} "${BROTLI_ROOT}/Library" +- NO_DEFAULT_PATH +- PATH_SUFFIXES "include") ++ find_path(BROTLI_INCLUDE_DIR NAMES brotli/decode.h PATH_SUFFIXES "include") + else() +- find_library( +- BROTLI_COMMON_LIBRARY +- NAMES brotlicommon +- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlicommon${CMAKE_SHARED_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon-static${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon_static${CMAKE_STATIC_LIBRARY_SUFFIX} +- PATH_SUFFIXES "lib64" "lib" "bin") +- find_library( +- BROTLI_ENC_LIBRARY +- NAMES brotlienc +- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlienc${CMAKE_SHARED_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc-static${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc_static${CMAKE_STATIC_LIBRARY_SUFFIX} +- PATH_SUFFIXES "lib64" "lib" "bin") +- find_library( +- BROTLI_DEC_LIBRARY +- NAMES brotlidec +- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlidec${CMAKE_SHARED_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec-static${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec_static${CMAKE_STATIC_LIBRARY_SUFFIX} +- PATH_SUFFIXES "lib64" "lib" "bin") + find_path(BROTLI_INCLUDE_DIR NAMES brotli/decode.h PATH_SUFFIXES "include") endif() --# Try the parameterized roots, if they exist --if ( _flatbuffers_roots ) -- find_path( FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h -- PATHS "${_flatbuffers_roots}" NO_DEFAULT_PATH -- PATH_SUFFIXES "include" ) -- find_library( FLATBUFFERS_LIBRARIES NAMES flatbuffers -- PATHS "${_flatbuffers_roots}" NO_DEFAULT_PATH -- PATH_SUFFIXES "lib" "lib64") --else () -- find_path( FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h ) -- find_library( FLATBUFFERS_LIBRARIES NAMES flatbuffers ) --endif () -+find_path( FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h ) -+find_library( FLATBUFFERS_LIBRARIES NAMES flatbuffers ) - - find_program(FLATBUFFERS_COMPILER flatc -- "${FLATBUFFERS_HOME}/bin" -- /usr/local/bin -- /usr/bin -- NO_DEFAULT_PATH -+ PATH_SUFFIXES -+ "${FLATBUFFERS_HOME}/tools/flatbuffers" - ) - - if (FLATBUFFERS_INCLUDE_DIR AND FLATBUFFERS_LIBRARIES) -diff --git a/cmake_modules/FindGLOG.cmake b/cmake_modules/FindGLOG.cmake -index f22e4df..53e545b 100644 ---- a/cmake_modules/FindGLOG.cmake -+++ b/cmake_modules/FindGLOG.cmake -@@ -29,11 +29,6 @@ - # GLOG_STATIC_LIB, path to libglog.a - # GLOG_FOUND, whether glog has been found - --if( NOT "${GLOG_HOME}" STREQUAL "") -- file( TO_CMAKE_PATH "${GLOG_HOME}" _native_path ) -- list( APPEND _glog_roots ${_native_path} ) --endif() -- - message(STATUS "GLOG_HOME: ${GLOG_HOME}") - # Try the parameterized roots, if they exist - if ( _glog_roots ) -@@ -43,10 +38,10 @@ if ( _glog_roots ) - endif () - - find_path( GLOG_INCLUDE_DIR NAMES glog/logging.h -- PATHS ${_glog_roots} NO_DEFAULT_PATH -+ PATHS ${_glog_roots} - PATH_SUFFIXES "include" ) - find_library( GLOG_LIBRARIES NAMES glog -- PATHS ${_glog_roots} NO_DEFAULT_PATH -+ PATHS ${_glog_roots} - PATH_SUFFIXES ${lib_dirs}) - else () - find_path( GLOG_INCLUDE_DIR NAMES glog/logging.h ) ++find_library(BROTLI_COMMON_LIBRARY NAMES brotlicommon brotlicommon-static libbrotlicommon libbrotlicommon-static) ++find_library(BROTLI_ENC_LIBRARY NAMES libbrotlienc libbrotlienc-static brotlienc brotlienc-static) ++find_library(BROTLI_DEC_LIBRARY NAMES brotlidec libbrotlidec libbrotlidec-static brotlidec brotlidec-static) ++ + find_package_handle_standard_args(Brotli + REQUIRED_VARS + BROTLI_COMMON_LIBRARY diff --git a/cmake_modules/FindLz4.cmake b/cmake_modules/FindLz4.cmake -index 3a89c8d..1e068b4 100644 +index 3606f5c..1d18b7c 100644 --- a/cmake_modules/FindLz4.cmake +++ b/cmake_modules/FindLz4.cmake -@@ -29,23 +29,16 @@ elseif ( Lz4_HOME ) - list( APPEND _lz4_roots ${Lz4_HOME} ) +@@ -19,24 +19,26 @@ if(MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX) + set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static") endif() --if (MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX) -- set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static") +-set(LZ4_STATIC_LIB_SUFFIX "${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") +if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(LZ4_LIB_NAME lz4d) -+else() -+ set(LZ4_LIB_NAME lz4) - endif() - --set(LZ4_STATIC_LIB_SUFFIX -- "${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") -- --set(LZ4_STATIC_LIB_NAME -- ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX}) -- - find_path(LZ4_INCLUDE_DIR NAMES lz4.h -- PATHS ${_lz4_roots} -- NO_DEFAULT_PATH - PATH_SUFFIXES "include" ) --find_library(LZ4_STATIC_LIB NAMES ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} -- PATHS ${_lz4_roots} -- NO_DEFAULT_PATH -+ -+find_library(LZ4_STATIC_LIB NAMES ${LZ4_LIB_NAME} - PATH_SUFFIXES "lib" ) - - include(FindPackageHandleStandardArgs) -diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake -index 867963c..fd45321 100644 ---- a/cmake_modules/FindSnappy.cmake -+++ b/cmake_modules/FindSnappy.cmake -@@ -31,31 +31,23 @@ - # SNAPPY_SHARED_LIB, path to libsnappy's shared library - # SNAPPY_FOUND, whether snappy has been found - --if( NOT "${SNAPPY_HOME}" STREQUAL "") -- file( TO_CMAKE_PATH "${SNAPPY_HOME}" _native_path ) -- list( APPEND _snappy_roots ${_native_path} ) --elseif ( Snappy_HOME ) -- list( APPEND _snappy_roots ${Snappy_HOME} ) --endif() -- --message(STATUS "SNAPPY_HOME: ${SNAPPY_HOME}") --find_path(SNAPPY_INCLUDE_DIR snappy.h HINTS -- ${_snappy_roots} -- NO_DEFAULT_PATH -+find_path(SNAPPY_INCLUDE_DIR snappy.h - PATH_SUFFIXES "include") - --find_library( SNAPPY_LIBRARIES NAMES snappy PATHS -- ${_snappy_roots} -- NO_DEFAULT_PATH -- PATH_SUFFIXES "lib") -+if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(SNAPPY_LIB_NAME snappyd) -+else() -+ set(SNAPPY_LIB_NAME snappy) ++ set(LZ4_LIB_NAME_DEBUG_SUFFIX d) +endif() -+ -+find_library( SNAPPY_LIBRARIES NAMES ${SNAPPY_LIB_NAME} PATH_SUFFIXES "lib") - if (SNAPPY_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR SNAPPY_LIBRARIES)) - set(SNAPPY_FOUND TRUE) - get_filename_component( SNAPPY_LIBS ${SNAPPY_LIBRARIES} PATH ) - set(SNAPPY_HEADER_NAME snappy.h) - set(SNAPPY_HEADER ${SNAPPY_INCLUDE_DIR}/${SNAPPY_HEADER_NAME}) -- set(SNAPPY_LIB_NAME snappy) -- set(SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${SNAPPY_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) -+ set(SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}) - set(SNAPPY_SHARED_LIB ${SNAPPY_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) - else () - set(SNAPPY_FOUND FALSE) +-set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX}) ++set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_MSVC_STATIC_LIB_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) + + pkg_check_modules(LZ4_PC liblz4) + if(LZ4_PC_FOUND) + set(LZ4_INCLUDE_DIR "${LZ4_PC_INCLUDEDIR}") + + list(APPEND LZ4_PC_LIBRARY_DIRS "${LZ4_PC_LIBDIR}") +- find_library(LZ4_LIB lz4 ++ find_library(LZ4_LIB lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} + PATHS ${LZ4_PC_LIBRARY_DIRS} + NO_DEFAULT_PATH + PATH_SUFFIXES "${CMAKE_LIBRARY_ARCHITECTURE}") + elseif(LZ4_ROOT) + find_library( + LZ4_LIB +- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} +- "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" ++ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} ++ "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}" + PATHS ${LZ4_ROOT} "${LZ4_ROOT}/Library" + PATH_SUFFIXES "lib64" "lib" "bin" + NO_DEFAULT_PATH) +@@ -48,8 +50,8 @@ elseif(LZ4_ROOT) + else() + find_library( + LZ4_LIB +- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} +- "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" ++ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} ++ "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}" + PATH_SUFFIXES "lib64" "lib" "bin") + find_path(LZ4_INCLUDE_DIR NAMES lz4.h PATH_SUFFIXES "include") + endif() diff --git a/cmake_modules/FindThrift.cmake b/cmake_modules/FindThrift.cmake -index 5402766..6cff9fa 100644 +index a4decf7..78ec7c8 100644 --- a/cmake_modules/FindThrift.cmake +++ b/cmake_modules/FindThrift.cmake -@@ -28,41 +28,31 @@ - # THRIFT_STATIC_LIB, THRIFT static library - # THRIFT_FOUND, If false, do not try to use ant - --# prefer the thrift version supplied in THRIFT_HOME --if( NOT "${THRIFT_HOME}" STREQUAL "") -- file( TO_CMAKE_PATH "${THRIFT_HOME}" _native_path ) -- list( APPEND _thrift_roots ${_native_path} ) --elseif ( Thrift_HOME ) -- list( APPEND _thrift_roots ${Thrift_HOME} ) --endif() -- --message(STATUS "THRIFT_HOME: ${THRIFT_HOME}") --find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h HINTS -- ${_thrift_roots} -- NO_DEFAULT_PATH -+find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h - PATH_SUFFIXES "include" - ) - --find_path(THRIFT_CONTRIB_DIR share/fb303/if/fb303.thrift HINTS -- ${_thrift_roots} -- NO_DEFAULT_PATH --) -- --if (MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX) -- set(THRIFT_MSVC_STATIC_LIB_SUFFIX md) -+if(WIN32) -+ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(THRIFT_LIB_SUFFIX mdd) -+ else() -+ set(THRIFT_LIB_SUFFIX md) -+ endif() -+else() -+ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(THRIFT_LIB_SUFFIX "d") -+ else() -+ set(THRIFT_LIB_SUFFIX "") -+ endif() +@@ -65,6 +65,10 @@ if(MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX) + set(THRIFT_MSVC_STATIC_LIB_SUFFIX md) endif() - find_library(THRIFT_STATIC_LIB NAMES -- ${CMAKE_STATIC_LIBRARY_PREFIX}thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} -- HINTS ${_thrift_roots} -- NO_DEFAULT_PATH -- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" -+ thrift${THRIFT_LIB_SUFFIX} -+ PATH_SUFFIXES lib - ) - - find_program(THRIFT_COMPILER thrift HINTS -- ${_thrift_roots} -- NO_DEFAULT_PATH -- PATH_SUFFIXES "bin" -+ PATH_SUFFIXES "tools" - ) - - function(EXTRACT_THRIFT_VERSION) -@@ -111,7 +101,6 @@ else () - endif () - endif () - -- - mark_as_advanced( - THRIFT_STATIC_LIB - THRIFT_COMPILER -diff --git a/cmake_modules/FindZLIB.cmake b/cmake_modules/FindZLIB.cmake -index ca6060b..85a4585 100644 ---- a/cmake_modules/FindZLIB.cmake -+++ b/cmake_modules/FindZLIB.cmake -@@ -30,43 +30,15 @@ - # ZLIB_SHARED_LIB, path to libz's shared library - # ZLIB_FOUND, whether zlib has been found - --if( NOT "${ZLIB_HOME}" STREQUAL "") -- file( TO_CMAKE_PATH "${ZLIB_HOME}" _native_path ) -- list( APPEND _zlib_roots ${_native_path} ) --elseif ( ZLIB_HOME ) -- list( APPEND _zlib_roots ${ZLIB_HOME} ) +if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(ZLIB_LIB_NAME_SUFFIX "d") -+else() -+ set(ZLIB_LIB_NAME_SUFFIX "") - endif() - --if (MSVC) -- # zlib uses zlib.lib for Windows. -- set(ZLIB_LIB_NAME zlib.lib) --else () -- # zlib uses libz.so for non Windows. -- set(ZLIB_LIB_NAME -- ${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX}) --endif () -- - # Try the parameterized roots, if they exist --if (_zlib_roots) -- find_path(ZLIB_INCLUDE_DIR NAMES zlib.h -- PATHS ${_zlib_roots} NO_DEFAULT_PATH -- PATH_SUFFIXES "include") -- find_library(ZLIB_SHARED_LIB -- NAMES ${ZLIB_LIB_NAME} -- PATHS ${_zlib_roots} NO_DEFAULT_PATH -- PATH_SUFFIXES "lib") --else () -- pkg_check_modules(PKG_ZLIB zlib) -- if (PKG_ZLIB_FOUND) -- set(ZLIB_INCLUDE_DIR ${PKG_ZLIB_INCLUDEDIR}) -- find_library(ZLIB_SHARED_LIB -- NAMES ${ZLIB_LIB_NAME} -- PATHS ${PKG_ZLIB_LIBDIR} NO_DEFAULT_PATH) -- else () -- find_path(ZLIB_INCLUDE_DIR NAMES zlib.h) -- find_library(ZLIB_SHARED_LIB NAMES ${ZLIB_LIB_NAME}) -- endif () --endif () -+find_path(ZLIB_INCLUDE_DIR NAMES zlib.h PATH_SUFFIXES "include") -+find_library(ZLIB_SHARED_LIB NAMES z zlib${ZLIB_LIB_NAME_SUFFIX} PATH_SUFFIXES "lib") - - if (ZLIB_INCLUDE_DIR AND ZLIB_SHARED_LIB) - set(ZLIB_FOUND TRUE) ++ set(THRIFT_LIB_NAME_DEBUG_SUFFIX d) ++endif() ++ + pkg_check_modules(THRIFT_PC thrift) + + # THRIFT-4760: The pkgconfig files are currently only installed when using autotools. +@@ -74,15 +78,13 @@ if(THRIFT_PC_FOUND) + + list(APPEND THRIFT_PC_LIBRARY_DIRS "${THRIFT_PC_LIBDIR}") + +- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} +- PATHS ${THRIFT_PC_LIBRARY_DIRS} +- NO_DEFAULT_PATH) ++ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX} ++ PATHS ${THRIFT_PC_LIBRARY_DIRS}) + find_program(THRIFT_COMPILER thrift + HINTS ${THRIFT_PC_PREFIX} +- NO_DEFAULT_PATH + PATH_SUFFIXES "bin") + else() +- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} ++ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX} + HINTS ${Thrift_ROOT} + PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib") + find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h diff --git a/cmake_modules/FindZSTD.cmake b/cmake_modules/FindZSTD.cmake -index 810e5c0..d272d8f 100644 +index 17b58a3..fa2ab05 100644 --- a/cmake_modules/FindZSTD.cmake +++ b/cmake_modules/FindZSTD.cmake -@@ -22,30 +22,16 @@ - # ZSTD_STATIC_LIB, path to libzstd static library - # ZSTD_FOUND, whether zstd has been found - --if( NOT "${ZSTD_HOME}" STREQUAL "") -- file( TO_CMAKE_PATH "${ZSTD_HOME}" _native_path ) -- list( APPEND _zstd_roots ${_native_path} ) --elseif ( ZStd_HOME ) -- list( APPEND _zstd_roots ${ZStd_HOME} ) --endif() -+find_path(ZSTD_INCLUDE_DIR NAMES zstd.h -+ PATH_SUFFIXES "include" ) - --if (MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX) -- set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static") -+if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(ZSTD_LIB_NAME_SUFFIX "d") -+else() -+ set(ZSTD_LIB_NAME_SUFFIX "") +@@ -19,7 +19,11 @@ if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX) + set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static") endif() --set(ZSTD_STATIC_LIB_SUFFIX -- "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") -- --set(ZSTD_STATIC_LIB_NAME -- ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX}) -- --find_path(ZSTD_INCLUDE_DIR NAMES zstd.h -- PATHS ${_zstd_roots} -- NO_DEFAULT_PATH -- PATH_SUFFIXES "include" ) --find_library(ZSTD_STATIC_LIB NAMES ${ZSTD_STATIC_LIB_NAME} lib${ZSTD_STATIC_LIB_NAME} -- PATHS ${_zstd_roots} -- NO_DEFAULT_PATH -+find_library(ZSTD_STATIC_LIB NAMES zstd${ZSTD_LIB_NAME_SUFFIX} zstd_static${ZSTD_LIB_NAME_SUFFIX} - PATH_SUFFIXES "lib" ) - - include(FindPackageHandleStandardArgs) -diff --git a/cmake_modules/Finddouble-conversion.cmake b/cmake_modules/Finddouble-conversion.cmake -new file mode 100644 -index 0000000..4fa0995 ---- /dev/null -+++ b/cmake_modules/Finddouble-conversion.cmake -@@ -0,0 +1,23 @@ -+# Licensed to the Apache Software Foundation (ASF) under one -+# or more contributor license agreements. See the NOTICE file -+# distributed with this work for additional information -+# regarding copyright ownership. The ASF licenses this file -+# to you under the Apache License, Version 2.0 (the -+# "License"); you may not use this file except in compliance -+# with the License. You may obtain a copy of the License at -+# -+# http://www.apache.org/licenses/LICENSE-2.0 -+# -+# Unless required by applicable law or agreed to in writing, -+# software distributed under the License is distributed on an -+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -+# KIND, either express or implied. See the License for the -+# specific language governing permissions and limitations -+# under the License. -+ -+find_path(DOUBLE_CONVERSION_INCLUDE_DIR NAMES double-conversion.h PATH_SUFFIXES "include/double-conversion" ) -+ -+find_library(DOUBLE_CONVERSION_STATIC_LIB NAMES double-conversion PATH_SUFFIXES "lib" ) -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(DOUBLE_CONVERSION REQUIRED_VARS DOUBLE_CONVERSION_STATIC_LIB DOUBLE_CONVERSION_INCLUDE_DIR) -diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake -index 1c7cd62..572f6e1 100644 ---- a/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cmake_modules/ThirdpartyToolchain.cmake -@@ -302,6 +302,8 @@ if (WIN32) - else() - find_library(PTHREAD_LIBRARY pthread) - message(STATUS "Found pthread: ${PTHREAD_LIBRARY}") -+ add_library(pthreadshared SHARED IMPORTED) -+ set_target_properties(pthreadshared PROPERTIES IMPORTED_LOCATION ${PTHREAD_LIBRARY}) - endif() - - # ---------------------------------------------------------------------- -@@ -322,106 +324,56 @@ set(Boost_ADDITIONAL_VERSIONS - "1.61.0" "1.62" - "1.60.0" "1.60") - --if (ARROW_BOOST_VENDORED) -- set(BOOST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/boost_ep-prefix/src/boost_ep") -- set(BOOST_LIB_DIR "${BOOST_PREFIX}/stage/lib") -- set(BOOST_BUILD_LINK "static") -- set(BOOST_STATIC_SYSTEM_LIBRARY -- "${BOOST_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}boost_system${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(BOOST_STATIC_FILESYSTEM_LIBRARY -- "${BOOST_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}boost_filesystem${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(BOOST_STATIC_REGEX_LIBRARY -- "${BOOST_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}boost_regex${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(BOOST_SYSTEM_LIBRARY "${BOOST_STATIC_SYSTEM_LIBRARY}") -- set(BOOST_FILESYSTEM_LIBRARY "${BOOST_STATIC_FILESYSTEM_LIBRARY}") -- set(BOOST_REGEX_LIBRARY "${BOOST_STATIC_REGEX_LIBRARY}") -+if (MSVC) -+ # disable autolinking in boost -+ add_definitions(-DBOOST_ALL_NO_LIB) +-set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(ZSTD_LIB_NAME_DEBUG_SUFFIX d) +endif() -+if (ARROW_BOOST_USE_SHARED) -+ # Find shared Boost libraries. -+ set(Boost_USE_STATIC_LIBS OFF) -+ -+ if (MSVC) -+ # force all boost libraries to dynamic link -+ add_definitions(-DBOOST_ALL_DYN_LINK) -+ endif() + - if (ARROW_BOOST_HEADER_ONLY) -- set(BOOST_BUILD_PRODUCTS) -- set(BOOST_CONFIGURE_COMMAND "") -- set(BOOST_BUILD_COMMAND "") -+ find_package(Boost REQUIRED) - else() -- set(BOOST_BUILD_PRODUCTS -- ${BOOST_SYSTEM_LIBRARY} -- ${BOOST_FILESYSTEM_LIBRARY} -- ${BOOST_REGEX_LIBRARY}) -- set(BOOST_CONFIGURE_COMMAND -- "./bootstrap.sh" -- "--prefix=${BOOST_PREFIX}" -- "--with-libraries=filesystem,regex,system") -+ find_package(Boost COMPONENTS regex system filesystem REQUIRED) - if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") -- set(BOOST_BUILD_VARIANT "debug") -+ set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG}) -+ set(BOOST_SHARED_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_DEBUG}) -+ set(BOOST_SHARED_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_DEBUG}) - else() -- set(BOOST_BUILD_VARIANT "release") -+ set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE}) -+ set(BOOST_SHARED_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_RELEASE}) -+ set(BOOST_SHARED_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_RELEASE}) - endif() -- set(BOOST_BUILD_COMMAND -- "./b2" -- "link=${BOOST_BUILD_LINK}" -- "variant=${BOOST_BUILD_VARIANT}" -- "cxxflags=-fPIC") -+ set(BOOST_SYSTEM_LIBRARY boost_system_shared) -+ set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_shared) -+ set(BOOST_REGEX_LIBRARY boost_regex_shared) - endif() -- ExternalProject_Add(boost_ep -- URL ${BOOST_SOURCE_URL} -- BUILD_BYPRODUCTS ${BOOST_BUILD_PRODUCTS} -- BUILD_IN_SOURCE 1 -- CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND} -- BUILD_COMMAND ${BOOST_BUILD_COMMAND} -- INSTALL_COMMAND "" -- ${EP_LOG_OPTIONS}) -- set(Boost_INCLUDE_DIR "${BOOST_PREFIX}") -- set(Boost_INCLUDE_DIRS "${BOOST_INCLUDE_DIR}") -- add_dependencies(arrow_dependencies boost_ep) ++set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(ZSTD_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX}) + + pkg_check_modules(ZSTD_PC libzstd) +@@ -27,18 +31,15 @@ if(ZSTD_PC_FOUND) + set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}") + + list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}") +- find_library(ZSTD_LIB zstd ++ find_library(ZSTD_LIB zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} + PATHS ${ZSTD_PC_LIBRARY_DIRS} + NO_DEFAULT_PATH + PATH_SUFFIXES "${CMAKE_LIBRARY_ARCHITECTURE}") + elseif(ZSTD_ROOT) + message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}") + find_library(ZSTD_LIB +- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" +- "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}" +- PATHS ${ZSTD_ROOT} "${ZSTD_ROOT}/Library" +- PATH_SUFFIXES "lib64" "lib" "bin" +- NO_DEFAULT_PATH) ++ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" ++ "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}") + find_path(ZSTD_INCLUDE_DIR + NAMES zstd.h + PATHS ${ZSTD_ROOT} "${ZSTD_ROOT}/Library" +@@ -46,9 +47,8 @@ elseif(ZSTD_ROOT) + PATH_SUFFIXES "include") else() -- if (MSVC) -- # disable autolinking in boost -- add_definitions(-DBOOST_ALL_NO_LIB) -- endif() -- if (ARROW_BOOST_USE_SHARED) -- # Find shared Boost libraries. -- set(Boost_USE_STATIC_LIBS OFF) -- -- if (MSVC) -- # force all boost libraries to dynamic link -- add_definitions(-DBOOST_ALL_DYN_LINK) -- endif() -- -- if (ARROW_BOOST_HEADER_ONLY) -- find_package(Boost REQUIRED) -- else() -- find_package(Boost COMPONENTS regex system filesystem REQUIRED) -- if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") -- set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG}) -- set(BOOST_SHARED_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_DEBUG}) -- set(BOOST_SHARED_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_DEBUG}) -- else() -- set(BOOST_SHARED_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE}) -- set(BOOST_SHARED_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_RELEASE}) -- set(BOOST_SHARED_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_RELEASE}) -- endif() -- set(BOOST_SYSTEM_LIBRARY boost_system_shared) -- set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_shared) -- set(BOOST_REGEX_LIBRARY boost_regex_shared) -- endif() -+ # Find static boost headers and libs -+ # TODO Differentiate here between release and debug builds -+ set(Boost_USE_STATIC_LIBS ON) -+ if (ARROW_BOOST_HEADER_ONLY) -+ find_package(Boost REQUIRED) - else() -- # Find static boost headers and libs -- # TODO Differentiate here between release and debug builds -- set(Boost_USE_STATIC_LIBS ON) -- if (ARROW_BOOST_HEADER_ONLY) -- find_package(Boost REQUIRED) -+ find_package(Boost COMPONENTS regex system filesystem REQUIRED) -+ if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") -+ set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG}) -+ set(BOOST_STATIC_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_DEBUG}) -+ set(BOOST_STATIC_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_DEBUG}) - else() -- find_package(Boost COMPONENTS regex system filesystem REQUIRED) -- if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") -- set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_DEBUG}) -- set(BOOST_STATIC_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_DEBUG}) -- set(BOOST_STATIC_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_DEBUG}) -- else() -- set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE}) -- set(BOOST_STATIC_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_RELEASE}) -- set(BOOST_STATIC_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_RELEASE}) -- endif() -- set(BOOST_SYSTEM_LIBRARY boost_system_static) -- set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_static) -- set(BOOST_REGEX_LIBRARY boost_regex_static) -+ set(BOOST_STATIC_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY_RELEASE}) -+ set(BOOST_STATIC_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY_RELEASE}) -+ set(BOOST_STATIC_REGEX_LIBRARY ${Boost_REGEX_LIBRARY_RELEASE}) - endif() -+ set(BOOST_SYSTEM_LIBRARY boost_system_static) -+ set(BOOST_FILESYSTEM_LIBRARY boost_filesystem_static) -+ set(BOOST_REGEX_LIBRARY boost_regex_static) - endif() + find_library(ZSTD_LIB +- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" +- "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}" +- PATH_SUFFIXES "lib64" "lib" "bin") ++ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" ++ "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}") + find_path(ZSTD_INCLUDE_DIR NAMES zstd.h PATH_SUFFIXES "include") endif() -@@ -449,28 +401,8 @@ include_directories(SYSTEM ${Boost_INCLUDE_DIR}) - # ---------------------------------------------------------------------- - # Google double-conversion - --if("${DOUBLE_CONVERSION_HOME}" STREQUAL "") -- set(DOUBLE_CONVERSION_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/double-conversion_ep/src/double-conversion_ep") -- set(DOUBLE_CONVERSION_HOME "${DOUBLE_CONVERSION_PREFIX}") -- set(DOUBLE_CONVERSION_INCLUDE_DIR "${DOUBLE_CONVERSION_PREFIX}/include") -- set(DOUBLE_CONVERSION_STATIC_LIB "${DOUBLE_CONVERSION_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}double-conversion${CMAKE_STATIC_LIBRARY_SUFFIX}") -- -- set(DOUBLE_CONVERSION_CMAKE_ARGS -- "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" -- "-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}" -- "-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS}" -- "-DCMAKE_INSTALL_PREFIX=${DOUBLE_CONVERSION_PREFIX}") -- ExternalProject_Add(double-conversion_ep -- ${EP_LOG_OPTIONS} -- INSTALL_DIR ${DOUBLE_CONVERSION_PREFIX} -- URL ${DOUBLE_CONVERSION_SOURCE_URL} -- CMAKE_ARGS ${DOUBLE_CONVERSION_CMAKE_ARGS} -- BUILD_BYPRODUCTS "${DOUBLE_CONVERSION_STATIC_LIB}") -- set(DOUBLE_CONVERSION_VENDORED 1) --else() -- find_package(double-conversion REQUIRED) -- set(DOUBLE_CONVERSION_VENDORED 0) --endif() -+find_package(double-conversion REQUIRED) -+set(DOUBLE_CONVERSION_VENDORED 0) - - include_directories(SYSTEM ${DOUBLE_CONVERSION_INCLUDE_DIR}) - ADD_THIRDPARTY_LIB(double-conversion -@@ -486,38 +418,8 @@ endif() - if(ARROW_BUILD_TESTS OR ARROW_BUILD_BENCHMARKS) - add_custom_target(unittest ctest -L unittest) - -- if("${GTEST_HOME}" STREQUAL "") -- if(APPLE) -- set(GTEST_CMAKE_CXX_FLAGS "-fPIC -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-value -Wno-ignored-attributes") -- elseif(NOT MSVC) -- set(GTEST_CMAKE_CXX_FLAGS "-fPIC") -- endif() -- string(TOUPPER ${CMAKE_BUILD_TYPE} UPPERCASE_BUILD_TYPE) -- set(GTEST_CMAKE_CXX_FLAGS "${EP_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}} ${GTEST_CMAKE_CXX_FLAGS}") -- -- set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix/src/googletest_ep") -- set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include") -- set(GTEST_STATIC_LIB -- "${GTEST_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(GTEST_MAIN_STATIC_LIB -- "${GTEST_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(GTEST_VENDORED 1) -- set(GTEST_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX} -- -DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}) -- if (MSVC AND NOT ARROW_USE_STATIC_CRT) -- set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} -Dgtest_force_shared_crt=ON) -- endif() -- -- ExternalProject_Add(googletest_ep -- URL ${GTEST_SOURCE_URL} -- BUILD_BYPRODUCTS ${GTEST_STATIC_LIB} ${GTEST_MAIN_STATIC_LIB} -- CMAKE_ARGS ${GTEST_CMAKE_ARGS} -- ${EP_LOG_OPTIONS}) -- else() -- find_package(GTest REQUIRED) -- set(GTEST_VENDORED 0) -- endif() -+ find_package(GTest REQUIRED) -+ set(GTEST_VENDORED 0) - - message(STATUS "GTest include dir: ${GTEST_INCLUDE_DIR}") - message(STATUS "GTest static library: ${GTEST_STATIC_LIB}") -@@ -533,40 +435,8 @@ if(ARROW_BUILD_TESTS OR ARROW_BUILD_BENCHMARKS) - endif() - - # gflags (formerly Googleflags) command line parsing -- if("${GFLAGS_HOME}" STREQUAL "") -- set(GFLAGS_CMAKE_CXX_FLAGS ${EP_CXX_FLAGS}) -- -- set(GFLAGS_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/gflags_ep-prefix/src/gflags_ep") -- set(GFLAGS_HOME "${GFLAGS_PREFIX}") -- set(GFLAGS_INCLUDE_DIR "${GFLAGS_PREFIX}/include") -- if(MSVC) -- set(GFLAGS_STATIC_LIB "${GFLAGS_PREFIX}/lib/gflags_static.lib") -- else() -- set(GFLAGS_STATIC_LIB "${GFLAGS_PREFIX}/lib/libgflags.a") -- endif() -- set(GFLAGS_VENDORED 1) -- set(GFLAGS_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_INSTALL_PREFIX=${GFLAGS_PREFIX} -- -DBUILD_SHARED_LIBS=OFF -- -DBUILD_STATIC_LIBS=ON -- -DBUILD_PACKAGING=OFF -- -DBUILD_TESTING=OFF -- -BUILD_CONFIG_TESTS=OFF -- -DINSTALL_HEADERS=ON -- -DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS} -- -DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_C_FLAGS} -- -DCMAKE_CXX_FLAGS=${GFLAGS_CMAKE_CXX_FLAGS}) -- -- ExternalProject_Add(gflags_ep -- URL ${GFLAGS_SOURCE_URL} -- ${EP_LOG_OPTIONS} -- BUILD_IN_SOURCE 1 -- BUILD_BYPRODUCTS "${GFLAGS_STATIC_LIB}" -- CMAKE_ARGS ${GFLAGS_CMAKE_ARGS}) -- else() -- set(GFLAGS_VENDORED 0) -- find_package(GFlags REQUIRED) -- endif() -+ set(GFLAGS_VENDORED 0) -+ find_package(GFlags REQUIRED) - - message(STATUS "GFlags include dir: ${GFLAGS_INCLUDE_DIR}") - message(STATUS "GFlags static library: ${GFLAGS_STATIC_LIB}") -@@ -587,37 +457,8 @@ endif() - if(ARROW_BUILD_BENCHMARKS) - add_custom_target(runbenchmark ctest -L benchmark) - -- if("$ENV{GBENCHMARK_HOME}" STREQUAL "") -- if(NOT MSVC) -- set(GBENCHMARK_CMAKE_CXX_FLAGS "-fPIC -std=c++11 ${EP_CXX_FLAGS}") -- endif() -- -- if(APPLE) -- set(GBENCHMARK_CMAKE_CXX_FLAGS "${GBENCHMARK_CMAKE_CXX_FLAGS} -stdlib=libc++") -- endif() -- -- set(GBENCHMARK_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/gbenchmark_ep/src/gbenchmark_ep-install") -- set(GBENCHMARK_INCLUDE_DIR "${GBENCHMARK_PREFIX}/include") -- set(GBENCHMARK_STATIC_LIB "${GBENCHMARK_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}benchmark${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(GBENCHMARK_VENDORED 1) -- set(GBENCHMARK_CMAKE_ARGS -- "-DCMAKE_BUILD_TYPE=Release" -- "-DCMAKE_INSTALL_PREFIX:PATH=${GBENCHMARK_PREFIX}" -- "-DBENCHMARK_ENABLE_TESTING=OFF" -- "-DCMAKE_CXX_FLAGS=${GBENCHMARK_CMAKE_CXX_FLAGS}") -- if (APPLE) -- set(GBENCHMARK_CMAKE_ARGS ${GBENCHMARK_CMAKE_ARGS} "-DBENCHMARK_USE_LIBCXX=ON") -- endif() -- -- ExternalProject_Add(gbenchmark_ep -- URL ${GBENCHMARK_SOURCE_URL} -- BUILD_BYPRODUCTS "${GBENCHMARK_STATIC_LIB}" -- CMAKE_ARGS ${GBENCHMARK_CMAKE_ARGS} -- ${EP_LOG_OPTIONS}) -- else() -- find_package(GBenchmark REQUIRED) -- set(GBENCHMARK_VENDORED 0) -- endif() -+ find_package(GBenchmark REQUIRED) -+ set(GBENCHMARK_VENDORED 0) - - message(STATUS "GBenchmark include dir: ${GBENCHMARK_INCLUDE_DIR}") - message(STATUS "GBenchmark static library: ${GBENCHMARK_STATIC_LIB}") -@@ -632,24 +473,8 @@ endif() - - if (ARROW_IPC) - # RapidJSON, header only dependency -- if("${RAPIDJSON_HOME}" STREQUAL "") -- ExternalProject_Add(rapidjson_ep -- PREFIX "${CMAKE_BINARY_DIR}" -- URL ${RAPIDJSON_SOURCE_URL} -- URL_MD5 ${RAPIDJSON_SOURCE_MD5} -- CONFIGURE_COMMAND "" -- BUILD_COMMAND "" -- BUILD_IN_SOURCE 1 -- ${EP_LOG_OPTIONS} -- INSTALL_COMMAND "") -- -- ExternalProject_Get_Property(rapidjson_ep SOURCE_DIR) -- set(RAPIDJSON_INCLUDE_DIR "${SOURCE_DIR}/include") -- set(RAPIDJSON_VENDORED 1) -- else() -- set(RAPIDJSON_INCLUDE_DIR "${RAPIDJSON_HOME}/include") -- set(RAPIDJSON_VENDORED 0) -- endif() -+ set(RAPIDJSON_INCLUDE_DIR "${RAPIDJSON_HOME}/include") -+ set(RAPIDJSON_VENDORED 0) - message(STATUS "RapidJSON include dir: ${RAPIDJSON_INCLUDE_DIR}") - include_directories(SYSTEM ${RAPIDJSON_INCLUDE_DIR}) - -@@ -658,32 +483,8 @@ if (ARROW_IPC) - endif() - - ## Flatbuffers -- if("${FLATBUFFERS_HOME}" STREQUAL "") -- set(FLATBUFFERS_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/flatbuffers_ep-prefix/src/flatbuffers_ep-install") -- if (MSVC) -- set(FLATBUFFERS_CMAKE_CXX_FLAGS /EHsc) -- else() -- set(FLATBUFFERS_CMAKE_CXX_FLAGS -fPIC) -- endif() -- # We always need to do release builds, otherwise flatc will not be installed. -- ExternalProject_Add(flatbuffers_ep -- URL ${FLATBUFFERS_SOURCE_URL} -- CMAKE_ARGS -- "-DCMAKE_CXX_FLAGS=${FLATBUFFERS_CMAKE_CXX_FLAGS}" -- "-DCMAKE_INSTALL_PREFIX:PATH=${FLATBUFFERS_PREFIX}" -- "-DFLATBUFFERS_BUILD_TESTS=OFF" -- "-DCMAKE_BUILD_TYPE=RELEASE" -- "-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS}" -- "-DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_C_FLAGS}" -- ${EP_LOG_OPTIONS}) -- -- set(FLATBUFFERS_INCLUDE_DIR "${FLATBUFFERS_PREFIX}/include") -- set(FLATBUFFERS_COMPILER "${FLATBUFFERS_PREFIX}/bin/flatc") -- set(FLATBUFFERS_VENDORED 1) -- else() -- find_package(Flatbuffers REQUIRED) -- set(FLATBUFFERS_VENDORED 0) -- endif() -+ find_package(Flatbuffers REQUIRED) -+ set(FLATBUFFERS_VENDORED 0) - - if(FLATBUFFERS_VENDORED) - add_dependencies(arrow_dependencies flatbuffers_ep) -@@ -787,34 +588,7 @@ if (ARROW_WITH_ZLIB) - if(ZLIB_FOUND) - ADD_THIRDPARTY_LIB(zlib SHARED_LIB ${ZLIB_SHARED_LIB}) - else() -- set(ZLIB_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/zlib_ep/src/zlib_ep-install") -- set(ZLIB_HOME "${ZLIB_PREFIX}") -- set(ZLIB_INCLUDE_DIR "${ZLIB_PREFIX}/include") -- if (MSVC) -- if (${UPPERCASE_BUILD_TYPE} STREQUAL "DEBUG") -- set(ZLIB_STATIC_LIB_NAME zlibstaticd.lib) -- else() -- set(ZLIB_STATIC_LIB_NAME zlibstatic.lib) -- endif() -- else() -- set(ZLIB_STATIC_LIB_NAME libz.a) -- endif() -- set(ZLIB_STATIC_LIB "${ZLIB_PREFIX}/lib/${ZLIB_STATIC_LIB_NAME}") -- set(ZLIB_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_INSTALL_PREFIX=${ZLIB_PREFIX} -- -DCMAKE_C_FLAGS=${EP_C_FLAGS} -- -DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS} -- -DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_C_FLAGS} -- -DBUILD_SHARED_LIBS=OFF) -- ADD_THIRDPARTY_LIB(zlib -- STATIC_LIB ${ZLIB_STATIC_LIB}) -- -- ExternalProject_Add(zlib_ep -- URL ${ZLIB_SOURCE_URL} -- ${EP_LOG_OPTIONS} -- BUILD_BYPRODUCTS "${ZLIB_STATIC_LIB}" -- CMAKE_ARGS ${ZLIB_CMAKE_ARGS}) -- add_dependencies(zlib zlib_ep) -+ message(FATAL_ERROR "zlib not found.") - endif() - - include_directories(SYSTEM ${ZLIB_INCLUDE_DIR}) -@@ -824,62 +598,8 @@ if (ARROW_WITH_SNAPPY) - # ---------------------------------------------------------------------- - # Snappy - -- if("${SNAPPY_HOME}" STREQUAL "") -- set(SNAPPY_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/snappy_ep/src/snappy_ep-install") -- set(SNAPPY_HOME "${SNAPPY_PREFIX}") -- set(SNAPPY_INCLUDE_DIR "${SNAPPY_PREFIX}/include") -- if (MSVC) -- set(SNAPPY_STATIC_LIB_NAME snappy_static) -- else() -- set(SNAPPY_STATIC_LIB_NAME snappy) -- endif() -- set(SNAPPY_STATIC_LIB "${SNAPPY_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}") -- -- if (${UPPERCASE_BUILD_TYPE} EQUAL "RELEASE") -- if (APPLE) -- set(SNAPPY_CXXFLAGS "CXXFLAGS='-DNDEBUG -O1'") -- else() -- set(SNAPPY_CXXFLAGS "CXXFLAGS='-DNDEBUG -O2'") -- endif() -- endif() -- -- if (WIN32) -- set(SNAPPY_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- "-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}" -- "-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS}" -- "-DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_C_FLAGS}" -- "-DCMAKE_C_FLAGS=${EP_C_FLAGS}" -- "-DCMAKE_INSTALL_PREFIX=${SNAPPY_PREFIX}") -- set(SNAPPY_UPDATE_COMMAND ${CMAKE_COMMAND} -E copy -- ${CMAKE_SOURCE_DIR}/cmake_modules/SnappyCMakeLists.txt -- ./CMakeLists.txt && -- ${CMAKE_COMMAND} -E copy -- ${CMAKE_SOURCE_DIR}/cmake_modules/SnappyConfig.h -- ./config.h) -- ExternalProject_Add(snappy_ep -- UPDATE_COMMAND ${SNAPPY_UPDATE_COMMAND} -- ${EP_LOG_OPTIONS} -- BUILD_IN_SOURCE 1 -- BUILD_COMMAND ${MAKE} -- INSTALL_DIR ${SNAPPY_PREFIX} -- URL ${SNAPPY_SOURCE_URL} -- CMAKE_ARGS ${SNAPPY_CMAKE_ARGS} -- BUILD_BYPRODUCTS "${SNAPPY_STATIC_LIB}") -- else() -- ExternalProject_Add(snappy_ep -- CONFIGURE_COMMAND ./configure --with-pic "--prefix=${SNAPPY_PREFIX}" ${SNAPPY_CXXFLAGS} -- ${EP_LOG_OPTIONS} -- BUILD_IN_SOURCE 1 -- BUILD_COMMAND ${MAKE} -- INSTALL_DIR ${SNAPPY_PREFIX} -- URL ${SNAPPY_SOURCE_URL} -- BUILD_BYPRODUCTS "${SNAPPY_STATIC_LIB}") -- endif() -- set(SNAPPY_VENDORED 1) -- else() -- find_package(Snappy REQUIRED) -- set(SNAPPY_VENDORED 0) -- endif() -+ find_package(Snappy REQUIRED) -+ set(SNAPPY_VENDORED 0) - - include_directories(SYSTEM ${SNAPPY_INCLUDE_DIR}) - ADD_THIRDPARTY_LIB(snappy -@@ -894,47 +614,8 @@ if (ARROW_WITH_BROTLI) - # ---------------------------------------------------------------------- - # Brotli - -- if("${BROTLI_HOME}" STREQUAL "") -- set(BROTLI_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/brotli_ep/src/brotli_ep-install") -- set(BROTLI_HOME "${BROTLI_PREFIX}") -- set(BROTLI_INCLUDE_DIR "${BROTLI_PREFIX}/include") -- if (MSVC) -- set(BROTLI_LIB_DIR bin) -- else() -- set(BROTLI_LIB_DIR lib) -- endif() -- set(BROTLI_STATIC_LIBRARY_ENC "${BROTLI_PREFIX}/${BROTLI_LIB_DIR}/${CMAKE_LIBRARY_ARCHITECTURE}/${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(BROTLI_STATIC_LIBRARY_DEC "${BROTLI_PREFIX}/${BROTLI_LIB_DIR}/${CMAKE_LIBRARY_ARCHITECTURE}/${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(BROTLI_STATIC_LIBRARY_COMMON "${BROTLI_PREFIX}/${BROTLI_LIB_DIR}/${CMAKE_LIBRARY_ARCHITECTURE}/${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(BROTLI_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- "-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}" -- "-DCMAKE_C_FLAGS=${EP_C_FLAGS}" -- "-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS}" -- "-DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_C_FLAGS}" -- -DCMAKE_INSTALL_PREFIX=${BROTLI_PREFIX} -- -DCMAKE_INSTALL_LIBDIR=lib/${CMAKE_LIBRARY_ARCHITECTURE} -- -DBUILD_SHARED_LIBS=OFF) -- -- ExternalProject_Add(brotli_ep -- URL ${BROTLI_SOURCE_URL} -- BUILD_BYPRODUCTS "${BROTLI_STATIC_LIBRARY_ENC}" "${BROTLI_STATIC_LIBRARY_DEC}" "${BROTLI_STATIC_LIBRARY_COMMON}" -- ${BROTLI_BUILD_BYPRODUCTS} -- ${EP_LOG_OPTIONS} -- CMAKE_ARGS ${BROTLI_CMAKE_ARGS} -- STEP_TARGETS headers_copy) -- if (MSVC) -- ExternalProject_Get_Property(brotli_ep SOURCE_DIR) -- -- ExternalProject_Add_Step(brotli_ep headers_copy -- COMMAND xcopy /E /I include ..\\..\\..\\brotli_ep\\src\\brotli_ep-install\\include /Y -- DEPENDEES build -- WORKING_DIRECTORY ${SOURCE_DIR}) -- endif() -- set(BROTLI_VENDORED 1) -- else() -- find_package(Brotli REQUIRED) -- set(BROTLI_VENDORED 0) -- endif() -+ find_package(Brotli REQUIRED) -+ set(BROTLI_VENDORED 0) - - include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) - ADD_THIRDPARTY_LIB(brotli_enc -@@ -955,45 +636,8 @@ if (ARROW_WITH_LZ4) - # ---------------------------------------------------------------------- - # Lz4 - -- if("${LZ4_HOME}" STREQUAL "") -- set(LZ4_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/lz4_ep-prefix/src/lz4_ep") -- set(LZ4_HOME "${LZ4_BUILD_DIR}") -- set(LZ4_INCLUDE_DIR "${LZ4_BUILD_DIR}/lib") -- -- if (MSVC) -- if (ARROW_USE_STATIC_CRT) -- if (${UPPERCASE_BUILD_TYPE} STREQUAL "DEBUG") -- set(LZ4_RUNTIME_LIBRARY_LINKAGE "/p:RuntimeLibrary=MultiThreadedDebug") -- else() -- set(LZ4_RUNTIME_LIBRARY_LINKAGE "/p:RuntimeLibrary=MultiThreaded") -- endif() -- endif() -- set(LZ4_STATIC_LIB "${LZ4_BUILD_DIR}/visual/VS2010/bin/x64_${CMAKE_BUILD_TYPE}/liblz4_static.lib") -- set(LZ4_BUILD_COMMAND BUILD_COMMAND msbuild.exe /m /p:Configuration=${CMAKE_BUILD_TYPE} /p:Platform=x64 /p:PlatformToolset=v140 -- ${LZ4_RUNTIME_LIBRARY_LINKAGE} /t:Build ${LZ4_BUILD_DIR}/visual/VS2010/lz4.sln) -- set(LZ4_PATCH_COMMAND PATCH_COMMAND git --git-dir=. apply --verbose --whitespace=fix ${CMAKE_SOURCE_DIR}/build-support/lz4_msbuild_gl_runtimelibrary_params.patch) -- else() -- set(LZ4_STATIC_LIB "${LZ4_BUILD_DIR}/lib/liblz4.a") -- set(LZ4_BUILD_COMMAND BUILD_COMMAND ${CMAKE_SOURCE_DIR}/build-support/build-lz4-lib.sh) -- endif() -- -- ExternalProject_Add(lz4_ep -- URL ${LZ4_SOURCE_URL} -- ${EP_LOG_OPTIONS} -- UPDATE_COMMAND "" -- ${LZ4_PATCH_COMMAND} -- CONFIGURE_COMMAND "" -- INSTALL_COMMAND "" -- BINARY_DIR ${LZ4_BUILD_DIR} -- BUILD_BYPRODUCTS ${LZ4_STATIC_LIB} -- ${LZ4_BUILD_COMMAND} -- ) -- -- set(LZ4_VENDORED 1) -- else() -- find_package(Lz4 REQUIRED) -- set(LZ4_VENDORED 0) -- endif() -+ find_package(Lz4 REQUIRED) -+ set(LZ4_VENDORED 0) - - include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) - ADD_THIRDPARTY_LIB(lz4_static -@@ -1008,45 +652,8 @@ if (ARROW_WITH_ZSTD) - # ---------------------------------------------------------------------- - # ZSTD - -- if("${ZSTD_HOME}" STREQUAL "") -- set(ZSTD_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/zstd_ep-prefix/src/zstd_ep") -- set(ZSTD_INCLUDE_DIR "${ZSTD_BUILD_DIR}/lib") -- -- if (MSVC) -- if (ARROW_USE_STATIC_CRT) -- if (${UPPERCASE_BUILD_TYPE} STREQUAL "DEBUG") -- set(ZSTD_RUNTIME_LIBRARY_LINKAGE "/p:RuntimeLibrary=MultiThreadedDebug") -- else() -- set(ZSTD_RUNTIME_LIBRARY_LINKAGE "/p:RuntimeLibrary=MultiThreaded") -- endif() -- endif() -- set(ZSTD_STATIC_LIB "${ZSTD_BUILD_DIR}/build/VS2010/bin/x64_${CMAKE_BUILD_TYPE}/libzstd_static.lib") -- set(ZSTD_BUILD_COMMAND BUILD_COMMAND msbuild ${ZSTD_BUILD_DIR}/build/VS2010/zstd.sln /t:Build /v:minimal /p:Configuration=${CMAKE_BUILD_TYPE} -- ${ZSTD_RUNTIME_LIBRARY_LINKAGE} /p:Platform=x64 /p:PlatformToolset=v140 -- /p:OutDir=${ZSTD_BUILD_DIR}/build/VS2010/bin/x64_${CMAKE_BUILD_TYPE}/ /p:SolutionDir=${ZSTD_BUILD_DIR}/build/VS2010/ ) -- set(ZSTD_PATCH_COMMAND PATCH_COMMAND git --git-dir=. apply --verbose --whitespace=fix ${CMAKE_SOURCE_DIR}/build-support/zstd_msbuild_gl_runtimelibrary_params.patch) -- else() -- set(ZSTD_STATIC_LIB "${ZSTD_BUILD_DIR}/lib/libzstd.a") -- set(ZSTD_BUILD_COMMAND BUILD_COMMAND ${CMAKE_SOURCE_DIR}/build-support/build-zstd-lib.sh) -- endif() -- -- ExternalProject_Add(zstd_ep -- URL ${ZSTD_SOURCE_URL} -- ${EP_LOG_OPTIONS} -- UPDATE_COMMAND "" -- ${ZSTD_PATCH_COMMAND} -- CONFIGURE_COMMAND "" -- INSTALL_COMMAND "" -- BINARY_DIR ${ZSTD_BUILD_DIR} -- BUILD_BYPRODUCTS ${ZSTD_STATIC_LIB} -- ${ZSTD_BUILD_COMMAND} -- ) -- -- set(ZSTD_VENDORED 1) -- else() -- find_package(ZSTD REQUIRED) -- set(ZSTD_VENDORED 0) -- endif() -+ find_package(ZSTD REQUIRED) -+ set(ZSTD_VENDORED 0) - - include_directories(SYSTEM ${ZSTD_INCLUDE_DIR}) - ADD_THIRDPARTY_LIB(zstd_static -@@ -1063,24 +670,8 @@ endif() - - if (ARROW_ORC OR ARROW_FLIGHT) - # protobuf -- if ("${PROTOBUF_HOME}" STREQUAL "") -- set (PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install") -- set (PROTOBUF_HOME "${PROTOBUF_PREFIX}") -- set (PROTOBUF_INCLUDE_DIR "${PROTOBUF_PREFIX}/include") -- set (PROTOBUF_STATIC_LIB "${PROTOBUF_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}protobuf${CMAKE_STATIC_LIBRARY_SUFFIX}") -- -- ExternalProject_Add(protobuf_ep -- CONFIGURE_COMMAND "./configure" "--disable-shared" "--prefix=${PROTOBUF_PREFIX}" "CXXFLAGS=${EP_CXX_FLAGS}" -- BUILD_IN_SOURCE 1 -- URL ${PROTOBUF_SOURCE_URL} -- BUILD_BYPRODUCTS "${PROTOBUF_STATIC_LIB}" -- ${EP_LOG_OPTIONS}) -- -- set (PROTOBUF_VENDORED 1) -- else () -- find_package (Protobuf REQUIRED) -- set (PROTOBUF_VENDORED 0) -- endif () -+ find_package (Protobuf REQUIRED) -+ set (PROTOBUF_VENDORED 0) - - include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR}) - if (ARROW_PROTOBUF_USE_SHARED) -@@ -1100,34 +691,8 @@ endif() - # Dependencies for Arrow Flight RPC - - if (ARROW_FLIGHT) -- if ("${GRPC_HOME}" STREQUAL "") -- set(GRPC_VENDORED 1) -- set(GRPC_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/grpc_ep-prefix/src/grpc_ep-build") -- set(GRPC_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/grpc_ep/src/grpc_ep-install") -- set(GRPC_HOME "${GRPC_PREFIX}") -- set(GRPC_INCLUDE_DIR "${GRPC_PREFIX}/include") -- set(GRPC_STATIC_LIBRARY_GPR "${GRPC_BUILD_DIR}/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gpr${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(GRPC_STATIC_LIBRARY_GRPC "${GRPC_BUILD_DIR}/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}grpc${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(GRPC_STATIC_LIBRARY_GRPCPP "${GRPC_BUILD_DIR}/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}grpcpp${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(GRPC_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- "-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}" -- "-DCMAKE_C_FLAGS=${EP_C_FLAGS}" -- -DCMAKE_INSTALL_PREFIX=${GRPC_PREFIX} -- -DBUILD_SHARED_LIBS=OFF) -- -- ExternalProject_Add(grpc_ep -- GIT_REPOSITORY "https://github.com/grpc/grpc" -- GIT_TAG ${GRPC_VERSION} -- BUILD_BYPRODUCTS "${GRPC_STATIC_LIBRARY_GPR}" "${GRPC_STATIC_LIBRARY_GRPC}" "${GRPC_STATIC_LIBRARY_GRPCPP}" -- ${GRPC_BUILD_BYPRODUCTS} -- ${EP_LOG_OPTIONS} -- CMAKE_ARGS ${GRPC_CMAKE_ARGS} -- ${EP_LOG_OPTIONS}) -- include_directories(SYSTEM ${GRPC_INCLUDE_DIR}) -- else() -- find_package(gRPC CONFIG REQUIRED) -- set(GRPC_VENDORED 0) -- endif() -+ find_package(gRPC CONFIG REQUIRED) -+ set(GRPC_VENDORED 0) - - get_property(GPR_STATIC_LIB TARGET gRPC::gpr PROPERTY LOCATION) - ADD_THIRDPARTY_LIB(grpc_gpr -@@ -1157,60 +722,9 @@ endif() - - if (ARROW_ORC) - # orc -- if ("${ORC_HOME}" STREQUAL "") -- set(ORC_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/orc_ep-install") -- set(ORC_HOME "${ORC_PREFIX}") -- set(ORC_INCLUDE_DIR "${ORC_PREFIX}/include") -- set(ORC_STATIC_LIB "${ORC_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}orc${CMAKE_STATIC_LIBRARY_SUFFIX}") -- -- if ("${COMPILER_FAMILY}" STREQUAL "clang") -- if ("${COMPILER_VERSION}" VERSION_GREATER "4.0") -- set(ORC_CMAKE_CXX_FLAGS " -Wno-zero-as-null-pointer-constant \ -- -Wno-inconsistent-missing-destructor-override ") -- endif() -- endif() -- -- set(ORC_CMAKE_CXX_FLAGS "${EP_CXX_FLAGS} ${ORC_CMAKE_CXX_FLAGS}") -- -- # Since LZ4 isn't installed, the header file is in ${LZ4_HOME}/lib instead of -- # ${LZ4_HOME}/include, which forces us to specify the include directory -- # manually as well. -- set (ORC_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_INSTALL_PREFIX=${ORC_PREFIX} -- -DCMAKE_CXX_FLAGS=${ORC_CMAKE_CXX_FLAGS} -- -DBUILD_LIBHDFSPP=OFF -- -DBUILD_JAVA=OFF -- -DBUILD_TOOLS=OFF -- -DBUILD_CPP_TESTS=OFF -- -DINSTALL_VENDORED_LIBS=OFF -- -DPROTOBUF_HOME=${PROTOBUF_HOME} -- -DLZ4_HOME=${LZ4_HOME} -- -DLZ4_INCLUDE_DIR=${LZ4_INCLUDE_DIR} -- -DSNAPPY_HOME=${SNAPPY_HOME} -- -DZLIB_HOME=${ZLIB_HOME}) -- -- ExternalProject_Add(orc_ep -- URL ${ORC_SOURCE_URL} -- BUILD_BYPRODUCTS ${ORC_STATIC_LIB} -- CMAKE_ARGS ${ORC_CMAKE_ARGS} -- ${EP_LOG_OPTIONS}) -- -- set(ORC_VENDORED 1) -- add_dependencies(orc_ep zlib) -- if (LZ4_VENDORED) -- add_dependencies(orc_ep lz4_static) -- endif() -- if (SNAPPY_VENDORED) -- add_dependencies(orc_ep snappy) -- endif() -- if (PROTOBUF_VENDORED) -- add_dependencies(orc_ep protobuf_ep) -- endif() -- else() -- set(ORC_INCLUDE_DIR "${ORC_HOME}/include") -- set(ORC_STATIC_LIB "${ORC_HOME}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}orc${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(ORC_VENDORED 0) -- endif() -+ set(ORC_INCLUDE_DIR "${ORC_HOME}/include") -+ set(ORC_STATIC_LIB "${ORC_HOME}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}orc${CMAKE_STATIC_LIBRARY_SUFFIX}") -+ set(ORC_VENDORED 0) - - include_directories(SYSTEM ${ORC_INCLUDE_DIR}) - ADD_THIRDPARTY_LIB(orc -@@ -1231,97 +745,7 @@ if (ARROW_WITH_THRIFT) - # find thrift headers and libs - find_package(Thrift) - --if (NOT THRIFT_FOUND) -- set(THRIFT_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/thrift_ep/src/thrift_ep-install") -- set(THRIFT_HOME "${THRIFT_PREFIX}") -- set(THRIFT_INCLUDE_DIR "${THRIFT_PREFIX}/include") -- set(THRIFT_COMPILER "${THRIFT_PREFIX}/bin/thrift") -- set(THRIFT_CMAKE_ARGS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" -- "-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}" -- "-DCMAKE_C_FLAGS=${EP_C_FLAGS}" -- "-DCMAKE_INSTALL_PREFIX=${THRIFT_PREFIX}" -- "-DCMAKE_INSTALL_RPATH=${THRIFT_PREFIX}/lib" -- "-DBUILD_SHARED_LIBS=OFF" -- "-DBUILD_TESTING=OFF" -- "-DBUILD_EXAMPLES=OFF" -- "-DBUILD_TUTORIALS=OFF" -- "-DWITH_QT4=OFF" -- "-DWITH_C_GLIB=OFF" -- "-DWITH_JAVA=OFF" -- "-DWITH_PYTHON=OFF" -- "-DWITH_HASKELL=OFF" -- "-DWITH_CPP=ON" -- "-DWITH_STATIC_LIB=ON" -- "-DWITH_LIBEVENT=OFF" -- ) -- -- # Thrift also uses boost. Forward important boost settings if there were ones passed. -- if (DEFINED BOOST_ROOT) -- set(THRIFT_CMAKE_ARGS ${THRIFT_CMAKE_ARGS} "-DBOOST_ROOT=${BOOST_ROOT}") -- endif() -- if (DEFINED Boost_NAMESPACE) -- set(THRIFT_CMAKE_ARGS ${THRIFT_CMAKE_ARGS} "-DBoost_NAMESPACE=${Boost_NAMESPACE}") -- endif() -- -- set(THRIFT_STATIC_LIB_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}thrift") -- if (MSVC) -- if (ARROW_USE_STATIC_CRT) -- set(THRIFT_STATIC_LIB_NAME "${THRIFT_STATIC_LIB_NAME}mt") -- set(THRIFT_CMAKE_ARGS ${THRIFT_CMAKE_ARGS} "-DWITH_MT=ON") -- else() -- set(THRIFT_STATIC_LIB_NAME "${THRIFT_STATIC_LIB_NAME}md") -- set(THRIFT_CMAKE_ARGS ${THRIFT_CMAKE_ARGS} "-DWITH_MT=OFF") -- endif() -- endif() -- if (${UPPERCASE_BUILD_TYPE} STREQUAL "DEBUG") -- set(THRIFT_STATIC_LIB_NAME "${THRIFT_STATIC_LIB_NAME}d") -- endif() -- set(THRIFT_STATIC_LIB "${THRIFT_PREFIX}/lib/${THRIFT_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}") -- -- if (ZLIB_SHARED_LIB) -- set(THRIFT_CMAKE_ARGS "-DZLIB_LIBRARY=${ZLIB_SHARED_LIB}" -- ${THRIFT_CMAKE_ARGS}) -- else() -- set(THRIFT_CMAKE_ARGS "-DZLIB_LIBRARY=${ZLIB_STATIC_LIB}" -- ${THRIFT_CMAKE_ARGS}) -- endif() -- set(THRIFT_DEPENDENCIES ${THRIFT_DEPENDENCIES} zlib) -- -- if (MSVC) -- set(WINFLEXBISON_VERSION 2.4.9) -- set(WINFLEXBISON_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/winflexbison_ep/src/winflexbison_ep-install") -- ExternalProject_Add(winflexbison_ep -- URL https://github.com/lexxmark/winflexbison/releases/download/v.${WINFLEXBISON_VERSION}/win_flex_bison-${WINFLEXBISON_VERSION}.zip -- URL_HASH MD5=a2e979ea9928fbf8567e995e9c0df765 -- SOURCE_DIR ${WINFLEXBISON_PREFIX} -- CONFIGURE_COMMAND "" -- BUILD_COMMAND "" -- INSTALL_COMMAND "" -- ${EP_LOG_OPTIONS}) -- set(THRIFT_DEPENDENCIES ${THRIFT_DEPENDENCIES} winflexbison_ep) -- -- set(THRIFT_CMAKE_ARGS "-DFLEX_EXECUTABLE=${WINFLEXBISON_PREFIX}/win_flex.exe" -- "-DBISON_EXECUTABLE=${WINFLEXBISON_PREFIX}/win_bison.exe" -- "-DZLIB_INCLUDE_DIR=${ZLIB_INCLUDE_DIR}" -- "-DWITH_SHARED_LIB=OFF" -- "-DWITH_PLUGIN=OFF" -- ${THRIFT_CMAKE_ARGS}) -- elseif (APPLE) -- if (DEFINED BISON_EXECUTABLE) -- set(THRIFT_CMAKE_ARGS "-DBISON_EXECUTABLE=${BISON_EXECUTABLE}" -- ${THRIFT_CMAKE_ARGS}) -- endif() -- endif() -- -- ExternalProject_Add(thrift_ep -- URL ${THRIFT_SOURCE_URL} -- BUILD_BYPRODUCTS "${THRIFT_STATIC_LIB}" "${THRIFT_COMPILER}" -- CMAKE_ARGS ${THRIFT_CMAKE_ARGS} -- DEPENDS ${THRIFT_DEPENDENCIES} -- ${EP_LOG_OPTIONS}) -- -- set(THRIFT_VENDORED 1) +diff --git a/cmake_modules/FindgflagsAlt.cmake b/cmake_modules/FindgflagsAlt.cmake +index a9b8684..fdb815a 100644 +--- a/cmake_modules/FindgflagsAlt.cmake ++++ b/cmake_modules/FindgflagsAlt.cmake +@@ -15,18 +15,13 @@ + # specific language governing permissions and limitations + # under the License. + +-if(gflags_ROOT) +- find_library(gflags_LIB NAMES gflags PATHS ${gflags_ROOT} NO_DEFAULT_PATH) +- find_path(GFLAGS_INCLUDE_DIR +- NAMES gflags/gflags.h +- PATHS ${gflags_ROOT} +- NO_DEFAULT_PATH +- PATH_SUFFIXES "include") -else() -+if (THRIFT_FOUND) - set(THRIFT_VENDORED 0) +- find_library(gflags_LIB NAMES gflags) +- find_path(GFLAGS_INCLUDE_DIR NAMES gflags/gflags.h PATH_SUFFIXES "include") ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(GFLAGS_LIB_NAME_DEBUG_SUFFIX _debug) endif() -@@ -1347,45 +771,8 @@ endif() # ARROW_HIVESERVER2 - # GLOG ++find_library(gflags_LIB NAMES gflags${GFLAGS_LIB_NAME_DEBUG_SUFFIX} gflags_static${GFLAGS_LIB_NAME_DEBUG_SUFFIX}) ++find_path(GFLAGS_INCLUDE_DIR NAMES gflags/gflags.h PATH_SUFFIXES "include") ++ + find_package_handle_standard_args(gflagsAlt REQUIRED_VARS gflags_LIB GFLAGS_INCLUDE_DIR) - if (ARROW_USE_GLOG) -- if("${GLOG_HOME}" STREQUAL "") -- set(GLOG_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/glog_ep-prefix/src/glog_ep") -- set(GLOG_INCLUDE_DIR "${GLOG_BUILD_DIR}/include") -- set(GLOG_STATIC_LIB "${GLOG_BUILD_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}glog${CMAKE_STATIC_LIBRARY_SUFFIX}") -- set(GLOG_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -- set(GLOG_CMAKE_C_FLAGS "${EP_C_FLAGS} -fPIC") -- if (PTHREAD_LIBRARY) -- set(GLOG_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pthread") -- set(GLOG_CMAKE_C_FLAGS "${EP_C_FLAGS} -fPIC -pthread") -- endif() -- message(STATUS "GLOG_CMAKE_CXX_FLAGS: ${GLOG_CMAKE_CXX_FLAGS}") -- message(STATUS "CMAKE_CXX_FLAGS in glog: ${GLOG_CMAKE_CXX_FLAGS}") -- -- if(APPLE) -- # If we don't set this flag, the binary built with 10.13 cannot be used in 10.12. -- set(GLOG_CMAKE_CXX_FLAGS "${GLOG_CMAKE_CXX_FLAGS} -mmacosx-version-min=10.9") + if(gflagsAlt_FOUND) +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +index bdb122b..58c123e 100644 +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -923,10 +923,7 @@ if(ARROW_NEED_GFLAGS) + elseif(gflags_SOURCE STREQUAL "SYSTEM") + # gflagsConfig.cmake is not installed on Ubuntu/Debian + # TODO: Make a bug report upstream +- find_package(gflags) +- if(NOT gflags_FOUND) +- find_package(gflagsAlt REQUIRED) - endif() -- -- set(GLOG_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_INSTALL_PREFIX=${GLOG_BUILD_DIR} -- -DBUILD_SHARED_LIBS=OFF -- -DBUILD_TESTING=OFF -- -DWITH_GFLAGS=OFF -- -DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${GLOG_CMAKE_CXX_FLAGS} -- -DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${GLOG_CMAKE_C_FLAGS} -- -DCMAKE_CXX_FLAGS=${GLOG_CMAKE_CXX_FLAGS}) -- message(STATUS "Glog version: ${GLOG_VERSION}") -- ExternalProject_Add(glog_ep -- URL ${GLOG_SOURCE_URL} -- BUILD_IN_SOURCE 1 -- BUILD_BYPRODUCTS "${GLOG_STATIC_LIB}" -- CMAKE_ARGS ${GLOG_CMAKE_ARGS} -- ${EP_LOG_OPTIONS}) -- -- set(GLOG_VENDORED 1) -- else() -- find_package(GLOG REQUIRED) -- set(GLOG_VENDORED 0) -- endif() -+ find_package(GLOG REQUIRED) -+ set(GLOG_VENDORED 0) - - message(STATUS "Glog include dir: ${GLOG_INCLUDE_DIR}") - message(STATUS "Glog static library: ${GLOG_STATIC_LIB}") ++ find_package(gflagsAlt REQUIRED) + endif() + # TODO: Don't use global includes but rather target_include_directories + include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) +@@ -1558,7 +1555,7 @@ if(ARROW_WITH_FLATBUFFERS) + elseif(Flatbuffers_SOURCE STREQUAL "BUNDLED") + build_flatbuffers() + elseif(Flatbuffers_SOURCE STREQUAL "SYSTEM") +- find_package(Flatbuffers QUIET) ++ #find_package(Flatbuffers QUIET) - disabled because on vcpkg this looks in the wrong place for the fb compiler and causes an error + if(NOT Flatbuffers_FOUND) + find_package(FlatbuffersAlt REQUIRED) + endif() diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index 73cf90eb2..28b58e8bf 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/arrow - REF apache-arrow-0.11.1 - SHA512 8a2de7e4b40666e4ea7818fac488549f1348e961e7cb6a4166ae4019976a574fd115dc1cabaf44bc1cbaabf15fb8e5133c8232b34fca250d8ff7c5b65c5407c8 + REF apache-arrow-0.13.0 + SHA512 bbb14d11abf267a6902c7c9e0215ba7c5284f07482be2de42707145265d2809c89c2d4d8f8b918fdb8c33a5ecbd650875b987a1a694cdf653e766822be67a47d HEAD_REF master ) @@ -27,33 +27,31 @@ string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" IS_STATIC) if (IS_STATIC) set(PARQUET_ARROW_LINKAGE static) + set(BOOST_USE_SHARED off) + set(USE_STATIC_CRT on) else() set(PARQUET_ARROW_LINKAGE shared) + set(BOOST_USE_SHARED on) + set(USE_STATIC_CRT off) endif() vcpkg_configure_cmake( SOURCE_PATH ${CPP_SOURCE_PATH} PREFER_NINJA OPTIONS + -DARROW_DEPENDENCY_SOURCE=SYSTEM -DARROW_BUILD_TESTS=off - -DRAPIDJSON_HOME=${CURRENT_INSTALLED_DIR} - -DFLATBUFFERS_HOME=${CURRENT_INSTALLED_DIR} - -DARROW_ZLIB_VENDORED=ON - -DBROTLI_HOME=${CURRENT_INSTALLED_DIR} - -DLZ4_HOME=${CURRENT_INSTALLED_DIR} - -DZSTD_HOME=${CURRENT_INSTALLED_DIR} - -DSNAPPY_HOME=${CURRENT_INSTALLED_DIR} -DBOOST_ROOT=${CURRENT_INSTALLED_DIR} - -DGFLAGS_HOME=${CURRENT_INSTALLED_DIR} - -DZLIB_HOME=${CURRENT_INSTALLED_DIR} -DARROW_PARQUET=ON -DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC} -DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED} -DBUILD_STATIC=${ARROW_BUILD_STATIC} -DBUILD_SHARED=${ARROW_BUILD_SHARED} -DPARQUET_ARROW_LINKAGE=${PARQUET_ARROW_LINKAGE} - -DDOUBLE_CONVERSION_HOME=${CURRENT_INSTALLED_DIR} - -DGLOG_HOME=${CURRENT_INSTALLED_DIR} + -DARROW_BOOST_USE_SHARED=${BOOST_USE_SHARED} + -DARROW_USE_STATIC_CRT=${USE_STATIC_CRT} + -DARROW_GFLAGS_USE_SHARED=off + -DARROW_JEMALLOC=off ) vcpkg_install_cmake() @@ -70,6 +68,15 @@ if(WIN32) endif() endif() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/arrow/cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/arrow/arrowConfig.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowConfig.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/arrow/arrowConfigVersion.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowConfigVersion.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/arrow/arrowTargets-release.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowTargets-release.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/arrow/arrowTargets.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowTargets.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/arrow/arrowTargets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowTargets-debug.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) + file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/arrow RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 1dc3b7405..4fe655f70 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -55,8 +55,15 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG) string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)" "set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG}) -string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" - "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) + +if(WIN32) + string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" + "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) +else() + string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" + "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/lib\${ASSIMP_LIBRARIES}.a \${ASSIMP_LIBRARY_DIRS}/libIrrXML.a \${ASSIMP_LIBRARY_DIRS}/libz.a debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/lib\${ASSIMP_LIBRARIES}d.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libIrrXMLd.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libz.a)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) +endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake "${ASSIMP_CONFIG}") # Handle copyright diff --git a/ports/avro-c/portfile.cmake b/ports/avro-c/portfile.cmake index 087d3b3af..d868738df 100644 --- a/ports/avro-c/portfile.cmake +++ b/ports/avro-c/portfile.cmake @@ -1,5 +1,12 @@ include(vcpkg_common_functions) +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) + message(WARNING "Avro-c's buildsystem uses very long paths and may fail on your system.\n" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/avro diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 153c3170c..2bdc103bb 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,5 +1,12 @@ include(vcpkg_common_functions)
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
+if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32)
+ message(WARNING "Aws-sdk-cpp's buildsystem uses very long paths and may fail on your system.\n"
+ "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
+ )
+endif()
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO aws/aws-sdk-cpp
diff --git a/ports/azure-c-shared-utility/CONTROL b/ports/azure-c-shared-utility/CONTROL index 0b3a6c231..87ecfd32b 100644 --- a/ports/azure-c-shared-utility/CONTROL +++ b/ports/azure-c-shared-utility/CONTROL @@ -1,5 +1,5 @@ Source: azure-c-shared-utility -Version: 1.1.11-5 +Version: 2019-03-18 Description: Azure C SDKs common code Build-Depends: curl (linux), openssl (linux) diff --git a/ports/azure-c-shared-utility/portfile.cmake b/ports/azure-c-shared-utility/portfile.cmake index ebfb097f5..de7f3e61a 100644 --- a/ports/azure-c-shared-utility/portfile.cmake +++ b/ports/azure-c-shared-utility/portfile.cmake @@ -6,8 +6,8 @@ if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-c-shared-utility - REF 773980d7882e4d5f1e7c9be2a0797d61fbc19da1 - SHA512 fa374db336f5d186bcfd6ba70660167fdc87a1847376579cee894af3d2810aba097b3468e75c0b4213b68423cc07215032eeae6ee07590378237606112286ac4 + REF bc83cba1230e98988ae5cd2328f4dcf8c49d5866 + SHA512 48947709f9c07c8a910d40066a52b746f9ab15543837f44207b787674efd2b11e7a7eb849c88e20984f0e2141e5611f6d6edea39c8b82687f371c08ab274bd7b HEAD_REF master PATCHES no-double-expand-cmake.patch ) @@ -15,8 +15,8 @@ else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-c-shared-utility - REF 6229ecb0d49b7e75fdb88d2c477e94e5b5394c43 - SHA512 b0426702dd7a79e149dd4f6c2b8d0b43cd06a82ce014112dcaba1de4e669157fe08a5f3748d431a9e2f559e066f658c1a62f5ac08d2da0bd1f5cf04dca2e52c2 + REF bc83cba1230e98988ae5cd2328f4dcf8c49d5866 + SHA512 48947709f9c07c8a910d40066a52b746f9ab15543837f44207b787674efd2b11e7a7eb849c88e20984f0e2141e5611f6d6edea39c8b82687f371c08ab274bd7b HEAD_REF master PATCHES no-double-expand-cmake.patch ) @@ -43,3 +43,4 @@ file(COPY ${SOURCE_PATH}/configs/azure_iot_build_rules.cmake DESTINATION ${CURRE configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility/copyright COPYONLY) vcpkg_copy_pdbs() + diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL index 151da2b3e..a5725ed22 100644 --- a/ports/azure-iot-sdk-c/CONTROL +++ b/ports/azure-iot-sdk-c/CONTROL @@ -1,5 +1,5 @@ Source: azure-iot-sdk-c -Version: 1.2.14-1 +Version: 2019-03-18 Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson, azure-uhttp-c Description: A C99 SDK for connecting devices to Microsoft Azure IoT services diff --git a/ports/azure-iot-sdk-c/portfile.cmake b/ports/azure-iot-sdk-c/portfile.cmake index c672754a9..42630117b 100644 --- a/ports/azure-iot-sdk-c/portfile.cmake +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -6,8 +6,8 @@ if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF 6633c5b18710febf1af7713cf1a336fd38f623ed - SHA512 17787aa4ef52d4cf39f939fee05555fcef85cde63620036f6715b699902fd3fd766250c26ea6065f5f36572ac2b9d5293e79ba17ea9d8f4cbce267322269e7e4 + REF 68d9964daa3e6754f6f8d98bbbd637b0967d4d29 + SHA512 5492ab06ae3686c7a167d63620d6ca00024dd52d46627d7958569f1ec0cfca1b56151d54b8c7975f127f655018c10e830747ef84a0cdc66a44e903e25b2dc985 HEAD_REF public-preview PATCHES improve-external-deps.patch ) @@ -15,8 +15,8 @@ else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF a46d038a9151ff1fc7d9b70f2d7fcca03c19b972 - SHA512 bcd9c656ab721ab15da3cb690772c84e58e09d8785b975b046d4986b5fa16fb9e74a06af00acbe91fd8d4b897cd12dba9b2318ea5465865bff98f5429d2ee618 + REF 8c331e8552f754bb6e0502486ceee698625eb468 + SHA512 cc6f34e04f237bb5e8e5445e033eefab00373d53a4847ab6089c9b8eb400ab87ced6905f1c78ea7d0da3e9a56145e86a58d2f226fcf38f08659330a33d68f82e HEAD_REF master PATCHES improve-external-deps.patch ) @@ -44,3 +44,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-iot-sdk-c/copyright COPYONLY) vcpkg_copy_pdbs() + diff --git a/ports/azure-uamqp-c/CONTROL b/ports/azure-uamqp-c/CONTROL index 7dde811fc..06db79ec4 100644 --- a/ports/azure-uamqp-c/CONTROL +++ b/ports/azure-uamqp-c/CONTROL @@ -1,5 +1,5 @@ Source: azure-uamqp-c -Version: 1.2.11-4 +Version: 2019-03-18 Build-Depends: azure-c-shared-utility Description: AMQP library for C diff --git a/ports/azure-uamqp-c/portfile.cmake b/ports/azure-uamqp-c/portfile.cmake index 8490ec0d4..e5b4b3d96 100644 --- a/ports/azure-uamqp-c/portfile.cmake +++ b/ports/azure-uamqp-c/portfile.cmake @@ -6,16 +6,16 @@ if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uamqp-c - REF 195f2480f31e0a9492e3ff3a7a1eed4a69205ddd - SHA512 fa2cab67d119018b7e28dd002641bc3e87ac2d45ecddeddb867135bac6e5eda02588f84c26283947bdc47789c90a3f9e04dab16e5eb9be8a384ef5c9bcf39572 + REF 13f009ddd50a2837f651b0237de17db5f24c3af9 + SHA512 649e1826c02a25c57031e1cf1ae92ff15f7caadd064d1dff4aa4ee579598af58ae03f778138cdf26918c1500ca1b8678a6f88c0ae24fd6fca37dab7b81b34984 HEAD_REF master ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uamqp-c - REF 32f53b92ab864ea9e54e7ae262dc72bdabfcfa01 - SHA512 3a96feb3d04a2e90b59e897b6da93410de330963c75a0cb875d53b91838c977f6a801f4812b67c4e519059fd04aed9baf43f72258652832cf49b12692a47d188 + REF 13f009ddd50a2837f651b0237de17db5f24c3af9 + SHA512 649e1826c02a25c57031e1cf1ae92ff15f7caadd064d1dff4aa4ee579598af58ae03f778138cdf26918c1500ca1b8678a6f88c0ae24fd6fca37dab7b81b34984 HEAD_REF master ) endif() @@ -40,3 +40,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uamqp-c/copyright COPYONLY) vcpkg_copy_pdbs() + diff --git a/ports/azure-uhttp-c/CONTROL b/ports/azure-uhttp-c/CONTROL index ab1b8de01..4f41f6931 100644 --- a/ports/azure-uhttp-c/CONTROL +++ b/ports/azure-uhttp-c/CONTROL @@ -1,5 +1,5 @@ Source: azure-uhttp-c -Version: 1.1.11-4 +Version: 2019-03-18 Build-Depends: azure-c-shared-utility Description: Azure HTTP Library written in C diff --git a/ports/azure-uhttp-c/portfile.cmake b/ports/azure-uhttp-c/portfile.cmake index a4d525fae..e99276af7 100644 --- a/ports/azure-uhttp-c/portfile.cmake +++ b/ports/azure-uhttp-c/portfile.cmake @@ -6,16 +6,16 @@ if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uhttp-c - REF 3a81e598caf2bd37077b7cd20bb45aaa9e694df7 - SHA512 6f12efdd2f02adb2414e10daa0604f5351f7731b997d69a9ca2923b6246c7a628bd859c6dca2503e51eeece851421b7739ffbf31a3f3d34dca4dcbadb54411d2 + REF 43dce924b32818f8ab851f972cffebc204edc5c4 + SHA512 0e5e9e7dac0c8a1a01cea2fd9ef068f988ad3453f978957cbcb009126637fe5810001e273e7b300b4540914705a89250d96df652c4bb2c7f5348cd8ce7240d70 HEAD_REF master ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uhttp-c - REF 2e838f1587d7493f3bb0470b7e21b39c3f7c84ab - SHA512 30114e995bfdfa73dc43d016588290ef886e3c24d586f443d7f82d9c577f7274b5fc4b2ca40c9dd39883262cab30bf5b3e3eb560c27191ec4e9bb893e468bb54 + REF 43dce924b32818f8ab851f972cffebc204edc5c4 + SHA512 0e5e9e7dac0c8a1a01cea2fd9ef068f988ad3453f978957cbcb009126637fe5810001e273e7b300b4540914705a89250d96df652c4bb2c7f5348cd8ce7240d70 HEAD_REF master ) endif() @@ -41,3 +41,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c/copyright COPYONLY) vcpkg_copy_pdbs() + diff --git a/ports/azure-umqtt-c/CONTROL b/ports/azure-umqtt-c/CONTROL index 9729cd209..eec4acb1b 100644 --- a/ports/azure-umqtt-c/CONTROL +++ b/ports/azure-umqtt-c/CONTROL @@ -1,5 +1,5 @@ Source: azure-umqtt-c -Version: 1.1.11-4 +Version: 2019-03-18 Build-Depends: azure-c-shared-utility Description: General purpose library for communication over the mqtt protocol diff --git a/ports/azure-umqtt-c/portfile.cmake b/ports/azure-umqtt-c/portfile.cmake index 6833b5eb4..9f7002f32 100644 --- a/ports/azure-umqtt-c/portfile.cmake +++ b/ports/azure-umqtt-c/portfile.cmake @@ -6,16 +6,16 @@ if("public-preview" IN_LIST FEATURES) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-umqtt-c - REF f68e8d535d18028e3e6ed4d806ce8994037a49fa - SHA512 9bea4c3dbd26f5221c4da782954a4e8b4d372aca75b71a9eb63b818f31f153e4be534a20960c007c3aa184766f2a826c5ba11e780e23098707419ab39f055cc1 + REF ea9f6112d002bdff55c94df327bc7effc8393c78 + SHA512 68fdc22eb07d32cb9cf489d878db3be8326225e3a067153af7b9e29eabc8ee25162507b7e8921b71b83d42703d5a3d8e040f4a9e61a19540789432e2cecb782f HEAD_REF master ) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-umqtt-c - REF 6bb14b0a731e5c896758fc2f6ffe3d4bd31d2187 - SHA512 001b04f203327e5096ad3453268939da7738952704a4e0b88ea033b0a2566bec7502b3a674eadf476f9df0da605d25b8a7f6a306e23a42690884188326bd0743 + REF ea9f6112d002bdff55c94df327bc7effc8393c78 + SHA512 68fdc22eb07d32cb9cf489d878db3be8326225e3a067153af7b9e29eabc8ee25162507b7e8921b71b83d42703d5a3d8e040f4a9e61a19540789432e2cecb782f HEAD_REF master ) endif() @@ -40,3 +40,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-umqtt-c/copyright COPYONLY) vcpkg_copy_pdbs() + diff --git a/ports/boost-python/portfile.cmake b/ports/boost-python/portfile.cmake index bee55c943..06b739663 100644 --- a/ports/boost-python/portfile.cmake +++ b/ports/boost-python/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( REF boost-1.69.0
SHA512 7ca3210a35ac43eae31c58d7ccd58e6410ec0d62a25ae7a03fb2db9baa4cf863fbaad1686c6ceaf804663c5707f6e60b4806f792f0aceb5c12a85b705d4242d0
HEAD_REF master
+ PATCHES unwind-type.patch
)
# Find Python. Can't use find_package here, but we already know where everything is
diff --git a/ports/boost-vcpkg-helpers/CONTROL b/ports/boost-vcpkg-helpers/CONTROL index 42e02b3aa..37f7081cf 100644 --- a/ports/boost-vcpkg-helpers/CONTROL +++ b/ports/boost-vcpkg-helpers/CONTROL @@ -1,3 +1,3 @@ Source: boost-vcpkg-helpers
-Version: 4
+Version: 5
Description: a set of vcpkg-internal scripts used to modularize boost
diff --git a/ports/brunocodutra-metal/CONTROL b/ports/brunocodutra-metal/CONTROL new file mode 100644 index 000000000..9a0519df9 --- /dev/null +++ b/ports/brunocodutra-metal/CONTROL @@ -0,0 +1,3 @@ +Source: brunocodutra-metal
+Version: v2.0.1-1
+Description: A single header C++11 library designed to make you love template metaprogramming
diff --git a/ports/brunocodutra-metal/portfile.cmake b/ports/brunocodutra-metal/portfile.cmake new file mode 100644 index 000000000..857fc7dea --- /dev/null +++ b/ports/brunocodutra-metal/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO brunocodutra/metal
+ REF v2.0.1
+ SHA512 6aca54e2f2a6d99466d247dbd57706caef33d2399989c2eb14e99d1419922eff753acb53248f8684c1ed11bb87d79b2e850637190e8949f69e0f5ee7304281dc
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(
+ CONFIG_PATH lib/cmake/Metal
+ TARGET_PATH share/metal
+)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+
+# 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/caffe2/CONTROL b/ports/caffe2/CONTROL index 2f40d9825..bbef1f62b 100644 --- a/ports/caffe2/CONTROL +++ b/ports/caffe2/CONTROL @@ -1,4 +1,4 @@ Source: caffe2 -Version: 0.8.1-1 +Version: 0.8.1-2 Build-Depends: lmdb, gflags, glog, eigen3, protobuf Description: Caffe2 is a lightweight, modular, and scalable deep learning framework. diff --git a/ports/caffe2/fix-space.patch b/ports/caffe2/fix-space.patch new file mode 100644 index 000000000..910f52f9c --- /dev/null +++ b/ports/caffe2/fix-space.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake
+index e082298..25186e4 100644
+--- a/cmake/Utils.cmake
++++ b/cmake/Utils.cmake
+@@ -386,7 +386,7 @@ function(caffe_add_whole_archive_flag lib output_var)
+ set(${output_var} -Wl,-force_load,$<TARGET_FILE:${lib}> PARENT_SCOPE)
+ elseif(MSVC)
+ # In MSVC, we will add whole archive in default.
+- set(${output_var} -WHOLEARCHIVE:$<TARGET_FILE:${lib}> PARENT_SCOPE)
++ set(${output_var} -WHOLEARCHIVE:"$<TARGET_FILE:${lib}>" PARENT_SCOPE)
+ else()
+ # Assume everything else is like gcc
+ set(${output_var} -Wl,--whole-archive ${lib} -Wl,--no-whole-archive PARENT_SCOPE)
diff --git a/ports/caffe2/portfile.cmake b/ports/caffe2/portfile.cmake index 41abd403e..b3e0b2978 100644 --- a/ports/caffe2/portfile.cmake +++ b/ports/caffe2/portfile.cmake @@ -16,7 +16,8 @@ vcpkg_from_github( SHA512 505a8540b0c28329c4e2ce443ac8e198c1ee613eb6b932927ee9d04c8afdc95081f3c4581408b7097d567840427b31f6d7626ea80f27e56532f2f2e6acd87023 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/msvc-fixes.patch + msvc-fixes.patch + fix-space.patch ) if(VCPKG_CRT_LINKAGE STREQUAL static) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index d33147b18..fd3ce1187 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.8-5 +Version: 1.16.0 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 53d944b54..ed120f07f 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(CAIRO_VERSION 1.15.8) +set(CAIRO_VERSION 1.16.0) vcpkg_download_distfile(ARCHIVE - URLS "http://cairographics.org/snapshots/cairo-${CAIRO_VERSION}.tar.xz" + URLS "https://www.cairographics.org/releases/cairo-${CAIRO_VERSION}.tar.xz" FILENAME "cairo-${CAIRO_VERSION}.tar.xz" - SHA512 5af1eebf432201dae0efaa5b6766b151d8273ea00dae48e104d56477005b4d423d64b5d11c512736a4cb076632fb2a572ec35becd922825a68d933bb5ff96ca1 + SHA512 9eb27c4cf01c0b8b56f2e15e651f6d4e52c99d0005875546405b64f1132aed12fbf84727273f493d84056a13105e065009d89e94a8bfaf2be2649e232b82377f ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/capnproto/0001-fix-capnpc-extension-handling-on-Windows.patch b/ports/capnproto/0001-fix-capnpc-extension-handling-on-Windows.patch new file mode 100644 index 000000000..d0544c625 --- /dev/null +++ b/ports/capnproto/0001-fix-capnpc-extension-handling-on-Windows.patch @@ -0,0 +1,39 @@ +From 6e142f270524d78689a119737660050561cf853e Mon Sep 17 00:00:00 2001 +From: Thomas Arcila <thomas.arcila@gmail.com> +Date: Sat, 9 Mar 2019 19:00:24 -0500 +Subject: [PATCH] fix capnpc extension handling on Windows + +--- + c++/src/capnp/CMakeLists.txt | 2 +- + c++/src/capnp/compiler/capnp.c++ | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/c++/src/capnp/CMakeLists.txt b/c++/src/capnp/CMakeLists.txt +index 11cbf5af..20b99ed3 100644 +--- a/c++/src/capnp/CMakeLists.txt ++++ b/c++/src/capnp/CMakeLists.txt +@@ -182,7 +182,7 @@ if(NOT CAPNP_LITE) + install(TARGETS capnp_tool capnpc_cpp capnpc_capnp ${INSTALL_TARGETS_DEFAULT_ARGS}) + + # Symlink capnpc -> capnp +- install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink capnp \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/capnpc\")") ++ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink capnp${CMAKE_EXECUTABLE_SUFFIX} \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/capnpc${CMAKE_EXECUTABLE_SUFFIX}\")") + endif() # NOT CAPNP_LITE + + # Tests ======================================================================== +diff --git a/c++/src/capnp/compiler/capnp.c++ b/c++/src/capnp/compiler/capnp.c++ +index 8e8c459b..d252fb12 100644 +--- a/c++/src/capnp/compiler/capnp.c++ ++++ b/c++/src/capnp/compiler/capnp.c++ +@@ -78,7 +78,7 @@ public: + : context(context), disk(kj::newDiskFilesystem()), loader(*this) {} + + kj::MainFunc getMain() { +- if (context.getProgramName().endsWith("capnpc")) { ++ if (context.getProgramName().endsWith("capnpc") || context.getProgramName().endsWith("capnpc.exe")) { + kj::MainBuilder builder(context, VERSION_STRING, + "Compiles Cap'n Proto schema files and generates corresponding source code in one or " + "more languages."); +-- +2.19.1 + diff --git a/ports/capnproto/CONTROL b/ports/capnproto/CONTROL new file mode 100644 index 000000000..e02002656 --- /dev/null +++ b/ports/capnproto/CONTROL @@ -0,0 +1,4 @@ +Source: capnproto +Version: 0.7.0 +Description: Data interchange format and capability-based RPC system https://capnproto.org/ +Build-Depends: zlib diff --git a/ports/capnproto/portfile.cmake b/ports/capnproto/portfile.cmake new file mode 100644 index 000000000..35ac53fcd --- /dev/null +++ b/ports/capnproto/portfile.cmake @@ -0,0 +1,45 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP build is not supported.") +endif() + +if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) + # Undefined VCPKG_CMAKE_SYSTEM_NAME means Windows + message(FATAL_ERROR "Error: CapnProto only build on Windows for now. See #5630 and #5635") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("Building DLLs not supported. Building static instead.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO capnproto/capnproto + REF v0.7.0 + SHA512 a3ea278ded6a866759c0517d16b99bd38ffea1c163ce63a3604b752d8bdaafbc38a600de94afe12db35e7f7f06e29cc94c911dc2e0ecec6fe1185452df2a2bd3 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-capnpc-extension-handling-on-Windows.patch" +) + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/CapnProto") + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/capnproto") +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/capnproto) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/capnproto) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/capnproto/LICENSE ${CURRENT_PACKAGES_DIR}/share/capnproto/copyright) + +# Disabled for now, see #5630 and #5635 +# vcpkg_test_cmake(PACKAGE_NAME CapnProto)
\ No newline at end of file diff --git a/ports/capstone/CONTROL b/ports/capstone/CONTROL index b442eccd9..e7baa3d97 100644 --- a/ports/capstone/CONTROL +++ b/ports/capstone/CONTROL @@ -1,3 +1,48 @@ Source: capstone -Version: 3.0.5-rc3 -Description: +Version: 4.0.1-120373dc +Description: Multi-architecture disassembly framework + +Feature: arm +Description: Capstone disassembly support for ARM + +Feature: arm64 +Description: Capstone disassembly support for ARM64 + +Feature: evm +Description: Capstone disassembly support for EVM + +Feature: m680x +Description: Capstone disassembly support for M680X + +Feature: m68k +Description: Capstone disassembly support for M68k + +Feature: mips +Description: Capstone disassembly support for MIPS + +Feature: ppc +Description: Capstone disassembly support for PowerPC + +Feature: sparc +Description: Capstone disassembly support for SPARC + +Feature: sysz +Description: Capstone disassembly support for SysZ + +Feature: tms320c64x +Description: Capstone disassembly support for TMS320C64X + +Feature: x86 +Description: Capstone disassembly support for x86 + +Feature: x86_reduce +Description: Capstone disassembly support for x86 without support for less used instructions + +Feature: xcore +Description: Capstone disassembly support for XCore + +Feature: diet +Description: Build Capstone in diet mode (reduced features for smaller size) + +Feature: osxkernel +Description: Support for emedding Capstone into OSX Kernel extensions diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index 77dea256e..bd4351109 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -1,36 +1,72 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REF 3.0.5-rc3 + REF 120373dc9789875ccbc968397219a86598a4351e REPO "aquynh/capstone" - SHA512 1327fc570fc2310f71c4d7329528c05e30b9ad68ea50254b9a8c4b3b113f5165c2e0474ec99bbe1e6e46f2820379f388e4c2082c156027e117d88a8f1908acfe - HEAD_REF master + SHA512 90961176ab68110b0fea08f11a5ed6997dcd92ceeec568978003bfd01e2170479256f137e4f91be5e22a9bdebbe1f436c2849bde1d4e0bbd0b781f8562b58059 + HEAD_REF v4 ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CAPSTONE_BUILD_STATIC) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CAPSTONE_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CS_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CS_BUILD_SHARED) + + +function(check_feature name var) + set(${var} OFF PARENT_SCOPE) + if (${name} IN_LIST FEATURES) + set(${var} ON PARENT_SCOPE) + endif () +endfunction () + + +check_feature("arm" WITH_ARM_SUPPORT) +check_feature("arm64" WITH_ARM64_SUPPORT) +check_feature("evm" WITH_EVM_SUPPORT) +check_feature("m680x" WITH_M680X_SUPPORT) +check_feature("m68k" WITH_M68K_SUPPORT) +check_feature("mips" WITH_MIPS_SUPPORT) +check_feature("osxkernel" WITH_OSXKERNEL_SUPPORT) +check_feature("ppc" WITH_PPC_SUPPORT) +check_feature("sparc" WITH_SPARC_SUPPORT) +check_feature("sysz" WITH_SYSZ_SUPPORT) +check_feature("tms320c64x" WITH_C64X_SUPPORT) +check_feature("x86" WITH_X86_SUPPORT) +check_feature("x86_reduce" WITH_X86_REDUCE) +check_feature("xcore" WITH_XCORE_SUPPORT) + +check_feature("diet" CS_BUILD_DIET) + +if (WITH_X86_REDUCE AND NOT WITH_X86_SUPPORT) + set(WITH_X86_SUPPORT ON) +endif () vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DCAPSTONE_BUILD_STATIC=${CAPSTONE_BUILD_STATIC} - -DCAPSTONE_BUILD_SHARED=${CAPSTONE_BUILD_SHARED} - - #-DCAPSTONE_ARCHS="x86" - -DCAPSTONE_X86_SUPPORT=ON - -DCAPSTONE_ARM_SUPPORT=ON - -DCAPSTONE_ARM64_SUPPORT=ON - -DCAPSTONE_MIPS_SUPPORT=OFF - -DCAPSTONE_PPC_SUPPORT=OFF - -DCAPSTONE_SPARC_SUPPORT=OFF - -DCAPSTONE_SYSZ_SUPPORT=OFF - -DCAPSTONE_XCORE_SUPPORT=OFF - + -DCAPSTONE_BUILD_STATIC=${CS_BUILD_STATIC} + -DCAPSTONE_BUILD_SHARED=${CS_BUILD_SHARED} + -DCAPSTONE_BUILD_DIET=${CS_BUILD_DIET} -DCAPSTONE_BUILD_TESTS=OFF - OPTIONS_RELEASE - -DCAPSTONE_BUILD_DIET=ON - -DCAPSTONE_X86_REDUCE=ON + -DCAPSTONE_BUILD_CSTOOL=OFF + -DCAPSTONE_BUILD_STATIC_RUNTIME=OFF + + -DCAPSTONE_ARM_SUPPORT=${WITH_ARM_SUPPORT} + -DCAPSTONE_ARM64_SUPPORT=${WITH_ARM64_SUPPORT} + -DCAPSTONE_EVM_SUPPORT=${WITH_EVM_SUPPORT} + -DCAPSTONE_M680X_SUPPORT=${WITH_M680X_SUPPORT} + -DCAPSTONE_M68K_SUPPORT=${WITH_M68K_SUPPORT} + -DCAPSTONE_MIPS_SUPPORT=${WITH_MIPS_SUPPORT} + -DCAPSTONE_OSXKERNEL_SUPPORT=${WITH_OSXKERNEL_SUPPORT} + -DCAPSTONE_PPC_SUPPORT=${WITH_PPC_SUPPORT} + -DCAPSTONE_SPARC_SUPPORT=${WITH_SPARC_SUPPORT} + -DCAPSTONE_SYSZ_SUPPORT=${WITH_SYSZ_SUPPORT} + -DCAPSTONE_TMS320C64X_SUPPORT=${WITH_C64X_SUPPORT} + -DCAPSTONE_X86_SUPPORT=${WITH_X86_SUPPORT} + -DCAPSTONE_XCORE_SUPPORT=${WITH_XCORE_SUPPORT} + + -DCAPSTONE_X86_REDUCE=${WITH_X86_REDUCE} + -DCAPSTONE_X86_ONLY=OFF ) vcpkg_install_cmake() @@ -46,6 +82,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.TXT - DESTINATION ${CURRENT_PACKAGES_DIR}/share/capstone +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT + DESTINATION ${CURRENT_PACKAGES_DIR}/share/capstone RENAME copyright) diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index a84c50ce1..e3131bb20 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,6 +1,6 @@ Source: cgal -Version: 4.13-2 -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 +Version: 4.14-1 +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, boost-multiprecision 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. Feature: qt diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 40475b7c2..58199cc54 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -1,10 +1,17 @@ include(vcpkg_common_functions) +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) + message(WARNING "Cgal's buildsystem uses very long paths and may fail on your system.\n" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CGAL/cgal - REF releases/CGAL-4.13 - SHA512 3a12d7f567487c282928a162a47737c41c22258556ca0083b9cf492fc8f0a7c334b491b14dbfd6a62e71feeeb1b4995769c13a604e0882548f21c41b996d4eaf + REF releases/CGAL-4.14 + SHA512 c70b3ad475f6b2c03ecb540e195b4d26a709205c511b0c705dfddb5b14ef372453ce1d4d49ed342fcd21ba654dea793e91c058afae626276bfb3cfd72bccb382 HEAD_REF master ) @@ -17,6 +24,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 +36,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 @@ -42,11 +49,6 @@ else() endforeach() endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake _contents) -string(REPLACE "CGAL_IGNORE_PRECONFIGURED_GMP" "1" _contents "${_contents}") -string(REPLACE "CGAL_IGNORE_PRECONFIGURED_MPFR" "1" _contents "${_contents}") - -file(WRITE ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake "${_contents}") file(WRITE ${CURRENT_PACKAGES_DIR}/lib/cgal/CGALConfig.cmake "include (\$\{CMAKE_CURRENT_LIST_DIR\}/../../share/cgal/CGALConfig.cmake)") file(COPY ${SOURCE_PATH}/Installation/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal) @@ -60,3 +62,5 @@ file( ${SOURCE_PATH}/Installation/LICENSE.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal ) + +vcpkg_test_cmake(PACKAGE_NAME CGAL) diff --git a/ports/clapack/CONTROL b/ports/clapack/CONTROL index 503ddbac5..c30f5eb95 100644 --- a/ports/clapack/CONTROL +++ b/ports/clapack/CONTROL @@ -1,4 +1,4 @@ Source: clapack -Version: 3.2.1-1 +Version: 3.2.1-2 Description: CLAPACK (f2c'ed version of LAPACK) Build-Depends: openblas diff --git a/ports/clapack/fix-lack-library.patch b/ports/clapack/fix-lack-library.patch new file mode 100644 index 000000000..f586c04c5 --- /dev/null +++ b/ports/clapack/fix-lack-library.patch @@ -0,0 +1,19 @@ +diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
+index 2bdbd05..e77b3a3 100644
+--- a/F2CLIBS/libf2c/CMakeLists.txt
++++ b/F2CLIBS/libf2c/CMakeLists.txt
+@@ -60,3 +60,13 @@ include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
+ include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
+ add_library(f2c STATIC ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
+ set_property(TARGET f2c PROPERTY PREFIX lib)
++
++install(TARGETS f2c
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
++
++install(TARGETS arithchk
++ RUNTIME DESTINATION tools
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
+\ No newline at end of file
diff --git a/ports/clapack/portfile.cmake b/ports/clapack/portfile.cmake index 933294419..9e67594f9 100644 --- a/ports/clapack/portfile.cmake +++ b/ports/clapack/portfile.cmake @@ -29,7 +29,9 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/lapack.def DESTINATION ${SOURCE_PATH}/SRC) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-other-blas-and-install-include.patch" + PATCHES + use-other-blas-and-install-include.patch + fix-lack-library.patch ) vcpkg_configure_cmake( diff --git a/ports/cli/CONTROL b/ports/cli/CONTROL new file mode 100644 index 000000000..32d58ecfb --- /dev/null +++ b/ports/cli/CONTROL @@ -0,0 +1,4 @@ +Source: cli
+Version: 2019-03-21
+Description: A library for interactive command line interfaces in modern C++
+Build-Depends: boost-asio
\ No newline at end of file diff --git a/ports/cli/portfile.cmake b/ports/cli/portfile.cmake new file mode 100644 index 000000000..0f6aae987 --- /dev/null +++ b/ports/cli/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO daniele77/cli
+ REF f74c6eea9616e0a62f5b3be4e1d07ad432232e90
+ SHA512 9a5e25175844a7e9eacb05056c2e56e21be82efed6991d9c0e7d33e3a76f83d815455ec6e79d045ec15453354a1c50b0f91feef2766ae323931b4d4eb6caf1cf
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cli TARGET_PATH share/cli)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cli RENAME copyright)
diff --git a/ports/collada-dom/portfile.cmake b/ports/collada-dom/portfile.cmake index 2612eca68..eda714af1 100644 --- a/ports/collada-dom/portfile.cmake +++ b/ports/collada-dom/portfile.cmake @@ -7,8 +7,9 @@ vcpkg_from_github( SHA512 cb923d296219765096f5246cc7a2b69712931f58171ae885dbdbd215fca86d911c34d12748d3304d6a5a350dc737ff0caead2495acac488af5431b437cbacc7d
HEAD_REF v2.5.0
PATCHES
- "${CMAKE_CURRENT_LIST_DIR}/vs-version-detection.patch"
- "${CMAKE_CURRENT_LIST_DIR}/use-uriparser.patch"
+ vs-version-detection.patch
+ use-uriparser.patch
+ use-vcpkg-minizip.patch
)
vcpkg_configure_cmake(
diff --git a/ports/collada-dom/use-vcpkg-minizip.patch b/ports/collada-dom/use-vcpkg-minizip.patch new file mode 100644 index 000000000..daaaf0f48 --- /dev/null +++ b/ports/collada-dom/use-vcpkg-minizip.patch @@ -0,0 +1,13 @@ +diff --git a/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp b/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp
+index 4536275..77651f9 100644
+--- a/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp
++++ b/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp
+@@ -32,7 +32,7 @@
+ #include <iomanip>
+ using namespace std;
+
+-#include <zip.h> // for saving compressed files
++#include <minizip/zip.h> // for saving compressed files
+ #ifdef _WIN32
+ #include <iowin32.h>
+ #else
diff --git a/ports/concurrentqueue/portfile.cmake b/ports/concurrentqueue/portfile.cmake index 9114d2a26..1d0de7d05 100644 --- a/ports/concurrentqueue/portfile.cmake +++ b/ports/concurrentqueue/portfile.cmake @@ -12,4 +12,4 @@ vcpkg_from_github( file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/concurrentqueue RENAME copyright) file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/concurrentqueue) diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake index 74d76923f..dc618b4b9 100644 --- a/ports/console-bridge/portfile.cmake +++ b/ports/console-bridge/portfile.cmake @@ -25,6 +25,8 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/console_bridge) else() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/console_bridge/cmake" TARGET_PATH share/console_bridge) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/console_bridge) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/console_bridge) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/coroutine/CONTROL b/ports/coroutine/CONTROL index 4b193d5bd..2afe8ae17 100644 --- a/ports/coroutine/CONTROL +++ b/ports/coroutine/CONTROL @@ -1,4 +1,4 @@ Source: coroutine -Version: 1.4.0 +Version: 1.4.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..56b7535d6 100644 --- a/ports/coroutine/portfile.cmake +++ b/ports/coroutine/portfile.cmake @@ -1,19 +1,23 @@ include(vcpkg_common_functions) +if(${VCPKG_TARGET_ARCHITECTURE} MATCHES x86) + message(FATAL_ERROR "This library doesn't support x86 arch. Please use x64 instead. If it is critical, create an issue at the repo: github.com/luncliff/coroutine") +endif() + +# changed to 1.4.1 +set(VERSION_1_4_COMMIT 8399236a4adf1cb49ef51133fb887027e3d77141) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO luncliff/coroutine - REF 1.4 - SHA512 981c9c728c7888995880a97e8533fa31f41085ef57e1c61e53e555f329d20d4a882d9de724d9e93e3d009dc3fe0669fe4d1af403654a9373e4aab44c933628a3 + REF ${VERSION_1_4_COMMIT} + SHA512 35adf0aa3a923b869e02d1e33987f6c9922f90918e84feaf5a41e46334b7555db75f55c6dd797f74112010ef5e682ee6f5fbf58be84af88a8f8f084f3d6dac05 HEAD_REF master ) -if(${VCPKG_TARGET_ARCHITECTURE} MATCHES x86) - message(FATAL_ERROR "This library doesn't support x86 arch. Please use x64 instead or contact maintainer") -endif() - # package: 'ms-gsl' -message(STATUS "Using Guideline Support Library at ${CURRENT_INSTALLED_DIR}/include") +set(GSL_INCLUDE_DIR ${CURRENT_INSTALLED_DIR}/include + CACHE PATH "path to include C++ core guideline support library" FORCE) +message(STATUS "Using ms-gsl at ${GSL_INCLUDE_DIR}") set(DLL_LINKAGE false) if(${VCPKG_LIBRARY_LINKAGE} MATCHES dynamic) @@ -25,8 +29,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - # package: 'ms-gsl' - -DGSL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DGSL_INCLUDE_DIR=${GSL_INCLUDE_DIR} -DTEST_DISABLED=True -DBUILD_SHARED_LIBS=${DLL_LINKAGE} ) diff --git a/ports/cppfs/CONTROL b/ports/cppfs/CONTROL new file mode 100644 index 000000000..30ec75f00 --- /dev/null +++ b/ports/cppfs/CONTROL @@ -0,0 +1,7 @@ +Source: cppfs +Version: 1.2.0 +Description: Cross-platform C++ file system library supporting multiple backends + +Feature: ssh +Description: SSH backend for cppfs +Build-Depends: libssh2,openssl,zlib diff --git a/ports/cppfs/LibCrypto-fix.patch b/ports/cppfs/LibCrypto-fix.patch new file mode 100644 index 000000000..144d2aabe --- /dev/null +++ b/ports/cppfs/LibCrypto-fix.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea9fd15..af63d1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,7 @@ + cmake_minimum_required(VERSION 3.0 FATAL_ERROR) + + # Include cmake modules +-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") ++# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + + include(GenerateExportHeader) + +diff --git a/source/cppfs/CMakeLists.txt b/source/cppfs/CMakeLists.txt +index aa37eda..d29176a 100644 +--- a/source/cppfs/CMakeLists.txt ++++ b/source/cppfs/CMakeLists.txt +@@ -4,18 +4,18 @@ + # + + find_package(LibSSH2) +-find_package(LibCrypto) ++# find_package(LibCrypto) + find_package(ZLIB) + find_package(OpenSSL) + +-if (LibSSH2_FOUND AND LibCrypto_FOUND AND ZLIB_FOUND AND OpenSSL_FOUND) ++if (LibSSH2_FOUND AND ZLIB_FOUND AND OpenSSL_FOUND) + set(SSH_DEPS_MET TRUE) + else() + set(SSH_DEPS_MET FALSE) + endif() + + if (OPTION_BUILD_SSH_BACKEND AND NOT SSH_DEPS_MET) +- message(FATAL_ERROR "Requested to build ssh module but not all dependencies are found! LibSSH2: ${LibSSH2_FOUND}, LibCrypto: ${LibCrypto_FOUND}, ZLIB: ${ZLIB_FOUND}, OpenSSL: ${OpenSSL_FOUND}") ++ message(FATAL_ERROR "Requested to build ssh module but not all dependencies are found! LibSSH2: ${LibSSH2_FOUND}, ZLIB: ${ZLIB_FOUND}, OpenSSL: ${OpenSSL_FOUND}") + endif() + + +@@ -207,10 +207,9 @@ target_link_libraries(${target} + if (OPTION_BUILD_SSH_BACKEND) + target_link_libraries(${target} + PRIVATE +- ${OPENSSL_LIBRARIES} +- ${LIBSSH2_LIBRARY} +- ${LIBCRYPTO_LIBRARY} +- ${ZLIB_LIBRARY} ++ Libssh2::libssh2 ++ OpenSSL::SSL OpenSSL::Crypto ++ ZLIB::ZLIB + ) + + if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") diff --git a/ports/cppfs/cmake-export-fix.patch b/ports/cppfs/cmake-export-fix.patch new file mode 100644 index 000000000..344700002 --- /dev/null +++ b/ports/cppfs/cmake-export-fix.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea9fd15..c62c6fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,7 +124,7 @@ endif() + if((UNIX AND SYSTEM_DIR_INSTALL) OR OPTION_FORCE_SYSTEM_DIR_INSTALL) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project> +- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake ++ set(INSTALL_CMAKE "share/${project}") # /usr/[local]/share/<project> + set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/<project> + set(INSTALL_DATA "share/${project}") # /usr/[local]/share/<project> + set(INSTALL_BIN "bin") # /usr/[local]/bin +@@ -183,7 +183,7 @@ add_subdirectory(deploy) + install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_ROOT} COMPONENT runtime) + + # Install cmake find script for the project +-install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev) ++# install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev) + + # Install the project meta files + install(FILES AUTHORS DESTINATION ${INSTALL_ROOT} COMPONENT runtime) +diff --git a/source/cppfs/CMakeLists.txt b/source/cppfs/CMakeLists.txt +index aa37eda..e8a59e0 100644 +--- a/source/cppfs/CMakeLists.txt ++++ b/source/cppfs/CMakeLists.txt +@@ -283,7 +283,7 @@ perform_health_checks( + + # Library + install(TARGETS ${target} +- EXPORT "${target}-export" COMPONENT dev ++ EXPORT "${target}-config" COMPONENT dev + RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT runtime + LIBRARY DESTINATION ${INSTALL_SHARED} COMPONENT runtime + ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev +@@ -302,8 +302,8 @@ install(DIRECTORY + ) + + # CMake config +-install(EXPORT ${target}-export ++install(EXPORT ${target}-config + NAMESPACE ${META_PROJECT_NAME}:: +- DESTINATION ${INSTALL_CMAKE}/${target} ++ DESTINATION ${INSTALL_CMAKE} + COMPONENT dev + ) diff --git a/ports/cppfs/portfile.cmake b/ports/cppfs/portfile.cmake new file mode 100644 index 000000000..33ea7e605 --- /dev/null +++ b/ports/cppfs/portfile.cmake @@ -0,0 +1,50 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cginternals/cppfs + REF v1.2.0 + SHA512 2e831978dd87bd40d14e5b6f5089f3a962481d41959bfd62db543339d05e306315a1167c3bc06b372517357cc314f7d06ac19605f9a2d5b4edddc9a1f3fa8d03 + HEAD_REF master + PATCHES + LibCrypto-fix.patch + cmake-export-fix.patch +) + +if(${TARGET_TRIPLET} MATCHES "uwp") + message(FATAL_ERROR "cppfs does not support uwp") +endif() + +set(SHARED_LIBS Off) +if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") + set(SHARED_LIBS On) +endif() + +set(SSH_BACKEND OFF) +if("ssh" IN_LIST FEATURES) + set(SSH_BACKEND ON) + if("${VCPKG_TARGET_ARCHITECTURE}" STREQUAL "arm64") + message(FATAL_ERROR "SSH backend of cppfs does not support arm64.") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPTION_BUILD_SSH_BACKEND=${SSH_BACKEND} + -DOPTION_BUILD_TESTS=Off + -DBUILD_SHARED_LIBS=${SHARED_LIBS} + -DOPTION_FORCE_SYSTEM_DIR_INSTALL=On +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppfs RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME cppfs) diff --git a/ports/cppgraphqlgen/CONTROL b/ports/cppgraphqlgen/CONTROL index 9626f1a62..d2c09e78b 100644 --- a/ports/cppgraphqlgen/CONTROL +++ b/ports/cppgraphqlgen/CONTROL @@ -1,4 +1,4 @@ Source: cppgraphqlgen
-Version: 2.0.2
+Version: 2.1.0
Build-Depends: pegtl, rapidjson
Description: C++ GraphQL schema service generator
diff --git a/ports/cppgraphqlgen/portfile.cmake b/ports/cppgraphqlgen/portfile.cmake index 8371cde46..7444c39c5 100644 --- a/ports/cppgraphqlgen/portfile.cmake +++ b/ports/cppgraphqlgen/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/cppgraphqlgen
- REF v2.0.2
- SHA512 259c8bc844b70e99332cd52caf48de3e5f0dfdf5bba6d986209a0e5a9f4491953901b365f43e8612f171bdcaef80b524d6b261b62fb8a429e529a5701a839ca1
+ REF v2.1.0
+ SHA512 6fdeade25fc5c4af18d0288b80044a94cc9dcba9eed1640ec2cce06741b874f027930761964ed72073a25e083c0cf2fb828b9cf9732099c8a4f185776b1e1b8a
HEAD_REF master
)
diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index aaa41316e..230f3c23d 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.10.10 +Version: 2.10.12 Build-Depends: zlib, openssl (!uwp&!windows), boost-system (!uwp&!windows), boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index 9f34226ef..b97e561b1 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/cpprestsdk - REF v2.10.10 - SHA512 6169d0907aead80a4e0a3f6a25fb71ab13a46a10a9700974c629b91948a83ee3c841a4ac7dfac8155ea3731c0eedee594c07ec37050d57770faf4eee608660e5 + REF v2.10.12 + SHA512 a0839c11f71271464632095c1b91bd555220d1c87c4e7637d8424a51739e5abcd91e9257d1171d06470427ba48defd2be12bb34f5352c9590219b9f54292e3a8 HEAD_REF master ) diff --git a/ports/cpr/CONTROL b/ports/cpr/CONTROL index 6a2751073..a8cdbf052 100644 --- a/ports/cpr/CONTROL +++ b/ports/cpr/CONTROL @@ -1,4 +1,4 @@ Source: cpr -Version: 1.3.0-3 +Version: 1.3.0-4 Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. Build-Depends: curl[core] diff --git a/ports/cpr/portfile.cmake b/ports/cpr/portfile.cmake index 281e0da43..56e9c6cf4 100644 --- a/ports/cpr/portfile.cmake +++ b/ports/cpr/portfile.cmake @@ -1,15 +1,14 @@ include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO whoshuu/cpr REF 1.3.0 SHA512 fd08f8a592a5e1fb8dc93158a4850b81575983c08527fb415f65bd9284f93c804c8680d16c548744583cd26b9353a7d4838269cfc59ccb6003da8941f620c273 -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/enable-install.patch + HEAD_REF master + PATCHES enable-install.patch ) vcpkg_configure_cmake( @@ -18,7 +17,6 @@ vcpkg_configure_cmake( OPTIONS -DBUILD_CPR_TESTS=OFF -DUSE_SYSTEM_CURL=ON - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index f76c99124..a84dab006 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.61.1-2 +Version: 7.61.1-5 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl @@ -19,7 +19,7 @@ Build-Depends: curl[openssl] (!windows), curl[winssl] (windows) Description: Default SSL backend Feature: ssh -Build-Depends: libssh2, curl[non-http] +Build-Depends: curl[openssl], libssh2, curl[non-http] Description: SSH support via libssh2 # SSL backends diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 534a54aea..4c742025b 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -107,10 +107,23 @@ endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/curl.exe") +# the native CMAKE_EXECUTABLE_SUFFIX does not work in portfiles, so emulate it +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Windows + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/curl${EXECUTABLE_SUFFIX}") file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/curl") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/curl.exe ${CURRENT_PACKAGES_DIR}/tools/curl/curl.exe) + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/curl${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/curl/curl${EXECUTABLE_SUFFIX}") vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/curl) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(READ "${CURRENT_PACKAGES_DIR}/share/curl/curl-target-release.cmake" RELEASE_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}/bin/curl${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/curl/curl${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/curl/curl-target-release.cmake" "${RELEASE_MODULE}") + endif() endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -118,14 +131,26 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") # Drop debug suffix, as FindCURL.cmake does not look for it if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d.lib") file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) + # Fixup libcurl-target-debug.cmake to match + file(READ "${CURRENT_PACKAGES_DIR}/share/curl/libcurl-target-debug.cmake" DEBUG_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/libcurl-d.lib" "\${_IMPORT_PREFIX}/debug/lib/libcurl.lib" DEBUG_MODULE "${DEBUG_MODULE}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/curl/libcurl-target-debug.cmake" "${DEBUG_MODULE}") endif() else() file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib") file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib ${CURRENT_PACKAGES_DIR}/lib/libcurl.lib) + # Fixup libcurl-target-release.cmake to match + file(READ "${CURRENT_PACKAGES_DIR}/share/curl/libcurl-target-release.cmake" RELEASE_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}/lib/libcurl_imp.lib" "\${_IMPORT_PREFIX}/lib/libcurl.lib" RELEASE_MODULE "${RELEASE_MODULE}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/curl/libcurl-target-release.cmake" "${RELEASE_MODULE}") endif() if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib") file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) + # Fixup libcurl-target-debug.cmake to match + file(READ "${CURRENT_PACKAGES_DIR}/share/curl/libcurl-target-debug.cmake" DEBUG_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/libcurl-d_imp.lib" "\${_IMPORT_PREFIX}/debug/lib/libcurl.lib" DEBUG_MODULE "${DEBUG_MODULE}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/curl/libcurl-target-debug.cmake" "${DEBUG_MODULE}") endif() endif() diff --git a/ports/cutelyst2/CONTROL b/ports/cutelyst2/CONTROL index 888883a44..265e8d7af 100644 --- a/ports/cutelyst2/CONTROL +++ b/ports/cutelyst2/CONTROL @@ -1,4 +1,4 @@ Source: cutelyst2 -Version: 2.5.2-1 +Version: 2.5.2-2 Description: A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework Build-Depends: qt5-base diff --git a/ports/cutelyst2/portfile.cmake b/ports/cutelyst2/portfile.cmake index 118129e27..f22cad892 100644 --- a/ports/cutelyst2/portfile.cmake +++ b/ports/cutelyst2/portfile.cmake @@ -35,11 +35,7 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins/ActionREST.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-plugins) endif() -file(GLOB BINS ${CURRENT_PACKAGES_DIR}/bin/* ${CURRENT_PACKAGES_DIR}/debug/bin/*) -if(NOT BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright diff --git a/ports/darknet/CONTROL b/ports/darknet/CONTROL new file mode 100644 index 000000000..215579eae --- /dev/null +++ b/ports/darknet/CONTROL @@ -0,0 +1,20 @@ +Source: darknet +Version: 0.2.5 +Description: Darknet is an open source neural network framework written in C and CUDA. You only look once (YOLO) is a state-of-the-art, real-time object detection system, best example of darknet functionalities. +Build-Depends: pthreads (windows), stb +Default-Features: weights + +Feature: opencv +Build-Depends: opencv[ffmpeg] +Description: Build darknet with support for OpenCV + +Feature: cuda +Build-Depends: cuda +Description: Build darknet with support for CUDA + +Feature: weights +Description: Download common weights from official websites, using vcpkg proxy-enabled functions + +Feature: opencv-cuda +Build-Depends: opencv[ffmpeg],opencv[cuda] +Description: Build darknet with support for a CUDA-enabled OpenCV diff --git a/ports/darknet/fix_cmakelists.patch b/ports/darknet/fix_cmakelists.patch new file mode 100644 index 000000000..68451de45 --- /dev/null +++ b/ports/darknet/fix_cmakelists.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 585eb0e..7515d98 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,8 +28,7 @@ enable_language(CXX) + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH}) + +-set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Install prefix" FORCE) +-set(INSTALL_BIN_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Path where exe and dll will be installed") ++set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") + set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") + set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed") + set(INSTALL_CMAKE_DIR "share/darknet" CACHE PATH "Path where cmake configs will be installed") +@@ -88,7 +87,6 @@ if(USE_INTEGRATED_LIBS) + set(PThreads_windows_DIR ${CMAKE_CURRENT_LIST_DIR}/3rdparty/pthreads CACHE PATH "Path where pthreads for windows can be located") + add_definitions(-D_TIMESPEC_DEFINED) + endif() +-set(Stb_DIR ${CMAKE_CURRENT_LIST_DIR}/3rdparty/stb CACHE PATH "Path where Stb image library can be located") + + set(CMAKE_DEBUG_POSTFIX d) + add_definitions(-DUSE_CMAKE_LIBS) diff --git a/ports/darknet/portfile.cmake b/ports/darknet/portfile.cmake new file mode 100644 index 000000000..4b28c5011 --- /dev/null +++ b/ports/darknet/portfile.cmake @@ -0,0 +1,114 @@ +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + message(FATAL_ERROR "darknet does not support ARM") +endif() + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "darknet does not support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AlexeyAB/darknet + REF 8c970498a296ed129ffef7d872ccc25d42d1afda + SHA512 70dda24656469b8a61a645533ac227b644d365c7d5f4dbc93077a3f46563dd45ae88c563fb1c8f8d02a2021760aba24bea35d81f0f307975d051d0f9bfe92265 + HEAD_REF master + PATCHES + fix_cmakelists.patch +) + +set(ENABLE_CUDA OFF) +if("cuda" IN_LIST FEATURES) + set(ENABLE_CUDA ON) +endif() + +set(ENABLE_OPENCV OFF) +if("opencv" IN_LIST FEATURES) + set(ENABLE_OPENCV ON) +endif() + +if("opencv-cuda" IN_LIST FEATURES) + set(ENABLE_OPENCV ON) + set(ENABLE_CUDA ON) +endif() + +if("weights" IN_LIST FEATURES) + vcpkg_download_distfile(YOLOV3_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov3.weights" + FILENAME "darknet-cache/yolov3.weights" + SHA512 293c70e404ff0250d7c04ca1e5e053fc21a78547e69b5b329d34f25981613e59b982d93fff2c352915ef7531d6c3b02a9b0b38346d05c51d6636878d8883f2c1 + ) + vcpkg_download_distfile(YOLOV2_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov2.weights" + FILENAME "darknet-cache/yolov2.weights" + SHA512 5271da2dd2da915172ddd034c8e894877e7066051f105ae82e25e185a2b4e4157d2b9514653c23780e87346f2b20df6363018b7e688aba422e2dacf1d2fbf6ab + ) + vcpkg_download_distfile(YOLOV3-TINY_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov3-tiny.weights" + FILENAME "darknet-cache/yolov3-tiny.weights" + SHA512 981a56459515f727bb7b3d3341b95f4117499b6726eab2798e1c3e524de1ee8ed0d954c11b27bbbb926da2cc955526a194eddf69c55d65923994ab2e8af07042 + ) + vcpkg_download_distfile(YOLOV2-TINY_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov2-tiny.weights" + FILENAME "darknet-cache/yolov2-tiny.weights" + SHA512 f0857a7a02cf4322354d288c9afa0b87321b23082b719bc84ea64e2f3556cc1fafeb836ee5bf9fb6dcf448839061b93623a067dfde7afa1338636865ea88989a + ) +endif() + +#make sure we don't use any integrated pre-built library +file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_CUDA=${ENABLE_CUDA} + -DENABLE_OPENCV=${ENABLE_OPENCV} +) + +vcpkg_install_cmake() + +#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/darknet${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/uselib${EXECUTABLE_SUFFIX}) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/uselib_track${EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/uselib_track${EXECUTABLE_SUFFIX}) +endif() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/darknet/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/darknet${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/darknet/darknet${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uselib${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/darknet/uselib${EXECUTABLE_SUFFIX}) +if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/uselib_track${EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uselib_track${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/darknet/uselib_track${EXECUTABLE_SUFFIX}) +endif() +file(COPY ${SOURCE_PATH}/cfg DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) +file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/darknet) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_fixup_cmake_targets() + +file(COPY ${SOURCE_PATH}/cmake/Modules/FindCUDNN.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/darknet) +file(COPY ${SOURCE_PATH}/cmake/Modules/FindPThreads_windows.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/darknet) +file(COPY ${SOURCE_PATH}/cmake/Modules/FindStb.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/darknet) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/darknet RENAME copyright) + +if("weights" IN_LIST FEATURES) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov3.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov2.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov3-tiny.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov2-tiny.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/darknet) +endif() diff --git a/ports/date/CONTROL b/ports/date/CONTROL index f9a86d671..99d514b8d 100644 --- a/ports/date/CONTROL +++ b/ports/date/CONTROL @@ -1,5 +1,5 @@ Source: date -Version: 2.4.1 +Version: 9dc96fd Description: A date and time library based on the C++11/14/17 <chrono> header Feature: remote-api diff --git a/ports/date/fix-date.patch b/ports/date/fix-date.patch deleted file mode 100644 index bf4c05b38..000000000 --- a/ports/date/fix-date.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/include/date/tz.h b/include/date/tz.h -index 280a598..f9b5a35 100644 ---- a/include/date/tz.h -+++ b/include/date/tz.h -@@ -1963,7 +1963,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, - bool is_60_sec = fds.tod.seconds() == seconds{60}; - if (is_60_sec) - fds.tod.seconds() -= seconds{1}; -- auto tmp = to_utc_time(sys_days(fds.ymd) - *offptr + fds.tod.to_duration()); -+ auto tmp = utc_clock::from_sys(sys_days(fds.ymd) - *offptr + fds.tod.to_duration()); - if (is_60_sec) - tmp += seconds{1}; - if (is_60_sec != is_leap_second(tmp).first || !fds.tod.in_conventional_range()) -@@ -2197,7 +2197,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, - return is; - } - --#if !defined(_MSC_VER) || _MSC_VER > 1912 -+#if !defined(_MSC_VER) || _MSC_VER > 1913 - - // clock_time_conversion - -@@ -2471,7 +2471,7 @@ clock_cast(const std::chrono::time_point<SrcClock, Duration>& tp) - return clock_cast_detail::cc_impl<DstClock>(tp, &tp); - } - --#endif // !defined(_MSC_VER) || _MSC_VER > 1912 -+#endif // !defined(_MSC_VER) || _MSC_VER > 1913 - - // Deprecated API - -@@ -2579,3 +2579,4 @@ to_gps_time(const tai_time<Duration>& t) - } // namespace date - - #endif // TZ_H -+ diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index 749c0c5f0..5eedde942 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -10,16 +10,11 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO HowardHinnant/date - REF v2.4.1 - SHA512 ce7d1c4518558d3690b3a33cd3da1066b43a5f641282c331c60be73e9b010227d4998bca5f34694215ae52f6514a2f5eccd6b0a5ee3dcf8cef2f2d1644c8beee + REF 9dc96fd9b5e4e1e7885aa80dc24a3ceb407c3730 + SHA512 1acb78f1ae7f5b1278a9e034fa5ccbb64643ad381ef9bd76bf42fb04d714c6742f2129b6892024cd98bb925e1a6136337fccb636e3f991b428be1ed05ab8901e HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-date.patch -) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) set(HAS_REMOTE_API 0) diff --git a/ports/decimal-for-cpp/CONTROL b/ports/decimal-for-cpp/CONTROL index 72f0355f8..d1801e22a 100644 --- a/ports/decimal-for-cpp/CONTROL +++ b/ports/decimal-for-cpp/CONTROL @@ -1,4 +1,4 @@ Source: decimal-for-cpp -Version:1.12 +Version:1.16 Description: Decimal data type support, for COBOL-like fixed-point operations on currency values. diff --git a/ports/decimal-for-cpp/portfile.cmake b/ports/decimal-for-cpp/portfile.cmake index 3ad2aee46..41af6a158 100644 --- a/ports/decimal-for-cpp/portfile.cmake +++ b/ports/decimal-for-cpp/portfile.cmake @@ -1,29 +1,16 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - #header-only library include(vcpkg_common_functions) -vcpkg_download_distfile(HEADER - URLS "https://raw.githubusercontent.com/vpiotr/decimal_for_cpp/98287a0f0f48aaed2cc146d7682396ae08ed0aea/include/decimal.h" - FILENAME "decimal.h" - SHA512 9de1208760c74ff1e6b1a74957dabae33981d2f5d0ec402b48f27f4dc24c950ea69219a9ee9831959a8669a9c7908093d833a227924f1955cbe444a9f43c5f3a -) - -vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/vpiotr/decimal_for_cpp/98287a0f0f48aaed2cc146d7682396ae08ed0aea/doc/license.txt" - FILENAME "decimal-for-cpp-License.txt" - SHA512 0b2be46b07a0536404887fae9665d6532ffd4cbfefbec42926c14e055f538c1f3a73b6e61ab7fa1584e634ad99304133d18855197df0a914cbb835674cc67677 -) - +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vpiotr/decimal_for_cpp + REF 375633343aa0af812a3ebf4bd06adaeff112ead4 + SHA512 7692fbb1643ed77b0b44fee1cf9a603fa257a5cf64ea66193c571fca61d138c6465a359db21955a4e2a234677f1806d47e05811daf2954004b108e09d3c8d4fa + HEAD_REF master + ) -file(COPY ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp/decimal-for-cpp-License.txt ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp/copyright) +file(COPY ${SOURCE_PATH}/include/decimal.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/doc/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp/license.txt ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp/copyright) diff --git a/ports/devicenameresolver/CMakeLists.txt b/ports/devicenameresolver/CMakeLists.txt new file mode 100644 index 000000000..64adad4d5 --- /dev/null +++ b/ports/devicenameresolver/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.8.0)
+project(DeviceNameResolver CXX)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 /DUNICODE /D_UNICODE -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
+endif()
+
+include_directories(.)
+
+file(GLOB DeviceNameResolver_srcs "*.cpp")
+
+add_library(DeviceNameResolver ${DeviceNameResolver_srcs})
+
+install(
+ TARGETS DeviceNameResolver
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES DeviceNameResolver.h DESTINATION include)
+endif()
diff --git a/ports/devicenameresolver/CONTROL b/ports/devicenameresolver/CONTROL new file mode 100644 index 000000000..2207c9590 --- /dev/null +++ b/ports/devicenameresolver/CONTROL @@ -0,0 +1,3 @@ +Source: devicenameresolver
+Version: 2016-06-26-0850d88fa6
+Description: a little library that resolves a path from a (virtual) device name.
diff --git a/ports/devicenameresolver/portfile.cmake b/ports/devicenameresolver/portfile.cmake new file mode 100644 index 000000000..75088de8c --- /dev/null +++ b/ports/devicenameresolver/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+vcpkg_from_bitbucket(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mrexodia/devicenameresolver
+ REF 0850d88fa6a759d79b3c859933870d9aa602aa79
+ SHA512 9161411d3c8c17f49f5ff9482a007a6608872c948ef856aa7076a45c246e8d777e4cd6b54169d9c1b9e99e7b383436e1a084e168fafff1ca5f2b28260bac1452
+ HEAD_REF master
+)
+
+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=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(READ ${CURRENT_PACKAGES_DIR}/include/DeviceNameResolver.h _contents)
+string(REPLACE "__declspec(dllexport)" "" _contents "${_contents}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/DeviceNameResolver.h "${_contents}")
+
+file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/devicenameresolver RENAME copyright)
diff --git a/ports/devil/CONTROL b/ports/devil/CONTROL index 18d263348..98c27363a 100644 --- a/ports/devil/CONTROL +++ b/ports/devil/CONTROL @@ -1,5 +1,5 @@ Source: devil -Version: 1.8.0-3 +Version: 1.8.0-4 Build-Depends: Description: A full featured cross-platform image library Default-Features: libpng, tiff, libjpeg, openexr, jasper, lcms diff --git a/ports/devil/portfile.cmake b/ports/devil/portfile.cmake index 7ab5a6c06..db9944895 100644 --- a/ports/devil/portfile.cmake +++ b/ports/devil/portfile.cmake @@ -61,6 +61,7 @@ set(IL_USE_DXTC_SQUISH 0) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/DevIL PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS -DIL_NO_PNG=${IL_NO_PNG} -DIL_NO_TIF=${IL_NO_TIF} diff --git a/ports/distorm/CMakeLists.txt b/ports/distorm/CMakeLists.txt new file mode 100644 index 000000000..6f6e20452 --- /dev/null +++ b/ports/distorm/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.8.0)
+project(distorm C)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
+endif()
+
+include_directories(include src)
+
+add_library(distorm
+ src/decoder.c
+ src/distorm.c
+ src/instructions.c
+ src/insts.c
+ src/mnemonics.c
+ src/operands.c
+ src/prefix.c
+ src/textdefs.c
+ src/wstring.c
+)
+
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(distorm PRIVATE -DDISTORM_DYNAMIC=1 -DSUPPORT_64BIT_OFFSET=1)
+else()
+ target_compile_definitions(distorm PRIVATE -DDISTORM_STATIC=1 -DSUPPORT_64BIT_OFFSET=1)
+endif()
+
+install(
+ TARGETS distorm
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES include/distorm.h include/mnemonics.h DESTINATION include)
+endif()
diff --git a/ports/distorm/CONTROL b/ports/distorm/CONTROL new file mode 100644 index 000000000..21dc43923 --- /dev/null +++ b/ports/distorm/CONTROL @@ -0,0 +1,3 @@ +Source: distorm
+Version: 2018-08-26-16e6f435-1
+Description: Powerful Disassembler Library For x86/AMD64
\ No newline at end of file diff --git a/ports/distorm/portfile.cmake b/ports/distorm/portfile.cmake new file mode 100644 index 000000000..9afec4e49 --- /dev/null +++ b/ports/distorm/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO gdabah/distorm
+ REF 16e6f43509616234b8478187c00569a65f15287c
+ SHA512 2ecbacaaf07a07cf725adf25732807476fdaa1d3a44994a90c70ddbd2ec3db4c75c88b28188f8a48a0fb7b4fe79ae4f7b717cf72b3a0154232310ed56677a9a3
+ HEAD_REF master
+)
+
+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=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/distorm RENAME copyright)
diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 427de4a8d..ebfd00766 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -76,13 +76,6 @@ string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABL string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents}) file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h "${_contents}") -file(READ ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake _contents) -string(REPLACE - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)" - _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake "${_contents}") - # Handle copyright file(COPY ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/COPYRIGHT) diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index c4afd763a..2291f0556 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 2.2.3 +Version: 2.3.1 Description: The fastest feature-rich C++ single-header testing framework for unit tests and TDD diff --git a/ports/doctest/portfile.cmake b/ports/doctest/portfile.cmake index 53defc430..859e2be99 100644 --- a/ports/doctest/portfile.cmake +++ b/ports/doctest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO onqtam/doctest - REF 2.2.3 - SHA512 764463178ea109d46714751a0e5a74d9896c3cf3f8b8c3424a9252c58d9f2c1a2c7fa7eec68e516fb96f4634ae0078ea00d49d28d45a6331c3ebcbe1ed6b1175 + REF 2.3.1 + SHA512 b8cb502054e05d6e348fa008b44eb49e7932e0ee15e413953ecfd3092ebc490e5924ee669f22abb85e349033e307e7e19ad44b0c6a98973a8ffe4c7aef9017b2 HEAD_REF master ) diff --git a/ports/dpdk/CMakeLists.txt b/ports/dpdk/CMakeLists.txt new file mode 100644 index 000000000..1952227ae --- /dev/null +++ b/ports/dpdk/CMakeLists.txt @@ -0,0 +1,63 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(dpdk C) + +LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") +LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}") + +INCLUDE(ProcessorCount) +PROCESSORCOUNT(PROCS) + +#ARCH can be: i686, x86_64, ppc_64, arm64 +#MACHINE can be: native, power8, armv8a +#EXECENV can be: linuxapp, bsdapp +#TOOLCHAIN can be: gcc, icc + +SET(ARCH x86_64) +SET(MACHINE native) +SET(EXECENV linuxapp) +SET(TOOLCHAIN gcc) + +IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") + SET(ARCH "i686") +ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") + SET(MACHINE arm8a) +ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64") + SET(MACHINE power8) + SET(ARCH ppc_64) +ENDIF () + +IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + SET(EXECENV bsdapp) +ENDIF () + +FIND_PACKAGE(Numa REQUIRED) +FIND_PROGRAM(MAKE make) + +SET(DPDK_CFLAGS "-fPIC") +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + STRING(APPEND ${DPDK_CFLAGS} "-O0 -g") +ENDIF () + +SET(DPDK_TARGET ${ARCH}-${MACHINE}-${EXECENV}-${TOOLCHAIN}) +#SET(DPDK_CONFIG O=${CMAKE_BUILD_TYPE}/build T=${DPDK_TARGET}) +SET(DPDK_CONFIG "T=${DPDK_TARGET}") + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +ADD_CUSTOM_TARGET(dpdk-configure + COMMAND ${MAKE} config ${DPDK_CONFIG} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + VERBATIM + ) + +ADD_CUSTOM_TARGET(dpdk ALL + COMMAND ${MAKE} EXTRA_CFLAGS=\"${DPDK_CFLAGS}\" MAKEFLAGS=\"${DPDK_CONFIG} -j ${PROCS}\" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + ) + +ADD_DEPENDENCIES(dpdk dpdk-configure) + +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/build/lib + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) diff --git a/ports/dpdk/CONTROL b/ports/dpdk/CONTROL new file mode 100644 index 000000000..056800d29 --- /dev/null +++ b/ports/dpdk/CONTROL @@ -0,0 +1,4 @@ +Source: dpdk +Version: 19.02 +Description: A set of libraries and drivers for fast packet processing + diff --git a/ports/dpdk/FindNuma.cmake b/ports/dpdk/FindNuma.cmake new file mode 100644 index 000000000..d5bb61435 --- /dev/null +++ b/ports/dpdk/FindNuma.cmake @@ -0,0 +1,26 @@ +INCLUDE(FindPackageHandleStandardArgs) + +FIND_PATH(NUMA_ROOT_DIR + NAMES include/numa.h + PATHS ENV NUMA_ROOT + DOC "NUMA library root directory") + +FIND_PATH(NUMA_INCLUDE_DIR + NAMES numa.h + HINTS ${NUMA_ROOT_DIR} + PATH_SUFFIXES include + DOC "NUMA include directory") + +FIND_LIBRARY(NUMA_LIBRARY + NAMES numa + HINTS ${NUMA_ROOT_DIR} + DOC "NUMA library file") + +IF (NUMA_LIBRARY) + GET_FILENAME_COMPONENT(NUMA_LIBRARY_DIR ${NUMA_LIBRARY} PATH) + MARK_AS_ADVANCED(NUMA_INCLUDE_DIR NUMA_LIBRARY_DIR NUMA_LIBRARY) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(NUMA REQUIRED_VARS NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY) +ELSE () + SET(NUMA_FOUND FALSE) + MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") +ENDIF () diff --git a/ports/dpdk/dpdkConfig.cmake b/ports/dpdk/dpdkConfig.cmake new file mode 100644 index 000000000..d60265a77 --- /dev/null +++ b/ports/dpdk/dpdkConfig.cmake @@ -0,0 +1,31 @@ + +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(DPDK_ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(DPDK_ROOT "${DPDK_ROOT}" PATH) +GET_FILENAME_COMPONENT(DPDK_ROOT "${DPDK_ROOT}" PATH) + +SET_LIBRARY_TARGET("DPDK" "dpdk" "${DPDK_ROOT}/debug/lib/libdpdk.a" "${DPDK_ROOT}/lib/libdpdk.a" "${DPDK_ROOT}/include/dpdk") + +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LINK_DIRECTORIES(${DPDK_ROOT}/debug/lib/) +ELSE () + LINK_DIRECTORIES(${DPDK_ROOT}/lib/) +ENDIF () + +FILE(GLOB DPDK_LIBS ${DPDK_ROOT}/lib/librte*.*) +FOREACH (LIB_FILE_NAME ${DPDK_LIBS}) + GET_FILENAME_COMPONENT(LIB_NAME ${LIB_FILE_NAME} NAME_WE) + GET_FILENAME_COMPONENT(FULL_LIB_NAME ${LIB_FILE_NAME} NAME) + STRING(REPLACE "lib" "" LIB_NAME "${LIB_NAME}") + SET_LIBRARY_TARGET("DPDK" "${LIB_NAME}" "${DPDK_ROOT}/debug/lib/${FULL_LIB_NAME}" "${DPDK_ROOT}/lib/${FULL_LIB_NAME}" "${DPDK_ROOT}/include/dpdk") +ENDFOREACH () diff --git a/ports/dpdk/portfile.cmake b/ports/dpdk/portfile.cmake new file mode 100644 index 000000000..603ecd327 --- /dev/null +++ b/ports/dpdk/portfile.cmake @@ -0,0 +1,47 @@ +INCLUDE(vcpkg_common_functions) + +IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + MESSAGE(FATAL_ERROR "Intel dpdk currently only supports Linux/BSD platforms") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO DPDK/dpdk + REF v19.02 + SHA512 e0cc7081b163b4e264b65c1abb7e0f8aa29211539cecc5cf52986699b800eb4d4f2026377c3048c5c3bd2791e41f21645bb655797a3300740aa83633fb87626e + HEAD_REF master +) + +FIND_PATH(NUMA_INCLUDE_DIR NAME numa.h + PATHS ENV NUMA_ROOT + HINTS $ENV{HOME}/local/include /opt/local/include /usr/local/include /usr/include + ) +IF (NOT NUMA_INCLUDE_DIR) + MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") +ENDIF () + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} +) + +VCPKG_INSTALL_CMAKE() + +# Headers are symbolic links here, gather all, resolve and copy real files +FILE(GLOB_RECURSE HEADERS FOLLOW_SYMLINKS "${SOURCE_PATH}/build/include/*") +SET(REAL_FILES "") +FOREACH (HEADER ${HEADERS}) + GET_FILENAME_COMPONENT(REAL_FILE "${HEADER}" REALPATH) + LIST(APPEND REAL_FILES "${REAL_FILE}") +ENDFOREACH () + +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 ${REAL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/dpdkConfig.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/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/dpdk/usage b/ports/dpdk/usage new file mode 100644 index 000000000..6ecb606dd --- /dev/null +++ b/ports/dpdk/usage @@ -0,0 +1,4 @@ +The package dpdk is compatible with built-in CMake targets:
+
+ FIND_PACKAGE(dpdk CONFIGURE REQUIRED)
+ TARGET_LINK_LIBRARIES(main PRIVATE DPDK::dpdk)
diff --git a/ports/draco/CONTROL b/ports/draco/CONTROL index faa63303a..53da07b77 100644 --- a/ports/draco/CONTROL +++ b/ports/draco/CONTROL @@ -1,4 +1,4 @@ Source: draco -Version: 1.3.3 +Version: 1.3.3-1 Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. Build-Depends: diff --git a/ports/draco/fix-compile-error-uwp.patch b/ports/draco/fix-compile-error-uwp.patch new file mode 100644 index 000000000..874ea7432 --- /dev/null +++ b/ports/draco/fix-compile-error-uwp.patch @@ -0,0 +1,30 @@ +diff --git a/src/draco/core/symbol_coding_utils.h b/src/draco/core/symbol_coding_utils.h
+index be2183d..eaaca00 100644
+--- a/src/draco/core/symbol_coding_utils.h
++++ b/src/draco/core/symbol_coding_utils.h
+@@ -41,7 +41,9 @@ typename std::make_unsigned<IntTypeT>::type ConvertSignedIntToSymbol(
+ if (val >= 0) {
+ return static_cast<UnsignedType>(val) << 1;
+ }
+- val = -(val + 1); // Map -1 to 0, -2 to -1, etc..
++ // Map -1 to 0, -2 to -1, etc..
++ val += 1;
++ val *= -1;
+ UnsignedType ret = static_cast<UnsignedType>(val);
+ ret <<= 1;
+ ret |= 1;
+diff --git a/src/draco/io/parser_utils.cc b/src/draco/io/parser_utils.cc
+index 1aa52cc..cfbbdbd 100644
+--- a/src/draco/io/parser_utils.cc
++++ b/src/draco/io/parser_utils.cc
+@@ -150,7 +150,9 @@ bool ParseSignedInt(DecoderBuffer *buffer, int32_t *value) {
+ uint32_t v;
+ if (!ParseUnsignedInt(buffer, &v))
+ return false;
+- *value = (sign < 0) ? -v : v;
++ if (sign < 0)
++ v *= -1;
++ *value = v;
+ return true;
+ }
+
diff --git a/ports/draco/portfile.cmake b/ports/draco/portfile.cmake index 853d45e86..4b95739ca 100644 --- a/ports/draco/portfile.cmake +++ b/ports/draco/portfile.cmake @@ -23,6 +23,8 @@ vcpkg_from_github( REF 1.3.3 SHA512 80ed5a623046822f5bb26b2454c8ee8cc93ffe9eb3012e8461cefdfc577b26d69a92ea0f0c5e14f5f48c1ef99f9a7263b01710df376792e74358ae14e49c3897 HEAD_REF master + PATCHES + fix-compile-error-uwp.patch ) vcpkg_configure_cmake( diff --git a/ports/dtl/CONTROL b/ports/dtl/CONTROL new file mode 100644 index 000000000..cd4109d04 --- /dev/null +++ b/ports/dtl/CONTROL @@ -0,0 +1,3 @@ +Source: dtl +Version: 1.19 +Description: Diff template library diff --git a/ports/dtl/portfile.cmake b/ports/dtl/portfile.cmake new file mode 100644 index 000000000..d66360991 --- /dev/null +++ b/ports/dtl/portfile.cmake @@ -0,0 +1,16 @@ +#header-only library +include(vcpkg_common_functions) +include(CMakePackageConfigHelpers) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cubicdaiya/dtl + REF v1.19 + SHA512 77c767451b1b78ce49085da6ff5bb8a23c96dec56a37d96ef357a6b69a1b2cd45e2c6c4e8f91ee34ca080ce03a26518c478ff207309326a4bc7e729eaa2824b2 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/dtl + DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION + ${CURRENT_PACKAGES_DIR}/share/dtl RENAME copyright) diff --git a/ports/ebml/CONTROL b/ports/ebml/CONTROL index 1b3ec442a..ee257603f 100644 --- a/ports/ebml/CONTROL +++ b/ports/ebml/CONTROL @@ -1,3 +1,3 @@ Source: ebml
-Version: 1.3.6-1
+Version: 1.3.7
Description: a C++ libary to parse EBML files
diff --git a/ports/ebml/portfile.cmake b/ports/ebml/portfile.cmake index 573801fb6..3eb8d642d 100644 --- a/ports/ebml/portfile.cmake +++ b/ports/ebml/portfile.cmake @@ -4,12 +4,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Matroska-Org/libebml
- REF release-1.3.6
- SHA512 249ff2e9b381d827311eaec910962685243a3b65335c7bd404a35e11cd204c63bc7ea69787f0e27ea9c9144024e45867fd4ae7d30688a3695cd45fee1ce89ec9
+ REF release-1.3.7
+ SHA512 754dee128db2eb6f0ba09962312ddda79f3178238464dd6161cce50bd08fd4193490a48bb537c4e2a388dc339951909a8857617cb30500d76d5689da4f855b47
HEAD_REF master
PATCHES export-endofstreamx.patch
)
@@ -22,7 +21,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
+if (WIN32)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
+else ()
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ebml)
+endif ()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
diff --git a/ports/ecm/CONTROL b/ports/ecm/CONTROL index 610344134..6b8ee2938 100644 --- a/ports/ecm/CONTROL +++ b/ports/ecm/CONTROL @@ -1,3 +1,3 @@ Source: ecm -Version: 5.53.0 +Version: 5.56.0 Description: Extra CMake Modules (ECM), extra modules and scripts for CMake diff --git a/ports/ecm/portfile.cmake b/ports/ecm/portfile.cmake index 27cbddc53..1ccb9a5fc 100644 --- a/ports/ecm/portfile.cmake +++ b/ports/ecm/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDE/extra-cmake-modules - REF v5.53.0 - SHA512 147dea1c8b3b0f01fca4330fa4200a0f67c1a21a999979c94669459e347c8292cd94cb18d431d55883fff9d6acd5820428de500fc3cd790aa9f17d54bceeadc3 + REF v5.56.0 + SHA512 6a65eeaae1974e4bb3b8910875d29cf48ee4d83627aa38179213110aa7e5a058e1721de53eb629baa8e27fd0853a8bbd5aaa2dc001ae4651626d9b7a83c79fa5 HEAD_REF master ) diff --git a/ports/effolkronium-random/CONTROL b/ports/effolkronium-random/CONTROL index 33e61c639..77facd63b 100644 --- a/ports/effolkronium-random/CONTROL +++ b/ports/effolkronium-random/CONTROL @@ -1,3 +1,3 @@ Source: effolkronium-random -Version: 1.2.0 +Version: 1.3.0 Description: Random with a modern C++ API diff --git a/ports/effolkronium-random/portfile.cmake b/ports/effolkronium-random/portfile.cmake index d96401e22..d6e3cbba8 100644 --- a/ports/effolkronium-random/portfile.cmake +++ b/ports/effolkronium-random/portfile.cmake @@ -3,14 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO effolkronium/random - REF v1.2.0 - SHA512 92c5447196601d7dfb0320b517494f4e75cb55011c800cd2f18655cd4ab867672ad39830a3dbb3fc5f39a41c8ae03b6a6910f1eac4a2f131cffca896554be561 + REF v1.3.0 + SHA512 68bd42e696a784832376950df7df9ddc8fc52ad073f44eddc7bcc2547278096ad3ec6463ce3a0e2e60a223e0852e68be4c2e9bcec4b237b9017ac2b03d5be812 HEAD_REF master ) -vcpkg_replace_string(${SOURCE_PATH}/CMakeLists.txt "effolkronium_random" "effolkronium-random") -vcpkg_replace_string(${SOURCE_PATH}/cmake/config.cmake.in "effolkronium_random" "effolkronium-random") - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -19,7 +16,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/ TARGET_PATH /share/effolkronium-random) +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/ TARGET_PATH /share/effolkronium_random) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/effolkronium-random RENAME copyright) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 35b2bce9d..aa8696107 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,7 @@ Source: exiv2 -Version: 2018-11-08 -Build-Depends: zlib, expat, libiconv +Version: 0.27 +Build-Depends: zlib, expat, libiconv, gettext Description: Image metadata library and tools http://www.exiv2.org + +Feature: unicode +Description: Compile with unicode support on windows
\ No newline at end of file diff --git a/ports/exiv2/iconv.patch b/ports/exiv2/iconv.patch index 27bedd314..dcea70b86 100644 --- a/ports/exiv2/iconv.patch +++ b/ports/exiv2/iconv.patch @@ -1,28 +1,36 @@ -diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
-index e220e2f..992b887 100644
--- a/cmake/findDependencies.cmake
+++ b/cmake/findDependencies.cmake
-@@ -50,7 +50,7 @@ if( EXIV2_ENABLE_NLS )
- # the manual check in cmake/generateConfigFile.cmake
+@@ -36,5 +36,5 @@
+
+
+ if (EXIV2_ENABLE_NLS)
+- find_package(Intl REQUIRED)
++ find_package(unofficial-gettext CONFIG)
endif( )
--find_package(Iconv)
-+find_package(unofficial-iconv CONFIG REQUIRED)
- if( ICONV_FOUND )
- message ( "-- ICONV_INCLUDE_DIR : " ${Iconv_INCLUDE_DIR} )
- message ( "-- ICONV_LIBRARIES : " ${Iconv_LIBRARY} )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 91469b6..4c51068 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -274,8 +274,8 @@ if( EXIV2_ENABLE_NLS )
- target_link_libraries( exiv2lib PRIVATE ${LIBINTL_LIBRARIES} )
+@@ -208,14 +208,14 @@
+ endif()
+
+ if( EXIV2_ENABLE_NLS )
+- target_link_libraries(exiv2lib PRIVATE ${Intl_LIBRARIES})
+- target_include_directories(exiv2lib PRIVATE ${Intl_INCLUDE_DIRS})
++ target_link_libraries(exiv2lib PRIVATE unofficial::gettext::libintl)
+ # Definition needed for translations
+ target_compile_definitions(exiv2lib PUBLIC EXV_LOCALEDIR="/../${CMAKE_INSTALL_LOCALEDIR}")
endif()
-if( ICONV_FOUND )
- target_link_libraries( exiv2lib PRIVATE Iconv::Iconv )
-+if( ICONV_FOUND OR 1 )
-+ target_link_libraries( exiv2lib PRIVATE unofficial::iconv::libiconv )
- endif()
+-endif()
++if(NOT TARGET unofficial::iconv::libiconv)
++ find_package(unofficial-iconv CONFIG)
++endif()
++target_link_libraries( exiv2lib PRIVATE unofficial::iconv::libiconv )
+
+
diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index e046e0bde..96cec76cb 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,26 +3,44 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 274ef04f7ebbff567135e732434c9c8353265d6c - SHA512 8e8d32a4c51da2a61026a4541885da72df88c3e30452944c5e2d2d8e6d8d03dcdea72c4e3bfe9673554453ddc547651d160cfba2bfab1450a1770f4af2be740a + REF 0.27 + SHA512 ec605db73abcf3cc2df78c1fc3aae5335a51192f660668e39a4f20fc7f372b18c3cec9b704e1c71c356315fd75e791622de1dffe576432ee0fb12bf63a98a423 HEAD_REF master - PATCHES iconv.patch + PATCHES + iconv.patch ) +if(WIN32 AND ("unicode" IN_LIST FEATURES)) + set(enable_win_unicode TRUE) +elseif() + set(enable_win_unicode FALSE) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DEXIV2_ENABLE_WIN_UNICODE:BOOL=${enable_win_unicode} + -DEXIV2_BUILD_EXIV2_COMMAND:BOOL=FALSE + -DEXIV2_BUILD_UNIT_TESTS:BOOL=FALSE + -DEXIV2_BUILD_SAMPLES:BOOL=FALSE +# -DEXIV2_ENABLE_NLS:BOOL=OFF ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake") +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/exiv2 + @ONLY +) + vcpkg_copy_pdbs() # Clean -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${EXE} ${DEBUG_EXE}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/exiv2/vcpkg-cmake-wrapper.cmake b/ports/exiv2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..76e941f20 --- /dev/null +++ b/ports/exiv2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS})
+
+if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
+ find_package(unofficial-iconv CONFIG REQUIRED)
+ find_package(unofficial-gettext CONFIG REQUIRED)
+ if(TARGET exiv2lib)
+ set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+ unofficial::iconv::libiconv
+ unofficial::gettext::libintl)
+ endif()
+endif()
diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL index 0e425f59b..e486cf90a 100644 --- a/ports/fcl/CONTROL +++ b/ports/fcl/CONTROL @@ -1,4 +1,4 @@ Source: fcl -Version: 0.5.0-3 +Version: 0.5.0-4 Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles Build-Depends: ccd, octomap diff --git a/ports/fcl/portfile.cmake b/ports/fcl/portfile.cmake index 851a013c2..92781872f 100644 --- a/ports/fcl/portfile.cmake +++ b/ports/fcl/portfile.cmake @@ -36,7 +36,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/") +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/fcl") +endif() + file(READ ${CURRENT_PACKAGES_DIR}/share/fcl/fclConfig.cmake FCL_CONFIG) string(REPLACE "unset(_expectedTargets)" diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 71fa1c44e..ce961fa55 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,5 @@ Source: ffmpeg -Version: 4.1-2 +Version: 4.1-4 Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. diff --git a/ports/ffmpeg/FindFFMPEG.cmake b/ports/ffmpeg/FindFFMPEG.cmake index bd373bfae..f8e65f53a 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake +++ b/ports/ffmpeg/FindFFMPEG.cmake @@ -6,6 +6,8 @@ foreach(FFMPEG_SUBLIBRARY avformat avdevice avcodec avutil swscale) find_library(FFMPEG_lib${FFMPEG_SUBLIBRARY}_LIBRARY NAMES ${FFMPEG_SUBLIBRARY}) list(APPEND FFMPEG_LIBRARIES ${FFMPEG_lib${FFMPEG_SUBLIBRARY}_LIBRARY}) endforeach() -list(APPEND FFMPEG_LIBRARIES wsock32 ws2_32 Secur32) +if(WIN32) + list(APPEND FFMPEG_LIBRARIES wsock32 ws2_32 Secur32) +endif() find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS) diff --git a/ports/ffmpeg/build_linux.sh b/ports/ffmpeg/build_linux.sh new file mode 100644 index 000000000..b24be1346 --- /dev/null +++ b/ports/ffmpeg/build_linux.sh @@ -0,0 +1,23 @@ +#!/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=$1 +PATH_TO_SRC_DIR=$2 +PATH_TO_PACKAGE_DIR=$3 +# Note: $4 is extra configure options + +cd "$PATH_TO_BUILD_DIR" +echo "=== CONFIGURING ===" +"$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" $4 +echo "=== BUILDING ===" +make -j6 +echo "=== INSTALLING ===" +make install diff --git a/ports/ffmpeg/configure_opencv.patch b/ports/ffmpeg/configure_opencv.patch index 66678661e..ac5c82797 100644 --- a/ports/ffmpeg/configure_opencv.patch +++ b/ports/ffmpeg/configure_opencv.patch @@ -1,11 +1,11 @@ --- a/configure
+++ b/configure
-@@ -5804,7 +5804,7 @@
+@@ -6110,7 +6110,7 @@ enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec
enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
- enabled libopencv && { check_header opencv2/core/core_c.h &&
- { use_pkg_config opencv opencv2/core/core_c.h cvCreateImageHeader ||
-- require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+ enabled libopencv && { check_headers opencv2/core/core_c.h &&
+ { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
+- require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+ require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core341 -lopencv_imgproc341; } ||
- require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader; }
- enabled libopenh264 && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion
- enabled libopenjpeg && { { check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+ require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
+ enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
+ enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
diff --git a/ports/ffmpeg/detect-openssl.patch b/ports/ffmpeg/detect-openssl.patch index cb8a77e0a..affd37d15 100644 --- a/ports/ffmpeg/detect-openssl.patch +++ b/ports/ffmpeg/detect-openssl.patch @@ -12,14 +12,11 @@ diff --git a/configure b/configure index a1818dc..1cf2a7c 100755 --- a/configure +++ b/configure -@@ -5836,6 +5836,7 @@ enabled openssl && { use_pkg_config openssl openssl/ssl.h OPENSSL_init - check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || - check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || - check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || -+ check_lib openssl/ssl.h SSL_library_init -llibeay32 -lssleay32 || +@@ -6127,6 +6127,7 @@ + check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || + check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || + check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || ++ check_lib openssl openssl/ssl.h SSL_library_init -llibeay32 -lssleay32 || die "ERROR: openssl not found"; } - enabled qtkit_indev && { check_header_objcc QTKit/QTKit.h || disable qtkit_indev; } - --- -2.10.1.windows.1 - + enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create && + require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create && diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 164995b99..786d82ea1 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -24,14 +24,24 @@ endif() vcpkg_find_acquire_program(YASM) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make) +if (WIN32) + set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") + set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh) + + 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) else() - vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make) + set(ENV{PATH} "$ENV{PATH}:${YASM_EXE_PATH}") + set(BASH /bin/bash) + set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/build_linux.sh) 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}") @@ -131,18 +141,20 @@ endif() message(STATUS "Building Options: ${OPTIONS}") -if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd") - set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD") -else() - set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd") - set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MT --extra-cxxflags=-MT") +if(WIN32) + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd") + set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD") + else() + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd") + set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MT --extra-cxxflags=-MT") + endif() endif() 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" + COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" # BUILD DIR "${SOURCE_PATH}" # SOURCE DIR "${CURRENT_PACKAGES_DIR}" # PACKAGE DIR @@ -154,7 +166,7 @@ vcpkg_execute_required_process( 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" + COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" # BUILD DIR "${SOURCE_PATH}" # SOURCE DIR "${CURRENT_PACKAGES_DIR}/debug" # PACKAGE DIR diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index 55cd702d2..1ff42851f 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,6 +1,21 @@ Source: fftw3
-Version: 3.3.8
+Version: 3.3.8-3
Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).
Feature: openmp
-Description: Builds openmp enabled lib
\ No newline at end of file +Description: Builds openmp enabled lib
+
+Feature: sse
+Description: Builds part of the library with sse
+
+Feature: sse2
+Description: Builds part of the library with sse2, sse
+
+Feature: avx
+Description: Builds part of the library with avx, sse2, sse
+
+Feature: avx2
+Description: Builds part of the library with avx2, fma, avx, sse2, sse
+
+Feature: threads
+Description: Enable threads in fftw3
diff --git a/ports/fftw3/fftw3_arch_fix.patch b/ports/fftw3/fftw3_arch_fix.patch new file mode 100644 index 000000000..922d86b97 --- /dev/null +++ b/ports/fftw3/fftw3_arch_fix.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 95bd537a..245acc8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -131,6 +131,7 @@ endif ()
+
+ include (CheckCCompilerFlag)
+
++#All those checks fail due to linkage errors so we directly set HAVE_<ARCH> in the PORTFILE! We assume the user knows what (s)he is doing!
+ if (ENABLE_SSE)
+ foreach (FLAG "-msse" "/arch:SSE")
+ unset (HAVE_SSE CACHE)
+@@ -176,8 +177,9 @@ if (ENABLE_AVX2)
+ endif ()
+
+ # AVX2 codelets require FMA support as well
++# AVX2 implicitly includes FMA using Visual Studio (also definition __FMA__ is not set)
+ if (ENABLE_AVX2)
+- foreach (FLAG "-mfma" "/arch:FMA")
++ foreach (FLAG "-mfma" "/arch:AVX2")
+ unset (HAVE_FMA CACHE)
+ check_c_compiler_flag (${FLAG} HAVE_FMA)
+ if (HAVE_FMA)
diff --git a/ports/fftw3/patch_targets.patch b/ports/fftw3/patch_targets.patch new file mode 100644 index 000000000..a0df5cf90 --- /dev/null +++ b/ports/fftw3/patch_targets.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 335808a..90772b4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -358,7 +358,7 @@ foreach(subtarget ${subtargets}) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endforeach () + install(TARGETS ${fftw3_lib} +- EXPORT FFTW3LibraryDepends ++ EXPORT FFTW3${PREC_SUFFIX}LibraryDepends + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -419,11 +419,11 @@ configure_file (FFTW3ConfigVersion.cmake.in FFTW3${PREC_SUFFIX}ConfigVersion.cma + install (FILES + ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}ConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake + COMPONENT Development) + +-export (TARGETS ${fftw3_lib} NAMESPACE FFTW3:: FILE ${PROJECT_BINARY_DIR}/FFTW3LibraryDepends.cmake) +-install(EXPORT FFTW3LibraryDepends ++export (TARGETS ${fftw3_lib} NAMESPACE FFTW3:: FILE ${PROJECT_BINARY_DIR}/FFTW3${PREC_SUFFIX}LibraryDepends.cmake) ++install(EXPORT FFTW3${PREC_SUFFIX}LibraryDepends + NAMESPACE FFTW3:: +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake + COMPONENT Development) +--- a/FFTW3Config.cmake.in ++++ b/FFTW3Config.cmake.in +@@ -10,7 +10,7 @@ set (FFTW3@PREC_SUFFIX@_LIBRARIES fftw3@PREC_SUFFIX@) + set (FFTW3@PREC_SUFFIX@_LIBRARY_DIRS @CMAKE_INSTALL_FULL_LIBDIR@) + set (FFTW3@PREC_SUFFIX@_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@) + +-include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3LibraryDepends.cmake") ++include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3@PREC_SUFFIX@LibraryDepends.cmake") + + if (CMAKE_VERSION VERSION_LESS 2.8.3) + set (CMAKE_CURRENT_LIST_DIR) +
\ No newline at end of file diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 4efb47075..17ce37ea2 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -21,6 +21,8 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/omp_test.patch
+ ${CMAKE_CURRENT_LIST_DIR}/patch_targets.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fftw3_arch_fix.patch
)
if ("openmp" IN_LIST FEATURES)
@@ -29,34 +31,88 @@ else() set(ENABLE_OPENMP OFF)
endif()
+if ("avx" IN_LIST FEATURES)
+ set(HAVE_AVX ON)
+ set(HAVE_SSE ON)
+ set(HAVE_SSE2 ON)
+else()
+ set(HAVE_AVX OFF)
+endif()
+
+if ("avx2" IN_LIST FEATURES)
+ set(HAVE_AVX2 ON)
+ set(HAVE_FMA ON)
+ set(HAVE_SSE ON)
+ set(HAVE_SSE2 ON)
+else()
+ set(HAVE_AVX2 OFF)
+ set(HAVE_FMA OFF)
+endif()
+
+if ("sse" IN_LIST FEATURES)
+ set(HAVE_SSE ON)
+else()
+ set(HAVE_SSE OFF)
+endif()
+
+if ("sse2" IN_LIST FEATURES)
+ set(HAVE_SSE2 ON)
+ set(HAVE_SSE ON)
+else()
+ set(HAVE_SSE2 OFF)
+endif()
+
+if ("threads" IN_LIST FEATURES)
+ set(HAVE_THREADS ON)
+else()
+ set(HAVE_THREADS OFF)
+endif()
+
foreach(PRECISION ENABLE_DEFAULT_PRECISION ENABLE_FLOAT ENABLE_LONG_DOUBLE)
- vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS
- -D${PRECISION}=ON
- -DENABLE_OPENMP=${ENABLE_OPENMP}
- )
-
- vcpkg_install_cmake()
- vcpkg_copy_pdbs()
-
- file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-
- vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
-
- if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
- vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch)
- endif()
-
- # Cleanup
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+ if(${PRECISION} MATCHES "ENABLE_LONG_DOUBLE")
+ vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -D${PRECISION}=ON
+ -DENABLE_OPENMP=${ENABLE_OPENMP}
+ -DENABLE_THREADS=${HAVE_THREADS}
+ )
+ else()
+ vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -D${PRECISION}=ON
+ -DENABLE_OPENMP=${ENABLE_OPENMP}
+ -DHAVE_SSE=${HAVE_SSE}
+ -DHAVE_SSE2=${HAVE_SSE2}
+ -DHAVE_AVX=${HAVE_AVX}
+ -DHAVE_AVX2=${HAVE_AVX2}
+ -DHAVE_FMA=${HAVE_FMA}
+ -DENABLE_THREADS=${HAVE_THREADS}
+ )
+ endif()
+
+ vcpkg_install_cmake()
+ vcpkg_copy_pdbs()
+
+ file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
+
+ if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch)
+ endif()
+
+ # Cleanup
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
endforeach()
-
+
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fftw3)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/fftw3/COPYING ${CURRENT_PACKAGES_DIR}/share/fftw3/copyright)
diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index 4ec6072ab..5fdc23b2e 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-8 +Version: 1.9.1-9 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/Revert-fix-install-flann.patch b/ports/flann/Revert-fix-install-flann.patch deleted file mode 100644 index ace1b592a..000000000 --- a/ports/flann/Revert-fix-install-flann.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt -index cc58c90..49c53f0 100644 ---- a/src/cpp/CMakeLists.txt -+++ b/src/cpp/CMakeLists.txt -@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS) - set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) - else() -- add_library(flann ${C_SOURCES}) -+ add_library(flann SHARED ${C_SOURCES}) - - if(MINGW AND OPENMP_FOUND) - target_link_libraries(flann gomp) -@@ -111,12 +111,12 @@ endif() - endif(WIN32) - - --#install ( --# TARGETS flann_cpp flann_cpp_s --# RUNTIME DESTINATION bin --# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} --# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} --#) -+install ( -+ TARGETS flann_cpp flann_cpp_s -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} -+ ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} -+) - - if (BUILD_CUDA_LIB) - install ( -@@ -129,7 +129,7 @@ endif() - - if (BUILD_C_BINDINGS) - install ( -- TARGETS flann -+ TARGETS flann flann_s - RUNTIME DESTINATION bin - LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} diff --git a/ports/flann/fix-install-flann.patch b/ports/flann/fix-install-flann.patch deleted file mode 100644 index f65094e8f..000000000 --- a/ports/flann/fix-install-flann.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git "a/src/cpp/CMakeLists.txt" "b/src/cpp/CMakeLists.txt" -index 49c53f0..cc58c90 100644 ---- "a/src/cpp/CMakeLists.txt" -+++ "b/src/cpp/CMakeLists.txt" -@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS) - set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) - else() -- add_library(flann SHARED ${C_SOURCES}) -+ add_library(flann ${C_SOURCES}) - - if(MINGW AND OPENMP_FOUND) - target_link_libraries(flann gomp) -@@ -111,12 +111,12 @@ endif() - endif(WIN32) - - --install ( -- TARGETS flann_cpp flann_cpp_s -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} -- ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} --) -+#install ( -+# TARGETS flann_cpp flann_cpp_s -+# RUNTIME DESTINATION bin -+# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} -+# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} -+#) - - if (BUILD_CUDA_LIB) - install ( -@@ -129,7 +129,7 @@ endif() - - if (BUILD_C_BINDINGS) - install ( -- TARGETS flann flann_s -+ TARGETS flann - RUNTIME DESTINATION bin - LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} diff --git a/ports/flann/flann-linux.patch b/ports/flann/flann-linux.patch new file mode 100644 index 000000000..da95aa7a2 --- /dev/null +++ b/ports/flann/flann-linux.patch @@ -0,0 +1,22 @@ +diff --git a/src/cpp/CMakeLists b/src/cpp/CMakeLists.txt +index e6c8ae06..c15a8e90 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -35,7 +35,7 @@ if (BUILD_CUDA_LIB) + endif() + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann_cpp SHARED "") ++ add_library(flann_cpp SHARED ${CPP_SOURCES}) + set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) + target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive) + +@@ -90,7 +90,7 @@ if (BUILD_C_BINDINGS) + set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann SHARED "") ++ add_library(flann SHARED ${C_SOURCES}) + set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) + target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) + else() diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 2d6c40486..f8c6b96d4 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -7,10 +7,9 @@ vcpkg_from_github( SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7 HEAD_REF master PATCHES - fix-install-flann.patch - Revert-fix-install-flann.patch export-all-symbols-of-flann-cpp.patch no-write-src-dir.patch + flann-linux.patch ) vcpkg_configure_cmake( @@ -18,6 +17,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF -DBUILD_DOC=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_MATLAB_BINDINGS=OFF diff --git a/ports/flint/CONTROL b/ports/flint/CONTROL index ce4646883..90797aa29 100644 --- a/ports/flint/CONTROL +++ b/ports/flint/CONTROL @@ -1,4 +1,4 @@ Source: flint -Version: 2.5.2-1 +Version: 2.5.2-2 Description: Fast Library for Number Theory Build-Depends: mpir, mpfr, pthreads, gettimeofday diff --git a/ports/flint/dll_flint.patch b/ports/flint/dll_flint.patch index 29e1fa77a..15a6660b2 100644 --- a/ports/flint/dll_flint.patch +++ b/ports/flint/dll_flint.patch @@ -1,76 +1,76 @@ -diff --git a/build.vc14/dll_flint/dll_flint.vcxproj b/build.vc14/dll_flint/dll_flint.vcxproj -index 3c8edd3c..947b4e38 100644 ---- a/build.vc14/dll_flint/dll_flint.vcxproj -+++ b/build.vc14/dll_flint/dll_flint.vcxproj -@@ -81,7 +81,7 @@ - <ClCompile> - <Optimization>Full</Optimization> - <IntrinsicFunctions>true</IntrinsicFunctions> -- <AdditionalIncludeDirectories>..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir);</AdditionalIncludeDirectories> -+ <AdditionalIncludeDirectories>..\;..\..\;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories> - <PreprocessorDefinitions>NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> - <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName> -@@ -90,7 +90,7 @@ - <Link> - <GenerateDebugInformation>true</GenerateDebugInformation> - <LargeAddressAware>true</LargeAddressAware> -- <AdditionalDependencies>..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies)</AdditionalDependencies> -+ <AdditionalDependencies>@NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - <PostBuildEvent> - <Command>postbuild $(IntDir) DLL -@@ -105,7 +105,7 @@ - <ClCompile> - <Optimization>Disabled</Optimization> - <IntrinsicFunctions>true</IntrinsicFunctions> -- <AdditionalIncludeDirectories>..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir);</AdditionalIncludeDirectories> -+ <AdditionalIncludeDirectories>..\;..\..\;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName> -@@ -114,7 +114,7 @@ - <Link> - <GenerateDebugInformation>true</GenerateDebugInformation> - <LargeAddressAware>true</LargeAddressAware> -- <AdditionalDependencies>..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies)</AdditionalDependencies> -+ <AdditionalDependencies>@NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - <PostBuildEvent> - <Command>postbuild $(IntDir) DLL -@@ -129,7 +129,7 @@ - <ClCompile> - <Optimization>Full</Optimization> - <IntrinsicFunctions>true</IntrinsicFunctions> -- <AdditionalIncludeDirectories>..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir);</AdditionalIncludeDirectories> -+ <AdditionalIncludeDirectories>..\;..\..\;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories> - <PreprocessorDefinitions>NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> - <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName> -@@ -138,7 +138,7 @@ - <Link> - <GenerateDebugInformation>true</GenerateDebugInformation> - <LargeAddressAware>true</LargeAddressAware> -- <AdditionalDependencies>..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies)</AdditionalDependencies> -+ <AdditionalDependencies>@NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - <PostBuildEvent> - <Command>postbuild $(IntDir) DLL -@@ -153,7 +153,7 @@ - <ClCompile> - <Optimization>Disabled</Optimization> - <IntrinsicFunctions>true</IntrinsicFunctions> -- <AdditionalIncludeDirectories>..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir);</AdditionalIncludeDirectories> -+ <AdditionalIncludeDirectories>..\;..\..\;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName> -@@ -162,7 +162,7 @@ - <Link> - <GenerateDebugInformation>true</GenerateDebugInformation> - <LargeAddressAware>true</LargeAddressAware> -- <AdditionalDependencies>..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies)</AdditionalDependencies> -+ <AdditionalDependencies>@NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - <PostBuildEvent> - <Command>postbuild $(IntDir) DLL +diff --git a/build.vc14/dll_flint/dll_flint.vcxproj b/build.vc14/dll_flint/dll_flint.vcxproj
+index 3c8edd3..5c861d2 100644
+--- a/build.vc14/dll_flint/dll_flint.vcxproj
++++ b/build.vc14/dll_flint/dll_flint.vcxproj
+@@ -81,7 +81,7 @@
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+- <AdditionalIncludeDirectories>..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir);</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>..\;..\..\;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
+@@ -90,7 +90,7 @@
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <LargeAddressAware>true</LargeAddressAware>
+- <AdditionalDependencies>..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies)</AdditionalDependencies>
++ <AdditionalDependencies>@NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <PostBuildEvent>
+ <Command>postbuild $(IntDir) DLL
+@@ -105,7 +105,7 @@
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+- <AdditionalIncludeDirectories>..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir);</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>..\;..\..\;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
+@@ -114,7 +114,7 @@
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <LargeAddressAware>true</LargeAddressAware>
+- <AdditionalDependencies>..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies)</AdditionalDependencies>
++ <AdditionalDependencies>@NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <PostBuildEvent>
+ <Command>postbuild $(IntDir) DLL
+@@ -129,7 +129,7 @@
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+- <AdditionalIncludeDirectories>..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir);</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>..\;..\..\;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
+@@ -138,7 +138,7 @@
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <LargeAddressAware>true</LargeAddressAware>
+- <AdditionalDependencies>..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies)</AdditionalDependencies>
++ <AdditionalDependencies>@NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <PostBuildEvent>
+ <Command>postbuild $(IntDir) DLL
+@@ -153,7 +153,7 @@
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+- <AdditionalIncludeDirectories>..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir);</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>..\;..\..\;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
+@@ -162,7 +162,7 @@
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <LargeAddressAware>true</LargeAddressAware>
+- <AdditionalDependencies>..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies)</AdditionalDependencies>
++ <AdditionalDependencies>@NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <PostBuildEvent>
+ <Command>postbuild $(IntDir) DLL
diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index 7a82286dd..79e7804d5 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 5.3.0 +Version: 5.3.0-1 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index d36efcadc..228ed7651 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -6,7 +6,6 @@ vcpkg_from_github( SHA512 9ef0f3d328681253c1e1776576d54d67dec49c19fd7fc422ae63c3610b01a3f05f6e83cdf5e913dfd09bac42e52fe35c38ebe1ea91f4207d226a32aaf69eb4a8 HEAD_REF master ) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -14,7 +13,6 @@ vcpkg_configure_cmake( -DFMT_CMAKE_DIR=share/fmt -DFMT_TEST=OFF -DFMT_DOC=OFF - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index d5dd6754a..e780db110 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2019.01.28.00 +Version: 2019.01.28.00-1 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread Default-Features: zlib diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 72b3485ff..3c695cc99 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -76,6 +76,20 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH share/folly) +# Release folly-targets.cmake does not link to the right libraries in debug mode. +# We substitute with generator expressions so that the right libraries are linked for debug and release. +set(FOLLY_TARGETS_CMAKE "${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake") +FILE(READ ${FOLLY_TARGETS_CMAKE} _contents) +STRING(REPLACE +[[ +"Threads::Threads;Iphlpapi.lib;Ws2_32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_context-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_context-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_chrono-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_chrono-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_date_time-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_date_time-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_filesystem-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_filesystem-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_program_options-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_program_options-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_regex-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_regex-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_system-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_system-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_thread-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_thread-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_atomic-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_atomic-vc140-mt-gd.lib>;${_IMPORT_PREFIX}/lib/double-conversion.lib;${_IMPORT_PREFIX}/lib/ssleay32.lib;${_IMPORT_PREFIX}/lib/libeay32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/zlib.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/zlibd.lib>;gflags;glog::glog;event" +]] +[[ +"Threads::Threads;Iphlpapi.lib;Ws2_32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_context-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_context-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_chrono-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_chrono-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_date_time-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_date_time-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_filesystem-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_filesystem-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_program_options-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_program_options-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_regex-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_regex-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_system-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_system-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_thread-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_thread-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_atomic-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_atomic-vc140-mt-gd.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/double-conversion.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/double-conversion.lib>;${_IMPORT_PREFIX}/lib/ssleay32.lib;${_IMPORT_PREFIX}/lib/libeay32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/zlib.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/zlibd.lib>;gflags;glog::glog;event" +]] + _contents "${_contents}") +FILE(WRITE ${FOLLY_TARGETS_CMAKE} "${_contents}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright diff --git a/ports/fontconfig/CMakeLists.txt b/ports/fontconfig/CMakeLists.txt index 1c552468e..1692e7856 100644 --- a/ports/fontconfig/CMakeLists.txt +++ b/ports/fontconfig/CMakeLists.txt @@ -37,7 +37,11 @@ add_library(fontconfig src/fcxml.c src/ftglue.c) -set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__declspec(dllexport)") +if(WIN32) + set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__declspec(dllexport)") +else() + set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__attribute__((visibility(\"default\")))") +endif() target_include_directories(fontconfig PRIVATE . ${FC_INCLUDE_DIR}/alias diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index 536661659..5d75462c5 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -1,4 +1,4 @@ Source: fontconfig
-Version: 2.12.4-7
+Version: 2.12.4-8
Description: Library for configuring and customizing font access.
Build-Depends: freetype, expat, libiconv, dirent
diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index fff6eb477..4637f112c 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -36,7 +36,11 @@ vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
foreach(HEADER fcfreetype.h fontconfig.h)
file(READ ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} FC_HEADER)
- string(REPLACE "#define FcPublic" "#define FcPublic __declspec(dllimport)" FC_HEADER "${FC_HEADER}")
+ if(WIN32)
+ string(REPLACE "#define FcPublic" "#define FcPublic __declspec(dllimport)" FC_HEADER "${FC_HEADER}")
+ else()
+ string(REPLACE "#define FcPublic" "#define FcPublic __attribute__((visibility(\"default\")))" FC_HEADER "${FC_HEADER}")
+ endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} "${FC_HEADER}")
endforeach()
endif()
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/freeimage/CONTROL b/ports/freeimage/CONTROL index 5497b0fa3..51ebbbc69 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,4 +1,4 @@ Source: freeimage -Version: 3.18.0-3 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr +Version: 3.18.0-5 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp[all], libraw, jxrlib, openexr Description: Support library for graphics image formats diff --git a/ports/freeimage/use-external-libtiff.patch b/ports/freeimage/use-external-libtiff.patch index f2ddd9ba6..23d5dfd1d 100644 --- a/ports/freeimage/use-external-libtiff.patch +++ b/ports/freeimage/use-external-libtiff.patch @@ -1,8 +1,8 @@ diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp -index 1b45453..562fdd7 100644 +index 5068d94..8947b03 100644 --- a/Source/FreeImage/PluginTIFF.cpp +++ b/Source/FreeImage/PluginTIFF.cpp -@@ -37,7 +37,7 @@ +@@ -37,9 +37,9 @@ #include "FreeImage.h" #include "Utilities.h" @@ -11,6 +11,36 @@ index 1b45453..562fdd7 100644 #include "../Metadata/FreeImageTag.h" #include "../OpenEXR/Half/half.h" + #include "FreeImageIO.h" + #include "PSDParser.h" +@@ -199,15 +199,18 @@ Open a TIFF file for reading or writing + @param name + @param mode + */ ++/* + TIFF* + TIFFOpen(const char* name, const char* mode) { + return 0; + } ++*/ + + // ---------------------------------------------------------- + // TIFF library FreeImage-specific routines. + // ---------------------------------------------------------- + ++/* + void* + _TIFFmalloc(tmsize_t s) { + return malloc(s); +@@ -245,6 +248,7 @@ int + _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) { + return (memcmp(p1, p2, (size_t) c)); + } ++*/ + + // ---------------------------------------------------------- + // in FreeImage warnings and errors are disabled + diff --git a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp index d5be902..8dbcd5d 100644 --- a/Source/Metadata/XTIFF.cpp diff --git a/ports/freeopcua/CONTROL b/ports/freeopcua/CONTROL new file mode 100644 index 000000000..b6d20b57a --- /dev/null +++ b/ports/freeopcua/CONTROL @@ -0,0 +1,4 @@ +Source: freeopcua +Version: 20190125-1 +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..f818eab35 --- /dev/null +++ b/ports/freeopcua/cmakelists_fixes.patch @@ -0,0 +1,238 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index de03564..df3fcf6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,8 @@ + cmake_minimum_required(VERSION 2.8) + +-#It seems Cmake does not set default bild type so we force it +-if( NOT CMAKE_BUILD_TYPE ) +- set( CMAKE_BUILD_TYPE Debug CACHE STRING "Debug" FORCE ) +-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 +13,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 +35,9 @@ 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) ++ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + endif() + + if(WIN32) +@@ -105,7 +66,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,14 +146,12 @@ 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 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + generate_pkgconfig("libopcuaprotocol.pc") + +@@ -227,10 +186,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,15 +221,12 @@ 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 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + generate_pkgconfig("libopcuacore.pc") + +@@ -306,7 +258,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 -DDYNAMIC_ADDON_PATH="${DYNAMIC_ADDON_PATH}" -DTEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}" ) + endif () + + add_test(NAME opcuacore COMMAND test_opcuacore) +@@ -327,9 +279,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} +@@ -338,8 +287,9 @@ if (BUILD_CLIENT) + + target_include_directories(opcuaclient PUBLIC $<INSTALL_INTERFACE:include>) + install(TARGETS opcuaclient EXPORT FreeOpcUa ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + generate_pkgconfig("libopcuaclient.pc") + +@@ -371,9 +321,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,14 +370,12 @@ 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 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + generate_pkgconfig("libopcuaserver.pc") + +@@ -481,7 +426,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 -DTEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}") + endif () + + add_test(NAME opcuaserverapp COMMAND test_opcuaserver) +@@ -510,9 +455,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 +475,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 +494,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,8 +508,8 @@ 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") ++SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "freeopcua") + INCLUDE(CPack) 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..981dd9383 --- /dev/null +++ b/ports/freeopcua/portfile.cmake @@ -0,0 +1,34 @@ +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 + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +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/freetype/0005-Fix-DLL-EXPORTS.patch b/ports/freetype/0005-Fix-DLL-EXPORTS.patch new file mode 100644 index 000000000..96abaffb7 --- /dev/null +++ b/ports/freetype/0005-Fix-DLL-EXPORTS.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dd8a878..75f9ab7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,7 +141,7 @@ set(VERSION_PATCH "1") + # Increment REVISION. + set(LIBRARY_VERSION "6.16.0") + set(LIBRARY_SOVERSION "6") +- ++ADD_DEFINITIONS(-DDLL_EXPORT) + # These options mean "require x and complain if not found". They'll get + # optionally found anyway. Use `-DCMAKE_DISABLE_FIND_PACKAGE_x=TRUE` to disable + # searching for a packge entirely (x is the CMake package name, so "BZip2" diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index ace5a062d..73cb6b317 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -6,7 +6,9 @@ vcpkg_download_distfile(ARCHIVE FILENAME "freetype-${FT_VERSION}.tar.bz2" SHA512 856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708 ) -vcpkg_extract_source_archive_ex( + +if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") + vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${FT_VERSION} @@ -15,7 +17,20 @@ vcpkg_extract_source_archive_ex( 0002-Add-CONFIG_INSTALL_PATH-option.patch 0003-Fix-UWP.patch 0004-Fix-DLL-install.patch -) + ) +else() + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${FT_VERSION} + PATCHES + 0001-Fix-install-command.patch + 0002-Add-CONFIG_INSTALL_PATH-option.patch + 0003-Fix-UWP.patch + 0004-Fix-DLL-install.patch + 0005-Fix-DLL-EXPORTS.patch + ) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -26,6 +41,7 @@ vcpkg_configure_cmake( -DFT_WITH_BZIP2=ON -DFT_WITH_PNG=ON -DFT_WITH_HARFBUZZ=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE ) vcpkg_install_cmake() diff --git a/ports/fribidi/CONTROL b/ports/fribidi/CONTROL index 65e9a2248..098748ee8 100644 --- a/ports/fribidi/CONTROL +++ b/ports/fribidi/CONTROL @@ -1,3 +1,3 @@ Source: fribidi
-Version: 1.0.5
+Version: 58c6cb3
Description: GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi)
diff --git a/ports/fribidi/portfile.cmake b/ports/fribidi/portfile.cmake index d366b89ef..ec5dc1553 100644 --- a/ports/fribidi/portfile.cmake +++ b/ports/fribidi/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fribidi/fribidi
- REF v1.0.5
- SHA512 c51b67cc3e7610bef9a66f2456f7602fe010164c2c01e7d91026cefa4a08fdce5165b6eb3814e76cd89e766356fb71adc08bf75d9b2f5802f71c18b5d0476887
+ REF 58c6cb390a9a18c98b2cbaac555d8ea9352a9e4f
+ SHA512 1ec9c19faa87886786ce1589e2c66cab173b48e34d0e43487becc8606001f21f6ed17d0abd1c322fbbcaeb96a47ed882cad228be2e9beb019020ca2a475fc298
HEAD_REF master)
vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH}
@@ -23,5 +23,9 @@ if (EXE_FILES) file(REMOVE ${EXE_FILES})
endif()
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fribidi RENAME copyright)
\ No newline at end of file diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL index cdad4d19a..57999aece 100644 --- a/ports/g2o/CONTROL +++ b/ports/g2o/CONTROL @@ -1,4 +1,4 @@ Source: g2o -Version: 20170730_git-3 +Version: 20170730_git-4 Build-Depends: suitesparse, eigen3, clapack, ceres Description: g2o: A General Framework for Graph Optimization http://openslam.org/g2o.html diff --git a/ports/g2o/portfile.cmake b/ports/g2o/portfile.cmake index ba8186789..6d09b8a8c 100644 --- a/ports/g2o/portfile.cmake +++ b/ports/g2o/portfile.cmake @@ -23,6 +23,10 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() +if(VCPKG_USE_HEAD_VERSION) + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/g2o") +endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(GLOB_RECURSE HEADERS "${CURRENT_PACKAGES_DIR}/include/*") foreach(HEADER ${HEADERS}) diff --git a/ports/gdal/0001-Fix-debug-crt-flags.patch b/ports/gdal/0001-Fix-debug-crt-flags.patch index aab3d40ca..266fc4355 100644 --- a/ports/gdal/0001-Fix-debug-crt-flags.patch +++ b/ports/gdal/0001-Fix-debug-crt-flags.patch @@ -1,9 +1,6 @@ -diff -Nuar a/nmake.opt b/nmake.opt ---- a/nmake.opt 2018-05-04 09:05:46.000000000 +0200 -+++ b/nmake.opt 2018-05-11 22:58:39.387603800 +0200 -@@ -124,11 +124,21 @@ - CXX_PDB_FLAGS= - !ENDIF +--- a/nmake.opt Fri Dec 14 22:34:20 2018 ++++ b/nmake.opt Wed Mar 27 11:00:00 2019 +@@ -133,7 +133,17 @@ +# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) +# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well @@ -16,12 +13,10 @@ diff -Nuar a/nmake.opt b/nmake.opt +!ENDIF + !IFNDEF OPTFLAGS - !IFNDEF DEBUG + !IF "$(DEBUG)" == "0" -OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG +OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG !ELSE -OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG +OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG !ENDIF - !ENDIF # OPTFLAGS - diff --git a/ports/gdal/0002-Fix-static-build.patch b/ports/gdal/0002-Fix-static-build.patch new file mode 100644 index 000000000..d440ceff8 --- /dev/null +++ b/ports/gdal/0002-Fix-static-build.patch @@ -0,0 +1,27 @@ +--- a/makefile.vc Fri Dec 14 22:34:20 2018
++++ b/makefile.vc Wed Mar 27 11:00:00 2019
+@@ -60,3 +60,3 @@
+
+-default: $(TARGET_LIB) $(PLUGIN_TARGET) apps_dir
++default: $(TARGET_LIB) $(PLUGIN_TARGET)
+
+@@ -227,4 +227,2 @@
+ $(MAKE) /f makefile.vc plugins-install
+- cd ..\apps
+- $(MAKE) /f makefile.vc install
+ cd ..
+@@ -232,8 +230,2 @@
+ $(INSTALL) LICENSE.TXT $(DATADIR)
+-!IFDEF HTMLDIR
+- -mkdir $(HTMLDIR)
+- cd frmts
+- $(MAKE) /f makefile.vc html-install
+- cd ..
+-!ENDIF
+ !IFDEF INCLUDE_OGR_FRMTS
+@@ -241,5 +233,2 @@
+ $(MAKE) /f makefile.vc plugins-install
+-!IFDEF HTMLDIR
+- $(MAKE) /f makefile.vc html-install
+-!ENDIF
+ cd ..\..
diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 0814046f5..a5c79363a 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,5 +1,5 @@ Source: gdal -Version: 2.4.0 +Version: 2.4.0-2 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5 diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index d1ae296af..8c0c9a04d 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -11,9 +11,7 @@ if (TRIPLET_SYSTEM_ARCH MATCHES "arm") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(FATAL_ERROR "GDAL's nmake buildsystem does not support building static libraries") -elseif(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "GDAL's nmake buildsystem does not support static crt linkage") + list(APPEND NMAKE_OPTIONS "DLLBUILD=0") endif() include(vcpkg_common_functions) @@ -39,13 +37,23 @@ endif() foreach(BUILD_TYPE IN LISTS BUILD_TYPES) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch - ) + if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-static-build.patch + ) + else() + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch + ) + endif() endforeach() + find_program(NMAKE nmake REQUIRED) file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) @@ -64,8 +72,13 @@ file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" PNG_LIBRA # Setup geos libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOS_INCLUDE_DIR) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" GEOS_LIBRARY_REL) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" GEOS_LIBRARY_DBG) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libgeos.lib" GEOS_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libgeosd.lib" GEOS_LIBRARY_DBG) +else() + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" GEOS_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" GEOS_LIBRARY_DBG) +endif() # Setup expat libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" EXPAT_INCLUDE_DIR) @@ -155,6 +168,7 @@ endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL static) list(APPEND NMAKE_OPTIONS PROJ_FLAGS=-DPROJ_STATIC) + list(APPEND NMAKE_OPTIONS CURL_CFLAGS=-DCURL_STATICLIB) else() # Enables PDBs for release and debug builds list(APPEND NMAKE_OPTIONS WITH_PDB=1) @@ -175,11 +189,14 @@ list(APPEND NMAKE_OPTIONS_REL EXPAT_LIB=${EXPAT_LIBRARY_REL} "CURL_LIB=${CURL_LIBRARY_REL} wsock32.lib wldap32.lib winmm.lib" SQLITE_LIB=${SQLITE_LIBRARY_REL} - PG_LIB=${PGSQL_LIBRARY_REL} OPENJPEG_LIB=${OPENJPEG_LIBRARY_REL} WEBP_LIBS=${WEBP_LIBRARY_REL} LIBXML2_LIB=${XML2_LIBRARY_REL} ) +if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Static Build does not like PG_LIB + list(APPEND NMAKE_OPTIONS_REL PG_LIB=${PGSQL_LIBRARY_REL}) +endif() list(APPEND NMAKE_OPTIONS_DBG ${NMAKE_OPTIONS} @@ -190,12 +207,15 @@ list(APPEND NMAKE_OPTIONS_DBG EXPAT_LIB=${EXPAT_LIBRARY_DBG} "CURL_LIB=${CURL_LIBRARY_DBG} wsock32.lib wldap32.lib winmm.lib" SQLITE_LIB=${SQLITE_LIBRARY_DBG} - PG_LIB=${PGSQL_LIBRARY_DBG} OPENJPEG_LIB=${OPENJPEG_LIBRARY_DBG} WEBP_LIBS=${WEBP_LIBRARY_DBG} LIBXML2_LIB=${XML2_LIBRARY_DBG} DEBUG=1 ) +if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Static Build does not like PG_LIB + list(APPEND NMAKE_OPTIONS_DBG PG_LIB=${PGSQL_LIBRARY_DBG}) +endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") ################ @@ -226,7 +246,10 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") endif() message(STATUS "Packaging ${TARGET_TRIPLET}") -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gdal/html) + +if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gdal/html) +endif() vcpkg_execute_required_process( COMMAND ${NMAKE} -f makefile.vc @@ -249,9 +272,17 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) endif() + else() - file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) - file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) + + set(GDAL_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/gdal) + file(MAKE_DIRECTORY ${GDAL_TOOL_PATH}) + + file(GLOB GDAL_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(COPY ${GDAL_TOOLS} DESTINATION ${GDAL_TOOL_PATH}) + file(REMOVE_RECURSE ${GDAL_TOOLS}) + + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) 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/giflib/CMakeLists.txt b/ports/giflib/CMakeLists.txt index e9b6a17c6..a5b084ffc 100644 --- a/ports/giflib/CMakeLists.txt +++ b/ports/giflib/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.4) -project(giflib) +project(giflib C) set(GIFLIB_HEADERS lib/gif_lib.h @@ -17,10 +17,8 @@ set(GIFLIB_SOURCES lib/quantize.c ) +add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_library(gif ${GIFLIB_SOURCES}) -if (BUILD_SHARED_LIBS) - set_property(TARGET gif PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif () if (NOT GIFLIB_SKIP_HEADERS) install(FILES ${GIFLIB_HEADERS} DESTINATION include) diff --git a/ports/giflib/CONTROL b/ports/giflib/CONTROL index a79a8b0d4..169ddbd92 100644 --- a/ports/giflib/CONTROL +++ b/ports/giflib/CONTROL @@ -1,3 +1,3 @@ Source: giflib -Version: 5.1.4-1 +Version: 5.1.4-3 Description: A library for reading and writing gif images. diff --git a/ports/giflib/fix-compile-error.patch b/ports/giflib/fix-compile-error.patch new file mode 100644 index 000000000..93cf467ff --- /dev/null +++ b/ports/giflib/fix-compile-error.patch @@ -0,0 +1,76 @@ +diff --git a/lib/dgif_lib.c b/lib/dgif_lib.c +index fddc0d2..7a6ab9c 100644 +--- a/lib/dgif_lib.c ++++ b/lib/dgif_lib.c +@@ -54,7 +54,7 @@ DGifOpenFileName(const char *FileName, int *Error) + int FileHandle; + GifFileType *GifFile; + +- if ((FileHandle = open(FileName, O_RDONLY)) == -1) { ++ if ((FileHandle = _open(FileName, O_RDONLY)) == -1) { + if (Error != NULL) + *Error = D_GIF_ERR_OPEN_FAILED; + return NULL; +@@ -81,7 +81,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + if (GifFile == NULL) { + if (Error != NULL) + *Error = D_GIF_ERR_NOT_ENOUGH_MEM; +- (void)close(FileHandle); ++ (void)_close(FileHandle); + return NULL; + } + +@@ -95,7 +95,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + if (Private == NULL) { + if (Error != NULL) + *Error = D_GIF_ERR_NOT_ENOUGH_MEM; +- (void)close(FileHandle); ++ (void)_close(FileHandle); + free((char *)GifFile); + return NULL; + } +@@ -106,7 +106,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ + #endif /* _WIN32 */ + +- f = fdopen(FileHandle, "rb"); /* Make it into a stream: */ ++ f = _fdopen(FileHandle, "rb"); /* Make it into a stream: */ + + /*@-mustfreeonly@*/ + GifFile->Private = (void *)Private; +diff --git a/lib/egif_lib.c b/lib/egif_lib.c +index f30b61b..18dc4a2 100644 +--- a/lib/egif_lib.c ++++ b/lib/egif_lib.c +@@ -60,10 +60,10 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) + GifFileType *GifFile; + + if (TestExistence) +- FileHandle = open(FileName, O_WRONLY | O_CREAT | O_EXCL, ++ FileHandle = _open(FileName, O_WRONLY | O_CREAT | O_EXCL, + S_IREAD | S_IWRITE); + else +- FileHandle = open(FileName, O_WRONLY | O_CREAT | O_TRUNC, ++ FileHandle = _open(FileName, O_WRONLY | O_CREAT | O_TRUNC, + S_IREAD | S_IWRITE); + + if (FileHandle == -1) { +@@ -73,7 +73,7 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) + } + GifFile = EGifOpenFileHandle(FileHandle, Error); + if (GifFile == (GifFileType *) NULL) +- (void)close(FileHandle); ++ (void)_close(FileHandle); + return GifFile; + } + +@@ -118,7 +118,7 @@ EGifOpenFileHandle(const int FileHandle, int *Error) + _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ + #endif /* _WIN32 */ + +- f = fdopen(FileHandle, "wb"); /* Make it into a stream: */ ++ f = _fdopen(FileHandle, "wb"); /* Make it into a stream: */ + + GifFile->Private = (void *)Private; + Private->FileHandle = FileHandle; + diff --git a/ports/giflib/portfile.cmake b/ports/giflib/portfile.cmake index ee7f96449..aeca810ed 100644 --- a/ports/giflib/portfile.cmake +++ b/ports/giflib/portfile.cmake @@ -1,21 +1,28 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/giflib-5.1.4) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(GIFLIB_VERSION 5.1.4) vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/sourceforge/giflib/giflib-5.1.4.tar.bz2" - FILENAME "giflib-5.1.4.tar.bz2" + URLS "http://downloads.sourceforge.net/sourceforge/giflib/giflib-${GIFLIB_VERSION}.tar.bz2" + FILENAME "giflib-${GIFLIB_VERSION}.tar.bz2" SHA512 32b5e342056c210e6478e9cb3b6ceec9594dcfaf34feea1eb4dad633a081ed4465bceee578c19165907cb47cb83912ac359ceea666a8e07dbbb5420f9928f96d ) -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GIFLIB_VERSION} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/msvc-guard-unistd-h.patch + msvc-guard-unistd-h.patch + fix-compile-error.patch ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DGIFLIB_SKIP_HEADERS=ON ) diff --git a/ports/glbinding/CONTROL b/ports/glbinding/CONTROL index 9671eda4b..f63cec773 100644 --- a/ports/glbinding/CONTROL +++ b/ports/glbinding/CONTROL @@ -1,3 +1,3 @@ Source: glbinding -Version: 3.0.2-4 +Version: 3.0.2-5 Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index d7a896723..e645e5021 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -22,10 +22,32 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding/cmake/glbinding TARGET_PATH share/glbinding/cmake/glbinding) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding/cmake/glbinding-aux TARGET_PATH share/glbinding/cmake/glbinding-aux) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding/cmake) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-config.cmake "include(\${CMAKE_CURRENT_LIST_DIR}/cmake/glbinding/glbinding-export.cmake)\ninclude(\${CMAKE_CURRENT_LIST_DIR}/cmake/glbinding-aux/glbinding-aux-export.cmake)\nset(glbinding_FOUND TRUE)\n") +# _IMPORT_PREFIX needs to go up one extra level in the directory tree. +# These files should be modified. +# /share/glbinding/glbinding-export.cmake +# /share/glbinding-aux/glbinding-aux-export.cmake +file(GLOB_RECURSE TARGET_CMAKES "${CURRENT_PACKAGES_DIR}/*-export.cmake") +foreach(TARGET_CMAKE IN LISTS TARGET_CMAKES) + file(READ ${TARGET_CMAKE} _contents) + string(REPLACE +[[ +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +]] +[[ +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +]] + _contents "${_contents}") + file(WRITE ${TARGET_CMAKE} "${_contents}") +endforeach() + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-config.cmake "include(\${CMAKE_CURRENT_LIST_DIR}/glbinding/glbinding-export.cmake)\ninclude(\${CMAKE_CURRENT_LIST_DIR}/glbinding-aux/glbinding-aux-export.cmake)\nset(glbinding_FOUND TRUE)\n") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright diff --git a/ports/glew/CONTROL b/ports/glew/CONTROL index ecf948c5d..54b2d09df 100644 --- a/ports/glew/CONTROL +++ b/ports/glew/CONTROL @@ -1,3 +1,3 @@ -Source: glew -Version: 2.1.0-1 -Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. +Source: glew
+Version: 2.1.0-3
+Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.
diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index 45f711f77..9b982db7f 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -3,7 +3,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew/glew-2.1.0) # Don't change to vcpkg_from_github! The github-auto-generated archives are missing some files. -# More info: https://github.com/nigels-com/glew/issues/31 +# More info: https://github.com/nigels-com/glew/issues/31 and https://github.com/nigels-com/glew/issues/13 vcpkg_download_distfile(ARCHIVE_FILE URLS "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz" FILENAME "glew-2.1.0.tgz" @@ -13,7 +13,10 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/glew) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/build/cmake -) + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_UTILS=OFF + ) vcpkg_install_cmake() @@ -40,11 +43,6 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib) endif() -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/glewinfo.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/visualinfo.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/glewinfo.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/visualinfo.exe) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) diff --git a/ports/gli/CONTROL b/ports/gli/CONTROL index b8edac798..521a79120 100644 --- a/ports/gli/CONTROL +++ b/ports/gli/CONTROL @@ -1,4 +1,4 @@ Source: gli -Version: 0.8.2-1 +Version: dd17acf Build-Depends: glm Description: OpenGL Image (GLI) https://gli.g-truc.net diff --git a/ports/gli/portfile.cmake b/ports/gli/portfile.cmake index 305233619..beae5e530 100644 --- a/ports/gli/portfile.cmake +++ b/ports/gli/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/gli - REF 0.8.2.0 - SHA512 c254a4e1497d0add985e4a882c552db99c512cc0e9cc72145d51a6e7deada817d624d9818099a47136a8a3ef1223a26a34e355e3c713166f0bb062e506059834 + REF dd17acf9cc7fc6e6abe9f9ec69949eeeee1ccd82 + SHA512 9e3a4ab9ee73d5c271b8346cf81339cd3cd0c20d20991524b816313b6a99e8d3a01863316a38cf1a52ef9c5b31d689ecccf6248b12d1d270460c048bf904650b HEAD_REF master ) diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt index debfd8dd5..6e9e62a4f 100644 --- a/ports/glib/CMakeLists.txt +++ b/ports/glib/CMakeLists.txt @@ -71,13 +71,25 @@ else() set(ENV{MSGFMT} "/bin/echo") set(ENV{GMSGFMT} "/bin/echo") if(NOT EXISTS "${CMAKE_BINARY_DIR}/config/config.h") + string(TOUPPER UPPER_CONFIG "${CMAKE_BUILD_TYPE}") + set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CONFIG}} -I${PCRE_INCLUDE_DIR}") + set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPER_CONFIG}} -I${PCRE_INCLUDE_DIR}") + if(BUILD_SHARED_LIBS) + set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${UPPER_CONFIG}} -L${LIB_DIR}") + else() + set(LDFLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${UPPER_CONFIG}} -L${LIB_DIR}") + endif() + + string(STRIP "${CXXFLAGS}" CXXFLAGS) + string(STRIP "${CFLAGS}" CFLAGS) + string(STRIP "${LDFLAGS}" LDFLAGS) execute_process( COMMAND "${CMAKE_SOURCE_DIR}/configure" --disable-libelf --disable-libmount - "CPPFLAGS=-I${PCRE_INCLUDE_DIR}" - "CFLAGS=-I${PCRE_INCLUDE_DIR}" - "LDFLAGS=-L${LIB_DIR}" + "CPPFLAGS=${CXXFLAGS}" + "CFLAGS=${CFLAGS}" + "LDFLAGS=${LDFLAGS}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config RESULT_VARIABLE res ) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index 0e04397f8..7d5b3857b 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,4 +1,4 @@ Source: glib -Version: 2.52.3-11 +Version: 2.52.3-13 Description: Portable, general-purpose utility library. Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index 96baa9b3e..b1ffc863d 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -16,17 +16,18 @@ endif() include(vcpkg_common_functions) set(GLIB_VERSION 2.52.3) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glib-${GLIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.52/glib-${GLIB_VERSION}.tar.xz" FILENAME "glib-${GLIB_VERSION}.tar.xz" SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GLIB_VERSION} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/use-libiconv-on-windows.patch) + use-libiconv-on-windows.patch +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) diff --git a/ports/glslang/CMakeLists-targets.patch b/ports/glslang/CMakeLists-targets.patch new file mode 100644 index 000000000..73661fa35 --- /dev/null +++ b/ports/glslang/CMakeLists-targets.patch @@ -0,0 +1,133 @@ +diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake +index 2097881..f0cddd7 100644 +--- a/ChooseMSVCCRT.cmake ++++ b/ChooseMSVCCRT.cmake +@@ -102,4 +102,4 @@ set(MSVC_CRT + MT + MTd) + +-choose_msvc_crt(MSVC_CRT) ++# choose_msvc_crt(MSVC_CRT) +diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt +index 5bb3f0e..e7be6e6 100644 +--- a/OGLCompilersDLL/CMakeLists.txt ++++ b/OGLCompilersDLL/CMakeLists.txt +@@ -9,6 +9,12 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OGLCompiler +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS OGLCompiler EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ export(TARGETS OGLCompiler ++ NAMESPACE glslang:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/OGLCompiler-config.cmake" ++ ) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt +index b682419..3a10f1a 100755 +--- a/SPIRV/CMakeLists.txt ++++ b/SPIRV/CMakeLists.txt +@@ -64,8 +64,14 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS SPIRV SPVRemapper +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS SPIRV EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ export(TARGETS SPIRV ++ NAMESPACE glslang:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake" ++ ) + + install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt +index 7a50ab6..b70345e 100644 +--- a/glslang/CMakeLists.txt ++++ b/glslang/CMakeLists.txt +@@ -97,8 +97,19 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS glslang +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS glslang EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ export(TARGETS glslang ++ NAMESPACE glslang:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake" ++ ) ++ install( ++ EXPORT glslangConfig ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang" ++ NAMESPACE glslang:: ++ ) + endif(ENABLE_GLSLANG_INSTALL) + + if(ENABLE_GLSLANG_INSTALL) +diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt +index 1bf49e1..edd733c 100644 +--- a/glslang/OSDependent/Unix/CMakeLists.txt ++++ b/glslang/OSDependent/Unix/CMakeLists.txt +@@ -3,6 +3,12 @@ set_property(TARGET OSDependent PROPERTY FOLDER glslang) + set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OSDependent +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS OSDependent EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ export(TARGETS OSDependent ++ NAMESPACE glslang:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake" ++ ) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt +index f257418..cadd70d 100644 +--- a/glslang/OSDependent/Windows/CMakeLists.txt ++++ b/glslang/OSDependent/Windows/CMakeLists.txt +@@ -15,6 +15,12 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OSDependent +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS OSDependent EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ export(TARGETS OSDependent ++ NAMESPACE glslang:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake" ++ ) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt +index 98dfad7..94d96a0 100755 +--- a/hlsl/CMakeLists.txt ++++ b/hlsl/CMakeLists.txt +@@ -26,6 +26,12 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS HLSL +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS HLSL EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ export(TARGETS HLSL ++ NAMESPACE glslang:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/HLSL-config.cmake" ++ ) + endif(ENABLE_GLSLANG_INSTALL) diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index c92482843..8f6bb6de9 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 2018-03-02-1 +Version: 2018-03-02-2 Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index b7cbdb98e..77e15052d 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -8,19 +8,26 @@ vcpkg_from_github( REF b5b5f918c6b72d7cf2ee73641cc6c6ddb211ca70 SHA512 ec0f7a23fa60457a481c7b3acf4c127c3bf898d23655d346aeafb304f74e798d632c83d676873f2c764d241de6dc4392cff8d6ce0ee509a4b74ee2233b01c008 HEAD_REF master + PATCHES + CMakeLists-targets.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DCMAKE_DEBUG_POSTFIX=d + OPTIONS -DCMAKE_DEBUG_POSTFIX=d -DSKIP_GLSLANG_INSTALL=OFF ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets() + file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") # Handle copyright file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glslang) + +vcpkg_test_cmake(PACKAGE_NAME glslang) diff --git a/ports/google-cloud-cpp/CONTROL b/ports/google-cloud-cpp/CONTROL index 195d3d6f5..006b8fe2b 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.8.0-1
+Build-Depends: grpc, curl[ssl], crc32c
Description: C++ Client Libraries for Google Cloud Platform APIs.
diff --git a/ports/google-cloud-cpp/cmake-libcurl-find-config.patch b/ports/google-cloud-cpp/cmake-libcurl-find-config.patch new file mode 100644 index 000000000..0c1d6dd6f --- /dev/null +++ b/ports/google-cloud-cpp/cmake-libcurl-find-config.patch @@ -0,0 +1,142 @@ +diff --git a/cmake/IncludeCurl.cmake b/cmake/IncludeCurl.cmake +index 6ea7ca3e6..3c2db6b28 100644 +--- a/cmake/IncludeCurl.cmake ++++ b/cmake/IncludeCurl.cmake +@@ -34,49 +34,57 @@ set_property(CACHE GOOGLE_CLOUD_CPP_CURL_PROVIDER + if ("${GOOGLE_CLOUD_CPP_CURL_PROVIDER}" STREQUAL "external") + include(external/curl) + elseif("${GOOGLE_CLOUD_CPP_CURL_PROVIDER}" STREQUAL "package") +- # Search for libcurl, in CMake 3.5 this does not define a target, but it +- # will in 3.12 (see https://cmake.org/cmake/help/git- +- # stage/module/FindCURL.html for details). Until then, define the target +- # ourselves if it is missing. +- find_package(CURL REQUIRED) +- if (NOT TARGET CURL::libcurl) +- add_library(CURL::libcurl UNKNOWN IMPORTED) +- set_property(TARGET CURL::libcurl +- APPEND +- PROPERTY INTERFACE_INCLUDE_DIRECTORIES +- "${CURL_INCLUDE_DIR}") +- set_property(TARGET CURL::libcurl +- APPEND +- PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}") +- endif () +- # If the library is static, we need to explicitly link its dependencies. +- # However, we should not do so for shared libraries, because the version of +- # OpenSSL (for example) found by find_package() may be newer than the +- # version linked against libcurl. +- if ("${CURL_LIBRARY}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$") +- find_package(OpenSSL REQUIRED) +- find_package(ZLIB REQUIRED) +- set_property(TARGET CURL::libcurl +- APPEND +- PROPERTY INTERFACE_LINK_LIBRARIES +- OpenSSL::SSL +- OpenSSL::Crypto +- ZLIB::ZLIB) +- message(STATUS "CURL linkage will be static") +- if (WIN32) ++ # Search for libcurl, first using CONFIG mode, and retrying ++ # using MODULE mode if that fails ++ find_package(CURL CONFIG QUIET) # Deliberately quiet, so we can handle the result ++ if(CURL_FOUND) ++ message(STATUS "CURL library found via CONFIG mode") ++ else() ++ # CONFIG mode failed - fallback to MODULE mode ++ # In CMake 3.5 this does not define a target, but it ++ # will in 3.12 (see https://cmake.org/cmake/help/git- ++ # stage/module/FindCURL.html for details). Until then, define the target ++ # ourselves if it is missing. ++ find_package(CURL MODULE REQUIRED) # Use REQUIRED the second time to fail out ++ if (NOT TARGET CURL::libcurl) ++ add_library(CURL::libcurl UNKNOWN IMPORTED) + set_property(TARGET CURL::libcurl + APPEND +- PROPERTY INTERFACE_LINK_LIBRARIES +- crypt32 +- wsock32 +- ws2_32) ++ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ++ "${CURL_INCLUDE_DIR}") ++ set_property(TARGET CURL::libcurl ++ APPEND ++ PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}") + endif () +- if (APPLE) ++ # If the library is static, we need to explicitly link its dependencies. ++ # However, we should not do so for shared libraries, because the version of ++ # OpenSSL (for example) found by find_package() may be newer than the ++ # version linked against libcurl. ++ if ("${CURL_LIBRARY}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$") ++ find_package(OpenSSL REQUIRED) ++ find_package(ZLIB REQUIRED) + set_property(TARGET CURL::libcurl + APPEND +- PROPERTY INTERFACE_LINK_LIBRARIES ldap) ++ PROPERTY INTERFACE_LINK_LIBRARIES ++ OpenSSL::SSL ++ OpenSSL::Crypto ++ ZLIB::ZLIB) ++ message(STATUS "CURL linkage will be static") ++ if (WIN32) ++ set_property(TARGET CURL::libcurl ++ APPEND ++ PROPERTY INTERFACE_LINK_LIBRARIES ++ crypt32 ++ wsock32 ++ ws2_32) ++ endif () ++ if (APPLE) ++ set_property(TARGET CURL::libcurl ++ APPEND ++ PROPERTY INTERFACE_LINK_LIBRARIES ldap) ++ endif () ++ else() ++ message(STATUS "CURL linkage will be non-static") + endif () +- else() +- message(STATUS "CURL linkage will be non-static") + endif () + endif () +diff --git a/google/cloud/storage/config.cmake.in b/google/cloud/storage/config.cmake.in +index a4d261815..640089e09 100644 +--- a/google/cloud/storage/config.cmake.in ++++ b/google/cloud/storage/config.cmake.in +@@ -13,21 +13,25 @@ + # limitations under the License. + + include(CMakeFindDependencyMacro) +-find_dependency(CURL) ++# Search for libcurl, first using CONFIG mode, and retrying ++# using MODULE mode if that fails ++find_package(CURL CONFIG QUIET) # find_package so we can explicitly specify QUIET ++if(NOT CURL_FOUND) ++ find_dependency(CURL MODULE) ++ # Some versions of FindCURL do not define CURL::libcurl, so we define it ourselves. ++ if (NOT TARGET CURL::libcurl) ++ add_library(CURL::libcurl UNKNOWN IMPORTED) ++ set_property(TARGET CURL::libcurl ++ APPEND ++ PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}") ++ set_property(TARGET CURL::libcurl ++ APPEND ++ PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}") ++ endif () ++endif() + find_dependency(Crc32c) + find_dependency(google_cloud_cpp_common) + find_dependency(OpenSSL) + find_dependency(ZLIB) + +-# Some versions of FindCURL do not define CURL::libcurl, so we define it ourselves. +-if (NOT TARGET CURL::libcurl) +- add_library(CURL::libcurl UNKNOWN IMPORTED) +- set_property(TARGET CURL::libcurl +- APPEND +- PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}") +- set_property(TARGET CURL::libcurl +- APPEND +- PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}") +-endif () +- + include("${CMAKE_CURRENT_LIST_DIR}/storage-targets.cmake") diff --git a/ports/google-cloud-cpp/cmake-libcurl-target.patch b/ports/google-cloud-cpp/cmake-libcurl-target.patch new file mode 100644 index 000000000..97e66e69f --- /dev/null +++ b/ports/google-cloud-cpp/cmake-libcurl-target.patch @@ -0,0 +1,144 @@ +diff --git a/cmake/IncludeCurl.cmake b/cmake/IncludeCurl.cmake +index d3323e3b8..6ea7ca3e6 100644 +--- a/cmake/IncludeCurl.cmake ++++ b/cmake/IncludeCurl.cmake +@@ -39,13 +39,13 @@ elseif("${GOOGLE_CLOUD_CPP_CURL_PROVIDER}" STREQUAL "package") + # stage/module/FindCURL.html for details). Until then, define the target + # ourselves if it is missing. + find_package(CURL REQUIRED) +- if (NOT TARGET CURL::CURL) +- add_library(CURL::CURL UNKNOWN IMPORTED) +- set_property(TARGET CURL::CURL ++ if (NOT TARGET CURL::libcurl) ++ add_library(CURL::libcurl UNKNOWN IMPORTED) ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY INTERFACE_INCLUDE_DIRECTORIES + "${CURL_INCLUDE_DIR}") +- set_property(TARGET CURL::CURL ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}") + endif () +@@ -56,7 +56,7 @@ elseif("${GOOGLE_CLOUD_CPP_CURL_PROVIDER}" STREQUAL "package") + if ("${CURL_LIBRARY}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$") + find_package(OpenSSL REQUIRED) + find_package(ZLIB REQUIRED) +- set_property(TARGET CURL::CURL ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY INTERFACE_LINK_LIBRARIES + OpenSSL::SSL +@@ -64,7 +64,7 @@ elseif("${GOOGLE_CLOUD_CPP_CURL_PROVIDER}" STREQUAL "package") + ZLIB::ZLIB) + message(STATUS "CURL linkage will be static") + if (WIN32) +- set_property(TARGET CURL::CURL ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY INTERFACE_LINK_LIBRARIES + crypt32 +@@ -72,7 +72,7 @@ elseif("${GOOGLE_CLOUD_CPP_CURL_PROVIDER}" STREQUAL "package") + ws2_32) + endif () + if (APPLE) +- set_property(TARGET CURL::CURL ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY INTERFACE_LINK_LIBRARIES ldap) + endif () +diff --git a/cmake/external/curl.cmake b/cmake/external/curl.cmake +index 54753ada9..2a83e19df 100644 +--- a/cmake/external/curl.cmake ++++ b/cmake/external/curl.cmake +@@ -88,10 +88,10 @@ if (NOT TARGET curl_project) + endif () + + include(ExternalProjectHelper) +- add_library(CURL::CURL INTERFACE IMPORTED) +- add_dependencies(CURL::CURL curl_project) +- set_library_properties_for_external_project(CURL::CURL curl) +- set_property(TARGET CURL::CURL ++ add_library(CURL::libcurl INTERFACE IMPORTED) ++ add_dependencies(CURL::libcurl curl_project) ++ set_library_properties_for_external_project(CURL::libcurl curl) ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY INTERFACE_LINK_LIBRARIES + c-ares::cares +@@ -99,7 +99,7 @@ if (NOT TARGET curl_project) + OpenSSL::Crypto + ZLIB::ZLIB) + if (WIN32) +- set_property(TARGET CURL::CURL ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY INTERFACE_LINK_LIBRARIES + crypt32 +@@ -107,7 +107,7 @@ if (NOT TARGET curl_project) + ws2_32) + endif () + if (APPLE) +- set_property(TARGET CURL::CURL ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY INTERFACE_LINK_LIBRARIES ldap) + endif () +diff --git a/google/cloud/storage/CMakeLists.txt b/google/cloud/storage/CMakeLists.txt +index 1e750af8a..a0a04caab 100644 +--- a/google/cloud/storage/CMakeLists.txt ++++ b/google/cloud/storage/CMakeLists.txt +@@ -226,7 +226,7 @@ target_link_libraries(storage_client + PUBLIC google_cloud_cpp_common + nlohmann_json + Crc32c::crc32c +- CURL::CURL ++ CURL::libcurl + Threads::Threads + OpenSSL::SSL + OpenSSL::Crypto +@@ -396,7 +396,7 @@ if (BUILD_TESTING) + GTest::gmock_main + GTest::gmock + GTest::gtest +- CURL::CURL ++ CURL::libcurl + storage_common_options + nlohmann_json) + if (MSVC) +diff --git a/google/cloud/storage/config.cmake.in b/google/cloud/storage/config.cmake.in +index 660829ae4..a4d261815 100644 +--- a/google/cloud/storage/config.cmake.in ++++ b/google/cloud/storage/config.cmake.in +@@ -19,13 +19,13 @@ find_dependency(google_cloud_cpp_common) + find_dependency(OpenSSL) + find_dependency(ZLIB) + +-# Some versions of FindCURL do not define CURL::CURL, so we define it ourselves. +-if (NOT TARGET CURL::CURL) +- add_library(CURL::CURL UNKNOWN IMPORTED) +- set_property(TARGET CURL::CURL ++# Some versions of FindCURL do not define CURL::libcurl, so we define it ourselves. ++if (NOT TARGET CURL::libcurl) ++ add_library(CURL::libcurl UNKNOWN IMPORTED) ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}") +- set_property(TARGET CURL::CURL ++ set_property(TARGET CURL::libcurl + APPEND + PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}") + endif () +diff --git a/google/cloud/storage/tests/CMakeLists.txt b/google/cloud/storage/tests/CMakeLists.txt +index 9e5fb663d..987958396 100644 +--- a/google/cloud/storage/tests/CMakeLists.txt ++++ b/google/cloud/storage/tests/CMakeLists.txt +@@ -50,7 +50,7 @@ foreach (fname ${storage_client_integration_tests}) + GTest::gmock_main + GTest::gmock + GTest::gtest +- CURL::CURL ++ CURL::libcurl + Threads::Threads + nlohmann_json + storage_common_options) diff --git a/ports/google-cloud-cpp/portfile.cmake b/ports/google-cloud-cpp/portfile.cmake index 0f8b14d84..b227b3b53 100644 --- a/ports/google-cloud-cpp/portfile.cmake +++ b/ports/google-cloud-cpp/portfile.cmake @@ -5,22 +5,14 @@ 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.8.0 + SHA512 cdb527169c7badab395eb38ba554022a364a99b9cb32705bf69a9613cee74acc1e2402e00ffdcb740467e85603e617f73b01e557afeb1f2786872f8d60f3a75a HEAD_REF master + PATCHES + cmake-libcurl-target.patch # Not needed _after_ v0.8.0 + cmake-libcurl-find-config.patch ) -set(GOOGLEAPIS_VERSION 6a3277c0656219174ff7c345f31fb20a90b30b97) -vcpkg_download_distfile(GOOGLEAPIS - URLS "https://github.com/google/googleapis/archive/${GOOGLEAPIS_VERSION}.zip" - FILENAME "googleapis-${GOOGLEAPIS_VERSION}.zip" - SHA512 809b7cf0429df9867c8ab558857785e9d7d70aea033c6d588b60d29d2754001e9aea5fcdd8cae22fad8145226375bedbd1516d86af7d1e9731fffea331995ad9 -) - -file(REMOVE_RECURSE ${SOURCE_PATH}/third_party) -vcpkg_extract_source_archive(${GOOGLEAPIS} ${SOURCE_PATH}/third_party) -file(RENAME ${SOURCE_PATH}/third_party/googleapis-${GOOGLEAPIS_VERSION} ${SOURCE_PATH}/third_party/googleapis) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -35,6 +27,7 @@ vcpkg_install_cmake(ADD_BIN_TO_PATH) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/google-cloud-cpp RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 274faed53..f1b1d9798 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.18.0 +Version: 1.19.1 Build-Depends: zlib, openssl, protobuf, c-ares (!uwp) Description: An RPC library and framework diff --git a/ports/grpc/fix-uwp.patch b/ports/grpc/fix-uwp.patch index 81b79d1e0..1811fdf92 100644 --- a/ports/grpc/fix-uwp.patch +++ b/ports/grpc/fix-uwp.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b39e6f8..5d35293 100644
+index e1013dc561..b02d07ccba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,6 +90,9 @@ if(UNIX)
@@ -50,7 +50,7 @@ index b39e6f8..5d35293 100644 if (gRPC_BUILD_TESTS)
add_custom_target(buildtests_c)
add_dependencies(buildtests_c algorithm_test)
-@@ -3805,7 +3818,6 @@ foreach(_hdr
+@@ -3795,7 +3808,6 @@ foreach(_hdr
DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
)
endforeach()
@@ -58,7 +58,7 @@ index b39e6f8..5d35293 100644 if (gRPC_INSTALL)
-@@ -3815,6 +3827,7 @@ if (gRPC_INSTALL)
+@@ -3805,6 +3817,7 @@ if (gRPC_INSTALL)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
@@ -66,7 +66,7 @@ index b39e6f8..5d35293 100644 if (gRPC_BUILD_TESTS)
-@@ -3935,7 +3948,7 @@ foreach(_hdr
+@@ -3925,7 +3938,7 @@ foreach(_hdr
DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
)
endforeach()
@@ -75,7 +75,7 @@ index b39e6f8..5d35293 100644 if (gRPC_INSTALL)
-@@ -3945,6 +3958,7 @@ if (gRPC_INSTALL)
+@@ -3935,6 +3948,7 @@ if (gRPC_INSTALL)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
@@ -83,7 +83,7 @@ index b39e6f8..5d35293 100644 if (gRPC_BUILD_TESTS)
-@@ -4916,7 +4930,6 @@ foreach(_hdr
+@@ -4926,7 +4940,6 @@ foreach(_hdr
DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
)
endforeach()
@@ -91,7 +91,7 @@ index b39e6f8..5d35293 100644 if (gRPC_INSTALL)
-@@ -4926,6 +4939,7 @@ if (gRPC_INSTALL)
+@@ -4936,6 +4949,7 @@ if (gRPC_INSTALL)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
@@ -100,10 +100,10 @@ index b39e6f8..5d35293 100644 if (gRPC_BUILD_TESTS)
diff --git a/src/core/lib/iomgr/resource_quota.cc b/src/core/lib/iomgr/resource_quota.cc
-index 7e4b3c9..da67bde 100644
+index 61c366098e..aac2ce0a9f 100644
--- a/src/core/lib/iomgr/resource_quota.cc
+++ b/src/core/lib/iomgr/resource_quota.cc
-@@ -936,7 +936,7 @@ void grpc_resource_user_alloc(grpc_resource_user* resource_user, size_t size,
+@@ -937,7 +937,7 @@ void grpc_resource_user_alloc(grpc_resource_user* resource_user, size_t size,
void grpc_resource_user_free(grpc_resource_user* resource_user, size_t size) {
gpr_mu_lock(&resource_user->mu);
grpc_resource_quota* resource_quota = resource_user->resource_quota;
diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 492025ff3..355f9a179 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -11,8 +11,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.18.0 - SHA512 2489860a395b9f59d4eb81db5a8d873683e317145ad140b72fabb13693e166c122ce8526d34e2380a52d18493e8b2b49d6d28e53878af2c43523a5791da8fe52 + REF v1.19.1 + SHA512 4bb127d946fc16887fd4cf75215f0bc9f6d17dbd36fc4f1b191a64914f96c49dddb41f1b6c72fd24ea0a40f242b4398248f32fcb1fe9a764367be1c2edda9142 HEAD_REF master PATCHES fix-uwp.patch ) diff --git a/ports/gsoap/CONTROL b/ports/gsoap/CONTROL index 2da6f0409..ae1d1625b 100644 --- a/ports/gsoap/CONTROL +++ b/ports/gsoap/CONTROL @@ -1,4 +1,4 @@ -Source: gsoap
-Version: 2.8.78-1
-Build-Depends: curl
+Source: gsoap +Version: 2.8.82-2 +Build-Depends: curl Description: The gSOAP toolkit is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings.
\ No newline at end of file diff --git a/ports/gsoap/portfile.cmake b/ports/gsoap/portfile.cmake index 8162d6780..dc7547eb2 100644 --- a/ports/gsoap/portfile.cmake +++ b/ports/gsoap/portfile.cmake @@ -1,61 +1,67 @@ -include(vcpkg_common_functions)
-set(GSOAP_VERSION 2.8)
-set(GSOAP_SUB_VERSION .78)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gsoap-${GSOAP_VERSION})
-
-vcpkg_download_distfile(ARCHIVE
- URLS "https://ayera.dl.sourceforge.net/project/gsoap2/gsoap-${GSOAP_VERSION}/gsoap_${GSOAP_VERSION}${GSOAP_SUB_VERSION}.zip"
- FILENAME "gsoap_${GSOAP_VERSION}${GSOAP_SUB_VERSION}.zip"
- SHA512 c115044d2662c2dd355c4756a974a0013b7213dd28c536aba179e53c19466279bfa34ce16b4426db5aa7a24d94c18e0ed7e7cdf05e799bf89f7b54031aa0874e
-)
-
-vcpkg_extract_source_archive_ex(
- OUT_SOURCE_PATH SOURCE_PATH
- ARCHIVE ${ARCHIVE}
- PATCHES
- "${CMAKE_CURRENT_LIST_DIR}/fix-build-in-windows.patch"
-)
-
-if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
- set(BUILD_ARCH "Win32")
-else()
- message("gsoap only supported Win32")
- set(BUILD_ARCH "Win32")
-endif()
-
-# Handle binary files and includes
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/gsoap ${CURRENT_PACKAGES_DIR}/debug/tools)
-
-if (WIN32)
- vcpkg_build_msbuild(
- USE_VCPKG_INTEGRATION
- PROJECT_PATH ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln
- PLATFORM ${BUILD_ARCH}
- TARGET Build
- )
- vcpkg_build_msbuild(
- USE_VCPKG_INTEGRATION
- PROJECT_PATH ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/wsdl2h.sln
- PLATFORM ${BUILD_ARCH}
- TARGET Build
- )
-
- file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/release/soapcpp2.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/gsoap/)
- file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/release/wsdl2h.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/gsoap/)
- file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/debug/soapcpp2.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/gsoap/)
- file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/debug/wsdl2h.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/gsoap/)
-else()
- message(FATAL_ERROR "Sorry but gsoap only can be build in Windows temporary")
-endif()
-
-
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
-file(COPY ${SOURCE_PATH}/gsoap/stdsoap2.h ${SOURCE_PATH}/gsoap/stdsoap2.c ${SOURCE_PATH}/gsoap/stdsoap2.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-
-# Handle copyright
-file(COPY ${SOURCE_PATH}/LICENSE.txt ${SOURCE_PATH}/INSTALL.txt ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsoap)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/copyright)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/INSTALL.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/install)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/README.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/readme)
-
+include(vcpkg_common_functions) +set(GSOAP_VERSION 2.8) +set(GSOAP_SUB_VERSION .82) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gsoap-${GSOAP_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ayera.dl.sourceforge.net/project/gsoap2/gsoap-${GSOAP_VERSION}/gsoap_${GSOAP_VERSION}${GSOAP_SUB_VERSION}.zip" + FILENAME "gsoap_${GSOAP_VERSION}${GSOAP_SUB_VERSION}.zip" + SHA512 daf6a1870fe43beb20d0faf646b171c92629885708baabea5bbce79fa5a8030f014dbe5c0bf4024031df993dd3ed3a90449db813946cfdfa9c12318096b57eec +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-build-in-windows.patch" +) + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BUILD_ARCH "Win32") +else() + message("gsoap only supported Win32") + set(BUILD_ARCH "Win32") +endif() + +# Handle binary files and includes +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/gsoap ${CURRENT_PACKAGES_DIR}/debug/tools) + +if (WIN32) + vcpkg_build_msbuild( + USE_VCPKG_INTEGRATION + PROJECT_PATH ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln + PLATFORM ${BUILD_ARCH} + TARGET Build + ) + vcpkg_build_msbuild( + USE_VCPKG_INTEGRATION + PROJECT_PATH ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/wsdl2h.sln + PLATFORM ${BUILD_ARCH} + TARGET Build + ) + + file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/release/soapcpp2.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/gsoap/) + file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/release/wsdl2h.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/gsoap/) + file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/debug/soapcpp2.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/gsoap/) + file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/debug/wsdl2h.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/gsoap/) +else() + message(FATAL_ERROR "Sorry but gsoap only can be build in Windows temporary") +endif() + + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gsoap/stdsoap2.h ${SOURCE_PATH}/gsoap/stdsoap2.c ${SOURCE_PATH}/gsoap/stdsoap2.cpp ${SOURCE_PATH}/gsoap/dom.c ${SOURCE_PATH}/gsoap/dom.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle import files +file(COPY ${SOURCE_PATH}/gsoap/import DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsoap) + +# Handle plugin files +file(COPY ${SOURCE_PATH}/gsoap/plugin DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsoap) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt ${SOURCE_PATH}/INSTALL.txt ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsoap) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/copyright) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/INSTALL.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/install) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsoap/README.txt ${CURRENT_PACKAGES_DIR}/share/gsoap/readme) + vcpkg_copy_pdbs()
\ No newline at end of file diff --git a/ports/gtest/0002-Fix-z7-override.patch b/ports/gtest/0002-Fix-z7-override.patch index c8de56d09..cf875084c 100644 --- a/ports/gtest/0002-Fix-z7-override.patch +++ b/ports/gtest/0002-Fix-z7-override.patch @@ -1,13 +1,13 @@ diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake -index 777b91e..75a13c9 100644 +index 99725b7..3c25b0a 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake -@@ -55,7 +55,7 @@ macro(config_compiler_and_linker) +@@ -66,7 +66,7 @@ macro(config_compiler_and_linker) if (MSVC) # Newlines inside flags variables break CMake's NMake generator. # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds. - set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi") + set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J") - if (MSVC_VERSION LESS 1400) # 1400 is Visual Studio 2005 - # Suppress spurious warnings MSVC 7.1 sometimes issues. - # Forcing value to bool. + set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32") + set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN") + set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1") diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 97e7f3f8c..187287cc0 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 2019-01-04 +Version: 2019-01-04-2 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 62d307aa2..892221925 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -37,6 +37,7 @@ file( "${SOURCE_PATH}/googletest/src/gtest-death-test.cc" "${SOURCE_PATH}/googletest/src/gtest-filepath.cc" "${SOURCE_PATH}/googletest/src/gtest-internal-inl.h" + "${SOURCE_PATH}/googletest/src/gtest-matchers.cc" "${SOURCE_PATH}/googletest/src/gtest-port.cc" "${SOURCE_PATH}/googletest/src/gtest-printers.cc" "${SOURCE_PATH}/googletest/src/gtest-test-part.cc" diff --git a/ports/harfbuzz/0001-fix-cmake-export.patch b/ports/harfbuzz/0001-fix-cmake-export.patch index a5abffa41..0ba0245d0 100644 --- a/ports/harfbuzz/0001-fix-cmake-export.patch +++ b/ports/harfbuzz/0001-fix-cmake-export.patch @@ -1,22 +1,13 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e881dbd1..69496561 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -761,11 +761,17 @@ endif () - - if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - install(TARGETS harfbuzz -+ EXPORT harfbuzzConfig - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - FRAMEWORK DESTINATION Library/Frameworks - ) -+ install(EXPORT harfbuzzConfig -+ NAMESPACE harfbuzz:: -+ FILE harfbuzz-config.cmake -+ DESTINATION share/harfbuzz -+ ) - if (HB_BUILD_UTILS) - install(TARGETS hb-view - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 019e205..8a464a5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -795,7 +795,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
+ )
+ install(EXPORT harfbuzzConfig
+ NAMESPACE harfbuzz::
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/harfbuzz
++ DESTINATION share/harfbuzz
+ )
+ if (HB_BUILD_UTILS)
+ if (WIN32 AND BUILD_SHARED_LIBS)
diff --git a/ports/harfbuzz/0002-fix-macos-build.patch b/ports/harfbuzz/0002-fix-macos-build.patch deleted file mode 100644 index 3b32092c1..000000000 --- a/ports/harfbuzz/0002-fix-macos-build.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5c613e0..32d3a29 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 2.8.0)
-+cmake_minimum_required(VERSION 3.5.0)
- project(harfbuzz)
-
- enable_testing()
-@@ -316,6 +316,10 @@ if (HB_HAVE_GLIB)
-
- find_package(Threads REQUIRED)
- find_package(unofficial-iconv REQUIRED)
-+ if(APPLE)
-+ find_package(unofficial-gettext CONFIG REQUIRED)
-+ list(APPEND THIRD_PARTY_LIBS unofficial::gettext::libintl)
-+ endif()
- find_package(unofficial-glib CONFIG REQUIRED)
-
- list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc)
diff --git a/ports/harfbuzz/0001-fix-uwp-build.patch b/ports/harfbuzz/0002-fix-uwp-build.patch index 24b5bf894..beb5ce750 100644 --- a/ports/harfbuzz/0001-fix-uwp-build.patch +++ b/ports/harfbuzz/0002-fix-uwp-build.patch @@ -1,15 +1,15 @@ diff --git a/src/hb-ft.cc b/src/hb-ft.cc -index f578e9d..f224c07 100644 +index 1900f30..add9917 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -31,6 +31,10 @@ - + #include "hb-ft.h" - + +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) +#define generic GenericFromFreeTypeLibrary +#endif + - #include "hb-font-private.hh" - - #include FT_ADVANCES_H + #include "hb-font.hh" + #include "hb-machinery.hh" + #include "hb-cache.hh" diff --git a/ports/harfbuzz/0003-remove-broken-test.patch b/ports/harfbuzz/0003-remove-broken-test.patch new file mode 100644 index 000000000..2e5b78fa7 --- /dev/null +++ b/ports/harfbuzz/0003-remove-broken-test.patch @@ -0,0 +1,23 @@ +--- a/src/hb-coretext.cc ++++ b/src/hb-coretext.cc +@@ -1059,20 +1059,6 @@ + buffer->len += num_glyphs; + } + +- /* Mac OS 10.6 doesn't have kCTTypesetterOptionForcedEmbeddingLevel, +- * or if it does, it doesn't respect it. So we get runs with wrong +- * directions. As such, disable the assert... It wouldn't crash, but +- * cursoring will be off... +- * +- * https://crbug.com/419769 +- */ +- if (false) +- { +- /* Make sure all runs had the expected direction. */ +- bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); +- assert (bool (status_and & kCTRunStatusRightToLeft) == backward); +- assert (bool (status_or & kCTRunStatusRightToLeft) == backward); +- } + + buffer->clear_positions (); + diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index fccb549ff..399f13111 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,5 +1,5 @@ Source: harfbuzz -Version: 1.8.4-4 +Version: 2.3.1-3 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, ragel, gettext (osx) Default-Features: ucdn diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index d1455e5dc..e1a8199c0 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -3,17 +3,27 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO harfbuzz/harfbuzz - REF 1.8.4 - SHA512 92742b754713d1df8975d4d8467de04765784d7fd566b7e07e7e7a261b0338e997a5fc11fa4fe282d6d5540d242db40c993812fbc4a881becd95fd3aae598c80 + REF 2.3.1 + SHA512 c90f8a530bf49e91f5297f6a3c2f4be65f8907e3b41892cd5fbc1353ce7036aae7e182bfd0ea8cb32b0310cbe7284a3de8b6622e08db9736c3f0bba6cb1f9f01 HEAD_REF master PATCHES - 0001-fix-uwp-build.patch + 0001-fix-cmake-export.patch + 0002-fix-uwp-build.patch + 0003-remove-broken-test.patch + # This patch is required for propagating the full list of static dependencies from freetype find-package-freetype-2.patch + # This patch is required for propagating the full list of dependencies from glib glib-cmake.patch - 0001-fix-cmake-export.patch - 0002-fix-macos-build.patch ) +file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) +if("${_contents}" MATCHES "include \\(FindFreetype\\)") + message(FATAL_ERROR "Harfbuzz's cmake must not directly include() FindFreetype.") +endif() +if("${_contents}" MATCHES "find_library\\(GLIB_LIBRARIES") + message(FATAL_ERROR "Harfbuzz's cmake must not directly find_library() glib.") +endif() + SET(HB_HAVE_ICU "OFF") if("icu" IN_LIST FEATURES) SET(HB_HAVE_ICU "ON") @@ -52,6 +62,7 @@ vcpkg_configure_cmake( -DHB_HAVE_ICU=${HB_HAVE_ICU} -DHB_HAVE_GLIB=${HAVE_GLIB} -DHB_HAVE_GRAPHITE2=${HB_HAVE_GRAPHITE2} + -DHB_BUILD_TESTS=OFF OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) @@ -61,7 +72,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/harfbuzz TARGET_PATH share/harfbuzz) vcpkg_copy_pdbs() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/harfbuzz/COPYING ${CURRENT_PACKAGES_DIR}/share/harfbuzz/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz RENAME copyright) vcpkg_test_cmake(PACKAGE_NAME harfbuzz) diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL index 1d86a5edf..229d659e7 100644 --- a/ports/hdf5/CONTROL +++ b/ports/hdf5/CONTROL @@ -1,5 +1,5 @@ Source: hdf5 -Version: 1.10.1-1 +Version: 1.10.5-4 Description: HDF5 is a data model, library, and file format for storing and managing data Build-Depends: zlib, szip diff --git a/ports/hdf5/disable-static-libs.patch b/ports/hdf5/disable-static-libs.patch deleted file mode 100644 index 4d33c5e45..000000000 --- a/ports/hdf5/disable-static-libs.patch +++ /dev/null @@ -1,113 +0,0 @@ ---- a/hl/src/CMakeLists.txt Thu Apr 13 18:26:10 2017 -+++ b/hl/src/CMakeLists.txt Wed Jan 03 13:13:06 2018 -@@ -29,16 +29,20 @@ - ${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h - ) - --add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) --TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") --target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) --H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) --set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES -- FOLDER libraries/hl -- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" --) --set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}") --set (install_targets ${HDF5_HL_LIB_TARGET}) -+set (install_targets) -+ -+if (NOT DISABLE_STATIC_LIBS) -+ add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) -+ TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") -+ target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) -+ H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) -+ set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES -+ FOLDER libraries/hl -+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" -+ ) -+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}") -+ set (install_targets ${HDF5_HL_LIB_TARGET}) -+endif () - - if (BUILD_SHARED_LIBS) - add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS}) -@@ -73,8 +77,9 @@ - if (HDF5_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_HL_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) -+ else () -+ INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) - endif () -- INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) - - install ( - TARGETS ---- a/src/CMakeLists.txt Thu Apr 13 18:26:11 2017 -+++ b/src/CMakeLists.txt Wed Jan 03 13:03:05 2018 -@@ -876,30 +876,33 @@ - #----------------------------------------------------------------------------- - set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) - --add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) --TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") --target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) --if (NOT WIN32) -- target_link_libraries (${HDF5_LIB_TARGET} dl) --endif () --if (H5_HAVE_PARALLEL AND MPI_C_FOUND) -- target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) --endif () --set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) --H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) --set_target_properties (${HDF5_LIB_TARGET} PROPERTIES -- FOLDER libraries -- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" --) -- --option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) --if (HDF5_ENABLE_DEBUG_APIS) -+set (install_targets) -+if (NOT DISABLE_STATIC_LIBS) -+ add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) -+ TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") -+ target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) -+ if (NOT WIN32) -+ target_link_libraries (${HDF5_LIB_TARGET} dl) -+ endif () -+ if (H5_HAVE_PARALLEL AND MPI_C_FOUND) -+ target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) -+ endif () -+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) -+ H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) - set_target_properties (${HDF5_LIB_TARGET} PROPERTIES -- COMPILE_DEFINITIONS -- "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG" -+ FOLDER libraries -+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" - ) -+ -+ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) -+ if (HDF5_ENABLE_DEBUG_APIS) -+ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES -+ COMPILE_DEFINITIONS -+ "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG" -+ ) -+ endif () -+ set (install_targets ${HDF5_LIB_TARGET}) - endif () --set (install_targets ${HDF5_LIB_TARGET}) - - if (BUILD_SHARED_LIBS) - file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared") -@@ -975,8 +978,10 @@ - if (HDF5_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) -+ else () -+ INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) - endif () -- INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) -+ - - install ( - TARGETS diff --git a/ports/hdf5/hdf5_config.patch b/ports/hdf5/hdf5_config.patch new file mode 100644 index 000000000..012424cf1 --- /dev/null +++ b/ports/hdf5/hdf5_config.patch @@ -0,0 +1,28 @@ +diff --git a/hdf5-config.cmake.in_old b/hdf5-config.cmake.in +index 3bd9e1dc..d95897d3 100644 +--- a/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in ++++ b/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in +@@ -108,11 +108,19 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@) + # project which has already built hdf5 as a subproject + #----------------------------------------------------------------------------- + if (NOT TARGET "@HDF5_PACKAGE@") +- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib") +- include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND NOT TARGET "zlib") ++ if(${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) ++ #include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ else() ++ #find_package(@ZLIB_PACKAGE_NAME@ REQUIRED) ++ endif() + endif () +- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip") +- include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND NOT TARGET "szip") ++ if(${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) ++ include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ else() ++ find_package(@SZIP_PACKAGE_NAME@ REQUIRED) ++ endif() + endif () + include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) + endif () diff --git a/ports/hdf5/link-libraries-private.patch b/ports/hdf5/link-libraries-private.patch deleted file mode 100644 index df423b8bb..000000000 --- a/ports/hdf5/link-libraries-private.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/src/CMakeLists.txt Wed Jan 03 13:16:33 2018 -+++ b/src/CMakeLists.txt Wed Jan 03 13:16:56 2018 -@@ -925,12 +925,12 @@ - set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) - add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) - TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") -- target_link_libraries (${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) -+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_SHARED_LIBS}) - if (NOT WIN32) -- target_link_libraries (${HDF5_LIBSH_TARGET} dl) -+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE dl) - endif () - if (H5_HAVE_PARALLEL AND MPI_C_FOUND) -- target_link_libraries (${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) -+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${MPI_C_LIBRARIES}) - endif () - set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") - H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) -@@ -945,7 +945,7 @@ - APPEND PROPERTY COMPILE_DEFINITIONS - "H5_HAVE_THREADSAFE" - ) -- target_link_libraries (${HDF5_LIBSH_TARGET} Threads::Threads) -+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE Threads::Threads) - endif () - - if (HDF5_ENABLE_DEBUG_APIS) diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index 1da61178b..eef241163 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -3,23 +3,20 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.1/hdf5-1.10.1) vcpkg_download_distfile(ARCHIVE - URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/CMake-hdf5-1.10.1.zip" - FILENAME "CMake-hdf5-1.10.1.zip" - SHA512 0045a6301c6e3479be70f025d8690297ff33b9e6e99ec217a33e9b916d9410fb3f7110b7361fbeaec163c35b8e6bd948ac8d5fdace80930c98c6a0b27c6fd5c4 + URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/CMake-hdf5-1.10.5.tar.gz" + FILENAME "CMake-hdf5-1.10.5.tar.gz" + SHA512 a25ea28d7a511f9184d97b5b8cd4c6d52dcdcad2bffd670e24a1c9a6f98b03108014a853553fa2b00d4be7523128b5fd6a4454545e3b17ff8c66fea16a09e962 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF hdf5 PATCHES - ${CMAKE_CURRENT_LIST_DIR}/use-szip-config.patch - ${CMAKE_CURRENT_LIST_DIR}/disable-static-libs.patch - ${CMAKE_CURRENT_LIST_DIR}/link-libraries-private.patch + hdf5_config.patch ) - -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_STATIC_LIBS) +set(SOURCE_PATH ${SOURCE_PATH}/hdf5-1.10.5) if ("parallel" IN_LIST FEATURES) set(ENABLE_PARALLEL ON) @@ -33,29 +30,39 @@ else() set(ENABLE_CPP OFF) endif() +#Note: HDF5 Builds by default static as well as shared libraries. Set BUILD_SHARED_LIBS to OFF to only get static libraries +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE PREFER_NINJA OPTIONS -DBUILD_TESTING=OFF - -DDISABLE_STATIC_LIBS=${DISABLE_STATIC_LIBS} -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS=OFF + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DHDF5_BUILD_CPP_LIB=${ENABLE_CPP} -DHDF5_ENABLE_PARALLEL=${ENABLE_PARALLEL} -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DHDF5_ENABLE_SZIP_SUPPORT=ON -DHDF5_ENABLE_SZIP_ENCODING=ON -DHDF5_INSTALL_DATA_DIR=share/hdf5/data - -DHDF5_INSTALL_CMAKE_DIR=share/hdf5 + -DHDF5_INSTALL_CMAKE_DIR=share ) vcpkg_install_cmake() vcpkg_copy_pdbs() -file(RENAME ${CURRENT_PACKAGES_DIR}/share/hdf5/data/COPYING ${CURRENT_PACKAGES_DIR}/share/hdf5/copyright) - vcpkg_fixup_cmake_targets(CONFIG_PATH share/hdf5) +#Linux build create additional scripts here. I dont know what they are doing so I am deleting them and hope for the best +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hdf5/data/COPYING ${CURRENT_PACKAGES_DIR}/share/hdf5/copyright) +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/hdf5/vcpkg-cmake-wrapper.cmake @ONLY) diff --git a/ports/hdf5/use-szip-config.patch b/ports/hdf5/use-szip-config.patch deleted file mode 100644 index d7cd6748b..000000000 --- a/ports/hdf5/use-szip-config.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake -index c2b81dc..a86d2d5 100644 ---- a/CMakeFilters.cmake -+++ b/CMakeFilters.cmake -@@ -81,6 +81,16 @@ if (HDF5_ENABLE_SZIP_SUPPORT) - if (NOT SZIP_USE_EXTERNAL) - find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) - if (NOT SZIP_FOUND) -+ find_package (SZIP CONFIG) -+ if (SZIP_FOUND) -+ if (TARGET szip-shared) -+ set(SZIP_LIBRARIES szip-shared) -+ else (TARGET szip-shared) -+ set(SZIP_LIBRARIES szip-static) -+ endif (TARGET szip-shared) -+ endif (SZIP_FOUND) -+ endif (NOT SZIP_FOUND) -+ if (NOT SZIP_FOUND) - find_package (SZIP) # Legacy find - if (SZIP_FOUND) - set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) diff --git a/ports/hdf5/vcpkg-cmake-wrapper.cmake b/ports/hdf5/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..96d8a53c9 --- /dev/null +++ b/ports/hdf5/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,15 @@ +
+if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.3)
+ cmake_policy(PUSH)
+ cmake_policy(SET CMP0057 NEW)
+ if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS AND "HDF5" IN_LIST ARGS)
+ # The caller hasn't said "CONFIG", so they want the built-in FindHDF5.cmake behavior. Set configurations macros to ensure the built-in script finds us.
+ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
+ set(HDF5_USE_STATIC_LIBRARIES ON)
+ else()
+ set(HDF5_USE_STATIC_LIBRARIES OFF)
+ endif()
+ endif()
+ cmake_policy(POP)
+endif()
+_find_package(${ARGS})
diff --git a/ports/highfive/CONTROL b/ports/highfive/CONTROL index 22c7d616b..af4df7993 100644 --- a/ports/highfive/CONTROL +++ b/ports/highfive/CONTROL @@ -1,4 +1,4 @@ Source: highfive -Version: 1.5 +Version: 2.0 Description: HighFive is a modern C++/C++11 friendly interface for libhdf5 Build-Depends: hdf5 diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake index 72f644e0e..ed88a45c9 100644 --- a/ports/highfive/portfile.cmake +++ b/ports/highfive/portfile.cmake @@ -3,11 +3,15 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO BlueBrain/HighFive - REF v1.5 - SHA512 4133ec2768f54cb3e56c32f3193d6c61ea96013dc73901c39d31ecaf10b04ea2861b0f6f5c9795985050ef72a75e2d360a4b906c9cdeb8ee49309961e15d39bf + REF v2.0 + SHA512 d6bc38ae421adfa3cb9ee761ec92819bebe385cb100a8227bd9ff436cd7ae31725a96264a7963cfe5ce806cdd3b7978a8a630e9312c1567f6df6029062c6b8a0 HEAD_REF master ) +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + set(HDF5_USE_STATIC_LIBRARIES ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -16,6 +20,7 @@ vcpkg_configure_cmake( -DHIGHFIVE_EXAMPLES=OFF -DUSE_BOOST=OFF -DHIGH_FIVE_DOCUMENTATION=OFF + -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} ) vcpkg_install_cmake() @@ -23,6 +28,9 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/HighFive/CMake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +if(NOT WIN32 AND NOT APPLE) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/HighFive) +endif() # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright) 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/hungarian/CMakeLists.txt b/ports/hungarian/CMakeLists.txt new file mode 100644 index 000000000..dc0098ca7 --- /dev/null +++ b/ports/hungarian/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required (VERSION 3.8) +project (hungarian C) + +add_library(hungarian + ${CMAKE_CURRENT_LIST_DIR}/libhungarian/hungarian.h + ${CMAKE_CURRENT_LIST_DIR}/libhungarian/hungarian.c +) + +target_include_directories(hungarian PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libhungarian> + $<INSTALL_INTERFACE:include> +) + +set_target_properties(hungarian PROPERTIES PUBLIC_HEADER ${CMAKE_CURRENT_LIST_DIR}/libhungarian/hungarian.h) + +install( + TARGETS hungarian + EXPORT hungarian + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include +) + +install(EXPORT hungarian + DESTINATION "share/hungarian" + FILE hungarianConfig.cmake + NAMESPACE hungarian:: +) diff --git a/ports/hungarian/CONTROL b/ports/hungarian/CONTROL new file mode 100644 index 000000000..96dd5f799 --- /dev/null +++ b/ports/hungarian/CONTROL @@ -0,0 +1,3 @@ +Source: hungarian +Version: v0.1.3 +Description: C-implementation of the Hungarian Method: finding the optimal assignment (assigning a set of jobs to a set of machines) in O(n^3), where n=max{#jobs, #machines}. The implementation is a sligntly enhanced version of the implementation provided by the Stanford GraphBase diff --git a/ports/hungarian/LICENSE.txt b/ports/hungarian/LICENSE.txt new file mode 100644 index 000000000..9255ea6bf --- /dev/null +++ b/ports/hungarian/LICENSE.txt @@ -0,0 +1,24 @@ +/******************************************************************** + ******************************************************************** + ** + ** libhungarian by Cyrill Stachniss, 2004 + ** + ** + ** Solving the Minimum Assignment Problem using the + ** Hungarian Method. + ** + ** ** This file may be freely copied and distributed! ** + ** + ** Parts of the used code was originally provided by the + ** "Stanford GraphGase", but I made changes to this code. + ** As asked by the copyright node of the "Stanford GraphGase", + ** I hereby proclaim that this file are *NOT* part of the + ** "Stanford GraphGase" distrubition! + ** + ** This file is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied + ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + ** PURPOSE. + ** + ******************************************************************** + ********************************************************************/ diff --git a/ports/hungarian/portfile.cmake b/ports/hungarian/portfile.cmake new file mode 100644 index 000000000..0d550756e --- /dev/null +++ b/ports/hungarian/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www2.informatik.uni-freiburg.de/~stachnis/misc/libhungarian-v0.1.3.tgz" + FILENAME "libhungarian-v0.1.3.tgz" + SHA512 1fa105e351c307c07bb96892c9d4c44b167d92cbed80962a8653ac35b8afe00fcf5dcc2d920b95671d6c3cd86745362a64dd8dc173623a8179006e2c7b2cbc69 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/hungarian RENAME copyright) diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL index e13bef73d..160bab7e6 100644 --- a/ports/hunspell/CONTROL +++ b/ports/hunspell/CONTROL @@ -1,3 +1,3 @@ Source: hunspell -Version: 1.6.1-3 +Version: 1.7.0 Description: The most popular spellchecking library. diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake index d49f4a8dc..67a4ff09e 100644 --- a/ports/hunspell/portfile.cmake +++ b/ports/hunspell/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO hunspell/hunspell - REF v1.6.1 - SHA512 39b096ec1f5226f13eaf241647fc9b49a6dad04945ae0bcdc61ba845d66d67d64a72ba4287b6f376b5ad053b5d0e1d42a42415c30521c50693f0544718029458 + REF v1.7.0 + SHA512 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903 HEAD_REF master PATCHES 0001_fix_unistd.patch ) diff --git a/ports/inja/CONTROL b/ports/inja/CONTROL index a905ab796..ec53d0748 100644 --- a/ports/inja/CONTROL +++ b/ports/inja/CONTROL @@ -1,4 +1,4 @@ Source: inja -Version: 1.0.0 +Version: 2.1.0 Build-Depends: nlohmann-json Description: Inja - A Template Engine for Modern C++ diff --git a/ports/inja/portfile.cmake b/ports/inja/portfile.cmake index dc9dc1a6b..17bde913a 100644 --- a/ports/inja/portfile.cmake +++ b/ports/inja/portfile.cmake @@ -2,10 +2,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pantor/inja - REF v1.0.0 - SHA512 39598df84766a0d2a28dc92e083e27b7072600372e0313727cd5dd1fe6ad1efc055dc98055247f5cb1fc4096ffb37b59995107f3456a4495bd01381ac6c74a2b + REF v2.1.0 + SHA512 6b3a3a6a9e2adff14083a8e83c95fdc5ccf0c930acff40c4cf6c11d67b0df18fd941307e5d1f0c45dcfcb4c4afd0026b718ca510a2b297b9c6be048f5b144d42 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/src/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/src/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/inja RENAME copyright) +file(INSTALL ${SOURCE_PATH}/single_include/inja/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/single_include/inja/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/inja RENAME copyright) vcpkg_copy_pdbs() 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/isal/CMakeLists.txt b/ports/isal/CMakeLists.txt new file mode 100644 index 000000000..b479e1522 --- /dev/null +++ b/ports/isal/CMakeLists.txt @@ -0,0 +1,51 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(isal 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 () + +IF (EXEC_ENV STREQUAL "Windows") + FIND_PROGRAM(MAKE nmake) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "nmake not found") + ENDIF () +ELSEIF(EXEC_ENV STREQUAL "Linux") + FIND_PROGRAM(MAKE make) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") + ENDIF () +ENDIF() + +SET(MAKE_FLAGS "-f") + +IF (EXEC_ENV STREQUAL Windows) + STRING(APPEND MAKE_FLAGS " Makefile.nmake /E CC=cl AS=nasm") +ELSEIF (EXEC_ENV STREQUAL Linux) + STRING(APPEND MAKE_FLAGS "Makefile.unx") +ENDIF () + +ADD_CUSTOM_TARGET(isal ALL + COMMAND ${MAKE} ${MAKE_FLAGS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + ) + +SET(LIB_PATH ${CMAKE_SOURCE_DIR}/bin/) +IF (LIBRARY_LINKAGE STREQUAL "dynamic") + STRING(APPEND LIB_PATH isal.so) +ELSEIF (LIBRARY_LINKAGE STREQUAL "static") + STRING(APPEND LIB_PATH isa-l.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}/)
\ No newline at end of file diff --git a/ports/isal/CONTROL b/ports/isal/CONTROL new file mode 100644 index 000000000..e478ee553 --- /dev/null +++ b/ports/isal/CONTROL @@ -0,0 +1,4 @@ +Source: isal +Version: 2.25.0 +Description: Intel(R) Intelligent Storage Acceleration Library + diff --git a/ports/isal/isalConfig.cmake b/ports/isal/isalConfig.cmake new file mode 100644 index 000000000..3348ec434 --- /dev/null +++ b/ports/isal/isalConfig.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("ISAL" "isal" "${ROOT}/debug/lib/isa-l.a" "${ROOT}/lib/isa-l.a" "${ROOT}/include/isal") diff --git a/ports/isal/portfile.cmake b/ports/isal/portfile.cmake new file mode 100644 index 000000000..0fbb6f628 --- /dev/null +++ b/ports/isal/portfile.cmake @@ -0,0 +1,50 @@ +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) Intelligent Storage Acceleration Library currently only supports Linux 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) Intelligent Storage Acceleration 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 01org/isa-l + REF v2.25.0 + SHA512 aa556c8ba26b4637493b3de50a23636668bcfd71249029c52fe6983d0bcf120d1b91f39aaa259cb58e59448d401366f3bfaaee24609db7e6a1cd3fdf1a953efe + HEAD_REF master +) + +VCPKG_FIND_ACQUIRE_PROGRAM(NASM) +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:STRING=${EXEC_ENV} + -DLIBRARY_LINKAGE:STRING=${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}/isalConfig.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/isal/usage b/ports/isal/usage new file mode 100644 index 000000000..23870b20f --- /dev/null +++ b/ports/isal/usage @@ -0,0 +1,5 @@ +The package isal is compatible with built-in CMake targets:
+
+ FIND_PACKAGE(isal REQUIRED)
+ TARGET_LINK_LIBRARIES(main PRIVATE ISAL::isa-l) for static linkage or
+ TARGET_LINK_LIBRARIES(main PRIVATE ISAL::isal) for dynamic linkage
diff --git a/ports/ismrmrd/CONTROL b/ports/ismrmrd/CONTROL index 3fe989da9..77d6e2e8d 100644 --- a/ports/ismrmrd/CONTROL +++ b/ports/ismrmrd/CONTROL @@ -1,4 +1,8 @@ Source: ismrmrd
-Version: 1.3.2-2
+Version: 1.3.2-3
Description: ISMRM Raw Data Format
Build-Depends: pugixml
+
+Feature: dataset
+Description: Dataset and file support
+Build-Depends: hdf5
\ No newline at end of file diff --git a/ports/ismrmrd/optional_hdf5_dependency.patch b/ports/ismrmrd/optional_hdf5_dependency.patch new file mode 100644 index 000000000..7c4772ed5 --- /dev/null +++ b/ports/ismrmrd/optional_hdf5_dependency.patch @@ -0,0 +1,77 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 456d4f4..3c235f2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,6 +7,7 @@ set (ISMRMRD_CMAKE_DIR ${PROJECT_SOURCE_DIR}/cmake CACHE PATH
+
+ # command line options
+ option(USE_SYSTEM_PUGIXML "Use pugixml installed on the system" OFF)
++option(USE_HDF5_DATASET_SUPPORT "Use HDF5 library for dataset support" OFF)
+
+ # and include it to the search list
+ list(APPEND CMAKE_MODULE_PATH ${ISMRMRD_CMAKE_DIR})
+@@ -91,18 +92,23 @@ endif()
+ set(ISMRMRD_VERSION_STRING ${ISMRMRD_VERSION_MAJOR}.${ISMRMRD_VERSION_MINOR}.${ISMRMRD_VERSION_PATCH})
+ set(ISMRMRD_SOVERSION ${ISMRMRD_VERSION_MAJOR}.${ISMRMRD_VERSION_MINOR})
+
+-# Find HDF5 for dataset support
+-find_package(HDF5 1.8 COMPONENTS C)
+-
+-if (HDF5_FOUND)
+- set (ISMRMRD_DATASET_SUPPORT true)
+- set (ISMRMRD_DATASET_SOURCES libsrc/dataset.c libsrc/dataset.cpp)
+- set (ISMRMRD_DATASET_INCLUDE_DIR ${HDF5_C_INCLUDE_DIR})
+- set (ISMRMRD_DATASET_LIBRARIES ${HDF5_LIBRARIES})
+-else (HDF5_FOUND)
++if (USE_HDF5_DATASET_SUPPORT)
++ # Find HDF5 for dataset support
++ find_package(HDF5 1.8 COMPONENTS C)
++
++ if (HDF5_FOUND)
++ set (ISMRMRD_DATASET_SUPPORT true)
++ set (ISMRMRD_DATASET_SOURCES libsrc/dataset.c libsrc/dataset.cpp)
++ set (ISMRMRD_DATASET_INCLUDE_DIR ${HDF5_C_INCLUDE_DIR})
++ set (ISMRMRD_DATASET_LIBRARIES ${HDF5_LIBRARIES})
++ elseif (USE_HDF5_DATASET_SUPPORT)
++ set (ISMRMRD_DATASET_SUPPORT false)
++ # Dataset and file support was explicitly requested, force failure rather than succeed without support.
++ message (FATAL_ERROR "HDF5 not found. Dataset and file support unavailable!")
++ endif (HDF5_FOUND)
++else (USE_HDF5_DATASET_SUPPORT)
+ set (ISMRMRD_DATASET_SUPPORT false)
+- message (WARNING "HDF5 not found. Dataset and file support unavailable!")
+-endif (HDF5_FOUND)
++endif (USE_HDF5_DATASET_SUPPORT)
+
+ # Generate the version.h header file
+ find_package(Git)
+@@ -127,7 +133,7 @@ install(FILES ${CMAKE_BINARY_DIR}/include/ismrmrd/version.h DESTINATION include/
+
+ # --- Main Library (begin) ----
+ # in windows, install the HDF5 dependencies
+-if (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
++if (USE_HDF5_DATASET_SUPPORT AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
+ if(DEFINED ENV{HDF5_ROOT})
+ set(HDF5_BIN_DIR $ENV{HDF5_ROOT}/bin)
+ else (DEFINED ENV{HDF5_ROOT})
+@@ -135,7 +141,7 @@ if (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
+ endif (DEFINED ENV{HDF5_ROOT})
+ message("Install hdf5 libraries from ${HDF5_BIN_DIR} ")
+ install( DIRECTORY ${HDF5_BIN_DIR} DESTINATION bin/.. FILES_MATCHING PATTERN "*.dll" )
+-endif (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
++endif (USE_HDF5_DATASET_SUPPORT AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
+
+ # include directories for main library
+ set(ISMRMRD_TARGET_INCLUDE_DIRS
+@@ -199,9 +205,9 @@ install(FILES cmake/FindIsmrmrd.cmake cmake/FindFFTW3.cmake DESTINATION share/is
+ add_subdirectory(doc)
+
+ add_subdirectory(utilities)
+-if (HDF5_FOUND)
++if (USE_HDF5_DATASET_SUPPORT)
+ add_subdirectory(examples/c)
+-endif (HDF5_FOUND)
++endif (USE_HDF5_DATASET_SUPPORT)
+
+ # TODO: make this work on Windows
+ if (NOT WIN32)
diff --git a/ports/ismrmrd/portfile.cmake b/ports/ismrmrd/portfile.cmake index 1fda781b2..7bc30d028 100644 --- a/ports/ismrmrd/portfile.cmake +++ b/ports/ismrmrd/portfile.cmake @@ -10,12 +10,23 @@ vcpkg_from_github( REF v1.3.2
SHA512 eb806f71c4b183105b3270d658a68195e009c0f7ca37f54f76d650a4d5c83c44d26b5f12a4c47c608aae9990cd04f1204b0c57e6438ca34a271fd54880133106
HEAD_REF master
+ PATCHES
+ # Makes optional hdf5 dependency explicit
+ optional_hdf5_dependency.patch
)
+if ("dataset" IN_LIST FEATURES)
+ set(ENABLE_DATASET ON)
+else()
+ set(ENABLE_DATASET OFF)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS -DUSE_SYSTEM_PUGIXML=ON
+ OPTIONS
+ -DUSE_SYSTEM_PUGIXML=ON
+ -DUSE_HDF5_DATASET_SUPPORT=${ENABLE_DATASET}
)
vcpkg_install_cmake()
diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL index a2cc426e8..79df1234e 100644 --- a/ports/itk/CONTROL +++ b/ports/itk/CONTROL @@ -1,7 +1,7 @@ Source: itk -Version: 4.13.0 +Version: 4.13.0-906736bd 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] +Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[cpp] Feature: vtk Description: Build ITKVtkGlue module. 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..77a62ac2a 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -3,15 +3,15 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO InsightSoftwareConsortium/ITK - REF d92873e33e8a54e933e445b92151191f02feab42 - SHA512 0e3ebd27571543e1c497377dd9576a9bb0711129be12131109fe9b3c8413655ad14ce4d9ac6e281bac83c57e6032b614bc9ff53ed357d831544ca52f41513b62 + REF 906736bd453e95ccf03b318d3d07cb7884285161 + SHA512 8ac62262d46e7acbb0e5b2e964292ec17e1687bb162b8cec666e5b67acbe3449f093a0b1c03737e9951cb88248ed890805ffd57df6eae21220488620da833c57 HEAD_REF master ) if ("vtk" IN_LIST FEATURES) - set(ITKVtkGlue ON ) + set(ITKVtkGlue ON) else() - set(ITKVtkGlue OFF ) + set(ITKVtkGlue OFF) endif() # directory path length needs to be shorter than 50 characters @@ -44,16 +44,19 @@ vcpkg_configure_cmake( -DITK_USE_SYSTEM_PNG=ON -DITK_USE_SYSTEM_TIFF=ON -DITK_USE_SYSTEM_ZLIB=ON + -DITK_USE_SYSTEM_EIGEN=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 # HDF5 was problematic in the past + -DModule_ITKVtkGlue=${ITKVtkGlue} # optional feature - -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 @@ -65,8 +68,11 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() # combines release and debug build configurations +file(RENAME ${CURRENT_PACKAGES_DIR}/vcl_compiler_detection.h ${CURRENT_PACKAGES_DIR}/include/ITK-5.0/vcl_compiler_detection.h) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/vcl_compiler_detection.h) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/itk) diff --git a/ports/jemalloc/CONTROL b/ports/jemalloc/CONTROL index 5bdca6c43..7f6fa5ae2 100644 --- a/ports/jemalloc/CONTROL +++ b/ports/jemalloc/CONTROL @@ -1,4 +1,4 @@ Source: jemalloc -Version: 4.3.1-2 +Version: 4.3.1-3 Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support Build-Depends: diff --git a/ports/jemalloc/fix-static-build.patch b/ports/jemalloc/fix-static-build.patch new file mode 100644 index 000000000..3ede809a8 --- /dev/null +++ b/ports/jemalloc/fix-static-build.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0b8959a..55e6a5f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -826,10 +826,16 @@ endif()
+ install(FILES include/jemalloc/jemalloc${install_suffix}.h
+ DESTINATION include/jemalloc)
+
+-install(TARGETS ${LIBJEMALLOCSO}
+- RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++if (without-export)
++ install(TARGETS ${C_JETLIB}
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
++else()
++ install(TARGETS ${LIBJEMALLOCSO}
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
++endif()
+ if (build-tests)
+ ##################################################################
+ # Common source for Unit, Integration and stress test libraries
diff --git a/ports/jemalloc/portfile.cmake b/ports/jemalloc/portfile.cmake index 527891666..3b99f21f5 100644 --- a/ports/jemalloc/portfile.cmake +++ b/ports/jemalloc/portfile.cmake @@ -11,19 +11,22 @@ vcpkg_from_github( REF jemalloc-cmake.4.3.1 SHA512 e94b62ec3a53acc0ab5acb247d7646bc172108e80f592bb41c2dd50d181cbbeb33d623adf28415ffc0a0e2de3818af2dfe4c04af75ac891ef5042bc5bb186886 HEAD_REF master -) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-utilities.patch" + fix-cmakelists.patch + fix-utilities.patch + fix-static-build.patch ) +if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(BUILD_STATIC_LIBRARY OFF) +else() + set(BUILD_STATIC_LIBRARY ON) +endif() vcpkg_configure_cmake( DISABLE_PARALLEL_CONFIGURE SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DGIT_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + OPTIONS -DGIT_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -Dwithout-export=${BUILD_STATIC_LIBRARY} ) vcpkg_install_cmake() diff --git a/ports/json-dto/CONTROL b/ports/json-dto/CONTROL index 2e9197c2f..1d8b7b24b 100644 --- a/ports/json-dto/CONTROL +++ b/ports/json-dto/CONTROL @@ -1,4 +1,4 @@ Source: json-dto -Version: 0.2.6 +Version: 0.2.8 Description: A small header-only library for converting data between json representation and c++ structs. Build-Depends: rapidjson diff --git a/ports/json-dto/portfile.cmake b/ports/json-dto/portfile.cmake index ca228cfda..212ef87aa 100644 --- a/ports/json-dto/portfile.cmake +++ b/ports/json-dto/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH REPO sobjectizerteam/json_dto-0.2 - REF v.0.2.6 - SHA512 f6562b6177c941a9b898013eacb4bd78f2b8d460a82b773824bf51e106a92c27c52dca4ab6dd07a2d5e063ca3442a20c27dfd80bdcd78207e65f328b95972890 + REF v.0.2.8 + SHA512 50a2d8d31f4cf67bdf84a58bae5f95642f4be571e8e052a48830be119d5e3c4ddbb19c5ac97fc0f8383c9958d64ec9be4ce23019c1da4f2cbf4b8ddbf23f5ad7 ) vcpkg_configure_cmake( diff --git a/ports/jsoncons/CONTROL b/ports/jsoncons/CONTROL new file mode 100644 index 000000000..91896b6e2 --- /dev/null +++ b/ports/jsoncons/CONTROL @@ -0,0 +1,3 @@ +Source: jsoncons
+Version: v0.122.0
+Description: A C++, header-only library for constructing JSON and JSON-like text and binary data formats, with JSON Pointer, JSON Patch, JSONPath, CSV, MessagePack, CBOR, BSON, UBJSON
diff --git a/ports/jsoncons/portfile.cmake b/ports/jsoncons/portfile.cmake new file mode 100644 index 000000000..c2218ba63 --- /dev/null +++ b/ports/jsoncons/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO danielaparker/jsoncons + REF v0.122.0 + SHA512 3fd52e45cc876e3cb3d773a2c7f022224dc1f288db89755d14a93a4e62977f767c6ccfb4aa22b2bc91664223bd15cd5c1bf408e8e298ad81f7b3ef811d8b3121 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsoncons) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/jsoncons/LICENSE ${CURRENT_PACKAGES_DIR}/share/jsoncons/copyright) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 3a96ceeb1..49618f59e 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-11-01 +Version: 2018-11-01-2 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 6a8e0f5cb..ee3c43890 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -8,12 +8,19 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_execute_required_process( - COMMAND Powershell -Command "((Get-Content -Encoding Byte ${SOURCE_PATH}/stdlib/std.jsonnet) -join ',') + ',0' > ${SOURCE_PATH}/core/std.jsonnet.h" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME "std.jsonnet" -) - +if (WIN32) + vcpkg_execute_required_process( + COMMAND Powershell -Command "((Get-Content -Encoding Byte \"${SOURCE_PATH}/stdlib/std.jsonnet\") -join ',') + ',0' > \"${SOURCE_PATH}/core/std.jsonnet.h\"" + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME "std.jsonnet" + ) +else() + vcpkg_execute_required_process( + COMMAND bash -c "((od -v -Anone -t u1 \"${SOURCE_PATH}/stdlib/std.jsonnet\" | tr ' ' '\\n' | grep -v '^$' | tr '\\n' ',' ) && echo '0') > \"${SOURCE_PATH}/core/std.jsonnet.h\"" + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME "std.jsonnet" + ) +endif() file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/kd-soap/CONTROL b/ports/kd-soap/CONTROL new file mode 100644 index 000000000..65b8419e6 --- /dev/null +++ b/ports/kd-soap/CONTROL @@ -0,0 +1,4 @@ +Source: kd-soap
+Version: 1.7.0
+Description: A Qt-based client-side and server-side SOAP component http://www.kdab.com/products/kd-soap
+Build-Depends: qt5-base
diff --git a/ports/kd-soap/kd-saop.patch b/ports/kd-soap/kd-saop.patch new file mode 100644 index 000000000..975a1c9f7 --- /dev/null +++ b/ports/kd-soap/kd-saop.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c3c824e..d7a1cce 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -168,6 +168,6 @@ if(${PROJECT_NAME}_IS_ROOT_PROJECT)
+ enable_testing()
+ add_subdirectory(testtools)
+ add_subdirectory(unittests)
++ add_subdirectory(examples)
+ endif()
+- add_subdirectory(examples)
+ endif()
diff --git a/ports/kd-soap/portfile.cmake b/ports/kd-soap/portfile.cmake new file mode 100644 index 000000000..2b49d114e --- /dev/null +++ b/ports/kd-soap/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO KDAB/KDSoap
+ REF 66a7804f157f51bc62c193b63a28918236bd7424
+ SHA512 e9e2ac3ef714ebd5a85972c0eed613f88cc36f213df4fb938d61b58947972524f26f54a226f8e28ce47385cd859030a560781b4aebe3a25e672ac82b5477eeb8
+ HEAD_REF master
+)
+vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/8236bd7424-79789c62ed
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/kd-saop.patch"
+)
+
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kd-soap RENAME copyright)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
+file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kdwsdl2cpp.exe ${CURRENT_PACKAGES_DIR}/tools/kdwsdl2cpp.exe)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kdwsdl2cpp.exe)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
diff --git a/ports/kealib/CONTROL b/ports/kealib/CONTROL index 7e8a712a2..6426fd5fa 100644 --- a/ports/kealib/CONTROL +++ b/ports/kealib/CONTROL @@ -1,5 +1,5 @@ Source: kealib -Version: 1.4.7-1 +Version: 1.4.11 Build-Depends: hdf5[cpp], zlib, szip Description: kealib is gdal model using HDF5 standard. diff --git a/ports/kealib/fix-cmake.patch b/ports/kealib/fix-cmake.patch deleted file mode 100644 index 191517990..000000000 --- a/ports/kealib/fix-cmake.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff --git a/trunk/CMakeLists.txt b/trunk/CMakeLists.txt
-index 464fb13..dc8e26f 100644
---- a/trunk/CMakeLists.txt
-+++ b/trunk/CMakeLists.txt
-@@ -8,6 +8,7 @@
- # which were derived from those used by libLAS (http://liblas.org/)
- #
- # History
-+# 2018/01/25 - updated by Hiroshi Miura
- # 2012/07/02 - Created by Peter Bunting
- #
- ###############################################################################
-@@ -50,13 +51,10 @@ endif()
-
- option (BUILD_SHARED_LIBS "Build with shared library" ON)
-
--set(HDF5_INCLUDE_DIR /usr/local/include CACHE PATH "Include PATH for HDF5")
--set(HDF5_LIB_PATH /usr/local/lib CACHE PATH "Library PATH for HDF5")
-
- set(GDAL_INCLUDE_DIR "NOTFOUND" CACHE PATH "Include PATH for GDAL")
- set(GDAL_LIB_PATH "NOTFOUND" CACHE PATH "Library PATH for GDAL")
-
--set(HDF5_STATIC_LIBS FALSE CACHE BOOL "On Windows, link against static HDF5 libs")
-
- IF(GDAL_INCLUDE_DIR AND GDAL_LIB_PATH)
- # by default, only build if paths are set
-@@ -65,6 +63,8 @@ ELSE()
- set(LIBKEA_WITH_GDAL FALSE CACHE BOOL "Choose if .kea GDAL driver should be built")
- ENDIF()
-
-+find_package(hdf5 COMPONENTS CXX HL REQUIRED)
-+link_libraries(hdf5::hdf5_cpp-shared)
- ###############################################################################
-
- ###############################################################################
-@@ -141,14 +141,7 @@ endif(APPLE)
- # Check the required libraries are present
-
- if (MSVC)
-- if(HDF5_STATIC_LIBS)
-- set(HDF5_LIBRARIES -LIBPATH:"${HDF5_LIB_PATH}" hdf5_cpp.lib hdf5.lib zlibstatic.lib)
-- else()
-- set(HDF5_LIBRARIES -LIBPATH:"${HDF5_LIB_PATH}" hdf5_cpp.lib hdf5.lib)
-- set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB)
-- endif()
- else()
-- set(HDF5_LIBRARIES "-L${HDF5_LIB_PATH} -lhdf5 -lhdf5_hl -lhdf5_cpp")
- endif(MSVC)
-
- if (MSVC)
-@@ -160,21 +153,19 @@ endif(MSVC)
-
- ###############################################################################
- # Setup configure file
--configure_file ( "${PROJECT_HEADER_DIR}/kea-config.h.in" "${PROJECT_HEADER_DIR}/libkea/kea-config.h" )
--configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.in" "${PROJECT_BINARY_DIR}/kea-config" )
-+configure_file ( "${PROJECT_HEADER_DIR}/kea-config.h.in" "${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}/libkea/kea-config.h" )
-+configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.in" "${CMAKE_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" )
- ###############################################################################
-
- ###############################################################################
- # Documentation
--file(READ "doc/index.txt" README )
--file(WRITE "README.txt" "${README}")
- ###############################################################################
-
- ###############################################################################
- # Build library
-
- include_directories ("${PROJECT_HEADER_DIR}")
--include_directories(${HDF5_INCLUDE_DIR})
-+include_directories ("${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}")
- add_subdirectory ("${PROJECT_SOURCE_DIR}")
- if (LIBKEA_WITH_GDAL)
- add_subdirectory ("${PROJECT_GDAL_DIR}")
-@@ -185,13 +176,11 @@ endif(LIBKEA_WITH_GDAL)
- # Tests
- enable_testing()
- add_test(NAME test1 COMMAND src/test1)
--
- ###############################################################################
-
- ###############################################################################
- # Installation
--
--install (FILES "${PROJECT_BINARY_DIR}/kea-config" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-+install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
- ###############################################################################
-
- ###############################################################################
-diff --git a/trunk/src/CMakeLists.txt b/trunk/src/CMakeLists.txt
-index 84456c4..b804e74 100644
---- a/trunk/src/CMakeLists.txt
-+++ b/trunk/src/CMakeLists.txt
-@@ -37,6 +37,7 @@ target_link_libraries(${LIBKEA_LIB_NAME} ${HDF5_LIBRARIES} )
-
- ###############################################################################
- # Testing
-+if(NOT DISABLE_TESTS)
- # exe needs to be in 'src' otherwise it doesn't work
- add_executable (test1 ${PROJECT_TEST_DIR}/test1.cpp)
- target_link_libraries (test1 ${LIBKEA_LIB_NAME})
-@@ -53,6 +54,7 @@ if(NOT WIN32)
- # probably should match other compilers, but since this is a Conda
- # specific hack I'm not going to bother
- endif()
-+endif()
-
- ###############################################################################
- # Set target properties
-@@ -67,6 +69,9 @@ PROPERTIES
-
- ###############################################################################
- # Installation
--install (TARGETS ${LIBKEA_LIB_NAME} DESTINATION lib)
-+install (TARGETS ${LIBKEA_LIB_NAME}
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib)
- install (FILES ${LIBKEA_H} DESTINATION include/libkea)
- ###############################################################################
-\ No newline at end of file
diff --git a/ports/kealib/hdf5_include.patch b/ports/kealib/hdf5_include.patch new file mode 100644 index 000000000..35935dc34 --- /dev/null +++ b/ports/kealib/hdf5_include.patch @@ -0,0 +1,62 @@ +index 1f4b1474..40a0f55d 100644 +--- a/include/libkea/KEAAttributeTable.h ++++ b/include/libkea/KEAAttributeTable.h +@@ -37,7 +37,7 @@ + #include <map> + #include <math.h> + +-#include "H5Cpp.h" ++#include <H5Cpp.h> + + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" + +--- a/include/libkea/KEAAttributeTableFile.h ++++ b/include/libkea/KEAAttributeTableFile.h +@@ -35,7 +35,7 @@ + #include <string> + #include <vector> + +-#include "H5Cpp.h" ++#include <H5Cpp.h> + + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" + +--- a/include/libkea/KEACommon.h ++++ b/include/libkea/KEACommon.h +@@ -36,7 +36,7 @@ + #include <string> + #include <vector> + +-#include "H5Cpp.h" ++#include <H5Cpp.h> + + // mark all exported classes/functions with DllExport to have + // them exported by Visual Studio + +--- a/include/libkea/KEAAttributeTableInMem.h ++++ b/include/libkea/KEAAttributeTableInMem.h +@@ -35,7 +35,7 @@ + #include <string> + #include <vector> + +-#include "H5Cpp.h" ++#include <H5Cpp.h> + + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" + +--- a/include/libkea/KEAImageIO.h ++++ b/include/libkea/KEAImageIO.h +@@ -35,7 +35,7 @@ + #include <string> + #include <vector> + +-#include "H5Cpp.h" ++#include <H5Cpp.h> + + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" + + diff --git a/ports/kealib/portfile.cmake b/ports/kealib/portfile.cmake index 4cd8b59d5..69a017208 100644 --- a/ports/kealib/portfile.cmake +++ b/ports/kealib/portfile.cmake @@ -1,16 +1,16 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/kealib-1.4.7) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/kealib-1.4.11) vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/chchrsc/kealib/downloads/kealib-1.4.7.tar.gz" - FILENAME "kealib-1.4.7.tar.gz" - SHA512 2d58d7d08943d028e19a24f3ad3316a13b4db59be8697cebf30ee621e6bf0a6a47bf61abadd972d6ea7af1c8eed28bba7edf40fb8709fcccc1effbc90ae6e244 + URLS "https://bitbucket.org/chchrsc/kealib/downloads/kealib-1.4.11.tar.gz" + FILENAME "kealib-1.4.11.tar.gz" + SHA512 e080dfd51111f85ddf8ab1bd71aaf7ec6cbe814db29ed62806362ef83718f777935347d9063cf29085f21bf09d4277fd88f5269af6555304130f50d093d28f63 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-cmake.patch + hdf5_include.patch ) if ("parallel" IN_LIST FEATURES) @@ -19,20 +19,25 @@ else() set(ENABLE_PARALLEL OFF) endif() +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + set(HDF5_USE_STATIC_LIBRARIES ON) +endif() + vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/trunk + SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DHDF5_PREFER_PARALLEL=${ENABLE_PARALLEL} -DLIBKEA_WITH_GDAL=OFF -DDISABLE_TESTS=ON + -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} ) vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/trunk/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kealib RENAME copyright) +file(INSTALL ${SOURCE_PATH}/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kealib RENAME copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) diff --git a/ports/kinectsdk2/portfile.cmake b/ports/kinectsdk2/portfile.cmake index 05aa1fd2e..a4b89b521 100644 --- a/ports/kinectsdk2/portfile.cmake +++ b/ports/kinectsdk2/portfile.cmake @@ -12,6 +12,13 @@ include(vcpkg_common_functions) +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) + message(WARNING "Kinectsdk2's buildsystem uses very long paths and may fail on your system.\n" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) +endif() + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() diff --git a/ports/lemon/CONTROL b/ports/lemon/CONTROL index 04fec505c..08b739368 100644 --- a/ports/lemon/CONTROL +++ b/ports/lemon/CONTROL @@ -1,3 +1,4 @@ Source: lemon
-Version:
-Description:
+Version: 0
+Description: Deprecated port, use liblemon instead
+Build-Depends: liblemon
diff --git a/ports/lemon/portfile.cmake b/ports/lemon/portfile.cmake index a7509bde4..f599558f1 100644 --- a/ports/lemon/portfile.cmake +++ b/ports/lemon/portfile.cmake @@ -1,47 +1,3 @@ -# 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)
-#
+set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
-include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lemon-1.3.1)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz"
- FILENAME "lemon-1.3.1.tar.gz"
- SHA512 715eb45e790c908e41de4c13e68b7880e1d86c54eca53f896c95b6bc411ded504f3f768bed9d63562ed4adad53167fb3a7828c67456fdea645a5d0a94ae2e038
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR} remove-directory.patch)
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
- set(VCPKG_LIBRARY_LINKAGE static)
-endif()
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA # Disable this option if project cannot be built with Ninja
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
-)
-
-vcpkg_install_cmake()
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
-
-# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lemon RENAME copyright)
-
-# Post-build test for cmake libraries
-# vcpkg_test_cmake(PACKAGE_NAME lemon)
+message(WARNING "The lemon port is deprecated, use liblemon instead")
diff --git a/ports/lemon/remove-directory.patch b/ports/lemon/remove-directory.patch deleted file mode 100644 index bda2c51ae..000000000 --- a/ports/lemon/remove-directory.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 03e1cc7..edbd05f 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -256,11 +256,11 @@ ENDIF()
-
- ADD_SUBDIRECTORY(lemon)
- IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
-- ADD_SUBDIRECTORY(contrib)
-- ADD_SUBDIRECTORY(demo)
-- ADD_SUBDIRECTORY(tools)
-- ADD_SUBDIRECTORY(doc)
-- ADD_SUBDIRECTORY(test)
-+ # ADD_SUBDIRECTORY(contrib)
-+ # ADD_SUBDIRECTORY(demo)
-+ # ADD_SUBDIRECTORY(tools)
-+ # ADD_SUBDIRECTORY(doc)
-+ # ADD_SUBDIRECTORY(test)
- ENDIF()
-
- CONFIGURE_FILE(
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/libcds/cmake-install.patch b/ports/libcds/001-cmake-install.patch index 599216614..2a73752f5 100644 --- a/ports/libcds/cmake-install.patch +++ b/ports/libcds/001-cmake-install.patch @@ -1,31 +1,32 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a198e26..e891aee 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -41,6 +41,10 @@ if(APPLE)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DARWIN_C_SOURCE")
- endif()
-
-+if(MSVC)
-+ add_definitions(-DCDS_BUILD_LIB)
-+endif()
-+
- if(WITH_BOOST_ATOMIC)
- if(Boost_FOUND)
- if(${Boost_MINOR_VERSION} GREATER 53)
-@@ -191,9 +195,13 @@ target_compile_options(${CDS_STATIC_LIBRARY} PUBLIC "${LIBCDS_PUBLIC_CXX_FLAGS}"
- target_compile_options(${CDS_SHARED_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}")
- target_compile_options(${CDS_STATIC_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}")
-
--install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP)
--install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY)
-+if(NOT DISABLE_INSTALL_SHARED)
-+install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP)
-+install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY)
-+endif()
-+if(NOT DISABLE_INSTALL_STATIC)
- install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT})
-+endif()
- install(EXPORT LibCDSConfig FILE LibCDSConfig.cmake NAMESPACE LibCDS:: DESTINATION lib/cmake/LibCDS)
- install(DIRECTORY ${PROJECT_SOURCE_DIR}/cds DESTINATION include COMPONENT ${HEADERS_COMPONENT})
-
+diff --git a/CMakeLists.txt b/CMakeLists.txt +index d97ee07..f8affbb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,6 +34,10 @@ if(APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DARWIN_C_SOURCE") + endif() + ++if(MSVC) ++ add_definitions(-DCDS_BUILD_LIB) ++endif() ++ + if(WITH_BOOST_ATOMIC) + if(TARGET boost::atomic) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDS_USE_BOOST_ATOMIC") +@@ -186,9 +190,13 @@ target_compile_options(${CDS_STATIC_LIBRARY} PUBLIC "${LIBCDS_PUBLIC_CXX_FLAGS}" + target_compile_options(${CDS_SHARED_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}") + target_compile_options(${CDS_STATIC_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}") + +-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP RUNTIME DESTINATION lib${LIB_SUFFIX}) +-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) +-install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) ++if (NOT DISABLE_INSTALL_SHARED) ++ install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP) ++ install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) ++endif() ++if (NOT DISABLE_INSTALL_STATIC) ++ install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) ++endif() + install(EXPORT LibCDSConfig FILE LibCDSConfig.cmake NAMESPACE LibCDS:: DESTINATION lib/cmake/LibCDS) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/cds DESTINATION include COMPONENT ${HEADERS_COMPONENT}) + diff --git a/ports/libcds/lib-suffix-option.patch b/ports/libcds/002-lib-suffix-option.patch index eeb2f3e2e..9732f6359 100644 --- a/ports/libcds/lib-suffix-option.patch +++ b/ports/libcds/002-lib-suffix-option.patch @@ -1,13 +1,13 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e891aee..9f12295 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -125,7 +125,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-
- if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64")
- list(APPEND LIBCDS_PUBLIC_CXX_FLAGS "-mcx16")
-- set(LIB_SUFFIX "64")
-+ set(LIB_SUFFIX "64" CACHE STRING "")
-
- # GCC-7: 128-bit atomics support is implemented via libatomic on amd64
- # see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html
+diff --git a/CMakeLists.txt b/CMakeLists.txt +index aa287ff8..20fe7b49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -118,7 +118,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_C + + if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64") + list(APPEND LIBCDS_PUBLIC_CXX_FLAGS "-mcx16") +- set(LIB_SUFFIX "64") ++ set(LIB_SUFFIX "64" CACHE STRING "") + + # GCC-7: 128-bit atomics support is implemented via libatomic on amd64 + # see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html diff --git a/ports/libcds/CONTROL b/ports/libcds/CONTROL index 9b0f4c73a..1707512fd 100644 --- a/ports/libcds/CONTROL +++ b/ports/libcds/CONTROL @@ -1,4 +1,4 @@ Source: libcds -Version: 2.3.2 +Version: 2.3.3 Build-Depends: boost-system, boost-thread Description: a collection of concurrent containers that don't require external (manual) synchronization for shared access, and safe memory reclamation (SMR) algorithms like Hazard Pointer and user-space RCU that is used as an epoch-based SMR. diff --git a/ports/libcds/portfile.cmake b/ports/libcds/portfile.cmake index c3ba2ec65..ebb87b538 100644 --- a/ports/libcds/portfile.cmake +++ b/ports/libcds/portfile.cmake @@ -3,16 +3,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO khizmax/libcds - REF v2.3.2 - SHA512 f8313f85ae2950a008245603296b63bdbb2f58ead1a453fb287a8ecb96b79edc5b2f8fe33d6027dbc7ead6ccd1bb7ca8dd830091a86760358bb812a39b4ba83f + REF v2.3.3 + SHA512 95e67da4336d622d47bdf124d76827ca3e82e65ab5f725ccf58c2d7957960e7d17ee1ebb2126eed70f7a3ca1c97f840d9f59c1ae2eb80215d10abf70b215e510 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch - ${CMAKE_CURRENT_LIST_DIR}/lib-suffix-option.patch + 001-cmake-install.patch + 002-lib-suffix-option.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_INSTALL_STATIC) diff --git a/ports/libcopp/CONTROL b/ports/libcopp/CONTROL index 35fca9b7e..68115219f 100644 --- a/ports/libcopp/CONTROL +++ b/ports/libcopp/CONTROL @@ -1,3 +1,3 @@ Source: libcopp -Version: 1.1.0-1 +Version: 1.1.0-2 Description: A cross-platfrom coroutine library for C++ diff --git a/ports/libcopp/portfile.cmake b/ports/libcopp/portfile.cmake index 85b2de09c..026e4a14c 100644 --- a/ports/libcopp/portfile.cmake +++ b/ports/libcopp/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_from_github( # Use libcopp's own build process, skipping examples and tests vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE # PREFER_NINJA # Disabled because Ninja does not invoke masm correctly for this project ) vcpkg_install_cmake() diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL index f260b6d01..67cd29d7c 100644 --- a/ports/libevent/CONTROL +++ b/ports/libevent/CONTROL @@ -1,4 +1,4 @@ Source: libevent -Version: 2.1.8-3 +Version: 2.1.8-4 Build-Depends: openssl Description: An event notification library diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 251624e3f..61bbb9847 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -9,12 +9,8 @@ vcpkg_from_github( REPO libevent/libevent REF release-2.1.8-stable SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549 -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix-target-files.patch" + "fix-target-files.patch" ) vcpkg_configure_cmake( diff --git a/ports/libffi/CMakeLists.txt b/ports/libffi/CMakeLists.txt index 1f8e2d332..2be7a2574 100644 --- a/ports/libffi/CMakeLists.txt +++ b/ports/libffi/CMakeLists.txt @@ -97,18 +97,22 @@ macro(add_assembly ASMFILE) endif() endmacro() -if("${TARGET}" STREQUAL "X86") +if(${TARGET} STREQUAL "X86") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -m32") +endif() + +if(${TARGET} STREQUAL "X86") add_assembly(src/x86/sysv.S) add_assembly(src/x86/win32.S) -elseif("${TARGET}" STREQUAL "X86_64") +elseif(${TARGET} STREQUAL "X86_64") list(APPEND FFI_SOURCES src/x86/ffi64.c) add_assembly(src/x86/unix64.S) add_assembly(src/x86/sysv.S) -elseif("${TARGET}" STREQUAL "X86_WIN32") +elseif(${TARGET} STREQUAL "X86_WIN32") add_assembly(src/x86/win32.S) -elseif("${TARGET}" STREQUAL "X86_WIN64") +elseif(${TARGET} STREQUAL "X86_WIN64") add_assembly(src/x86/win64.S) -elseif("${TARGET}" STREQUAL "X86_DARWIN") +elseif(${TARGET} STREQUAL "X86_DARWIN") list(APPEND FFI_SOURCES src/x86/ffi64.c) add_assembly(src/x86/darwin.S) add_assembly(src/x86/darwin64.S) @@ -116,7 +120,7 @@ else() message(FATAL_ERROR "Target not implemented") endif() -if(CMAKE_BUILD_TYPE STREQUAL Debug) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") list(APPEND FFI_SOURCES src/debug.c) add_definitions(-DFFI_DEBUG) endif() diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL index ee1f0de9e..b008d7595 100644 --- a/ports/libffi/CONTROL +++ b/ports/libffi/CONTROL @@ -1,3 +1,3 @@ Source: libffi
-Version: 3.1-1
+Version: 3.1-4
Description: Portable, high level programming interface to various calling conventions
diff --git a/ports/libffi/fficonfig.h b/ports/libffi/fficonfig.h index ff8b0ca44..044b791c1 100644 --- a/ports/libffi/fficonfig.h +++ b/ports/libffi/fficonfig.h @@ -1,3 +1,6 @@ +#ifdef __linux__ +#define EH_FRAME_FLAGS "a" +#endif #define HAVE_ALLOCA 1 #ifndef _WIN64 #define HAVE_AS_ASCII_PSEUDO_OP 1 @@ -8,6 +11,9 @@ #ifndef _WIN64 #define HAVE_AS_X86_PCREL 1 #endif +#ifdef __linux__ +#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1 +#endif #define HAVE_INTTYPES_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STDINT_H 1 @@ -31,9 +37,11 @@ #define SIZEOF_SIZE_T 8 #endif #define STDC_HEADERS 1 +#ifndef __linux__ #ifndef _WIN64 #define SYMBOL_UNDERSCORE 1 #endif +#endif #define VERSION "3.1" #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ diff --git a/ports/libffi/portfile.cmake b/ports/libffi/portfile.cmake index 8799e23a8..b72a6cd5a 100644 --- a/ports/libffi/portfile.cmake +++ b/ports/libffi/portfile.cmake @@ -9,18 +9,15 @@ vcpkg_from_github( REF v3.1 SHA512 b214e4a876995f44e0a93bad5bf1b3501ea1fbedafbf33ea600007bd08c9bc965a1f0dd90ea870281c3add6c051febd19aa6cdce36f3ee8ba535ba2c0703153c HEAD_REF master + PATCHES + export-global-data.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/export-global-data.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DFFI_CONFIG_FILE=${CMAKE_CURRENT_LIST_DIR}/fficonfig.h OPTIONS_DEBUG @@ -30,7 +27,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_apply_patches( SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include PATCHES diff --git a/ports/libgd/CONTROL b/ports/libgd/CONTROL index d9eb37c75..a909508a2 100644 --- a/ports/libgd/CONTROL +++ b/ports/libgd/CONTROL @@ -1,4 +1,28 @@ Source: libgd -Version: 2.2.4-5 +Version: 2.2.5 Description: Open source code library for the dynamic creation of images by programmers. -Build-Depends: freetype, libjpeg-turbo, libpng, libwebp, tiff, fontconfig +Default-Features: fontconfig, freetype, jpeg, png, tiff, webp + +Feature: fontconfig +Description: Support for fontconfig +Build-Depends: fontconfig + +Feature: freetype +Description: Support for freetype +Build-Depends: freetype + +Feature: jpeg +Description: Support for jpeg +Build-Depends: libjpeg-turbo + +Feature: png +Description: Support for png +Build-Depends: libpng + +Feature: tiff +Description: Support for tiff +Build-Depends: tiff + +Feature: webp +Description: Support for webp +Build-Depends: libwebp diff --git a/ports/libgd/portfile.cmake b/ports/libgd/portfile.cmake index 7e8051acc..23c1d360b 100644 --- a/ports/libgd/portfile.cmake +++ b/ports/libgd/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libgd/libgd - REF gd-2.2.4 - SHA512 02ce40c45f31cf1645ad1d3fd9b9b498323b2709d40b0681cd403c11072a1f2149f5af844a6bf9e695c29e3247013bb94c57c0225a54189d728f64caf0a938ee + REF gd-2.2.5 + SHA512 e4ee4c0d1064c93640c29b5741f710872297f42bcc883026a63124807b6ff23bd79ae66bb9148a30811907756c4566ba8f1c0560673ccafc20fee38d82ca838f HEAD_REF master PATCHES 0001-fix-cmake.patch @@ -18,6 +18,36 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindJPEG.cmake) file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindPackageHandleStandardArgs.cmake) file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindPNG.cmake) +set(ENABLE_PNG OFF) +if("png" IN_LIST FEATURES) + set(ENABLE_PNG ON) +endif() + +set(ENABLE_JPEG OFF) +if("jpeg" IN_LIST FEATURES) + set(ENABLE_JPEG ON) +endif() + +set(ENABLE_TIFF OFF) +if("tiff" IN_LIST FEATURES) + set(ENABLE_TIFF ON) +endif() + +set(ENABLE_FREETYPE OFF) +if("freetype" IN_LIST FEATURES) + set(ENABLE_FREETYPE ON) +endif() + +set(ENABLE_WEBP OFF) +if("webp" IN_LIST FEATURES) + set(ENABLE_WEBP ON) +endif() + +set(ENABLE_FONTCONFIG OFF) +if("fontconfig" IN_LIST FEATURES) + set(ENABLE_FONTCONFIG ON) +endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(LIBGD_SHARED_LIBS ON) set(LIBGD_STATIC_LIBS OFF) @@ -29,12 +59,12 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DENABLE_PNG=ON - -DENABLE_JPEG=ON - -DENABLE_TIFF=ON - -DENABLE_FREETYPE=ON - -DENABLE_WEBP=ON - -DENABLE_FONTCONFIG=ON + OPTIONS -DENABLE_PNG=${ENABLE_PNG} + -DENABLE_JPEG=${ENABLE_JPEG} + -DENABLE_TIFF=${ENABLE_TIFF} + -DENABLE_FREETYPE=${ENABLE_FREETYPE} + -DENABLE_WEBP=${ENABLE_WEBP} + -DENABLE_FONTCONFIG=${ENABLE_FONTCONFIG} -DBUILD_SHARED_LIBS=${LIBGD_SHARED_LIBS} -DBUILD_STATIC_LIBS=${LIBGD_STATIC_LIBS} ) diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL index 623628ab8..72778aa6b 100644 --- a/ports/libharu/CONTROL +++ b/ports/libharu/CONTROL @@ -1,4 +1,4 @@ Source: libharu -Version: 2017-08-15-d84867ebf9f-4 +Version: 2017-08-15-d84867ebf9f-6 Description: libharu - free PDF library Build-Depends: zlib, libpng diff --git a/ports/libharu/add-boolean-typedef.patch b/ports/libharu/add-boolean-typedef.patch new file mode 100644 index 000000000..7768ed301 --- /dev/null +++ b/ports/libharu/add-boolean-typedef.patch @@ -0,0 +1,12 @@ +diff --git a/include/hpdf.h b/include/hpdf.h
+index 1cf0dd9..cce9b59 100644
+--- a/include/hpdf.h
++++ b/include/hpdf.h
+@@ -54,6 +54,7 @@
+ #include "hpdf_types.h"
+
+ typedef void *HPDF_HANDLE;
++typedef HPDF_HANDLE HPDF_Boolean;
+ typedef HPDF_HANDLE HPDF_Doc;
+ typedef HPDF_HANDLE HPDF_Page;
+ typedef HPDF_HANDLE HPDF_Pages;
diff --git a/ports/libharu/fix-build-fail.patch b/ports/libharu/fix-build-fail.patch new file mode 100644 index 000000000..2f7066575 --- /dev/null +++ b/ports/libharu/fix-build-fail.patch @@ -0,0 +1,21 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 9d2a604..be8e964 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -79,11 +79,11 @@ if(LIBHPDF_STATIC)
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+- if(WIN32 AND NOT CYGWIN)
+- foreach(addlib ${ADDITIONAL_LIBRARIES})
+- install(FILES ${addlib} DESTINATION lib)
+- endforeach(addlib)
+- endif(WIN32 AND NOT CYGWIN)
++ #if(WIN32 AND NOT CYGWIN)
++ #foreach(addlib ${ADDITIONAL_LIBRARIES})
++ #install(FILES ${addlib} DESTINATION lib)
++ #endforeach(addlib)
++ #endif(WIN32 AND NOT CYGWIN)
+ endif(LIBHPDF_STATIC)
+ if(LIBHPDF_SHARED)
+ add_library(${LIBHPDF_NAME} SHARED ${LIBHPDF_SRCS})
diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index c8e9250b9..7855dedc7 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -1,10 +1,22 @@ include(vcpkg_common_functions) + +vcpkg_download_distfile(SHADING_PR + URLS "https://github.com/libharu/libharu/pull/157.diff" + FILENAME "libharu-shading-pr-157.patch" + SHA512 f2ddb22b54b4eccc79400b6a4b2d245a221898f75456a5a559523eab7a523a87dfc5dfd0ec5fb17a771697e03c7ea6ed4c6095eff73e0a4302cd6eb24584c957 +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libharu/libharu REF d84867ebf9f3de6afd661d2cdaff102457fbc371 SHA512 789579dd52c1056ae90a4ce5360c26ba92cadae5341a3901c4159afe624129a1f628fa6412952a398e048b0e5040c93f7ed5b4e4bc620a22d897098298fe2a99 HEAD_REF master + PATCHES + fix-build-fail.patch + add-boolean-typedef.patch + # This patch adds shading support which is required for VTK. If desired, this could be moved into an on-by-default feature. + ${SHADING_PR} ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBHPDF_STATIC) @@ -20,7 +32,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib ${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib) endif() diff --git a/ports/liblemon/CONTROL b/ports/liblemon/CONTROL index 704f02d9a..3e072b7ae 100644 --- a/ports/liblemon/CONTROL +++ b/ports/liblemon/CONTROL @@ -1,3 +1,3 @@ Source: liblemon -Version: 1.3.1-2 +Version: 1.3.1-3 Description: Library for Efficient Modeling and Optimization in Networks diff --git a/ports/liblemon/portfile.cmake b/ports/liblemon/portfile.cmake index 6cc2c9618..689903024 100644 --- a/ports/liblemon/portfile.cmake +++ b/ports/liblemon/portfile.cmake @@ -6,19 +6,20 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") endif() set(VERSION 1.3.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lemon-${VERSION}) + vcpkg_download_distfile(ARCHIVE URLS "http://lemon.cs.elte.hu/pub/sources/lemon-${VERSION}.zip" FILENAME "lemon-${VERSION}.zip" SHA512 86d15914b8c3cd206a20c37dbe3b8ca4b553060567a07603db7b6f8dd7dcf9cb043cca31660ff1b7fb77e359b59fac5ca0aab57fd415fda5ecca0f42eade6567 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/fixup-targets.patch + "cmake.patch" + "fixup-targets.patch" ) vcpkg_configure_cmake( diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL index 20c26f980..c94576a3f 100644 --- a/ports/liblzma/CONTROL +++ b/ports/liblzma/CONTROL @@ -1,3 +1,3 @@ Source: liblzma
-Version: 5.2.4
+Version: 5.2.4-1
Description: Compression library with an API similar to that of zlib.
diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index 26b8bff78..5534b10e4 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -6,11 +6,8 @@ vcpkg_from_github( REF v5.2.4 SHA512 fce7dc65e77a9b89dbdd6192cb37efc39e3f2cf343f79b54d2dfcd845025dab0e1d5b0f59c264eab04e5cbaf914eeb4818d14cdaac3ae0c1c5de24418656a4b7 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/v5.2.3-b3437cea7b - PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-uwp-builds.patch" + PATCHES + enable-uwp-builds.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL index c1dc45c3e..820a861c6 100644 --- a/ports/libmikmod/CONTROL +++ b/ports/libmikmod/CONTROL @@ -1,4 +1,4 @@ Source: libmikmod -Version: 3.3.11.1-1 +Version: 3.3.11.1-2 Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm. Build-Depends: openal-soft diff --git a/ports/libmikmod/fix-missing-dll.patch b/ports/libmikmod/fix-missing-dll.patch new file mode 100644 index 000000000..a15c2400c --- /dev/null +++ b/ports/libmikmod/fix-missing-dll.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 53a174e..b4d31d3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -856,11 +856,19 @@ INSTALL(
+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
+ )
+
+-INSTALL(
+- FILES "${CMAKE_BINARY_DIR}/libmikmod-config"
+- PERMISSIONS GROUP_EXECUTE GROUP_READ OWNER_EXECUTE OWNER_READ OWNER_WRITE WORLD_EXECUTE WORLD_READ
+- DESTINATION "bin"
+-)
++IF(WIN32)
++ SET(LIB_SUFFIX_USED ".dll")
++ELSEIF(UNIX)
++ SET(LIB_SUFFIX_USED ".so")
++ELSEIF(APPLE)
++ SET(LIB_SUFFIX_USED ".dylib")
++ELSE()
++ SET(LIB_SUFFIX_USED)
++ENDIF()
++
++IF(NOT ENABLE_STATIC)
++ INSTALL(FILES "${CMAKE_BINARY_DIR}/mikmod${LIB_SUFFIX_USED}" DESTINATION "bin")
++ENDIF()
+
+ INSTALL(
+ FILES
diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake index 1231f5bfa..3ff7ecb52 100644 --- a/ports/libmikmod/portfile.cmake +++ b/ports/libmikmod/portfile.cmake @@ -11,13 +11,19 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmikmod-3.3.11.1) + vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/mikmod/libmikmod/3.3.11.1/libmikmod-3.3.11.1.tar.gz" FILENAME "libmikmod-3.3.11.1.tar.gz" SHA512 f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-missing-dll.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -49,4 +55,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif()
\ No newline at end of file +endif() diff --git a/ports/libmodbus/CONTROL b/ports/libmodbus/CONTROL index 1fd7d4791..ef880d2a0 100644 --- a/ports/libmodbus/CONTROL +++ b/ports/libmodbus/CONTROL @@ -1,3 +1,3 @@ Source: libmodbus
-Version: 3.1.4-1
+Version: 3.1.4-2
Description: libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol
diff --git a/ports/libmodbus/portfile.cmake b/ports/libmodbus/portfile.cmake index 8d6f2c062..95e3b8720 100644 --- a/ports/libmodbus/portfile.cmake +++ b/ports/libmodbus/portfile.cmake @@ -24,3 +24,5 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake") # Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodbus RENAME copyright)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
\ No newline at end of file diff --git a/ports/libmodplug/automagically-define-modplug-static.patch b/ports/libmodplug/001-automagically-define-modplug-static.patch index eaa7e6ca6..d0df45473 100644 --- a/ports/libmodplug/automagically-define-modplug-static.patch +++ b/ports/libmodplug/001-automagically-define-modplug-static.patch @@ -1,7 +1,7 @@ -diff --git a/libmodplug/modplug.h b/libmodplug/modplug.h +diff --git a/src/modplug.h b/src/modplug.h index 3ffbf9d..fd19ae5 100644 ---- a/libmodplug/modplug.h -+++ b/libmodplug/modplug.h +--- a/src/modplug.h ++++ b/src/modplug.h @@ -11,6 +11,8 @@ extern "C" { #endif diff --git a/ports/libmodplug/002-detect_sinf.patch b/ports/libmodplug/002-detect_sinf.patch new file mode 100644 index 000000000..784e2e663 --- /dev/null +++ b/ports/libmodplug/002-detect_sinf.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2ada51b..468f1a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,6 +4,7 @@ project(libmodplug) + add_definitions(-DMODPLUG_BUILD) + + include (CheckFunctionExists) ++include (CheckIncludeFile) + + include_directories(AFTER + src +@@ -11,6 +12,10 @@ include_directories(AFTER + ${PROJECT_BINARY_DIR} + ) + ++if (UNIX) ++ set (CMAKE_REQUIRED_LIBRARIES m) ++endif() ++ + if (WIN32) + add_definitions(-D_USE_MATH_DEFINES) + add_definitions(-DNOMINMAX) +@@ -44,6 +49,11 @@ if (WIN32 AND NOT (MINGW OR MSYS)) + "Compilation may fail if inttypes.h is not natively supported by the compiler." + "You can get inttypes.h from http://code.google.com/p/msinttypes/") + endif() ++else() ++ check_include_file("stdint.h" HAVE_STDINT) ++ if (HAVE_STDINT) ++ add_definitions(-DHAVE_STDINT_H) ++ endif() + endif() + + check_function_exists("setenv" HAVE_SETENV) diff --git a/ports/libmodplug/CONTROL b/ports/libmodplug/CONTROL index e0cc81a3b..2a6cb4638 100644 --- a/ports/libmodplug/CONTROL +++ b/ports/libmodplug/CONTROL @@ -1,3 +1,3 @@ Source: libmodplug
-Version: 0.8.9.0-1
+Version: 0.8.9.0-4
Description: The ModPlug mod file playing library.
diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake index bac734084..287616088 100644 --- a/ports/libmodplug/portfile.cmake +++ b/ports/libmodplug/portfile.cmake @@ -1,14 +1,30 @@ -
set(MODPLUG_HASH 5a39f5913d07ba3e61d8d5afdba00b70165da81d)
+
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmodplug-${MODPLUG_HASH})
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/Konstanty/libmodplug/archive/${MODPLUG_HASH}.zip"
- FILENAME "libmodplug-${MODPLUG_HASH}.zip"
- SHA512 71b1314c44c98694c66ac17b638e997b99abc1ad61f7ac2e971000bdd4276d50d538259f4ee4dd39a3f672d28d3d322a32c83a9be0b1ffe5099ecc81273b5b55)
-vcpkg_extract_source_archive(${ARCHIVE})
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ vcpkg_from_github(ARCHIVE
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Konstanty/libmodplug
+ REF ${MODPLUG_HASH}
+ SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1
+ PATCHES
+ "001-automagically-define-modplug-static.patch"
+ "002-detect_sinf.patch"
+ )
+else()
+ vcpkg_from_github(ARCHIVE
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO JackBister/libmodplug
+ REF ${MODPLUG_HASH}
+ SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1
+ PATCHES
+ "002-detect_sinf.patch"
+ )
+endif()
+
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA)
+
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
@@ -19,11 +35,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/debug/bin/modplug.dll)
vcpkg_copy_pdbs()
-else()
- vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/automagically-define-modplug-static.patch)
endif()
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodplug)
diff --git a/ports/libmspack/CONTROL b/ports/libmspack/CONTROL index b881f614f..cf08e5acc 100644 --- a/ports/libmspack/CONTROL +++ b/ports/libmspack/CONTROL @@ -1,4 +1,4 @@ Source: libmspack -Version: 0.6 +Version: 0.10.1 Build-Depends: Description: libmspack is a portable library for some loosely related Microsoft compression formats. diff --git a/ports/libmspack/portfile.cmake b/ports/libmspack/portfile.cmake index fe75e2edd..759f01724 100644 --- a/ports/libmspack/portfile.cmake +++ b/ports/libmspack/portfile.cmake @@ -1,14 +1,14 @@ include(vcpkg_common_functions) set(LIB_NAME libmspack) -set(LIB_VERSION 0.6alpha) +set(LIB_VERSION 0.10.1alpha) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://www.cabextract.org.uk/libmspack/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 7ba4a584d335c2d703628a3c179bc0d323574632357cdfe04622f960dcc4ef970b5739799397b6802d44a312f7ed9d589b4be223facf044bbfdbfd76d9c7405d + SHA512 a7b5f7caa49190c5021f3e768b92f2e51cc0ce685c9ab6ed6fb36de885c73231b58d47a8a3b5c5aa5c9ac56c25c500eb683d84dbf11f09f97f6cb4fff5adc245 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/libnice/CMakeLists.txt b/ports/libnice/CMakeLists.txt index 7454a0046..bde3a34ac 100644 --- a/ports/libnice/CMakeLists.txt +++ b/ports/libnice/CMakeLists.txt @@ -1,8 +1,14 @@ cmake_minimum_required(VERSION 3.0) -project(libnice C) +project(libnice + LANGUAGES C + VERSION 0.1.15) SET (this_target libnice) -add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) +add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -D_SCL_SECURE_NO_WARNINGS + -DHAVE_OPENSSL + -DPACKAGE_STRING="${PROJECT_VERSION}") configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/config.h ${CMAKE_SOURCE_DIR}/config.h COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/libnice.def ${CMAKE_SOURCE_DIR}/libnice.def COPYONLY) @@ -13,6 +19,7 @@ find_library(GOBJECT_LIBRARY gobject-2.0) find_library(GIO_LIBRARY gio-2.0) find_library(IPHLPAPI_LIBRARY iphlpapi) find_library(WS2_32_LIB ws2_32) +find_package(OpenSSL REQUIRED) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/agent @@ -24,21 +31,22 @@ include_directories( SET (SRCS ./agent/address.c + ./agent/agent-enum-types.c ./agent/agent.c ./agent/candidate.c ./agent/component.c ./agent/conncheck.c ./agent/debug.c ./agent/discovery.c - ./agent/discovery.c ./agent/inputstream.c ./agent/interfaces.c ./agent/iostream.c ./agent/outputstream.c ./agent/pseudotcp.c ./agent/stream.c - ./random/random.c ./random/random-glib.c + ./random/random.c + ./random/test.c ./socket/http.c ./socket/pseudossl.c ./socket/socket.c @@ -47,12 +55,10 @@ SET (SRCS ./socket/tcp-bsd.c ./socket/tcp-passive.c ./socket/udp-bsd.c - ./socket/udp-turn.c ./socket/udp-turn-over-tcp.c + ./socket/udp-turn.c ./stun/debug.c - ./stun/md5.c ./stun/rand.c - ./stun/sha1.c ./stun/stun5389.c ./stun/stunagent.c ./stun/stuncrc32.c @@ -66,54 +72,56 @@ SET (SRCS ./libnice.def ) SET(HEADERS - ./config.h ./agent/address.h - ./agent/agent.h + ./agent/agent-enum-types.h ./agent/agent-priv.h + ./agent/agent.h ./agent/candidate.h ./agent/component.h ./agent/conncheck.h ./agent/debug.h ./agent/discovery.h - ./agent/discovery.h ./agent/inputstream.h ./agent/interfaces.h ./agent/iostream.h ./agent/outputstream.h ./agent/pseudotcp.h ./agent/stream.h - ./random/random.h + ./config.h + ./nice/nice.h ./random/random-glib.h + ./random/random.h ./socket/http.h ./socket/pseudossl.h + ./socket/socket-priv.h ./socket/socket.h ./socket/socks5.h ./socket/tcp-active.h ./socket/tcp-bsd.h ./socket/tcp-passive.h ./socket/udp-bsd.h - ./socket/udp-turn.h ./socket/udp-turn-over-tcp.h + ./socket/udp-turn.h ./stun/constants.h ./stun/debug.h - ./stun/md5.h ./stun/rand.h - ./stun/sha1.h ./stun/stun5389.h ./stun/stunagent.h ./stun/stuncrc32.h ./stun/stunhmac.h ./stun/stunmessage.h + ./stun/tools/stund.h ./stun/usages/bind.h ./stun/usages/ice.h ./stun/usages/timer.h ./stun/usages/turn.h ./stun/utils.h ./stun/win32_common.h + ./win32/vs9/config.h ) add_library(libnice ${SRCS} ${HEADERS}) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4244 /wd4005 /wd4391 /wd4142 /wd4267") -target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY}) +target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY} OpenSSL::SSL) install(TARGETS libnice RUNTIME DESTINATION bin ARCHIVE DESTINATION lib diff --git a/ports/libnice/CONTROL b/ports/libnice/CONTROL index de7b0b67e..7a33f1423 100644 --- a/ports/libnice/CONTROL +++ b/ports/libnice/CONTROL @@ -1,4 +1,4 @@ Source: libnice -Version: 0.1.13-1 +Version: 0.1.15 Description: Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389). -Build-Depends: glib +Build-Depends: glib, openssl diff --git a/ports/libnice/portfile.cmake b/ports/libnice/portfile.cmake index 4d4a97bae..2c0f87afe 100644 --- a/ports/libnice/portfile.cmake +++ b/ports/libnice/portfile.cmake @@ -1,13 +1,15 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libnice-0.1.13) - -vcpkg_download_distfile(ARCHIVE - URLS "https://nice.freedesktop.org/releases/libnice-0.1.13.tar.gz" - FILENAME "libnice-0.1.13.tar.gz" - SHA512 c9bb81e8cd0b4e3673dba07ce08a16dd8821831339b44f1006510cdc09f9ae4c6eb7d43230711a2509867acb8d7df71821c411830dbf71c5a5d7e802f14a32c1 +vcpkg_download_distfile( + ARCHIVE + URLS "https://nice.freedesktop.org/releases/libnice-0.1.15.tar.gz" + FILENAME "libnice-0.1.15.tar.gz" + SHA512 60a8bcca06c0ab300dfabbf13e45aeac2085d553c420c5cc4d2fdeb46b449b2b9c9aee8015b0662c16bd1cecf5a49824b7e24951a8a0b66a87074cb00a619c0c ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libodb-sqlite/CMakeLists.txt b/ports/libodb-sqlite/CMakeLists.txt index 99fb0c236..79f9bc2bf 100644 --- a/ports/libodb-sqlite/CMakeLists.txt +++ b/ports/libodb-sqlite/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(libodb-sqlite VERSION 2.4.0 LANGUAGES CXX) find_package(odb 2.4.0 REQUIRED COMPONENTS libodb) -find_package(sqlite3 REQUIRED) +find_package(sqlite3 CONFIG) configure_file(config.unix.h.in ${CMAKE_CURRENT_SOURCE_DIR}/odb/sqlite/details/config.h COPYONLY) diff --git a/ports/libodb-sqlite/CONTROL b/ports/libodb-sqlite/CONTROL index 89be9ee88..6a98869bd 100644 --- a/ports/libodb-sqlite/CONTROL +++ b/ports/libodb-sqlite/CONTROL @@ -1,4 +1,4 @@ Source: libodb-sqlite -Version: 2.4.0-1 +Version: 2.4.0-2 Description: Sqlite support for the ODB ORM library Build-Depends: libodb, sqlite3 diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 7f3de459d..378e1a139 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.36 +Version: 1.6.36-1 Build-Depends: zlib Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index 01edce90d..51237b675 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -6,13 +6,9 @@ vcpkg_from_github( REF v1.6.36 SHA512 aeb00b48347c9e84d31995b3fe7e40580029734aa8103d774eee5745f5ca1fd1fd91a15f32d492277ab94346e4e7f731ee9bfea1783f930094f9f87eb3d9397d HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch - ${CMAKE_CURRENT_LIST_DIR}/skip-install-symlink.patch + "use-abort-on-all-platforms.patch" + "skip-install-symlink.patch" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/libqglviewer/CONTROL b/ports/libqglviewer/CONTROL new file mode 100644 index 000000000..c9e66ef18 --- /dev/null +++ b/ports/libqglviewer/CONTROL @@ -0,0 +1,4 @@ +Source: libqglviewer
+Version: 2.7.1-1
+Description: libQGLViewer is an open source C++ library based on Qt that eases the creation of OpenGL 3D viewers.
+Build-Depends: qt5-base
diff --git a/ports/libqglviewer/portfile.cmake b/ports/libqglviewer/portfile.cmake new file mode 100644 index 000000000..f57092521 --- /dev/null +++ b/ports/libqglviewer/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO GillesDebunne/libQGLViewer
+ REF 28a23f14997dc2e08990b884c07075b48979cac7
+ SHA512 58058543e07857f8b1480301b72f789290eee2d65382bee29773bcc1e3f45cedcee33b762bdb870b6cae8a0daab38ebdecde40e2f02720cf0f6fcf10f2007f25
+ HEAD_REF master
+ PATCHES "use-default-config-on-all-platforms.patch"
+)
+
+vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}/QGLViewer/QGLViewer.pro)
+
+vcpkg_build_qmake()
+
+file(INSTALL ${SOURCE_PATH}/QGLViewer DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h")
+if(CMAKE_HOST_WIN32)
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewer2.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+ file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewerd2.dll ${SOURCE_PATH}/QGLViewer/QGLViewerd2.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewer2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewerd2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ else()
+ file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewerd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ endif()
+elseif(CMAKE_HOST_APPLE)
+ file(INSTALL ${SOURCE_PATH}/QGLViewer/libQGLViewer.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ file(INSTALL ${SOURCE_PATH}/QGLViewer/libQGLViewer.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+endif()
+
+file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqglviewer RENAME copyright)
diff --git a/ports/libqglviewer/use-default-config-on-all-platforms.patch b/ports/libqglviewer/use-default-config-on-all-platforms.patch new file mode 100644 index 000000000..bd8281f22 --- /dev/null +++ b/ports/libqglviewer/use-default-config-on-all-platforms.patch @@ -0,0 +1,33 @@ +diff --git a/QGLViewer/QGLViewer.pro b/QGLViewer/QGLViewer.pro
+index e0205e5..6db4c81 100644
+--- a/QGLViewer/QGLViewer.pro
++++ b/QGLViewer/QGLViewer.pro
+@@ -108,9 +108,6 @@ contains( DEFINES, NO_VECTORIAL_RENDER ) {
+ # -- U n i x --
+ # ---------------
+ unix {
+- CONFIG -= debug debug_and_release
+- CONFIG *= release
+-
+ # INCLUDE_DIR and LIB_DIR specify where to install the include files and the library.
+ # Use qmake INCLUDE_DIR=... LIB_DIR=... , or qmake PREFIX=... to customize your installation.
+ isEmpty( PREFIX ) {
+@@ -250,9 +247,6 @@ macx|darwin-g++ {
+ # -- W i n d o w s --
+ # ---------------------
+ win32 {
+- # Windows requires a debug lib version to link against debug applications
+- CONFIG *= debug_and_release build_all
+-
+ # Needed by Intel C++, (icl.exe) so that WINGDIAPI is a defined symbol in gl.h.
+ DEFINES *= WIN32
+
+@@ -279,7 +273,7 @@ win32 {
+ QMAKE_CXXFLAGS *= -TP -GR
+ DEFINES += NOMINMAX
+ win32-msvc {
+- QMAKE_CXXFLAGS *= -EH -FS
++ QMAKE_CXXFLAGS *= -EHs -FS
+ } else {
+ QMAKE_CXXFLAGS *= -EHs
+ }
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/libsodium/CONTROL b/ports/libsodium/CONTROL index 643ba68f4..b84d40caf 100644 --- a/ports/libsodium/CONTROL +++ b/ports/libsodium/CONTROL @@ -1,3 +1,3 @@ Source: libsodium -Version: 1.0.17 +Version: 1.0.17-1 Description: A modern and easy-to-use crypto library diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 42e9150bd..60628b08e 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -6,12 +6,8 @@ vcpkg_from_github( REF 1.0.17 SHA512 faf6ab57d113b6b1614b51390823a646f059018327b6f493e9e918a908652d0932a75a1a6683032b7a3869f516f387d67acdf944568387feddff7b2f5b6e77d6 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disable-tests.patch + "disable-tests.patch" ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index aff3dbdf1..9f652f461 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,4 +1,8 @@ Source: libssh -Version: 0.7.6 +Version: 0.7.6-1 Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side -Build-Depends: zlib, openssl +Build-Depends: openssl + +Feature: zlib +Description: libssh with zlib +Build-Depends: zlib diff --git a/ports/libssh/fix-config-cmake.patch b/ports/libssh/fix-config-cmake.patch new file mode 100644 index 000000000..bb369359f --- /dev/null +++ b/ports/libssh/fix-config-cmake.patch @@ -0,0 +1,77 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a063556..68e559e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,6 +11,8 @@ set(APPLICATION_VERSION_MINOR "7")
+ set(APPLICATION_VERSION_PATCH "6")
+
+ set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
++set(CMAKE_INSTALL_DIR lib/cmake/libssh CACHE STRING
++ "The subdirectory where CMake package config files should be installed")
+
+ # SOVERSION scheme: CURRENT.AGE.REVISION
+ # If there was an incompatible interface change:
+@@ -114,14 +116,29 @@ endif (UNIX)
+ set(LIBSSH_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
+ set(LIBSSH_THREADS_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
+
+-configure_file(${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake @ONLY)
+-configure_file(${PROJECT_NAME}-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake @ONLY)
++include(CMakePackageConfigHelpers)
++configure_package_config_file(
++ ${PROJECT_NAME}-config.cmake.in
++ ${PROJECT_NAME}-config.cmake
++ INSTALL_DESTINATION ${CMAKE_INSTALL_DIR}
++ PATH_VARS
++ INCLUDE_INSTALL_DIR
++ CMAKE_INSTALL_DIR
++)
++configure_package_config_file(
++ ${PROJECT_NAME}-config-version.cmake.in
++ ${PROJECT_NAME}-config-version.cmake
++ INSTALL_DESTINATION ${CMAKE_INSTALL_DIR}
++ PATH_VARS
++ INCLUDE_INSTALL_DIR
++ CMAKE_INSTALL_DIR
++)
+ install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
+ DESTINATION
+- ${CMAKE_INSTALL_DIR}/${PROJECT_NAME}
++ ${CMAKE_INSTALL_DIR}
+ COMPONENT
+ devel
+ )
+diff --git a/libssh-config.cmake.in b/libssh-config.cmake.in
+index fa9cecf..b17fdbd 100644
+--- a/libssh-config.cmake.in
++++ b/libssh-config.cmake.in
+@@ -1,13 +1,22 @@
+ get_filename_component(LIBSSH_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
++get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
+
+ if (EXISTS "${LIBSSH_CMAKE_DIR}/CMakeCache.txt")
+ # In build tree
+ include(${LIBSSH_CMAKE_DIR}/libssh-build-tree-settings.cmake)
+ else()
+- set(LIBSSH_INCLUDE_DIR @INCLUDE_INSTALL_DIR@)
++ set(LIBSSH_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include/")
++ set(LIBSSH_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/")
+ endif()
+
+-set(LIBSSH_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@)
+-set(LIBSSH_LIBRARIES @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@)
++if(CMAKE_BUILD_TYPE STREQUAL "Release")
++ set(LIBSSH_LIBRARY "${PACKAGE_PREFIX_DIR}/lib/ssh.lib")
++ set(LIBSSH_LIBRARIES "${PACKAGE_PREFIX_DIR}/lib/ssh.lib")
+
+-set(LIBSSH_THREADS_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_THREADS_LIBRARY_NAME@)
++ set(LIBSSH_THREADS_LIBRARY "${PACKAGE_PREFIX_DIR}/lib/ssh.lib")
++elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
++ set(LIBSSH_LIBRARY "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib")
++ set(LIBSSH_LIBRARIES "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib")
++
++ set(LIBSSH_THREADS_LIBRARY "${PACKAGE_PREFIX_DIR}/debug/lib/ssh.lib")
++endif()
diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 89d2af1fd..e137f823f 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -26,10 +26,17 @@ vcpkg_extract_source_archive_ex( only-one-flavor-threads.patch "${WINPATCH}" missing-includes.patch + fix-config-cmake.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB) +if(zlib IN_LIST FEATURES) + set(WITH_ZLIB ON) +else() + set(WITH_ZLIB OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -39,6 +46,8 @@ vcpkg_configure_cmake( -DWITH_TESTING=OFF -DWITH_NACL=OFF -DWITH_GSSAPI=OFF + -DWITH_ZLIB=${WITH_ZLIB} + -DCMAKE_INSTALL_DIR=share/libssh ) vcpkg_install_cmake() @@ -62,7 +71,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/d file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # The installed cmake config files are nonfunctional (0.7.5) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake ${CURRENT_PACKAGES_DIR}/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh)
\ No newline at end of file diff --git a/ports/libssh/usage b/ports/libssh/usage new file mode 100644 index 000000000..3681ac112 --- /dev/null +++ b/ports/libssh/usage @@ -0,0 +1,5 @@ +The package libssh is compatible with built-in CMake targets:
+
+ find_package(libssh CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE ${LIBSSH_LIBRARIES})
+ target_include_directories(main PRIVATE ${LIBSSH_INCLUDE_DIRS})
diff --git a/ports/libui/fix-cmake.patch b/ports/libui/001-fix-cmake.patch index 3d206584b..3d206584b 100644 --- a/ports/libui/fix-cmake.patch +++ b/ports/libui/001-fix-cmake.patch diff --git a/ports/libui/002-fix-macosx-build.patch b/ports/libui/002-fix-macosx-build.patch new file mode 100644 index 000000000..a5b91c7a2 --- /dev/null +++ b/ports/libui/002-fix-macosx-build.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 50c997f..a23b84d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -16,7 +16,13 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
+ # TODO figure out what other variables must be set with CACHE
+ # TODO figure out if FORCE is needed here
+ # TODO figure out whether STRING "" is best or if something else is better; also what FORCE does because I forget and later I say it's needed
+-set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "" FORCE)
++
++# VCPKG PATCH NOTE: Fix build on MacOS
++# Due to a bug in CMake (https://gitlab.kitware.com/cmake/cmake/issues/18396) we change CMAKE_OSX_DEPLOYMENT_TARGET to "10.9".
++# See the discussion here:
++# * https://github.com/andlabs/libui/issues/422
++# * https://github.com/andlabs/libui/issues/457
++set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
+
+ # we want to disable incremental linking
+ # see also:
diff --git a/ports/libui/CONTROL b/ports/libui/CONTROL index d1a70f0d5..919f7a12c 100644 --- a/ports/libui/CONTROL +++ b/ports/libui/CONTROL @@ -1,3 +1,3 @@ Source: libui -Version: 2018-11-03 +Version: 2018-11-03-1 Description: Simple and portable (but not inflexible) native GUI library in C. diff --git a/ports/libui/portfile.cmake b/ports/libui/portfile.cmake index 4f543a89b..77c2d44df 100644 --- a/ports/libui/portfile.cmake +++ b/ports/libui/portfile.cmake @@ -7,7 +7,8 @@ vcpkg_from_github( SHA512 3a9fb27d0c376479f58ba2fc5be3579efa5f462776a7e725313b92413ce78f3ca60897e63b580c419eeaee2cd2101de2be1ee5af80a547ef433c6284a3053d45 HEAD_REF master PATCHES - fix-cmake.patch + "001-fix-cmake.patch" + "002-fix-macosx-build.patch" ) vcpkg_configure_cmake( 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/libuv/CMakeLists.txt b/ports/libuv/CMakeLists.txt index 0f46ec07e..b51630d78 100644 --- a/ports/libuv/CMakeLists.txt +++ b/ports/libuv/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.5) project(libuv C) +find_package(Threads REQUIRED) + file(GLOB UV_SOURCES_COMMON src/*.c) file(GLOB UV_SOURCES_UNIX @@ -51,7 +53,7 @@ file(GLOB UV_SOURCES_WIN src/win/*.c) if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") - target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32) + target_link_libraries(libuv PRIVATE iphlpapi psapi shell32 userenv ws2_32) elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_DARWIN}) elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") @@ -60,6 +62,7 @@ else() # Assume some Linux variant add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_LINUX}) endif() +target_link_libraries(libuv PRIVATE Threads::Threads) target_include_directories(libuv PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>) set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 611be7070..8f452cb4f 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.25.0 +Version: 1.27.0 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 8179c28bb..d870d8e76 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.25.0 - SHA512 d1024f9193e2ad69cc670441b74ff7c63ca7d295e9a7a43c90da6781a39352687465bfe7e852d6e9085c21821bf8d11c10139c7229759fdce567d809c605acfd + REF v1.27.0 + SHA512 42dfb7bee21f3f875ae5e6e4531aff52cff59d4c000f9cee1bde1b12c127beb7adefd6d6a11c6f0180868ee5ef15351a21a36c10b1be0aa7bedc15f0c50f87e0 HEAD_REF v1.x ) diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL index 355d89e80..d60bd25af 100644 --- a/ports/libvorbis/CONTROL +++ b/ports/libvorbis/CONTROL @@ -1,4 +1,4 @@ Source: libvorbis -Version: 1.3.6-112d3bd-1 +Version: 1.3.6-9eadecc-1 Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format. Build-Depends: libogg diff --git a/ports/libvorbis/portfile.cmake b/ports/libvorbis/portfile.cmake index 83db50e01..504aeaf22 100644 --- a/ports/libvorbis/portfile.cmake +++ b/ports/libvorbis/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/vorbis - REF 112d3bd0aaacad51305e1464d4b381dabad0e88b - SHA512 df20e072a5e024ca2b8fc0e2890bb8968c0c948a833149a6026d2eaf6ab57b88b6d00d0bfb3b8bfcf879c7875e7cfacb8c6bf454bfc083b41d76132c567ff7ae + REF 9eadeccdc4247127d91ac70555074239f5ce3529 + SHA512 26d6826eba57fd47ebf426ba5a0c961c87ff62e2bb4185190e4985de9ac49aa493f77a1bd01d3d0757eb89a8494ba7de3a506f76bf5c8942ac1de3f75746a301 HEAD_REF master PATCHES 0001-Dont-export-vorbisenc-functions.patch diff --git a/ports/libwebm/CONTROL b/ports/libwebm/CONTROL index 7a9bccfc7..959d5bb24 100644 --- a/ports/libwebm/CONTROL +++ b/ports/libwebm/CONTROL @@ -1,3 +1,3 @@ Source: libwebm -Version: 1.0.0.27-3 +Version: 1.0.0.27-4 Description: WebM File Parser diff --git a/ports/libwebm/portfile.cmake b/ports/libwebm/portfile.cmake index 7a233ecb6..9817a5bc3 100644 --- a/ports/libwebm/portfile.cmake +++ b/ports/libwebm/portfile.cmake @@ -24,8 +24,18 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() + +if((NOT VCPKG_CMAKE_SYSTEM_NAME) AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/libwebm.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libwebmd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/webm.lib ${CURRENT_PACKAGES_DIR}/debug/lib/webmd.lib) +endif() + vcpkg_copy_pdbs() +if((NOT VCPKG_CMAKE_SYSTEM_NAME) AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/libwebm.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libwebmd.pdb) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebm) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 9ffa6426d..ed3ff55ca 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,8 +1,7 @@ Source: libwebp -Version: 1.0.2-1 +Version: 1.0.2-2 Description: Lossy compression of digital photographic images. Build-Depends: opengl -Default-Features: all Feature: all Description: enable all webp features diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index 3d49985ee..12142f4ff 100644 --- a/ports/libxml2/CMakeLists.txt +++ b/ports/libxml2/CMakeLists.txt @@ -13,6 +13,7 @@ find_package(unofficial-iconv REQUIRED) file(GLOB SOURCES *.c) list(FILTER SOURCES EXCLUDE REGEX "/(run|test|trio)[^/]*$") list(FILTER SOURCES EXCLUDE REGEX "xml(lint|catalog).c$") +list(FILTER SOURCES EXCLUDE REGEX "rngparser\.c$") # Generate xmlexports with fixed definition of LIBXML_STATIC file(READ include/libxml/xmlexports.h XMLEXPORTS_H) @@ -23,7 +24,7 @@ else() endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h "${XMLEXPORTS_H}") -if(CMAKE_SYSTEM_NAME STREQUAL "Windows") +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") configure_file(include/win32config.h config.h COPYONLY) elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") configure_file("${PORT_DIR}/config.osx.h" config.h COPYONLY) @@ -33,21 +34,86 @@ else() message(FATAL_ERROR "No config.h checked in for the target platform. Please run ./configure for libxml2 and add the resulting config.h into this port.") endif() +message(STATUS "Reading version info from configure.ac") + +file(STRINGS "configure.ac" + _libxml_version_defines REGEX "LIBXML_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") + +foreach(ver ${_libxml_version_defines}) + if(ver MATCHES "LIBXML_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") + set(LIBXML_${CMAKE_MATCH_1}_VERSION "${CMAKE_MATCH_2}" CACHE INTERNAL "") + endif() +endforeach() + +set(VERSION ${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}.${LIBXML_MICRO_VERSION}) +math(EXPR LIBXML_VERSION_NUMBER + "${LIBXML_MAJOR_VERSION} * 10000 + ${LIBXML_MINOR_VERSION} * 100 + ${LIBXML_MICRO_VERSION}") + +message(STATUS "LIBXML_MAJOR_VERSION: ${LIBXML_MAJOR_VERSION}") +message(STATUS "LIBXML_MINOR_VERSION: ${LIBXML_MINOR_VERSION}") +message(STATUS "LIBXML_MICRO_VERSION: ${LIBXML_MICRO_VERSION}") +message(STATUS "VERSION: ${VERSION}") +message(STATUS "LIBXML_VERSION_NUMBER: ${LIBXML_VERSION_NUMBER}") + +set(WITH_TRIO 0) +set(WITH_THREADS 1) +set(WITH_THREAD_ALLOC 0) +set(WITH_TREE 1) +set(WITH_OUTPUT 1) +set(WITH_PUSH 1) +set(WITH_READER 1) +set(WITH_PATTERN 1) +set(WITH_WRITER 1) +set(WITH_SAX1 1) +set(WITH_FTP 1) +set(WITH_HTTP 1) +set(WITH_VALID 1) +set(WITH_HTML 1) +set(WITH_LEGACY 1) +set(WITH_C14N 1) +set(WITH_CATALOG 1) +set(WITH_DOCB 1) +set(WITH_XPATH 1) +set(WITH_XPTR 1) +set(WITH_XINCLUDE 1) +set(WITH_ICONV 1) +set(WITH_ICU 0) +set(WITH_ISO8859X 1) +set(WITH_DEBUG 1) +set(WITH_MEM_DEBUG 0) +set(WITH_RUN_DEBUG 0) +set(WITH_REGEXPS 1) +set(WITH_SCHEMAS 1) +set(WITH_SCHEMATRON 1) +set(WITH_MODULES 1) +set(MODULE_EXTENSION ".so") +set(WITH_ZLIB 1) +set(WITH_LZMA 1) + +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WITH_CATALOG 0) + set(WITH_MODULES 0) +endif() + +message(STATUS "Generating xmlversion.h") + +configure_file(include/libxml/xmlversion.h.in include/libxml/xmlversion.h) + add_library(libxml2 ${SOURCES}) if(INSTALL_HEADERS) - file(GLOB PUBLIC_HEADERS include/libxml/*.h) + file(GLOB PUBLIC_HEADERS include/libxml/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/libxml/xmlversion.h) list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "xmlexports\\.h$") list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h) set_target_properties(libxml2 PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") endif() -target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} include ${LIBLZMA_INCLUDE_DIRS}) +target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBLZMA_INCLUDE_DIRS}) target_link_libraries(libxml2 PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv ZLIB::ZLIB ${LIBLZMA_LIBRARIES} ) -if(CMAKE_SYSTEM_NAME STREQUAL "Windows") +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") target_include_directories(libxml2 PRIVATE win32/vc10) target_link_libraries(libxml2 PRIVATE wsock32.lib @@ -55,6 +121,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ) target_compile_definitions(libxml2 PRIVATE -DHAVE_WIN32_THREADS + _WINSOCK_DEPRECATED_NO_WARNINGS ) endif() diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index f005d2367..d4b6c6b1b 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,4 +1,4 @@ Source: libxml2 -Version: 2.9.4-5 +Version: 2.9.9-4 Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index d55d4052d..de2dfe0af 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -1,11 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml2-2.9.4) -vcpkg_download_distfile(ARCHIVE - URLS "ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz" "http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz" - FILENAME "libxml2-2.9.4.tar.gz" - SHA512 f5174ab1a3a0ec0037a47f47aa47def36674e02bfb42b57f609563f84c6247c585dbbb133c056953a5adb968d328f18cbc102eb0d00d48eb7c95478389e5daf9 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GNOME/libxml2 + REF v2.9.9 + SHA512 bfcc08bd033f538a968205f0f9e2da4c3438ec2f35f017289783903365e13ed93d83f2f63c7497344a362b7418170ee586a5ecb45493e30feaa0f62b22a57b54 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -19,8 +20,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxml2/COPYING ${CURRENT_PACKAGES_DIR}/share/libxml2/copyright) +configure_file(${SOURCE_PATH}/Copyright ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# Install usage +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) vcpkg_copy_pdbs() diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index 68bed6547..b6ec9571a 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -1,7 +1,10 @@ _find_package(${ARGS})
if(LibXml2_FOUND)
find_package(LibLZMA)
- list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES})
+ find_package(ZLIB)
+
+ list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES})
+
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND LIBXML2_LIBRARIES
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib
@@ -9,5 +12,7 @@ if(LibXml2_FOUND) debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib
ws2_32)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ list(APPEND LIBXML2_LIBRARIES m)
endif()
endif()
diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index c318303dc..b3683b1a9 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,9 +1,13 @@ Source: libzip -Version: rel-1-5-1-vcpkg2 +Version: rel-1-5-2 Build-Depends: zlib -Default-Features: openssl +Default-Features: openssl, bzip2 Description: A library for reading, creating, and modifying zip archives. +Feature: bzip2 +Build-Depends: bzip2 +Description: Support bzip2-compressed zip archives + Feature: openssl Build-Depends: openssl Description: AES (encryption) support using OpenSSL diff --git a/ports/libzip/avoid_computation_on_void_pointer.patch b/ports/libzip/avoid_computation_on_void_pointer.patch new file mode 100644 index 000000000..cbd38bfa9 --- /dev/null +++ b/ports/libzip/avoid_computation_on_void_pointer.patch @@ -0,0 +1,13 @@ +diff --git a/lib/zip_source_winzip_aes_encode.c b/lib/zip_source_winzip_aes_encode.c
+
+--- a/lib/zip_source_winzip_aes_encode.c
++++ b/lib/zip_source_winzip_aes_encode.c
+@@ -163,7 +163,7 @@ winzip_aes_encrypt(zip_source_t *src, void *ud, void *data, zip_uint64_t length,
+ /* TODO: return partial read? */
+ return -1;
+ }
+- buffer_n += _zip_buffer_read(ctx->buffer, data + ret, length - (zip_uint64_t)ret);
++ buffer_n += _zip_buffer_read(ctx->buffer, (zip_uint8_t *)data + ret, length - (zip_uint64_t)ret);
+ }
+
+ return (zip_int64_t)(buffer_n + (zip_uint64_t)ret);
diff --git a/ports/libzip/cmake_dont_build_more_than_needed.patch b/ports/libzip/cmake_dont_build_more_than_needed.patch deleted file mode 100644 index bb0af9749..000000000 --- a/ports/libzip/cmake_dont_build_more_than_needed.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 69cdb8b..4c985fb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -149,10 +149,10 @@ ENABLE_TESTING() - - # Targets - ADD_SUBDIRECTORY(lib) --ADD_SUBDIRECTORY(man) --ADD_SUBDIRECTORY(src) --ADD_SUBDIRECTORY(regress) --ADD_SUBDIRECTORY(examples) -+#ADD_SUBDIRECTORY(man) -+#ADD_SUBDIRECTORY(src) -+#ADD_SUBDIRECTORY(regress) -+#ADD_SUBDIRECTORY(examples) - - # pkgconfig file - SET(prefix ${CMAKE_INSTALL_PREFIX}) diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index c4dee7221..92ef4109b 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -2,10 +2,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nih-at/libzip - REF rel-1-5-1 - SHA512 778f438f6354f030656baa5497b3154ad8fb764011d2a6925136f32e06dc0dcd1ed93fe05dbf7be619004a68cdabe5e34a83b988c1501ed67e9cfa4fa540350f + REF rel-1-5-2 + SHA512 5ba765c5d4ab47dff24bfa5e73b798046126fcc88b29d5d9ce9d77d035499ae91d90cc526f1f73bbefa07b7b68ff6cf77e912e5793859f801caaf2061cb20aee HEAD_REF master - PATCHES cmake_dont_build_more_than_needed.patch + PATCHES avoid_computation_on_void_pointer.patch ) # AES encryption @@ -14,12 +14,22 @@ if("openssl" IN_LIST FEATURES) set(USE_OPENSSL ON) endif() +set(USE_BZIP2 OFF) +if("bzip2" IN_LIST FEATURES) + set(USE_BZIP2 ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - # see https://github.com/nih-at/libzip/blob/rel-1-5-1/INSTALL.md - -DENABLE_OPENSSL=${USE_OPENSSL} + OPTIONS + -DBUILD_DOC=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_REGRESS=OFF + -DBUILD_TOOLS=OFF + # see https://github.com/nih-at/libzip/blob/rel-1-5-2/INSTALL.md + -DENABLE_OPENSSL=${USE_OPENSSL} + -DENABLE_BZIP2=${USE_BZIP2} ) vcpkg_install_cmake() diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index 39c8e4a65..1a59ed6e7 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: latest +Version: 2019.03.06 Description: A complete RTSP server application diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index 55d15a88c..d31a4a6c8 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -3,41 +3,38 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(VCPKG_LIBRARY_LINKAGE "static") endif() -if(NOT VCPKG_USE_HEAD_VERSION) - message(FATAL_ERROR "Live555 does not have persistent releases. Please re-run the installation with --head.") -else() - # The current Live555 version from http://www.live555.com/liveMedia/public/ - set(LIVE_VERSION latest) - - include(vcpkg_common_functions) - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}/live) - vcpkg_download_distfile(ARCHIVE - URLS "http://www.live555.com/liveMedia/public/live555-${LIVE_VERSION}.tar.gz" - FILENAME "live555-${LIVE_VERSION}.tar.gz" - SKIP_SHA512 - ) - - vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}) - - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - ) - - vcpkg_install_cmake() - - file(GLOB HEADERS - "${SOURCE_PATH}/BasicUsageEnvironment/include/*.h*" - "${SOURCE_PATH}/groupsock/include/*.h*" - "${SOURCE_PATH}/liveMedia/include/*.h*" - "${SOURCE_PATH}/UsageEnvironment/include/*.h*" - ) - - file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) - file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/live555 RENAME copyright) - - vcpkg_copy_pdbs() -endif() +# The current Live555 version from http://www.live555.com/live.2019.03.06 +set(LIVE_VERSION 2019.03.06) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}/live) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.live555.com/live.2019.03.06.tar.gz" + FILENAME "live555-${LIVE_VERSION}.tar.gz" + SHA512 cf3cbf57ec43d392fa82f06bd02f6d829208c9a9ec1c505d9eb6c5e2dd3393bbd8829b6216163deb8ea8356c180f30f610a639044a6941df5c9a92f29d4f1a75 +) + +vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(GLOB HEADERS + "${SOURCE_PATH}/BasicUsageEnvironment/include/*.h*" + "${SOURCE_PATH}/groupsock/include/*.h*" + "${SOURCE_PATH}/liveMedia/include/*.h*" + "${SOURCE_PATH}/UsageEnvironment/include/*.h*" +) + +file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/live555 RENAME copyright) + +vcpkg_copy_pdbs() + diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 9beb04e29..d4e631680 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,4 +1,4 @@ Source: llvm
-Version: 7.0.0
+Version: 7.0.0-2
Description: The LLVM Compiler Infrastructure
Build-Depends: atlmfc (windows)
diff --git a/ports/llvm/install-cmake-modules-to-share.patch b/ports/llvm/install-cmake-modules-to-share.patch index b5193beca..1a2b3b0db 100644 --- a/ports/llvm/install-cmake-modules-to-share.patch +++ b/ports/llvm/install-cmake-modules-to-share.patch @@ -1,10 +1,26 @@ -diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt -index ac4b0b7..13a271d 100644 ---- a/cmake/modules/CMakeLists.txt -+++ b/cmake/modules/CMakeLists.txt +diff -urN llvm-7.0.0.src-orig/cmake/modules/CMakeLists.txt llvm-7.0.0.src/cmake/modules/CMakeLists.txt +--- llvm-7.0.0.src-orig/cmake/modules/CMakeLists.txt 2018-07-27 13:57:51.000000000 +0300 ++++ llvm-7.0.0.src/cmake/modules/CMakeLists.txt 2019-03-26 14:56:34.645434190 +0200 @@ -1,4 +1,4 @@ -set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) +set(LLVM_INSTALL_PACKAGE_DIR share/llvm) set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") # First for users who use an installed LLVM, create the LLVMExports.cmake file. +diff -urN llvm-7.0.0.src-orig/tools/clang/cmake/modules/CMakeLists.txt llvm-7.0.0.src/tools/clang/cmake/modules/CMakeLists.txt +--- llvm-7.0.0.src-orig/tools/clang/cmake/modules/CMakeLists.txt 2018-01-24 21:26:50.000000000 +0200 ++++ llvm-7.0.0.src/tools/clang/cmake/modules/CMakeLists.txt 2019-03-26 14:57:07.173362736 +0200 +@@ -1,11 +1,11 @@ + # Generate a list of CMake library targets so that other CMake projects can + # link against them. LLVM calls its version of this file LLVMExports.cmake, but + # the usual CMake convention seems to be ${Project}Targets.cmake. +-set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang) ++set(CLANG_INSTALL_PACKAGE_DIR share/clang) + set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}") + + # Keep this in sync with llvm/cmake/CMakeLists.txt! +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index fd0507080..a471ec1ae 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -46,6 +46,7 @@ vcpkg_configure_cmake( -DLLVM_INCLUDE_TESTS=OFF
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
-DLLVM_TOOLS_INSTALL_DIR=tools/llvm
+ -DLLVM_PARALLEL_LINK_JOBS=1
)
vcpkg_install_cmake()
@@ -62,10 +63,30 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(REMOVE ${DEBUG_EXE})
endif()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clang TARGET_PATH share/clang)
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/clang TARGET_PATH share/clang)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/llvm)
+if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+ file(READ ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-release.cmake RELEASE_MODULE)
+ string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/tools/llvm" RELEASE_MODULE "${RELEASE_MODULE}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-release.cmake "${RELEASE_MODULE}")
+
+ file(READ ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-release.cmake RELEASE_MODULE)
+ string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/tools/llvm" RELEASE_MODULE "${RELEASE_MODULE}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-release.cmake "${RELEASE_MODULE}")
+endif()
+
+if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ file(READ ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-debug.cmake DEBUG_MODULE)
+ string(REPLACE "\${_IMPORT_PREFIX}/debug/bin" "\${_IMPORT_PREFIX}/tools/llvm" DEBUG_MODULE "${DEBUG_MODULE}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-debug.cmake "${DEBUG_MODULE}")
+
+ file(READ ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-debug.cmake DEBUG_MODULE)
+ string(REPLACE "\${_IMPORT_PREFIX}/debug/bin" "\${_IMPORT_PREFIX}/tools/llvm" DEBUG_MODULE "${DEBUG_MODULE}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-debug.cmake "${DEBUG_MODULE}")
+endif()
+
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/tools
diff --git a/ports/luajit/CONTROL b/ports/luajit/CONTROL index 5a5ad6b91..e81524ec7 100644 --- a/ports/luajit/CONTROL +++ b/ports/luajit/CONTROL @@ -1,3 +1,3 @@ Source: luajit
-Version: 2.0.5
+Version: 2.0.5-1
Description: LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.
diff --git a/ports/luajit/portfile.cmake b/ports/luajit/portfile.cmake index da68d3ad4..326929d17 100644 --- a/ports/luajit/portfile.cmake +++ b/ports/luajit/portfile.cmake @@ -73,12 +73,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif()
vcpkg_copy_pdbs()
-file(INSTALL ${SRC}/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-file(INSTALL ${SRC}/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-file(INSTALL ${SRC}/luaconf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-file(INSTALL ${SRC}/lualib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-file(INSTALL ${SRC}/lauxlib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-file(INSTALL ${SRC}/lua.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(INSTALL ${SRC}/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit)
+file(INSTALL ${SRC}/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit)
+file(INSTALL ${SRC}/luaconf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit)
+file(INSTALL ${SRC}/lualib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit)
+file(INSTALL ${SRC}/lauxlib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit)
+file(INSTALL ${SRC}/lua.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/luajit)
file(REMOVE "${SRC}/*.dll")
file(REMOVE "${SRC}/*.exe")
diff --git a/ports/luasocket/CONTROL b/ports/luasocket/CONTROL index ec478e62f..b349ee344 100644 --- a/ports/luasocket/CONTROL +++ b/ports/luasocket/CONTROL @@ -1,4 +1,4 @@ Source: luasocket -Version: 2018-09-18 +Version: 2018-09-18-1 Description: LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet. Build-Depends: lua diff --git a/ports/luasocket/portfile.cmake b/ports/luasocket/portfile.cmake index b7288fed1..3cce06af1 100644 --- a/ports/luasocket/portfile.cmake +++ b/ports/luasocket/portfile.cmake @@ -23,18 +23,19 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/luasocket) file(RENAME ${CURRENT_PACKAGES_DIR}/share/luasocket/LICENSE ${CURRENT_PACKAGES_DIR}/share/luasocket/copyright) - +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") # Handle socket dll name -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.dll ${CURRENT_PACKAGES_DIR}/bin/socket/core.dll) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.pdb ${CURRENT_PACKAGES_DIR}/bin/socket/core.pdb) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.dll ${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.dll) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.pdb) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.dll ${CURRENT_PACKAGES_DIR}/bin/socket/core.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.pdb ${CURRENT_PACKAGES_DIR}/bin/socket/core.pdb) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.dll ${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.pdb) # Handle mime dll name -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.dll ${CURRENT_PACKAGES_DIR}/bin/mime/core.dll) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.pdb ${CURRENT_PACKAGES_DIR}/bin/mime/core.pdb) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.dll ${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.dll) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.pdb) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.dll ${CURRENT_PACKAGES_DIR}/bin/mime/core.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.pdb ${CURRENT_PACKAGES_DIR}/bin/mime/core.pdb) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.dll ${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.pdb) +endif() # Allow empty include directory set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/magnum/001-sdl-includes.patch b/ports/magnum/001-sdl-includes.patch index afa1301d9..b7ae6a446 100644 --- a/ports/magnum/001-sdl-includes.patch +++ b/ports/magnum/001-sdl-includes.patch @@ -1,14 +1,31 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp +index 46ade2d00..24d8eabe7 100644 +--- a/src/Magnum/Platform/Sdl2Application.cpp ++++ b/src/Magnum/Platform/Sdl2Application.cpp +@@ -26,7 +26,7 @@ + #include "Sdl2Application.h" + + #include <cstring> +-#include <SDL.h> ++#include <SDL2/SDL.h> + #ifndef CORRADE_TARGET_EMSCRIPTEN + #include <tuple> + #else diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h -index 99c3174..311b2c1 100644 +index 1a50b1c72..45e88edf5 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h -@@ -42,11 +42,11 @@ - #ifdef CORRADE_TARGET_WINDOWS /* Windows version of SDL2 redefines main(), we don't want that */ +@@ -46,13 +46,13 @@ #define SDL_MAIN_HANDLED #endif --#include <SDL.h> + /* SDL.h includes the world, adding 50k LOC. We don't want that either. */ +-#include <SDL_keycode.h> +-#include <SDL_mouse.h> +-#include <SDL_video.h> -#include <SDL_scancode.h> -+#include <SDL2/SDL.h> ++#include <SDL2/SDL_keycode.h> ++#include <SDL2/SDL_mouse.h> ++#include <SDL2/SDL_video.h> +#include <SDL2/SDL_scancode.h> #ifdef CORRADE_TARGET_WINDOWS_RT @@ -17,4 +34,3 @@ index 99c3174..311b2c1 100644 #include <wrl.h> /* For the WinMain entrypoint */ #endif - diff --git a/ports/magnum/003-glfw-find-module.patch b/ports/magnum/003-glfw-find-module.patch index 0517559e3..8dd37d010 100644 --- a/ports/magnum/003-glfw-find-module.patch +++ b/ports/magnum/003-glfw-find-module.patch @@ -1,11 +1,11 @@ diff --git a/modules/FindGLFW.cmake b/modules/FindGLFW.cmake -index e831fdb2..b2dba97f 100644 +index 5e13798f7..d7cb12b03 100644 --- a/modules/FindGLFW.cmake +++ b/modules/FindGLFW.cmake -@@ -39,7 +39,7 @@ - # DEALINGS IN THE SOFTWARE. - # +@@ -64,7 +64,7 @@ if(TARGET glfw) + endif() + # In case no config file was found, try manually finding the library. -find_library(GLFW_LIBRARY NAMES glfw glfw3) +find_library(GLFW_LIBRARY NAMES glfw glfw3 glfw3dll) diff --git a/ports/mapbox-variant/CONTROL b/ports/mapbox-variant/CONTROL new file mode 100644 index 000000000..fad725911 --- /dev/null +++ b/ports/mapbox-variant/CONTROL @@ -0,0 +1,3 @@ +Source: mapbox-variant
+Version: 1.1.6-0f734f0-1
+Description: C++11/C++14 Variant
diff --git a/ports/mapbox-variant/portfile.cmake b/ports/mapbox-variant/portfile.cmake new file mode 100644 index 000000000..60fdd07a7 --- /dev/null +++ b/ports/mapbox-variant/portfile.cmake @@ -0,0 +1,17 @@ +# header-only
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mapbox/variant
+ REF 0f734f01e685a298e3756d30044a4164786c58c5
+ SHA512 36b842ffbaa7d466c26b4783d68dff17b0079927aca876bd021f439591a4ee5f184c71a60ca59857c35675b2e27cf650bedea7a3cdf9c3fc959c3c0ec3b135eb
+ HEAD_REF master
+)
+
+# Copy header files
+file(COPY ${SOURCE_PATH}/include/mapbox/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/mapbox FILES_MATCHING PATTERN "*.hpp")
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mapbox-variant)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/mapbox-variant/LICENSE ${CURRENT_PACKAGES_DIR}/share/mapbox-variant/copyright)
diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt index 6c21bbf53..d7b6bb61b 100644 --- a/ports/matio/CMakeLists.txt +++ b/ports/matio/CMakeLists.txt @@ -31,11 +31,17 @@ target_link_libraries(libmatio PRIVATE ZLIB::ZLIB) target_compile_definitions(libmatio PRIVATE -DHAVE_ZLIB=1) find_package(hdf5 CONFIG REQUIRED) -target_link_libraries(libmatio PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared) + if(BUILD_SHARED_LIBS) target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_DYNAMIC_LIB) + if(HDF5_USE_STATIC_LIBRARIES) + target_link_libraries(libmatio PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static) + else() + target_link_libraries(libmatio PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared) + endif() else() target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_STATIC_LIB) + target_link_libraries(libmatio PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static) endif() install( diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL index df97421cf..659c46fca 100644 --- a/ports/matio/CONTROL +++ b/ports/matio/CONTROL @@ -1,4 +1,4 @@ Source: matio -Version: 1.5.13 +Version: 1.5.13-1 Description: MATLAB MAT File I/O Library Build-Depends: zlib, hdf5 diff --git a/ports/matroska/CMakeLists.txt b/ports/matroska/CMakeLists.txt deleted file mode 100644 index 58308866c..000000000 --- a/ports/matroska/CMakeLists.txt +++ /dev/null @@ -1,110 +0,0 @@ -cmake_minimum_required(VERSION 3.1.2) - -project(matroska VERSION 1.4.8) - -option(DISABLE_PKGCONFIG "Disable PkgConfig module generation" OFF) -option(DISABLE_CMAKE_CONFIG "Disable CMake package config module generation" OFF) - -find_package(ebml 1.3.5 REQUIRED) - -include(GNUInstallDirs) - -set(libmatroska_SOURCES - src/FileKax.cpp - src/KaxAttached.cpp - src/KaxAttachments.cpp - src/KaxBlock.cpp - src/KaxBlockData.cpp - src/KaxCluster.cpp - src/KaxContexts.cpp - src/KaxCues.cpp - src/KaxCuesData.cpp - src/KaxInfoData.cpp - src/KaxSeekHead.cpp - src/KaxSegment.cpp - src/KaxSemantic.cpp - src/KaxTracks.cpp - src/KaxVersion.cpp) - -set(libmatroska_PUBLIC_HEADERS - matroska/FileKax.h - matroska/KaxAttached.h - matroska/KaxAttachments.h - matroska/KaxBlockData.h - matroska/KaxBlock.h - matroska/KaxChapters.h - matroska/KaxClusterData.h - matroska/KaxCluster.h - matroska/KaxConfig.h - matroska/KaxContentEncoding.h - matroska/KaxContexts.h - matroska/KaxCuesData.h - matroska/KaxCues.h - matroska/KaxDefines.h - matroska/KaxInfoData.h - matroska/KaxInfo.h - matroska/KaxSeekHead.h - matroska/KaxSegment.h - matroska/KaxSemantic.h - matroska/KaxTag.h - matroska/KaxTags.h - matroska/KaxTrackAudio.h - matroska/KaxTrackEntryData.h - matroska/KaxTracks.h - matroska/KaxTrackVideo.h - matroska/KaxTypes.h - matroska/KaxVersion.h) - -set (libmatroska_C_PUBLIC_HEADERS - matroska/c/libmatroska.h - matroska/c/libmatroska_t.h) - -add_library(matroska ${libmatroska_SOURCES} ${limatroska_PUBLIC_HEADERS} ${libmatroska_C_PUBLIC_HEADERS}) -target_link_libraries(matroska PUBLIC ebml) -set_target_properties(matroska PROPERTIES - VERSION 6.0.0 - SOVERSION 6) -target_include_directories(matroska PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> - $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) -if(MSVC) - target_compile_definitions(matroska PRIVATE _CRT_SECURE_NO_WARNINGS) -endif() -if(BUILD_SHARED_LIBS) - target_compile_definitions(matroska PUBLIC MATROSKA_DLL) - set_target_properties(matroska PROPERTIES DEFINE_SYMBOL "MATROSKA_DLL_EXPORT") -endif() - -install(TARGETS matroska - EXPORT MatroskaTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -install(FILES ${libmatroska_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/matroska) -install(FILES ${libmatroska_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/matroska/c) - -if(NOT DISABLE_PKGCONFIG) - set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix "\$\{prefix\}") - set(libdir "\$\{prefix\}/${CMAKE_INSTALL_LIBDIR}") - set(includedir "\$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}") - set(PACKAGE_VERSION ${PROJECT_VERSION}) - configure_file(libmatroska.pc.in libmatroska.pc @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmatroska.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -endif() - -if(NOT DISABLE_CMAKE_CONFIG) - if(WIN32) - set(CMAKE_INSTALL_PACKAGEDIR cmake) - elseif(WIN32) - set(CMAKE_INSTALL_PACKAGEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) - endif() - include(CMakePackageConfigHelpers) - write_basic_package_version_file(MatroskaConfigVersion.cmake COMPATIBILITY SameMajorVersion) - install(EXPORT MatroskaTargets DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) - install(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/MatroskaConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/MatroskaConfigVersion.cmake - DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) -endif() diff --git a/ports/matroska/CONTROL b/ports/matroska/CONTROL index 04feb0dd4..627c2e93f 100644 --- a/ports/matroska/CONTROL +++ b/ports/matroska/CONTROL @@ -1,4 +1,4 @@ Source: matroska -Version: 1.4.9 +Version: 1.4.9-1 Description: a C++ libary to parse Matroska files (.mkv and .mka) Build-Depends: ebml diff --git a/ports/matroska/portfile.cmake b/ports/matroska/portfile.cmake index b89a1cb6e..946ee81bc 100644 --- a/ports/matroska/portfile.cmake +++ b/ports/matroska/portfile.cmake @@ -1,15 +1,3 @@ -# 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_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") @@ -26,15 +14,17 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS -DDISABLE_PKGCONFIG=1 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +if (WIN32) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else () + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/matroska) +endif () file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/milerius-sfml-imgui/CONTROL b/ports/milerius-sfml-imgui/CONTROL index 88eb539ef..7d3ec477d 100644 --- a/ports/milerius-sfml-imgui/CONTROL +++ b/ports/milerius-sfml-imgui/CONTROL @@ -1,4 +1,4 @@ Source: milerius-sfml-imgui
-Version: 1.1-1
+Version: 1.1-2
Description: imgui dll for sfml usage
Build-Depends: sfml (windows), imgui
diff --git a/ports/milerius-sfml-imgui/FixFindPackageIssue.patch b/ports/milerius-sfml-imgui/FixFindPackageIssue.patch new file mode 100644 index 000000000..be47cfada --- /dev/null +++ b/ports/milerius-sfml-imgui/FixFindPackageIssue.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 27b8bd8..33fe623 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,7 +2,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+ message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the source code and call cmake from there")
+ endif ()
+
+-project(sfml-imgui)
++project(milerius-sfml-imgui)
+ cmake_minimum_required(VERSION 3.9)
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+@@ -26,7 +26,7 @@ include(CMakePackageConfigHelpers)
+
+ install(TARGETS
+ ${PROJECT_NAME}
+- EXPORT sfml-imgui-targets
++ EXPORT milerius-sfml-imgui-targets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+@@ -39,7 +39,7 @@ install(EXPORT ${PROJECT_NAME}-targets
+ )
+
+ configure_package_config_file(
+- "${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake.in"
++ "${PROJECT_SOURCE_DIR}/cmake/sfml-imgui-config.cmake.in"
+ "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
+ INSTALL_DESTINATION lib/cmake/${PROJECT_NAME}
+ )
+@@ -51,6 +51,6 @@ install(FILES
+ install(DIRECTORY
+ ${CMAKE_CURRENT_SOURCE_DIR}/sfml-imgui
+ DESTINATION
+- ${CMAKE_INSTALL_INCLUDEDIR}/sfml-imgui
++ ${CMAKE_INSTALL_INCLUDEDIR}/
+ FILES_MATCHING PATTERN "*.h*"
+ )
+diff --git a/cmake/sfml-imgui-config.cmake.in b/cmake/sfml-imgui-config.cmake.in
+index cd790be..e1bdd77 100644
+--- a/cmake/sfml-imgui-config.cmake.in
++++ b/cmake/sfml-imgui-config.cmake.in
+@@ -2,5 +2,5 @@
+ find_package(SFML CONFIG REQUIRED graphics)
+ find_package(imgui CONFIG REQUIRED)
+ find_package(OpenGL REQUIRED)
+-include("${CMAKE_CURRENT_LIST_DIR}/sfml-imgui-targets.cmake")
+-check_required_components("sfml-imgui")
+\ No newline at end of file
++include("${CMAKE_CURRENT_LIST_DIR}/milerius-sfml-imgui-targets.cmake")
++check_required_components("milerius-sfml-imgui")
+\ No newline at end of file
diff --git a/ports/milerius-sfml-imgui/portfile.cmake b/ports/milerius-sfml-imgui/portfile.cmake index d4975da15..c5191cb85 100644 --- a/ports/milerius-sfml-imgui/portfile.cmake +++ b/ports/milerius-sfml-imgui/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( REF 1.1
SHA512 191184f7b302f643bd7c241b69d9f9edc0d03c6f5a0b3a49f57ac84f3828202f8065291fb17993073a2c07f1237ba491de677c47e2f8160dc70ea77f20eb1946
HEAD_REF master
+ PATCHES FixFindPackageIssue.patch
)
vcpkg_configure_cmake(
@@ -16,9 +17,9 @@ vcpkg_configure_cmake( )
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sfml-imgui)
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/milerius-sfml-imgui)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui/LICENSE ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui/copyright)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui/LICENSE ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui/copyright)
\ No newline at end of file diff --git a/ports/minitrace/CMakeLists.txt b/ports/minitrace/CMakeLists.txt new file mode 100644 index 000000000..fcae7841e --- /dev/null +++ b/ports/minitrace/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.8)
+project(minitrace C)
+
+set(minitrace_HEADERS minitrace.h)
+set(minitrace_SOURCES minitrace.c)
+
+add_library(minitrace ${minitrace_SOURCES})
+
+# Install headers
+install(FILES ${minitrace_HEADERS} DESTINATION include/minitrace)
+
+# Install minitrace
+install(
+ TARGETS minitrace EXPORT minitraceConfig
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+)
+
+# Export config file for minitrace
+export(
+ TARGETS minitrace
+ NAMESPACE minitrace::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/minitrace-config.cmake"
+)
+
+# Install config file
+install(
+ EXPORT minitraceConfig
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/minitrace"
+ NAMESPACE minitrace::
+)
diff --git a/ports/minitrace/CONTROL b/ports/minitrace/CONTROL new file mode 100644 index 000000000..83763faba --- /dev/null +++ b/ports/minitrace/CONTROL @@ -0,0 +1,3 @@ +Source: minitrace
+Version: 2019.02.06
+Description: Simple C/C++ library for producing JSON traces suitable for Chrome's built-in trace viewer.
diff --git a/ports/minitrace/portfile.cmake b/ports/minitrace/portfile.cmake new file mode 100644 index 000000000..9410ed84f --- /dev/null +++ b/ports/minitrace/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO hrydgard/minitrace
+ REF a48215c409dd848fa0a76c5eb4dfaba4ca3bca39
+ SHA512 591fa52132b6bbe8e7e121526a43d07056deff8fe026227c1a4c26bebf95536e5d68750fa8551d23afebf048fe8b8503017b9a93650e18a992cf2e5678d46135
+ HEAD_REF master
+)
+
+file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/minitrace RENAME copyright)
+
+vcpkg_test_cmake(PACKAGE_NAME minitrace)
diff --git a/ports/mio/CONTROL b/ports/mio/CONTROL index c174396d1..895c4c3a7 100644 --- a/ports/mio/CONTROL +++ b/ports/mio/CONTROL @@ -1,3 +1,3 @@ Source: mio
-Version: 2018-10-18-1
+Version: 2019-02-10
Description: Cross-platform header-only C++11 library for memory mapped file IO.
diff --git a/ports/mio/portfile.cmake b/ports/mio/portfile.cmake index 6fe1a5622..9c7e25939 100644 --- a/ports/mio/portfile.cmake +++ b/ports/mio/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mandreyel/mio
- REF 365a80c9acaab2a7d23a40a3add7071f9b739f85
- SHA512 a134dde60e6ada796bffc795563e3c4d4d4f3abd07ef3da7c15472951bf3f13d9fd37a05de71cd662ec5ff6e7048cfb1e7af76a35259c0ff58a53df792a6640e
+ REF cafa31360fee8866be89b4c602d8b9a7a18dbf5e
+ SHA512 21a5e6c6b90b9ac39bfe7fef59b6dc9c6dc3516b850de5897df63672e81e22abea7bdd7e363e8206dcb72697af797af2501b1c14480bbb8a9284f28c70ca9d67
HEAD_REF master
)
diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index d19dec51c..de0b8b9f7 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-c-driver -Version: 1.9.5-2 +Version: 1.9.5-3 Build-Depends: libbson, openssl (uwp) Description: Client library written in C for MongoDB. diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index a3c5f2d31..1ab39a491 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -32,6 +32,7 @@ vcpkg_configure_cmake( )
vcpkg_install_cmake()
+
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-static-1.0")
else()
@@ -86,6 +87,24 @@ endif() # Create cmake files for _both_ find_package(mongo-c-driver) and find_package(libmongoc-static-1.0)/find_package(libmongoc-1.0)
file(READ ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake LIBMONGOC_CONFIG_CMAKE)
+
+# Patch: Set _IMPORT_PREFIX and replace PACKAGE_PREFIX_DIR
+string(REPLACE
+[[
+get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
+]]
+[[
+# VCPKG PATCH SET IMPORT_PREFIX
+get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+if(_IMPORT_PREFIX STREQUAL "/")
+ set(_IMPORT_PREFIX "")
+endif()
+]]
+ LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
+string(REPLACE [[PACKAGE_PREFIX_DIR]] [[_IMPORT_PREFIX]] LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
+
string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake "${LIBMONGOC_CONFIG_CMAKE}")
diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL index 3a8e6108f..4d89b54c0 100644 --- a/ports/mongo-cxx-driver/CONTROL +++ b/ports/mongo-cxx-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-cxx-driver -Version: 3.2.0-1 +Version: 3.2.0-2 Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility Description: MongoDB C++ Driver. diff --git a/ports/moos-core/CONTROL b/ports/moos-core/CONTROL new file mode 100644 index 000000000..2aadbb9e4 --- /dev/null +++ b/ports/moos-core/CONTROL @@ -0,0 +1,4 @@ +Source: moos-core +Version: 10.4.0 +Description: A very light weight, easy to use middleware. See the MOOS homepage at https://sites.google.com/site/moossoftware/ for more information and documentation. +Build-Depends: diff --git a/ports/moos-core/cmake_fix.patch b/ports/moos-core/cmake_fix.patch new file mode 100644 index 000000000..96c569c2c --- /dev/null +++ b/ports/moos-core/cmake_fix.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 75f367f..6ef3dc2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,7 +190,7 @@ add_subdirectory(Core) + export( + TARGETS MOOS + NAMESPACE MOOS:: +- FILE UseMOOS.cmake ++ FILE UseMOOSTargets.cmake + ) + + # Support existing projects that expect to find MOOS_LIBRARIES and +@@ -222,7 +222,7 @@ set(PROJECT_CONFIG_PATH "lib/cmake/MOOS") + install( + EXPORT MOOS + NAMESPACE MOOS:: +- FILE UseMOOS.cmake ++ FILE UseMOOSTargets.cmake + DESTINATION ${PROJECT_CONFIG_PATH} + ) + +diff --git a/Core/libMOOS/CMakeLists.txt b/Core/libMOOS/CMakeLists.txt +index b74a30f..492df50 100644 +--- a/Core/libMOOS/CMakeLists.txt ++++ b/Core/libMOOS/CMakeLists.txt +@@ -196,7 +196,7 @@ mark_as_advanced(TIME_WARP_AGGLOMERATION_CONSTANT) + install( + DIRECTORY ${INCLUDE_ROOTS} + DESTINATION . +- FILES_MATCHING PATTERN "*.h" PATTERN "*.hxx" ++ FILES_MATCHING PATTERN "*.h" PATTERN "*.hxx" PATTERN "*.hpp" + ) + + # install libraries +diff --git a/MOOSConfig.cmake.in b/MOOSConfig.cmake.in +index 10af599..dff769a 100644 +--- a/MOOSConfig.cmake.in ++++ b/MOOSConfig.cmake.in +@@ -2,7 +2,7 @@ + + # Pick up the auto-generated file which knows how to add the imported library + # targets for the libraries that MOOS exports. +-set(exports_file "${CMAKE_CURRENT_LIST_DIR}/UseMOOS.cmake") ++set(exports_file "${CMAKE_CURRENT_LIST_DIR}/UseMOOSTargets.cmake") + include(${exports_file}) + + include(FindPackageHandleStandardArgs) diff --git a/ports/moos-core/portfile.cmake b/ports/moos-core/portfile.cmake new file mode 100644 index 000000000..d6eab11f7 --- /dev/null +++ b/ports/moos-core/portfile.cmake @@ -0,0 +1,60 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO themoos/core-moos + REF v10.4.0 + SHA512 8a82074bd219bbedbe56c2187afe74a55a252b0654a675c64d1f75e62353b0874e7b405d9f677fadb297e955d11aea50a07e8f5f3546be3c4ddab76fe356a51e + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake_fix.patch +) + + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +message(STATUS "MOOS VCPKG SOURCE_PATH ${SOURCE_PATH}") +message(STATUS "MOOS INSTALL -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SHARED_LIBS=${BUILD_SHARED} + -DCMAKE_ENABLE_EXPORT=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/MOOS") + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/MOOS) +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/MOOSDB") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/MOOSDB ${CURRENT_PACKAGES_DIR}/tools/MOOS/MOOSDB) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/atm ${CURRENT_PACKAGES_DIR}/tools/MOOS/atm) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/gtm ${CURRENT_PACKAGES_DIR}/tools/MOOS/gtm) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ktm ${CURRENT_PACKAGES_DIR}/tools/MOOS/ktm) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mqos ${CURRENT_PACKAGES_DIR}/tools/MOOS/mqos) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mtm ${CURRENT_PACKAGES_DIR}/tools/MOOS/mtm) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/umm ${CURRENT_PACKAGES_DIR}/tools/MOOS/umm) +endif() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the licence file where vcpkg expects it +file(COPY + ${SOURCE_PATH}/Core/GPLCore.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME + ${CURRENT_PACKAGES_DIR}/share/${PORT}/GPLCore.txt + ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + + diff --git a/ports/moos-essential/CONTROL b/ports/moos-essential/CONTROL new file mode 100644 index 000000000..311b9d480 --- /dev/null +++ b/ports/moos-essential/CONTROL @@ -0,0 +1,4 @@ +Source: moos-essential +Version: 10.0.1 +Description: a set of useful applications that leverage the core-moos communications layer See the MOOS homepage at https://sites.google.com/site/moossoftware/ for more information and documentation. +Build-Depends: moos-core diff --git a/ports/moos-essential/fix.patch b/ports/moos-essential/fix.patch new file mode 100644 index 000000000..0020c6a71 --- /dev/null +++ b/ports/moos-essential/fix.patch @@ -0,0 +1,23 @@ +diff --git a/Essentials/pShare/CMakeLists.txt b/Essentials/pShare/CMakeLists.txt +index 5128a50..7fee919 100644 +--- a/Essentials/pShare/CMakeLists.txt ++++ b/Essentials/pShare/CMakeLists.txt +@@ -20,4 +20,4 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/pshare_test_scripts DESTINATION ${CMAKE_RU + + add_custom_command(TARGET pShare POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory +- ${CMAKE_SOURCE_DIR}/pshare_test_scripts ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) ++ ${CMAKE_SOURCE_DIR}/Essentials/pShare/pshare_test_scripts ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +diff --git a/Essentials/pShare/Share.cpp b/Essentials/pShare/Share.cpp +index 7825e00..756a760 100644 +--- a/Essentials/pShare/Share.cpp ++++ b/Essentials/pShare/Share.cpp +@@ -17,7 +17,7 @@ + + #include "MOOS/libMOOS/Utils/MOOSUtilityFunctions.h" + #include "MOOS/libMOOS/Utils/IPV4Address.h" +-#include "MOOS/libMOOS/Thirdparty/getpot/GetPot" ++#include "MOOS/libMOOS/Thirdparty/getpot/GetPot.hpp" + #include "MOOS/libMOOS/Utils/SafeList.h" + #include "MOOS/libMOOS/Utils/ConsoleColours.h" + #include "MOOS/libMOOS/Utils/KeyboardCapture.h" diff --git a/ports/moos-essential/portfile.cmake b/ports/moos-essential/portfile.cmake new file mode 100644 index 000000000..3f26a4e86 --- /dev/null +++ b/ports/moos-essential/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO themoos/essential-moos + REF b897ea86dba8b61412dc48ac0cfb5ff34cdaf5f6 + SHA512 7284744d211dcdcb0cd321eec96f3632ccda690e8894261f4f09a06bc8faefb2de68f4f2f755f4eeef5bb586044e98ac65cdd18c15193a1a4632bd2f4208c52f + HEAD_REF master +) + +message(STATUS "MOOS Essential Source Path: ${SOURCE_PATH}") +message(STATUS "MOOS Essential CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}") + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SHARED_LIBS=${BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/MOOS) +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/pAntler") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pAntler ${CURRENT_PACKAGES_DIR}/tools/MOOS/pAntler) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pLogger ${CURRENT_PACKAGES_DIR}/tools/MOOS/pLoggers) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pMOOSBridge ${CURRENT_PACKAGES_DIR}/tools/MOOS/pMOOSBridge) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pScheduler ${CURRENT_PACKAGES_DIR}/tools/MOOS/pScheduler) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pShare ${CURRENT_PACKAGES_DIR}/tools/MOOS/pShare) +endif() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug) +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/fake_header.h "// fake header to pass vcpkg post install check \n") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "see moos-core for copyright\n" ) +# +# diff --git a/ports/moos-ui/CONTROL b/ports/moos-ui/CONTROL new file mode 100644 index 000000000..28ee5e664 --- /dev/null +++ b/ports/moos-ui/CONTROL @@ -0,0 +1,6 @@ +Source: moos-ui +Version: 10.0.1 +Description: set of user interface tools to use and leverage the MOOS project. See the MOOS homepage at https://sites.google.com/site/moossoftware/ for more information and documentation. +Build-Depends: moos-core + + diff --git a/ports/moos-ui/portfile.cmake b/ports/moos-ui/portfile.cmake new file mode 100644 index 000000000..5229c8855 --- /dev/null +++ b/ports/moos-ui/portfile.cmake @@ -0,0 +1,55 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO themoos/ui-moos + REF ba7dd1db7db1848acb3e68b9e54d3da9d7014684 + SHA512 96225216973656a9029d4e8ac8a8b69df15db5c160bcbd02755cd291bfe5817dbde3a6a5f46b71a138ddf4a389c3c702d4d502ade91ad88554042d7b9d75f843 + HEAD_REF master +) + +#vcpkg_apply_patches( +# SOURCE_PATH ${SOURCE_PATH} +# PATCHES ${CMAKE_CURRENT_LIST_DIR}/fltk.patch +#) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + + +#if ("gui" IN_LIST FEATURES) +# set(BUILD_GRAPHICAL_TOOLS ON ) +# message(STATUS "Building graphical tools") +#else() +# set(BUILD_GRAPHICAL_TOOLS OFF ) +# message(STATUS "Not building graphical tools") +#endif() + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SHARED_LIBS=${BUILD_SHARED} + -DBUILD_CONSOLE_TOOLS=ON + -DBUILD_GRAPHICAL_TOOLS=OFF #${BUILD_GRAPHICAL_TOOLS} +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/MOOS) +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/uPoke") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPoke ${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/iRemoteLite ${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite) +endif() + +# file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uMS ${CURRENT_PACKAGES_DIR}/tools/uMS) +# file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPlayback ${CURRENT_PACKAGES_DIR}/tools/uPlayback) +# file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pShare ${CURRENT_PACKAGES_DIR}/tools/pShare) +#endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug) +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/fake_header_ui.h "// fake header to pass vcpkg post install check \n") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "see moos-core for copyright\n" ) diff --git a/ports/mosquitto/CONTROL b/ports/mosquitto/CONTROL index 97b464e41..8d4d2de0c 100644 --- a/ports/mosquitto/CONTROL +++ b/ports/mosquitto/CONTROL @@ -1,5 +1,5 @@ Source: mosquitto -Version: 1.5.0 +Version: 1.5.0-1 Build-Depends: c-ares, libwebsockets, openssl, pthreads Description: Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it diff --git a/ports/mosquitto/fix-dependence-pthreads.patch b/ports/mosquitto/fix-dependence-pthreads.patch new file mode 100644 index 000000000..d21786646 --- /dev/null +++ b/ports/mosquitto/fix-dependence-pthreads.patch @@ -0,0 +1,13 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index 6355eaa..490df32 100644
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -6,7 +6,7 @@ option(WITH_THREADING "Include client library threading support?" ON)
+ if (${WITH_THREADING} STREQUAL ON)
+ add_definitions("-DWITH_THREADING")
+ if (WIN32)
+- find_library(PTHREAD_LIBRARIES NAMES pthreadsVC2)
++ find_library(PTHREAD_LIBRARIES NAMES pthreadVC2)
+ find_path(PTHREAD_INCLUDE_DIR pthread.h)
+ else (WIN32)
+ find_library(LIBPTHREAD pthread)
diff --git a/ports/mosquitto/portfile.cmake b/ports/mosquitto/portfile.cmake index 99fe48369..25ba0e598 100644 --- a/ports/mosquitto/portfile.cmake +++ b/ports/mosquitto/portfile.cmake @@ -22,6 +22,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/win64-cmake.patch" "${CMAKE_CURRENT_LIST_DIR}/output_folders-cmake.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-dependence-pthreads.patch" ) vcpkg_configure_cmake( diff --git a/ports/mozjpeg/CONTROL b/ports/mozjpeg/CONTROL index 9e3f19b4c..2fa0f2d02 100644 --- a/ports/mozjpeg/CONTROL +++ b/ports/mozjpeg/CONTROL @@ -1,3 +1,3 @@ Source: mozjpeg -Version: 3.2-1 +Version: 3.2-2 Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. diff --git a/ports/mozjpeg/fix-install-error.patch b/ports/mozjpeg/fix-install-error.patch new file mode 100644 index 000000000..677ce9337 --- /dev/null +++ b/ports/mozjpeg/fix-install-error.patch @@ -0,0 +1,87 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ac0ebdb..483bf0f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -875,43 +875,51 @@ add_custom_target(installer
+ cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
+ SOURCES mozjpeg.nsi)
+
++if(CMAKE_BUILD_TYPE STREQUAL "Debug")
++ set(REAL_BUILDS_PATH "Debug/")
++else()
++ set(REAL_BUILDS_PATH "Release/")
++endif()
++
+ if(WITH_TURBOJPEG)
+ if(ENABLE_SHARED)
+ install(TARGETS turbojpeg tjbench
+- ARCHIVE DESTINATION lib
+- LIBRARY DESTINATION lib
+- RUNTIME DESTINATION bin)
++ ARCHIVE DESTINATION lib/mozjpeg
++ LIBRARY DESTINATION lib/mozjpeg
++ RUNTIME DESTINATION tools/mozjpeg)
+ endif()
+ if(ENABLE_STATIC)
+- install(TARGETS turbojpeg-static ARCHIVE DESTINATION lib)
++ install(TARGETS turbojpeg-static
++ LIBRARY DESTINATION lib/mozjpeg
++ ARCHIVE DESTINATION lib/mozjpeg)
+ if(NOT ENABLE_SHARED)
+- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tjbench-static.exe
+- DESTINATION bin RENAME tjbench.exe)
++ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/tjbench-static.exe
++ DESTINATION tools/mozjpeg RENAME tjbench.exe)
+ endif()
+ endif()
+- install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include)
++ install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include/mozjpeg)
+ endif()
+
+ if(ENABLE_STATIC)
+- install(TARGETS jpeg-static ARCHIVE DESTINATION lib)
++ install(TARGETS jpeg-static ARCHIVE DESTINATION lib/mozjpeg)
+ if(NOT ENABLE_SHARED)
+- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe
+- DESTINATION bin RENAME cjpeg.exe)
+- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe
+- DESTINATION bin RENAME djpeg.exe)
+- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jpegtran-static.exe
+- DESTINATION bin RENAME jpegtran.exe)
++ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/cjpeg-static.exe
++ DESTINATION tools/mozjpeg RENAME cjpeg.exe)
++ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/djpeg-static.exe
++ DESTINATION tools/mozjpeg RENAME djpeg.exe)
++ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/jpegtran-static.exe
++ DESTINATION tools/mozjpeg RENAME jpegtran.exe)
+ endif()
+ endif()
+
+-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION bin)
++install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION tools/mozjpeg)
+
+ install(FILES ${CMAKE_SOURCE_DIR}/README.ijg ${CMAKE_SOURCE_DIR}/README-mozilla.txt
+ ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt
+ ${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt
+ ${CMAKE_SOURCE_DIR}/wizard.txt
+- DESTINATION doc)
++ DESTINATION share/mozjpeg)
+
+ install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h
+ ${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h
+- DESTINATION include)
++ DESTINATION include/mozjpeg)
+diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt
+index 268cc14..d067d2a 100644
+--- a/sharedlib/CMakeLists.txt
++++ b/sharedlib/CMakeLists.txt
+@@ -68,6 +68,6 @@ add_executable(jcstest ../jcstest.c)
+ target_link_libraries(jcstest jpeg)
+
+ install(TARGETS jpeg cjpeg djpeg jpegtran
+- ARCHIVE DESTINATION lib
+- LIBRARY DESTINATION lib
+- RUNTIME DESTINATION bin)
++ ARCHIVE DESTINATION lib/mozjpeg
++ LIBRARY DESTINATION lib/mozjpeg
++ RUNTIME DESTINATION tools/mozjpeg)
diff --git a/ports/mozjpeg/portfile.cmake b/ports/mozjpeg/portfile.cmake index 52011d394..70fc58dc4 100644 --- a/ports/mozjpeg/portfile.cmake +++ b/ports/mozjpeg/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF v3.2 SHA512 d14789827a9f4f78139a3945d3169d37eb891758b5ab40ef19e99ebebb2fb6d7c3a05495de245bba54cfd913b153af352159aa9fc0218127f97819137e0f1ab8 HEAD_REF master + PATCHES + fix-install-error.patch ) vcpkg_find_acquire_program(NASM) @@ -13,9 +15,11 @@ get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(OPTIONS "-DENABLE_SHARED=FALSE") + set(ENABLE_STATIC_BUILD ON) + set(ENABLE_SHARED_BUILD OFF) else() - set(OPTIONS "-DENABLE_STATIC=FALSE") + set(ENABLE_STATIC_BUILD OFF) + set(ENABLE_SHARED_BUILD ON) endif() string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) @@ -23,7 +27,8 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - ${OPTIONS} + -DDENABLE_SHARED=${ENABLE_SHARED_BUILD} + -DENABLE_STATIC=${ENABLE_STATIC_BUILD} -DWITH_CRT_DLL=${WITH_CRT_DLL} ) @@ -31,15 +36,7 @@ vcpkg_install_cmake() #remove extra debug files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) -file(GLOB DEBUGEXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${DEBUGEXES}) - -#move exes to tools -file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/mozjpeg) -file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/mozjpeg) -file(REMOVE ${EXES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/mozjpeg) 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/msgpack/CONTROL b/ports/msgpack/CONTROL index 7c9933d27..e75f0743f 100644 --- a/ports/msgpack/CONTROL +++ b/ports/msgpack/CONTROL @@ -1,3 +1,3 @@ Source: msgpack -Version: 2.1.5-1 +Version: 3.1.1 Description: MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller. diff --git a/ports/msgpack/portfile.cmake b/ports/msgpack/portfile.cmake index 9328811dd..33873e990 100644 --- a/ports/msgpack/portfile.cmake +++ b/ports/msgpack/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO msgpack/msgpack-c - REF cpp-2.1.5 - SHA512 aab8357e494bb5aa7407b53e5e650382869ea95812a6677e085530d5f27cde6946fbfd0095b19608c75163dbb82de9ccb6a695234e7c03659fc6efc2da300e19 + REF cpp-3.1.1 + SHA512 2d1607f482160d8860b07d7597af760bfefcb3afa4e82602df43487d15950ab235e7efeabd7e08996807935de71d4dcdab424c91bff806279419db2ec9500227 HEAD_REF master) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/muparser/CONTROL b/ports/muparser/CONTROL index 547e7c67e..5a62e603c 100644 --- a/ports/muparser/CONTROL +++ b/ports/muparser/CONTROL @@ -1,3 +1,3 @@ Source: muparser -Version: 6cf2746 +Version: 2.2.6.1 Description: Fast math parser library diff --git a/ports/muparser/portfile.cmake b/ports/muparser/portfile.cmake index 7afb8adb1..aa3839598 100644 --- a/ports/muparser/portfile.cmake +++ b/ports/muparser/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO beltoforion/muparser - REF 6cf2746f7ce3ecbe0fd91098a3c2123e5253bb0e - SHA512 a44720507806beb577fee9480102dbdcbf8b95612e8e51e1c57688c27e69f5fec0261beb03d034471519d8a4430954d74fdb626f63d21000160eeaa081a83861 + REF v2.2.6.1 + SHA512 01bfc8cc48158c8413ae5e1da2ddbac1c9f0b9075470b1ab75853587d641dd195ebea268e1060a340098fd8015bc5f77d8e9cde5f81cffeade2f157c5f295496 HEAD_REF master ) diff --git a/ports/nanomsg/CONTROL b/ports/nanomsg/CONTROL index 8e7f6a2f0..c560edbd1 100644 --- a/ports/nanomsg/CONTROL +++ b/ports/nanomsg/CONTROL @@ -1,4 +1,7 @@ Source: nanomsg -Version: 1.1.4 +Version: 1.1.5 Description: a simple high-performance implementation of several "scalability protocols". These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket. + +Feature: tool +Description: nanomsg tool (nanocat) diff --git a/ports/nanomsg/portfile.cmake b/ports/nanomsg/portfile.cmake index ca6d5c260..71b26ea5e 100644 --- a/ports/nanomsg/portfile.cmake +++ b/ports/nanomsg/portfile.cmake @@ -3,13 +3,19 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nanomsg/nanomsg - REF 1.1.4 - SHA512 a1f002f988f2d98eff03387b496fe15a099fef4eb9ccd1c46ade63fbbe5a4ad4cf9fa0fd1e612e1a6f2747bc2af63b7044ec1e920e1c9a0d8c8bc2191ad7046a + REF 1.1.5 + SHA512 773b8e169a7accac21414c63972423a249164f5b843c6c65c1b03a2eb90d21da788a98debdeb396dab795e52d30605696bc2cf65e5e05687bf115438d5b22717 HEAD_REF master ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" NN_STATIC_LIB) +if("tool" IN_LIST FEATURES) + set(NN_ENABLE_NANOCAT ON) +else() + set(NN_ENABLE_NANOCAT OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -19,22 +25,59 @@ vcpkg_configure_cmake( -DNN_TESTS=OFF -DNN_TOOLS=OFF -DNN_ENABLE_DOC=OFF + -DNN_ENABLE_NANOCAT=${NN_ENABLE_NANOCAT} ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/nanomsg") +file(STRINGS ${SOURCE_PATH}/.version NN_PACKAGE_VERSION) + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/nanomsg-${NN_PACKAGE_VERSION}") + +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/${PORT}/nanomsg-config.cmake + "lib/cmake/nanomsg-${NN_PACKAGE_VERSION}" + "share/nanomsg" +) + +if(NN_ENABLE_NANOCAT) + if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") + else() + set(EXECUTABLE_SUFFIX "") + endif() + + file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/nanocat${EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/nanocat${EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/nanocat${EXECUTABLE_SUFFIX} + ) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(READ ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h _contents) - string(REPLACE "defined(NN_STATIC_LIB)" "1" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h "${_contents}") + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) + + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h + "defined(NN_STATIC_LIB)" + "1 // defined(NN_STATIC_LIB)" + ) + + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/${PORT}/nanomsg-config.cmake + "set_and_check(nanomsg_BINDIR \${PACKAGE_PREFIX_DIR}/bin)" + "" + ) endif() -file(INSTALL - ${SOURCE_PATH}/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanomsg RENAME copyright) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/nanopb/CONTROL b/ports/nanopb/CONTROL new file mode 100644 index 000000000..0916582fe --- /dev/null +++ b/ports/nanopb/CONTROL @@ -0,0 +1,3 @@ +Source: nanopb
+Version: 2019-02-12-1
+Description: A small code-size Protocol Buffers implementation in ANSI C.
diff --git a/ports/nanopb/portfile.cmake b/ports/nanopb/portfile.cmake new file mode 100644 index 000000000..278b3c7bb --- /dev/null +++ b/ports/nanopb/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "\
+The author of nanopb advises using this lib as a static library. \
+For more details, please visit: \
+https://github.com/nanopb/nanopb/pull/383#issuecomment-467852459"
+ )
+endif ()
+
+message(WARNING "\
+The nanopb's code generator is not installed as part of the installation \
+currently. So you have to run the code generator manually."
+)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO nanopb/nanopb
+ REF d1305ddef1c18b4cb33992254494ccd255701aaa
+ SHA512 70e588b0ff13846005658a9fafe57551dc2c126a32f351fe0b6c166c142c42b3bcc44567288f609f2f3a5adc1fe1bf1c585fec8c5fe90817b5b3ab47955aa1fc
+ HEAD_REF master
+ PATCHES
+ shared-lib.patch
+)
+
+string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" BUILD_STATIC_LIBS)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -Dnanopb_BUILD_RUNTIME=ON
+ -Dnanopb_BUILD_GENERATOR=OFF
+ -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
+ -Dnanopb_MSVC_STATIC_RUNTIME=OFF
+)
+
+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.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
diff --git a/ports/nanopb/shared-lib.patch b/ports/nanopb/shared-lib.patch new file mode 100644 index 000000000..0d5960e72 --- /dev/null +++ b/ports/nanopb/shared-lib.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b818734..174b650 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -67,6 +67,7 @@ endif() + + if(nanopb_BUILD_RUNTIME) + if(BUILD_SHARED_LIBS) ++ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + add_library(protobuf-nanopb SHARED + pb.h + pb_common.h +@@ -79,7 +80,8 @@ if(nanopb_BUILD_RUNTIME) + SOVERSION ${nanopb_SOVERSION}) + install(TARGETS protobuf-nanopb EXPORT nanopb-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + target_include_directories(protobuf-nanopb INTERFACE + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> + ) diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL index a7f3816ba..512fdb8b2 100644 --- a/ports/netcdf-c/CONTROL +++ b/ports/netcdf-c/CONTROL @@ -1,4 +1,4 @@ Source: netcdf-c -Version: 4.4.1.1-2 +Version: 4.6.2-1 Build-Depends: hdf5, curl Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/netcdf-c/fix_curl_linkage.patch b/ports/netcdf-c/fix_curl_linkage.patch new file mode 100644 index 000000000..09fead1f0 --- /dev/null +++ b/ports/netcdf-c/fix_curl_linkage.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eb0bc26b..f1409fc6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -783,6 +783,7 @@ IF(ENABLE_DAP) +
+ ADD_DEFINITIONS(-DCURL_STATICLIB=1)
+ INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
++ LINK_LIBRARIES(${CURL_LIBRARIES})
+
+ # Check to see if CURLOPT_USERNAME is defined.
+ # It is present starting version 7.19.1.
diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake index 4abe0f9dc..4f9046106 100644 --- a/ports/netcdf-c/portfile.cmake +++ b/ports/netcdf-c/portfile.cmake @@ -1,31 +1,22 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/netcdf-c-4.4.1.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Unidata/netcdf-c/archive/v4.4.1.1.zip" - FILENAME "netcdf-c-v4.4.1.1.zip" - SHA512 8d31e47f0bd4d5c8640d3444c5c83425862ed1e8283aa78419e86b18d33fd93bfeb0067e8e9630457cb9c334d6fedf630283b5227a15137a3e153d57b22364a8 -) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Unidata/netcdf-c + REF v4.6.2 + SHA512 7c7084e80cf2fb86cd05101f5be7b74797ee96bf49afadfae6ab32ceed6cd9a049bfa90175e7cc0742806bcd2f61156e33fe7930c7b646661d9c89be6b20dea3 + HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/no-install-deps.patch - ${CMAKE_CURRENT_LIST_DIR}/config-pkg-location.patch - ${CMAKE_CURRENT_LIST_DIR}/transitive-hdf5.patch + no-install-deps.patch + config-pkg-location.patch + transitive-hdf5.patch + fix_curl_linkage.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA OPTIONS -DBUILD_UTILITIES=OFF -DBUILD_TESTING=OFF @@ -35,9 +26,6 @@ vcpkg_configure_cmake( -DENABLE_DAP_REMOTE_TESTS=OFF -DDISABLE_INSTALL_DEPENDENCIES=ON -DConfigPackageLocation=share/netcdf - - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() diff --git a/ports/netcdf-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL index a3b7278a6..0d21780ae 100644 --- a/ports/netcdf-cxx4/CONTROL +++ b/ports/netcdf-cxx4/CONTROL @@ -1,4 +1,4 @@ Source: netcdf-cxx4 -Version: 4.3.0-1 +Version: 4.3.0-2 Build-Depends: netcdf-c Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/netcdf-cxx4/portfile.cmake b/ports/netcdf-cxx4/portfile.cmake index 22e4e1653..68dcbf661 100644 --- a/ports/netcdf-cxx4/portfile.cmake +++ b/ports/netcdf-cxx4/portfile.cmake @@ -6,6 +6,10 @@ # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + set(HDF5_USE_STATIC_LIBRARIES ON) +endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message(STATUS "Warning: DLLs not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -31,6 +35,7 @@ vcpkg_configure_cmake( OPTIONS -DNCXX_ENABLE_TESTS=OFF -DCMAKE_INSTALL_CMAKECONFIGDIR=share/netCDFCxx + -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 ) diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL index d1d9b689b..5d25a4eaa 100644 --- a/ports/nlohmann-json/CONTROL +++ b/ports/nlohmann-json/CONTROL @@ -1,3 +1,3 @@ Source: nlohmann-json -Version: 3.5.0-5 +Version: 3.6.1 Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index ea95cad97..fb492c08c 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -1,6 +1,6 @@ include(vcpkg_common_functions) -set(SOURCE_VERSION 3.5.0) +set(SOURCE_VERSION 3.6.1) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/nlohmann-json-v${SOURCE_VERSION}) file(MAKE_DIRECTORY ${SOURCE_PATH}) @@ -15,11 +15,11 @@ function(download_src SUBPATH SHA512) file(COPY ${FILE} DESTINATION ${SUBPATH_DIR}) endfunction() -download_src(CMakeLists.txt c763a16ff8026f049041e4461040416278d51751a6ac37ed1f4bfb565c748f2307e121fa6f71c2420d30ceb231cfb68b3f502cb8c3750371c1bf90e1f651578f) -download_src(LICENSE.MIT 0fdb404547467f4523579acde53066badf458504d33edbb6e39df0ae145ed27d48a720189a60c225c0aab05f2aa4ce4050dcb241b56dc693f7ee9f54c8728a75) +download_src(CMakeLists.txt ea5775c8eca3f387d152e6adadeb5e5454b7bce2bb45b305019248def2714b85b959196cb97f25b175ebebd044f179bcffa5ec62b0373bee3a8ca135f2988054) +download_src(LICENSE.MIT 44e6d9510dd66195211aa8ce3e6eef55be524e82c5864f3bfb85f2ac1215529c8ca370c8746de61ad5739e5af1633a5985085dacd1ffe220cd21d06433936801) download_src(nlohmann_json.natvis 9bce6758db0e54777394a4e718e60a281952b15f0c6dc6a6ad4a6d023c958b5515b2d39b7d4c66c03f0d3fdfdc1d6c23afb8b8419f1345c9d44d7b9a9ee2582b) download_src(cmake/config.cmake.in 7caab6166baa891f77f5b632ac4a920e548610ec41777b885ec51fe68d3665ffe91984dd2881caf22298b5392dfbd84b526fda252467bb66de9eb90e6e6ade5a) -download_src(single_include/nlohmann/json.hpp 6e8df9c0a8b5e74cc03f1c7620820215d43b642e213d30481830e5608c8196455dab5a5b604758c25dc6f45bd394fc0be6c8f8712a6498e96b3fd2e7d388d3c0) +download_src(single_include/nlohmann/json.hpp 17ad2911f054235002e273a34087f91122586de475792e9a41b8fa5cd0df3341867a976d702e2bb99459583d393afaabb481823700260bc19fb64eae544fc0bd) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} 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/nng/CONTROL b/ports/nng/CONTROL index de66fb2c6..53de5d384 100644 --- a/ports/nng/CONTROL +++ b/ports/nng/CONTROL @@ -1,5 +1,5 @@ Source: nng -Version: 1.1.0 +Version: 2019-02-27 Description: NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery. Feature: mbedtls diff --git a/ports/nng/portfile.cmake b/ports/nng/portfile.cmake index b16632ff9..006617ca4 100644 --- a/ports/nng/portfile.cmake +++ b/ports/nng/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nanomsg/nng - REF v1.1.0 - SHA512 79f8d66cdf1d8f0f50f888edf59b46671ca7439d1da0f25e5f729bd1365b4bc2969c90a377bbd25c41f84eeb231d03fb0bc7c2d5435e3e55f4cf80ae62f9b934 + REF ddeac617c9914284038241870cb99ae174fb3755 + SHA512 c45f322dfa3fba42db0561d95546159cc5e0768345d27f0bee53bdb71e77d5892e2e9bea50a625094ebf3c67b0c3fe0a8edea2660ebcb4fd0991fb0602055bc1 HEAD_REF master ) @@ -34,6 +34,26 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nng) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/nng/nng.h + "defined(NNG_SHARED_LIB)" + "0 /* defined(NNG_SHARED_LIB) */" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/nng/nng.h + "!defined(NNG_STATIC_LIB)" + "1 /* !defined(NNG_STATIC_LIB) */" + ) +else() + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/nng/nng.h + "!defined(NNG_STATIC_LIB)" + "0 /* !defined(NNG_STATIC_LIB) */" + ) +endif() + # Put the licence file where vcpkg expects it configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/nng/copyright COPYONLY) diff --git a/ports/nvtt/001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch b/ports/nvtt/001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch new file mode 100644 index 000000000..915f247c8 --- /dev/null +++ b/ports/nvtt/001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch @@ -0,0 +1,16 @@ +diff --git a/src/nvconfig.h.in b/src/nvconfig.h.in
+index 16da646..ada6be0 100644
+--- a/src/nvconfig.h.in
++++ b/src/nvconfig.h.in
+@@ -1,7 +1,11 @@
+ #ifndef NV_CONFIG
+ #define NV_CONFIG
+
++#if NV_OS_DARWIN & !NV_OS_IOS
++#cmakedefine01 HAVE_UNISTD_H
++#else
+ #cmakedefine HAVE_UNISTD_H
++#endif
+ #cmakedefine HAVE_STDARG_H
+ #cmakedefine HAVE_SIGNAL_H
+ #cmakedefine HAVE_EXECINFO_H
diff --git a/ports/nvtt/CONTROL b/ports/nvtt/CONTROL index 31ff5ecf4..19ef69da0 100644 --- a/ports/nvtt/CONTROL +++ b/ports/nvtt/CONTROL @@ -1,3 +1,3 @@ Source: nvtt
-Version: 2.1.0
+Version: 2.1.0-1
Description: Texture processing tools with support for Direct3D 10 and 11 formats.
\ No newline at end of file diff --git a/ports/nvtt/portfile.cmake b/ports/nvtt/portfile.cmake index 237a71b65..30e2e5cc6 100644 --- a/ports/nvtt/portfile.cmake +++ b/ports/nvtt/portfile.cmake @@ -18,6 +18,8 @@ vcpkg_from_github( REF 2.1.0
SHA512 6c5c9588af57023fc384de080cbe5c5ccd8707d04a9533384c606efd09730d780cb21bcf2d3576102a3facd2f281cacb2625958d74575e71550fd98da92e38b6
HEAD_REF master
+ PATCHES
+ "001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch"
)
vcpkg_configure_cmake(
diff --git a/ports/octomap/CONTROL b/ports/octomap/CONTROL index 21c72834f..71e76163a 100644 --- a/ports/octomap/CONTROL +++ b/ports/octomap/CONTROL @@ -1,3 +1,3 @@ Source: octomap -Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-3 +Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-5 Description: An Efficient Probabilistic 3D Mapping Framework Based on Octrees diff --git a/ports/octomap/portfile.cmake b/ports/octomap/portfile.cmake index e07551dbe..98630922e 100644 --- a/ports/octomap/portfile.cmake +++ b/ports/octomap/portfile.cmake @@ -14,6 +14,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_OCTOVIS_SUBPROJECT=OFF -DBUILD_DYNAMICETD3D_SUBPROJECT=OFF @@ -25,23 +26,28 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/octomap) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/binvox2bt.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/binvox2bt.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/bt2vrml.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/bt2vrml.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/compare_octrees.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/compare_octrees.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/convert_octree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/convert_octree.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/edit_octree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/edit_octree.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/eval_octree_accuracy.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/eval_octree_accuracy.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/graph2tree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/graph2tree.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/log2graph.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/log2graph.exe) - -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/binvox2bt.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/bt2vrml.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/compare_octrees.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/convert_octree.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/edit_octree.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/eval_octree_accuracy.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/graph2tree.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/log2graph.exe) +if(WIN32) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/binvox2bt.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/binvox2bt.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/bt2vrml.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/bt2vrml.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/compare_octrees.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/compare_octrees.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/convert_octree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/convert_octree.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/edit_octree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/edit_octree.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/eval_octree_accuracy.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/eval_octree_accuracy.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/graph2tree.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/graph2tree.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/log2graph.exe ${CURRENT_PACKAGES_DIR}/tools/octomap/log2graph.exe) + + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/binvox2bt.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/bt2vrml.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/compare_octrees.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/convert_octree.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/edit_octree.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/eval_octree_accuracy.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/graph2tree.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/log2graph.exe) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/octomap) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() vcpkg_fixup_cmake_targets(CONFIG_PATH share/octomap) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index 288e558e9..d7543d10b 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,5 +1,5 @@ Source: ogre -Version: 1.11.3-3 +Version: 1.11.3-4 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/ompl/portfile.cmake b/ports/ompl/portfile.cmake index b0814e3b1..f03c3dd15 100644 --- a/ports/ompl/portfile.cmake +++ b/ports/ompl/portfile.cmake @@ -12,6 +12,13 @@ include(vcpkg_common_functions)
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
+if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32)
+ message(WARNING "Ompl's buildsystem uses very long paths and may fail on your system.\n"
+ "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
+ )
+endif()
+
set(OMPL_VERSION 1.4.1)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/ompl/ompl/archive/${OMPL_VERSION}.zip"
diff --git a/ports/open62541/CONTROL b/ports/open62541/CONTROL new file mode 100644 index 000000000..abf413d79 --- /dev/null +++ b/ports/open62541/CONTROL @@ -0,0 +1,3 @@ +Source: open62541 +Version: 0.3.0 +Description: open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0. diff --git a/ports/open62541/portfile.cmake b/ports/open62541/portfile.cmake new file mode 100644 index 000000000..951ad9b48 --- /dev/null +++ b/ports/open62541/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + message("${PORT} currently requires the following tools from the system package manager:\n python-six\n\nThis can be installed on Ubuntu systems via apt-get install python-six python3-six (depending on your current python default interpreter)") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open62541/open62541 + REF v0.3.0 + SHA512 67766d226e1b900c0c37309099ecdbe987d10888ebf43f9066b21cf79f64d34e6ac30c2671a4901892f044859da4e8dbaa9fed5a49c633f73fef3bec75774050 + HEAD_REF master +) + +file(READ ${SOURCE_PATH}/CMakeLists.txt OPEN62541_CMAKELISTS) +string(REPLACE + "RUNTIME DESTINATION \${CMAKE_INSTALL_PREFIX}" + "RUNTIME DESTINATION \${BIN_INSTALL_DIR}" + OPEN62541_CMAKELISTS "${OPEN62541_CMAKELISTS}") +file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${OPEN62541_CMAKELISTS}") + +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") +if(NOT EXISTS ${PYTHON3_DIR}/easy_install${EXECUTABLE_SUFFIX}) + if(NOT EXISTS ${PYTHON3_DIR}/Scripts/pip${EXECUTABLE_SUFFIX}) + vcpkg_download_distfile(GET_PIP + URLS "https://bootstrap.pypa.io/get-pip.py" + FILENAME "tools/python/python3/get-pip.py" + SHA512 fdbcef1037dca7cc914e2304af657ebd08239cd18c3e79786dc25c8ea39957674e012d7ea8ae2c99006e4b61d3a5e24669ac5771dc186697fd9fdb40b6cc07ae + ) + execute_process(COMMAND ${PYTHON3_DIR}/python${EXECUTABLE_SUFFIX} ${PYTHON3_DIR}/get-pip.py) + endif() + execute_process(COMMAND ${PYTHON3_DIR}/Scripts/pip${EXECUTABLE_SUFFIX} install six) +else() + execute_process(COMMAND ${PYTHON3_DIR}/easy_install${EXECUTABLE_SUFFIX} six) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/open62541/tools) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/open62541) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/open62541/LICENSE ${CURRENT_PACKAGES_DIR}/share/open62541/copyright) diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index ed1206a0a..980b87fb6 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,3 +1,3 @@ Source: openblas -Version: 0.3.5 +Version: 0.3.5-1 Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/openblas/fix-space-path.patch b/ports/openblas/fix-space-path.patch new file mode 100644 index 000000000..1ceacd90a --- /dev/null +++ b/ports/openblas/fix-space-path.patch @@ -0,0 +1,45 @@ +diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
+index fc66eb0..ffaffcf 100644
+--- a/cmake/prebuild.cmake
++++ b/cmake/prebuild.cmake
+@@ -296,14 +296,14 @@ else(NOT CMAKE_CROSSCOMPILING)
+
+ set(GETARCH_DIR "${PROJECT_BINARY_DIR}/getarch_build")
+ set(GETARCH_BIN "getarch${CMAKE_EXECUTABLE_SUFFIX}")
+- file(MAKE_DIRECTORY ${GETARCH_DIR})
+- configure_file(${TARGET_CONF_TEMP} ${GETARCH_DIR}/${TARGET_CONF} COPYONLY)
++ file(MAKE_DIRECTORY "${GETARCH_DIR}")
++ configure_file(${TARGET_CONF_TEMP} "${GETARCH_DIR}/${TARGET_CONF}" COPYONLY)
+ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
+- try_compile(GETARCH_RESULT ${GETARCH_DIR}
++ try_compile(GETARCH_RESULT "${GETARCH_DIR}"
+ SOURCES ${GETARCH_SRC}
+- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I${GETARCH_DIR} -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}"
++ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I"${GETARCH_DIR}" -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}"
+ OUTPUT_VARIABLE GETARCH_LOG
+- COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN}
++ COPY_FILE "${PROJECT_BINARY_DIR}/${GETARCH_BIN}"
+ )
+
+ if (NOT ${GETARCH_RESULT})
+@@ -324,14 +324,14 @@ execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH_BIN}" 1 OUTPUT_VARIA
+
+ set(GETARCH2_DIR "${PROJECT_BINARY_DIR}/getarch2_build")
+ set(GETARCH2_BIN "getarch_2nd${CMAKE_EXECUTABLE_SUFFIX}")
+- file(MAKE_DIRECTORY ${GETARCH2_DIR})
+- configure_file(${TARGET_CONF_TEMP} ${GETARCH2_DIR}/${TARGET_CONF} COPYONLY)
++ file(MAKE_DIRECTORY "${GETARCH2_DIR}")
++ configure_file(${TARGET_CONF_TEMP} "${GETARCH2_DIR}/${TARGET_CONF}" COPYONLY)
+ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
+- try_compile(GETARCH2_RESULT ${GETARCH2_DIR}
+- SOURCES ${PROJECT_SOURCE_DIR}/getarch_2nd.c
+- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I${GETARCH2_DIR} -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}"
++ try_compile(GETARCH2_RESULT "${GETARCH2_DIR}"
++ SOURCES "${PROJECT_SOURCE_DIR}/getarch_2nd.c"
++ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I"${GETARCH2_DIR}" -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}"
+ OUTPUT_VARIABLE GETARCH2_LOG
+- COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN}
++ COPY_FILE "${PROJECT_BINARY_DIR}/${GETARCH2_BIN}"
+ )
+
+ if (NOT ${GETARCH2_RESULT})
diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index ef4e5e177..8ea8665e9 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -27,11 +27,9 @@ vcpkg_from_github( REF v0.3.5 SHA512 91b3074eb922453bf843158b4281cde65db9e8bbdd7590e75e9e6cdcb486157f7973f2936f327bb3eb4f1702ce0ba51ae6729d8d4baf2d986c50771e8f696df0 HEAD_REF develop -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/uwp.patch" + PATCHES + uwp.patch + fix-space-path.patch ) find_program(GIT NAMES git git.cmd) 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..9ea245ed3 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 @@ -377,6 +383,11 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake "${OPE file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/opencv/OpenCVModules.cmake ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake) +file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES) +string(REPLACE "${CURRENT_INSTALLED_DIR}" + "\${_VCPKG_INSTALLED_DIR}/\${VCPKG_TARGET_TRIPLET}" OPENCV_MODULES "${OPENCV_MODULES}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/openexr/fix_install_ilmimf.patch b/ports/openexr/fix_install_ilmimf.patch new file mode 100644 index 000000000..db65be736 --- /dev/null +++ b/ports/openexr/fix_install_ilmimf.patch @@ -0,0 +1,19 @@ +diff --git a/OpenEXR/IlmImf/CMakeLists.txt b/OpenEXR/IlmImf/CMakeLists.txt +index e1a8740..d31cf68 100644 +--- a/OpenEXR/IlmImf/CMakeLists.txt ++++ b/OpenEXR/IlmImf/CMakeLists.txt +@@ -2,14 +2,6 @@ + + SET(CMAKE_INCLUDE_CURRENT_DIR 1) + +-IF (WIN32) +- SET(RUNTIME_DIR ${OPENEXR_PACKAGE_PREFIX}/bin) +- SET(WORKING_DIR ${RUNTIME_DIR}) +-ELSE () +- SET(RUNTIME_DIR ${OPENEXR_PACKAGE_PREFIX}/lib) +- SET(WORKING_DIR .) +-ENDIF () +- + SET(BUILD_B44EXPLOGTABLE OFF) + IF (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h") + SET(BUILD_B44EXPLOGTABLE ON) diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index c32d07123..f06ee4841 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_from_github( REF v${OPENEXR_VERSION} SHA512 ${OPENEXR_HASH} HEAD_REF master + PATCHES "fix_install_ilmimf.patch" ) vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/openmesh/CONTROL b/ports/openmesh/CONTROL index cf502b2a2..d8a61f1f6 100644 --- a/ports/openmesh/CONTROL +++ b/ports/openmesh/CONTROL @@ -1,3 +1,3 @@ Source: openmesh
-Version: 7.0
+Version: 8.0
Description: A generic and efficient polygon mesh data structure
diff --git a/ports/openmesh/portfile.cmake b/ports/openmesh/portfile.cmake index 7bfacfe0e..04e624a03 100644 --- a/ports/openmesh/portfile.cmake +++ b/ports/openmesh/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions)
-set(VERSION 7.0)
+set(VERSION 8.0)
# Note: upstream GitLab instance at https://graphics.rwth-aachen.de:9000 often goes down
vcpkg_download_distfile(ARCHIVE
URLS "https://www.openmesh.org/media/Releases/${VERSION}/OpenMesh-${VERSION}.tar.gz"
FILENAME "OpenMesh-${VERSION}.tar.gz"
- SHA512 29280c8fe7208d39bd923c4d0444a24463e36b95402e6a75f42adc27bc1b261df9113442f69e1001dc1a8b1198488069ffb049742dcf6eac6ac1ecf4f216fad8
+ SHA512 6c9cb323d83d48daca7ddefe51df67f611befd657655d8013c2c620ad53e0b8521e6b8e25ebf3f5321f94182252ae0c75795875ff7ac11585e4ffa79e16f8008
)
vcpkg_extract_source_archive_ex(
diff --git a/ports/openmvg/CONTROL b/ports/openmvg/CONTROL index 261fd901f..ce974a9d6 100644 --- a/ports/openmvg/CONTROL +++ b/ports/openmvg/CONTROL @@ -1,4 +1,4 @@ Source: openmvg
-Version: 1.4-0
+Version: 1.4-1
Description: open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.
-Build-Depends: coinutils, clp, osi, lemon, flann, eigen3, ceres, cereal, libjpeg-turbo, tiff, libpng, zlib
+Build-Depends: coinutils, clp, osi, liblemon, flann, eigen3, ceres, cereal, libjpeg-turbo, tiff, libpng, zlib
diff --git a/ports/openmvg/portfile.cmake b/ports/openmvg/portfile.cmake index fd91a237d..26480bb3d 100644 --- a/ports/openmvg/portfile.cmake +++ b/ports/openmvg/portfile.cmake @@ -11,6 +11,14 @@ #
include(vcpkg_common_functions)
+
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
+if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32)
+ message(WARNING "Openmvg's buildsystem uses very long paths and may fail on your system.\n"
+ "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
+ )
+endif()
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openMVG/openMVG
diff --git a/ports/openssl-windows/CONTROL b/ports/openssl-windows/CONTROL index a62c2fbdc..bdbf764ab 100644 --- a/ports/openssl-windows/CONTROL +++ b/ports/openssl-windows/CONTROL @@ -1,3 +1,3 @@ Source: openssl-windows -Version: 1.0.2q +Version: 1.0.2q-2 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl-windows/EnableWinARM64.patch b/ports/openssl-windows/EnableWinARM64.patch new file mode 100644 index 000000000..9ec813a4e --- /dev/null +++ b/ports/openssl-windows/EnableWinARM64.patch @@ -0,0 +1,16 @@ +diff --git a/Configure b/Configure
+index 36a7a66..b31543d 100644
+--- a/Configure
++++ b/Configure
+@@ -592,9 +592,9 @@ my %table=(
+ "debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32",
+ # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
+ # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE'
+-"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
++"VC-WIN32","cl:-W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
+ # Unified CE target
+-"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
++"debug-VC-WIN32","cl:-W3 -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
+ "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
+
+ # Borland C++ 4.5
diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake index 8a95bd6c1..4331c2eab 100644 --- a/ports/openssl-windows/portfile.cmake +++ b/ports/openssl-windows/portfile.cmake @@ -6,7 +6,7 @@ include(vcpkg_common_functions) set(OPENSSL_VERSION 1.0.2q) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) -vcpkg_find_acquire_program(PERL) +vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") @@ -20,10 +20,12 @@ vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${MASTER_COPY_SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch - ${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch - ${CMAKE_CURRENT_LIST_DIR}/EnableWinARM32.patch - ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch + PATCHES + ConfigureIncludeQuotesFix.patch + STRINGIFYPatch.patch + EnableWinARM32.patch + EmbedSymbolsInStaticLibsZ7.patch + EnableWinARM64.patch ) vcpkg_find_acquire_program(NASM) @@ -52,6 +54,13 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") no-asm -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPENSSL_ARCH VC-WIN32) + set(OPENSSL_DO "ms\\do_ms.bat") + set(CONFIGURE_COMMAND ${CONFIGURE_COMMAND} + no-asm + -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + ) else() message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() diff --git a/ports/opentracing/CONTROL b/ports/opentracing/CONTROL new file mode 100644 index 000000000..293dd179c --- /dev/null +++ b/ports/opentracing/CONTROL @@ -0,0 +1,3 @@ +Source: opentracing
+Version: 1.5.1
+Description: C++ implementation of the OpenTracing API http://opentracing.io
diff --git a/ports/opentracing/portfile.cmake b/ports/opentracing/portfile.cmake new file mode 100644 index 000000000..cf82ddbf6 --- /dev/null +++ b/ports/opentracing/portfile.cmake @@ -0,0 +1,63 @@ +include(vcpkg_common_functions)
+
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
+ message(FATAL_ERROR "Error: UWP build is not supported.")
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ set( LOCAL_OPTIONS
+ -DBUILD_STATIC_LIBS=OFF
+ )
+else()
+ message("Static building is only possible when compiling static and dynamic versions at the same time. Enabling both.")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO opentracing/opentracing-cpp
+ REF cf9b9d5c26ef985af2213521a4f0701b7e715db2
+ SHA512 75b77781c075c6814bf4a81d793e872ca47447fe82a4cad878bee99ffb2082e13e95ee285f32fb2e599765b08b4404d8e475bacff79a412a954d227b93ba53ef
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ ${OPTIONS}
+ ${LOCAL_OPTIONS}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/OpenTracing")
+
+vcpkg_copy_pdbs()
+
+# Move DLLs to /bin
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/bin/opentracing.dll)
+
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/debug/bin/opentracing.dll)
+
+ # Fix targets
+ file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake RELEASE_CONFIG)
+ string(REPLACE "\${_IMPORT_PREFIX}/lib/opentracing.dll"
+ "\${_IMPORT_PREFIX}/bin/opentracing.dll" RELEASE_CONFIG ${RELEASE_CONFIG})
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake "${RELEASE_CONFIG}")
+
+ file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake DEBUG_CONFIG)
+ string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/opentracing.dll"
+ "\${_IMPORT_PREFIX}/debug/bin/opentracing.dll" DEBUG_CONFIG ${DEBUG_CONFIG})
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake "${DEBUG_CONFIG}")
+ endif()
+endif()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opentracing RENAME copyright)
+
+# Remove duplicate headers
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
diff --git a/ports/openvdb/0001-fix-cmake-modules.patch b/ports/openvdb/0001-fix-cmake-modules.patch index 1e613e602..03cc2461e 100644 --- a/ports/openvdb/0001-fix-cmake-modules.patch +++ b/ports/openvdb/0001-fix-cmake-modules.patch @@ -67,6 +67,15 @@ index cea0b86..07ea09e 100644 FIND_PACKAGE_HANDLE_STANDARD_ARGS ( GLFW3 REQUIRED_VARS GLFW3_LOCATION +@@ -59,7 +59,7 @@ IF (GLFW3_FOUND) + NO_CMAKE_SYSTEM_PATH + ) + ELSE (GLFW3_USE_STATIC_LIBS) +- FIND_LIBRARY ( GLFW3_glfw_LIBRARY glfw ++ FIND_LIBRARY ( GLFW3_glfw_LIBRARY glfw3dll + PATHS ${GLFW3_LOCATION}/lib + PATH_SUFFIXES ${GLFW3_PATH_SUFFIXES} + NO_DEFAULT_PATH diff --git a/cmake/FindILMBase.cmake b/cmake/FindILMBase.cmake index 664affd..5197110 100644 --- a/cmake/FindILMBase.cmake diff --git a/ports/openvdb/0003-build-only-necessary-targets.patch b/ports/openvdb/0003-build-only-necessary-targets.patch index 55b480ce4..8be8263a5 100644 --- a/ports/openvdb/0003-build-only-necessary-targets.patch +++ b/ports/openvdb/0003-build-only-necessary-targets.patch @@ -1,8 +1,8 @@ diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt -index 9404dbc..b4129e3 100644 +index 9404dbc..94daf8c 100644 --- a/openvdb/CMakeLists.txt +++ b/openvdb/CMakeLists.txt -@@ -29,12 +29,13 @@ PROJECT ( OpenVDBCore ) +@@ -29,28 +29,31 @@ PROJECT ( OpenVDBCore ) set(CMAKE_CXX_STANDARD 11) @@ -11,21 +11,25 @@ index 9404dbc..b4129e3 100644 FIND_PACKAGE ( GLFW3 REQUIRED ) SET ( OPENVDB_USE_GLFW_FLAG "-DOPENVDB_USE_GLFW_3" ) IF ( UNIX AND NOT APPLE ) - SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) +- SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) - ENDIF ( UNIX AND NOT APPLE ) ++ SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) + ENDIF () SET ( GLFW_LINK_LIBRARY ${GLFW3_glfw_LIBRARY} ) SET ( GLFW_INCLUDE_DIRECTORY ${GLFW3_INCLUDE_DIR} CACHE STRING "GLFW3 include directory") ELSE () -@@ -45,12 +46,14 @@ ELSE () + FIND_PACKAGE ( GLFW REQUIRED ) + IF ( UNIX AND NOT APPLE ) +- SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) ++ SET ( GLFW_DEPENDENT_LIBRARIES "X11;Xi;Xrandr;Xinerama;Xcursor;Xxf86vm" ) + ENDIF () SET ( GLFW_LINK_LIBRARY ${GLFW_glfw_LIBRARY} ) SET ( GLFW_INCLUDE_DIRECTORY ${GLFW_INCLUDE_DIR} CACHE STRING "GLFW include directory") ENDIF () +ENDIF () --IF (WIN32) +IF ( OPENVDB_BUILD_TOOLS ) -+IF ( WIN32 ) + IF (WIN32) FIND_PACKAGE ( GLEW REQUIRED ) -ELSE () - FIND_PACKAGE ( Threads REQUIRED ) @@ -57,7 +61,8 @@ index 9404dbc..b4129e3 100644 - COMPILE_FLAGS "-DOPENVDB_PRIVATE -DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG}" + COMPILE_FLAGS "-DOPENVDB_PRIVATE -DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} $<$<CXX_COMPILER_ID:MSVC>:/bigobj>" ) - +- ++ +IF ( OPENVDB_STATIC ) ADD_LIBRARY ( openvdb_static STATIC ${OPENVDB_LIBRARY_SOURCE_FILES} @@ -121,7 +126,19 @@ index 9404dbc..b4129e3 100644 ADD_EXECUTABLE ( vdb_print ${VDB_PRINT_SOURCE_FILES} ) -@@ -236,7 +257,7 @@ TARGET_LINK_LIBRARIES ( vdb_print +@@ -229,14 +250,19 @@ TARGET_LINK_LIBRARIES ( vdb_print + openvdb_shared + ${CMAKE_THREAD_LIBS_INIT} + ${BLOSC_blosc_LIBRARY} ++ ) ++ ++IF (NOT WIN32) ++TARGET_LINK_LIBRARIES ( vdb_print + m + stdc++ + ) ++ENDIF () + SET ( VDB_RENDER_SOURCE_FILES cmd/openvdb_render/main.cc ) SET_SOURCE_FILES_PROPERTIES ( ${VDB_RENDER_SOURCE_FILES} PROPERTIES @@ -130,56 +147,81 @@ index 9404dbc..b4129e3 100644 ) ADD_EXECUTABLE ( vdb_render ${VDB_RENDER_SOURCE_FILES} -@@ -263,31 +284,40 @@ SET ( VDB_VIEW_SOURCE_FILES +@@ -249,9 +275,14 @@ TARGET_LINK_LIBRARIES ( vdb_render + ${Openexr_ILMIMF_LIBRARY} + ${Ilmbase_ILMTHREAD_LIBRARY} + ${Ilmbase_IEX_LIBRARY} ++ ) ++ ++IF (NOT WIN32) ++TARGET_LINK_LIBRARIES ( vdb_render + m + stdc++ + ) ++ENDIF () + + SET ( VDB_VIEW_SOURCE_FILES + cmd/openvdb_view/main.cc +@@ -263,29 +294,38 @@ SET ( VDB_VIEW_SOURCE_FILES ) SET_SOURCE_FILES_PROPERTIES ( ${VDB_VIEW_SOURCE_FILES} PROPERTIES - COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} -DGL_GLEXT_PROTOTYPES=1" + COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} -DGL_GLEXT_PROTOTYPES=1 $<$<CXX_COMPILER_ID:MSVC>:/bigobj>" ++ ) ++ ++ADD_EXECUTABLE ( vdb_view ++ ${VDB_VIEW_SOURCE_FILES} ) -IF (NOT WIN32) -+ - ADD_EXECUTABLE ( vdb_view - ${VDB_VIEW_SOURCE_FILES} - ) -- -+ - target_include_directories ( vdb_view SYSTEM PRIVATE ${Boost_INCLUDE_DIR} ) +- ADD_EXECUTABLE ( vdb_view +- ${VDB_VIEW_SOURCE_FILES} +- ) + +- target_include_directories ( vdb_view SYSTEM PRIVATE ${Boost_INCLUDE_DIR} ) ++target_include_directories ( vdb_view SYSTEM PRIVATE ${Boost_INCLUDE_DIR} ) - TARGET_LINK_LIBRARIES ( vdb_view - openvdb_shared +- TARGET_LINK_LIBRARIES ( vdb_view +- openvdb_shared - ${Boost_THREAD_LIBRARY} -+ ${Boost_LIBRARIES} - ${OPENGL_gl_LIBRARY} - ${OPENGL_glu_LIBRARY} +- ${OPENGL_gl_LIBRARY} +- ${OPENGL_glu_LIBRARY} - ${COCOA_LIBRARY} - ${IOKIT_LIBRARY} - ${COREVIDEO_LIBRARY} - ${GLFW_LINK_LIBRARY} - ${GLFW_DEPENDENT_LIBRARIES} - ${GLEW_GLEW_LIBRARY} -+ ) -+ IF (APPLE) -+ TARGET_LINK_LIBRARIES ( vdb_view -+ ${COCOA_LIBRARY} -+ ${IOKIT_LIBRARY} -+ ${COREVIDEO_LIBRARY} -+ ) -+ ENDIF () -+ IF (NOT WIN32) -+ TARGET_LINK_LIBRARIES ( vdb_view - m - stdc++ +- ${GLFW_LINK_LIBRARY} +- ${GLFW_DEPENDENT_LIBRARIES} +- ${GLEW_GLEW_LIBRARY} +- m +- stdc++ - ) ++TARGET_LINK_LIBRARIES ( vdb_view ++ openvdb_shared ++ ${Boost_LIBRARIES} ++ ${OPENGL_gl_LIBRARY} ++ ${OPENGL_glu_LIBRARY} ++ ${GLFW_LINK_LIBRARY} ++ ${GLFW_DEPENDENT_LIBRARIES} ++ ${GLEW_GLEW_LIBRARY} ++ ) ++IF (APPLE) ++TARGET_LINK_LIBRARIES ( vdb_view ++ ${COCOA_LIBRARY} ++ ${IOKIT_LIBRARY} ++ ${COREVIDEO_LIBRARY} ++) ++ENDIF () ++IF (NOT WIN32) ++TARGET_LINK_LIBRARIES ( vdb_view ++ m ++ stdc++ + ) -+ ENDIF () ++ ++ENDIF () ENDIF () -+ SET ( UNITTEST_SOURCE_FILES - unittest/main.cc - unittest/TestAttributeArray.cc -@@ -398,7 +428,7 @@ IF ( OPENVDB_BUILD_UNITTESTS ) +@@ -398,7 +438,7 @@ IF ( OPENVDB_BUILD_UNITTESTS ) ADD_TEST ( vdb_unit_test vdb_test ) @@ -188,7 +230,7 @@ index 9404dbc..b4129e3 100644 # Doxygen docmentation IF (OPENVDB_BUILD_DOCS) -@@ -419,26 +449,29 @@ IF (OPENVDB_BUILD_DOCS) +@@ -419,26 +459,29 @@ IF (OPENVDB_BUILD_DOCS) ENDIF () # Installation @@ -199,28 +241,38 @@ index 9404dbc..b4129e3 100644 DESTINATION bin ) --ENDIF () - INSTALL ( TARGETS - vdb_print - vdb_render - DESTINATION - bin - ) -+ENDIF () ++ INSTALL ( TARGETS ++ vdb_print ++ vdb_render ++ DESTINATION ++ bin ++ ) + ENDIF () +-INSTALL ( TARGETS +- vdb_print +- vdb_render +- DESTINATION +- bin +- ) +-INSTALL ( TARGETS +- openvdb_static +- DESTINATION +- lib +- ) +IF ( OPENVDB_STATIC) - INSTALL ( TARGETS - openvdb_static - DESTINATION - lib - ) ++ INSTALL ( TARGETS ++ openvdb_static ++ DESTINATION ++ lib ++ ) +ENDIF () +IF ( OPENVDB_SHARED ) IF (WIN32) INSTALL ( TARGETS openvdb_shared -@@ -452,6 +485,7 @@ ELSE() +@@ -452,6 +495,7 @@ ELSE() lib ) ENDIF () diff --git a/ports/openvdb/0004-add-necessary-head.patch b/ports/openvdb/0004-add-necessary-head.patch new file mode 100644 index 000000000..bbe7246b1 --- /dev/null +++ b/ports/openvdb/0004-add-necessary-head.patch @@ -0,0 +1,59 @@ +diff --git a/openvdb/viewer/ClipBox.h b/openvdb/viewer/ClipBox.h
+index ad62d39..c68c5be 100644
+--- a/openvdb/viewer/ClipBox.h
++++ b/openvdb/viewer/ClipBox.h
+@@ -37,6 +37,7 @@
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glu.h>
+ #else
++#include <windows.h>
+ #include <GL/gl.h>
+ #include <GL/glu.h>
+ #endif
+diff --git a/openvdb/viewer/Font.h b/openvdb/viewer/Font.h
+index da62993..b341165 100644
+--- a/openvdb/viewer/Font.h
++++ b/openvdb/viewer/Font.h
+@@ -37,6 +37,7 @@
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glu.h>
+ #else
++#include <windows.h>
+ #include <GL/gl.h>
+ #include <GL/glu.h>
+ #endif
+diff --git a/openvdb/viewer/RenderModules.h b/openvdb/viewer/RenderModules.h
+index b9fa5b1..fd38a50 100644
+--- a/openvdb/viewer/RenderModules.h
++++ b/openvdb/viewer/RenderModules.h
+@@ -31,6 +31,7 @@
+ #ifndef OPENVDB_VIEWER_RENDERMODULES_HAS_BEEN_INCLUDED
+ #define OPENVDB_VIEWER_RENDERMODULES_HAS_BEEN_INCLUDED
+
++#include <GL/glew.h>
+ #include <openvdb/openvdb.h>
+ #include <openvdb/tools/VolumeToMesh.h>
+ #include <openvdb/tools/MeshToVolume.h>
+@@ -41,6 +42,7 @@
+ #include <vector>
+
+ #if defined(__APPLE__) || defined(MACOSX)
++#include <windows.h>
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glu.h>
+ #else
+diff --git a/openvdb/viewer/Viewer.cc b/openvdb/viewer/Viewer.cc
+index 31bb7a4..88bd308 100644
+--- a/openvdb/viewer/Viewer.cc
++++ b/openvdb/viewer/Viewer.cc
+@@ -31,9 +31,9 @@
+ #include "Viewer.h"
+
+ #include "Camera.h"
++#include "RenderModules.h"
+ #include "ClipBox.h"
+ #include "Font.h"
+-#include "RenderModules.h"
+ #include <openvdb/util/Formats.h> // for formattedInt()
+ #include <openvdb/util/logging.h>
+ #include <openvdb/points/PointDataGrid.h>
diff --git a/ports/openvdb/CONTROL b/ports/openvdb/CONTROL index acf11cd00..b2db99e4c 100644 --- a/ports/openvdb/CONTROL +++ b/ports/openvdb/CONTROL @@ -1,5 +1,5 @@ Source: openvdb -Version: 6.0.0 +Version: 6.0.0-1 Build-Depends: boost-ptr-container, openexr, tbb, blosc, boost-iostreams, boost-system, boost-thread, boost-date-time, boost-any, boost-uuid, boost-interprocess Description: Sparse volume data structure and tools diff --git a/ports/openvdb/portfile.cmake b/ports/openvdb/portfile.cmake index 7f2fa6c29..5b24e7600 100644 --- a/ports/openvdb/portfile.cmake +++ b/ports/openvdb/portfile.cmake @@ -7,9 +7,10 @@ vcpkg_from_github( SHA512 6b9e267fff46647b39e1e6faa12059442196c1858df1fda1515cfc375e25bc3033e2828c80e63a652509cfba386376e022cebf81ec85aaccece421b0c721529b HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-fix-cmake-modules.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-add-custom-options.patch - ${CMAKE_CURRENT_LIST_DIR}/0003-build-only-necessary-targets.patch + 0001-fix-cmake-modules.patch + 0002-add-custom-options.patch + 0003-build-only-necessary-targets.patch + 0004-add-necessary-head.patch ) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL index a40b11c64..ce09b87bf 100644 --- a/ports/opus/CONTROL +++ b/ports/opus/CONTROL @@ -1,3 +1,3 @@ Source: opus -Version: 1.3-1 +Version: 1.3-2 Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/no-main.patch b/ports/opus/no-main.patch deleted file mode 100644 index 6c373de7b..000000000 --- a/ports/opus/no-main.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/win32/VS2015/opus.vcxproj b/win32/VS2015/opus.vcxproj
-index 33bf706..296bc79 100644
---- a/win32/VS2015/opus.vcxproj
-+++ b/win32/VS2015/opus.vcxproj
-@@ -350,9 +350,6 @@
- <ClCompile Include="..\..\src\mlp.c" />
- <ClCompile Include="..\..\src\mlp_data.c" />
- <ClCompile Include="..\..\src\opus.c" />
-- <ClCompile Include="..\..\src\opus_compare.c">
-- <DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-- </ClCompile>
- <ClCompile Include="..\..\src\opus_decoder.c" />
- <ClCompile Include="..\..\src\opus_encoder.c" />
- <ClCompile Include="..\..\src\opus_multistream.c" />
diff --git a/ports/opus/package_version.in b/ports/opus/package_version.in deleted file mode 100644 index 4bc971b33..000000000 --- a/ports/opus/package_version.in +++ /dev/null @@ -1 +0,0 @@ -PACKAGE_VERSION="@OPUS_VERSION@" diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index ae257690c..59cc33b37 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -1,84 +1,28 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "UWP builds not supported") -endif() - include(vcpkg_common_functions) -set(OPUS_VERSION "1.3") - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO xiph/opus - REF v1.3 - SHA512 5ac067514b6471432fcd027b912dcaa765e2bdc986ea289a2aeb57660d18fa1460a0a697b9736d8e2b65eb7b72ad4fa36b9b213389fe1e64335db8e9ad51b750 - HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-main.patch" -) - -configure_file( - ${CMAKE_CURRENT_LIST_DIR}/package_version.in - ${SOURCE_PATH}/package_version -) - -# Ensure proper crt linkage -file(READ ${SOURCE_PATH}/win32/VS2015/common.props OPUS_PROPS) -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - string(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" OPUS_PROPS "${OPUS_PROPS}") - string(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" OPUS_PROPS "${OPUS_PROPS}") -else() - string(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" OPUS_PROPS "${OPUS_PROPS}") - string(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" OPUS_PROPS "${OPUS_PROPS}") -endif() -file(WRITE ${SOURCE_PATH}/win32/VS2015/common.props "${OPUS_PROPS}") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(RELEASE_CONFIGURATION "Release") - set(DEBUG_CONFIGURATION "Debug") -else() - set(RELEASE_CONFIGURATION "ReleaseDll") - set(DEBUG_CONFIGURATION "DebugDll") -endif() - -if(TARGET_TRIPLET MATCHES "x86") - set(ARCH_DIR "Win32") -elseif(TARGET_TRIPLET MATCHES "x64") - set(ARCH_DIR "x64") -else() - message(FATAL_ERROR "Architecture not supported") -endif() - -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/win32/VS2015/opus.vcxproj - RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} - DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - # Install release build - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - - # Install debug build - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) -else() - # Install release build - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) - - # Install debug build - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) -endif() - + OUT_SOURCE_PATH + SOURCE_PATH + REPO + xiph/opus + REF + f9d3d432d135253357ba457ecd0e4f68f12a4584 + SHA512 + 9d77d063e0215c4f4e46b044d2f51106b3a599aeab7b1b788efa1fc79d0d2bc7780adafef6ffe6d3276f24223490898aa695cbbe36df174da9ba2317b21cb369 + HEAD_REF + master) + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Opus) vcpkg_copy_pdbs() -# Install headers -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME opus) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(READ ${CURRENT_PACKAGES_DIR}/include/opus/opus_defines.h OPUS_DEFINES) - string(REPLACE "define OPUS_EXPORT" "define OPUS_EXPORT __declspec(dllimport)" OPUS_DEFINES "${OPUS_DEFINES}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/opus/opus_defines.h "${OPUS_DEFINES}") -endif() +file(INSTALL + ${SOURCE_PATH}/COPYING + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/opus + RENAME copyright) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/opus RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/orc/0002-fix-executable-output-folder.patch b/ports/orc/0002-fix-executable-output-folder.patch deleted file mode 100644 index 5fa992dc1..000000000 --- a/ports/orc/0002-fix-executable-output-folder.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt -index eb6d232..5a99f5c 100644 ---- a/tools/src/CMakeLists.txt -+++ b/tools/src/CMakeLists.txt -@@ -87,4 +87,7 @@ install(TARGETS - orc-contents - orc-metadata - orc-statistics -- DESTINATION bin) -+ orc-scan -+ orc-memory -+ csv-import -+ DESTINATION tools/orc) diff --git a/ports/orc/0001-dependencies-from-vcpkg.patch b/ports/orc/0003-dependencies-from-vcpkg.patch index 7930bf148..ae62d9fb0 100644 --- a/ports/orc/0001-dependencies-from-vcpkg.patch +++ b/ports/orc/0003-dependencies-from-vcpkg.patch @@ -1,141 +1,184 @@ -diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
-index 91c67d5..4377b83 100644
---- a/c++/src/CMakeLists.txt
-+++ b/c++/src/CMakeLists.txt
-@@ -197,11 +197,12 @@ endif(BUILD_LIBHDFSPP)
- add_library (orc STATIC ${SOURCE_FILES})
-
- target_link_libraries (orc
-- protobuf
-- zlib
-- snappy
-- lz4
-- ${LIBHDFSPP_LIBRARIES}
-+ PUBLIC
-+ protobuf::libprotobuf
-+ ZLIB::ZLIB
-+ Snappy::snappy
-+ ${LZ4_STATIC_LIB}
-+ ${LIBHDFSPP_LIBRARIES}
- )
-
- install(TARGETS orc DESTINATION lib)
-\ No newline at end of file
-diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
-index 015814a..2b55f4e 100644
---- a/c++/test/CMakeLists.txt
-+++ b/c++/test/CMakeLists.txt
-@@ -48,10 +48,6 @@ add_executable (orc-test
-
- target_link_libraries (orc-test
- orc
-- lz4
-- protobuf
-- snappy
-- zlib
- ${GTEST_LIBRARIES}
- )
-
-diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
-index 0272263..8b79a12 100644
---- a/cmake_modules/ThirdpartyToolchain.cmake
-+++ b/cmake_modules/ThirdpartyToolchain.cmake
-@@ -51,8 +51,8 @@ endif ()
- # ----------------------------------------------------------------------
- # Snappy
-
--if (NOT "${SNAPPY_HOME}" STREQUAL "")
-- find_package (Snappy REQUIRED)
-+if (NOT "${SNAPPY_HOME}" STREQUAL "" OR 1)
-+ find_package (Snappy CONFIG REQUIRED)
- set(SNAPPY_VENDORED FALSE)
- else ()
- set(SNAPPY_HOME "${THIRDPARTY_DIR}/snappy_ep-install")
-@@ -70,10 +70,6 @@ else ()
- set(SNAPPY_VENDORED TRUE)
- endif ()
-
--include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR})
--add_library (snappy STATIC IMPORTED)
--set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB})
--
- if (SNAPPY_VENDORED)
- add_dependencies (snappy snappy_ep)
- if (INSTALL_VENDORED_LIBS)
-@@ -85,7 +81,7 @@ endif ()
- # ----------------------------------------------------------------------
- # ZLIB
-
--if (NOT "${ZLIB_HOME}" STREQUAL "")
-+if (NOT "${ZLIB_HOME}" STREQUAL "" OR 1)
- find_package (ZLIB REQUIRED)
- set(ZLIB_VENDORED FALSE)
- else ()
-@@ -112,10 +108,6 @@ else ()
- set(ZLIB_VENDORED TRUE)
- endif ()
-
--include_directories (SYSTEM ${ZLIB_INCLUDE_DIR})
--add_library (zlib STATIC IMPORTED)
--set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB})
--
- if (ZLIB_VENDORED)
- add_dependencies (zlib zlib_ep)
- if (INSTALL_VENDORED_LIBS)
-@@ -127,8 +119,8 @@ endif ()
- # ----------------------------------------------------------------------
- # LZ4
-
--if (NOT "${LZ4_HOME}" STREQUAL "")
-- find_package (LZ4 REQUIRED)
-+if (NOT "${LZ4_HOME}" STREQUAL "" OR 1)
-+ find_library(LZ4_STATIC_LIB NAMES lz4d lz4)
- set(LZ4_VENDORED FALSE)
- else ()
- set(LZ4_PREFIX "${THIRDPARTY_DIR}/lz4_ep-install")
-@@ -154,8 +146,6 @@ else ()
- endif ()
-
- include_directories (SYSTEM ${LZ4_INCLUDE_DIR})
--add_library (lz4 STATIC IMPORTED)
--set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB})
-
- if (LZ4_VENDORED)
- add_dependencies (lz4 lz4_ep)
-@@ -230,8 +220,8 @@ endif ()
- # ----------------------------------------------------------------------
- # Protobuf
-
--if (NOT "${PROTOBUF_HOME}" STREQUAL "")
-- find_package (Protobuf REQUIRED)
-+if (NOT "${PROTOBUF_HOME}" STREQUAL "" OR 1)
-+ find_package(protobuf CONFIG REQUIRED)
- set(PROTOBUF_VENDORED FALSE)
- else ()
- set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install")
-@@ -266,13 +256,8 @@ else ()
- set(PROTOBUF_VENDORED TRUE)
- endif ()
-
--include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR})
-
--add_library (protobuf STATIC IMPORTED)
--set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB})
-
--add_library (protoc STATIC IMPORTED)
--set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_STATIC_LIB})
-
- if (PROTOBUF_VENDORED)
- add_dependencies (protoc protobuf_ep)
-diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt
-index 667fab4..eb6d232 100644
---- a/tools/src/CMakeLists.txt
-+++ b/tools/src/CMakeLists.txt
-@@ -49,7 +49,6 @@ add_executable (orc-metadata
-
- target_link_libraries (orc-metadata
- orc
-- protobuf
- )
-
- add_executable (orc-statistics
+diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt +index 235ced8..0042a88 100644 +--- a/c++/src/CMakeLists.txt ++++ b/c++/src/CMakeLists.txt +@@ -218,12 +218,13 @@ endif(BUILD_LIBHDFSPP) + add_library (orc STATIC ${SOURCE_FILES}) + + target_link_libraries (orc +- protobuf +- zlib +- snappy +- lz4 +- zstd +- ${LIBHDFSPP_LIBRARIES} ++ PRIVATE ++ protobuf::libprotobuf ++ ZLIB::ZLIB ++ Snappy::snappy ++ ${LZ4_STATIC_LIB} ++ ${ZSTD_STATIC_LIB} ++ ${LIBHDFSPP_LIBRARIES} + ) + + install(TARGETS orc DESTINATION lib) +diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt +index db68578..709ad07 100644 +--- a/c++/test/CMakeLists.txt ++++ b/c++/test/CMakeLists.txt +@@ -50,10 +50,10 @@ add_executable (orc-test + + target_link_libraries (orc-test + orc +- lz4 +- protobuf +- snappy +- zlib ++ protobuf::libprotobuf ++ ZLIB::ZLIB ++ Snappy::snappy ++ ${LZ4_STATIC_LIB} + ${GTEST_LIBRARIES} + ) + +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +index 1a28b1a..89f57d8 100644 +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -59,8 +59,8 @@ endif () + # ---------------------------------------------------------------------- + # Snappy + +-if (NOT "${SNAPPY_HOME}" STREQUAL "") +- find_package (Snappy REQUIRED) ++if (NOT "${SNAPPY_HOME}" STREQUAL "" OR 1) ++ find_package (Snappy CONFIG REQUIRED) + set(SNAPPY_VENDORED FALSE) + else () + set(SNAPPY_HOME "${THIRDPARTY_DIR}/snappy_ep-install") +@@ -78,10 +78,6 @@ else () + set(SNAPPY_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR}) +-add_library (snappy STATIC IMPORTED) +-set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB}) +- + if (SNAPPY_VENDORED) + add_dependencies (snappy snappy_ep) + if (INSTALL_VENDORED_LIBS) +@@ -93,7 +89,8 @@ endif () + # ---------------------------------------------------------------------- + # ZLIB + +-if (NOT "${ZLIB_HOME}" STREQUAL "") ++ ++if (NOT "${ZLIB_HOME}" STREQUAL "" OR 1) + find_package (ZLIB REQUIRED) + set(ZLIB_VENDORED FALSE) + else () +@@ -120,10 +117,6 @@ else () + set(ZLIB_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${ZLIB_INCLUDE_DIR}) +-add_library (zlib STATIC IMPORTED) +-set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB}) +- + if (ZLIB_VENDORED) + add_dependencies (zlib zlib_ep) + if (INSTALL_VENDORED_LIBS) +@@ -134,9 +127,8 @@ endif () + + # ---------------------------------------------------------------------- + # Zstd +- +-if (NOT "${ZSTD_HOME}" STREQUAL "") +- find_package (zstd REQUIRED) ++if (NOT "${ZSTD_HOME}" STREQUAL "" OR 1) ++ find_library(ZSTD_STATIC_LIB NAMES zstd zstd_static) + set(ZSTD_VENDORED FALSE) + else () + set(ZSTD_HOME "${THIRDPARTY_DIR}/zstd_ep-install") +@@ -169,10 +161,6 @@ else () + set(ZSTD_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${ZSTD_INCLUDE_DIR}) +-add_library (zstd STATIC IMPORTED) +-set_target_properties (zstd PROPERTIES IMPORTED_LOCATION ${ZSTD_STATIC_LIB}) +- + if (ZSTD_VENDORED) + add_dependencies (zstd zstd_ep) + if (INSTALL_VENDORED_LIBS) +@@ -183,9 +171,8 @@ endif () + + # ---------------------------------------------------------------------- + # LZ4 +- +-if (NOT "${LZ4_HOME}" STREQUAL "") +- find_package (LZ4 REQUIRED) ++if (NOT "${LZ4_HOME}" STREQUAL "" OR 1) ++ find_library(LZ4_STATIC_LIB NAMES lz4d lz4) + set(LZ4_VENDORED FALSE) + else () + set(LZ4_PREFIX "${THIRDPARTY_DIR}/lz4_ep-install") +@@ -211,10 +198,6 @@ else () + set(LZ4_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${LZ4_INCLUDE_DIR}) +-add_library (lz4 STATIC IMPORTED) +-set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB}) +- + if (LZ4_VENDORED) + add_dependencies (lz4 lz4_ep) + if (INSTALL_VENDORED_LIBS) +@@ -287,9 +270,8 @@ endif () + + # ---------------------------------------------------------------------- + # Protobuf +- +-if (NOT "${PROTOBUF_HOME}" STREQUAL "") +- find_package (Protobuf REQUIRED) ++if (NOT "${PROTOBUF_HOME}" STREQUAL "" OR 1) ++ find_package (protobuf CONFIG REQUIRED) + set(PROTOBUF_VENDORED FALSE) + else () + set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install") +@@ -325,14 +307,6 @@ else () + set(PROTOBUF_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR}) +- +-add_library (protobuf STATIC IMPORTED) +-set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB}) +- +-add_library (protoc STATIC IMPORTED) +-set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_STATIC_LIB}) +- + if (PROTOBUF_VENDORED) + add_dependencies (protoc protobuf_ep) + add_dependencies (protobuf protobuf_ep) +diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt +index f5a53ca..15391bf 100644 +--- a/tools/src/CMakeLists.txt ++++ b/tools/src/CMakeLists.txt +@@ -51,7 +51,6 @@ add_executable (orc-metadata + + target_link_libraries (orc-metadata + orc +- protobuf + ${CMAKE_THREAD_LIBS_INIT} + ) + +@@ -95,4 +94,7 @@ install(TARGETS + orc-contents + orc-metadata + orc-statistics +- DESTINATION bin) ++ orc-scan ++ orc-memory ++ csv-import ++ DESTINATION tools/orc) diff --git a/ports/orc/CONTROL b/ports/orc/CONTROL index 45532cad3..1cb8967ed 100644 --- a/ports/orc/CONTROL +++ b/ports/orc/CONTROL @@ -1,4 +1,4 @@ Source: orc -Version: 1.5.2-f47e02c-2 -Build-Depends: zlib, protobuf, lz4, snappy, gtest +Version: 1.5.5 +Build-Depends: zlib, protobuf, lz4, snappy, zstd, gtest Description: The smallest, fastest columnar storage for Hadoop workloads. diff --git a/ports/orc/portfile.cmake b/ports/orc/portfile.cmake index f9a23b708..e72f9fd69 100644 --- a/ports/orc/portfile.cmake +++ b/ports/orc/portfile.cmake @@ -3,16 +3,16 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/orc - REF f47e02cfbf346f14d7f38c3ddd45d39e3b515847 - SHA512 5a389f4ab3b0ce4e7c8869493cf9e91feb4917a42bf2740abd71602fa03a2a53217b572e60af7328b7568dab084c07275ea275438ec8ae87f230a87fb60f2601 + REF 47a490f083bd411bf04bfed8131eef42606d7789 + SHA512 c2650d9fd367a5ec04c79c16434728e5c20608131f21bfc89d412cbaf8dd4ae5900b03e59df21d3617d8c6a9504e4b14b1f788157afa90b57d733499d2995e39 HEAD_REF master PATCHES - 0001-dependencies-from-vcpkg.patch - 0002-fix-executable-output-folder.patch -) + 0003-dependencies-from-vcpkg.patch + ) file(REMOVE "${SOURCE_PATH}/cmake_modules/FindGTest.cmake") file(REMOVE "${SOURCE_PATH}/cmake_modules/FindLZ4.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindZSTD.cmake") file(REMOVE "${SOURCE_PATH}/cmake_modules/FindProtobuf.cmake") file(REMOVE "${SOURCE_PATH}/cmake_modules/FindSnappy.cmake") file(REMOVE "${SOURCE_PATH}/cmake_modules/FindZLIB.cmake") diff --git a/ports/orc/usage b/ports/orc/usage index 6a20ccb89..b364b8bfe 100644 --- a/ports/orc/usage +++ b/ports/orc/usage @@ -5,6 +5,7 @@ The package orc does not provide CMake targets: find_package(Snappy CONFIG REQUIRED) find_library(LZ4_LIBRARY NAMES lz4d lz4) + find_library(ZSTD_LIBRARY NAMES zstd) find_library(ORC_LIBRARY NAMES orc) - target_link_libraries(main PRIVATE ${ORC_LIBRARY} protobuf::libprotoc protobuf::libprotobuf Snappy::snappy ${LZ4_LIBRARY} ZLIB::ZLIB) + target_link_libraries(main PRIVATE ${ORC_LIBRARY} protobuf::libprotoc protobuf::libprotobuf Snappy::snappy ${LZ4_LIBRARY} ${ZSTD_LIBRARY} ZLIB::ZLIB) diff --git a/ports/orocos-kdl/CONTROL b/ports/orocos-kdl/CONTROL new file mode 100644 index 000000000..af590b4b3 --- /dev/null +++ b/ports/orocos-kdl/CONTROL @@ -0,0 +1,4 @@ +Source: orocos-kdl
+Version: 1.4
+Description: Kinematics and Dynamics Library
+Build-Depends: eigen3
diff --git a/ports/orocos-kdl/portfile.cmake b/ports/orocos-kdl/portfile.cmake new file mode 100644 index 000000000..622a9da93 --- /dev/null +++ b/ports/orocos-kdl/portfile.cmake @@ -0,0 +1,47 @@ +# 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)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO orocos/orocos_kinematics_dynamics
+ REF v1.4.0
+ SHA512 7156465e2aff02f472933617512069355836a03a02d4587cfe03c1b1d667a9762a4e3ed6e055b2a44f1fce1b6746179203c7204389626a7b458dcab1b28930d8
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}/orocos_kdl
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "share/orocos_kdl/cmake" TARGET_PATH share/orocos_kdl)
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/debug/share
+ ${CURRENT_PACKAGES_DIR}/share/doc
+ ${CURRENT_PACKAGES_DIR}/doc/liborocos-kdl)
+
+
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/orocos_kdl/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/orocos-kdl RENAME copyright)
+
+# Post-build test for cmake libraries
+# vcpkg_test_cmake(PACKAGE_NAME orocos-kdl)
diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL index 2cca0cdaa..e78458d25 100644 --- a/ports/osg/CONTROL +++ b/ports/osg/CONTROL @@ -1,5 +1,5 @@ Source: osg -Version: 3.6.2 +Version: 3.6.2-1 Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake index e72b5807b..98a0ec293 100644 --- a/ports/osg/portfile.cmake +++ b/ports/osg/portfile.cmake @@ -11,10 +11,6 @@ # include(vcpkg_common_functions) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building will not support load data through plugins.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -24,15 +20,24 @@ vcpkg_from_github( HEAD_REF master PATCHES "${CMAKE_CURRENT_LIST_DIR}/collada.patch" + "${CMAKE_CURRENT_LIST_DIR}/static.patch" ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(OSG_DYNAMIC OFF) +else() + set(OSG_DYNAMIC ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} # PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DOSG_USE_UTF8_FILENAME=ON - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + -DDYNAMIC_OPENSCENEGRAPH=${OSG_DYNAMIC} + -DDYNAMIC_OPENTHREADS=${OSG_DYNAMIC} + -DBUILD_OSG_EXAMPLES=ON + -DBUILD_OSG_APPLICATIONS=ON ) vcpkg_install_cmake() @@ -59,3 +64,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.6.2/) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osg) file(RENAME ${CURRENT_PACKAGES_DIR}/share/osg/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osg/copyright) + +#Cleanup +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif()
\ No newline at end of file diff --git a/ports/osg/static.patch b/ports/osg/static.patch new file mode 100644 index 000000000..c7278d282 --- /dev/null +++ b/ports/osg/static.patch @@ -0,0 +1,7 @@ +--- a/src/osgPlugins/curl/CMakeLists.txt
++++ b/src/osgPlugins/curl/CMakeLists.txt
+@@ -35,3 +35,3 @@
+ ADD_DEFINITIONS(-DCURL_STATICLIB)
+- SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm wldap32)
++ SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm wldap32 crypt32)
+ ENDIF()
diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index f7f242293..1cbf2ad98 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,4 +1,4 @@ Source: pangolin -Version: 0.5-4 +Version: 0.5-5 Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg Description: Lightweight GUI Library diff --git a/ports/pangolin/fix-includepath-error.patch b/ports/pangolin/fix-includepath-error.patch new file mode 100644 index 000000000..debb3348a --- /dev/null +++ b/ports/pangolin/fix-includepath-error.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index dd08d31..7f364a7 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -506,7 +506,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY IMMEDIATE )
+
+ # Install tree config
+-set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/${REL_INCLUDE_DIR}" )
++set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/../../include" )
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake @ONLY )
+
diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index b25378c56..cd6a4fe78 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -6,7 +6,9 @@ vcpkg_from_github( REF v0.5 SHA512 7ebeec108f33f1aa8b1ad08e3ca128a837b22d33e3fc580021f981784043b023a1bf563bbfa8b51d46863db770b336d24fc84ee3d836b85e0da1848281b2a5b2 HEAD_REF master - PATCHES deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library + PATCHES + deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library + fix-includepath-error.patch # include path has one more ../ ) file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake) @@ -55,4 +57,5 @@ file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/include/pangolin/p # Put the license file where vcpkg expects it file(COPY ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/) +file(COPY ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/) file(RENAME ${CURRENT_PACKAGES_DIR}/share/Pangolin/LICENCE ${CURRENT_PACKAGES_DIR}/share/Pangolin/copyright) diff --git a/ports/pangolin/usage b/ports/pangolin/usage new file mode 100644 index 000000000..93db9b75b --- /dev/null +++ b/ports/pangolin/usage @@ -0,0 +1,5 @@ +The package pangolin is compatible with built-in CMake targets:
+
+ find_package(Pangolin CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE pangolin)
+ target_include_directories(main PRIVATE ${Pangolin_INCLUDE_DIRS})
diff --git a/ports/parallel-hashmap/CONTROL b/ports/parallel-hashmap/CONTROL new file mode 100644 index 000000000..8935060a4 --- /dev/null +++ b/ports/parallel-hashmap/CONTROL @@ -0,0 +1,3 @@ +Source: parallel-hashmap +Version: 1.1.0 +Description: A header-only, very fast and memory-friendly hash map family. diff --git a/ports/parallel-hashmap/portfile.cmake b/ports/parallel-hashmap/portfile.cmake new file mode 100644 index 000000000..9c2c02289 --- /dev/null +++ b/ports/parallel-hashmap/portfile.cmake @@ -0,0 +1,24 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO greg7mdp/parallel-hashmap + REF 1.1.0 + SHA512 ff9497d2a8009c9aa955f50e66269e5963a86d8593e3eb07ef968a8ea5e162fea7e145d6d4d9e7aa91380b49f22166d1a08445fa40d02f43327e4c39612f52d9 + HEAD_REF master +) + +# Use greg7mdp/parallel-hashmap's own build process, skipping examples and tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +# Delete redundant directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/parallel-hashmap) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/parallel-hashmap/LICENSE ${CURRENT_PACKAGES_DIR}/share/parallel-hashmap/copyright) diff --git a/ports/pbc/CONTROL b/ports/pbc/CONTROL index a8ee10486..ba09843de 100644 --- a/ports/pbc/CONTROL +++ b/ports/pbc/CONTROL @@ -1,4 +1,4 @@ Source: pbc -Version: 0.5.14 +Version: 0.5.14-1 Build-Depends: mpir Description: Pairing-Based Crypto library provides low-level routines for pairing-based cryptosystems. diff --git a/ports/pbc/windows.patch b/ports/pbc/windows.patch index 5b790767a..ea4942cde 100644 --- a/ports/pbc/windows.patch +++ b/ports/pbc/windows.patch @@ -1,3 +1,25 @@ +diff --git "a/include/pbc_curve.h" "b/include/pbc_curve.h" +--- "a/include/pbc_curve.h" ++++ "b/include/pbc_curve.h" +@@ -60,7 +60,9 @@ + + void field_curve_set_quotient_cmp(field_ptr c, mpz_t quotient_cmp); + ++#ifdef __GNUC__ + #pragma GCC visibility push(hidden) ++#endif + // Internal: + + element_ptr curve_x_coord(element_t e); +@@ -74,6 +76,8 @@ + void curve_set_si(element_t R, long int x, long int y); + void curve_set_gen_no_cofac(element_ptr a); + ++#ifdef __GNUC__ + #pragma GCC visibility pop ++#endif + + #endif //__PBC_CURVE_H__ diff --git "a/include/pbc_vc_compat.win32.h" "b/include/pbc_vc_compat.win32.h" index 27d3bba..7f772d4 100644 --- "a/include/pbc_vc_compat.win32.h" diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL index b230a2909..46e041be2 100644 --- a/ports/pcre/CONTROL +++ b/ports/pcre/CONTROL @@ -1,3 +1,3 @@ Source: pcre -Version: 8.41-1 +Version: 8.41-2 Description: Perl Compatible Regular Expresions diff --git a/ports/pcre/fix-arm64-config-define.patch b/ports/pcre/fix-arm64-config-define.patch new file mode 100644 index 000000000..d92ced46b --- /dev/null +++ b/ports/pcre/fix-arm64-config-define.patch @@ -0,0 +1,21 @@ +diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h
+index 2bda29e..56ba7a6 100644
+--- a/sljit/sljitConfigInternal.h
++++ b/sljit/sljitConfigInternal.h
+@@ -151,6 +151,8 @@
+ #define SLJIT_CONFIG_X86_64 1
+ #elif defined(_M_ARM)
+ #define SLJIT_CONFIG_ARM_V5 1
++#elif defined(_M_ARM64)
++#define SLJIT_CONFIG_ARM_64 1
+ #else
+ #define SLJIT_CONFIG_X86_32 1
+ #endif
+@@ -330,7 +332,6 @@
+ __clear_cache((char*)(from), (char*)(to))
+ #elif(_WIN32)
+ #pragma comment(lib, "kernel32.lib")
+-uint32_t FlushInstructionCache(void *hProcess, void *lpBaseAddress, uintptr_t dwSize);
+ #define SLJIT_CACHE_FLUSH(from, to) \
+ FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from));
+ #endif
diff --git a/ports/pcre/portfile.cmake b/ports/pcre/portfile.cmake index 5e9009ace..ac99a478b 100644 --- a/ports/pcre/portfile.cmake +++ b/ports/pcre/portfile.cmake @@ -19,7 +19,8 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option-2.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch) + ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-arm64-config-define.patch) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL index 79982525a..37f3a6da3 100644 --- a/ports/pcre2/CONTROL +++ b/ports/pcre2/CONTROL @@ -1,3 +1,3 @@ Source: pcre2 -Version: 10.30-2 +Version: 10.30-3 Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake index 34e4cf726..e2f5a702a 100644 --- a/ports/pcre2/portfile.cmake +++ b/ports/pcre2/portfile.cmake @@ -1,12 +1,16 @@ set(PCRE2_VERSION 10.30) include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre2-${PCRE2_VERSION}) + vcpkg_download_distfile(ARCHIVE URLS "https://ftp.pcre.org/pub/pcre/pcre2-${PCRE2_VERSION}.zip" "https://sourceforge.net/projects/pcre/files/pcre2/${PCRE2_VERSION}/pcre2-${PCRE2_VERSION}.zip/download" FILENAME "pcre2-${PCRE2_VERSION}.zip" SHA512 03e570b946ac29498a114b27e715a0fcf25702bfc9623f9fc085ee8a3214ab3c303baccb9c0af55da6916e8ce40d931d97f1ee9628690563041a943f0aa2bc54) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES fix-space.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -20,9 +24,6 @@ vcpkg_configure_cmake( -DPCRE2_BUILD_TESTS=OFF -DPCRE2_BUILD_PCRE2GREP=OFF) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-space.patch) - vcpkg_install_cmake() file(READ ${CURRENT_PACKAGES_DIR}/include/pcre2.h PCRE2_H) diff --git a/ports/pdal/no-source-dir-writes.patch b/ports/pdal/0002-no-source-dir-writes.patch index f7ec12f6b..f7ec12f6b 100644 --- a/ports/pdal/no-source-dir-writes.patch +++ b/ports/pdal/0002-no-source-dir-writes.patch diff --git a/ports/pdal/0003-fix-copy-vendor.patch b/ports/pdal/0003-fix-copy-vendor.patch new file mode 100644 index 000000000..a29ad9018 --- /dev/null +++ b/ports/pdal/0003-fix-copy-vendor.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 43e446a..c4c7d6f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -339,6 +339,30 @@ install(DIRECTORY ${PDAL_FILTERS_DIR}
+ install(FILES ${DIMENSION_OUTFILE} ${pdal_features_hpp}
+ DESTINATION include/pdal
+ )
++# Install vendor headers
++install(DIRECTORY ${PDAL_VENDOR_ARBITER_DIR}
++ DESTINATION include/pdal/vendor
++ FILES_MATCHING PATTERN "*.hpp"
++ PATTERN "private" EXCLUDE
++)
++
++install(DIRECTORY ${PDAL_VENDOR_JSONCPP_DIR}
++ DESTINATION include/pdal/vendor
++ FILES_MATCHING PATTERN "*.h"
++ PATTERN "private" EXCLUDE
++)
++
++install(DIRECTORY ${PDAL_VENDOR_KAZHDAN_DIR}
++ DESTINATION include/pdal/vendor
++ FILES_MATCHING PATTERN "*.h"
++ PATTERN "private" EXCLUDE
++)
++
++install(DIRECTORY ${PDAL_VENDOR_NANOFLANN_DIR}
++ DESTINATION include/pdal/vendor
++ FILES_MATCHING PATTERN "*.hpp"
++ PATTERN "private" EXCLUDE
++)
+
+ #
+ # CPACK
+diff --git a/cmake/directories.cmake b/cmake/directories.cmake
+index f079ec7..8e366e8 100644
+--- a/cmake/directories.cmake
++++ b/cmake/directories.cmake
+@@ -11,4 +11,7 @@ set(PDAL_KERNELS_DIR ${ROOT_DIR}/kernels)
+ set(PDAL_FILTERS_DIR ${ROOT_DIR}/filters)
+ set(PDAL_IO_DIR ${ROOT_DIR}/io)
+ set(PDAL_VENDOR_DIR ${ROOT_DIR}/vendor)
+-
++set(PDAL_VENDOR_ARBITER_DIR ${PDAL_VENDOR_DIR}/arbiter)
++set(PDAL_VENDOR_JSONCPP_DIR ${PDAL_VENDOR_DIR}/jsoncpp)
++set(PDAL_VENDOR_KAZHDAN_DIR ${PDAL_VENDOR_DIR}/kazhdan)
++set(PDAL_VENDOR_NANOFLANN_DIR ${PDAL_VENDOR_DIR}/nanoflann)
+
+\ No newline at end of file
diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL index ebb658c90..743f77c8e 100644 --- a/ports/pdal/CONTROL +++ b/ports/pdal/CONTROL @@ -1,4 +1,4 @@ Source: pdal
-Version: 1.7.1-3
+Version: 1.7.1-4
Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data.
Build-Depends: gdal, geos, jsoncpp, libgeotiff, laszip
diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index cbcb97ced..6ab78024f 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -2,7 +2,6 @@ # # NOTE: update the version string for new PDAL release set(PDAL_VERSION_STR "1.7.1") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/PDAL-${PDAL_VERSION_STR}-src) include(vcpkg_common_functions) @@ -11,13 +10,14 @@ vcpkg_download_distfile(ARCHIVE FILENAME "PDAL-${PDAL_VERSION_STR}-src.tar.gz" SHA512 e3e63bb05930c1a28c4f46c7edfaa8e9ea20484f1888d845b660a29a76f1dd1daea3db30a98607be0c2eeb86930ec8bfd0965d5d7d84b07a4fe4cb4512da9b09 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-win32_compiler_options.cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/no-source-dir-writes.patch + 0001-win32_compiler_options.cmake.patch + 0002-no-source-dir-writes.patch + 0003-fix-copy-vendor.patch ) file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL index 5d5d69755..3900d77a8 100644 --- a/ports/physfs/CONTROL +++ b/ports/physfs/CONTROL @@ -1,4 +1,4 @@ Source: physfs -Version: 3.0.1-1 +Version: 3.0.2 Description: a library to provide abstract access to various archives Build-Depends: zlib diff --git a/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch b/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch deleted file mode 100644 index 4338e52e5..000000000 --- a/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch +++ /dev/null @@ -1,25 +0,0 @@ - -diff -r a29fef4a20fd -r ece6769c0676 src/physfs_platform_windows.c ---- a/src/physfs_platform_windows.c Wed May 16 19:54:51 2018 -0400 -+++ b/src/physfs_platform_windows.c Wed Oct 03 22:40:57 2018 -0400 -@@ -566,7 +566,6 @@ - else - { - DWORD psize = 0; -- WCHAR dummy = 0; - LPWSTR wstr = NULL; - BOOL rc = 0; - -@@ -575,7 +574,7 @@ - * psize. Also note that the second parameter can't be - * NULL or the function fails. - */ -- rc = pGetDir(accessToken, &dummy, &psize); -+ rc = pGetDir(accessToken, NULL, &psize); - GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */ - - /* Allocate memory for the profile directory */ - - - - diff --git a/ports/physfs/portfile.cmake b/ports/physfs/portfile.cmake index feee3b456..92f1cd4ee 100644 --- a/ports/physfs/portfile.cmake +++ b/ports/physfs/portfile.cmake @@ -1,17 +1,15 @@ include(vcpkg_common_functions) -set(PHYSFS_VERSION 3.0.1) +set(PHYSFS_VERSION 3.0.2) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/physfs-${PHYSFS_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://icculus.org/physfs/downloads/physfs-${PHYSFS_VERSION}.tar.bz2" FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2" - SHA512 ddf3b075ccb506da5e9a1ce96001be402752b9b777c2e816a85d48aff3626ff0886ea43eb07bd300fe3a9f59b9a002f54d822c51d483a4ee94b38378534c1879 + SHA512 4024b6c3348e0b6fc1036aac330192112dfe17de3e3d14773be9f06e9a062df5a1006869f21162b4e0b584989f463788a35e64186b1913225c073fea62754472 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${PHYSFS_VERSION} - PATCHES - physfs.3.0.1.GetUserProfileDirectory.patch # Fixes GetUserProfileDirectory issue on Win10 build 1809(+?); See: https://hg.icculus.org/icculus/physfs/rev/ece6769c0676 ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC) diff --git a/ports/physx/CONTROL b/ports/physx/CONTROL new file mode 100644 index 000000000..284216488 --- /dev/null +++ b/ports/physx/CONTROL @@ -0,0 +1,3 @@ +Source: physx
+Version: commit-624f2cb6c0392013d54b235d9072a49d01c3cb6c
+Description: The NVIDIA PhysX SDK is a scalable multi-platform physics solution supporting a wide range of devices, from smartphones to high-end multicore CPUs and GPUs
diff --git a/ports/physx/portfile.cmake b/ports/physx/portfile.cmake new file mode 100644 index 000000000..2e0dfa963 --- /dev/null +++ b/ports/physx/portfile.cmake @@ -0,0 +1,100 @@ +include(vcpkg_common_functions)
+
+if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(FATAL_ERROR "Error: UWP builds not supported.")
+endif()
+
+if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(WINDOWS_PLATFORM "32")
+ set(MSBUILD_PLATFORM "Win32")
+elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(WINDOWS_PLATFORM "64")
+ set(MSBUILD_PLATFORM "x64")
+else()
+ message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
+endif()
+
+if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140")
+ set(MSVC_VERSION "14")
+ set(TOOLSET_VERSION "140")
+elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141")
+ set(MSVC_VERSION "15")
+ set(TOOLSET_VERSION "141")
+else()
+ message(FATAL_ERROR "Unsupported platform toolset.")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO NVIDIAGameWorks/PhysX
+ REF 624f2cb6c0392013d54b235d9072a49d01c3cb6c
+ SHA512 80b465f6214434fd53954fe124d8f8aa1ddfcb60d80261f1dc06713bf7fb0f42d8cd96a393fbc46547d9c2199039f386220d7eea63c849ad98863ff26b731e0c
+ HEAD_REF master
+)
+
+set(BUILD_SNIPPETS "False")
+set(BUILD_PUBLIC_SAMPLES "False")
+set(FLOAT_POINT_PRECISE_MATH "False")
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ set(GENERATE_STATIC_LIBRARIES "True")
+elseif (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ set(GENERATE_STATIC_LIBRARIES "False")
+endif()
+
+if (VCPKG_CRT_LINKAGE STREQUAL "dynamic")
+ set(USE_STATIC_WINCRT "False")
+ set(RUNTIME_LIBRARY_LINKAGE "md")
+elseif (VCPKG_CRT_LINKAGE STREQUAL "static")
+ set(USE_STATIC_WINCRT "True")
+ set(RUNTIME_LIBRARY_LINKAGE "mt")
+endif()
+
+set(PRESET_FILE vc${MSVC_VERSION}win${WINDOWS_PLATFORM}-${RUNTIME_LIBRARY_LINKAGE}-${VCPKG_LIBRARY_LINKAGE})
+file(REMOVE ${SOURCE_PATH}/physx/buildtools/presets/public/${PRESET_FILE}.xml)
+configure_file(${CMAKE_CURRENT_LIST_DIR}/preset.xml.in ${SOURCE_PATH}/physx/buildtools/presets/public/${PRESET_FILE}.xml)
+
+vcpkg_find_acquire_program(PYTHON3)
+get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY)
+vcpkg_add_to_path(${PYTHON3_DIR})
+
+get_filename_component(CMAKE_DIR ${CMAKE_COMMAND} DIRECTORY)
+# If cmake is not installed then adding it to the end of the path
+# will allow generate_projects.bat to find the cmake used by vcpkg.
+vcpkg_add_to_path(${CMAKE_DIR})
+
+vcpkg_execute_required_process(
+ COMMAND ${SOURCE_PATH}/physx/generate_projects.bat ${PRESET_FILE}
+ WORKING_DIRECTORY ${SOURCE_PATH}/physx
+ LOGNAME build-${TARGET_TRIPLET}
+)
+
+set(RELEASE_CONFIGURATION "release")
+set(DEBUG_CONFIGURATION "debug")
+
+vcpkg_build_msbuild(
+ PROJECT_PATH ${SOURCE_PATH}/physx/compiler/vc15win${WINDOWS_PLATFORM}/PhysXSDK.sln
+ RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION}
+ DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION}
+ PLATFORM ${MSBUILD_PLATFORM}
+)
+
+file(INSTALL ${SOURCE_PATH}/physx/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/physx/)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(GLOB RELEASE_BINS ${SOURCE_PATH}/physx/bin/win.x86_${WINDOWS_PLATFORM}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}/${RELEASE_CONFIGURATION}/*.dll)
+ file(INSTALL ${RELEASE_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+
+ file(GLOB DEBUG_BINS ${SOURCE_PATH}/physx/bin/win.x86_${WINDOWS_PLATFORM}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}/${DEBUG_CONFIGURATION}/*.dll)
+ file(INSTALL ${DEBUG_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+file(GLOB RELEASE_LIBS ${SOURCE_PATH}/physx/bin/win.x86_${WINDOWS_PLATFORM}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}/${RELEASE_CONFIGURATION}/*.lib)
+file(INSTALL ${RELEASE_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+
+file(GLOB DEBUG_LIBS ${SOURCE_PATH}/physx/bin/win.x86_${WINDOWS_PLATFORM}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}/${DEBUG_CONFIGURATION}/*.lib)
+file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/physx RENAME copyright)
diff --git a/ports/physx/preset.xml.in b/ports/physx/preset.xml.in new file mode 100644 index 000000000..03bc964f8 --- /dev/null +++ b/ports/physx/preset.xml.in @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<preset name="vc${MSVC_VERSION}win${WINDOWS_PLATFORM}" comment="VC${MSVC_VERSION} Win${WINDOWS_PLATFORM} PhysX general settings"> + <platform targetPlatform="win${WINDOWS_PLATFORM}" compiler="vc${MSVC_VERSION}" /> + <CMakeSwitches> + <cmakeSwitch name="PX_BUILDSNIPPETS" value="${BUILD_SNIPPETS}" comment="Generate the snippets" /> + <cmakeSwitch name="PX_BUILDPUBLICSAMPLES" value="${BUILD_PUBLIC_SAMPLES}" comment="Generate the samples projects" /> + <cmakeSwitch name="PX_GENERATE_STATIC_LIBRARIES" value="${GENERATE_STATIC_LIBRARIES}" comment="Generate static libraries" /> + <cmakeSwitch name="NV_USE_STATIC_WINCRT" value="${USE_STATIC_WINCRT}" comment="Use the statically linked windows CRT" /> + <cmakeSwitch name="NV_USE_DEBUG_WINCRT" value="True" comment="Use the debug version of the CRT" /> + <cmakeSwitch name="PX_FLOAT_POINT_PRECISE_MATH" value="${FLOAT_POINT_PRECISE_MATH}" comment="Float point precise math" /> + </CMakeSwitches> + <CMakeParams> + <cmakeParam name="CMAKE_INSTALL_PREFIX" value="install/vc${MSVC_VERSION}win${WINDOWS_PLATFORM}/PhysX" comment="Install path relative to PhysX SDK root" /> + </CMakeParams> +</preset>
\ No newline at end of file diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt index c75574865..55adf8b9c 100644 --- a/ports/pixman/CMakeLists.txt +++ b/ports/pixman/CMakeLists.txt @@ -56,6 +56,10 @@ target_compile_definitions(pixman-1 USE_SSE2 ) +if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 4) + target_compile_options(pixman-1 PRIVATE -msse2) +endif() + # pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files if(MSVC) target_compile_options(pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL index 64d8abde0..7ea0dc3d7 100644 --- a/ports/pixman/CONTROL +++ b/ports/pixman/CONTROL @@ -1,3 +1,3 @@ Source: pixman -Version: 0.34.0-5 +Version: 0.38.0-1 Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake index 83daa9a51..e81972fd7 100644 --- a/ports/pixman/portfile.cmake +++ b/ports/pixman/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(PIXMAN_VERSION 0.34.0) +set(PIXMAN_VERSION 0.38.0) vcpkg_download_distfile(ARCHIVE URLS "https://www.cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz" FILENAME "pixman-${PIXMAN_VERSION}.tar.gz" - SHA512 81caca5b71582b53aaac473bc37145bd66ba9acebb4773fa8cdb51f4ed7fbcb6954790d8633aad85b2826dd276bcce725e26e37997a517760e9edd72e2669a6d + SHA512 1b0205dbe9d9185c68813ce577a889f3c83e83fbd9955c3a72d411c3b476e6be93fc246b5b6ef4ee17e2bb8eb6fb5559e01dff7feb6a6c4c6314f980e960d690 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH 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/podofo/002-HAVE_UNISTD_H.patch b/ports/podofo/002-HAVE_UNISTD_H.patch new file mode 100644 index 000000000..6aed4b279 --- /dev/null +++ b/ports/podofo/002-HAVE_UNISTD_H.patch @@ -0,0 +1,15 @@ +diff --git a/podofo_config.h.in b/podofo_config.h.in
+index fea9ada..a813c7b 100644
+--- a/podofo_config.h.in
++++ b/podofo_config.h.in
+@@ -59,3 +59,10 @@
+ #cmakedefine PODOFO_HAVE_OPENSSL_NO_RC4
+ #cmakedefine PODOFO_HAVE_LIBIDN
+ #cmakedefine PODOFO_HAVE_UNISTRING_LIB
++
++/* Fix build for MacOS 10.13 */
++#if defined(__APPLE__) && !defined(__IOS__)
++#cmakedefine01 HAVE_UNISTD_H
++#else
++#cmakedefine HAVE_UNISTD_H
++#endif
diff --git a/ports/podofo/CONTROL b/ports/podofo/CONTROL index 9b6abdb17..233a7011c 100644 --- a/ports/podofo/CONTROL +++ b/ports/podofo/CONTROL @@ -1,5 +1,5 @@ Source: podofo -Version: 0.9.6-3 +Version: 0.9.6-5 Description: PoDoFo is a library to work with the PDF file format Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl (!windows&!uwp), freetype diff --git a/ports/podofo/portfile.cmake b/ports/podofo/portfile.cmake index a0b27a7a7..5fa631b18 100644 --- a/ports/podofo/portfile.cmake +++ b/ports/podofo/portfile.cmake @@ -10,7 +10,9 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${PODOFO_VERSION} - PATCHES unique_ptr.patch + PATCHES + "unique_ptr.patch" + "002-HAVE_UNISTD_H.patch" ) set(PODOFO_NO_FONTMANAGER ON) diff --git a/ports/portaudio/CONTROL b/ports/portaudio/CONTROL index ceeec644c..d72ff808c 100644 --- a/ports/portaudio/CONTROL +++ b/ports/portaudio/CONTROL @@ -1,3 +1,3 @@ Source: portaudio
-Version: 19.0.6.00-4
+Version: 19.0.6.00-5
Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.
diff --git a/ports/portaudio/portfile.cmake b/ports/portaudio/portfile.cmake index 503b08048..9bb86005d 100644 --- a/ports/portaudio/portfile.cmake +++ b/ports/portaudio/portfile.cmake @@ -33,22 +33,22 @@ vcpkg_install_cmake() # Remove static builds from dynamic builds and otherwise
# Remove x86 and x64 from resulting files
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- file (REMOVE ${CURRENT_PACKAGES_DIR}/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib)
- file (REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib)
-
- file (RENAME ${CURRENT_PACKAGES_DIR}/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/lib/portaudio.lib)
- file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio.lib)
-else ()
- file (RENAME ${CURRENT_PACKAGES_DIR}/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/lib/portaudio.lib)
- file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio.lib)
-
- file (REMOVE ${CURRENT_PACKAGES_DIR}/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib)
- file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
- file (REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib)
- file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+if (WIN32)
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file (REMOVE ${CURRENT_PACKAGES_DIR}/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib)
+ file (REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib)
+
+ file (RENAME ${CURRENT_PACKAGES_DIR}/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/lib/portaudio.lib)
+ file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio.lib)
+ else ()
+ file (RENAME ${CURRENT_PACKAGES_DIR}/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/lib/portaudio.lib)
+ file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio.lib)
+ file (REMOVE ${CURRENT_PACKAGES_DIR}/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib)
+ file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file (REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_${VCPKG_TARGET_ARCHITECTURE}.lib)
+ file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+ endif ()
endif ()
-
vcpkg_copy_pdbs()
# Handle copyright
diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 88bc7d3ee..6cd33935c 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.6.1.3-1 +Version: 3.7.1 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/disable-lite.patch b/ports/protobuf/disable-lite.patch index ceb34671c..3a372e68f 100644 --- a/ports/protobuf/disable-lite.patch +++ b/ports/protobuf/disable-lite.patch @@ -1,11 +1,11 @@ diff --git a/cmake/install.cmake b/cmake/install.cmake
-index 82036cb..378db2d 100644
+index 9b2ae93c..7c9670a3 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
-@@ -15,10 +15,12 @@ foreach(_library ${_protobuf_libraries})
- PROPERTY INTERFACE_INCLUDE_DIRECTORIES
- $<BUILD_INTERFACE:${protobuf_source_dir}/src>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+@@ -22,10 +22,12 @@ foreach(_library ${_protobuf_libraries})
+ set_property(TARGET ${_library}
+ PROPERTY INSTALL_RPATH "@loader_path")
+ endif()
+ if(NOT "${_library}" STREQUAL "libprotobuf-lite")
install(TARGETS ${_library} EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${_library}
@@ -15,8 +15,8 @@ index 82036cb..378db2d 100644 endforeach()
if (protobuf_BUILD_PROTOC_BINARIES)
-@@ -26,7 +28,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+@@ -40,7 +42,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
+ endif()
endif (protobuf_BUILD_PROTOC_BINARIES)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
@@ -24,7 +24,7 @@ index 82036cb..378db2d 100644 file(STRINGS extract_includes.bat.in _extract_strings
REGEX "^copy")
-@@ -107,12 +109,12 @@ configure_file(protobuf-options.cmake
+@@ -121,12 +123,12 @@ configure_file(protobuf-options.cmake
# Allows the build directory to be used as a find directory.
if (protobuf_BUILD_PROTOC_BINARIES)
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 32e8ccd91..9e0bc15d7 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -3,13 +3,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/protobuf - REF v3.6.1.3 - SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e + REF v3.7.1 + SHA512 7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f HEAD_REF master PATCHES fix-uwp.patch disable-lite.patch - version-rc-msvc.patch ) if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86") diff --git a/ports/protobuf/version-rc-msvc.patch b/ports/protobuf/version-rc-msvc.patch deleted file mode 100644 index b24a862d9..000000000 --- a/ports/protobuf/version-rc-msvc.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/cmake/protoc.cmake b/cmake/protoc.cmake
-index 9bf6f5a..b58a12a 100644
---- a/cmake/protoc.cmake
-+++ b/cmake/protoc.cmake
-@@ -2,9 +2,11 @@ set(protoc_files
- ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc
- )
-
-+if(MSVC)
- set(protoc_rc_files
- ${CMAKE_CURRENT_BINARY_DIR}/version.rc
- )
-+endif()
-
- add_executable(protoc ${protoc_files} ${protoc_rc_files})
- target_link_libraries(protoc libprotobuf libprotoc)
diff --git a/ports/pthreads/CMakeLists.txt b/ports/pthreads/CMakeLists.txt index 70317b460..32f25e716 100644 --- a/ports/pthreads/CMakeLists.txt +++ b/ports/pthreads/CMakeLists.txt @@ -195,19 +195,22 @@ set(PTHREADS_COMPATIBILITY_VERSION 2) set(CMAKE_DEBUG_POSTFIX d) set(PTHREADS_COMPILER V) -set(PTHREADS_LIBRARY "pthreads${PTHREADS_COMPILER}${PTHREADS_EXCEPTION_SCHEME}${PTHREADS_COMPATIBILITY_VERSION}") +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 53b710f2a..d22280d90 100644 --- a/ports/pthreads/CONTROL +++ b/ports/pthreads/CONTROL @@ -1,3 +1,3 @@ Source: pthreads -Version: 2.9.1-3 +Version: 2.9.1-5 Description: pthreads for windows diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 3fb715aec..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") @@ -41,12 +43,12 @@ endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) file(INSTALL - ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib + ${CURRENT_PACKAGES_DIR}/lib/pthreadVC2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link - RENAME pthreads.lib + RENAME pthread.lib ) file(INSTALL - ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadsVC2d.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVC2d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link - RENAME pthreads.lib + RENAME pthread.lib ) diff --git a/ports/python3/0001-Static-library.patch b/ports/python3/0001-Static-library.patch deleted file mode 100644 index b5666ba40..000000000 --- a/ports/python3/0001-Static-library.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/PCbuild/pythoncore.vcxproj -+++ b/PCbuild/pythoncore.vcxproj -@@ -41,7 +41,7 @@ - <Import Project="python.props" /> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Label="Configuration"> -- <ConfigurationType>DynamicLibrary</ConfigurationType> -+ <ConfigurationType>StaticLibrary</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> -@@ -67,13 +67,25 @@ - <ClCompile> - <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions> - <AdditionalIncludeDirectories>$(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> -- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions> -+ <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <Link> - <AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(PySourcePath)PC\external\$(PlatformToolset)\$(ArchName)</AdditionalLibraryDirectories> - <BaseAddress>0x1e000000</BaseAddress> - </Link> -+ <Lib> -+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MachineX86</TargetMachine> -+ </Lib> -+ <Lib> -+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">MachineX86</TargetMachine> -+ </Lib> -+ <Lib> -+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">MachineX86</TargetMachine> -+ </Lib> -+ <Lib> -+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MachineX86</TargetMachine> -+ </Lib> - </ItemDefinitionGroup> - <ItemGroup> - <ClInclude Include="..\Include\abstract.h" /> --- diff --git a/ports/python3/0002-Static-CRT.patch b/ports/python3/0002-Static-CRT.patch deleted file mode 100644 index 8f63aa092..000000000 --- a/ports/python3/0002-Static-CRT.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/PCbuild/pythoncore.vcxproj -+++ b/PCbuild/pythoncore.vcxproj -@@ -68,6 +68,10 @@ - <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions> - <AdditionalIncludeDirectories>$(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions> -+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreadedDebug</RuntimeLibrary> -+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MultiThreadedDebug</RuntimeLibrary> -+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreaded</RuntimeLibrary> -+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary> - </ClCompile> - <Link> - <AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> --- - diff --git a/ports/python3/0003-Fix-header-for-static-linkage.patch b/ports/python3/0003-Fix-header-for-static-linkage.patch deleted file mode 100644 index 99e56d29c..000000000 --- a/ports/python3/0003-Fix-header-for-static-linkage.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/PC/pyconfig.h b/PC/pyconfig.h -index 64e7aec..aa36745 100644 ---- a/PC/pyconfig.h -+++ b/PC/pyconfig.h -@@ -274,6 +274,7 @@ typedef int pid_t; - - /* For Windows the Python core is in a DLL by default. Test - Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ -+#define Py_NO_ENABLE_SHARED - #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) - # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ - # define MS_COREDLL /* deprecated old symbol */ --- - diff --git a/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch b/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch deleted file mode 100644 index a0efc8d1c..000000000 --- a/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
---- a/Modules/_io/_iomodule.c
-+++ b/Modules/_io/_iomodule.c
-@@ -21,7 +21,7 @@
- #endif /* HAVE_SYS_STAT_H */
-
- #ifdef MS_WINDOWS
--#include <consoleapi.h>
-+#include <windows.h>
- #endif
-
- /* Various interned strings */
diff --git a/ports/python3/0005-Fix-DefaultWindowsSDKVersion.patch b/ports/python3/0005-Fix-DefaultWindowsSDKVersion.patch deleted file mode 100644 index 13f7b39e0..000000000 --- a/ports/python3/0005-Fix-DefaultWindowsSDKVersion.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/PCbuild/python.props b/PCbuild/python.props
---- a/PCbuild/python.props
-+++ b/PCbuild/python.props
-@@ -76,7 +76,7 @@
- -->
- <_RegistryVersion>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</_RegistryVersion>
- <_RegistryVersion Condition="$(_RegistryVersion) == ''">$(Registry:HKEY_LOCAL_MACHINE\WOW6432Node\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</_RegistryVersion>
-- <DefaultWindowsSDKVersion>10.0.15063.0</DefaultWindowsSDKVersion>
-+ <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) == '10.0.15063'">10.0.15063.0</DefaultWindowsSDKVersion>
- <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) == '10.0.14393'">10.0.14393.0</DefaultWindowsSDKVersion>
- <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) == '10.0.10586'">10.0.10586.0</DefaultWindowsSDKVersion>
- <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) == '10.0.10240'">10.0.10240.0</DefaultWindowsSDKVersion>
diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL index f37197e83..db8f63766 100644 --- a/ports/python3/CONTROL +++ b/ports/python3/CONTROL @@ -1,3 +1,3 @@ Source: python3 -Version: 3.6.4-5 +Version: 3.7.3 Description: The Python programming language as an embeddable library
\ No newline at end of file diff --git a/ports/python3/Microsoft.VisualStudio.Setup.Configuration.Native.patch b/ports/python3/Microsoft.VisualStudio.Setup.Configuration.Native.patch deleted file mode 100644 index 50b728340..000000000 --- a/ports/python3/Microsoft.VisualStudio.Setup.Configuration.Native.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
-index 0f01852..6e63711 100644
---- a/PCbuild/pythoncore.vcxproj
-+++ b/PCbuild/pythoncore.vcxproj
-@@ -71,7 +71,7 @@
- </ClCompile>
- <Link>
- <AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(PySourcePath)PC\external\$(PlatformToolset)\$(ArchName)</AdditionalLibraryDirectories>
-+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(PySourcePath)PC\external\v140\$(ArchName)</AdditionalLibraryDirectories>
- <BaseAddress>0x1e000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
diff --git a/ports/python3/dev16.patch b/ports/python3/dev16.patch deleted file mode 100644 index 38a968729..000000000 --- a/ports/python3/dev16.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
-index 9a096bc..0647cf8 100644
---- a/PCbuild/pyproject.props
-+++ b/PCbuild/pyproject.props
-@@ -94,9 +94,9 @@
- Inputs="$(PySourcePath)Include\patchlevel.h"
- Outputs="$(IntDir)pythonnt_rc.h">
- <WriteLinesToFile File="$(IntDir)pythonnt_rc.h" Overwrite="true" Encoding="ascii"
-- Lines='/* This file created by pyproject.props /t:GeneratePythonNtRcH */
--#define FIELD3 $(Field3Value)
--#define MS_DLL_ID "$(SysWinVer)"
-+ Lines='/* This file created by pyproject.props /t:GeneratePythonNtRcH */;
-+#define FIELD3 $(Field3Value);
-+#define MS_DLL_ID "$(SysWinVer)";
- #define PYTHON_DLL_NAME "$(TargetName)$(TargetExt)"
- ' />
- <ItemGroup>
diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 308f0aa37..809b825f2 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -4,8 +4,8 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static endif() set(PYTHON_VERSION_MAJOR 3) -set(PYTHON_VERSION_MINOR 6) -set(PYTHON_VERSION_PATCH 4) +set(PYTHON_VERSION_MINOR 7) +set(PYTHON_VERSION_PATCH 3) set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) include(vcpkg_common_functions) @@ -14,13 +14,8 @@ vcpkg_from_github( OUT_SOURCE_PATH TEMP_SOURCE_PATH REPO python/cpython REF v${PYTHON_VERSION} - SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 + SHA512 023960a2f570fe7178d3901df0c3c33346466906b6d55c73ef7947c19619dbab62efc42c7262a0539bc5e31543b1113eb7a088d4615ad7557a0707bdaca27940 HEAD_REF master - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-iomodule-for-RS4-SDK.patch - ${CMAKE_CURRENT_LIST_DIR}/0005-Fix-DefaultWindowsSDKVersion.patch - dev16.patch - Microsoft.VisualStudio.Setup.Configuration.Native.patch ) # We need per-triplet directories because we need to patch the project files differently based on the linkage @@ -29,21 +24,6 @@ set(SOURCE_PATH "${TEMP_SOURCE_PATH}-Lib-${VCPKG_LIBRARY_LINKAGE}-crt-${VCPKG_CR file(REMOVE_RECURSE ${SOURCE_PATH}) file(RENAME "${TEMP_SOURCE_PATH}" ${SOURCE_PATH}) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Static-library.patch - ) -endif() -if (VCPKG_CRT_LINKAGE STREQUAL static) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0002-Static-CRT.patch - ) -endif() - if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") set(BUILD_ARCH "Win32") set(OUT_DIR "win32") @@ -58,14 +38,6 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj PLATFORM ${BUILD_ARCH}) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-header-for-static-linkage.patch - ) -endif() - file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index 72f20869f..4c09bf3b1 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,4 +1,4 @@ Source: qca -Version: 2.2.0-3 +Version: 2.2.0-4 Description: Qt Cryptographic Architecture (QCA). Sources: https://cgit.kde.org/qca.git/ Build-Depends: qt5-base diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index ff667cd6c..55acdc0b6 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -33,12 +33,12 @@ message(STATUS "Importing certstore") file(REMOVE ${SOURCE_PATH}/certs/rootcerts.pem) # Using file(DOWNLOAD) to use https file(DOWNLOAD https://raw.githubusercontent.com/mozilla/gecko-dev/master/security/nss/lib/ckfw/builtins/certdata.txt - ${CMAKE_CURRENT_LIST_DIR}/certdata.txt + ${CURRENT_BUILDTREES_DIR}/cert/certdata.txt TLS_VERIFY ON ) vcpkg_execute_required_process( COMMAND ${PERL} ${CMAKE_CURRENT_LIST_DIR}/mk-ca-bundle.pl -n ${SOURCE_PATH}/certs/rootcerts.pem - WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/cert LOGNAME ca-bundle ) message(STATUS "Importing certstore done") diff --git a/ports/qcustomplot/CONTROL b/ports/qcustomplot/CONTROL new file mode 100644 index 000000000..4b8223844 --- /dev/null +++ b/ports/qcustomplot/CONTROL @@ -0,0 +1,4 @@ +Source: qcustomplot
+Version: 2.0.1-1
+Description: QCustomPlot is a Qt C++ widget for plotting and data visualization.
+Build-Depends: qt5-base
diff --git a/ports/qcustomplot/portfile.cmake b/ports/qcustomplot/portfile.cmake new file mode 100644 index 000000000..1f3385eb2 --- /dev/null +++ b/ports/qcustomplot/portfile.cmake @@ -0,0 +1,70 @@ +include(vcpkg_common_functions)
+
+set(QCP_VERSION 2.0.1)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.qcustomplot.com/release/${QCP_VERSION}/QCustomPlot.tar.gz"
+ FILENAME "QCustomPlot-${QCP_VERSION}.tar.gz"
+ SHA512 a15598718146ed3c6b5d38530a56661c16269e530fe0dedb71b4cb2722b5733a3b57689d668a75994b79c19c6e61dcc133dbcb9ed77b93a165f4ac826a5685b9
+)
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ REF ${QCP_VERSION}
+)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.qcustomplot.com/release/${QCP_VERSION}/QCustomPlot-sharedlib.tar.gz"
+ FILENAME "QCustomPlot-sharedlib-${QCP_VERSION}.tar.gz"
+ SHA512 ce90540fca7226eac37746327e1939a9c7af38fc2595f385ed04d6d1f49560da08fb5fae15d1b9d22b6ba578583f70de8f89ef26796770d41bf599c1b15c535d
+)
+vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH})
+
+vcpkg_configure_qmake(SOURCE_PATH
+ ${SOURCE_PATH}/qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro
+)
+
+vcpkg_build_qmake(
+ RELEASE_TARGETS release-all
+ DEBUG_TARGETS debug-all
+)
+
+set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
+set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
+
+# Install header file
+file(INSTALL ${SOURCE_PATH}/qcustomplot.h
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
+)
+
+# Install module files
+macro(_install_module_file source_dir target_dir filename_regex)
+ file(GLOB _files ${source_dir}/*)
+ list(FILTER _files INCLUDE REGEX ${filename_regex})
+ file(INSTALL ${_files} DESTINATION ${target_dir})
+endmacro()
+
+_install_module_file(${DEBUG_DIR}/debug
+ ${CURRENT_PACKAGES_DIR}/debug/lib
+ "qcustomplotd[2]*\.(lib|a)$")
+
+_install_module_file(${RELEASE_DIR}/release
+ ${CURRENT_PACKAGES_DIR}/lib
+ "qcustomplot[2]*\.(lib|a)$")
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(INSTALL
+ ${DEBUG_DIR}/debug/qcustomplotd2.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+ )
+
+ file(INSTALL
+ ${RELEASE_DIR}/release/qcustomplot2.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+ )
+endif()
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/GPL.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL index 411b3ee7c..f14eb4344 100644 --- a/ports/qhull/CONTROL +++ b/ports/qhull/CONTROL @@ -1,3 +1,3 @@ Source: qhull -Version: 2015.2-3 +Version: 7.2.1-3 Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index c13287b0f..b7939dddb 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/portfile.cmake @@ -3,11 +3,24 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO qhull/qhull - REF 5a79a0009454c86e9848646b3c296009125231bf # Qhull 2015.2 - SHA512 ebcbf452eff420c62f92b734e5359b275493930b3e6798801eb1a81aa4fbf631b41e298a6071698c3b18c0939c55ddbc1b66b7019091bb4988dcfc7deb25e287 + REF v7.2.1 # Qhull 2015.2 + SHA512 8f5177ea45f82fa28f13e95105497e7e29086d7301e1cb8d3860fff09ebf8d0f01cfcb0f044c422f0ac0ba94b845bba223232e5eeb613bf671f65a569b8766d0 HEAD_REF master ) - +if(${TARGET_TRIPLET} STREQUAL "x64-windows-static") +# workaround for visual studio toolset regression LNK1201 (remove if solved) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include + -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + OPTIONS_RELEASE + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib + OPTIONS_DEBUG + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib +) +else() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -20,6 +33,7 @@ vcpkg_configure_cmake( OPTIONS_DEBUG -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib ) +endif() vcpkg_install_cmake() @@ -31,7 +45,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qhull) -file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) +if(EXEFILES_RELEASE OR EXEFILES_DEBUG) + file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) +endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/qpid-proton/CONTROL b/ports/qpid-proton/CONTROL index 34309a959..2c2a1f3e9 100644 --- a/ports/qpid-proton/CONTROL +++ b/ports/qpid-proton/CONTROL @@ -1,4 +1,4 @@ Source: qpid-proton -Version: 0.24.0 -Build-Depends: openssl +Version: 0.24.0-1 +Build-Depends: openssl, libuv (osx) Description: Qpid Proton is a high-performance, lightweight messaging library.
\ No newline at end of file diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index 59b75c8c1..41b86bba9 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,4 +1,4 @@ Source: qscintilla -Version: 2.10-7 +Version: 2.10-8 Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) -Build-Depends: qt5-base +Build-Depends: qt5-base, qt5-macextras (osx), qt5-winextras (windows) diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index 71778e402..8e241cfef 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -27,38 +27,32 @@ vcpkg_configure_qmake( DEFINES+=SCI_NAMESPACE ) -vcpkg_build_qmake( - RELEASE_TARGETS release - DEBUG_TARGETS debug -) +if(CMAKE_HOST_WIN32) + vcpkg_build_qmake( + RELEASE_TARGETS release + DEBUG_TARGETS debug + ) +else() + vcpkg_build_qmake() +endif() file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) -configure_file( - ${RELEASE_DIR}/release/qscintilla2_qt5.lib - ${CURRENT_PACKAGES_DIR}/lib/qscintilla2.lib - COPYONLY -) - -configure_file( - ${DEBUG_DIR}/debug/qscintilla2_qt5.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/qscintilla2.lib - COPYONLY -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY - ${RELEASE_DIR}/release/qscintilla2_qt5.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - - file(COPY - ${DEBUG_DIR}/debug/qscintilla2_qt5.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) +if(CMAKE_HOST_WIN32) + configure_file(${RELEASE_DIR}/release/qscintilla2_qt5.lib ${CURRENT_PACKAGES_DIR}/lib/qscintilla2.lib COPYONLY) + configure_file(${DEBUG_DIR}/debug/qscintilla2_qt5.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qscintilla2.lib COPYONLY) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${RELEASE_DIR}/release/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${DEBUG_DIR}/debug/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +elseif(CMAKE_HOST_APPLE) + configure_file(${RELEASE_DIR}/libqscintilla2_qt5.a ${CURRENT_PACKAGES_DIR}/lib/libqscintilla2.a COPYONLY) + configure_file(${DEBUG_DIR}/libqscintilla2_qt5.a ${CURRENT_PACKAGES_DIR}/debug/lib/libqscintilla2.a COPYONLY) endif() + vcpkg_copy_pdbs() # Handle copyright diff --git a/ports/qt5-activeqt/portfile.cmake b/ports/qt5-activeqt/portfile.cmake index 6040fc1aa..9914ef6fd 100644 --- a/ports/qt5-activeqt/portfile.cmake +++ b/ports/qt5-activeqt/portfile.cmake @@ -4,4 +4,4 @@ include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmak qt_modular_library(qtactiveqt ff2871a7c0fa2674354f8bbd32196d8b2af34212e09e0f8c1df23182353959464dfb8c96800e45dae380f239082f62ed6f1904e72dc93e43141edb4f2606edd9) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-activeqt/platforminputcontexts) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-activeqt/plugins/platforminputcontexts) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index b9f669186..7574d011d 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,4 +1,4 @@ Source: qt5-base
-Version: 5.12.1-2
+Version: 5.12.1-4
Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.
Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl
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 e5b59aeb9..4b8869196 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -48,9 +48,9 @@ set(CORE_OPTIONS -system-libpng
-system-freetype
-system-pcre
- -system-harfbuzz
-system-doubleconversion
-system-sqlite
+ -system-harfbuzz
-no-fontconfig
-nomake examples
-nomake tests
@@ -113,9 +113,41 @@ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a -ldl -lpthread"
"SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libsqlite3.a -ldl -lpthread"
)
+
+elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+configure_qt(
+ SOURCE_PATH ${SOURCE_PATH}
+ PLATFORM "macx-clang"
+ OPTIONS
+ ${CORE_OPTIONS}
+ OPTIONS_RELEASE
+ "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libjpeg.a"
+ "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libpng16.a"
+ "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libz.a"
+ "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/lib/libz.a"
+ "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpng16.a"
+ "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libfreetype.a"
+ "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpq.a ${CURRENT_INSTALLED_DIR}/lib/libssl.a ${CURRENT_INSTALLED_DIR}/lib/libcrypto.a -ldl -lpthread"
+ "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libsqlite3.a -ldl -lpthread"
+ "HARFBUZZ_LIBS=${CURRENT_INSTALLED_DIR}/lib/libharfbuzz.a -framework ApplicationServices"
+ OPTIONS_DEBUG
+ "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libjpeg.a"
+ "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a"
+ "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a"
+ "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a"
+ "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a"
+ "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libfreetyped.a"
+ "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a -ldl -lpthread"
+ "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libsqlite3.a -ldl -lpthread"
+ "HARFBUZZ_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libharfbuzz.a -framework ApplicationServices"
+)
endif()
-install_qt()
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ install_qt(DISABLE_PARALLEL) # prevent race condition on Mac
+else()
+ install_qt()
+endif()
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
@@ -127,14 +159,13 @@ 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()
file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
-vcpkg_execute_required_process(
+vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake
LOGNAME fix-cmake
@@ -187,4 +218,7 @@ endforeach() file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5core)
+
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+#
\ No newline at end of file diff --git a/ports/qt5-base/vcpkg-cmake-wrapper.cmake b/ports/qt5-base/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..6b5727755 --- /dev/null +++ b/ports/qt5-base/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,66 @@ +_find_package(${ARGS})
+
+function(add_qt_library _target)
+ foreach(_lib IN LISTS ARGN)
+ find_library(${_lib}_LIBRARY_DEBUG NAMES ${_lib}d PATH_SUFFIXES plugins/platforms)
+ find_library(${_lib}_LIBRARY_RELEASE NAMES ${_lib} PATH_SUFFIXES plugins/platforms)
+ set_property(TARGET ${_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+ \$<\$<NOT:\$<CONFIG:DEBUG>>:${${_lib}_LIBRARY_RELEASE}>\$<\$<CONFIG:DEBUG>:${${_lib}_LIBRARY_DEBUG}>)
+ endforeach()
+endfunction()
+
+get_target_property(_target_type Qt5::Core TYPE)
+if("${_target_type}" STREQUAL "STATIC_LIBRARY")
+ find_package(ZLIB)
+ find_package(JPEG)
+ find_package(PNG)
+ find_package(Freetype)
+ find_package(sqlite3 CONFIG)
+ find_package(PostgreSQL MODULE REQUIRED)
+ find_package(double-conversion CONFIG)
+ find_package(OpenSSL)
+ find_package(harfbuzz CONFIG)
+
+ set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+ ZLIB::ZLIB JPEG::JPEG PNG::PNG Freetype::Freetype sqlite3 harfbuzz::harfbuzz
+ ${PostgreSQL_LIBRARY} double-conversion::double-conversion OpenSSL::SSL OpenSSL::Crypto
+ )
+
+ add_qt_library(Qt5::Core
+ pcre2-16
+ Qt5ThemeSupport
+ Qt5EventDispatcherSupport
+ Qt5PlatformCompositorSupport
+ Qt5FontDatabaseSupport)
+
+ if(MSVC)
+ set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+ Netapi32.lib Ws2_32.lib Mincore.lib Winmm.lib Iphlpapi.lib Wtsapi32.lib Dwmapi.lib Imm32.lib)
+
+ add_qt_library(Qt5::Core Qt5WindowsUIAutomationSupport qwindows qdirect2d)
+
+ elseif(APPLE)
+ set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+ "-weak_framework DiskArbitration" "-weak_framework IOKit" "-weak_framework Foundation" "-weak_framework CoreServices"
+ "-weak_framework AppKit" "-weak_framework Security" "-weak_framework ApplicationServices"
+ "-weak_framework CoreFoundation" "-weak_framework SystemConfiguration"
+ "-weak_framework Carbon"
+ "-weak_framework QuartzCore"
+ "-weak_framework CoreVideo"
+ "-weak_framework Metal"
+ "-weak_framework CoreText"
+ "-weak_framework ApplicationServices"
+ "-weak_framework CoreGraphics"
+ "-weak_framework OpenGL"
+ "-weak_framework AGL"
+ "-weak_framework ImageIO"
+ "z" "m"
+ cups)
+ add_qt_library(Qt5::Core
+ Qt5GraphicsSupport
+ Qt5ClipboardSupport
+ Qt5AccessibilitySupport
+ qcocoa)
+ endif()
+
+endif()
diff --git a/ports/qt5-declarative/portfile.cmake b/ports/qt5-declarative/portfile.cmake index afa19aa53..adda51330 100644 --- a/ports/qt5-declarative/portfile.cmake +++ b/ports/qt5-declarative/portfile.cmake @@ -4,4 +4,4 @@ include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmak qt_modular_library(qtdeclarative e06032da5c1c151200215f55728b9ce0fac299076f0ca3150143525a56bcce15eb72f6aa982b439e3920d1cd7a30468b3f0913f135d644ecda277d763fb5e1b5) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/platforminputcontexts) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/plugins/platforminputcontexts)
\ No newline at end of file diff --git a/ports/qt5-macextras/CONTROL b/ports/qt5-macextras/CONTROL new file mode 100644 index 000000000..8344c9240 --- /dev/null +++ b/ports/qt5-macextras/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-macextras +Version: 5.12.1 +Description: Qt5 Mac Extras Module. Provides platform-specific APIs for mac. +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-macextras/portfile.cmake b/ports/qt5-macextras/portfile.cmake new file mode 100644 index 000000000..ed8e2bb5b --- /dev/null +++ b/ports/qt5-macextras/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtmacextras 0d307b85e09fd97f36c5ee333297ceda4c709f6dc995dba4e8b8c1a85bd95c83ed80ee641e13e05fe3b965060c7847ba1835b7e6d9099a03c8bf9f2c4bae1ded) diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index eedb58432..f8e6f4894 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 2019-02-02 +Version: 2019-03-21 Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake index a99d18478..9f6d23fa1 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -1,6 +1,6 @@ set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") -function(qt_modular_library NAME HASH) +function(qt_modular_fetch_library NAME HASH TARGET_SOURCE_PATH) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 45) message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n" @@ -23,6 +23,10 @@ function(qt_modular_library NAME HASH) REF ${FULL_VERSION} ) + set(${TARGET_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE) +endfunction() + +function(qt_modular_build_library SOURCE_PATH) # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") @@ -38,8 +42,13 @@ function(qt_modular_library NAME HASH) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) - string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) - string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + if(WIN32) + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) + string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + else() + set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR}) + set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR}) + endif() #Configure debug+release vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}) @@ -134,5 +143,9 @@ function(qt_modular_library NAME HASH) set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") endif() file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() +function(qt_modular_library NAME HASH) + qt_modular_fetch_library(${NAME} ${HASH} TARGET_SOURCE_PATH) + qt_modular_build_library(${TARGET_SOURCE_PATH}) endfunction() diff --git a/ports/qt5-mqtt/CONTROL b/ports/qt5-mqtt/CONTROL new file mode 100644 index 000000000..0b99078fb --- /dev/null +++ b/ports/qt5-mqtt/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-mqtt
+Version: 5.12.1
+Description: Qt5 MQTT module.
+Build-Depends: qt5-modularscripts, qt5-base
+
diff --git a/ports/qt5-mqtt/portfile.cmake b/ports/qt5-mqtt/portfile.cmake new file mode 100644 index 000000000..8c797abb0 --- /dev/null +++ b/ports/qt5-mqtt/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions)
+
+include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO qt/qtmqtt
+ REF v5.12.1
+ SHA512 c6f4000a032caaf5224ca6fe2442f22eddc26e3e53cc101885c717b706156cada716e45ff92d267928b87e1e5ceae5e81694f4b7c289d9836e75f27fd012de42
+ HEAD_REF dev
+)
+
+# Qt module builds from a git repository require a .git entry to invoke syncqt
+file(WRITE "${SOURCE_PATH}/.git" "repocontent")
+
+# syncqt is a PERL script
+vcpkg_find_acquire_program(PERL)
+get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
+set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}")
+
+qt_modular_build_library(${SOURCE_PATH})
diff --git a/ports/qt5-purchasing/CONTROL b/ports/qt5-purchasing/CONTROL index 35d617b68..0c2df22e9 100644 --- a/ports/qt5-purchasing/CONTROL +++ b/ports/qt5-purchasing/CONTROL @@ -1,4 +1,4 @@ Source: qt5-purchasing
Version: 5.12.1
Description: Qt5 Purchasing Module - Enables in-app purchase of products in Qt applications.
-Build-Depends: qt5-modularscripts, qt5-base
+Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative
diff --git a/ports/qt5-tools/portfile.cmake b/ports/qt5-tools/portfile.cmake index 1cc0a7f9b..e430e4e95 100644 --- a/ports/qt5-tools/portfile.cmake +++ b/ports/qt5-tools/portfile.cmake @@ -4,4 +4,4 @@ include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmak qt_modular_library(qttools e3ae1974f0b20bad1b86d038c3585753183b8c24c133393e3ecf65a0487402ad8dcf8147bf263e9a4c2d3abef1b706981943fcf5268726e424f1b61f69ce4f2e) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-tools/platforminputcontexts) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-tools/plugins/platforminputcontexts)
\ No newline at end of file diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 6b4b9129b..fe0698293 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.12.1-1 +Version: 5.12.1-2 Description: Qt5 Application Framework -Build-Depends: qt5-3d, qt5-activeqt, qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-graphicaleffects, qt5-imageformats, qt5-location, qt5-multimedia, qt5-networkauth, qt5-purchasing, qt5-quickcontrols, qt5-quickcontrols2, qt5-script, qt5-scxml, qt5-sensors, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-webchannel, qt5-websockets, qt5-winextras, qt5-xmlpatterns +Build-Depends: qt5-3d, qt5-activeqt, qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-graphicaleffects, qt5-imageformats, qt5-location, qt5-multimedia, qt5-mqtt, qt5-networkauth, qt5-purchasing, qt5-quickcontrols, qt5-quickcontrols2, qt5-script, qt5-scxml, qt5-sensors, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-webchannel, qt5-websockets, qt5-winextras (windows), qt5-macextras (osx), qt5-xmlpatterns diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 8c1c0b938..2e3787857 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -26,8 +26,15 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) # Delete redundant directories -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/license.txt ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidjson/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidjson/copyright) + +if(VCPKG_USE_HEAD_VERSION) + file(READ "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" _contents) + string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n") + # Note: adding this extra setting for RAPIDJSON_INCLUDE_DIRS maintains compatibility with previous rapidjson versions +endif() diff --git a/ports/rapidxml-ns/CONTROL b/ports/rapidxml-ns/CONTROL new file mode 100644 index 000000000..1dd1ed546 --- /dev/null +++ b/ports/rapidxml-ns/CONTROL @@ -0,0 +1,3 @@ +Source: rapidxml-ns +Version: 1.13-04674e3 +Description: RapidXML with added XML namespaces support. diff --git a/ports/rapidxml-ns/portfile.cmake b/ports/rapidxml-ns/portfile.cmake new file mode 100644 index 000000000..c38d6c4ec --- /dev/null +++ b/ports/rapidxml-ns/portfile.cmake @@ -0,0 +1,22 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO svgpp/rapidxml_ns + REF 04674e33e3bbfeee05875a29a36734667c0f3cfd + SHA512 c82d55ca7ec358427f811689604ba02582de9d7f57d0caa3a96e2c36b9f3751e9acefc6f84348e6c619dacca31880f279bf9d9959f8eff251f3d3276c836bcd2 + HEAD_REF master +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidxml-ns) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidxml-ns/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidxml-ns/copyright) + +# Copy the header files +file(INSTALL + ${SOURCE_PATH}/rapidxml_ns.hpp + ${SOURCE_PATH}/rapidxml_ns_print.hpp + ${SOURCE_PATH}/rapidxml_ns_utils.hpp + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/rapidxml-ns) diff --git a/ports/rapidxml/portfile.cmake b/ports/rapidxml/portfile.cmake index a5f3190d0..dd8f0d4c2 100644 --- a/ports/rapidxml/portfile.cmake +++ b/ports/rapidxml/portfile.cmake @@ -13,4 +13,4 @@ file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/r file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidxml/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidxml/copyright) # Copy the header files -file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hpp") +file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/rapidxml FILES_MATCHING PATTERN "*.hpp") diff --git a/ports/readerwriterqueue/CONTROL b/ports/readerwriterqueue/CONTROL index f02b34f1e..42feb2725 100644 --- a/ports/readerwriterqueue/CONTROL +++ b/ports/readerwriterqueue/CONTROL @@ -1,3 +1,3 @@ Source: readerwriterqueue -Version: 1.0.0 +Version: 1.0.0-1 Description: A single-producer, single-consumer lock-free queue diff --git a/ports/readerwriterqueue/portfile.cmake b/ports/readerwriterqueue/portfile.cmake index 46fd0a8ca..2b05e9814 100644 --- a/ports/readerwriterqueue/portfile.cmake +++ b/ports/readerwriterqueue/portfile.cmake @@ -4,12 +4,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cameron314/readerwriterqueue - REF v1.0.0 - SHA512 3bb8320e35e8911350df1bd5349e006f85cbd0863cc2bb8ac1912aaf7a5686f42966b7508a845cfdca280ab65a308148315c987ef333d74b6d085638dd6d8578 + REF v1.0.1 + SHA512 cb1cc0add78ec6994799c5b3406d310bfcdad74756a6995404d9ea659b7fc6cb7f2b3667c2e3fc0cfcb7ad9c376744c6a3988cb9cc4e0ae0d59ff5dd818d7f11 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/readerwriterqueue RENAME copyright) file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/readerwriterqueue) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 959292d5c..435f49cd0 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,5 +1,5 @@ Source: realsense2 -Version: 2.16.1 +Version: 2.16.1-1 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). Feature: tools diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index e6073099c..8db63f04d 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -35,8 +35,8 @@ vcpkg_configure_cmake( -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF # CMAKE - "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - -DCMAKE_DEBUG_POSTFIX="_d" + -DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + -DCMAKE_DEBUG_POSTFIX=_d ) vcpkg_install_cmake() @@ -47,11 +47,21 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(BUILD_EXAMPLES) - file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) - file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) - file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2) - file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) + file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/rs-* ${CURRENT_PACKAGES_DIR}/bin/realsense-*) + if (EXEFILES_RELEASE) + file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2) + file(REMOVE ${EXEFILES_RELEASE}) + endif() + file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*) + if (EXEFILES_DEBUG) + file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) + endif() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/realsense2) + + file(GLOB BINS ${CURRENT_PACKAGES_DIR}/bin/*) + if(NOT BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/realsense2) diff --git a/ports/restinio/CONTROL b/ports/restinio/CONTROL index 83752b6c4..311b9d581 100644 --- a/ports/restinio/CONTROL +++ b/ports/restinio/CONTROL @@ -1,4 +1,4 @@ Source: restinio
-Version: 0.4.8.5
+Version: 0.4.8.6
Description: A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests.
Build-Depends: asio, fmt, http-parser
diff --git a/ports/restinio/portfile.cmake b/ports/restinio/portfile.cmake index 8d5d07615..5e151cb9f 100644 --- a/ports/restinio/portfile.cmake +++ b/ports/restinio/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_bitbucket(
OUT_SOURCE_PATH SOURCE_PATH
REPO sobjectizerteam/restinio-0.4
- REF v.0.4.8.5
- SHA512 e689033360af9a50f9e8c22e0852fa1ce5a7199484d8fc629570c6511f49b480434ee51efe2ae0f768f3e351e401ba100fd794657c5340e5750b4c5c19e37d71
+ REF v.0.4.8.6
+ SHA512 9b2e7af3e00a27a32605c27b45c1015468ae3ad5810b51b194eef0038d530c819bf6b91ff166852637dc0f141476f4d58876e4370929e2f091c7d5c1b3c9c72a
)
vcpkg_configure_cmake(
diff --git a/ports/roaring/CONTROL b/ports/roaring/CONTROL new file mode 100644 index 000000000..0b1327da4 --- /dev/null +++ b/ports/roaring/CONTROL @@ -0,0 +1,3 @@ +Source: roaring
+Version: 2019-03-05-2
+Description: A better compressed bitset in C (and C++)
diff --git a/ports/roaring/portfile.cmake b/ports/roaring/portfile.cmake new file mode 100644 index 000000000..937fd0751 --- /dev/null +++ b/ports/roaring/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions)
+
+if (TARGET_TRIPLET MATCHES "^x86")
+ message(WARNING "The CRoaring authors recommend users of this lib against using a 32-bit build.")
+endif ()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO RoaringBitmap/CRoaring
+ REF ac3eaf56af8691374b63e53e842feff0322169f0
+ SHA512 db10331559df1503bcd25f7f5cab1fdf6b29984634dbfd54289cd7750032a1dd25cd0b57b490cac3d0d3fd5bc785730617536a7162c6e59f66fadb77f972b1c4
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ROARING_BUILD_STATIC)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DROARING_BUILD_STATIC=${ROARING_BUILD_STATIC}
+ -DENABLE_ROARING_TESTS=OFF
+)
+
+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/rocksdb/0004-use-find-package.patch b/ports/rocksdb/0004-use-find-package.patch index a6c7b5f58..c2b9e5a4f 100644 --- a/ports/rocksdb/0004-use-find-package.patch +++ b/ports/rocksdb/0004-use-find-package.patch @@ -1,11 +1,11 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 43256fc04..204761256 100644 +index 1bae9a7..0303186 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -49,7 +49,7 @@ option(WITH_SNAPPY "build with SNAPPY" OFF) - option(WITH_LZ4 "build with lz4" OFF) - option(WITH_ZLIB "build with zlib" OFF) - option(WITH_ZSTD "build with zstd" OFF) +@@ -53,7 +53,7 @@ option(WITH_WINDOWS_UTF8_FILENAMES "use UTF8 as characterset for opening files, + if (WITH_WINDOWS_UTF8_FILENAMES) + add_definitions(-DROCKSDB_WINDOWS_UTF8_FILENAMES) + endif() -if(MSVC) +if(MSVC AND NOT VCPKG_TOOLCHAIN) # Defaults currently different for GFLAGS. diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 8ec367068..1f47bcca8 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,5 +1,5 @@ Source: rocksdb -Version: 5.17.2 +Version: 5.18.3 Description: A library that provides an embeddable, persistent key-value store for fast storage Default-Features: zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 202ef61a8..7d96d55c2 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF v5.17.2 - SHA512 c9f9bff747d0d2c97f8adb71d6a3bd5dc206c2fc567a47d0400abac61fec7f2a386d16cda5447bcf592cca006fd6d4c5ae1a68d122e2e2a03d3ebcc002dae147 + REF v5.18.3 + SHA512 5f8c9e66dd7d7f1071dbbdd0442519df403f92876f9ed120b6a89788446cabf86275866a8ea273ab6fcb9d62cc7f3dc4d5b1684aa39c3956eea47b5b93938d54 HEAD_REF master PATCHES 0001-disable-gtest.patch diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL index 50aa21724..cb4eb9557 100644 --- a/ports/rttr/CONTROL +++ b/ports/rttr/CONTROL @@ -1,3 +1,3 @@ Source: rttr -Version: 0.9.5-3 +Version: 0.9.6-0 Description: an easy and intuitive way to use reflection in C++ diff --git a/ports/rttr/disable-unit-tests.patch b/ports/rttr/disable-unit-tests.patch deleted file mode 100644 index b27f01661..000000000 --- a/ports/rttr/disable-unit-tests.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index b9fd698..bcaebfe 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -31,7 +31,9 @@ - ############################################# - - add_subdirectory (rttr) -+if(UNIT_TESTS) - add_subdirectory (unit_tests) -+endif() - - if (${BUILD_BENCHMARKS}) - add_subdirectory (benchmarks) diff --git a/ports/rttr/fix-directory-output.patch b/ports/rttr/fix-directory-output.patch index b83fc455c..8fd8ed0c7 100644 --- a/ports/rttr/fix-directory-output.patch +++ b/ports/rttr/fix-directory-output.patch @@ -1,10 +1,13 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d64ee41..e33e7bf 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -76,4 +76,4 @@ add_subdirectory(src) - add_subdirectory(doc) +diff --git a/CMake/config.cmake b/CMake/config.cmake +index a718199..eab64c2 100644 +--- a/CMake/config.cmake ++++ b/CMake/config.cmake +@@ -47,7 +47,7 @@ set(CMAKE_EXECUTABLE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") # here we specify the installation directory --set(CMAKE_INSTALL_PREFIX ${RTTR_INSTALL_DIR} CACHE PATH "RTTR install prefix" FORCE) -+set(CMAKE_INSTALL_PREFIX ${RTTR_INSTALL_DIR} CACHE PATH "RTTR install prefix") + if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +- set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/install" CACHE PATH "RTTR install prefix" FORCE) ++ #set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/install" CACHE PATH "RTTR install prefix") + endif() + + # in order to group in visual studio the targets into solution filters diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index 8ce171cc6..ceef04449 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -10,12 +10,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rttrorg/rttr - REF v0.9.5 - SHA512 b451f24fd4bdc4b7d9ecabdb6fd261744852e68357ec36573109354a25f2bf494908b9d4174602b59dd5005c42ba8edc3b35ec1d1386384db421805ac9994608 + REF v0.9.6 + SHA512 5c94f037b319568d351ee6d25f1404adce00b40598dce4a331789d5357c059e50aae3894f90e60d37307b7e96f4672ae09d3798bbe47f796ef2044f1ac6f9e50 HEAD_REF master PATCHES fix-directory-output.patch - disable-unit-tests.patch remove-owner-read-perms.patch ) @@ -24,11 +23,18 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBUILD_BENCHMARKS=OFF + -DBUILD_UNIT_TESTS=OFF ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +if(UNIX) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/rttr/cmake) +elseif(WIN32) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + message(FATAL_ERROR "RTTR does not support this platform") +endif() #Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr) diff --git a/ports/rttr/remove-owner-read-perms.patch b/ports/rttr/remove-owner-read-perms.patch index 918de14cc..3fc98422d 100644 --- a/ports/rttr/remove-owner-read-perms.patch +++ b/ports/rttr/remove-owner-read-perms.patch @@ -1,41 +1,44 @@ -diff --git a/CMake/config.cmake b/CMake/config.cmake
-index 1d753b3..393e3d0 100644
---- a/CMake/config.cmake
-+++ b/CMake/config.cmake
-@@ -131,4 +131,4 @@ install(
-
- install(FILES "${LICENSE_FILE}" "${README_FILE}"
- DESTINATION "."
-- PERMISSIONS OWNER_READ)
-+ )
-diff --git a/CMake/utility.cmake b/CMake/utility.cmake
-index 9dbc172..c37671e 100644
---- a/CMake/utility.cmake
-+++ b/CMake/utility.cmake
-@@ -165,7 +165,7 @@ function(loadFolder FOLDER _HEADER_FILES _SOURCE_FILES)
- # we don't want to install header files which are marked as private
- if (${shouldInstall})
- if (NOT ${FULL_HEADER_PATH} MATCHES ".*_p.h$")
-- install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}" PERMISSIONS OWNER_READ)
-+ install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}")
- endif()
- endif()
- endforeach()
-diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
-index ec10eaf..454c41e 100644
---- a/doc/CMakeLists.txt
-+++ b/doc/CMakeLists.txt
-@@ -127,11 +127,11 @@ add_custom_target(doc ALL
- install(DIRECTORY "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_CUSTOM_HTML_DIR}"
- DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}"
- PATTERN "*.*"
-- PERMISSIONS OWNER_READ)
-+ )
-
- install(FILES "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_INDEX_FILE}"
- DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}"
-- PERMISSIONS OWNER_READ)
-+ )
-
- #########################################################################################
-
+diff --git a/CMake/config.cmake b/CMake/config.cmake +index 4483900..dfef016 100644 +--- a/CMake/config.cmake ++++ b/CMake/config.cmake +@@ -171,6 +171,5 @@ if (BUILD_INSTALLER) + COMPONENT Devel) + + install(FILES "${LICENSE_FILE}" "${README_FILE}" +- DESTINATION ${RTTR_ADDITIONAL_FILES_INSTALL_DIR} +- PERMISSIONS OWNER_READ) ++ DESTINATION ${RTTR_ADDITIONAL_FILES_INSTALL_DIR}) + endif() +diff --git a/CMake/utility.cmake b/CMake/utility.cmake +index 7e1f677..a3932ae 100644 +--- a/CMake/utility.cmake ++++ b/CMake/utility.cmake +@@ -165,7 +165,7 @@ function(loadFolder FOLDER _HEADER_FILES _SOURCE_FILES) + getNameOfDir(CMAKE_CURRENT_SOURCE_DIR DIRNAME) + if (${shouldInstall}) + if (NOT ${FULL_HEADER_PATH} MATCHES ".*_p.h$") # we don't want to install header files which are marked as private +- install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}" PERMISSIONS OWNER_READ) ++ install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}") + endif() + endif() + endforeach() +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index bacb280..a92d642 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -132,12 +132,10 @@ set_target_properties(doc PROPERTIES FOLDER "Documentation") + + install(DIRECTORY "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_CUSTOM_HTML_DIR}" + DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}" +- PATTERN "*.*" +- PERMISSIONS OWNER_READ) ++ PATTERN "*.*") + + install(FILES "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_INDEX_FILE}" +- DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}" +- PERMISSIONS OWNER_READ) ++ DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}") + + ######################################################################################### + diff --git a/ports/rxqt/CONTROL b/ports/rxqt/CONTROL index a99d58aa5..dc87425aa 100644 --- a/ports/rxqt/CONTROL +++ b/ports/rxqt/CONTROL @@ -1,4 +1,4 @@ Source: rxqt
-Version:
+Version: bb2138c
Description: The Reactive Extensions for Qt. <https://github.com/tetsurom/rxqt>
Build-Depends: rxcpp
\ No newline at end of file diff --git a/ports/rxqt/portfile.cmake b/ports/rxqt/portfile.cmake index 8531af15b..f84bf7c7c 100644 --- a/ports/rxqt/portfile.cmake +++ b/ports/rxqt/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO tetsurom/rxqt
- REF master
- SHA512 3f25570ab98c8d3959c35b0d99d5c35486339aa8cd752d8140bb064239265ecb8c5002e3a5e2b46324bb79b558cfe0f17e23a59ad51e6d3a0764acdce493b12c
+ REF bb2138c835ef96a53bb79c47fb318237564f9a0c
+ SHA512 df39f05b0b4fcd950dd39f40b32e20097352a935778af1be077a08644b3562d07dcc77ab658bc45437454372be955a40013570124e86943bb32493c66cdce439
HEAD_REF master
)
diff --git a/ports/scylla-wrapper/CMakeLists.txt b/ports/scylla-wrapper/CMakeLists.txt new file mode 100644 index 000000000..b906d15c9 --- /dev/null +++ b/ports/scylla-wrapper/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.8.0)
+project(scylla_wrapper CXX)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 /DUNICODE /D_UNICODE -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
+endif()
+
+find_library(DISTORM_LIBRARY distorm)
+find_path(DISTORM_INCLUDE_DIR distorm.h)
+
+include_directories(scylla_wrapper ${DISTORM_INCLUDE_DIR})
+
+file(GLOB scylla_wrapper_srcs "scylla_wrapper/*.cpp")
+
+add_library(scylla_wrapper ${scylla_wrapper_srcs})
+
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(scylla_wrapper PRIVATE -DSCYLLA_WRAPPER_EXPORTS)
+endif()
+
+target_link_libraries(scylla_wrapper PRIVATE ${DISTORM_LIBRARY})
+
+install(
+ TARGETS scylla_wrapper
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES scylla_wrapper/scylla_wrapper.h DESTINATION include)
+endif()
diff --git a/ports/scylla-wrapper/CONTROL b/ports/scylla-wrapper/CONTROL new file mode 100644 index 000000000..e320224b0 --- /dev/null +++ b/ports/scylla-wrapper/CONTROL @@ -0,0 +1,4 @@ +Source: scylla-wrapper
+Version: 2018-08-26-16e6f435
+Build-Depends: distorm
+Description: This is a wrapper around Scylla. It exports functions for IAT fixing, dumping and PE rebuilding. based on http://github.com/NtQuery/Scylla commit 0f6b7198be (v0.9.6b).
\ No newline at end of file diff --git a/ports/scylla-wrapper/portfile.cmake b/ports/scylla-wrapper/portfile.cmake new file mode 100644 index 000000000..69e28b649 --- /dev/null +++ b/ports/scylla-wrapper/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions)
+
+# scylla_wrapper_dll supplies a DllMain
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+vcpkg_from_bitbucket(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO cypherpunk/scylla_wrapper_dll
+ REF 4ad953ec04108269f1d80a91b2723b3e22d1b4d2
+ SHA512 d7cb72e097e86e96cf0a8f463c0f839c9608fa4276bc1e2e984290984bcfe8a5b2257b1511259cb78802819fadf2c1001dc3011ee2c6dc9dfcbdb561d34e0c35
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(REMOVE
+ ${SOURCE_PATH}/scylla_wrapper_dll/distorm.h
+ ${SOURCE_PATH}/scylla_wrapper_dll/distorm_x64.lib
+ ${SOURCE_PATH}/scylla_wrapper_dll/distorm_x86.lib
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG
+ -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/scylla-wrapper RENAME copyright)
diff --git a/ports/sdl1-net/CMakeLists.txt b/ports/sdl1-net/CMakeLists.txt index 05bdac9f8..1e1f95171 100644 --- a/ports/sdl1-net/CMakeLists.txt +++ b/ports/sdl1-net/CMakeLists.txt @@ -5,8 +5,7 @@ if (MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") endif() -find_path(SDL_INCLUDE_DIR SDL.h) -find_library(SDL_LIBRARY NAMES SDLd SDL) +find_package(SDL) add_library(SDL_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c version.rc) diff --git a/ports/sdl1-net/CONTROL b/ports/sdl1-net/CONTROL index ae968e581..61544abec 100644 --- a/ports/sdl1-net/CONTROL +++ b/ports/sdl1-net/CONTROL @@ -1,4 +1,4 @@ Source: sdl1-net -Version: 1.2.8-2 +Version: 1.2.8-3 Description: Networking library for SDL Build-Depends: sdl1 diff --git a/ports/sdl1/CONTROL b/ports/sdl1/CONTROL index 483813f51..ce37bc05d 100644 --- a/ports/sdl1/CONTROL +++ b/ports/sdl1/CONTROL @@ -1,3 +1,3 @@ Source: sdl1 -Version: 1.2.15-3 +Version: 1.2.15-5 Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/ports/sdl1/portfile.cmake b/ports/sdl1/portfile.cmake index de2d855e6..2cbdfc42c 100644 --- a/ports/sdl1/portfile.cmake +++ b/ports/sdl1/portfile.cmake @@ -1,7 +1,5 @@ include(vcpkg_common_functions) -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SDL-Mirror/SDL @@ -17,6 +15,14 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDLmain.vcxproj DESTINATION ${SOURCE_PATH}/V configure_file(${SOURCE_PATH}/include/SDL_config.h.default ${SOURCE_PATH}/include/SDL_config.h COPYONLY) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/static-build.patch + ) +endif() + # This text file gets copied as a library, and included as one in the package file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB) @@ -28,7 +34,13 @@ vcpkg_install_msbuild( ALLOW_ROOT_INCLUDES ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/doxyfile) +#Take all the fils into include/SDL to sovle conflict with SDL2 port +file(GLOB files ${CURRENT_PACKAGES_DIR}/include/*) +foreach(file ${files}) + file(COPY ${file} DESTINATION ${CURRENT_PACKAGES_DIR}/include/SDL) + file(REMOVE ${file}) +endforeach() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/SDL/doxyfile) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) diff --git a/ports/sdl1/static-build.patch b/ports/sdl1/static-build.patch new file mode 100644 index 000000000..89bc39ddc --- /dev/null +++ b/ports/sdl1/static-build.patch @@ -0,0 +1,74 @@ +--- a/VisualC/SDL/SDL.vcxproj Sun Mar 31 11:28:40 2019
++++ b/VisualC/SDL/SDL.vcxproj Sun Mar 31 19:00:00 2019
+@@ -26,3 +26,3 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v141</PlatformToolset>
+@@ -31,3 +31,3 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v141</PlatformToolset>
+@@ -36,3 +36,3 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v141</PlatformToolset>
+@@ -41,3 +41,3 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v141</PlatformToolset>
+@@ -100,3 +100,3 @@
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+@@ -137,3 +137,3 @@
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+@@ -176,3 +176,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+@@ -213,3 +213,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+--- a/VisualC/SDLmain/SDLmain.vcxproj Sun Mar 31 11:28:40 2019
++++ b/VisualC/SDLmain/SDLmain.vcxproj Sun Mar 31 19:00:00 2019
+@@ -123,3 +123,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+@@ -140,3 +140,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+@@ -154,3 +154,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+@@ -171,3 +171,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+@@ -184,3 +184,3 @@
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader />
+@@ -200,3 +200,3 @@
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader />
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..1c1d27ce8 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -44,9 +44,19 @@ add_library(SDL2_image IMG_xpm.c IMG_xv.c IMG_xxx.c + IMG_WIC.c version.rc ) +if (APPLE) + target_sources(SDL2_image PRIVATE + IMG_ImageIO.m + ) + target_compile_options(SDL2_image BEFORE PRIVATE + "-x" "objective-c" + ) +endif() + set_target_properties(SDL2_image PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) foreach(FORMAT ${SUPPORTED_FORMATS}) @@ -93,12 +103,19 @@ endif() install(TARGETS SDL2_image + EXPORT SDL2_image RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) install(FILES SDL_image.h DESTINATION include/SDL2 CONFIGURATIONS Release) +install(EXPORT SDL2_image + DESTINATION share/sdl2-image/ + FILE sdl2-image-config.cmake + NAMESPACE SDL2:: +) + message(STATUS "Link-time dependencies:") message(STATUS " " ${SDL_LIBRARY}) diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index c91b0c838..189470e6d 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-1 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..4d02e93f4 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}) @@ -38,6 +44,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-image") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-image) file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-image/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-image/copyright) diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 5edb15906..b38847fbb 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) @@ -69,18 +78,25 @@ add_library(SDL2_mixer if(WIN32) list(APPEND SDL_MIXER_DEFINES MUSIC_MID_NATIVE) target_sources(SDL2_mixer PRIVATE music_nativemidi.c native_midi/native_midi_common.c native_midi/native_midi_win32.c) + target_link_libraries(SDL2_mixer ${SDL_MIXER_LIBRARIES} Winmm) endif() set_target_properties(SDL2_mixer PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_compile_definitions(SDL2_mixer PRIVATE ${SDL_MIXER_DEFINES}) target_include_directories(SDL2_mixer PRIVATE ${SDL_MIXER_INCLUDES} ./native_midi) -target_link_libraries(SDL2_mixer ${SDL_MIXER_LIBRARIES} Winmm) install(TARGETS SDL2_mixer + EXPORT SDL2_mixer RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +install(EXPORT SDL2_mixer + DESTINATION share/sdl2-mixer/ + FILE sdl2-mixer-config.cmake + NAMESPACE SDL2:: +) + if(NOT SDL_MIXER_SKIP_HEADERS) install(FILES SDL_mixer.h DESTINATION include/SDL2) endif() diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index 4f0c86ff1..206e922a6 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,24 @@ Source: sdl2-mixer -Version: 2.0.2-5 +Version: 2.0.4-1 Description: Multi-channel audio mixer library for SDL. -Build-Depends: sdl2, libflac, mpg123, libmodplug, libvorbis +Build-Depends: sdl2 + +Feature: libflac +Description: Support for FLAC audio format. +Build-Depends: libflac + +Feature: mpg123 +Description: Support for MP3 audio format. +Build-Depends: mpg123 + +Feature: libmodplug +Description: Support for MOD audio format. +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 c04d63654..0b1b6dcea 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( @@ -13,14 +13,40 @@ vcpkg_extract_source_archive_ex( ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +set(USE_MP3 OFF) +if("mpg123" IN_LIST FEATURES) + set(USE_MP3 ON) +endif() + +set(USE_FLAC OFF) +if("libflac" IN_LIST FEATURES) + set(USE_FLAC ON) +endif() + +set(USE_MOD OFF) +if("libmodplug" IN_LIST FEATURES) + set(USE_MOD ON) +endif() + +set(USE_OGGVORBIS OFF) +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 OPTIONS - -DSDL_MIXER_ENABLE_MP3=ON # mpg123 - -DSDL_MIXER_ENABLE_FLAC=ON # libflac - -DSDL_MIXER_ENABLE_MOD=ON # libmodplug - -DSDL_MIXER_ENABLE_OGGVORBIS=ON # libvorbis + -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_OPUS=${USE_OPUS} # opusfile OPTIONS_DEBUG -DSDL_MIXER_SKIP_HEADERS=ON ) @@ -28,5 +54,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-mixer") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-mixer) file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-mixer/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-mixer/copyright) diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index 5ee86e9bd..bb697bb46 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -13,13 +13,23 @@ add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c version.rc) set_target_properties(SDL2_net PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_compile_definitions(SDL2_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS) target_include_directories(SDL2_net PRIVATE ${SDL_INCLUDE_DIR}/SDL2) -target_link_libraries(SDL2_net ${SDL_LIBRARY} ws2_32 iphlpapi) + +if (WIN32) + target_link_libraries(SDL2_net ${SDL_LIBRARY} ws2_32 iphlpapi) +endif() install(TARGETS SDL2_net + EXPORT SDL2_net RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +install(EXPORT SDL2_net + DESTINATION "share/sdl2-net" + FILE sdl2-net-config.cmake + NAMESPACE SDL2:: +) + if(NOT DEFINED SDL_NET_SKIP_HEADERS) install(FILES SDL_net.h DESTINATION include/SDL2) endif() diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL index ff239d5a4..56ee980be 100644 --- a/ports/sdl2-net/CONTROL +++ b/ports/sdl2-net/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-net -Version: 2.0.1-4 +Version: 2.0.1-5 Description: Networking library for SDL Build-Depends: sdl2 diff --git a/ports/sdl2-net/portfile.cmake b/ports/sdl2-net/portfile.cmake index 11d626f0d..2a8928e16 100644 --- a/ports/sdl2-net/portfile.cmake +++ b/ports/sdl2-net/portfile.cmake @@ -18,5 +18,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-net") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-net) file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-net/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-net/copyright) diff --git a/ports/sdl2-ttf/CMakeLists.txt b/ports/sdl2-ttf/CMakeLists.txt index 2954a1e20..94e14e391 100644 --- a/ports/sdl2-ttf/CMakeLists.txt +++ b/ports/sdl2-ttf/CMakeLists.txt @@ -8,18 +8,25 @@ find_package(Freetype REQUIRED) add_library(SDL2_ttf SDL_ttf.c version.rc) set_target_properties(SDL2_ttf PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) -target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIR_ft2build}) -target_link_libraries(SDL2_ttf ${SDL_LIBRARY} ${FREETYPE_LIBRARY}) +target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIRS}) +target_link_libraries(SDL2_ttf ${SDL_LIBRARY} ${FREETYPE_LIBRARIES}) install(TARGETS SDL2_ttf + EXPORT SDL2_ttf RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +INSTALL(EXPORT SDL2_ttf + DESTINATION "share/sdl2-ttf" + FILE sdl2-ttf-config.cmake + NAMESPACE SDL2:: +) + if(NOT DEFINED SDL_TTF_SKIP_HEADERS) install(FILES SDL_ttf.h DESTINATION include/SDL2) endif() message(STATUS "Link-time dependencies:") message(STATUS " " ${SDL_LIBRARY}) -message(STATUS " " ${FREETYPE_LIBRARY}) +message(STATUS " " ${FREETYPE_LIBRARIES}) diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL index 362daf221..d2c77ea42 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-1 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..55451dcf1 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}) @@ -19,5 +25,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-ttf") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf) file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf/copyright) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index 05e9d6363..1bd6ec930 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,5 +1,5 @@ Source: sdl2 -Version: 2.0.9-1 +Version: 2.0.9-2 Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. Feature: vulkan diff --git a/ports/sdl2/SDL-2.0.9-bug-4391-fix.patch b/ports/sdl2/SDL-2.0.9-bug-4391-fix.patch new file mode 100644 index 000000000..f8fc64bda --- /dev/null +++ b/ports/sdl2/SDL-2.0.9-bug-4391-fix.patch @@ -0,0 +1,75 @@ +# HG changeset patch +# User Sam Lantinga <slouken@libsdl.org> +# Date 1542691020 28800 +# Node ID 9091b20040cf04cdc348d290ca22373b36364c39 +# Parent 144400e4630d885d2eb0761b7174433b4c0d90bb +Fixed bug 4391 - hid_enumerate() sometimes causes game to freeze for a few seconds + +Daniel Gibson + +Even though my game (dhewm3) doesn't use SDL_INIT_JOYSTICK, SDL_PumpEvent() calls SDL_JoystickUpdate() which ends up calling hid_enumerate() every three seconds, and sometimes on my Win7 box hid_enumerate() takes about 5 seconds, which causes the whole game to freeze for that time. + +diff -r 144400e4630d -r 9091b20040cf include/SDL_bits.h +--- a/include/SDL_bits.h Sun Nov 18 19:28:20 2018 +0300 ++++ b/include/SDL_bits.h Mon Nov 19 21:17:00 2018 -0800 +@@ -101,6 +101,15 @@ + #endif + } + ++SDL_FORCE_INLINE SDL_bool ++SDL_HasExactlyOneBitSet32(Uint32 x) ++{ ++ if (x && !(x & (x - 1))) { ++ return SDL_TRUE; ++ } ++ return SDL_FALSE; ++} ++ + /* Ends C function definitions when using C++ */ + #ifdef __cplusplus + } +diff -r 144400e4630d -r 9091b20040cf src/SDL.c +--- a/src/SDL.c Sun Nov 18 19:28:20 2018 +0300 ++++ b/src/SDL.c Mon Nov 19 21:17:00 2018 -0800 +@@ -348,6 +348,12 @@ + int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount); + Uint32 initialized = 0; + ++ /* Fast path for checking one flag */ ++ if (SDL_HasExactlyOneBitSet32(flags)) { ++ int subsystem_index = SDL_MostSignificantBitIndex32(flags); ++ return SDL_SubsystemRefCount[subsystem_index] ? flags : 0; ++ } ++ + if (!flags) { + flags = SDL_INIT_EVERYTHING; + } +diff -r 144400e4630d -r 9091b20040cf src/joystick/SDL_joystick.c +--- a/src/joystick/SDL_joystick.c Sun Nov 18 19:28:20 2018 +0300 ++++ b/src/joystick/SDL_joystick.c Mon Nov 19 21:17:00 2018 -0800 +@@ -1016,6 +1016,10 @@ + int i; + SDL_Joystick *joystick; + ++ if (!SDL_WasInit(SDL_INIT_JOYSTICK)) { ++ return; ++ } ++ + SDL_LockJoysticks(); + + if (SDL_updating_joystick) { +diff -r 144400e4630d -r 9091b20040cf src/sensor/SDL_sensor.c +--- a/src/sensor/SDL_sensor.c Sun Nov 18 19:28:20 2018 +0300 ++++ b/src/sensor/SDL_sensor.c Mon Nov 19 21:17:00 2018 -0800 +@@ -505,6 +505,10 @@ + int i; + SDL_Sensor *sensor; + ++ if (!SDL_WasInit(SDL_INIT_SENSOR)) { ++ return; ++ } ++ + SDL_LockSensors(); + + if (SDL_updating_sensor) { + diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 294d37449..468560575 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( export-symbols-only-in-shared-build.patch fix-x86-windows.patch enable-winrt-cmake.patch + SDL-2.0.9-bug-4391-fix.patch # See: https://bugzilla.libsdl.org/show_bug.cgi?id=4391 # Can be removed once SDL 2.0.10 is released ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC) diff --git a/ports/sf2cute/CONTROL b/ports/sf2cute/CONTROL new file mode 100644 index 000000000..7d850c694 --- /dev/null +++ b/ports/sf2cute/CONTROL @@ -0,0 +1,6 @@ +Source: sf2cute
+Version: 0.2.0
+Description: C++14 Library for SoundFont 2
+
+Feature: example
+Description: Installs an example application
\ No newline at end of file diff --git a/ports/sf2cute/portfile.cmake b/ports/sf2cute/portfile.cmake new file mode 100644 index 000000000..5a99ca11b --- /dev/null +++ b/ports/sf2cute/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO gocha/sf2cute
+ REF v0.2
+ HEAD_REF master
+ SHA512 721762556c392a134500fa110ec849a60d1285a57e4e8d9cacb6281bed02f5658a14694efcccb8248719558b45db89da5ad53c56990bb9c263a9760fe0d99b8f
+)
+
+set(BUILD_EXAMPLE OFF)
+
+if("example" IN_LIST FEATURES)
+ set(BUILD_EXAMPLE ON)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG
+ -DSF2CUTE_EXAMPLES_INSTALL_DIR=tools/sf2cute
+ OPTIONS_RELEASE
+ -DSF2CUTE_INSTALL_EXAMPLES=${BUILD_EXAMPLE}
+ -DSF2CUTE_EXAMPLES_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/sf2cute
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# move the .cmake files from the given directory to the expected directory by vcpkg
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/sf2cute)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sf2cute RENAME copyright)
+
+if(BUILD_EXAMPLE)
+ vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/sf2cute)
+endif()
+
+# Post-build test for cmake libraries
+vcpkg_test_cmake(PACKAGE_NAME sf2cute)
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/signalrclient/0002_fix-compile-error.patch b/ports/signalrclient/0002_fix-compile-error.patch new file mode 100644 index 000000000..bcda3646b --- /dev/null +++ b/ports/signalrclient/0002_fix-compile-error.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 91c2300..2439fec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,6 +5,8 @@ if(NOT WIN32)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -L -lcpprest")
+ endif()
+
++find_package(OpenSSL REQUIRED)
++
+ set(CPPREST_INCLUDE_DIR "" CACHE FILEPATH "Path to casablanca include dir")
+
+ include_directories (
+@@ -22,6 +24,7 @@ if(NOT DISABLE_TESTS)
+ add_subdirectory(test)
+ endif()
+
++
+ if(BUILD_SHARED_LIBS)
+ install(FILES include/signalrclient/_exports.h DESTINATION include/signalrclient)
+ else()
+diff --git a/src/signalrclient/CMakeLists.txt b/src/signalrclient/CMakeLists.txt
+index db141eb..c4306d8 100644
+--- a/src/signalrclient/CMakeLists.txt
++++ b/src/signalrclient/CMakeLists.txt
+@@ -32,7 +32,7 @@ add_definitions(-DUNICODE -D_UNICODE)
+
+ add_library (signalrclient ${SOURCES})
+
+-target_link_libraries(signalrclient ${CPPREST_SO})
++target_link_libraries(signalrclient ${CPPREST_SO} OpenSSL::SSL OpenSSL::Crypto)
+
+ install(
+ TARGETS signalrclient
diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL index 0b53a8fb2..c7bb1ea4a 100644 --- a/ports/signalrclient/CONTROL +++ b/ports/signalrclient/CONTROL @@ -1,4 +1,4 @@ Source: signalrclient -Version: 1.0.0-beta1-4 -Build-Depends: cpprestsdk +Version: 1.0.0-beta1-5 +Build-Depends: cpprestsdk, openssl Description: C++ client for SignalR. diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake index c1dc9b508..e3b6e7c4d 100644 --- a/ports/signalrclient/portfile.cmake +++ b/ports/signalrclient/portfile.cmake @@ -7,13 +7,14 @@ vcpkg_from_github( SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch + 0001_cmake.patch + 0002_fix-compile-error.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS_DEBUG - -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/debug/lib/cpprest_2_10.lib + -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/debug/lib/cpprest_2_10d.lib OPTIONS_RELEASE -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/lib/cpprest_2_10.lib OPTIONS 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/smpeg2/correct-sdl-headers-dir.patch b/ports/smpeg2/001-correct-sdl-headers-dir.patch index 6cbcb6b9b..6cbcb6b9b 100644 --- a/ports/smpeg2/correct-sdl-headers-dir.patch +++ b/ports/smpeg2/001-correct-sdl-headers-dir.patch diff --git a/ports/smpeg2/002-use-SDL2-headers.patch b/ports/smpeg2/002-use-SDL2-headers.patch new file mode 100644 index 000000000..9737c6d7b --- /dev/null +++ b/ports/smpeg2/002-use-SDL2-headers.patch @@ -0,0 +1,229 @@ +diff --git a/MPEG.cpp b/MPEG.cpp
+index 1645965..9d44166 100644
+--- a/MPEG.cpp
++++ b/MPEG.cpp
+@@ -1,4 +1,4 @@
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ #include "MPEG.h"
+
+diff --git a/MPEG.h b/MPEG.h
+index ca04260..d0b0d55 100644
+--- a/MPEG.h
++++ b/MPEG.h
+@@ -28,7 +28,7 @@
+ #include <stdio.h>
+ #include <string.h>
+
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ #include "MPEGerror.h"
+ #include "MPEGstream.h"
+diff --git a/MPEGaction.h b/MPEGaction.h
+index f9da3a3..ea0b94f 100644
+--- a/MPEGaction.h
++++ b/MPEGaction.h
+@@ -24,7 +24,7 @@
+ #ifndef _MPEGACTION_H_
+ #define _MPEGACTION_H_
+
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+ #include "MPEGframe.h"
+
+ typedef enum {
+diff --git a/MPEGaudio.h b/MPEGaudio.h
+index 3f315d2..2ec4377 100644
+--- a/MPEGaudio.h
++++ b/MPEGaudio.h
+@@ -24,7 +24,7 @@
+ #ifndef _MPEGAUDIO_H_
+ #define _MPEGAUDIO_H_
+
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+ #include "MPEGerror.h"
+ #include "MPEGaction.h"
+
+diff --git a/MPEGlist.h b/MPEGlist.h
+index 3a58a5f..fe0dbac 100644
+--- a/MPEGlist.h
++++ b/MPEGlist.h
+@@ -6,7 +6,7 @@
+ #ifndef _MPEGLIST_H_
+ #define _MPEGLIST_H_
+
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ class MPEGlist {
+ public:
+diff --git a/MPEGring.cpp b/MPEGring.cpp
+index 6d9dabb..0350d54 100644
+--- a/MPEGring.cpp
++++ b/MPEGring.cpp
+@@ -23,7 +23,7 @@
+ #include <assert.h>
+ #include <string.h>
+
+-#include "SDL_timer.h"
++#include "SDL2/SDL_timer.h"
+
+ #include "MPEGring.h"
+
+diff --git a/MPEGring.h b/MPEGring.h
+index 89172ac..550fbcc 100644
+--- a/MPEGring.h
++++ b/MPEGring.h
+@@ -24,8 +24,8 @@
+ #ifndef _MPEGRING_H
+ #define _MPEGRING_H
+
+-#include "SDL_types.h"
+-#include "SDL_thread.h"
++#include "SDL2/SDL_types.h"
++#include "SDL2/SDL_thread.h"
+
+ class MPEG_ring {
+ public:
+diff --git a/MPEGstream.h b/MPEGstream.h
+index b96c631..50e0c3a 100644
+--- a/MPEGstream.h
++++ b/MPEGstream.h
+@@ -22,7 +22,7 @@
+ #ifndef _MPEGSTREAM_H_
+ #define _MPEGSTREAM_H_
+
+-#include "SDL_types.h"
++#include "SDL2/SDL_types.h"
+ #include "MPEGerror.h"
+ #include "MPEGvideo.h"
+ #include "MPEGaudio.h"
+diff --git a/MPEGsystem.h b/MPEGsystem.h
+index 823b679..28454b3 100644
+--- a/MPEGsystem.h
++++ b/MPEGsystem.h
+@@ -6,8 +6,8 @@
+ #define _MPEGSYSTEM_H_
+ #define USE_SYSTEM_TIMESTAMP
+
+-#include "SDL.h"
+-#include "SDL_thread.h"
++#include "SDL2/SDL.h"
++#include "SDL2/SDL_thread.h"
+ #include "MPEGerror.h"
+
+ class MPEGstream;
+diff --git a/MPEGvideo.h b/MPEGvideo.h
+index 12da092..9f1ed43 100644
+--- a/MPEGvideo.h
++++ b/MPEGvideo.h
+@@ -24,8 +24,8 @@
+ #ifndef _MPEGVIDEO_H_
+ #define _MPEGVIDEO_H_
+
+-#include "SDL.h"
+-#include "SDL_thread.h"
++#include "SDL2/SDL.h"
++#include "SDL2/SDL_thread.h"
+ #include "MPEGerror.h"
+ #include "MPEGaction.h"
+
+diff --git a/README.SDL_mixer b/README.SDL_mixer
+index c01b575..5cacc4f 100644
+--- a/README.SDL_mixer
++++ b/README.SDL_mixer
+@@ -5,7 +5,7 @@ You can have the SDL mixer library mix audio from a movie by hooking into
+ the SDL mixer music hooks:
+
+ #include "smpeg.h"
+-#include "SDL_mixer.h"
++#include "SDL2/SDL_mixer.h"
+
+ .. set up the mixer audio ...
+
+diff --git a/acinclude/sdl2.m4 b/acinclude/sdl2.m4
+index 93bc4b0..776ad42 100644
+--- a/acinclude/sdl2.m4
++++ b/acinclude/sdl2.m4
+@@ -84,7 +84,7 @@ dnl
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ char*
+ my_strdup (char *str)
+@@ -167,7 +167,7 @@ int main (int argc, char *argv[])
+ LIBS="$LIBS $SDL_LIBS"
+ AC_TRY_LINK([
+ #include <stdio.h>
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ int main(int argc, char *argv[])
+ { return 0; }
+diff --git a/configure b/configure
+index 4ac7e60..ee1d934 100644
+--- a/configure
++++ b/configure
+@@ -15270,7 +15270,7 @@ else
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ char*
+ my_strdup (char *str)
+@@ -15367,7 +15367,7 @@ $as_echo "no" >&6; }
+ /* end confdefs.h. */
+
+ #include <stdio.h>
+-#include "SDL.h"
++#include "SDL2/SDL.h"
+
+ int main(int argc, char *argv[])
+ { return 0; }
+diff --git a/video/gdith.cpp b/video/gdith.cpp
+index c56da96..53ba388 100644
+--- a/video/gdith.cpp
++++ b/video/gdith.cpp
+@@ -52,7 +52,7 @@
+ #include "video.h"
+ #include "proto.h"
+ #include "dither.h"
+-#include "SDL_timer.h"
++#include "SDL2/SDL_timer.h"
+
+ #ifdef __STDC__
+ #include <stdlib.h>
+diff --git a/video/readfile.cpp b/video/readfile.cpp
+index eb71194..a19e66d 100644
+--- a/video/readfile.cpp
++++ b/video/readfile.cpp
+@@ -56,7 +56,7 @@
+ #include <string.h>
+ #include <signal.h>
+
+-#include "SDL_endian.h"
++#include "SDL2/SDL_endian.h"
+ #include "video.h"
+ #include "proto.h"
+ #include "util.h"
+diff --git a/video/video.h b/video/video.h
+index 96de89b..a35095b 100644
+--- a/video/video.h
++++ b/video/video.h
+@@ -400,7 +400,7 @@ extern unsigned int cacheMiss[8][8];
+ #define __SCO__ 1
+ #endif
+
+-#include "SDL_endian.h"
++#include "SDL2/SDL_endian.h"
+ #if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ #ifdef LITTLE_ENDIAN_ARCHITECTURE
+ #undef LITTLE_ENDIAN_ARCHITECTURE
diff --git a/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch b/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch new file mode 100644 index 000000000..31128a848 --- /dev/null +++ b/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch @@ -0,0 +1,13 @@ +diff --git a/audio/mpegtoraw.cpp b/audio/mpegtoraw.cpp +index 493c870..a4eabdc 100644 +--- a/audio/mpegtoraw.cpp ++++ b/audio/mpegtoraw.cpp +@@ -448,7 +448,7 @@ int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len) + if (audio->timestamp[0] != -1){ + double timeshift = audio->Time() - audio->timestamp[0]; + double correction = 0; +- assert(audio->timestamp >= 0); ++ assert(audio->timestamp[0] >= 0); + if (fabs(timeshift) > 1.0){ + correction = -timeshift; + #ifdef DEBUG_TIMESTAMP_SYNC diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt index aa36bbb21..87a3586be 100644 --- a/ports/smpeg2/CMakeLists.txt +++ b/ports/smpeg2/CMakeLists.txt @@ -8,6 +8,9 @@ include_directories(${SDL_INCLUDE_DIR}) include_directories(${SDL_INCLUDE_DIR}/SDL2) include_directories(${CMAKE_SOURCE_DIR}) +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() add_definitions(-DNOCONTROLS -DTHREADED_AUDIO) # some c++ code just assumes memset is available diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL index 0b0bee21e..0de1c4700 100644 --- a/ports/smpeg2/CONTROL +++ b/ports/smpeg2/CONTROL @@ -1,4 +1,4 @@ Source: smpeg2
-Version: 2.0.0-3
+Version: 2.0.0-5
Description: SDL MPEG Player Library
Build-Depends: sdl2
diff --git a/ports/smpeg2/portfile.cmake b/ports/smpeg2/portfile.cmake index 7639ca264..a7c6e9b07 100644 --- a/ports/smpeg2/portfile.cmake +++ b/ports/smpeg2/portfile.cmake @@ -1,17 +1,22 @@ include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/smpeg2-2.0.0)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://www.libsdl.org/projects/smpeg/release/smpeg2-2.0.0.tar.gz"
- FILENAME "smpeg2-2.0.0.tar.gz"
- SHA512 80a779d01e7aa76778ef6ceea8041537db9e4b354df413214c4413c875cb98551891cef98fa0f057cc6a3222e4983da9ae65b86bdad2f87f9e2a6751837e2baf)
-vcpkg_extract_source_archive(${ARCHIVE})
+set(VERSION 2.0.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.libsdl.org/projects/smpeg/release/smpeg2-${VERSION}.tar.gz"
+ FILENAME "smpeg2-${VERSION}.tar.gz"
+ SHA512 80a779d01e7aa76778ef6ceea8041537db9e4b354df413214c4413c875cb98551891cef98fa0f057cc6a3222e4983da9ae65b86bdad2f87f9e2a6751837e2baf
+)
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ REF ${VERSION}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/correct-sdl-headers-dir.patch)
+ "001-correct-sdl-headers-dir.patch"
+ "002-use-SDL2-headers.patch"
+ "003-fix-double-ptr-to-int-comparison.patch"
+)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
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/soci/CONTROL b/ports/soci/CONTROL index 41b3d4190..aaab2490e 100644 --- a/ports/soci/CONTROL +++ b/ports/soci/CONTROL @@ -1,4 +1,18 @@ Source: soci -Version: 3.2.3-1 -Build-Depends: sqlite3 +Version: 3.2.3-3 Description: SOCI database access library + +Feature: boost +Build-Depends: boost-date-time, boost-fusion, boost-optional, boost-preprocessor, boost-tuple +Description: Integration with Boost + +Feature: sqlite3 +Build-Depends: sqlite3 +Description: Build sqlite3 backend + +Feature: postgresql +Build-Depends: libpq +Description: Build postgresql backend + +Feature: odbc +Description: Build odbc backend diff --git a/ports/soci/no-define-snprintf.patch b/ports/soci/no-define-snprintf.patch deleted file mode 100644 index ab6db0d1a..000000000 --- a/ports/soci/no-define-snprintf.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/core/soci-platform.h b/src/core/soci-platform.h
-index aa5e4b1..2d8c5c7 100644
---- a/src/core/soci-platform.h
-+++ b/src/core/soci-platform.h
-@@ -24,7 +24,9 @@
- #endif
-
- // Define if you have the snprintf variants.
-+#if _MSC_VER < 1900
- #define snprintf _snprintf
-+#endif
-
- // Define if you have the strtoll and strtoull variants.
- #if _MSC_VER < 1300
diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake index b26355293..1ba4115ae 100644 --- a/ports/soci/portfile.cmake +++ b/ports/soci/portfile.cmake @@ -2,17 +2,32 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SOCI/soci - REF 3.2.3 - SHA512 8c597b37efe82c85e6d951f66cb0f818d2c12cb673914bc7b322bc0a9da676e6c02f221c9104fb06d1b4b02fed4e5a4fb872dd3370b9117f248c3b948faf4fb3 + REF c15b178a44b99ed3ff7fd953837fb97f6314abb7 + SHA512 037c44f29e80b5ec57046606b4672088917d469e9d2254e3e15253e170026cf0fe17e4f79a4b01df22fe7032708ca87354b1560d9880d4d165cdef869c3c6081 HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-define-snprintf.patch" ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOCI_STATIC) +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/src + SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DSOCI_TESTS=OFF @@ -21,24 +36,20 @@ vcpkg_configure_cmake( -DLIBDIR:STRING=lib -DSOCI_STATIC=${SOCI_STATIC} -DSOCI_SHARED=${SOCI_DYNAMIC} + ${_COMPONENT_FLAGS} - -DWITH_SQLITE3=ON - - -DWITH_BOOST=OFF -DWITH_MYSQL=OFF - -DWITH_ODBC=OFF -DWITH_ORACLE=OFF - -DWITH_POSTGRESQL=OFF -DWITH_FIREBIRD=OFF -DWITH_DB2=OFF ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/debug/cmake ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/src/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) file(RENAME ${CURRENT_PACKAGES_DIR}/share/soci/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/soci/copyright) -vcpkg_copy_pdbs()
\ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/socket-io-client/CONTROL b/ports/socket-io-client/CONTROL index 92a5f20c8..bd7b036a8 100644 --- a/ports/socket-io-client/CONTROL +++ b/ports/socket-io-client/CONTROL @@ -1,4 +1,4 @@ Source: socket-io-client -Version: 1.6.1 +Version: 1.6.1-1 Description: C++11 implementation of Socket.IO client Build-Depends: boost, rapidjson, websocketpp diff --git a/ports/socket-io-client/fix-install.patch b/ports/socket-io-client/fix-install.patch new file mode 100644 index 000000000..2c9cc0e82 --- /dev/null +++ b/ports/socket-io-client/fix-install.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8c2fad3..3f322b2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -72,13 +72,11 @@ list(APPEND TARGET_LIBRARIES sioclient_tls)
+ endif()
+
+ install(FILES ${ALL_HEADERS}
+- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/include"
++ DESTINATION include
+ )
+
+ install(TARGETS ${TARGET_LIBRARIES}
+- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/lib/${CMAKE_BUILD_TYPE}"
+-)
+-
+-install(FILES ${Boost_LIBRARIES}
+- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/lib/${CMAKE_BUILD_TYPE}"
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
+ )
diff --git a/ports/socket-io-client/portfile.cmake b/ports/socket-io-client/portfile.cmake index eed7a4d65..c7d33d23d 100644 --- a/ports/socket-io-client/portfile.cmake +++ b/ports/socket-io-client/portfile.cmake @@ -1,27 +1,24 @@ include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO socketio/socket.io-client-cpp REF 1.6.1 SHA512 01c9c172e58a16b25af07c6bde593507792726aca28a9b202ed9531d51cd7e77c7e7d536102e50265d66de96e9708616075902dfdcfc72983758755381bad707 HEAD_REF master + PATCHES fix-install.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/build/include - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN "*.h") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/socket-io-client/copyright COPYONLY) diff --git a/ports/soil2/CMakeLists.txt b/ports/soil2/CMakeLists.txt new file mode 100644 index 000000000..6b5368e47 --- /dev/null +++ b/ports/soil2/CMakeLists.txt @@ -0,0 +1,90 @@ +cmake_minimum_required(VERSION 3.9)
+
+# Create the soil2 project
+project("soil2" LANGUAGES C)
+
+find_package(OpenGL)
+
+# Do we want to install the headers?
+option(INSTALL_HEADERS "Install header files" ON)
+
+# Set the install dir
+set(INSTALL_CMAKE_DIR share/soil2)
+
+# Set the source files to compile
+set(SOIL2_SRC
+ src/SOIL2/etc1_utils.c
+ src/SOIL2/image_DXT.c
+ src/SOIL2/image_helper.c
+ src/SOIL2/SOIL2.c
+)
+
+# Set the soil2 headers
+set(SOIL2_HEADERS
+ src/SOIL2/SOIL2.h
+ src/SOIL2/etc1_utils.h
+ src/SOIL2/image_DXT.h
+ src/SOIL2/image_helper.h
+ src/SOIL2/jo_jpeg.h
+ src/SOIL2/pkm_helper.h
+ src/SOIL2/pvr_helper.h
+ src/SOIL2/stb_image.h
+ src/SOIL2/stb_image_write.h
+ src/SOIL2/stbi_DDS.h
+ src/SOIL2/stbi_ext.h
+ src/SOIL2/stbi_pkm.h
+ src/SOIL2/stbi_pvr.h
+)
+
+# Add the library as a static linkage
+add_library(soil2 STATIC ${SOIL2_SRC})
+
+# The include dir
+target_include_directories(soil2 INTERFACE $<INSTALL_INTERFACE:include>)
+
+# link opengl32
+target_link_libraries(soil2 PRIVATE ${OPENGL_gl_LIBRARY})
+
+# If its msvc mute the secure warnings
+if(MSVC)
+ target_compile_definitions(soil2 PRIVATE _CRT_SECURE_NO_WARNINGS)
+endif(MSVC)
+
+if(INSTALL_HEADERS)
+ # Install the library object
+ install(TARGETS soil2 EXPORT soil2Targets
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ )
+
+ # Install the headers
+ install(FILES ${SOIL2_HEADERS}
+ DESTINATION include/SOIL2/)
+
+ # Prepare for install package files
+ set(SOIL2_VERSION "release-1.11")
+
+ # Export the stuff
+ export(TARGETS soil2 FILE "${PROJECT_BINARY_DIR}/soil2Targets.cmake")
+ export(PACKAGE soil2)
+
+ # Create the soil2Config.cmake and soil2ConfigVersion.cmake
+ configure_file(soil2Config.cmake.in "${PROJECT_BINARY_DIR}/soil2Config.cmake" @ONLY)
+ configure_file(soil2ConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/soil2ConfigVersion.cmake" @ONLY)
+
+ # Install the soil2Config.cmake and soil2ConfigVersion.cmake
+ install(FILES
+ "${PROJECT_BINARY_DIR}/soil2Config.cmake"
+ "${PROJECT_BINARY_DIR}/soil2ConfigVersion.cmake"
+ DESTINATION "${INSTALL_CMAKE_DIR}"
+ )
+
+ # Install the export set for use with the install-tree
+ install(EXPORT soil2Targets DESTINATION "${INSTALL_CMAKE_DIR}")
+else(INSTALL_HEADERS)
+ # Install the library object
+ install(TARGETS soil2 EXPORT soil2
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ )
+endif(INSTALL_HEADERS)
diff --git a/ports/soil2/CONTROL b/ports/soil2/CONTROL new file mode 100644 index 000000000..c53cb77a5 --- /dev/null +++ b/ports/soil2/CONTROL @@ -0,0 +1,3 @@ +Source: soil2
+Version: release-1.11
+Description: Simple OpenGL Image Library 2
\ No newline at end of file diff --git a/ports/soil2/LICENSE b/ports/soil2/LICENSE new file mode 100644 index 000000000..02c410675 --- /dev/null +++ b/ports/soil2/LICENSE @@ -0,0 +1,7 @@ +Copyright 2018 Matrin Lucas Golini
+
+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/soil2/portfile.cmake b/ports/soil2/portfile.cmake new file mode 100644 index 000000000..d54dcd7fc --- /dev/null +++ b/ports/soil2/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions)
+
+# Download the release-1.11 from bitbucket
+vcpkg_from_bitbucket(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO SpartanJ/soil2
+ REF release-1.11
+ SHA512 203c2306fd72e24b9e990cb054f3b1b0391eaf26ed645842fb381971673dab8ea20c2739c8dff1fc11c83d6f66add0ad77ae79d8ff68930e3e1cb003e34f2414
+ HEAD_REF master
+)
+
+# Copy the CMakeLists and LICENSE
+file(
+ COPY
+ ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
+ ${CMAKE_CURRENT_LIST_DIR}/LICENSE
+ ${CMAKE_CURRENT_LIST_DIR}/soil2Config.cmake.in
+ ${CMAKE_CURRENT_LIST_DIR}/soil2ConfigVersion.cmake.in
+ DESTINATION ${SOURCE_PATH}
+)
+
+# Configure the cmake file (we imported)
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
+)
+
+# Run the install
+vcpkg_install_cmake()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soil2 RENAME copyright)
diff --git a/ports/soil2/soil2Config.cmake.in b/ports/soil2/soil2Config.cmake.in new file mode 100644 index 000000000..4d9d8b4ca --- /dev/null +++ b/ports/soil2/soil2Config.cmake.in @@ -0,0 +1,13 @@ +# - Config file for the soil2 package
+# It defines the following variables
+# SOIL2_INCLUDE_DIRS - include directories for SOIL2
+# SOIL2_LIBRARIES - libraries to link against
+
+# Load targets
+get_filename_component(SOIL2_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+include("${SOIL2_CMAKE_DIR}/soil2Targets.cmake")
+
+# Set properties
+get_target_property(SOIL2_INCLUDE_DIRS soil2 INTERFACE_INCLUDE_DIRECTORIES)
+set(SOIL2_LIBRARIES soil2)
+mark_as_advanced(SOIL2_INCLUDE_DIRS SOIL2_LIBRARIES)
diff --git a/ports/soil2/soil2ConfigVersion.cmake.in b/ports/soil2/soil2ConfigVersion.cmake.in new file mode 100644 index 000000000..a6ae96f32 --- /dev/null +++ b/ports/soil2/soil2ConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "@SOIL2_VERSION@")
+
+# Check whether the requested PACKAGE_FIND_VERSION is compatible
+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ if("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()
diff --git a/ports/solid3/CONTROL b/ports/solid3/CONTROL new file mode 100644 index 000000000..7dce173ee --- /dev/null +++ b/ports/solid3/CONTROL @@ -0,0 +1,3 @@ +Source: solid3 +Version: 3.5.8 +Description: Software Library for Interference Detection diff --git a/ports/solid3/disable-examples.patch b/ports/solid3/disable-examples.patch new file mode 100644 index 000000000..5af3b2645 --- /dev/null +++ b/ports/solid3/disable-examples.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0303a8f..be43838 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,7 +97,7 @@ if(UNIX) + endif(UNIX) + + add_subdirectory(src) +-add_subdirectory(examples) ++#add_subdirectory(examples) + #add_subdirectory(doc) + + include(CMakePackageConfigHelpers) diff --git a/ports/solid3/portfile.cmake b/ports/solid3/portfile.cmake new file mode 100644 index 000000000..dc61a5654 --- /dev/null +++ b/ports/solid3/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dtecta/solid3 + REF c53f6bb1eaaafb1cfb305ef71b1c3a2edb4844e6 + SHA512 ae42ba75f5309fecba836e5786d4cb81eeb1240f6fd7c458c6d1329d8e1075021504b927ea0aedb66162deeb79ad674cacb0190385afe456420c0d9184596f1f + HEAD_REF master + PATCHES + disable-examples.patch + potentially-uninitialized-local-pointer-variable.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(DYNAMIC_SOLID OFF) +else() + set(DYNAMIC_SOLID ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDYNAMIC_SOLID=${DYNAMIC_SOLID} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/solid3) + +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/solid3/README.md ${CURRENT_PACKAGES_DIR}/share/solid3/copyright) +file(COPY ${SOURCE_PATH}/LICENSE_GPL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3) +file(COPY ${SOURCE_PATH}/LICENSE_QPL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/solid3/potentially-uninitialized-local-pointer-variable.patch b/ports/solid3/potentially-uninitialized-local-pointer-variable.patch new file mode 100644 index 000000000..baec56793 --- /dev/null +++ b/ports/solid3/potentially-uninitialized-local-pointer-variable.patch @@ -0,0 +1,26 @@ +diff --git a/src/qhull/geom2.c b/src/qhull/geom2.c +index bd58ce1..c4798d2 100644 +--- a/src/qhull/geom2.c ++++ b/src/qhull/geom2.c +@@ -2080,7 +2080,7 @@ boolT qh_sharpnewfacets () { + pointT *qh_voronoi_center (int dim, setT *points) { + pointT *point, **pointp, *point0; + pointT *center= (pointT*)qh_memalloc (qh center_size); +- setT *simplex; ++ setT *simplex= NULL; + int i, j, k, size= qh_setsize(points); + coordT *gmcoord; + realT *diffp, sum2, *sum2row, *sum2p, det, factor; +diff --git a/src/qhull/io.c b/src/qhull/io.c +index 79ca799..41c18bc 100644 +--- a/src/qhull/io.c ++++ b/src/qhull/io.c +@@ -3740,7 +3740,7 @@ coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc) { + coordT *points, *coords, *infinity= NULL; + realT paraboloid, maxboloid= -REALmax, value; + realT *coordp= NULL, *offsetp= NULL, *normalp= NULL; +- char *s, *t, firstline[qh_MAXfirst+1]; ++ char *s= NULL, *t, firstline[qh_MAXfirst+1]; + int diminput=0, numinput=0, dimfeasible= 0, newnum, k, tempi; + int firsttext=0, firstshort=0, firstlong=0, firstpoint=0; + int tokcount= 0, linecount=0, maxcount, coordcount=0; diff --git a/ports/spaceland/CONTROL b/ports/spaceland/CONTROL index 2baf34633..4319a9797 100644 --- a/ports/spaceland/CONTROL +++ b/ports/spaceland/CONTROL @@ -1,4 +1,4 @@ Source: spaceland
-Version: 7.8.2-0
+Version: 7.8.2-1
Description: Spaceland Lib (sl) is a suite for geometric computation, specifically adapted to OpenGL.
Build-Depends: zlib
diff --git a/ports/spaceland/portfile.cmake b/ports/spaceland/portfile.cmake index d22276d60..5e84296cd 100644 --- a/ports/spaceland/portfile.cmake +++ b/ports/spaceland/portfile.cmake @@ -17,10 +17,11 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
- -DSL_TEST=OFF
- -DSL_INSTALL_SLFIND_MODULE=OFF
- OPTIONS_DEBUG
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DSL_TEST=OFF
+ -DSL_INSTALL_SLFIND_MODULE=OFF
+ OPTIONS_DEBUG
-DSL_TEST=OFF
-DSL_INSTALL_SLFIND_MODULE=OFF
)
diff --git a/ports/spirv-headers/CONTROL b/ports/spirv-headers/CONTROL new file mode 100644 index 000000000..f1b0f7908 --- /dev/null +++ b/ports/spirv-headers/CONTROL @@ -0,0 +1,3 @@ +Source: spirv-headers +Version: 2019-03-05 +Description: Machine-readable files for the SPIR-V Registry diff --git a/ports/spirv-headers/portfile.cmake b/ports/spirv-headers/portfile.cmake new file mode 100644 index 000000000..f2c55280d --- /dev/null +++ b/ports/spirv-headers/portfile.cmake @@ -0,0 +1,18 @@ +# header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/SPIRV-Headers + REF 03a081524afabdde274d885880c2fef213e46a59 + SHA512 27f0a4b5efbe2931c0ff5d50e5fb5bd78fe0a735ad48a08db72c8914f2de05f5d5c507134e0a090bb5a7d88e2f8c1a0bdbf51a0bc4b9fe3bf372da7000ca0b98 + HEAD_REF master +) + +# This must be spirv as other spirv packages expect it there. +# Copy header files +file(COPY ${SOURCE_PATH}/include/spirv/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/spirv) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirv-headers) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/spirv-headers/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-headers/copyright) diff --git a/ports/spirv-tools/CMake-targets.patch b/ports/spirv-tools/CMake-targets.patch new file mode 100644 index 000000000..6b754e16b --- /dev/null +++ b/ports/spirv-tools/CMake-targets.patch @@ -0,0 +1,119 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 2d7d7ca..bf77be7 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -327,31 +327,41 @@ set_source_files_properties( + add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES}) + spvtools_default_compile_options(${SPIRV_TOOLS}) + target_include_directories(${SPIRV_TOOLS} +- PUBLIC ${spirv-tools_SOURCE_DIR}/include ++ PUBLIC "$<BUILD_INTERFACE:${spirv-tools_SOURCE_DIR}/include>" + PRIVATE ${spirv-tools_BINARY_DIR} + PRIVATE ${SPIRV_HEADER_INCLUDE_DIR} + ) + set_property(TARGET ${SPIRV_TOOLS} PROPERTY FOLDER "SPIRV-Tools libraries") + spvtools_check_symbol_exports(${SPIRV_TOOLS}) + +-add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES}) +-spvtools_default_compile_options(${SPIRV_TOOLS}-shared) +-target_include_directories(${SPIRV_TOOLS}-shared +- PUBLIC ${spirv-tools_SOURCE_DIR}/include +- PRIVATE ${spirv-tools_BINARY_DIR} +- PRIVATE ${SPIRV_HEADER_INCLUDE_DIR} +- ) +-set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) +-set_property(TARGET ${SPIRV_TOOLS}-shared PROPERTY FOLDER "SPIRV-Tools libraries") +-spvtools_check_symbol_exports(${SPIRV_TOOLS}-shared) +-target_compile_definitions(${SPIRV_TOOLS}-shared +- PRIVATE SPIRV_TOOLS_IMPLEMENTATION +- PUBLIC SPIRV_TOOLS_SHAREDLIB +-) ++# add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES}) ++# spvtools_default_compile_options(${SPIRV_TOOLS}-shared) ++# target_include_directories(${SPIRV_TOOLS}-shared ++# PUBLIC ${spirv-tools_SOURCE_DIR}/include ++# PRIVATE ${spirv-tools_BINARY_DIR} ++# PRIVATE ${SPIRV_HEADER_INCLUDE_DIR} ++# ) ++# set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) ++# set_property(TARGET ${SPIRV_TOOLS}-shared PROPERTY FOLDER "SPIRV-Tools libraries") ++# spvtools_check_symbol_exports(${SPIRV_TOOLS}-shared) ++# target_compile_definitions(${SPIRV_TOOLS}-shared ++# PRIVATE SPIRV_TOOLS_IMPLEMENTATION ++# PUBLIC SPIRV_TOOLS_SHAREDLIB ++# ) + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- install(TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared ++ install(TARGETS ${SPIRV_TOOLS} EXPORT spirv-tools-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export( ++ TARGETS ${SPIRV_TOOLS} ++ NAMESPACE spirv-tools:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-config.cmake" ++ ) ++ install( ++ EXPORT spirv-tools-config ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/spirv-tools" ++ NAMESPACE spirv-tools:: ++ ) + endif(ENABLE_SPIRV_TOOLS_INSTALL) +diff --git a/source/link/CMakeLists.txt b/source/link/CMakeLists.txt +index 8ca4df3..ac0aa62 100644 +--- a/source/link/CMakeLists.txt ++++ b/source/link/CMakeLists.txt +@@ -17,7 +17,7 @@ add_library(SPIRV-Tools-link + + spvtools_default_compile_options(SPIRV-Tools-link) + target_include_directories(SPIRV-Tools-link +- PUBLIC ${spirv-tools_SOURCE_DIR}/include ++ PUBLIC "$<BUILD_INTERFACE:${spirv-tools_SOURCE_DIR}/include>" + PUBLIC ${SPIRV_HEADER_INCLUDE_DIR} + PRIVATE ${spirv-tools_BINARY_DIR} + ) +@@ -29,8 +29,13 @@ set_property(TARGET SPIRV-Tools-link PROPERTY FOLDER "SPIRV-Tools libraries") + spvtools_check_symbol_exports(SPIRV-Tools-link) + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- install(TARGETS SPIRV-Tools-link ++ install(TARGETS SPIRV-Tools-link EXPORT spirv-tools-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export( ++ TARGETS ${SPIRV_TOOLS}-link ++ NAMESPACE spirv-tools:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-link-config.cmake" ++ ) + endif(ENABLE_SPIRV_TOOLS_INSTALL) +diff --git a/source/opt/CMakeLists.txt b/source/opt/CMakeLists.txt +index 854c950..fc91539 100644 +--- a/source/opt/CMakeLists.txt ++++ b/source/opt/CMakeLists.txt +@@ -159,7 +159,7 @@ add_library(SPIRV-Tools-opt + + spvtools_default_compile_options(SPIRV-Tools-opt) + target_include_directories(SPIRV-Tools-opt +- PUBLIC ${spirv-tools_SOURCE_DIR}/include ++ PUBLIC "$<BUILD_INTERFACE:${spirv-tools_SOURCE_DIR}/include>" + PUBLIC ${SPIRV_HEADER_INCLUDE_DIR} + PRIVATE ${spirv-tools_BINARY_DIR} + ) +@@ -171,9 +171,14 @@ set_property(TARGET SPIRV-Tools-opt PROPERTY FOLDER "SPIRV-Tools libraries") + spvtools_check_symbol_exports(SPIRV-Tools-opt) + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- install(TARGETS SPIRV-Tools-opt ++ install(TARGETS SPIRV-Tools-opt EXPORT spirv-tools-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ export( ++ TARGETS ${SPIRV_TOOLS}-opt ++ NAMESPACE spirv-tools:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-opt-config.cmake" ++ ) + endif(ENABLE_SPIRV_TOOLS_INSTALL) + diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index fb75a1280..38995e356 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,3 +1,4 @@ Source: spirv-tools
-Version: 2018.1-1
+Version: 2018.1-2
Description: API and commands for processing SPIR-V modules
+Build-Depends: spirv-headers
diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index bbfdbf242..3011aa396 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -8,14 +8,8 @@ vcpkg_from_github( REF v2018.1 SHA512 0637c413dafd931e8222f9bf70a024f8b64116f0300c7732b86bcaff321188a0e746f79c1385ae23a7692e83194586b57692960d5be607fb2d7960731b6cd63f HEAD_REF master -) - -vcpkg_from_github( - OUT_SOURCE_PATH SPIRV_HEADERS_PATH - REPO KhronosGroup/SPIRV-Headers - REF bd4c092be34081d88ec8342b1a4d9f77bcce4cac - SHA512 e0bc7b8ea73bef762eff60d83104ca93c70e06c7b6e66f73c931eb9ec51227e0b64c3169fcccbffa311acf714138300104dd5e51cdfc846ed7961debc1f9cceb - HEAD_REF master + PATCHES + CMake-targets.patch ) vcpkg_find_acquire_program(PYTHON3) @@ -26,13 +20,14 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSPIRV-Headers_SOURCE_DIR=${SPIRV_HEADERS_PATH} + -DSPIRV-Headers_SOURCE_DIR=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET} -DSPIRV_WERROR=OFF ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*${CMAKE_EXECUTABLE_SUFFIX}") file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) file(REMOVE ${EXES}) @@ -41,3 +36,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bi # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirv-tools) file(RENAME ${CURRENT_PACKAGES_DIR}/share/spirv-tools/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-tools/copyright) + +vcpkg_test_cmake(PACKAGE_NAME spirv-tools) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index 38a874439..ab5f103fd 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.26.0 +Version: 3.27.2 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Feature: tool diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index d2a078d29..789cfe948 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions)
-set(SQLITE_VERSION 3260000)
-set(SQLITE_HASH ba089abd16857a65fc6cf26558a0d3e6f20c278b8df451b357eea5154f8ccd5645c9cfdb30d0fd4fe64f19dd2f876a6cc4a28455b7b013770c2ce9a607171107)
+set(SQLITE_VERSION 3270200)
+set(SQLITE_HASH f84a6a3101c989164f17b85a6c2674ae2728a75d70daf5e33627a6eaa399adaf763deb968d891ad0660f1ebe660d27fbd55ace379d807f3bb8af4e95c01b68c4)
vcpkg_download_distfile(ARCHIVE
- URLS "https://sqlite.org/2018/sqlite-amalgamation-${SQLITE_VERSION}.zip"
+ URLS "https://sqlite.org/2019/sqlite-amalgamation-${SQLITE_VERSION}.zip"
FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip"
SHA512 ${SQLITE_HASH}
)
diff --git a/ports/sqlitecpp/0001-Find-external-sqlite3.patch b/ports/sqlitecpp/0001-Find-external-sqlite3.patch index ef6700e14..f9473ff53 100644 --- a/ports/sqlitecpp/0001-Find-external-sqlite3.patch +++ b/ports/sqlitecpp/0001-Find-external-sqlite3.patch @@ -16,7 +16,7 @@ index 4a3e492..f7e22a5 100644 # TODO NOCOMMIT -#find_package(sqlite3) -+find_package(sqlite3 REQUIRED) ++find_package(sqlite3 CONFIG) +target_link_libraries(SQLiteCpp PRIVATE sqlite3) #if(sqlite3_VERSION VERSION_LESS "3.19") # set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT") diff --git a/ports/sqlitecpp/CONTROL b/ports/sqlitecpp/CONTROL index 133ac6703..119c94091 100644 --- a/ports/sqlitecpp/CONTROL +++ b/ports/sqlitecpp/CONTROL @@ -1,4 +1,4 @@ Source: sqlitecpp -Version: 2.2 +Version: 2.2-1 Build-Depends: sqlite3 Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper. diff --git a/ports/sqlitecpp/portfile.cmake b/ports/sqlitecpp/portfile.cmake index 2af9c8cfa..a7e9a4267 100644 --- a/ports/sqlitecpp/portfile.cmake +++ b/ports/sqlitecpp/portfile.cmake @@ -23,6 +23,7 @@ vcpkg_configure_cmake( -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_INTERNAL_SQLITE=OFF -DSQLITE_ENABLE_COLUMN_METADATA=OFF + -DSQLITECPP_INTERNAL_SQLITE=OFF ) vcpkg_install_cmake() diff --git a/ports/sqlpp11-connector-mysql/CONTROL b/ports/sqlpp11-connector-mysql/CONTROL index 690e9d1ab..e56275137 100644 --- a/ports/sqlpp11-connector-mysql/CONTROL +++ b/ports/sqlpp11-connector-mysql/CONTROL @@ -1,4 +1,4 @@ Source: sqlpp11-connector-mysql
-Version: 0.25
+Version: 0.25-1
Description: A C++ wrapper for MySQL meant to be used in combination with sqlpp11.
-Build-Depends: date, libmariadb, sqlpp11
\ No newline at end of file +Build-Depends: date, libmariadb, sqlpp11
diff --git a/ports/sqlpp11-connector-mysql/portfile.cmake b/ports/sqlpp11-connector-mysql/portfile.cmake index 37b8ca147..fbaaebaf1 100644 --- a/ports/sqlpp11-connector-mysql/portfile.cmake +++ b/ports/sqlpp11-connector-mysql/portfile.cmake @@ -22,5 +22,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11-connector-mysql RENAME copyright)
diff --git a/ports/sqlpp11-connector-sqlite3/CONTROL b/ports/sqlpp11-connector-sqlite3/CONTROL index 35a65250b..25e680eda 100644 --- a/ports/sqlpp11-connector-sqlite3/CONTROL +++ b/ports/sqlpp11-connector-sqlite3/CONTROL @@ -1,4 +1,4 @@ Source: sqlpp11-connector-sqlite3
-Version: 0.29
+Version: 0.29-1
Description: A C++ wrapper for sqlite3 meant to be used in combination with sqlpp11.
-Build-Depends: date, sqlite3, sqlpp11
\ No newline at end of file +Build-Depends: date, sqlite3, sqlpp11
diff --git a/ports/sqlpp11-connector-sqlite3/portfile.cmake b/ports/sqlpp11-connector-sqlite3/portfile.cmake index 6937abff2..735912a86 100644 --- a/ports/sqlpp11-connector-sqlite3/portfile.cmake +++ b/ports/sqlpp11-connector-sqlite3/portfile.cmake @@ -20,5 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11-connector-sqlite3 RENAME copyright)
diff --git a/ports/sqlpp11/CONTROL b/ports/sqlpp11/CONTROL index 7c75d17d9..bd5101f8f 100644 --- a/ports/sqlpp11/CONTROL +++ b/ports/sqlpp11/CONTROL @@ -1,4 +1,4 @@ Source: sqlpp11
-Version: 0.57
+Version: 0.57-1
Description: A type safe embedded domain specific language for SQL queries and results in C++.
-Build-Depends: date
\ No newline at end of file +Build-Depends: date
diff --git a/ports/sqlpp11/portfile.cmake b/ports/sqlpp11/portfile.cmake index 61b930da5..be99572e3 100644 --- a/ports/sqlpp11/portfile.cmake +++ b/ports/sqlpp11/portfile.cmake @@ -24,5 +24,9 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) # Delete redundant and unnecessary directories
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+# Move python script from bin directory
+file(COPY ${CURRENT_PACKAGES_DIR}/bin/sqlpp11-ddl2cpp DESTINATION ${CURRENT_PACKAGES_DIR}/scripts)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/)
+
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11 RENAME copyright)
diff --git a/ports/szip/CONTROL b/ports/szip/CONTROL index ca2093d66..79a99911d 100644 --- a/ports/szip/CONTROL +++ b/ports/szip/CONTROL @@ -1,3 +1,3 @@ Source: szip -Version: 2.1.1-1 +Version: 2.1.1-3 Description: Szip compression software, providing lossless compression of scientific data diff --git a/ports/szip/default-component-shared.patch b/ports/szip/default-component-shared.patch deleted file mode 100644 index 3db94c503..000000000 --- a/ports/szip/default-component-shared.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d4163a0..4e2a312 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -267,6 +267,14 @@ set (SZIP_VERSION_MAJOR ${SZIP_PACKAGE_VERSION_MAJOR}) - set (SZIP_VERSION_MINOR ${SZIP_PACKAGE_VERSION_MINOR}) - - #----------------------------------------------------------------------------- -+# Set default component -+#----------------------------------------------------------------------------- -+set (SZIP_DEFAULT_COMPONENT static) -+if (BUILD_SHARED_LIBS) -+ set (SZIP_DEFAULT_COMPONENT shared) -+endif () -+ -+#----------------------------------------------------------------------------- - # Configure the szip-config.cmake file for the build directory - #----------------------------------------------------------------------------- - set(INCLUDE_INSTALL_DIR ${SZIP_INSTALL_INCLUDE_DIR} ) -diff --git a/config/cmake/szip-config.cmake.in b/config/cmake/szip-config.cmake.in -index 4a7fec7..ad54287 100644 ---- a/config/cmake/szip-config.cmake.in -+++ b/config/cmake/szip-config.cmake.in -@@ -37,10 +37,10 @@ if (NOT TARGET "@SZIP_PACKAGE@") - include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) - endif () - --# Handle default component(static) : -+# Handle default component(@SZIP_DEFAULT_COMPONENT@) : - if (NOT ${SZIP_PACKAGE_NAME}_FIND_COMPONENTS) -- set (${SZIP_PACKAGE_NAME}_FIND_COMPONENTS static) -- set (${SZIP_PACKAGE_NAME}_FIND_REQUIRED_static true) -+ set (${SZIP_PACKAGE_NAME}_FIND_COMPONENTS @SZIP_DEFAULT_COMPONENT@) -+ set (${SZIP_PACKAGE_NAME}_FIND_REQUIRED_@SZIP_DEFAULT_COMPONENT@ true) - endif () - - # Handle requested components: diff --git a/ports/szip/disable-static-lib-in-shared-build.patch b/ports/szip/disable-static-lib-in-shared-build.patch deleted file mode 100644 index 02110cb2a..000000000 --- a/ports/szip/disable-static-lib-in-shared-build.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/src/CMakeLists.txt Fri Feb 03 20:42:43 2017 -+++ b/src/CMakeLists.txt Wed Jan 03 11:42:51 2018 -@@ -22,20 +22,22 @@ - ${SZIP_SRC_SOURCE_DIR}/szlib.h - ) - --add_library (${SZIP_LIB_TARGET} STATIC ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS}) --#set_target_properties (${SZIP_LIB_TARGET} --# PROPERTIES --# LINK_FLAGS "-version-info 2:0:0" --#) --TARGET_C_PROPERTIES (${SZIP_LIB_TARGET} STATIC " " " ") --target_link_libraries (${SZIP_LIB_TARGET} ${LINK_LIBS}) --set_target_properties(${SZIP_LIB_TARGET} PROPERTIES -- PUBLIC_HEADER "${SZIP_PUBLIC_HEADERS}" -- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" --) --set_global_variable (SZIP_LIBRARIES_TO_EXPORT ${SZIP_LIB_TARGET}) --SZIP_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC) --set (install_targets ${SZIP_LIB_TARGET}) -+if (NOT BUILD_SHARED_LIBS) -+ add_library (${SZIP_LIB_TARGET} STATIC ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS}) -+ #set_target_properties (${SZIP_LIB_TARGET} -+ # PROPERTIES -+ # LINK_FLAGS "-version-info 2:0:0" -+ #) -+ TARGET_C_PROPERTIES (${SZIP_LIB_TARGET} STATIC " " " ") -+ target_link_libraries (${SZIP_LIB_TARGET} ${LINK_LIBS}) -+ set_target_properties(${SZIP_LIB_TARGET} PROPERTIES -+ PUBLIC_HEADER "${SZIP_PUBLIC_HEADERS}" -+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" -+ ) -+ set_global_variable (SZIP_LIBRARIES_TO_EXPORT ${SZIP_LIB_TARGET}) -+ SZIP_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC) -+ set (install_targets ${SZIP_LIB_TARGET}) -+endif() - - if (BUILD_SHARED_LIBS) - add_library (${SZIP_LIBSH_TARGET} SHARED ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS}) -@@ -62,8 +64,9 @@ - if (SZIP_EXPORTED_TARGETS) - if (BUILD_SHARED_LIBS) - INSTALL_TARGET_PDB (${SZIP_LIBSH_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) -+ else() -+ INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) - endif (BUILD_SHARED_LIBS) -- INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) - - install ( - TARGETS diff --git a/ports/szip/portfile.cmake b/ports/szip/portfile.cmake index c98f0e025..fa10d58a2 100644 --- a/ports/szip/portfile.cmake +++ b/ports/szip/portfile.cmake @@ -1,19 +1,18 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/szip-2.1.1) +#set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/szip-2.1.1) vcpkg_download_distfile(ARCHIVE URLS "https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz" FILENAME "szip-2.1.1.tar.gz" SHA512 ada6406efb096cd8a2daf8f9217fe9111a96dcae87e29d1c31f58ddd2ad2aa7bac03f23c7205dc9360f3b62d259461759330c7189ef0c2fe559704b1ea9d40dd ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF szip-2.1.1 PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disable-static-lib-in-shared-build.patch - ${CMAKE_CURRENT_LIST_DIR}/default-component-shared.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-szip-config-to-set-szip-found.patch + fix-szip-config-to-set-szip-found.patch # This patch is required for linux on osx; It does not matter for windows ) vcpkg_configure_cmake( diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index 22956077e..048f711e0 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -1,3 +1,3 @@ Source: tbb -Version: 2019_U3-1 +Version: 2019_U5 Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 14d70deb5..a0895442d 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -10,9 +10,9 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO 01org/tbb - REF 2019_U3 - SHA512 b6eaaea95658c4d49e6894811eb9ca38541820462bf1b606db16ca697af4329a94627d8ae01a73f2b07567280865b3ea92ca0ce091fa95dd3551cebbdd35976d - HEAD_REF tbb_2018 + REF 2019_U5 + SHA512 227b12e3864fbb922ddbc99700bf94d7d8897d62e2056bf3beb608efacf3ca785dd416b94ad65b421b6c9fc11caff688147b5fbe400c51e98678cee5dc04f274 + HEAD_REF tbb_2019 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -25,7 +25,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor vcpkg_install_cmake() - # Settings for TBBConfigForSource.cmake.in + # Settings for TBBConfigInternal.cmake.in set(TBB_LIB_EXT a) set(TBB_LIB_PREFIX lib) else() @@ -43,7 +43,7 @@ else() RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} ) - # Settings for TBBConfigForSource.cmake.in + # Settings for TBBConfigInternal.cmake.in set(TBB_LIB_EXT lib) set(TBB_LIB_PREFIX) endif() @@ -53,12 +53,13 @@ file(COPY ${SOURCE_PATH}/include/serial DESTINATION ${CURRENT_PACKAGES_DIR}/include) -# Settings for TBBConfigForSource.cmake.in +# Settings for TBBConfigInternal.cmake.in if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc) else() set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc tbbmalloc_proxy) endif() + file(READ "${SOURCE_PATH}/include/tbb/tbb_stddef.h" _tbb_stddef) string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_stddef}") string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_stddef}") @@ -68,7 +69,7 @@ set(TBB_RELEASE_DIR "\${_tbb_root}/lib") set(TBB_DEBUG_DIR "\${_tbb_root}/debug/lib") configure_file( - ${SOURCE_PATH}/cmake/templates/TBBConfigForSource.cmake.in + ${SOURCE_PATH}/cmake/templates/TBBConfigInternal.cmake.in ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake @ONLY ) @@ -79,6 +80,18 @@ string(REPLACE _contents "${_contents}" ) +string(REPLACE + "set(_tbb_release_lib \"/\${_tbb_component}.lib\")" + "set(_tbb_release_lib \"\${_tbb_root}/lib/\${_tbb_component}.lib\")" + _contents + "${_contents}" +) +string(REPLACE + "set(_tbb_debug_lib \"/\${_tbb_component}_debug.lib\")" + "set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/\${_tbb_component}_debug.lib\")" + _contents + "${_contents}" +) string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}") @@ -87,3 +100,4 @@ file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${C file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright) vcpkg_test_cmake(PACKAGE_NAME TBB) +# diff --git a/ports/tgui/CONTROL b/ports/tgui/CONTROL new file mode 100644 index 000000000..b69819c8d --- /dev/null +++ b/ports/tgui/CONTROL @@ -0,0 +1,7 @@ +Source: tgui
+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 new file mode 100644 index 000000000..d0f400eca --- /dev/null +++ b/ports/tgui/portfile.cmake @@ -0,0 +1,63 @@ +include(vcpkg_common_functions)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/texus/TGUI/archive/v0.8.4.tar.gz"
+ FILENAME "tgui-0.8.4.zip"
+ SHA512 52d38419a1650cbde517a5022e3b719b9fb4c3b336533c35aa839757f929b56e477d397d735170ba8be434afedc4c00bfcd4898d97da66015776b5f22bb04ea0
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ 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)
+
+# 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
+ OPTIONS
+ -DTGUI_BUILD_GUI_BUILDER=${BUILD_GUI_BUILDER}
+ -DTGUI_MISC_INSTALL_PREFIX=${TGUI_SHARE_PATH}
+ -DTGUI_SHARED_LIBS=${TGUI_SHARED_LIBS}
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/TGUI)
+vcpkg_copy_pdbs()
+
+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")
diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 2180e3932..039218167 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2019-01-30 +Version: 2019-03-29 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008. Thrift became an Apache TLP in October, 2010. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index cd0faf0f1..284f0b344 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 2ec93c8a2da2531755078ab6d5a65a96e26cf4c2 - SHA512 6e6787e04ec963516be669511a18e128e5aff19bf33c70b37d9488b4abf42c20de75c8e72d60a81e679dea2faa8abe526deb71a6fc8ef7ba27216990be07c22c + REF 7b94dd422117ffb6c646d1217c643efb80a8cf45 + SHA512 56b1810031b26ccc921cc39a2511fbee9af165c618b5ecb72d8f3dbdf9ae1d05b8adfe59e6f7ece8be837ca69a58e279997dd76c93e28c96607f18e2badcfbd1 HEAD_REF master ) @@ -42,6 +42,9 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/thrift") + file(GLOB COMPILER "${CURRENT_PACKAGES_DIR}/bin/thrift*") if(COMPILER) file(COPY ${COMPILER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift) diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index 9723ea8b8..97d25bcdb 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,4 +1,4 @@ Source: tiff -Version: 4.0.10-2 +Version: 4.0.10-4 Build-Depends: zlib, libjpeg-turbo, liblzma (!uwp) Description: A library that supports the manipulation of TIFF image files diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index d51d772ca..3a0ee0b8a 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -2,6 +2,8 @@ include(vcpkg_common_functions) set(LIBTIFF_VERSION 4.0.10) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz" FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz" diff --git a/ports/tiff/usage b/ports/tiff/usage index d5312603a..6b2f0f89e 100644 --- a/ports/tiff/usage +++ b/ports/tiff/usage @@ -1,4 +1,4 @@ -The package tiff is compatible with built-in CMake targets:
-
- find_package(TIFF REQUIRED)
- target_link_libraries(main PRIVATE TIFF::TIFF)
+The package tiff is compatible with built-in CMake targets: + + find_package(TIFF REQUIRED) + target_link_libraries(main PRIVATE TIFF::TIFF) diff --git a/ports/tiff/vcpkg-cmake-wrapper.cmake b/ports/tiff/vcpkg-cmake-wrapper.cmake index 5ccb0e7ff..c950b512b 100644 --- a/ports/tiff/vcpkg-cmake-wrapper.cmake +++ b/ports/tiff/vcpkg-cmake-wrapper.cmake @@ -1,20 +1,17 @@ -_find_package(${ARGS})
-
-if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
- find_package(LibLZMA)
- find_package(JPEG)
- find_package(ZLIB)
-
- if(TARGET TIFF::TIFF)
- set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES} JPEG::JPEG ZLIB::ZLIB)
- if(UNIX)
- set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m)
- endif()
- endif()
- if(TIFF_LIBRARIES)
- list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES})
- if(UNIX)
- list(APPEND TIFF_LIBRARIES m)
- endif()
- endif()
-endif()
+_find_package(${ARGS}) + +find_package(LibLZMA) +find_package(JPEG) +find_package(ZLIB) +if(TARGET TIFF::TIFF) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES} JPEG::JPEG ZLIB::ZLIB) + if(UNIX) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m) + endif() +endif() +if(TIFF_LIBRARIES) + list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) + if(UNIX) + list(APPEND TIFF_LIBRARIES m) + endif() +endif() diff --git a/ports/tiny-process-library/CONTROL b/ports/tiny-process-library/CONTROL new file mode 100644 index 000000000..938277aa9 --- /dev/null +++ b/ports/tiny-process-library/CONTROL @@ -0,0 +1,3 @@ +Source: tiny-process-library
+Version: 2018-12-06
+Description: A small platform independent library
diff --git a/ports/tiny-process-library/fix-cmake.patch b/ports/tiny-process-library/fix-cmake.patch new file mode 100644 index 000000000..c8a264622 --- /dev/null +++ b/ports/tiny-process-library/fix-cmake.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ace2879..15c7f44 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8) + project(tiny-process-library) + + if(MSVC) ++ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + add_definitions(/D_CRT_SECURE_NO_WARNINGS) + else() + add_compile_options(-std=c++11 -Wall -Wextra) +@@ -23,7 +24,7 @@ endif() + find_package(Threads REQUIRED) + + target_link_libraries(tiny-process-library ${CMAKE_THREAD_LIBS_INIT}) +-target_include_directories(tiny-process-library PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) ++target_include_directories(tiny-process-library PUBLIC $<INSTALL_INTERFACE:include>) + + option(BUILD_TESTING OFF) + +@@ -34,7 +35,17 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + + set(BUILD_TESTING ON) + +- install(TARGETS tiny-process-library DESTINATION lib) ++ install(TARGETS tiny-process-library ++ EXPORT ${PROJECT_NAME}-config ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) ++ install(EXPORT ${PROJECT_NAME}-config ++ FILE unofficial-${PROJECT_NAME}-config.cmake ++ NAMESPACE unofficial::${PROJECT_NAME}:: ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME} ++ ) + install(FILES process.hpp DESTINATION include) + endif() + diff --git a/ports/tiny-process-library/portfile.cmake b/ports/tiny-process-library/portfile.cmake new file mode 100644 index 000000000..bcab0c4a4 --- /dev/null +++ b/ports/tiny-process-library/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_gitlab(
+ GITLAB_URL https://gitlab.com
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO eidheim/tiny-process-library
+ REF 273270d0f9d0cf4a8282fadd589060a7b0eab425
+ SHA512 f99e586ee6fa9b7c0a3633b59e0e099becba48e2ef375268eeecd9099a233e3b528ba373edc74983d49934ff10f99884fdeb594ff546054fc91d1341d0e86c0a
+ HEAD_REF master
+ PATCHES
+ fix-cmake.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_TESTING=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(
+ CONFIG_PATH lib/cmake/unofficial-${PORT}
+ TARGET_PATH share/unofficial-${PORT}
+)
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/debug/share
+)
+
+# 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/tinyspline/cmake.patch b/ports/tinyspline/001-do-not-treat-warnings-as-errors.patch index 593ed9012..576174891 100644 --- a/ports/tinyspline/cmake.patch +++ b/ports/tinyspline/001-do-not-treat-warnings-as-errors.patch @@ -1,16 +1,18 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 02dfb83..030a0b5 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -386,11 +386,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-
- # TINYSPLINE_LIBRARY_C_FLAGS
- set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /Wall")
-- set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /WX")
-
- # TINYSPLINE_LIBRARY_CXX_FLAGS
- set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /Wall")
-- set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /WX")
- set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4514")
- set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4710")
- set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4350")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 02dfb83..52f5125 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -386,11 +386,11 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + + # TINYSPLINE_LIBRARY_C_FLAGS + set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /Wall") +- set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /WX") ++ # set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /WX") + + # TINYSPLINE_LIBRARY_CXX_FLAGS + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /Wall") +- set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /WX") ++ # set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /WX") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4514") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4710") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4350") diff --git a/ports/tinyspline/CONTROL b/ports/tinyspline/CONTROL index ef83e311b..f1f4739c9 100644 --- a/ports/tinyspline/CONTROL +++ b/ports/tinyspline/CONTROL @@ -1,3 +1,3 @@ Source: tinyspline
-Version: 0.2.0-1
+Version: 0.2.0-3
Description: Library for NURBS, B-Splines, and B?zier curves, allowing you to handle splines with ease
diff --git a/ports/tinyspline/portfile.cmake b/ports/tinyspline/portfile.cmake index a290cf3a7..5d202b7ca 100644 --- a/ports/tinyspline/portfile.cmake +++ b/ports/tinyspline/portfile.cmake @@ -1,4 +1,5 @@ include(vcpkg_common_functions)
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO msteinbeck/tinyspline
@@ -6,9 +7,10 @@ vcpkg_from_github( SHA512 50cf4927b311eeca6de7954f1b8d585cbf71355f5e5b0aac2f92f5f4ba37986df16eb3251f94a2304d27dab27d4f6b838b410f53e30de28bab53facf194eb640
HEAD_REF master
PATCHES
- cmake.patch
+ "001-do-not-treat-warnings-as-errors.patch"
)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/src
PREFER_NINJA
diff --git a/ports/tinyxml/portfile.cmake b/ports/tinyxml/portfile.cmake index 1d4e6131b..2936a4d57 100644 --- a/ports/tinyxml/portfile.cmake +++ b/ports/tinyxml/portfile.cmake @@ -28,3 +28,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/tinyxml-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml) diff --git a/ports/tinyxml/tinyxml-config.cmake b/ports/tinyxml/tinyxml-config.cmake new file mode 100644 index 000000000..1bdc5ad7f --- /dev/null +++ b/ports/tinyxml/tinyxml-config.cmake @@ -0,0 +1,19 @@ +if (tinyxml_CONFIG_INCLUDED)
+ return()
+endif()
+set(tinyxml_CONFIG_INCLUDED TRUE)
+
+set(tinyxml_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include")
+
+foreach(lib tinyxml)
+ set(onelib "${lib}-NOTFOUND")
+ find_library(onelib ${lib}
+ PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib"
+ NO_DEFAULT_PATH
+ )
+ if(NOT onelib)
+ message(FATAL_ERROR "Library '${lib}' in package tinyxml is not installed properly")
+ endif()
+ list(APPEND tinyxml_LIBRARIES ${onelib})
+endforeach()
+
diff --git a/ports/tmxparser/CONTROL b/ports/tmxparser/CONTROL index 66132e4fd..7a3e3e2f8 100644 --- a/ports/tmxparser/CONTROL +++ b/ports/tmxparser/CONTROL @@ -1,4 +1,4 @@ Source: tmxparser
-Version: 2.1.0-1
+Version: 2.1.0-2
Description: C++11 library for parsing the maps generated by the Map Editor called Tiled.
Build-Depends: zlib, tinyxml2
diff --git a/ports/urdfdom-headers/portfile.cmake b/ports/urdfdom-headers/portfile.cmake index 7d11936ec..4a9d3d8c1 100644 --- a/ports/urdfdom-headers/portfile.cmake +++ b/ports/urdfdom-headers/portfile.cmake @@ -15,10 +15,18 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/urdfdom_headers) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/urdfdom_headers/cmake" TARGET_PATH share/urdfdom_headers) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/urdfdom_headers) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom_headers) +endif() # The config files for this project use underscore -file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers) +if(EXISTS ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) diff --git a/ports/urdfdom/portfile.cmake b/ports/urdfdom/portfile.cmake index bf0568f8c..530b586e5 100644 --- a/ports/urdfdom/portfile.cmake +++ b/ports/urdfdom/portfile.cmake @@ -28,7 +28,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/urdfdom) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/urdfdom/cmake" TARGET_PATH share/urdfdom) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/urdfdom) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/usbmuxd/CONTROL b/ports/usbmuxd/CONTROL index 6d7978bad..38e2b4b5b 100644 --- a/ports/usbmuxd/CONTROL +++ b/ports/usbmuxd/CONTROL @@ -1,4 +1,4 @@ Source: usbmuxd
-Version: 1.1.1.133-1
+Version: 1.1.1.133-2
Description: A socket daemon to multiplex connections from and to iOS devices
Build-Depends: libimobiledevice, libusb, libusb-win32, pthreads
\ No newline at end of file diff --git a/ports/usbmuxd/fix-dependence-pthreads.patch b/ports/usbmuxd/fix-dependence-pthreads.patch new file mode 100644 index 000000000..9a6187148 --- /dev/null +++ b/ports/usbmuxd/fix-dependence-pthreads.patch @@ -0,0 +1,40 @@ +diff --git a/usbmuxd.vcxproj b/usbmuxd.vcxproj
+index d1d8a4d..086e8a4 100644
+--- a/usbmuxd.vcxproj
++++ b/usbmuxd.vcxproj
+@@ -135,7 +135,7 @@
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+- <AdditionalDependencies>ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadsVC2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
++ <AdditionalDependencies>ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadVC2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+@@ -149,7 +149,7 @@
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+- <AdditionalDependencies>ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadsVC2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
++ <AdditionalDependencies>ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadVC2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+@@ -168,7 +168,7 @@
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+- <AdditionalDependencies>ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadsVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
++ <AdditionalDependencies>ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+@@ -186,7 +186,7 @@
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+- <AdditionalDependencies>ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadsVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
++ <AdditionalDependencies>ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/ports/usbmuxd/portfile.cmake b/ports/usbmuxd/portfile.cmake index 34768cf88..2ea2d568f 100644 --- a/ports/usbmuxd/portfile.cmake +++ b/ports/usbmuxd/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF 1.1.1.133
SHA512 1a5f9abc239deeb15e2aab419ba9e88ef41ffa80396546fb65bc06b0f419cbabc80cdf95995caf71d5628d1537fb0329a73d923202e91ea43fcc7c32b840d047
HEAD_REF master-msvc
+ PATCHES
+ fix-dependence-pthreads.patch
)
vcpkg_install_msbuild(
diff --git a/ports/uvw/CMakeLists.txt b/ports/uvw/CMakeLists.txt new file mode 100644 index 000000000..f359b7351 --- /dev/null +++ b/ports/uvw/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.8)
+project(uvw)
+
+find_package(unofficial-libuv CONFIG REQUIRED)
+
+add_library(uvw INTERFACE)
+target_link_libraries(uvw INTERFACE unofficial::libuv::libuv)
+
+install(TARGETS uvw
+ EXPORT uvw
+ INCLUDES DESTINATION include/)
+
+install(EXPORT uvw
+ DESTINATION "share/uvw"
+ FILE uvw-targets.cmake
+ NAMESPACE uvw::)
+
+install(DIRECTORY
+ src/uvw/
+ DESTINATION include/uvw/)
+
+install(FILES
+ src/uvw.hpp
+ DESTINATION include/
+)
diff --git a/ports/uvw/CONTROL b/ports/uvw/CONTROL index 0a055ad8b..59926f1a9 100644 --- a/ports/uvw/CONTROL +++ b/ports/uvw/CONTROL @@ -1,3 +1,4 @@ Source: uvw -Version: 1.11.3 +Version: 1.15.0 Description: Header-only, event based, tiny and easy to use libuv wrapper in modern C++. <https://github.com/skypjack/uvw> +Build-Depends: libuv diff --git a/ports/uvw/portfile.cmake b/ports/uvw/portfile.cmake index e7d2c9b00..0fca53590 100644 --- a/ports/uvw/portfile.cmake +++ b/ports/uvw/portfile.cmake @@ -4,19 +4,23 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO skypjack/uvw - REF v1.11.2_libuv-v1.23 - SHA512 0125233645351b94acb1b42f1632365a60892c64f00b27f04ae76fa523c4ee32c9910f0fcfb160b15269bfb0b5ae0c0f8b46d83a1ca9f9fc661b75eecb7a04d3 + REF v1.15.0_libuv-v1.27 + SHA512 acf1f1bdbc34ec5d040514ca08c99ee05b5bbb112828a4acf5f4c50e1910d2c74864a0793d4087b7a4a0704dd2ba1a973f65cee032fffea9247009be9cd0243c ) -file(INSTALL - ${SOURCE_PATH}/src/uvw - DESTINATION ${CURRENT_PACKAGES_DIR}/include +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/uvw") file(INSTALL - ${SOURCE_PATH}/src/uvw.hpp - DESTINATION ${CURRENT_PACKAGES_DIR}/include + ${CMAKE_CURRENT_LIST_DIR}/uvw-config.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw/ ) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright/readme/package files file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw RENAME copyright) diff --git a/ports/uvw/uvw-config.cmake b/ports/uvw/uvw-config.cmake new file mode 100644 index 000000000..1fdc98f53 --- /dev/null +++ b/ports/uvw/uvw-config.cmake @@ -0,0 +1,2 @@ +find_package(unofficial-libuv CONFIG REQUIRED)
+include ("${CMAKE_CURRENT_LIST_DIR}/uvw-targets.cmake")
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 2521ed58c..0625a3ac1 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,7 +1,7 @@ Source: vtk -Version: 8.1.0-7 +Version: 8.2.0-2 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, atlmfc (windows), eigen3, double-conversion, pugixml, libharu, sqlite3, netcdf-c Feature: openvr Description: OpenVR functionality for VTK @@ -18,7 +18,3 @@ Build-Depends: msmpi, hdf5[parallel] Feature: python Description: Python functionality for VTK Build-Depends: python3 - -Feature: libharu -Description: PDF libharu functionality for VTK -Build-Depends: libharu diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake deleted file mode 100644 index f3c6bd30f..000000000 --- a/ports/vtk/FindHDF5.cmake +++ /dev/null @@ -1,31 +0,0 @@ -find_package(HDF5 NO_MODULE REQUIRED)
-
-set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
-
-if(NOT TARGET vtk::hdf5::hdf5)
- add_library(vtk::hdf5::hdf5 INTERFACE IMPORTED GLOBAL)
- if(TARGET hdf5::hdf5-static)
- set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5-static")
- elseif(TARGET hdf5::hdf5-shared)
- set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5-shared")
- else()
- message(FATAL_ERROR "could not find target hdf5-*")
- endif()
-endif()
-
-if(NOT TARGET vtk::hdf5::hdf5_hl)
- add_library(vtk::hdf5::hdf5_hl INTERFACE IMPORTED GLOBAL)
- if(TARGET hdf5::hdf5_hl-static)
- set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-static")
- elseif(TARGET hdf5::hdf5_hl-shared)
- set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-shared")
- else()
- message(FATAL_ERROR "could not find target hdf5_hl-*")
- endif()
-endif()
-
-set(HDF5_LIBRARIES "$<BUILD_INTERFACE:vtk::hdf5::hdf5>" "$<BUILD_INTERFACE:vtk::hdf5::hdf5_hl>")
-
-find_package_handle_standard_args(HDF5
- REQUIRED_VARS HDF5_INCLUDE_DIRS HDF5_LIBRARIES
-)
diff --git a/ports/vtk/disable-workaround-findhdf5.patch b/ports/vtk/disable-workaround-findhdf5.patch deleted file mode 100644 index 004397048..000000000 --- a/ports/vtk/disable-workaround-findhdf5.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/CMake/vtkModuleMacros.cmake Mon Jun 26 15:29:04 2017 -+++ b/CMake/vtkModuleMacros.cmake Tue Aug 08 17:54:03 2017 -@@ -893,18 +893,6 @@ - set(vtk${_lower}_LIBRARIES "${${_upper_pkg_name}_LIBRARIES}") - endif() - -- #a workaround for bad FindHDF5 behavior in which deb or opt can -- #end up empty. cmake >= 2.8.12.2 makes this unnecessary -- string(REGEX MATCH "debug;.*optimized;.*" -- _remove_deb_opt "${vtk${_lower}_LIBRARIES}") -- if (_remove_deb_opt) -- set(_tmp ${vtk${_lower}_LIBRARIES}) -- list(REMOVE_ITEM _tmp "debug") -- list(REMOVE_ITEM _tmp "optimized") -- list(REMOVE_DUPLICATES _tmp) -- set(vtk${_lower}_LIBRARIES ${_tmp}) -- endif() -- - set(vtk${_lower}_INCLUDE_DIRS "") - else() - if(_nolibs) diff --git a/ports/vtk/dont-define-ssize_t.patch b/ports/vtk/dont-define-ssize_t.patch deleted file mode 100644 index ba9b5e605..000000000 --- a/ports/vtk/dont-define-ssize_t.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in -index 0a19c41..0d92371 100644 ---- a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in -+++ b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in -@@ -110,7 +110,7 @@ - #cmakedefine HAVE_LIBHDF5_HL - - /* Define to `int' if system doesn't define. */ --#cmakedefine ssize_t @ssize_t@ -+/* #cmakedefine ssize_t @ssize_t@ */ - - /* Define to `int' if system doesn't define. */ - #cmakedefine ptrdiff_t @ptrdiff_t@ diff --git a/ports/vtk/fix-find-libharu.patch b/ports/vtk/fix-find-libharu.patch deleted file mode 100644 index 1c66408c6..000000000 --- a/ports/vtk/fix-find-libharu.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/CMake/FindLibHaru.cmake Mon Jun 26 15:29:04 2017 -+++ b/CMake/FindLibHaru.cmake Wed Aug 16 09:30:12 2017 -@@ -19,9 +19,13 @@ - - find_path(LIBHARU_INCLUDE_DIR hpdf.h) - --find_library(LIBHARU_LIBRARY NAMES hpdf hpdfs) -+find_library(LIBHARU_LIBRARY_RELEASE NAMES hpdf libhpdf) -+find_library(LIBHARU_LIBRARY_DEBUG NAMES hpdfd libhpdfd) - --# handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if -+include(SelectLibraryConfigurations) -+select_library_configurations(LIBHARU) -+ -+# handle the QUIETLY and REQUIRED arguments and set LIBHARU_FOUND to TRUE if - # all listed variables are TRUE - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LibHaru DEFAULT_MSG diff --git a/ports/vtk/fix-find-libproj4.patch b/ports/vtk/fix-find-libproj4.patch deleted file mode 100644 index 4074d87a9..000000000 --- a/ports/vtk/fix-find-libproj4.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:03:55 2017 -+++ b/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:08:58 2017 -@@ -11,7 +11,7 @@ - file( TO_CMAKE_PATH "$ENV{LIBPROJ4_DIR}" _LIBPROJ4_DIR ) - endif () - -- find_library( LIBPROJ4_LIBRARIES -+ find_library( LIBPROJ4_LIBRARY_RELEASE - NAMES proj - PATHS - ${_LIBPROJ4_DIR}/lib64 -@@ -24,7 +24,21 @@ - ${CMAKE_INSTALL_PREFIX}/lib - /usr/local/lib - /usr/lib -- NO_DEFAULT_PATH -+ ) -+ -+ find_library( LIBPROJ4_LIBRARY_DEBUG -+ NAMES projd -+ PATHS -+ ${_LIBPROJ4_DIR}/lib64 -+ ${CMAKE_INSTALL_PREFIX}/lib64 -+ /usr/local/lib64 -+ /usr/lib64 -+ ${_LIBPROJ4_DIR} -+ ${_LIBPROJ4_DIR}/lib -+ ${CMAKE_INSTALL_PREFIX}/bin -+ ${CMAKE_INSTALL_PREFIX}/lib -+ /usr/local/lib -+ /usr/lib - ) - - find_path( LIBPROJ4_INCLUDE_DIR -@@ -37,19 +51,22 @@ - /usr/local/include - /usr/include - /usr/include/postgresql -- NO_DEFAULT_PATH - ) - -- if ( NOT LIBPROJ4_INCLUDE_DIR OR NOT LIBPROJ4_LIBRARIES ) -- if ( LIBPROJ4_REQUIRED ) -- message( FATAL_ERROR "LIBPROJ4 is required. Set LIBPROJ4_DIR" ) -- endif () -- else () -- set( LIBPROJ4_FOUND 1 ) -- mark_as_advanced( LIBPROJ4_FOUND ) -- endif () -+ include(SelectLibraryConfigurations) -+ select_library_configurations(LIBPROJ4) -+ -+ include(FindPackageHandleStandardArgs) -+ find_package_handle_standard_args(LIBPROJ4 -+ REQUIRED_VARS LIBPROJ4_LIBRARY LIBPROJ4_INCLUDE_DIR) -+ -+ if(LIBPROJ4_FOUND) -+ set(LIBPROJ4_INCLUDE_DIRS ${LIBPROJ4_INCLUDE_DIR}) - -+ if(NOT LIBPROJ4_LIBRARIES) -+ set(LIBPROJ4_LIBRARIES ${LIBPROJ4_LIBRARY}) -+ endif() -+ endif() - endif () - --mark_as_advanced( FORCE LIBPROJ4_INCLUDE_DIR ) --mark_as_advanced( FORCE LIBPROJ4_LIBRARIES ) -+mark_as_advanced(LIBPROJ4_INCLUDE_DIR) diff --git a/ports/vtk/fix-find-mysql.patch b/ports/vtk/fix-find-mysql.patch deleted file mode 100644 index d2f984cd5..000000000 --- a/ports/vtk/fix-find-mysql.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMake/FindMySQL.cmake Mon Jun 26 15:29:04 2017 -+++ b/CMake/FindMySQL.cmake Wed Aug 16 11:21:58 2017 -@@ -28,6 +28,7 @@ - "C:/MySQL/include" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include" -+ PATH_SUFFIXES mysql - DOC "Specify the directory containing mysql.h." - ) - diff --git a/ports/vtk/fix-find-odbc.patch b/ports/vtk/fix-find-odbc.patch deleted file mode 100644 index 0690ed0a9..000000000 --- a/ports/vtk/fix-find-odbc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMake/FindODBC.cmake Mon Jun 26 15:29:04 2017 -+++ b/CMake/FindODBC.cmake Wed Aug 16 12:58:11 2017 -@@ -30,7 +30,7 @@ - ) - - FIND_LIBRARY( ODBC_LIBRARY -- NAMES odbc iodbc unixodbc -+ NAMES odbc iodbc unixodbc odbc32 - PATHS - /usr/lib - /usr/lib/odbc diff --git a/ports/vtk/fix-pugixml-link.patch b/ports/vtk/fix-pugixml-link.patch new file mode 100644 index 000000000..8708506b6 --- /dev/null +++ b/ports/vtk/fix-pugixml-link.patch @@ -0,0 +1,14 @@ +diff --git a/IO/CityGML/CMakeLists.txt b/IO/CityGML/CMakeLists.txt
+index ce979ba..322e2de 100644
+--- a/IO/CityGML/CMakeLists.txt
++++ b/IO/CityGML/CMakeLists.txt
+@@ -4,8 +4,5 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS})
+ # pugixml does not set _INCLUDE_DIRS or _LIBRARIES
+ if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS)
+ find_package(pugixml REQUIRED)
+- get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES)
+- get_target_property(pugixml_LIBRARIES pugixml LOCATION)
+- include_directories(${pugixml_INCLUDE_DIRS})
+- vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES})
++ vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE pugixml)
+ endif()
diff --git a/ports/vtk/fix_ogg_linkage.patch b/ports/vtk/fix_ogg_linkage.patch new file mode 100644 index 000000000..c7f22f4c8 --- /dev/null +++ b/ports/vtk/fix_ogg_linkage.patch @@ -0,0 +1,12 @@ +diff --git a/IO/Movie/module.cmake b/IO/Movie/module.cmake +index 4275171..88204ad 100644 +--- a/IO/Movie/module.cmake ++++ b/IO/Movie/module.cmake +@@ -14,6 +14,7 @@ vtk_module(vtkIOMovie + vtkIO + DEPENDS + ${vtkIOMovie_vtkoggtheora} ++ vtkogg + vtkCommonExecutionModel + PRIVATE_DEPENDS + vtkCommonCore diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 8b6123eb7..536a81141 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -4,7 +4,7 @@ endif() include(vcpkg_common_functions) -set(VTK_SHORT_VERSION "8.1") +set(VTK_SHORT_VERSION "8.2") set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0") # ============================================================================= # Options: @@ -16,9 +16,9 @@ else() endif() if ("mpi" IN_LIST FEATURES) - set(VTK_WITH_MPI ON ) + set(VTK_Group_MPI ON) else() - set(VTK_WITH_MPI OFF ) + set(VTK_Group_MPI OFF) endif() if ("python" IN_LIST FEATURES) @@ -28,15 +28,9 @@ else() endif() if("openvr" IN_LIST FEATURES) - set(VTK_WITH_OPENVR ON) + set(Module_vtkRenderingOpenVR ON) else() - set(VTK_WITH_OPENVR OFF) -endif() - -if("libharu" IN_LIST FEATURES) - set(VTK_WITH_LIBHARU ON) -else() - set(VTK_WITH_LIBHARU OFF) + set(Module_vtkRenderingOpenVR OFF) endif() set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, @@ -46,32 +40,14 @@ set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5` # Clone & patch vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO "Kitware/VTK" + REPO Kitware/VTK REF "v${VTK_LONG_VERSION}" - SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf - HEAD_REF "master" + SHA512 fd1d9c2872baa6eca7f8105b0057b56ec554e9d5eaf25985302e7fc032bdce72255d79e3f5f16ca50504151bda49cb3a148272ba32e0f410b4bdb70959b8f3f4 + HEAD_REF master PATCHES - # Disable ssize_t because this can conflict with ssize_t that is defined on windows. - dont-define-ssize_t.patch - - # We force CMake to use it's own version of the FindHDF5 module since newer versions - # shipped with CMake behave differently. E.g. the one shipped with CMake 3.9 always - # only finds the release libraries, but not the debug libraries. - # The file shipped with CMake allows us to set the libraries explicitly as it is done below. - # Maybe in the future we can disable the patch and use the new version shipped with CMake - # together with the hdf5-config.cmake that is written by HDF5 itself, but currently VTK - # disables taking the config into account explicitly. - use-fixed-find-hdf5.patch - - # We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency - # will link to both, the debug and the release library. - disable-workaround-findhdf5.patch - - fix-find-libproj4.patch - fix-find-libharu.patch - fix-find-mysql.patch - fix-find-odbc.patch fix-find-lz4.patch + fix_ogg_linkage.patch + fix-pugixml-link.patch ) # Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK, @@ -82,7 +58,6 @@ vcpkg_from_github( file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake) file(REMOVE ${SOURCE_PATH}/CMake/FindPythonLibs.cmake) file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/CMake) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindHDF5.cmake DESTINATION ${SOURCE_PATH}/CMake/NewCMake) # ============================================================================= # Collect CMake options for optional components @@ -94,12 +69,6 @@ if(VTK_WITH_QT) ) endif() -if(VTK_WITH_MPI) - list(APPEND ADDITIONAL_OPTIONS - -DVTK_Group_MPI=ON - ) -endif() - if(VTK_WITH_PYTHON) list(APPEND ADDITIONAL_OPTIONS -DVTK_WRAP_PYTHON=ON @@ -107,18 +76,6 @@ if(VTK_WITH_PYTHON) ) endif() -if(VTK_WITH_OPENVR) - list(APPEND ADDITIONAL_OPTIONS - -DModule_vtkRenderingOpenVR=ON - ) -endif() - -if(VTK_WITH_LIBHARU) - list(APPEND ADDITIONAL_OPTIONS - -DVTK_USE_SYSTEM_LIBHARU=ON - ) -endif() - if(VTK_WITH_ALL_MODULES) list(APPEND ADDITIONAL_OPTIONS -DVTK_BUILD_ALL_MODULES=ON @@ -136,38 +93,39 @@ if(VTK_WITH_ALL_MODULES) ) endif() +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(Module_vtkGUISupportMFC ON) +else() + set(Module_vtkGUISupportMFC OFF) +endif() + # ============================================================================= # Configure & Install + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DVTK_Group_Imaging=ON - -DVTK_Group_Views=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF - -DVTK_USE_SYSTEM_EXPAT=ON - -DVTK_USE_SYSTEM_FREETYPE=ON - # -DVTK_USE_SYSTEM_GL2PS=ON - -DVTK_USE_SYSTEM_JPEG=ON - -DVTK_USE_SYSTEM_GLEW=ON - -DVTK_USE_SYSTEM_HDF5=ON - -DVTK_USE_SYSTEM_JSONCPP=ON - -DVTK_USE_SYSTEM_LIBPROJ4=ON - -DVTK_USE_SYSTEM_LIBXML2=ON - -DVTK_USE_SYSTEM_LZ4=ON - # -DVTK_USE_SYSTEM_NETCDF=ON - # -DVTK_USE_SYSTEM_NETCDFCPP=ON - -DVTK_USE_SYSTEM_OGGTHEORA=ON - -DVTK_USE_SYSTEM_PNG=ON - -DVTK_USE_SYSTEM_TIFF=ON - -DVTK_USE_SYSTEM_ZLIB=ON -DVTK_INSTALL_INCLUDE_DIR=include -DVTK_INSTALL_DATA_DIR=share/vtk/data -DVTK_INSTALL_DOC_DIR=share/vtk/doc -DVTK_INSTALL_PACKAGE_DIR=share/vtk -DVTK_INSTALL_RUNTIME_DIR=bin -DVTK_FORBID_DOWNLOADS=ON + + # We set all libraries to "system" and explicitly list the ones that should use embedded copies + -DVTK_USE_SYSTEM_LIBRARIES=ON + -DVTK_USE_SYSTEM_GL2PS=OFF + + # Select modules / groups to install + -DVTK_Group_Imaging=ON + -DVTK_Group_Views=ON + -DModule_vtkGUISupportMFC=${Module_vtkGUISupportMFC} + -DModule_vtkRenderingOpenVR=${Module_vtkRenderingOpenVR} + -DVTK_Group_MPI=${VTK_Group_MPI} + ${ADDITIONAL_OPTIONS} ) @@ -196,110 +154,25 @@ if(VTK_WITH_ALL_MODULES) file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}") endif() -# For VTK `vcpkg_fixup_cmake_targets` is not enough: -# Files for system third party dependencies are written to modules that -# are located in the paths `share/vtk/Modules` and `debug/share/vtk/Modules`. -# In the release folder, only the release libraries are referenced (e.g. "C:/vcpkg/installed/x64-windows/lib/zlib.lib"). -# But in the debug folder both libraries (e.g. "optimized;C:/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/vcpkg/installed/x64-windows/debug/lib/zlibd.lib") -# or only the debug library (e.g. "C:/vcpkg/installed/x64-windows/debug/lib/hdf5_D.lib") is referenced. -# This is because VCPKG appends only the release library prefix (.../x64-windows/lib) -# when configuring release but both (.../x64-windows/lib and .../x64-windows/debug/lib) -# when configuring debug. -# Now if we delete the debug/share/Modules folder and just leave share/Modules, a library -# that links to VTK will always use the release third party dependencies, even if -# debug VTK is used. -# -# The following code merges the libraries from both release and debug: - -include(${CMAKE_CURRENT_LIST_DIR}/SplitLibraryConfigurations.cmake) - -function(_vtk_combine_third_party_libraries MODULE_NAME) - set(MODULE_LIBRARIES_REGEX "set\\(${MODULE_NAME}_LIBRARIES \"([^\"]*)\"\\)") - - # Read release libraries - file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" RELEASE_MODULE_CONTENT) - if("${RELEASE_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}") - set(RELEASE_LIBRARY_LIST "${CMAKE_MATCH_1}") - else() - message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}") - endif() - - # Read debug libraries - file(READ "${CURRENT_PACKAGES_DIR}/debug/share/vtk/Modules/${MODULE_NAME}.cmake" DEBUG_MODULE_CONTENT) - if("${DEBUG_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}") - set(DEBUG_LIBRARY_LIST "${CMAKE_MATCH_1}") - else() - message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}") - endif() - - split_library_configurations("${RELEASE_LIBRARY_LIST}" OPTIMIZED_RELEASE_LIBRARIES DEBUG_RELEASE_LIBRARIES GENERAL_RELEASE_LIBRARIES) - split_library_configurations("${DEBUG_LIBRARY_LIST}" OPTIMIZED_DEBUG_LIBRARIES DEBUG_DEBUG_LIBRARIES GENERAL_DEBUG_LIBRARIES) - - # Combine libraries and wrap them in generator expressions - foreach(LIBRARY ${OPTIMIZED_RELEASE_LIBRARIES} ${GENERAL_RELEASE_LIBRARIES}) - list(APPEND LIBRARY_LIST "$<$<NOT:$<CONFIG:Debug>>:${LIBRARY}>") - endforeach() - foreach(LIBRARY ${DEBUG_DEBUG_LIBRARIES} ${GENERAL_DEBUG_LIBRARIES}) - list(APPEND LIBRARY_LIST "$<$<CONFIG:Debug>:${LIBRARY}>") - endforeach() - - # Write combined libraries back - string(REGEX REPLACE "${MODULE_LIBRARIES_REGEX}" - "set(${MODULE_NAME}_LIBRARIES \"${LIBRARY_LIST}\")" - RELEASE_MODULE_CONTENT - "${RELEASE_MODULE_CONTENT}" - ) - file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" "${RELEASE_MODULE_CONTENT}") -endfunction() - -# IMPORTANT: Please make sure to extend this list whenever a new library is marked `USE_SYSTEM` in the configure step above! -set(SYSTEM_THIRD_PARTY_MODULES - vtkexpat - vtkfreetype - vtkjpeg - vtkglew - vtkhdf5 - vtkjsoncpp - vtklibproj4 - vtklibxml2 - vtklz4 - vtkoggtheora - vtkpng - vtktiff - vtkzlib - # vtkgl2ps - vtklibharu -) - -if(VTK_WITH_PYTHON OR VTK_WITH_ALL_MODULES) - list(APPEND SYSTEM_THIRD_PARTY_MODULES - vtkPython - ) -endif() - -if(VTK_WITH_ALL_MODULES) - list(APPEND SYSTEM_THIRD_PARTY_MODULES - AutobahnPython - ) -endif() - -foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES) - _vtk_combine_third_party_libraries("${MODULE}") -endforeach() - -# Remove all explicit references to vcpkg system libraries in the general VTKTargets.cmake file -# since these references always point to the release libraries, even in the debug case. -# The dependencies should be handled by the explicit modules we fixed above, so removing -# them here shouldn't cause any problems. -file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT) -string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}") -file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") - -# Remove any remaining stray absolute references to the installed directory. -file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/*.cmake) +#file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT) +# Remove unset of _IMPORT_PREFIX in VTKTargets.cmake +#_IMPORT_PREFIX is required by vtkModules due to vcpkg_fixup_cmake_targets changing all cmake files (to use _IMPORT_PREFIX). +#STRING(REPLACE [[set(_IMPORT_PREFIX)]] +#[[ +# VCPKG: The value of _IMPORT_PREFIX should not be unset. +#set(_IMPORT_PREFIX) +#]] +#VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}") +#file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") + +#file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT) + +# Fix _IMPORT_PREFIX. It is not set within the Modules cmake (only set in VTKTargets.cmake). +# Since for VCPKG _IMPORT_PREFIX == VTK_INSTALL_PREFIX we just replace it with that. +file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/Modules/*.cmake) foreach(FILE IN LISTS CMAKE_FILES) file(READ "${FILE}" _contents) - string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}") + string(REPLACE "\${_IMPORT_PREFIX}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}") file(WRITE "${FILE}" "${_contents}") endforeach() @@ -378,7 +251,7 @@ if(VTK_WITH_ALL_MODULES) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/XdmfConfig.cmake) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() diff --git a/ports/vtk/use-fixed-find-hdf5.patch b/ports/vtk/use-fixed-find-hdf5.patch deleted file mode 100644 index 762a9ab07..000000000 --- a/ports/vtk/use-fixed-find-hdf5.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake -index 6d558e39b1..9511e9a1ad 100644 ---- a/CMake/FindHDF5.cmake -+++ b/CMake/FindHDF5.cmake -@@ -3,11 +3,11 @@ - # (BUG #0014363). - - # include the default FindHDF5.cmake. --if(CMAKE_VERSION VERSION_LESS 3.6.1) -+#if(CMAKE_VERSION VERSION_LESS 3.6.1) - include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindHDF5.cmake) --else() -- include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) --endif() -+#else() -+# include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) -+#endif() - - if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)) - include(vtkMPI) diff --git a/ports/vulkan/LICENSE.txt b/ports/vulkan/LICENSE.txt new file mode 100644 index 000000000..af642b906 --- /dev/null +++ b/ports/vulkan/LICENSE.txt @@ -0,0 +1,726 @@ +/* +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +=============================================================================================================================================== + +/Copyright (C) 2012 LunarG, Inc. +//All rights reserved. +// +//Redistribution and use in source and binary forms, with or without +//modification, are permitted provided that the following conditions +//are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of LunarG Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +//POSSIBILITY OF SUCH DAMAGE. + +=============================================================================================================================================== + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# Copyright 2007-2008 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright_cmake.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + + +============================================================================================================================================== + +// +// Copyright (C) 2015-2018 Google, Inc. +// Copyright (C) <various other dates and companies> +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +========================================================================================================================================== + +Note: This license has also been called the "New BSD License" or "Modified BSD License". See also the 2-clause BSD License. +Copyright <YEAR> <COPYRIGHT HOLDER> +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +========================================================================================================================================== + +/* +* xxHash - Fast Hash algorithm +* Copyright (C) 2012-2016, Yann Collet +* +* BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following disclaimer +* in the documentation and/or other materials provided with the +* distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* You can contact the author at : +* - xxHash homepage: http://www.xxhash.com +* - xxHash source repository : https://github.com/Cyan4973/xxHash +*/ + + +=========================================================================================================================================== + +# Copyright (C) 2018 Google, Inc. +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +========================================================================================================================================== + +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C +Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* As a special exception, you may create a larger work that contains +part or all of the Bison parser skeleton and distribute that work +under terms of your choice, so long as that work isn't itself a +parser generator using the skeleton or a modified version thereof +as a parser skeleton. Alternatively, if you modify or redistribute +the parser skeleton itself, you may (at your option) remove this +special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public +License without this special exception. +This special exception was added by the Free Software Foundation in +version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by +simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid +infringing on user name space. This should be done even for local +variables, as they might otherwise be expanded by user macros. +There are some unavoidable exceptions within include files to +define necessary library symbols; they are noted "INFRINGES ON +USER NAME SPACE" below. */ + +============================================================================================================================================== + +copyright : [ +Copyright (c) 2017 The Khronos Group Inc., +, +Permission is hereby granted, free of charge, to any person obtaining a copy, +of this software and/or associated documentation files (the \Materials\"),", +to deal in the Materials without restriction, including without limitation, +the rights to use, copy, modify, merge, publish, distribute, sublicense,, +and/or sell copies of the Materials, and to permit persons to whom the, +Materials are 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 Materials., +, +MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS, +STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND, +HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ , +, +THE MATERIALS ARE 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 MATERIALS OR THE USE OR OTHER DEALINGS, +IN THE MATERIALS. + +============================================================================================================================================= + +CMake - Cross Platform Makefile Generator +Copyright 2000-2009 Kitware, Inc., Insight Software Consortium +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +* Neither the names of Kitware, Inc., the Insight Software Consortium, +nor the names of their contributors may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +The above copyright and license notice applies to distributions of +CMake in source and binary form. Some source files contain additional +notices of original copyright by their contributors; see each source +for details. Third-party software packages supplied with CMake under +compatible licenses provide their own copyright notices documented in +corresponding subdirectories. + +------------------------------------------------------------------------------ + +CMake was initially developed by Kitware with the following sponsorship: + +* National Library of Medicine at the National Institutes of Health +as part of the Insight Segmentation and Registration Toolkit (ITK). + +* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel +Visualization Initiative. + +* National Alliance for Medical Image Computing (NAMIC) is funded by the +National Institutes of Health through the NIH Roadmap for Medical Research, +Grant U54 EB005149. + +* Kitware, Inc. + +======================================================================================================================================== + +The authors of this software are Rob Pike and Ken Thompson. +* Copyright (c) 2002 by Lucent Technologies. +* Permission to use, copy, modify, and distribute this software for any +* purpose without fee is hereby granted, provided that this entire notice +* is included in all copies of any software which is or includes a copy +* or modification of this software and in all copies of the supporting +* documentation for such software. +* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY +* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY +* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + +======================================================================================================================================== + +Copyright (c) 2015-2018 Baldur Karlsson + +Copyright (c) 2014 Crytek + +Copyright (c) 1998-2018 Third party code and tools + +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. + +========================================================================================================================================= + +/* +Copyright (c) 2009 Dave Gamble +Copyright (c) 2015-2016 The Khronos Group Inc. +Copyright (c) 2015-2016 Valve Corporation +Copyright (c) 2015-2016 LunarG, Inc. + +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. +*/ + +=========================================================================================================================================== + +Copyright (c) 2005 - 2017 G-Truc Creation + +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 JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: +http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +Copyright (c) 2007-2010 Baptiste Lepilleur +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. + +========================================================================================================================================== + +/** +* `murmurhash.h' - murmurhash +* +* copyright (c) 2014 joseph werle <joseph.werle@gmail.com> +* Copyright (c) 2015-2016 The Khronos Group Inc. +* Copyright (c) 2015-2016 Valve Corporation +* Copyright (c) 2015-2016 LunarG, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and/or associated documentation files (the "Materials"), to +* deal in the Materials without restriction, including without limitation the +* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +* sell copies of the Materials, and to permit persons to whom the Materials are +* furnished to do so, subject to the following conditions: +* +* The above copyright notice(s) and this permission notice shall be included in +* all copies or substantial portions of the Materials. +* +* THE MATERIALS ARE 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 MATERIALS OR THE +* USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +========================================================================================================================================= + +Licenced as X11: http://www.kryogenix.org/code/browser/licence.html +This basically means: do what you want with it. + +========================================================================================================================================= + +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) +/// 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. +/// +/// @ref core +/// @file glm/common.hpp +/// @date 2013-12-24 / 2013-12-24 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + + +========================================================================================================================================== + +// LICENSE +// +// This software is in the public domain. Where that dedication is not +// recognized, you are granted a perpetual, irrevocable license to copy, +// distribute, and modify this file as you see fit. +// + +========================================================================================================================================== + +Simple DirectMedia Layer +Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +========================================================================================================================================= + +/****************************************************************************\ +Copyright (c) 2002, NVIDIA Corporation. + +NVIDIA Corporation("NVIDIA") supplies this software to you in +consideration of your agreement to the following terms, and your use, +installation, modification or redistribution of this NVIDIA software +constitutes acceptance of these terms. If you do not agree with these +terms, please do not use, install, modify or redistribute this NVIDIA +software. + +In consideration of your agreement to abide by the following terms, and +subject to these terms, NVIDIA grants you a personal, non-exclusive +license, under NVIDIA's copyrights in this original NVIDIA software (the +NVIDIA Software), to use, reproduce, modify and redistribute the +NVIDIA Software, with or without modifications, in source and/or binary +forms; provided that if you redistribute the NVIDIA Software, you must +retain the copyright notice of NVIDIA, this notice and the following +text and disclaimers in all such redistributions of the NVIDIA Software. +Neither the name, trademarks, service marks nor logos of NVIDIA +Corporation may be used to endorse or promote products derived from the +NVIDIA Software without specific prior written permission from NVIDIA. +Except as expressly stated in this notice, no other rights or licenses +express or implied, are granted by NVIDIA herein, including but not +limited to any patent rights that may be infringed by your derivative +works or by other works in which the NVIDIA Software may be +incorporated. No hardware is licensed hereunder. + +THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, +INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER +PRODUCTS. + +IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, +INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY +OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE +NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, +TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF +NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +\****************************************************************************/ + +================================================================================================================================================== + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +================================================================================================================================================== + +GNU LESSER GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. + +0. Additional Definitions. + +As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. + +"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. + +An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. + +A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". + +The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. + +The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. + +1. Exception to Section 3 of the GNU GPL. + +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. + +2. Conveying Modified Versions. + +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: + +a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or +b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. +3. Object Code Incorporating Material from Library Header Files. + +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: + +a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. +b) Accompany the object code with a copy of the GNU GPL and this license document. +4. Combined Works. + +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: + +a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. +b) Accompany the Combined Work with a copy of the GNU GPL and this license document. +c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. +d) Do one of the following: +0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. +1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. +e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) +5. Combined Libraries. + +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. +b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +6. Revised Versions of the GNU Lesser General Public License. + +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. diff --git a/ports/vulkan/portfile.cmake b/ports/vulkan/portfile.cmake index bf6c2d65e..5035acd35 100644 --- a/ports/vulkan/portfile.cmake +++ b/ports/vulkan/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) message(STATUS "Querying VULKAN_SDK Enviroment variable") file(TO_CMAKE_PATH "$ENV{VULKAN_SDK}" VULKAN_DIR) -set(VULKAN_INCLUDE "${VULKAN_DIR}/Include/vulkan/") -set(VULKAN_ERROR_DL "Before continuing, please download and install Vulkan from:\n https://vulkan.lunarg.com/sdk/home\n") +set(VULKAN_INCLUDE "${VULKAN_DIR}/include/vulkan/") +set(VULKAN_ERROR_DL "Before continuing, please download and install Vulkan from:\n https://vulkan.lunarg.com/sdk/home\nIf you have already downloaded it, make sure the VULKAN_SDK environment variable is set to vulkan's installation root.") if(NOT DEFINED ENV{VULKAN_SDK}) message(FATAL_ERROR "Could not find Vulkan SDK. ${VULKAN_ERROR_DL}") @@ -33,12 +33,12 @@ if(VULKAN_DIR MATCHES "(([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+))") endif() endif() -if (EXISTS ${VULKAN_DIR}/../LICENSE.TXT) - configure_file(${VULKAN_DIR}/../LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) -elseif(EXISTS ${VULKAN_DIR}/LICENSE.TXT) - configure_file(${VULKAN_DIR}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) +if (EXISTS ${VULKAN_DIR}/../LICENSE.txt) + configure_file(${VULKAN_DIR}/../LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) +elseif(EXISTS ${VULKAN_DIR}/LICENSE.txt) + configure_file(${VULKAN_DIR}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) else() - message(FATAL_ERROR "Could not find LICENSE.TXT") + configure_file(${CURRENT_PORT_DIR}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) endif() -SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
\ No newline at end of file +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/vulkan/usage b/ports/vulkan/usage new file mode 100644 index 000000000..7924cf3cd --- /dev/null +++ b/ports/vulkan/usage @@ -0,0 +1,9 @@ +The package vulkan does not provide cmake or visual studio integration directly. +However, it can still easily be used. + + Visual Studio: + Include ${VULKAN_SDK}/include to your include path. + + CMake: + find_package(Vulkan REQUIRED) + target_link_libraries(main PRIVATE Vulkan::Vulkan) diff --git a/ports/vxl/CONTROL b/ports/vxl/CONTROL index d9340d9f3..84fcd2bd1 100644 --- a/ports/vxl/CONTROL +++ b/ports/vxl/CONTROL @@ -1,5 +1,5 @@ Source: vxl -Version: v1.18.0-2 +Version: v1.18.0-3 Build-Depends: bzip2, libgeotiff, libjpeg-turbo, libpng, tiff, zlib, expat, shapelib # Build-Depends: bzip2, dcmtk, libgeotiff, libjpeg-turbo, openjpeg, libpng, tiff, zlib Description: A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding. diff --git a/ports/wangle/CONTROL b/ports/wangle/CONTROL index 498eeb6cb..77df9ccf0 100644 --- a/ports/wangle/CONTROL +++ b/ports/wangle/CONTROL @@ -1,4 +1,4 @@ Source: wangle
-Version: 2019.01.07.00 +Version: 2019.01.07.00-1 Build-Depends: fizz, folly, openssl, gtest, glog, libevent, double-conversion
Description: Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
diff --git a/ports/wangle/fix-config-cmake.patch b/ports/wangle/fix-config-cmake.patch new file mode 100644 index 000000000..c72b70cdd --- /dev/null +++ b/ports/wangle/fix-config-cmake.patch @@ -0,0 +1,19 @@ +diff --git a/wangle/cmake/wangle-config.cmake.in b/wangle/cmake/wangle-config.cmake.in
+index e50af54..a16cdbb 100644
+--- a/wangle/cmake/wangle-config.cmake.in
++++ b/wangle/cmake/wangle-config.cmake.in
+@@ -12,7 +12,13 @@
+ @PACKAGE_INIT@
+
+ set_and_check(WANGLE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
+-set_and_check(WANGLE_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@")
++set_and_check(WANGLE_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/share/wangle")
++
++find_package(folly REQUIRED)
++find_package(fizz REQUIRED)
++find_package(glog REQUIRED)
++find_package(threads REQUIRED)
++find_package(libevent REQUIRED)
+
+ if (NOT TARGET wangle::wangle)
+ include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake")
diff --git a/ports/wangle/portfile.cmake b/ports/wangle/portfile.cmake index 6d1aac9f8..ce1672eb7 100644 --- a/ports/wangle/portfile.cmake +++ b/ports/wangle/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( PATCHES
build.patch
gflags.patch
+ fix-config-cmake.patch
)
vcpkg_configure_cmake(
@@ -35,3 +36,4 @@ file(REMOVE_RECURSE # Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle RENAME copyright)
+file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle)
diff --git a/ports/wangle/usage b/ports/wangle/usage new file mode 100644 index 000000000..768ff2d64 --- /dev/null +++ b/ports/wangle/usage @@ -0,0 +1,5 @@ +The package wangle is compatible with built-in CMake targets: + + find_package(wangle REQUIRED) + target_link_libraries(main PRIVATE wangle::wangle) + target_include_directories(main PRIVATE ${WANGLE_INCLUDE_DIR}) diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index e5a9a6654..afd1b38bc 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -1,5 +1,12 @@ include(vcpkg_common_functions) +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) + message(WARNING "Xalan-c's buildsystem uses very long paths and may fail on your system.\n" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) +endif() + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) set(XALANC_VERSION 1.11) diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL index c5958f4a1..dc204b51b 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-8 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..017cb7cab 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() @@ -41,6 +45,12 @@ string(REPLACE ) file(WRITE ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake "${_contents}") +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/xercesc + @ONLY +) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" diff --git a/ports/xerces-c/vcpkg-cmake-wrapper.cmake b/ports/xerces-c/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..c6cfff8a4 --- /dev/null +++ b/ports/xerces-c/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS})
+
+if (APPLE)
+ if (TARGET XercesC::XercesC)
+ set_property(TARGET XercesC::XercesC APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-framework CoreServices" "-framework CoreFoundation" curl)
+ list(APPEND XercesC_LIBRARIES "-framework CoreServices" "-framework CoreFoundation" curl)
+ endif()
+endif()
+
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/ports/zlib/CONTROL b/ports/zlib/CONTROL index c55963783..2138e31af 100644 --- a/ports/zlib/CONTROL +++ b/ports/zlib/CONTROL @@ -1,3 +1,3 @@ Source: zlib -Version: 1.2.11-3 +Version: 1.2.11-5 Description: A compression library diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index bc36b2781..78030309b 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -1,16 +1,19 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/zlib-1.2.11) + +set(VERSION 1.2.11) + vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://www.zlib.net/zlib-1.2.11.tar.gz" "https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz" + URLS "http://www.zlib.net/zlib-${VERSION}.tar.gz" "https://downloads.sourceforge.net/project/libpng/zlib/${VERSION}/zlib-${VERSION}.tar.gz" FILENAME "zlib1211.tar.gz" SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF ${VERSION} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch + "cmake_dont_build_more_than_needed.patch" ) # This is generated during the cmake build diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 7a1b2777b..f0bfb9839 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -2,12 +2,15 @@ vcpkgDisableMetrics="OFF" vcpkgUseSystem=false +vcpkgAllowAppleClang=OFF for var in "$@" do if [ "$var" = "-disableMetrics" -o "$var" = "--disableMetrics" ]; then vcpkgDisableMetrics="ON" elif [ "$var" = "-useSystemBinaries" -o "$var" = "--useSystemBinaries" ]; then vcpkgUseSystem=true + elif [ "$var" = "-allowAppleClang" -o "$var" = "--allowAppleClang" ]; then + vcpkgAllowAppleClang=ON elif [ "$var" = "-help" -o "$var" = "--help" ]; then echo "Usage: ./bootstrap-vcpkg.sh [options]" echo @@ -15,6 +18,7 @@ do echo " -help Display usage help" echo " -disableMetrics Do not build metrics reporting into the executable" echo " -useSystemBinaries Force use of the system utilities for building vcpkg" + echo " -allowAppleClang Set VCPKG_ALLOW_APPLE_CLANG to build vcpkg in apple with clang anyway" exit 1 else echo "Unknown argument $var. Use '-help' for help." @@ -78,7 +82,7 @@ vcpkgCheckEqualFileHash() echo " File path: [ $downloadPath ]" echo " Expected hash: [ $sha512 ]" echo " Actual hash: [ $actualHash ]" - exit + exit 1 fi } @@ -234,8 +238,8 @@ buildDir="$vcpkgRootDir/toolsrc/build.rel" rm -rf "$buildDir" mkdir -p "$buildDir" -(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics") -(cd "$buildDir" && "$cmakeExe" --build .) +(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1 +(cd "$buildDir" && "$cmakeExe" --build .) || exit 1 rm -rf "$vcpkgRootDir/vcpkg" cp "$buildDir/vcpkg" "$vcpkgRootDir/" diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 42bad4bcd..cf363f12e 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -15,7 +15,14 @@ if ($copiedFilesLog) # Note: this function signature is depended upon by the qtdeploy.ps1 script introduced in 5.7.1-7 function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$targetBinaryName) { if (Test-Path "$targetBinaryDir\$targetBinaryName") { - Write-Verbose " ${targetBinaryName}: already present" + $sourceModTime = (Get-Item $SourceDir\$targetBinaryName).LastWriteTime + $destModTime = (Get-Item $targetBinaryDir\$targetBinaryName).LastWriteTime + if ($destModTime -lt $sourceModTime) { + Write-Verbose " ${targetBinaryName}: Updating $SourceDir\$targetBinaryName" + Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir + } else { + Write-Verbose " ${targetBinaryName}: already present" + } } else { Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName" diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 4ffb123d4..b2a589421 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -95,26 +95,27 @@ if(NOT EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" AND NOT _CMAKE_I message(WARNING "There are no libraries installed for the Vcpkg triplet ${VCPKG_TARGET_TRIPLET}.") endif() -if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) +if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths. list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ) list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ) list(APPEND CMAKE_FIND_ROOT_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} + ) +else() #Release build: Put Release paths before Debug paths. Debug Paths are required so that CMake generates correct info in autogenerated target files. + list(APPEND CMAKE_PREFIX_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug + ) + list(APPEND CMAKE_LIBRARY_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link + ) + list(APPEND CMAKE_FIND_ROOT_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ) endif() -list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} -) -list(APPEND CMAKE_FIND_ROOT_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} -) -list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link -) file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) set(CMAKE_SYSTEM_IGNORE_PATH @@ -188,9 +189,11 @@ macro(find_package name) include(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake) elseif("${name}" STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost") # Checking for the boost headers disables this wrapper unless the user has installed at least one boost library - unset(Boost_USE_STATIC_LIBS) - unset(Boost_USE_MULTITHREADED) + set(Boost_USE_STATIC_LIBS OFF) + set(Boost_USE_MULTITHREADED ON) unset(Boost_USE_STATIC_RUNTIME) + set(Boost_NO_BOOST_CMAKE ON) + unset(Boost_USE_STATIC_RUNTIME CACHE) set(Boost_COMPILER "-vc140") _find_package(${ARGV}) elseif("${name}" STREQUAL "ICU" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/unicode/utf.h") @@ -204,28 +207,6 @@ macro(find_package name) else() _find_package(${ARGV}) endif() - elseif("${name}" STREQUAL "TIFF" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/tiff.h") - _find_package(${ARGV}) - find_package(LibLZMA) - if(TARGET TIFF::TIFF) - set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) - endif() - if(TIFF_LIBRARIES) - list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES}) - endif() - elseif(("${name}" STREQUAL "HDF5" OR "${name}" STREQUAL "hdf5") AND NOT PROJECT_NAME STREQUAL "VTK" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/hdf5.h") - # This is a hack to make VTK work. TODO: find another way to suppress the built-in find module. - _find_package(${ARGV} CONFIG) - # Fill in missing static/shared targets - foreach(HDF5TARGET hdf5 hdf5_hl hdf5_cpp hdf5_hl_cpp) - if(TARGET hdf5::${HDF5TARGET}-static AND NOT TARGET hdf5::${HDF5TARGET}-shared) - _add_library(hdf5::${HDF5TARGET}-shared INTERFACE IMPORTED) - set_target_properties(hdf5::${HDF5TARGET}-shared PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-static") - elseif(TARGET hdf5::${HDF5TARGET}-shared AND NOT TARGET hdf5::${HDF5TARGET}-static) - _add_library(hdf5::${HDF5TARGET}-static INTERFACE IMPORTED) - set_target_properties(hdf5::${HDF5TARGET}-static PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-shared") - endif() - endforeach() elseif("${name}" STREQUAL "GSL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/gsl") _find_package(${ARGV}) if(GSL_FOUND AND TARGET GSL::gsl) diff --git a/scripts/cmake/vcpkg_add_to_path.cmake b/scripts/cmake/vcpkg_add_to_path.cmake index 6890dfe31..7ab08c88e 100644 --- a/scripts/cmake/vcpkg_add_to_path.cmake +++ b/scripts/cmake/vcpkg_add_to_path.cmake @@ -15,6 +15,12 @@ ## 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)
+##
function(vcpkg_add_to_path)
if(NOT "${ARGC}" STREQUAL "1" AND NOT "${ARGC}" STREQUAL "2")
message(FATAL_ERROR "vcpkg_add_to_path() only accepts 1 or 2 arguments.")
diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 2f0da07f9..e86632c7e 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -162,6 +162,33 @@ function(vcpkg_build_cmake) endif() endwhile() endif() + elseif(out_contents MATCHES "mt : general error c101008d: ") + # Antivirus workaround - occasionally files are locked and cause mt.exe to fail + set(ITERATION 0) + while (ITERATION LESS 3 AND out_contents MATCHES "mt : general error c101008d: ") + MATH(EXPR ITERATION "${ITERATION}+1") + message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of mt.exe file locking issue. Iteration: ${ITERATION}") + execute_process( + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} + OUTPUT_FILE "${LOGPREFIX}-out-${ITERATION}.log" + ERROR_FILE "${LOGPREFIX}-err-${ITERATION}.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) + + if(error_code) + file(READ "${LOGPREFIX}-out-${ITERATION}.log" out_contents) + file(READ "${LOGPREFIX}-err-${ITERATION}.log" err_contents) + + if(out_contents) + list(APPEND LOGS "${LOGPREFIX}-out-${ITERATION}.log") + endif() + if(err_contents) + list(APPEND LOGS "${LOGPREFIX}-err-${ITERATION}.log") + endif() + else() + break() + endif() + endwhile() endif() if(error_code) @@ -170,7 +197,7 @@ function(vcpkg_build_cmake) file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") endforeach() - set(_eb_COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG}) + set(_eb_COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG}) set(_eb_WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) message(FATAL_ERROR " Command failed: ${_eb_COMMAND}\n" diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index 7a65127f0..50432f8fa 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -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/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index 947178686..5b686527d 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -9,7 +9,14 @@ function(vcpkg_build_qmake) cmake_parse_arguments(_csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS" ${ARGN}) - vcpkg_find_acquire_program(JOM) + + if(CMAKE_HOST_WIN32) + vcpkg_find_acquire_program(JOM) + set(INVOKE "${JOM}") + else() + find_program(MAKE make) + set(INVOKE "${MAKE}") + endif() # Make sure that the linker finds the libraries used set(ENV_PATH_BACKUP "$ENV{PATH}") @@ -29,7 +36,7 @@ function(vcpkg_build_qmake) function(run_jom TARGETS LOG_PREFIX LOG_SUFFIX) message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX}") vcpkg_execute_required_process( - COMMAND ${JOM} ${TARGETS} + COMMAND ${INVOKE} ${TARGETS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${LOG_SUFFIX} LOGNAME package-${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX} ) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index f7b81de93..ceff199ab 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -109,7 +109,24 @@ function(vcpkg_configure_cmake) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") + + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "ARM64") + else() + if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(VCPKG_CMAKE_SYSTEM_NAME Windows) + endif() message(FATAL_ERROR "Unable to determine appropriate generator for: ${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") endif() diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake index 3aa30e70d..11178174e 100644 --- a/scripts/cmake/vcpkg_configure_qmake.cmake +++ b/scripts/cmake/vcpkg_configure_qmake.cmake @@ -17,7 +17,7 @@ function(vcpkg_configure_qmake) cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) # Find qmake executable - find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) + find_program(QMAKE_COMMAND NAMES qmake PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 949036c88..72016b8c9 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -33,6 +33,11 @@ ## ## This switch is only valid when building with the `--head` command line flag. ## +## ### HEADERS +## A list of headers to append to the download request. This can be used for authentication during a download. +## +## Headers should be specified as "<header-name>: <header-value>". +## ## ## Notes ## The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downloading from GitHub projects. ## @@ -44,7 +49,7 @@ function(vcpkg_download_distfile VAR) set(options SKIP_SHA512) set(oneValueArgs FILENAME SHA512) - set(multipleValuesArgs URLS) + set(multipleValuesArgs URLS HEADERS) cmake_parse_arguments(vcpkg_download_distfile "${options}" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) if(NOT DEFINED vcpkg_download_distfile_URLS) @@ -110,10 +115,16 @@ function(vcpkg_download_distfile VAR) if(_VCPKG_DOWNLOAD_TOOL STREQUAL "ARIA2" AND NOT SAMPLE_URL MATCHES "aria2") vcpkg_find_acquire_program("ARIA2") message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}...") + if(vcpkg_download_distfile_HEADERS) + foreach(header ${vcpkg_download_distfile_HEADERS}) + list(APPEND request_headers "--header=${header}") + endforeach() + endif() execute_process( COMMAND ${ARIA2} ${vcpkg_download_distfile_URLS} -o temp/${vcpkg_download_distfile_FILENAME} -l download-${vcpkg_download_distfile_FILENAME}-detailed.log + ${request_headers} OUTPUT_FILE download-${vcpkg_download_distfile_FILENAME}-out.log ERROR_FILE download-${vcpkg_download_distfile_FILENAME}-err.log RESULT_VARIABLE error_code @@ -140,7 +151,12 @@ function(vcpkg_download_distfile VAR) else() foreach(url IN LISTS vcpkg_download_distfile_URLS) message(STATUS "Downloading ${url}...") - file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status) + if(vcpkg_download_distfile_HEADERS) + foreach(header ${vcpkg_download_distfile_HEADERS}) + list(APPEND request_headers HTTPHEADER ${header}) + endforeach() + endif() + file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status ${request_headers}) list(GET download_status 0 status_code) if (NOT "${status_code}" STREQUAL "0") message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index 5b8922c14..2e9ba7058 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -56,6 +56,7 @@ function(vcpkg_execute_required_process) message(FATAL_ERROR " Command failed: ${vcpkg_execute_required_process_COMMAND}\n" " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" + " Error code: ${error_code}\n" " See logs for more information:\n" ${STRINGIFIED_LOGS} ) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 1f856b69e..1642bf3b4 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -24,6 +24,7 @@ ## - MESON ## - NASM ## - NINJA +## - NUGET ## - YASM ## - ARIA2 (Downloader) ## @@ -130,6 +131,14 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip") set(ARCHIVE "ninja-1.8.2-win.zip") set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5) + elseif(VAR MATCHES "NUGET") + set(PROGNAME nuget) + set(PATHS "${DOWNLOADS}/tools/nuget") + set(BREW_PACKAGE_NAME "nuget") + set(URL "https://dist.nuget.org/win-x86-commandline/v4.8.1/nuget.exe") + set(ARCHIVE "nuget.exe") + set(NOEXTRACT ON) + set(HASH 42cb744338af8decc033a75bce5b4c4df28e102bafc45f9a8ba86d7bc010f5b43ebacae80d7b28c4f85ac900eefc2a349620ae65f27f6ca1c21c53b63b92924b) elseif(VAR MATCHES "MESON") set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) @@ -140,10 +149,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/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index ea9923df3..982f414b6 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -6,6 +6,9 @@ # # Transform all references matching /bin/*.exe to /tools/<port>/*.exe # +# Fix ${_IMPORT_PREFIX} in auto generated targets to be one folder deeper. +# Replace ${CURRENT_INSTALLED_DIR} with ${_IMPORT_PREFIX} in configs/targets. +# # :: # vcpkg_fixup_cmake_targets([CONFIG_PATH <config_path>]) # @@ -126,32 +129,22 @@ function(vcpkg_fixup_cmake_targets) endforeach() endif() - file(GLOB_RECURSE MAIN_TARGETS "${RELEASE_SHARE}/*[Tt]argets.cmake") - foreach(MAIN_TARGET IN LISTS MAIN_TARGETS) - file(READ ${MAIN_TARGET} _contents) + #Fix ${_IMPORT_PREFIX} in cmake generated targets and configs; + #Since those can be renamed we have to check in every *.cmake + file(GLOB_RECURSE MAIN_CMAKES "${RELEASE_SHARE}/*.cmake") + foreach(MAIN_CMAKE IN LISTS MAIN_CMAKES) + file(READ ${MAIN_CMAKE} _contents) string(REGEX REPLACE "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - _contents "${_contents}") - string(REPLACE "${CURRENT_INSTALLED_DIR}" "_INVALID_ROOT_" _contents "${_contents}") - string(REGEX REPLACE "_INVALID_ROOT_/[^\";>]*" "" _contents "${_contents}") - string(REGEX REPLACE ";;+" ";" _contents "${_contents}") - string(REGEX REPLACE "\";\"" "\"\"" _contents "${_contents}") - file(WRITE ${MAIN_TARGET} "${_contents}") - endforeach() - - file(GLOB_RECURSE MAIN_CONFIGS "${RELEASE_SHARE}/*[Cc]onfig.cmake") - foreach(MAIN_CONFIG IN LISTS MAIN_CONFIGS) - file(READ ${MAIN_CONFIG} _contents) - string(REGEX REPLACE - "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - _contents "${_contents}") - string(REGEX REPLACE + _contents "${_contents}") # see #1044 for details why this replacement is necessary. See #4782 why it must be a regex. + string(REGEX REPLACE "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\./(\\.\\./)*\" ABSOLUTE\\)" "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" _contents "${_contents}") - file(WRITE ${MAIN_CONFIG} "${_contents}") + #Fix wrongly absolute paths to install dir with the correct dir using ${_IMPORT_PREFIX} + string(REPLACE "${CURRENT_INSTALLED_DIR}" [[${_IMPORT_PREFIX}]] _contents "${_contents}") + file(WRITE ${MAIN_CMAKE} "${_contents}") endforeach() # Remove /debug/<target_path>/ if it's empty. diff --git a/scripts/cmake/vcpkg_from_gitlab.cmake b/scripts/cmake/vcpkg_from_gitlab.cmake index f13bc054c..6bbe81ed6 100644 --- a/scripts/cmake/vcpkg_from_gitlab.cmake +++ b/scripts/cmake/vcpkg_from_gitlab.cmake @@ -56,7 +56,11 @@ ## ## This exports the `VCPKG_HEAD_VERSION` variable during head builds. ## - +## ## 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) +## function(vcpkg_from_gitlab) set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF) set(multipleValuesArgs PATCHES) diff --git a/scripts/cmake/vcpkg_install_msbuild.cmake b/scripts/cmake/vcpkg_install_msbuild.cmake index 11bcdf189..92c84bf0b 100644 --- a/scripts/cmake/vcpkg_install_msbuild.cmake +++ b/scripts/cmake/vcpkg_install_msbuild.cmake @@ -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/scripts/cmake/vcpkg_test_cmake.cmake b/scripts/cmake/vcpkg_test_cmake.cmake index 29654346a..20343bf64 100644 --- a/scripts/cmake/vcpkg_test_cmake.cmake +++ b/scripts/cmake/vcpkg_test_cmake.cmake @@ -16,43 +16,64 @@ ## Indicates that the library expects to be found via built-in CMake targets. ## function(vcpkg_test_cmake) - cmake_parse_arguments(_tc "MODULE" "PACKAGE_NAME" "" ${ARGN}) + # The following issues need to be addressed before re-enabling this function. + # 1. Use the actual vcpkg toolchain file. + # 2. Select a generator in the same method as vcpkg_configure_cmake() as though the PREFER_NINJA flag was always passed. + # 3. Fully emulate the toolchain file for the just-built package (just adding it to CMAKE_PREFIX_PATH is not enough). + return() - if(NOT DEFINED _tc_PACKAGE_NAME) - message(FATAL_ERROR "PACKAGE_NAME must be specified") - endif() - if(_tc_MODULE) - set(PACKAGE_TYPE MODULE) - else() - set(PACKAGE_TYPE CONFIG) - endif() + cmake_parse_arguments(_tc "MODULE" "PACKAGE_NAME" "" ${ARGN}) - if(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") - message(STATUS "Skipping CMake integration test due to v142 / CMake interaction issues") - return() - endif() + if(NOT DEFINED _tc_PACKAGE_NAME) + message(FATAL_ERROR "PACKAGE_NAME must be specified") + endif() + if(_tc_MODULE) + set(PACKAGE_TYPE MODULE) + else() + set(PACKAGE_TYPE CONFIG) + endif() - message(STATUS "Performing CMake integration test") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test) + if(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + message(STATUS "Skipping CMake integration test due to v142 / CMake interaction issues") + return() + endif() - # Generate test source CMakeLists.txt - set(VCPKG_TEST_CMAKELIST ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test/CMakeLists.txt) - file(WRITE ${VCPKG_TEST_CMAKELIST} "cmake_minimum_required(VERSION 3.10)\n") - file(APPEND ${VCPKG_TEST_CMAKELIST} "set(CMAKE_PREFIX_PATH \"${CURRENT_PACKAGES_DIR};${CURRENT_INSTALLED_DIR}\")\n") - file(APPEND ${VCPKG_TEST_CMAKELIST} "\n") - file(APPEND ${VCPKG_TEST_CMAKELIST} "find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)\n") + message(STATUS "Performing CMake integration test") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test) - # Run cmake config with a generated CMakeLists.txt - set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/test-cmake-${TARGET_TRIPLET}") - execute_process( - COMMAND ${CMAKE_COMMAND} . - OUTPUT_FILE "${LOGPREFIX}-out.log" - ERROR_FILE "${LOGPREFIX}-err.log" - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test - ) - if(error_code) - message(FATAL_ERROR "CMake integration test failed; unable to find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)") - endif() + #Generate Dummy source +# set(VCPKG_TEST_SOURCE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test/CMakeIntegration.cpp) +# file(WRITE ${VCPKG_TEST_SOURCE} "int main() \{\n") +# file(APPEND ${VCPKG_TEST_SOURCE} "return 0;}") + # Generate test source CMakeLists.txt + set(VCPKG_TEST_CMAKELIST ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test/CMakeLists.txt) + file(WRITE ${VCPKG_TEST_CMAKELIST} "cmake_minimum_required(VERSION 3.10)\n") + file(APPEND ${VCPKG_TEST_CMAKELIST} "set(CMAKE_PREFIX_PATH \"${CURRENT_PACKAGES_DIR};${CURRENT_INSTALLED_DIR}\")\n") + file(APPEND ${VCPKG_TEST_CMAKELIST} "\n") + file(APPEND ${VCPKG_TEST_CMAKELIST} "find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)\n") + #To properly test if the package is actually working haveway correctly we have to link all targets of a package to + #a test executable and than actually build it. This will not discover if every symbol exported by the library is available/linked + #but it will doscover if all files which are linked by a target actual exist. Problem is: How to discover all targets? +# file(APPEND ${VCPKG_TEST_CMAKELIST} "add_executable(${_tc_PACKAGE_NAME}_exe ${VCPKG_TEST_SOURCE})\n") +# file(APPEND ${VCPKG_TEST_CMAKELIST} "target_link_libraries(${_tc_PACKAGE_NAME}_exe PRIVATE ${_tc_PACKAGE_NAME})\n") + + if(DEFINED _VCPKG_CMAKE_GENERATOR) + set(VCPKG_CMAKE_TEST_GENERATOR "${_VCPKG_CMAKE_GENERATOR}") + else() + set(VCPKG_CMAKE_TEST_GENERATOR Ninja) + endif() + + # Run cmake config with a generated CMakeLists.txt + set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/test-cmake-${TARGET_TRIPLET}") + execute_process( + COMMAND ${CMAKE_COMMAND} -G ${VCPKG_CMAKE_TEST_GENERATOR} . + OUTPUT_FILE "${LOGPREFIX}-out.log" + ERROR_FILE "${LOGPREFIX}-err.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test + ) + if(error_code) + message(FATAL_ERROR "CMake integration test failed; unable to find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)") + endif() endfunction() diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake index 266e023b1..12b1ae7f9 100644 --- a/scripts/toolchains/windows.cmake +++ b/scripts/toolchains/windows.cmake @@ -9,7 +9,6 @@ if(NOT _CMAKE_IN_TRY_COMPILE) message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"")
endif()
- set(CHARSET_FLAG "/utf-8")
if(VCPKG_PLATFORM_TOOLSET MATCHES "v120")
# VS 2013 does not support /utf-8
set(CHARSET_FLAG)
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 18ca741c2..15f891979 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,25 +1,25 @@ <?xml version="1.0"?> <tools version="2"> <tool name="cmake" os="windows"> - <version>3.12.4</version> - <exeRelativePath>cmake-3.12.4-win32-x86\bin\cmake.exe</exeRelativePath> - <url>https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-win32-x86.zip</url> - <sha512>ca7097c5917101c39d5fa5325cd256ad3aa616a7e5811915cb2869c24961dc133726015b3576908fbd0666f89c8e31886bed9cf6b532a3fe44681d5245bc25c7</sha512> - <archiveName>cmake-3.12.4-win32-x86.zip</archiveName> + <version>3.14.0</version> + <exeRelativePath>cmake-3.14.0-win32-x86\bin\cmake.exe</exeRelativePath> + <url>https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-win32-x86.zip</url> + <sha512>60eb6a0790883da4152a957bd1133405f620f4b7a073af3bea97695b3ef8c22c41d9b90e45815f2a896df5be0cd6dedb73a6df5f17a42761ca8f457c9f3b708c</sha512> + <archiveName>cmake-3.14.0-win32-x86.zip</archiveName> </tool> <tool name="cmake" os="osx"> - <version>3.12.4</version> - <exeRelativePath>cmake-3.12.4-Darwin-x86_64/CMake.app/Contents/bin/cmake</exeRelativePath> - <url>https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-Darwin-x86_64.tar.gz</url> - <sha512>67ce23394d9679818ab0f2792f5d585c8c6f385e18584d488a47d48b768d1ee20b58247d22945aeff1ff9f84b7e843457dac98a50801ac3068ab1fbcbe0b0f45</sha512> - <archiveName>cmake-3.12.4-Darwin-x86_64.tar.gz</archiveName> + <version>3.14.0</version> + <exeRelativePath>cmake-3.14.0-Darwin-x86_64/CMake.app/Contents/bin/cmake</exeRelativePath> + <url>https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Darwin-x86_64.tar.gz</url> + <sha512>a5a7217a049be3bb2ef5c93292b1d92eb4dd5ec6ab2dd04984aae01d2732eb343cea4f9741b333a5e21a27eb7934f568f780f3558e7ff870150c3309fc4656b3</sha512> + <archiveName>cmake-3.14.0-Darwin-x86_64.tar.gz</archiveName> </tool> <tool name="cmake" os="linux"> - <version>3.12.4</version> - <exeRelativePath>cmake-3.12.4-Linux-x86_64/bin/cmake</exeRelativePath> - <url>https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-Linux-x86_64.tar.gz</url> - <sha512>ee9eded0c72e06ef99554f09553d40842478700ca6f07319c28247f1d45301708c703c65ad617cf618833257bacc3b9f63a54b32288bfb619d38758669dcd20f</sha512> - <archiveName>cmake-3.12.4-Linux-x86_64.tar.gz</archiveName> + <version>3.14.0</version> + <exeRelativePath>cmake-3.14.0-Linux-x86_64/bin/cmake</exeRelativePath> + <url>https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz</url> + <sha512>e687c0f3acfb15c880ddac67e2821907f833cb900c6ecedb4ab5df5102604d82753c948e3c7dca6e5bcce6278a09b7d577b1afade2e133aec5b2057ac48d3c74</sha512> + <archiveName>cmake-3.14.0-Linux-x86_64.tar.gz</archiveName> </tool> <tool name="cmake" os="freebsd"> <version>3.12.4</version> @@ -30,7 +30,7 @@ </tool> <tool name="git" os="windows"> <version>2.20.0</version> - <exeRelativePath>cmd\git.exe</exeRelativePath> + <exeRelativePath>mingw32\bin\git.exe</exeRelativePath> <url>https://github.com/git-for-windows/git/releases/download/v2.20.0.windows.1/PortableGit-2.20.0-32-bit.7z.exe</url> <sha512>81647a87df9fde0945ef597cb1cafd8f5f42859da89e9b1db55222a261407bc16bdcc0cf1e86e315697f0981832fe10fc02845cad4b4c82ea64bbd218aec6a49</sha512> <archiveName>PortableGit-2.20.0-32-bit.7z.exe</archiveName> diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index a06cbae78..e0c4cdd86 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.3)
+
project(vcpkg C CXX)
OPTION(DEFINE_DISABLE_METRICS "Option for disabling metrics" OFF)
+OPTION(VCPKG_ALLOW_APPLE_CLANG "Option for allowing apple clang" OFF)
if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(GCC 1)
@@ -11,14 +13,14 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") "Building the vcpkg tool requires support for the C++ Filesystem TS.
Apple clang versions 9 and below do not have support for it.
Please install gcc6 or newer from homebrew (brew install gcc6).
-If you would like to try anyway, set VCPKG_ALLOW_APPLE_CLANG.")
+If you would like to try anyway, pass --allowAppleClang to bootstrap.sh.")
else()
set(CLANG 1)
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
set(CLANG 1)
elseif(MSVC)
- add_compile_options(/std:c++latest)
+ add_compile_options(/std:c++17)
else()
message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
endif()
@@ -42,14 +44,34 @@ add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES}) target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=${DISABLE_METRICS_VALUE})
target_include_directories(vcpkg PRIVATE include)
-if(GCC)
+if(CLANG)
+ include(CheckCXXSourceCompiles)
+ check_cxx_source_compiles("#include <iostream>
+ int main() { return __GLIBCXX__; }" USES_LIBSTDCXX)
+ check_cxx_source_compiles("#include <iostream>
+ int main() { return _LIBCPP_VERSION; }" USES_LIBCXX)
+ if ( NOT USES_LIBSTDCXX AND NOT USES_LIBCXX )
+ message(FATAL_ERROR "Can't find which C++ runtime is in use")
+ endif()
+endif()
+
+if(GCC OR (CLANG AND USES_LIBSTDCXX))
target_link_libraries(vcpkg PRIVATE stdc++fs)
elseif(CLANG)
target_link_libraries(vcpkg PRIVATE c++experimental)
endif()
-if(WIN32)
- target_link_libraries(vcpkg PRIVATE bcrypt)
+if(MSVC)
+ get_target_property(_srcs vcpkg SOURCES)
+
+ if(NOT CMAKE_GENERATOR MATCHES "Visual Studio .*")
+ set_property(SOURCE src/pch.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/pch.pch")
+ set_property(SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pch.pch")
+ endif()
+
+ set_source_files_properties(src/pch.cpp PROPERTIES COMPILE_FLAGS "/Ycpch.h")
+ target_sources(vcpkg PRIVATE src/pch.cpp)
+ target_compile_options(vcpkg PRIVATE /Yupch.h /FIpch.h /Zm200)
endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 9c9deeb3f..fa2c2bb72 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -1,5 +1,15 @@ #pragma once +#if defined(_MSC_VER) && _MSC_VER < 1911 +// [[nodiscard]] is not recognized before VS 2017 version 15.3 +#pragma warning(disable : 5030) +#endif + +#if defined(__GNUC__) && __GNUC__ < 7 +// [[nodiscard]] is not recognized before GCC version 7 +#pragma GCC diagnostic ignored "-Wattributes" +#endif + #if defined(_WIN32) #define NOMINMAX #define WIN32_LEAN_AND_MEAN diff --git a/toolsrc/include/vcpkg/base/checks.h b/toolsrc/include/vcpkg/base/checks.h index bceee3428..3c0c073d2 100644 --- a/toolsrc/include/vcpkg/base/checks.h +++ b/toolsrc/include/vcpkg/base/checks.h @@ -6,7 +6,7 @@ namespace vcpkg::Checks { - void register_console_ctrl_handler(); + void register_global_shutdown_handler(void (*func)()); // Indicate that an internal error has occurred and exit the tool. This should be used when invariants have been // broken. @@ -21,7 +21,7 @@ namespace vcpkg::Checks [[noreturn]] inline void exit_success(const LineInfo& line_info) { exit_with_code(line_info, EXIT_SUCCESS); } // Display an error message to the user and exit the tool. - [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message); + [[noreturn]] void exit_with_message(const LineInfo& line_info, StringView error_message); template<class Arg1, class... Args> // Display an error message to the user and exit the tool. @@ -36,7 +36,7 @@ namespace vcpkg::Checks void check_exit(const LineInfo& line_info, bool expression); - void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message); + void check_exit(const LineInfo& line_info, bool expression, StringView error_message); template<class Conditional, class Arg1, class... Args> void check_exit(const LineInfo& line_info, diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h index 6f6e2b317..26294fdf8 100644 --- a/toolsrc/include/vcpkg/base/chrono.h +++ b/toolsrc/include/vcpkg/base/chrono.h @@ -1,8 +1,10 @@ #pragma once +#include <vcpkg/base/cstringview.h> +#include <vcpkg/base/optional.h> + #include <chrono> #include <string> -#include <vcpkg/base/optional.h> namespace vcpkg::Chrono { @@ -21,6 +23,7 @@ namespace vcpkg::Chrono } std::string to_string() const; + void to_string(std::string& into) const; private: std::chrono::high_resolution_clock::time_point::duration m_duration; @@ -41,6 +44,7 @@ namespace vcpkg::Chrono double microseconds() const { return elapsed().as<std::chrono::duration<double, std::micro>>().count(); } std::string to_string() const; + void to_string(std::string& into) const; private: std::chrono::high_resolution_clock::time_point m_start_tick; @@ -65,5 +69,7 @@ namespace vcpkg::Chrono mutable tm m_tm; }; + tm get_current_date_time(); + tm get_current_date_time_local(); } diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index f285aa36c..d49bfc82f 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -1,6 +1,6 @@ #pragma once -#include <string.h> +#include <cstring> #include <string> namespace vcpkg @@ -14,6 +14,8 @@ namespace vcpkg constexpr const char* c_str() const { return cstr; } + void to_string(std::string& str) const { str.append(cstr); } + private: const char* cstr; }; diff --git a/toolsrc/include/vcpkg/base/expected.h b/toolsrc/include/vcpkg/base/expected.h index e20f723db..c273d71e6 100644 --- a/toolsrc/include/vcpkg/base/expected.h +++ b/toolsrc/include/vcpkg/base/expected.h @@ -1,6 +1,7 @@ #pragma once #include <vcpkg/base/checks.h> +#include <vcpkg/base/stringliteral.h> #include <system_error> @@ -20,7 +21,7 @@ namespace vcpkg const Err& error() const { return m_err; } Err& error() { return m_err; } - CStringView to_string() const { return "value was error"; } + StringLiteral to_string() const { return "value was error"; } private: bool m_is_error; @@ -28,6 +29,27 @@ namespace vcpkg }; template<> + struct ErrorHolder<std::string> + { + ErrorHolder() : m_is_error(false) {} + template<class U> + ErrorHolder(U&& err) : m_is_error(true), m_err(std::forward<U>(err)) + { + } + + bool has_error() const { return m_is_error; } + + const std::string& error() const { return m_err; } + std::string& error() { return m_err; } + + const std::string& to_string() const { return m_err; } + + private: + bool m_is_error; + std::string m_err; + }; + + template<> struct ErrorHolder<std::error_code> { ErrorHolder() = default; @@ -38,12 +60,21 @@ namespace vcpkg const std::error_code& error() const { return m_err; } std::error_code& error() { return m_err; } - CStringView to_string() const { return m_err.message(); } + std::string to_string() const { return m_err.message(); } private: std::error_code m_err; }; + struct ExpectedLeftTag + { + }; + struct ExpectedRightTag + { + }; + constexpr ExpectedLeftTag expected_left_tag; + constexpr ExpectedRightTag expected_right_tag; + template<class T, class S> class ExpectedT { @@ -52,11 +83,11 @@ namespace vcpkg // Constructors are intentionally implicit - ExpectedT(const S& s) : m_s(s) {} - ExpectedT(S&& s) : m_s(std::move(s)) {} + ExpectedT(const S& s, ExpectedRightTag = {}) : m_s(s) {} + ExpectedT(S&& s, ExpectedRightTag = {}) : m_s(std::move(s)) {} - ExpectedT(const T& t) : m_t(t) {} - ExpectedT(T&& t) : m_t(std::move(t)) {} + ExpectedT(const T& t, ExpectedLeftTag = {}) : m_t(t) {} + ExpectedT(T&& t, ExpectedLeftTag = {}) : m_t(std::move(t)) {} ExpectedT(const ExpectedT&) = default; ExpectedT(ExpectedT&&) = default; diff --git a/toolsrc/include/vcpkg/base/graphs.h b/toolsrc/include/vcpkg/base/graphs.h index 6cff75ad3..46831a911 100644 --- a/toolsrc/include/vcpkg/base/graphs.h +++ b/toolsrc/include/vcpkg/base/graphs.h @@ -2,10 +2,11 @@ #include <unordered_map> #include <unordered_set> +#include <utility> #include <vcpkg/base/checks.h> #include <vcpkg/base/span.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> namespace vcpkg::Graphs { @@ -66,12 +67,12 @@ namespace vcpkg::Graphs case ExplorationStatus::FULLY_EXPLORED: return; case ExplorationStatus::PARTIALLY_EXPLORED: { - System::println("Cycle detected within graph at %s:", f.to_string(vertex)); + System::print2("Cycle detected within graph at ", f.to_string(vertex), ":\n"); for (auto&& node : exploration_status) { if (node.second == ExplorationStatus::PARTIALLY_EXPLORED) { - System::println(" %s", f.to_string(node.first)); + System::print2(" ", f.to_string(node.first), '\n'); } } Checks::exit_fail(VCPKG_LINE_INFO); diff --git a/toolsrc/include/vcpkg/base/lineinfo.h b/toolsrc/include/vcpkg/base/lineinfo.h index e0eb8bec9..2f03fef16 100644 --- a/toolsrc/include/vcpkg/base/lineinfo.h +++ b/toolsrc/include/vcpkg/base/lineinfo.h @@ -6,13 +6,15 @@ namespace vcpkg { struct LineInfo { - int line_number; - const char* file_name; - - constexpr LineInfo() noexcept : line_number(0), file_name("") {} - constexpr LineInfo(const int lineno, const char* filename) : line_number(lineno), file_name(filename) {} + constexpr LineInfo() noexcept : m_line_number(0), m_file_name("") {} + constexpr LineInfo(const int lineno, const char* filename) : m_line_number(lineno), m_file_name(filename) {} std::string to_string() const; + void to_string(std::string& out) const; + + private: + int m_line_number; + const char* m_file_name; }; } diff --git a/toolsrc/include/vcpkg/base/optional.h b/toolsrc/include/vcpkg/base/optional.h index 6b84b10aa..4d386a961 100644 --- a/toolsrc/include/vcpkg/base/optional.h +++ b/toolsrc/include/vcpkg/base/optional.h @@ -1,6 +1,9 @@ #pragma once -#include <vcpkg/base/checks.h> +#include <vcpkg/base/lineinfo.h> + +#include <type_traits> +#include <utility> namespace vcpkg { @@ -13,25 +16,146 @@ namespace vcpkg namespace details { - template<class T> + template<class T, bool B = std::is_copy_constructible<T>::value> struct OptionalStorage { - constexpr OptionalStorage() noexcept : m_is_present(false), m_t() {} + constexpr OptionalStorage() noexcept : m_is_present(false), m_inactive() {} constexpr OptionalStorage(const T& t) : m_is_present(true), m_t(t) {} constexpr OptionalStorage(T&& t) : m_is_present(true), m_t(std::move(t)) {} + ~OptionalStorage() noexcept + { + if (m_is_present) m_t.~T(); + } + + OptionalStorage(const OptionalStorage& o) : m_is_present(o.m_is_present), m_inactive() + { + if (m_is_present) new (&m_t) T(o.m_t); + } + + OptionalStorage(OptionalStorage&& o) : m_is_present(o.m_is_present), m_inactive() + { + if (m_is_present) + { + new (&m_t) T(std::move(o.m_t)); + } + } + + OptionalStorage& operator=(const OptionalStorage& o) + { + if (m_is_present && o.m_is_present) + { + m_t = o.m_t; + } + else if (!m_is_present && o.m_is_present) + { + m_is_present = true; + new (&m_t) T(o.m_t); + } + else if (m_is_present && !o.m_is_present) + { + clear(); + } + return *this; + } + + OptionalStorage& operator=(OptionalStorage&& o) + { + if (m_is_present && o.m_is_present) + { + m_t = std::move(o.m_t); + } + else if (!m_is_present && o.m_is_present) + { + m_is_present = true; + new (&m_t) T(std::move(o.m_t)); + } + else if (m_is_present && !o.m_is_present) + { + clear(); + } + return *this; + } + constexpr bool has_value() const { return m_is_present; } const T& value() const { return this->m_t; } T& value() { return this->m_t; } private: + void clear() + { + m_is_present = false; + m_t.~T(); + m_inactive = '\0'; + } + bool m_is_present; - T m_t; + union { + char m_inactive; + T m_t; + }; }; template<class T> - struct OptionalStorage<T&> + struct OptionalStorage<T, false> + { + constexpr OptionalStorage() noexcept : m_is_present(false), m_inactive() {} + constexpr OptionalStorage(T&& t) : m_is_present(true), m_t(std::move(t)) {} + + ~OptionalStorage() noexcept + { + if (m_is_present) m_t.~T(); + } + + OptionalStorage(OptionalStorage&& o) : m_is_present(o.m_is_present), m_inactive() + { + if (m_is_present) + { + new (&m_t) T(std::move(o.m_t)); + } + } + + OptionalStorage& operator=(OptionalStorage&& o) + { + if (m_is_present && o.m_is_present) + { + m_t = std::move(o.m_t); + } + else if (!m_is_present && o.m_is_present) + { + m_is_present = true; + new (&m_t) T(std::move(o.m_t)); + } + else if (m_is_present && !o.m_is_present) + { + clear(); + } + return *this; + } + + constexpr bool has_value() const { return m_is_present; } + + const T& value() const { return this->m_t; } + T& value() { return this->m_t; } + + private: + void clear() + { + m_is_present = false; + m_t.~T(); + m_inactive = '\0'; + } + + bool m_is_present; + union { + char m_inactive; + T m_t; + }; + }; + + template<class T, bool B> + struct OptionalStorage<T&, B> { constexpr OptionalStorage() noexcept : m_t(nullptr) {} constexpr OptionalStorage(T& t) : m_t(&t) {} @@ -43,6 +167,9 @@ namespace vcpkg private: T* m_t; }; + + // Note: implemented in checks.cpp to cut the header dependency + void exit_if_null(bool b, const LineInfo& line_info); } template<class T> @@ -53,26 +180,26 @@ namespace vcpkg // Constructors are intentionally implicit constexpr Optional(NullOpt) {} - template<class U> - Optional(U&& t) : m_base(std::forward<U>(t)) + template<class U, class = std::enable_if_t<!std::is_same<std::decay_t<U>, Optional>::value>> + constexpr Optional(U&& t) : m_base(std::forward<U>(t)) { } T&& value_or_exit(const LineInfo& line_info) && { - this->exit_if_null(line_info); + details::exit_if_null(this->m_base.has_value(), line_info); return std::move(this->m_base.value()); } T& value_or_exit(const LineInfo& line_info) & { - this->exit_if_null(line_info); + details::exit_if_null(this->m_base.has_value(), line_info); return this->m_base.value(); } const T& value_or_exit(const LineInfo& line_info) const& { - this->exit_if_null(line_info); + details::exit_if_null(this->m_base.has_value(), line_info); return this->m_base.value(); } @@ -101,11 +228,6 @@ namespace vcpkg typename std::add_pointer<T>::type get() { return this->m_base.has_value() ? &this->m_base.value() : nullptr; } private: - void exit_if_null(const LineInfo& line_info) const - { - Checks::check_exit(line_info, this->m_base.has_value(), "Value was null"); - } - details::OptionalStorage<T> m_base; }; diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h index 2b067d0ac..4c805e2b4 100644 --- a/toolsrc/include/vcpkg/base/span.h +++ b/toolsrc/include/vcpkg/base/span.h @@ -11,8 +11,9 @@ namespace vcpkg struct Span
{
public:
- static_assert(!std::is_reference<T>::value, "Span<&> is illegal");
+ static_assert(std::is_object<T>::value, "Span<non-object-type> is illegal");
+ using value_type = std::decay_t<T>;
using element_type = T;
using pointer = std::add_pointer_t<T>;
using reference = std::add_lvalue_reference_t<T>;
@@ -30,46 +31,28 @@ namespace vcpkg }
template<size_t N>
- constexpr Span(const std::array<std::remove_const_t<T>, N>& arr) noexcept
- : m_ptr(arr.data()), m_count(arr.size())
+ constexpr Span(std::remove_const_t<T> (&arr)[N]) noexcept : m_ptr(arr), m_count(N)
{
}
- Span(std::vector<T>& v) noexcept : Span(v.data(), v.size()) {}
- Span(const std::vector<std::remove_const_t<T>>& v) noexcept : Span(v.data(), v.size()) {}
+ template<class Range,
+ class = decltype(std::declval<Range>().data()),
+ class = std::enable_if_t<!std::is_same<std::decay_t<Range>, Span>::value>>
+ constexpr Span(Range&& v) noexcept : Span(v.data(), v.size())
+ {
+ static_assert(std::is_same<typename std::decay_t<Range>::value_type, value_type>::value,
+ "Cannot convert incompatible ranges");
+ }
constexpr iterator begin() const { return m_ptr; }
constexpr iterator end() const { return m_ptr + m_count; }
constexpr reference operator[](size_t i) const { return m_ptr[i]; }
+ constexpr pointer data() const { return m_ptr; }
constexpr size_t size() const { return m_count; }
private:
pointer m_ptr;
size_t m_count;
};
-
- template<class T>
- Span<T> make_span(std::vector<T>& v)
- {
- return {v.data(), v.size()};
- }
-
- template<class T>
- Span<const T> make_span(const std::vector<T>& v)
- {
- return {v.data(), v.size()};
- }
-
- template<class T>
- constexpr T* begin(Span<T> sp)
- {
- return sp.begin();
- }
-
- template<class T>
- constexpr T* end(Span<T> sp)
- {
- return sp.end();
- }
}
diff --git a/toolsrc/include/vcpkg/base/stringliteral.h b/toolsrc/include/vcpkg/base/stringliteral.h index 9970adc2a..602e0bfd2 100644 --- a/toolsrc/include/vcpkg/base/stringliteral.h +++ b/toolsrc/include/vcpkg/base/stringliteral.h @@ -1,27 +1,17 @@ #pragma once -#include <vcpkg/base/cstringview.h> +#include <string> +#include <vcpkg/base/zstringview.h> namespace vcpkg { - struct StringLiteral + struct StringLiteral : ZStringView { template<int N> - constexpr StringLiteral(const char (&str)[N]) - : m_size(N - 1) /* -1 here accounts for the null byte at the end*/, m_cstr(str) + constexpr StringLiteral(const char (&str)[N]) : ZStringView(str) { } - constexpr const char* c_str() const { return m_cstr; } - constexpr size_t size() const { return m_size; } - - operator CStringView() const { return m_cstr; } - operator std::string() const { return m_cstr; } - - private: - size_t m_size; - const char* m_cstr; + operator std::string() const { return std::string(data(), size()); } }; - - inline const char* to_printf_arg(const StringLiteral str) { return str.c_str(); } } diff --git a/toolsrc/include/vcpkg/base/stringrange.h b/toolsrc/include/vcpkg/base/stringrange.h deleted file mode 100644 index 6126ec48f..000000000 --- a/toolsrc/include/vcpkg/base/stringrange.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include <vcpkg/base/optional.h> - -#include <string> -#include <vector> - -namespace vcpkg -{ - struct StringRange - { - static std::vector<StringRange> find_all_enclosed(const StringRange& input, - const std::string& left_delim, - const std::string& right_delim); - - static StringRange find_exactly_one_enclosed(const StringRange& input, - const std::string& left_tag, - const std::string& right_tag); - - static Optional<StringRange> find_at_most_one_enclosed(const StringRange& input, - const std::string& left_tag, - const std::string& right_tag); - - StringRange() = default; - StringRange(const std::string& s); // Implicit by design - StringRange(const std::string::const_iterator begin, const std::string::const_iterator end); - - std::string::const_iterator begin; - std::string::const_iterator end; - - std::string to_string() const; - }; -} diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 4b39b0a28..3165dc8ee 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -1,7 +1,10 @@ #pragma once #include <vcpkg/base/cstringview.h> +#include <vcpkg/base/optional.h> #include <vcpkg/base/stringliteral.h> +#include <vcpkg/base/stringview.h> +#include <vcpkg/base/view.h> #include <vector> @@ -24,10 +27,63 @@ namespace vcpkg::Strings::details } std::string format_internal(const char* fmtstr, ...); + + inline void append_internal(std::string& into, char c) { into += c; } + template<class T, class = decltype(std::to_string(std::declval<T>()))> + inline void append_internal(std::string& into, T x) + { + into += std::to_string(x); + } + inline void append_internal(std::string& into, const char* v) { into.append(v); } + inline void append_internal(std::string& into, const std::string& s) { into.append(s); } + + template<class T, class = decltype(std::declval<const T&>().to_string(std::declval<std::string&>()))> + void append_internal(std::string& into, const T& t) + { + t.to_string(into); + } + + template<class T, class=void, class = decltype(to_string(std::declval<std::string&>(), std::declval<const T&>()))> + void append_internal(std::string& into, const T& t) + { + to_string(into, t); + } } namespace vcpkg::Strings { + template<class Arg> + std::string& append(std::string& into, const Arg& a) + { + details::append_internal(into, a); + return into; + } + template<class Arg, class... Args> + std::string& append(std::string& into, const Arg& a, const Args&... args) + { + append(into, a); + return append(into, args...); + } + + template<class... Args> + [[nodiscard]] std::string concat(const Args&... args) { + std::string ret; + append(ret, args...); + return ret; + } + + template<class... Args, class = void> + std::string concat_or_view(const Args&... args) + { + return Strings::concat(args...); + } + + template<class T, class = std::enable_if_t<std::is_convertible<T, StringView>::value>> + StringView concat_or_view(const T& v) + { + return v; + } + template<class... Args> std::string format(const char* fmtstr, const Args&... args) { @@ -36,32 +92,30 @@ namespace vcpkg::Strings } #if defined(_WIN32) - std::wstring to_utf16(const CStringView& s); + std::wstring to_utf16(StringView s); std::string to_utf8(const wchar_t* w); + inline std::string to_utf8(const std::wstring& ws) { return to_utf8(ws.c_str()); } #endif - std::string escape_string(const CStringView& s, char char_to_escape, char escape_char); + std::string escape_string(std::string&& s, char char_to_escape, char escape_char); - std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern); + bool case_insensitive_ascii_contains(StringView s, StringView pattern); - bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern); + bool case_insensitive_ascii_equals(StringView left, StringView right); - bool case_insensitive_ascii_equals(const CStringView left, const CStringView right); + std::string ascii_to_lowercase(std::string&& s); - std::string ascii_to_lowercase(std::string s); + std::string ascii_to_uppercase(std::string&& s); - std::string ascii_to_uppercase(std::string s); + bool case_insensitive_ascii_starts_with(StringView s, StringView pattern); + bool ends_with(StringView s, StringView pattern); + bool starts_with(StringView s, StringView pattern); - bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); - bool ends_with(const std::string& s, StringLiteral pattern); - - template<class Container, class Transformer> - std::string join(const char* delimiter, const Container& v, Transformer transformer) + template<class InputIterator, class Transformer> + std::string join(const char* delimiter, InputIterator begin, InputIterator end, + Transformer transformer) { - const auto begin = v.begin(); - const auto end = v.end(); - if (begin == end) { return std::string(); @@ -77,6 +131,24 @@ namespace vcpkg::Strings return output; } + + template<class Container, class Transformer> + std::string join(const char* delimiter, const Container& v, Transformer transformer) + { + const auto begin = v.begin(); + const auto end = v.end(); + + return join(delimiter, begin, end, transformer); + } + + template<class InputIterator> + std::string join(const char* delimiter, InputIterator begin, InputIterator end) + { + using Element = decltype(*begin); + return join(delimiter, begin, end, + [](const Element& x) -> const Element& { return x; }); + } + template<class Container> std::string join(const char* delimiter, const Container& v) { @@ -84,7 +156,7 @@ namespace vcpkg::Strings return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); } - std::string replace_all(std::string&& s, const std::string& search, const std::string& rep); + std::string replace_all(std::string&& s, const std::string& search, StringView rep); std::string trim(std::string&& s); @@ -92,6 +164,16 @@ namespace vcpkg::Strings std::vector<std::string> split(const std::string& s, const std::string& delimiter); + std::vector<std::string> split(const std::string& s, const std::string& delimiter, int max_count); + + std::vector<StringView> find_all_enclosed(StringView input, StringView left_delim, StringView right_delim); + + StringView find_exactly_one_enclosed(StringView input, StringView left_tag, StringView right_tag); + + Optional<StringView> find_at_most_one_enclosed(StringView input, StringView left_tag, StringView right_tag); + + bool equals(StringView a, StringView b); + template<class T> std::string serialize(const T& t) { @@ -99,4 +181,8 @@ namespace vcpkg::Strings serialize(t, ret); return ret; } + + const char* search(StringView haystack, StringView needle); + + bool contains(StringView haystack, StringView needle); } diff --git a/toolsrc/include/vcpkg/base/stringview.h b/toolsrc/include/vcpkg/base/stringview.h new file mode 100644 index 000000000..fef5bef4e --- /dev/null +++ b/toolsrc/include/vcpkg/base/stringview.h @@ -0,0 +1,49 @@ +#pragma once + +#include <vcpkg/base/optional.h> + +#include <string> +#include <vector> + +namespace vcpkg +{ + struct StringView + { + static std::vector<StringView> find_all_enclosed(const StringView& input, + const std::string& left_delim, + const std::string& right_delim); + + static StringView find_exactly_one_enclosed(const StringView& input, + const std::string& left_tag, + const std::string& right_tag); + + static Optional<StringView> find_at_most_one_enclosed(const StringView& input, + const std::string& left_tag, + const std::string& right_tag); + + constexpr StringView() = default; + StringView(const std::string& s); // Implicit by design + template<size_t Sz> + StringView(const char (&arr)[Sz]) : m_ptr(arr), m_size(Sz - 1) + { + } + + constexpr StringView(const char* ptr, size_t size) : m_ptr(ptr), m_size(size) {} + constexpr StringView(const char* b, const char* e) : m_ptr(b), m_size(static_cast<size_t>(e - b)) {} + + constexpr const char* begin() const { return m_ptr; } + constexpr const char* end() const { return m_ptr + m_size; } + + constexpr const char* data() const { return m_ptr; } + constexpr size_t size() const { return m_size; } + + std::string to_string() const; + void to_string(std::string& out) const; + + bool operator==(StringView other) const; + + private: + const char* m_ptr = 0; + size_t m_size = 0; + }; +} diff --git a/toolsrc/include/vcpkg/base/system.debug.h b/toolsrc/include/vcpkg/base/system.debug.h new file mode 100644 index 000000000..d9c50ac8e --- /dev/null +++ b/toolsrc/include/vcpkg/base/system.debug.h @@ -0,0 +1,50 @@ +#pragma once + +#include <vcpkg/base/chrono.h> +#include <vcpkg/base/system.print.h> + +#include <atomic> + +namespace vcpkg::Debug +{ + extern std::atomic<bool> g_debugging; + + template<class... Args> + void print(System::Color c, const Args&... args) + { + if (g_debugging) System::print2(c, "[DEBUG] ", args...); + } + + template<class... Args> + void print(const Args&... args) + { + if (g_debugging) System::print2("[DEBUG] ", args...); + } + + template<class F, class R = std::result_of_t<F && ()>, class = std::enable_if_t<!std::is_void<R>::value>> + R time(LineInfo line, F&& f) + { + if (g_debugging) + { + auto timer = Chrono::ElapsedTimer::create_started(); + auto&& result = f(); + System::print2("[DEBUG] ", line, " took ", timer, '\n'); + return static_cast<R&&>(result); + } + else + return f(); + } + + template<class F, class R = std::result_of_t<F && ()>, class = std::enable_if_t<std::is_void<R>::value>> + void time(LineInfo line, F&& f) + { + if (g_debugging) + { + auto timer = Chrono::ElapsedTimer::create_started(); + f(); + System::print2("[DEBUG] ", line, " took ", timer, '\n'); + } + else + f(); + } +} diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index af56e45c1..0245b684a 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -1,85 +1,15 @@ #pragma once -#include <unordered_map> - #include <vcpkg/base/files.h> #include <vcpkg/base/optional.h> -#include <vcpkg/base/strings.h> +#include <vcpkg/base/stringview.h> +#include <vcpkg/base/zstringview.h> namespace vcpkg::System { - fs::path get_exe_path_of_current_process(); - - struct CMakeVariable - { - CMakeVariable(const CStringView varname, const char* varvalue); - CMakeVariable(const CStringView varname, const std::string& varvalue); - CMakeVariable(const CStringView varname, const fs::path& path); - - std::string s; - }; - - std::string make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector<CMakeVariable>& pass_variables); - - struct ExitCodeAndOutput - { - int exit_code; - std::string output; - }; + Optional<std::string> get_environment_variable(ZStringView varname) noexcept; - int cmd_execute_clean(const CStringView cmd_line, - const std::unordered_map<std::string, std::string>& extra_env = {}) noexcept; - - int cmd_execute(const CStringView cmd_line) noexcept; - -#if defined(_WIN32) - void cmd_execute_no_wait(const CStringView cmd_line) noexcept; -#endif - - ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line) noexcept; - - enum class Color - { - success = 10, - error = 12, - warning = 14, - }; - - void println(); - void print(const CStringView message); - void println(const CStringView message); - void print(const Color c, const CStringView message); - void println(const Color c, const CStringView message); - - template<class Arg1, class... Args> - void print(const char* message_template, const Arg1& message_arg1, const Args&... message_args) - { - return System::print(Strings::format(message_template, message_arg1, message_args...)); - } - - template<class Arg1, class... Args> - void print(const Color c, const char* message_template, const Arg1& message_arg1, const Args&... message_args) - { - return System::print(c, Strings::format(message_template, message_arg1, message_args...)); - } - - template<class Arg1, class... Args> - void println(const char* message_template, const Arg1& message_arg1, const Args&... message_args) - { - return System::println(Strings::format(message_template, message_arg1, message_args...)); - } - - template<class Arg1, class... Args> - void println(const Color c, const char* message_template, const Arg1& message_arg1, const Args&... message_args) - { - return System::println(c, Strings::format(message_template, message_arg1, message_args...)); - } - - Optional<std::string> get_environment_variable(const CStringView varname) noexcept; - - Optional<std::string> get_registry_string(void* base_hkey, const CStringView subkey, const CStringView valuename); + Optional<std::string> get_registry_string(void* base_hkey, StringView subkey, StringView valuename); enum class CPUArchitecture { @@ -89,7 +19,7 @@ namespace vcpkg::System ARM64, }; - Optional<CPUArchitecture> to_cpu_architecture(const CStringView& arch); + Optional<CPUArchitecture> to_cpu_architecture(StringView arch); CPUArchitecture get_host_processor(); @@ -99,24 +29,3 @@ namespace vcpkg::System const Optional<fs::path>& get_program_files_platform_bitness(); } - -namespace vcpkg::Debug -{ - void println(const CStringView message); - void println(const System::Color c, const CStringView message); - - template<class Arg1, class... Args> - void println(const char* message_template, const Arg1& message_arg1, const Args&... message_args) - { - return Debug::println(Strings::format(message_template, message_arg1, message_args...)); - } - - template<class Arg1, class... Args> - void println(const System::Color c, - const char* message_template, - const Arg1& message_arg1, - const Args&... message_args) - { - return Debug::println(c, Strings::format(message_template, message_arg1, message_args...)); - } -} diff --git a/toolsrc/include/vcpkg/base/system.print.h b/toolsrc/include/vcpkg/base/system.print.h new file mode 100644 index 000000000..890c13667 --- /dev/null +++ b/toolsrc/include/vcpkg/base/system.print.h @@ -0,0 +1,44 @@ +#pragma once + +#include <vcpkg/base/strings.h> +#include <vcpkg/base/view.h> + +namespace vcpkg::System +{ + enum class Color + { + success = 10, + error = 12, + warning = 14, + }; + + namespace details + { + void print(StringView message); + void print(const Color c, StringView message); + } + + template<class Arg1, class... Args> + void printf(const char* message_template, const Arg1& message_arg1, const Args&... message_args) + { + return ::vcpkg::System::details::print(Strings::format(message_template, message_arg1, message_args...)); + } + + template<class Arg1, class... Args> + void printf(const Color c, const char* message_template, const Arg1& message_arg1, const Args&... message_args) + { + return ::vcpkg::System::details::print(c, Strings::format(message_template, message_arg1, message_args...)); + } + + template<class... Args> + void print2(const Color c, const Args&... args) + { + ::vcpkg::System::details::print(c, Strings::concat_or_view(args...)); + } + + template<class... Args> + void print2(const Args&... args) + { + ::vcpkg::System::details::print(Strings::concat_or_view(args...)); + } +} diff --git a/toolsrc/include/vcpkg/base/system.process.h b/toolsrc/include/vcpkg/base/system.process.h new file mode 100644 index 000000000..e409ff950 --- /dev/null +++ b/toolsrc/include/vcpkg/base/system.process.h @@ -0,0 +1,45 @@ +#pragma once + +#include <vcpkg/base/files.h> +#include <vcpkg/base/zstringview.h> + +#include <string> +#include <unordered_map> +#include <vector> + +namespace vcpkg::System +{ + struct CMakeVariable + { + CMakeVariable(const StringView varname, const char* varvalue); + CMakeVariable(const StringView varname, const std::string& varvalue); + CMakeVariable(const StringView varname, const fs::path& path); + + std::string s; + }; + + std::string make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector<CMakeVariable>& pass_variables); + + fs::path get_exe_path_of_current_process(); + + struct ExitCodeAndOutput + { + int exit_code; + std::string output; + }; + + int cmd_execute_clean(const ZStringView cmd_line, + const std::unordered_map<std::string, std::string>& extra_env = {}); + + int cmd_execute(const ZStringView cmd_line); + +#if defined(_WIN32) + void cmd_execute_no_wait(const StringView cmd_line); +#endif + + ExitCodeAndOutput cmd_execute_and_capture_output(const ZStringView cmd_line); + + void register_console_ctrl_handler(); +} diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 65ce02b99..213adb67c 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -10,7 +10,8 @@ namespace vcpkg::Util { template<class Container> - using ElementT = std::remove_reference_t<decltype(*begin(std::declval<Container>()))>; + using ElementT = + std::remove_reference_t<decltype(*std::declval<typename std::remove_reference_t<Container>::iterator>())>; namespace Vectors { @@ -41,11 +42,11 @@ namespace vcpkg::Util } } - template<class Cont, class Func> - using FmapOut = decltype(std::declval<Func&>()(*begin(std::declval<Cont&>()))); + template<class Range, class Func> + using FmapOut = std::remove_reference_t<decltype(std::declval<Func&>()(*std::declval<Range>().begin()))>; - template<class Cont, class Func, class Out = FmapOut<Cont, Func>> - std::vector<Out> fmap(Cont&& xs, Func&& f) + template<class Range, class Func, class Out = FmapOut<Range, Func>> + std::vector<Out> fmap(Range&& xs, Func&& f) { std::vector<Out> ret; ret.reserve(xs.size()); @@ -93,12 +94,6 @@ namespace vcpkg::Util return std::find_if(begin(cont), end(cont), pred); } - template<class Container, class T = ElementT<Container>> - std::vector<T*> element_pointers(Container&& cont) - { - return fmap(cont, [](auto&& x) { return &x; }); - } - template<class Container, class Pred> auto find_if_not(Container&& cont, Pred pred) { diff --git a/toolsrc/include/vcpkg/base/view.h b/toolsrc/include/vcpkg/base/view.h new file mode 100644 index 000000000..8a9c40994 --- /dev/null +++ b/toolsrc/include/vcpkg/base/view.h @@ -0,0 +1,9 @@ +#pragma once
+
+#include <vcpkg/base/span.h>
+
+namespace vcpkg
+{
+ template<class T>
+ using View = Span<const T>;
+}
diff --git a/toolsrc/include/vcpkg/base/zstringview.h b/toolsrc/include/vcpkg/base/zstringview.h new file mode 100644 index 000000000..7f80bf726 --- /dev/null +++ b/toolsrc/include/vcpkg/base/zstringview.h @@ -0,0 +1,52 @@ +#pragma once + +#include <algorithm> +#include <cstddef> +#include <cstring> +#include <string> + +#include <vcpkg/base/stringview.h> + +namespace vcpkg +{ + // A counted view of a null-terminated string + struct ZStringView + { + using value_type = char; + + constexpr ZStringView() : m_size(0), m_cstr("") {} + + template<int N> + constexpr ZStringView(const char (&str)[N]) + : m_size(N - 1) /* -1 here accounts for the null byte at the end*/, m_cstr(str) + { + } + + ZStringView(const std::string& s) : m_size(s.size()), m_cstr(s.c_str()) {} + constexpr ZStringView(const char* str, size_t sz) : m_size(sz), m_cstr(str) {} + + constexpr const char* data() const { return m_cstr; } + constexpr size_t size() const { return m_size; } + constexpr char operator[](ptrdiff_t off) const { return m_cstr[off]; } + + constexpr const char* c_str() const { return m_cstr; } + + constexpr const char* begin() const { return m_cstr; } + constexpr const char* end() const { return m_cstr + m_size; } + + std::string to_string() const { return std::string(m_cstr, m_size); } + void to_string(std::string& out) const { out.append(m_cstr, m_size); } + + constexpr operator StringView() const { return StringView(m_cstr, m_size); } + + private: + size_t m_size; + const char* m_cstr; + }; + + inline bool operator==(ZStringView l, ZStringView r) { return std::equal(l.begin(), l.end(), r.begin(), r.end()); } + inline bool operator!=(ZStringView l, ZStringView r) { return !std::equal(l.begin(), l.end(), r.begin(), r.end()); } + + inline bool operator==(const char* l, ZStringView r) { return strcmp(l, r.c_str()) == 0; } + inline bool operator==(ZStringView l, const char* r) { return strcmp(l.c_str(), r) == 0; } +} diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index fd7d832b3..6a94b389a 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -55,6 +55,7 @@ namespace vcpkg::Commands namespace DependInfo { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg/globalstate.h b/toolsrc/include/vcpkg/globalstate.h index ae66ca355..2026ea369 100644 --- a/toolsrc/include/vcpkg/globalstate.h +++ b/toolsrc/include/vcpkg/globalstate.h @@ -4,6 +4,7 @@ #include <vcpkg/base/util.h> #include <atomic> +#include <string> namespace vcpkg { @@ -19,26 +20,5 @@ namespace vcpkg static std::atomic<int> g_init_console_cp; static std::atomic<int> g_init_console_output_cp; static std::atomic<bool> g_init_console_initialized; - - struct CtrlCStateMachine - { - CtrlCStateMachine(); - - void transition_to_spawn_process() noexcept; - void transition_from_spawn_process() noexcept; - void transition_handle_ctrl_c() noexcept; - - private: - enum class CtrlCState - { - normal, - blocked_on_child, - exit_requested, - }; - - std::atomic<CtrlCState> m_state; - }; - - static CtrlCStateMachine g_ctrl_c_state; }; } diff --git a/toolsrc/include/vcpkg/input.h b/toolsrc/include/vcpkg/input.h index 621139427..ef481bf52 100644 --- a/toolsrc/include/vcpkg/input.h +++ b/toolsrc/include/vcpkg/input.h @@ -4,10 +4,10 @@ namespace vcpkg::Input { - PackageSpec check_and_get_package_spec(const std::string& package_spec_as_string, + PackageSpec check_and_get_package_spec(std::string&& spec_string, const Triplet& default_triplet, CStringView example_text); - FullPackageSpec check_and_get_full_package_spec(const std::string& full_package_spec_as_string, + FullPackageSpec check_and_get_full_package_spec(std::string&& spec_string, const Triplet& default_triplet, CStringView example_text); diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 299a9c401..c87c6a2c6 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -35,6 +35,7 @@ namespace vcpkg std::string dir() const; std::string to_string() const; + void to_string(std::string& s) const; bool operator<(const PackageSpec& other) const { @@ -65,6 +66,7 @@ namespace vcpkg const PackageSpec& spec() const { return m_spec; } std::string to_string() const; + void to_string(std::string& out) const; static std::vector<FeatureSpec> from_strings_and_triplet(const std::vector<std::string>& depends, const Triplet& t); diff --git a/toolsrc/include/vcpkg/packagespecparseresult.h b/toolsrc/include/vcpkg/packagespecparseresult.h index be3497152..4c99c84c7 100644 --- a/toolsrc/include/vcpkg/packagespecparseresult.h +++ b/toolsrc/include/vcpkg/packagespecparseresult.h @@ -12,6 +12,8 @@ namespace vcpkg INVALID_CHARACTERS }; + void to_string(std::string& out, ::vcpkg::PackageSpecParseResult p); + CStringView to_string(PackageSpecParseResult ev) noexcept; template<> diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 334960e49..f33f40fd5 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -11,7 +11,7 @@ namespace vcpkg public: constexpr Triplet() noexcept : m_instance(&DEFAULT_INSTANCE) {} - static Triplet from_canonical_name(const std::string& triplet_as_string); + static Triplet from_canonical_name(std::string&& triplet_as_string); static const Triplet X86_WINDOWS; static const Triplet X64_WINDOWS; @@ -24,6 +24,7 @@ namespace vcpkg const std::string& canonical_name() const; const std::string& to_string() const; + void to_string(std::string& out) const; size_t hash_code() const; bool operator==(const Triplet& other) const; diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 97565bf41..f8b883e97 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -1,3 +1,13 @@ +#if defined(_MSC_VER) && _MSC_VER < 1911 +// [[nodiscard]] is not recognized before VS 2017 version 15.3 +#pragma warning(disable : 5030) +#endif + +#if defined(__GNUC__) && __GNUC__ < 7 +// [[nodiscard]] is not recognized before GCC version 7 +#pragma GCC diagnostic ignored "-Wattributes" +#endif + #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include <Windows.h> @@ -13,7 +23,9 @@ #include <vcpkg/base/chrono.h> #include <vcpkg/base/files.h> #include <vcpkg/base/strings.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.debug.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/commands.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> @@ -41,7 +53,7 @@ static constexpr int SURVEY_INITIAL_OFFSET_IN_HOURS = SURVEY_INTERVAL_IN_HOURS - void invalid_command(const std::string& cmd) { - System::println(System::Color::error, "invalid command: %s", cmd); + System::print2(System::Color::error, "invalid command: ", cmd, '\n'); Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -100,7 +112,7 @@ static void inner(const VcpkgCmdArguments& args) Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root."); - Debug::println("Using vcpkg-root: %s", vcpkg_root_dir.u8string()); + Debug::print("Using vcpkg-root: ", vcpkg_root_dir.u8string(), '\n'); auto default_vs_path = System::get_environment_variable("VCPKG_VISUAL_STUDIO_PATH").value_or(""); @@ -137,10 +149,10 @@ static void inner(const VcpkgCmdArguments& args) if (distribution(generator) == 1) { Metrics::g_metrics.lock()->track_property("surveyprompt", "true"); - System::println( + System::print2( System::Color::success, "Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey " - "by running: vcpkg contact --survey"); + "by running: vcpkg contact --survey\n"); } } } @@ -154,14 +166,14 @@ static void inner(const VcpkgCmdArguments& args) Triplet default_triplet; if (args.triplet != nullptr) { - default_triplet = Triplet::from_canonical_name(*args.triplet); + default_triplet = Triplet::from_canonical_name(std::string(*args.triplet)); } else { - const auto vcpkg_default_triplet_env = System::get_environment_variable("VCPKG_DEFAULT_TRIPLET"); - if (const auto v = vcpkg_default_triplet_env.get()) + auto vcpkg_default_triplet_env = System::get_environment_variable("VCPKG_DEFAULT_TRIPLET"); + if (auto v = vcpkg_default_triplet_env.get()) { - default_triplet = Triplet::from_canonical_name(*v); + default_triplet = Triplet::from_canonical_name(std::move(*v)); } else { @@ -279,6 +291,31 @@ int main(const int argc, const char* const* const argv) const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW())); #endif + Checks::register_global_shutdown_handler([]() { + const auto elapsed_us_inner = GlobalState::timer.lock()->microseconds(); + + bool debugging = GlobalState::debugging; + + auto metrics = Metrics::g_metrics.lock(); + metrics->track_metric("elapsed_us", elapsed_us_inner); + GlobalState::debugging = false; + metrics->flush(); + +#if defined(_WIN32) + if (GlobalState::g_init_console_initialized) + { + SetConsoleCP(GlobalState::g_init_console_cp); + SetConsoleOutputCP(GlobalState::g_init_console_output_cp); + } +#endif + + auto elapsed_us = GlobalState::timer.lock()->microseconds(); + if (debugging) + System::printf("[DEBUG] Exiting after %d us (%d us)\n", + static_cast<int>(elapsed_us), + static_cast<int>(elapsed_us_inner)); + }); + { auto locked_metrics = Metrics::g_metrics.lock(); locked_metrics->track_property("version", Commands::Version::version()); @@ -287,7 +324,7 @@ int main(const int argc, const char* const* const argv) #endif } - Checks::register_console_ctrl_handler(); + System::register_console_ctrl_handler(); load_config(); @@ -330,24 +367,24 @@ int main(const int argc, const char* const* const argv) Metrics::g_metrics.lock()->track_property("error", exc_msg); fflush(stdout); - System::print("vcpkg.exe has crashed.\n" - "Please send an email to:\n" - " %s\n" - "containing a brief summary of what you were trying to do and the following data blob:\n" - "\n" - "Version=%s\n" - "EXCEPTION='%s'\n" - "CMD=\n", - Commands::Contact::email(), - Commands::Version::version(), - exc_msg); + System::printf("vcpkg.exe has crashed.\n" + "Please send an email to:\n" + " %s\n" + "containing a brief summary of what you were trying to do and the following data blob:\n" + "\n" + "Version=%s\n" + "EXCEPTION='%s'\n" + "CMD=\n", + Commands::Contact::email(), + Commands::Version::version(), + exc_msg); fflush(stdout); for (int x = 0; x < argc; ++x) { #if defined(_WIN32) - System::println("%s|", Strings::to_utf8(argv[x])); + System::print2(Strings::to_utf8(argv[x]), "|\n"); #else - System::println("%s|", argv[x]); + System::print2(argv[x], "|\n"); #endif } fflush(stdout); diff --git a/toolsrc/src/vcpkg/archives.cpp b/toolsrc/src/vcpkg/archives.cpp index 38efedf87..037cbdc14 100644 --- a/toolsrc/src/vcpkg/archives.cpp +++ b/toolsrc/src/vcpkg/archives.cpp @@ -2,6 +2,7 @@ #include <vcpkg/archives.h> #include <vcpkg/commands.h> +#include <vcpkg/base/system.process.h> namespace vcpkg::Archives { diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index cc439adfe..0266ad683 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -1,41 +1,27 @@ #include "pch.h" -#include <vcpkg/globalstate.h> -#include <vcpkg/metrics.h> - #include <vcpkg/base/checks.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/stringview.h> +#include <vcpkg/base/system.debug.h> -namespace vcpkg::Checks +namespace vcpkg { + static void (*g_shutdown_handler)() = nullptr; + void Checks::register_global_shutdown_handler(void (*func)()) + { + if (g_shutdown_handler) + // Setting the handler twice is a program error. Terminate. + std::abort(); + g_shutdown_handler = func; + } + [[noreturn]] static void cleanup_and_exit(const int exit_code) { static std::atomic<bool> have_entered{false}; if (have_entered) std::terminate(); have_entered = true; - const auto elapsed_us_inner = GlobalState::timer.lock()->microseconds(); - - bool debugging = GlobalState::debugging; - - auto metrics = Metrics::g_metrics.lock(); - metrics->track_metric("elapsed_us", elapsed_us_inner); - GlobalState::debugging = false; - metrics->flush(); - -#if defined(_WIN32) - if (GlobalState::g_init_console_initialized) - { - SetConsoleCP(GlobalState::g_init_console_cp); - SetConsoleOutputCP(GlobalState::g_init_console_output_cp); - } -#endif - - auto elapsed_us = GlobalState::timer.lock()->microseconds(); - if (debugging) - System::println("[DEBUG] Exiting after %d us (%d us)", - static_cast<int>(elapsed_us), - static_cast<int>(elapsed_us_inner)); + if (g_shutdown_handler) g_shutdown_handler(); fflush(nullptr); @@ -46,27 +32,10 @@ namespace vcpkg::Checks #endif } -#if defined(_WIN32) - static BOOL ctrl_handler(DWORD fdw_ctrl_type) + void Checks::unreachable(const LineInfo& line_info) { - switch (fdw_ctrl_type) - { - case CTRL_C_EVENT: GlobalState::g_ctrl_c_state.transition_handle_ctrl_c(); return TRUE; - default: return FALSE; - } - } - - void register_console_ctrl_handler() - { - SetConsoleCtrlHandler(reinterpret_cast<PHANDLER_ROUTINE>(ctrl_handler), TRUE); - } -#else - void register_console_ctrl_handler() {} -#endif - void unreachable(const LineInfo& line_info) - { - System::println(System::Color::error, "Error: Unreachable code was reached"); - System::println(System::Color::error, line_info.to_string()); // Always print line_info here + System::print2(System::Color::error, "Error: Unreachable code was reached\n"); + System::print2(System::Color::error, line_info, '\n'); // Always print line_info here #ifndef NDEBUG std::abort(); #else @@ -74,19 +43,19 @@ namespace vcpkg::Checks #endif } - void exit_with_code(const LineInfo& line_info, const int exit_code) + void Checks::exit_with_code(const LineInfo& line_info, const int exit_code) { - Debug::println(System::Color::error, line_info.to_string()); + Debug::print(System::Color::error, line_info, '\n'); cleanup_and_exit(exit_code); } - void exit_with_message(const LineInfo& line_info, const CStringView error_message) + void Checks::exit_with_message(const LineInfo& line_info, StringView error_message) { - System::println(System::Color::error, error_message); + System::print2(System::Color::error, error_message, '\n'); exit_fail(line_info); } - void check_exit(const LineInfo& line_info, bool expression) + void Checks::check_exit(const LineInfo& line_info, bool expression) { if (!expression) { @@ -94,11 +63,27 @@ namespace vcpkg::Checks } } - void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message) + void Checks::check_exit(const LineInfo& line_info, bool expression, StringView error_message) { if (!expression) { exit_with_message(line_info, error_message); } } + + std::string LineInfo::to_string() const + { + std::string ret; + this->to_string(ret); + return ret; + } + void LineInfo::to_string(std::string& out) const + { + out += m_file_name; + Strings::append(out, '(', m_line_number, ')'); + } + namespace details + { + void exit_if_null(bool b, const LineInfo& line_info) { Checks::check_exit(line_info, b, "Value was null"); } + } } diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index 405e76605..959ff90c8 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -113,8 +113,13 @@ namespace vcpkg::Chrono } std::string ElapsedTime::to_string() const { return format_time_userfriendly(as<std::chrono::nanoseconds>()); } + void ElapsedTime::to_string(std::string& into) const + { + into += format_time_userfriendly(as<std::chrono::nanoseconds>()); + } std::string ElapsedTimer::to_string() const { return elapsed().to_string(); } + void ElapsedTimer::to_string(std::string& into) const { return elapsed().to_string(into); } Optional<CTime> CTime::get_current_date_time() { diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 2c09e2c19..cb75e0847 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -33,11 +33,13 @@ namespace vcpkg::CoffFileReader return data; } - static void verify_equal_strings( - const LineInfo& line_info, const char* expected, const char* actual, int size, const char* label) + static void verify_equal_strings(const LineInfo& line_info, + StringView expected, + StringView actual, + const char* label) { Checks::check_exit(line_info, - memcmp(expected, actual, size) == 0, + expected == actual, "Incorrect string (%s) found. Expected: (%s) but found (%s)", label, expected, @@ -57,7 +59,7 @@ namespace vcpkg::CoffFileReader fs.seekg(offset_to_pe_signature); char signature[PE_SIGNATURE_SIZE]; fs.read(signature, PE_SIGNATURE_SIZE); - verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE.c_str(), signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE"); + verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE, {signature, PE_SIGNATURE_SIZE}, "PE_SIGNATURE"); fs.seekg(offset_to_pe_signature + PE_SIGNATURE_SIZE, ios_base::beg); } @@ -113,8 +115,7 @@ namespace vcpkg::CoffFileReader if (ret.data[0] != '\0') // Due to freeglut. github issue #223 { const std::string header_end = ret.data.substr(HEADER_END_OFFSET, HEADER_END_SIZE); - verify_equal_strings( - VCPKG_LINE_INFO, HEADER_END.c_str(), header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END"); + verify_equal_strings(VCPKG_LINE_INFO, HEADER_END, header_end, "LIB HEADER_END"); } return ret; @@ -229,7 +230,7 @@ namespace vcpkg::CoffFileReader char file_start[FILE_START_SIZE]; fs.read(file_start, FILE_START_SIZE); - verify_equal_strings(VCPKG_LINE_INFO, FILE_START.c_str(), file_start, FILE_START_SIZE, "LIB FILE_START"); + verify_equal_strings(VCPKG_LINE_INFO, FILE_START, {file_start, FILE_START_SIZE}, "LIB FILE_START"); } DllInfo read_dll(const fs::path& path) diff --git a/toolsrc/src/vcpkg/base/downloads.cpp b/toolsrc/src/vcpkg/base/downloads.cpp index 571562244..590c48ff5 100644 --- a/toolsrc/src/vcpkg/base/downloads.cpp +++ b/toolsrc/src/vcpkg/base/downloads.cpp @@ -2,6 +2,7 @@ #include <vcpkg/base/downloads.h> #include <vcpkg/base/hash.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> #if defined(_WIN32) @@ -14,9 +15,9 @@ namespace vcpkg::Downloads { #if defined(_WIN32) static void winhttp_download_file(Files::Filesystem& fs, - CStringView target_file_path, - CStringView hostname, - CStringView url_path) + ZStringView target_file_path, + StringView hostname, + StringView url_path) { // Make sure the directories are present, otherwise fopen_s fails const auto dir = fs::path(target_file_path.c_str()).parent_path(); @@ -163,7 +164,7 @@ namespace vcpkg::Downloads std::string hostname(url_no_proto.begin(), path_begin); std::string path(path_begin, url_no_proto.end()); - winhttp_download_file(fs, download_path_part.c_str(), hostname, path); + winhttp_download_file(fs, download_path_part, hostname, path); #else const auto code = System::cmd_execute( Strings::format(R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index f9bce8631..164394100 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -1,7 +1,10 @@ #include "pch.h" #include <vcpkg/base/files.h> +#include <vcpkg/base/system.debug.h> #include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> #if defined(__linux__) @@ -71,18 +74,42 @@ namespace vcpkg::Files virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const override { - static const fs::path UNIX_ROOT = "/"; fs::path current_dir = starting_dir; - for (; !current_dir.empty() && current_dir != UNIX_ROOT; current_dir = current_dir.parent_path()) + if (exists(current_dir / filename)) { + return current_dir; + } + + int counter = 10000; + for (;;) + { + // This is a workaround for VS2015's experimental filesystem implementation + if (!current_dir.has_relative_path()) + { + current_dir.clear(); + return current_dir; + } + + auto parent = current_dir.parent_path(); + if (parent == current_dir) + { + current_dir.clear(); + return current_dir; + } + + current_dir = std::move(parent); + const fs::path candidate = current_dir / filename; if (exists(candidate)) { return current_dir; } - } - return fs::path(); + --counter; + Checks::check_exit(VCPKG_LINE_INFO, + counter > 0, + "infinite loop encountered while trying to find_file_recursively_up()"); + } } virtual std::vector<fs::path> get_files_recursive(const fs::path& dir) const override @@ -185,10 +212,11 @@ namespace vcpkg::Files if (this->exists(path)) { - System::println(System::Color::warning, - "Some files in %s were unable to be removed. Close any editors operating in this " - "directory and retry.", - path.string()); + System::print2( + System::Color::warning, + "Some files in ", + path.u8string(), + " were unable to be removed. Close any editors operating in this directory and retry.\n"); } return out; @@ -216,7 +244,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); } @@ -274,14 +302,14 @@ namespace vcpkg::Files if (Util::find(ret, p) == ret.end() && this->exists(p)) { ret.push_back(p); - Debug::println("Found path: %s", p.u8string()); + Debug::print("Found path: ", p.u8string(), '\n'); } } } return ret; #else - const std::string cmd = Strings::format("which %s", name); + const std::string cmd = Strings::concat("which ", name); auto out = System::cmd_execute_and_capture_output(cmd); if (out.exit_code != 0) { @@ -306,11 +334,12 @@ namespace vcpkg::Files void print_paths(const std::vector<fs::path>& paths) { - System::println(); + std::string message = "\n"; for (const fs::path& p : paths) { - System::println(" %s", p.generic_string()); + Strings::append(message, " ", p.generic_string(), '\n'); } - System::println(); + message.push_back('\n'); + System::print2(message); } } diff --git a/toolsrc/src/vcpkg/base/hash.cpp b/toolsrc/src/vcpkg/base/hash.cpp index 7a74371db..310b8c35e 100644 --- a/toolsrc/src/vcpkg/base/hash.cpp +++ b/toolsrc/src/vcpkg/base/hash.cpp @@ -2,11 +2,12 @@ #include <vcpkg/base/checks.h> #include <vcpkg/base/strings.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> #if defined(_WIN32) #include <bcrypt.h> +#pragma comment(lib, "bcrypt") #ifndef NT_SUCCESS #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) @@ -94,13 +95,13 @@ namespace vcpkg::Hash } public: - explicit BCryptHasher(const std::string& hash_type) + explicit BCryptHasher(std::string hash_type) { - NTSTATUS error_code = - BCryptOpenAlgorithmProvider(&this->algorithm_handle.handle, - Strings::to_utf16(Strings::ascii_to_uppercase(hash_type)).c_str(), - nullptr, - 0); + NTSTATUS error_code = BCryptOpenAlgorithmProvider( + &this->algorithm_handle.handle, + Strings::to_utf16(Strings::ascii_to_uppercase(std::move(hash_type))).c_str(), + nullptr, + 0); Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to open the algorithm provider"); DWORD hash_buffer_bytes; diff --git a/toolsrc/src/vcpkg/base/lineinfo.cpp b/toolsrc/src/vcpkg/base/lineinfo.cpp deleted file mode 100644 index 7435ed666..000000000 --- a/toolsrc/src/vcpkg/base/lineinfo.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "pch.h" - -#include <vcpkg/base/lineinfo.h> -#include <vcpkg/base/strings.h> - -namespace vcpkg -{ - std::string LineInfo::to_string() const { return Strings::format("%s(%d)", this->file_name, this->line_number); } -} diff --git a/toolsrc/src/vcpkg/base/stringrange.cpp b/toolsrc/src/vcpkg/base/stringrange.cpp deleted file mode 100644 index f7e431c88..000000000 --- a/toolsrc/src/vcpkg/base/stringrange.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "pch.h" - -#include <vcpkg/base/checks.h> -#include <vcpkg/base/stringrange.h> - -namespace vcpkg -{ - std::vector<StringRange> StringRange::find_all_enclosed(const StringRange& input, - const std::string& left_delim, - const std::string& right_delim) - { - std::string::const_iterator it_left = input.begin; - std::string::const_iterator it_right = input.begin; - - std::vector<StringRange> output; - - while (true) - { - it_left = std::search(it_right, input.end, left_delim.cbegin(), left_delim.cend()); - if (it_left == input.end) break; - - it_left += left_delim.length(); - - it_right = std::search(it_left, input.end, right_delim.cbegin(), right_delim.cend()); - if (it_right == input.end) break; - - output.emplace_back(it_left, it_right); - - ++it_right; - } - - return output; - } - - StringRange StringRange::find_exactly_one_enclosed(const StringRange& input, - const std::string& left_tag, - const std::string& right_tag) - { - std::vector<StringRange> result = find_all_enclosed(input, left_tag, right_tag); - Checks::check_exit(VCPKG_LINE_INFO, - result.size() == 1, - "Found %d sets of %s.*%s but expected exactly 1, in block:\n%s", - result.size(), - left_tag, - right_tag, - input); - return result.front(); - } - - Optional<StringRange> StringRange::find_at_most_one_enclosed(const StringRange& input, - const std::string& left_tag, - const std::string& right_tag) - { - std::vector<StringRange> result = find_all_enclosed(input, left_tag, right_tag); - Checks::check_exit(VCPKG_LINE_INFO, - result.size() <= 1, - "Found %d sets of %s.*%s but expected at most 1, in block:\n%s", - result.size(), - left_tag, - right_tag, - input); - - if (result.empty()) - { - return nullopt; - } - - return result.front(); - } - - StringRange::StringRange(const std::string& s) : begin(s.cbegin()), end(s.cend()) {} - - StringRange::StringRange(const std::string::const_iterator begin, const std::string::const_iterator end) - : begin(begin), end(end) - { - } - - std::string StringRange::to_string() const { return std::string(this->begin, this->end); } -} diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 8d43e7af7..ce634a227 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -10,8 +10,10 @@ namespace vcpkg::Strings::details static bool is_space(const char c) { return std::isspace(c) != 0; } // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() - static char tolower_char(const char c) { return static_cast<char>(std::tolower(c)); } - static char toupper_char(const char c) { return static_cast<char>(std::toupper(c)); } + static char tolower_char(const char c) { return (c < 'A' || c > 'Z') ? c : c - 'A' + 'a'; } + static char toupper_char(const char c) { return (c < 'a' || c > 'z') ? c : c - 'a' + 'A'; } + + static bool icase_eq(char a, char b) { return tolower_char(a) == tolower_char(b); } #if defined(_WIN32) static _locale_t& c_locale() @@ -47,146 +49,242 @@ namespace vcpkg::Strings::details } } -namespace vcpkg::Strings -{ +using namespace vcpkg; + #if defined(_WIN32) - std::wstring to_utf16(const CStringView& s) - { - std::wstring output; - const size_t size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); - if (size == 0) return output; - output.resize(size - 1); - MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), static_cast<int>(size) - 1); - return output; - } +std::wstring Strings::to_utf16(StringView s) +{ + std::wstring output; + if (s.size() == 0) return output; + Checks::check_exit(VCPKG_LINE_INFO, s.size() < size_t(INT_MAX)); + int size = MultiByteToWideChar(CP_UTF8, 0, s.data(), static_cast<int>(s.size()), nullptr, 0); + output.resize(static_cast<size_t>(size)); + MultiByteToWideChar(CP_UTF8, 0, s.data(), static_cast<int>(s.size()), output.data(), size); + return output; +} #endif #if defined(_WIN32) - std::string to_utf8(const wchar_t* w) - { - std::string output; - const size_t size = WideCharToMultiByte(CP_UTF8, 0, w, -1, nullptr, 0, nullptr, nullptr); - if (size == 0) return output; - output.resize(size - 1); - WideCharToMultiByte(CP_UTF8, 0, w, -1, output.data(), static_cast<int>(size) - 1, nullptr, nullptr); - return output; - } +std::string Strings::to_utf8(const wchar_t* w) +{ + std::string output; + const size_t size = WideCharToMultiByte(CP_UTF8, 0, w, -1, nullptr, 0, nullptr, nullptr); + if (size == 0) return output; + output.resize(size - 1); + WideCharToMultiByte(CP_UTF8, 0, w, -1, output.data(), static_cast<int>(size) - 1, nullptr, nullptr); + return output; +} #endif - std::string escape_string(const CStringView& s, char char_to_escape, char escape_char) +std::string Strings::escape_string(std::string&& s, char char_to_escape, char escape_char) +{ + // Replace '\' with '\\' or '`' with '``' + auto ret = Strings::replace_all(std::move(s), {&escape_char, 1}, std::string{escape_char, escape_char}); + // Replace '"' with '\"' or '`"' + ret = Strings::replace_all(std::move(ret), {&char_to_escape, 1}, std::string{escape_char, char_to_escape}); + return ret; +} + +static const char* case_insensitive_ascii_find(StringView s, StringView pattern) +{ + return std::search(s.begin(), s.end(), pattern.begin(), pattern.end(), &Strings::details::icase_eq); +} + +bool Strings::case_insensitive_ascii_contains(StringView s, StringView pattern) +{ + return case_insensitive_ascii_find(s, pattern) != s.end(); +} + +bool Strings::case_insensitive_ascii_equals(StringView left, StringView right) +{ + return std::equal(left.begin(), left.end(), right.begin(), right.end(), &details::icase_eq); +} + +std::string Strings::ascii_to_lowercase(std::string&& s) +{ + std::transform(s.begin(), s.end(), s.begin(), &details::tolower_char); + return std::move(s); +} + +std::string Strings::ascii_to_uppercase(std::string&& s) +{ + std::transform(s.begin(), s.end(), s.begin(), &details::toupper_char); + return std::move(s); +} + +bool Strings::case_insensitive_ascii_starts_with(StringView s, StringView pattern) +{ + if (s.size() < pattern.size()) return false; + return std::equal(s.begin(), s.begin() + pattern.size(), pattern.begin(), pattern.end(), &details::icase_eq); +} + +bool Strings::ends_with(StringView s, StringView pattern) +{ + if (s.size() < pattern.size()) return false; + return std::equal(s.end() - pattern.size(), s.end(), pattern.begin(), pattern.end()); +} +bool Strings::starts_with(StringView s, StringView pattern) +{ + if (s.size() < pattern.size()) return false; + return std::equal(s.begin(), s.begin() + pattern.size(), pattern.begin(), pattern.end()); +} + +std::string Strings::replace_all(std::string&& s, const std::string& search, StringView rep) +{ + size_t pos = 0; + while ((pos = s.find(search, pos)) != std::string::npos) { - std::string ret = s.c_str(); - // Replace '\' with '\\' or '`' with '``' - ret = Strings::replace_all(std::move(ret), {escape_char}, {escape_char, escape_char}); - // Replace '"' with '\"' or '`"' - ret = Strings::replace_all(std::move(ret), {char_to_escape}, {escape_char, char_to_escape}); - return ret; + s.replace(pos, search.size(), rep.data(), rep.size()); + pos += rep.size(); } + return std::move(s); +} - std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern) +std::string Strings::trim(std::string&& s) +{ + s.erase(std::find_if_not(s.rbegin(), s.rend(), details::is_space).base(), s.end()); + s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::is_space)); + return std::move(s); +} + +void Strings::trim_all_and_remove_whitespace_strings(std::vector<std::string>* strings) +{ + for (std::string& s : *strings) { - const std::string pattern_as_lower_case(ascii_to_lowercase(pattern)); - return search(s.begin(), - s.end(), - pattern_as_lower_case.begin(), - pattern_as_lower_case.end(), - [](const char a, const char b) { return details::tolower_char(a) == b; }); + s = trim(std::move(s)); } - bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern) + Util::erase_remove_if(*strings, [](const std::string& s) { return s.empty(); }); +} + +std::vector<std::string> Strings::split(const std::string& s, const std::string& delimiter) +{ + std::vector<std::string> output; + + if (delimiter.empty()) { - return case_insensitive_ascii_find(s, pattern) != s.end(); + output.push_back(s); + return output; } - bool case_insensitive_ascii_equals(const CStringView left, const CStringView right) + const size_t delimiter_length = delimiter.length(); + size_t i = 0; + for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos)) { -#if defined(_WIN32) - return _stricmp(left.c_str(), right.c_str()) == 0; -#else - return strcasecmp(left.c_str(), right.c_str()) == 0; -#endif + output.push_back(s.substr(i, pos - i)); + pos += delimiter_length; + i = pos; } - std::string ascii_to_lowercase(std::string s) + // Add the rest of the string after the last delimiter, unless there is nothing after it + if (i != s.length()) { - std::transform(s.begin(), s.end(), s.begin(), &details::tolower_char); - return s; + output.push_back(s.substr(i, s.length())); } - std::string ascii_to_uppercase(std::string s) + return output; +} + +std::vector<std::string> Strings::split(const std::string& s, const std::string& delimiter, int max_count) +{ + std::vector<std::string> output; + + Checks::check_exit(VCPKG_LINE_INFO, max_count >= 1); + + if (delimiter.empty()) { - std::transform(s.begin(), s.end(), s.begin(), &details::toupper_char); - return s; + output.push_back(s); + return output; } - bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) + const size_t delimiter_length = delimiter.length(); + size_t i = 0; + for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos)) { -#if defined(_WIN32) - return _strnicmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; -#else - return strncasecmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; -#endif + if (output.size() == max_count - 1) break; + output.push_back(s.substr(i, pos - i)); + pos += delimiter_length; + i = pos; } - bool ends_with(const std::string& s, StringLiteral pattern) + // Add the rest of the string after the last delimiter, unless there is nothing after it + if (i != s.length()) { - if (s.size() < pattern.size()) return false; - return std::equal(s.end() - pattern.size(), s.end(), pattern.c_str(), pattern.c_str() + pattern.size()); + output.push_back(s.substr(i, s.length())); } - std::string replace_all(std::string&& s, const std::string& search, const std::string& rep) + return output; +} + +std::vector<StringView> Strings::find_all_enclosed(StringView input, StringView left_delim, StringView right_delim) +{ + auto it_left = input.begin(); + auto it_right = input.begin(); + + std::vector<StringView> output; + + while (true) { - size_t pos = 0; - while ((pos = s.find(search, pos)) != std::string::npos) - { - s.replace(pos, search.size(), rep); - pos += rep.size(); - } - return std::move(s); + it_left = std::search(it_right, input.end(), left_delim.begin(), left_delim.end()); + if (it_left == input.end()) break; + + it_left += left_delim.size(); + + it_right = std::search(it_left, input.end(), right_delim.begin(), right_delim.end()); + if (it_right == input.end()) break; + + output.emplace_back(it_left, it_right); + + ++it_right; } - std::string trim(std::string&& s) + return output; +} + +StringView Strings::find_exactly_one_enclosed(StringView input, StringView left_tag, StringView right_tag) +{ + std::vector<StringView> result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() == 1, + "Found %d sets of %s.*%s but expected exactly 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + return result.front(); +} + +Optional<StringView> Strings::find_at_most_one_enclosed(StringView input, StringView left_tag, StringView right_tag) +{ + std::vector<StringView> result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() <= 1, + "Found %d sets of %s.*%s but expected at most 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + + if (result.empty()) { - s.erase(std::find_if_not(s.rbegin(), s.rend(), details::is_space).base(), s.end()); - s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::is_space)); - return std::move(s); + return nullopt; } - void trim_all_and_remove_whitespace_strings(std::vector<std::string>* strings) - { - for (std::string& s : *strings) - { - s = trim(std::move(s)); - } + return result.front(); +} - Util::erase_remove_if(*strings, [](const std::string& s) { return s.empty(); }); - } +bool Strings::equals(StringView a, StringView b) +{ + if (a.size() != b.size()) return false; + return std::equal(a.begin(), a.end(), b.begin(), b.end()); +} - std::vector<std::string> split(const std::string& s, const std::string& delimiter) - { - std::vector<std::string> output; - - if (delimiter.empty()) - { - output.push_back(s); - return output; - } - - const size_t delimiter_length = delimiter.length(); - size_t i = 0; - for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos)) - { - output.push_back(s.substr(i, pos - i)); - pos += delimiter_length; - i = pos; - } - - // Add the rest of the string after the last delimiter, unless there is nothing after it - if (i != s.length()) - { - output.push_back(s.substr(i, s.length())); - } +const char* Strings::search(StringView haystack, StringView needle) +{ + return std::search(haystack.begin(), haystack.end(), needle.begin(), needle.end()); +} - return output; - } +bool Strings::contains(StringView haystack, StringView needle) +{ + return Strings::search(haystack, needle) != haystack.end(); } diff --git a/toolsrc/src/vcpkg/base/stringview.cpp b/toolsrc/src/vcpkg/base/stringview.cpp new file mode 100644 index 000000000..d0b2cd43a --- /dev/null +++ b/toolsrc/src/vcpkg/base/stringview.cpp @@ -0,0 +1,83 @@ +#include "pch.h" + +#include <vcpkg/base/checks.h> +#include <vcpkg/base/lineinfo.h> +#include <vcpkg/base/stringview.h> + +#include <cstring> + +namespace vcpkg +{ + std::vector<StringView> StringView::find_all_enclosed(const StringView& input, + const std::string& left_delim, + const std::string& right_delim) + { + auto it_left = input.begin(); + auto it_right = input.begin(); + + std::vector<StringView> output; + + while (true) + { + it_left = std::search(it_right, input.end(), left_delim.cbegin(), left_delim.cend()); + if (it_left == input.end()) break; + + it_left += left_delim.length(); + + it_right = std::search(it_left, input.end(), right_delim.cbegin(), right_delim.cend()); + if (it_right == input.end()) break; + + output.emplace_back(it_left, it_right); + + ++it_right; + } + + return output; + } + + StringView StringView::find_exactly_one_enclosed(const StringView& input, + const std::string& left_tag, + const std::string& right_tag) + { + std::vector<StringView> result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() == 1, + "Found %d sets of %s.*%s but expected exactly 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + return result.front(); + } + + Optional<StringView> StringView::find_at_most_one_enclosed(const StringView& input, + const std::string& left_tag, + const std::string& right_tag) + { + std::vector<StringView> result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() <= 1, + "Found %d sets of %s.*%s but expected at most 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + + if (result.empty()) + { + return nullopt; + } + + return result.front(); + } + + StringView::StringView(const std::string& s) : m_ptr(s.data()), m_size(s.size()) {} + + std::string StringView::to_string() const { return std::string(m_ptr, m_size); } + void StringView::to_string(std::string& s) const { s.append(m_ptr, m_size); } + + bool StringView::operator==(StringView other) const + { + return other.size() == size() && memcmp(data(), other.data(), size()) == 0; + } +} diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 90b9c34b3..ffbac3158 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -1,9 +1,10 @@ #include "pch.h" #include <vcpkg/base/checks.h> +#include <vcpkg/base/chrono.h> +#include <vcpkg/base/system.debug.h> #include <vcpkg/base/system.h> -#include <vcpkg/globalstate.h> -#include <vcpkg/metrics.h> +#include <vcpkg/base/system.process.h> #include <ctime> @@ -17,9 +18,73 @@ #pragma comment(lib, "Advapi32") -namespace vcpkg::System +using namespace vcpkg::System; + +namespace vcpkg { - fs::path get_exe_path_of_current_process() +#if defined(_WIN32) + namespace + { + struct CtrlCStateMachine + { + CtrlCStateMachine() : m_state(CtrlCState::normal) {} + + void transition_to_spawn_process() noexcept + { + auto expected = CtrlCState::normal; + auto transitioned = m_state.compare_exchange_strong(expected, CtrlCState::blocked_on_child); + if (!transitioned) + { + // Ctrl-C was hit and is asynchronously executing on another thread + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + void transition_from_spawn_process() noexcept + { + auto expected = CtrlCState::blocked_on_child; + auto transitioned = m_state.compare_exchange_strong(expected, CtrlCState::normal); + if (!transitioned) + { + // Ctrl-C was hit while blocked on the child process, so exit immediately + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + void transition_handle_ctrl_c() noexcept + { + auto prev_state = m_state.exchange(CtrlCState::exit_requested); + + if (prev_state == CtrlCState::normal) + { + // Not currently blocked on a child process and Ctrl-C has not been hit. + Checks::exit_fail(VCPKG_LINE_INFO); + } + else if (prev_state == CtrlCState::exit_requested) + { + // Ctrl-C was hit previously? + } + else + { + // We are currently blocked on a child process. Upon return, transition_from_spawn_process() will be + // called and exit. + } + } + + private: + enum class CtrlCState + { + normal, + blocked_on_child, + exit_requested, + }; + + std::atomic<CtrlCState> m_state; + }; + + static CtrlCStateMachine g_ctrl_c_state; + } +#endif + + fs::path System::get_exe_path_of_current_process() { #if defined(_WIN32) wchar_t buf[_MAX_PATH]; @@ -51,7 +116,7 @@ namespace vcpkg::System #endif } - Optional<CPUArchitecture> to_cpu_architecture(const CStringView& arch) + Optional<CPUArchitecture> System::to_cpu_architecture(StringView arch) { if (Strings::case_insensitive_ascii_equals(arch, "x86")) return CPUArchitecture::X86; if (Strings::case_insensitive_ascii_equals(arch, "x64")) return CPUArchitecture::X64; @@ -61,7 +126,7 @@ namespace vcpkg::System return nullopt; } - CPUArchitecture get_host_processor() + CPUArchitecture System::get_host_processor() { #if defined(_WIN32) auto w6432 = get_environment_variable("PROCESSOR_ARCHITEW6432"); @@ -84,7 +149,7 @@ namespace vcpkg::System #endif } - std::vector<CPUArchitecture> get_supported_host_architectures() + std::vector<CPUArchitecture> System::get_supported_host_architectures() { std::vector<CPUArchitecture> supported_architectures; supported_architectures.push_back(get_host_processor()); @@ -98,20 +163,20 @@ namespace vcpkg::System return supported_architectures; } - CMakeVariable::CMakeVariable(const CStringView varname, const char* varvalue) + System::CMakeVariable::CMakeVariable(const StringView varname, const char* varvalue) : s(Strings::format(R"("-D%s=%s")", varname, varvalue)) { } - CMakeVariable::CMakeVariable(const CStringView varname, const std::string& varvalue) + System::CMakeVariable::CMakeVariable(const StringView varname, const std::string& varvalue) : CMakeVariable(varname, varvalue.c_str()) { } - CMakeVariable::CMakeVariable(const CStringView varname, const fs::path& path) + System::CMakeVariable::CMakeVariable(const StringView varname, const fs::path& path) : CMakeVariable(varname, path.generic_u8string()) { } - std::string make_cmake_cmd(const fs::path& cmake_exe, + std::string System::make_cmake_cmd(const fs::path& cmake_exe, const fs::path& cmake_script, const std::vector<CMakeVariable>& pass_variables) { @@ -178,6 +243,19 @@ namespace vcpkg::System L"ANDROID_NDK_HOME", }; + const Optional<std::string> keep_vars = System::get_environment_variable("VCPKG_KEEP_ENV_VARS"); + const auto k = keep_vars.get(); + + if (k && !k->empty()) + { + auto vars = Strings::split(*k, ";"); + + for (auto&& var : vars) + { + env_wstrings.push_back(Strings::to_utf16(var)); + } + } + std::wstring env_cstr; for (auto&& env_wstring : env_wstrings) @@ -215,13 +293,11 @@ namespace vcpkg::System #if defined(_WIN32) /// <param name="maybe_environment">If non-null, an environment block to use for the new process. If null, the new /// process will inherit the current environment.</param> - static void windows_create_process(const CStringView cmd_line, - const wchar_t* maybe_environment, - DWORD dwCreationFlags, - PROCESS_INFORMATION* process_info) noexcept + static void windows_create_process(const StringView cmd_line, + const wchar_t* environment_block, + PROCESS_INFORMATION& process_info, + DWORD dwCreationFlags) noexcept { - Checks::check_exit(VCPKG_LINE_INFO, process_info != nullptr); - STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); startup_info.cb = sizeof(STARTUPINFOW); @@ -231,41 +307,40 @@ namespace vcpkg::System // Wrapping the command in a single set of quotes causes cmd.exe to correctly execute const std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line); - Debug::println("CreateProcessW(%s)", actual_cmd_line); + Debug::print("CreateProcessW(", actual_cmd_line, ")\n"); bool succeeded = TRUE == CreateProcessW(nullptr, Strings::to_utf16(actual_cmd_line).data(), nullptr, nullptr, FALSE, IDLE_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT | dwCreationFlags, - (void*)maybe_environment, + (void*)environment_block, nullptr, &startup_info, - process_info); + &process_info); Checks::check_exit(VCPKG_LINE_INFO, succeeded, "Process creation failed with error code: %lu", GetLastError()); } #endif #if defined(_WIN32) - void cmd_execute_no_wait(const CStringView cmd_line) noexcept + void System::cmd_execute_no_wait(StringView cmd_line) { auto timer = Chrono::ElapsedTimer::create_started(); PROCESS_INFORMATION process_info; memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); - windows_create_process(cmd_line, nullptr, DETACHED_PROCESS, &process_info); + windows_create_process(cmd_line, nullptr, process_info, DETACHED_PROCESS); CloseHandle(process_info.hThread); CloseHandle(process_info.hProcess); - Debug::println("CreateProcessW() took %d us", static_cast<int>(timer.microseconds())); + Debug::print("CreateProcessW() took ", static_cast<int>(timer.microseconds()), " us\n"); } #endif - int cmd_execute_clean(const CStringView cmd_line, - const std::unordered_map<std::string, std::string>& extra_env) noexcept + int System::cmd_execute_clean(const ZStringView cmd_line, const std::unordered_map<std::string, std::string>& extra_env) { auto timer = Chrono::ElapsedTimer::create_started(); #if defined(_WIN32) @@ -273,14 +348,14 @@ namespace vcpkg::System PROCESS_INFORMATION process_info; memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); - GlobalState::g_ctrl_c_state.transition_to_spawn_process(); + g_ctrl_c_state.transition_to_spawn_process(); auto clean_env = compute_clean_environment(extra_env); - windows_create_process(cmd_line, clean_env.c_str(), NULL, &process_info); + windows_create_process(cmd_line, clean_env.data(), process_info, NULL); CloseHandle(process_info.hThread); const DWORD result = WaitForSingleObject(process_info.hProcess, INFINITE); - GlobalState::g_ctrl_c_state.transition_from_spawn_process(); + g_ctrl_c_state.transition_from_spawn_process(); Checks::check_exit(VCPKG_LINE_INFO, result != WAIT_FAILED, "WaitForSingleObject failed"); DWORD exit_code = 0; @@ -288,56 +363,56 @@ namespace vcpkg::System CloseHandle(process_info.hProcess); - Debug::println("CreateProcessW() returned %lu after %d us", exit_code, static_cast<int>(timer.microseconds())); - + Debug::print( + "CreateProcessW() returned ", exit_code, " after ", static_cast<int>(timer.microseconds()), " us\n"); return static_cast<int>(exit_code); #else - Debug::println("system(%s)", cmd_line.c_str()); + Debug::print("system(", cmd_line, ")\n"); fflush(nullptr); int rc = system(cmd_line.c_str()); - Debug::println("system() returned %d after %d us", rc, static_cast<int>(timer.microseconds())); + Debug::print("system() returned ", rc, " after ", static_cast<int>(timer.microseconds()), " us\n"); return rc; #endif } - int cmd_execute(const CStringView cmd_line) noexcept + int System::cmd_execute(const ZStringView cmd_line) { // Flush stdout before launching external process fflush(nullptr); #if defined(_WIN32) // We are wrap the command line in quotes to cause cmd.exe to correctly process it - const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line); - Debug::println("_wsystem(%s)", actual_cmd_line); - GlobalState::g_ctrl_c_state.transition_to_spawn_process(); + auto actual_cmd_line = Strings::concat('"', cmd_line, '"'); + Debug::print("_wsystem(", actual_cmd_line, ")\n"); + g_ctrl_c_state.transition_to_spawn_process(); const int exit_code = _wsystem(Strings::to_utf16(actual_cmd_line).c_str()); - GlobalState::g_ctrl_c_state.transition_from_spawn_process(); - Debug::println("_wsystem() returned %d", exit_code); + g_ctrl_c_state.transition_from_spawn_process(); + Debug::print("_wsystem() returned ", exit_code, '\n'); #else - Debug::println("_system(%s)", cmd_line); + Debug::print("_system(", cmd_line, ")\n"); const int exit_code = system(cmd_line.c_str()); - Debug::println("_system() returned %d", exit_code); + Debug::print("_system() returned ", exit_code, '\n'); #endif return exit_code; } - ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line) noexcept + ExitCodeAndOutput System::cmd_execute_and_capture_output(const ZStringView cmd_line) { auto timer = Chrono::ElapsedTimer::create_started(); #if defined(_WIN32) const auto actual_cmd_line = Strings::format(R"###("%s 2>&1")###", cmd_line); - Debug::println("_wpopen(%s)", actual_cmd_line); + Debug::print("_wpopen(", actual_cmd_line, ")\n"); std::wstring output; wchar_t buf[1024]; - GlobalState::g_ctrl_c_state.transition_to_spawn_process(); + g_ctrl_c_state.transition_to_spawn_process(); // Flush stdout before launching external process fflush(stdout); const auto pipe = _wpopen(Strings::to_utf16(actual_cmd_line).c_str(), L"r"); if (pipe == nullptr) { - GlobalState::g_ctrl_c_state.transition_from_spawn_process(); + g_ctrl_c_state.transition_from_spawn_process(); return {1, Strings::to_utf8(output.c_str())}; } while (fgetws(buf, 1024, pipe)) @@ -346,12 +421,12 @@ namespace vcpkg::System } if (!feof(pipe)) { - GlobalState::g_ctrl_c_state.transition_from_spawn_process(); + g_ctrl_c_state.transition_from_spawn_process(); return {1, Strings::to_utf8(output.c_str())}; } const auto ec = _pclose(pipe); - GlobalState::g_ctrl_c_state.transition_from_spawn_process(); + g_ctrl_c_state.transition_from_spawn_process(); // On Win7, output from powershell calls contain a utf-8 byte order mark in the utf-16 stream, so we strip it // out if it is present. 0xEF,0xBB,0xBF is the UTF-8 byte-order mark @@ -361,13 +436,16 @@ namespace vcpkg::System output.erase(0, 3); } - Debug::println("_pclose() returned %d after %8d us", ec, static_cast<int>(timer.microseconds())); - + Debug::print("_pclose() returned ", + ec, + " after ", + Strings::format("%8d", static_cast<int>(timer.microseconds())), + " us\n"); return {ec, Strings::to_utf8(output.c_str())}; #else const auto actual_cmd_line = Strings::format(R"###(%s 2>&1)###", cmd_line); - Debug::println("popen(%s)", actual_cmd_line); + Debug::print("popen(", actual_cmd_line, ")\n"); std::string output; char buf[1024]; // Flush stdout before launching external process @@ -388,46 +466,13 @@ namespace vcpkg::System const auto ec = pclose(pipe); - Debug::println("_pclose() returned %d after %8d us", ec, (int)timer.microseconds()); + Debug::print("_pclose() returned ", ec, " after ", Strings::format("%8d", (int)timer.microseconds()), " us\n"); return {ec, output}; #endif } - void println() { putchar('\n'); } - - void print(const CStringView message) { fputs(message.c_str(), stdout); } - - void println(const CStringView message) - { - print(message); - println(); - } - - void print(const Color c, const CStringView message) - { -#if defined(_WIN32) - const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE); - - CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info {}; - GetConsoleScreenBufferInfo(console_handle, &console_screen_buffer_info); - const auto original_color = console_screen_buffer_info.wAttributes; - - SetConsoleTextAttribute(console_handle, static_cast<WORD>(c) | (original_color & 0xF0)); - print(message); - SetConsoleTextAttribute(console_handle, original_color); -#else - print(message); -#endif - } - - void println(const Color c, const CStringView message) - { - print(c, message); - println(); - } - - Optional<std::string> get_environment_variable(const CStringView varname) noexcept + Optional<std::string> System::get_environment_variable(ZStringView varname) noexcept { #if defined(_WIN32) const auto w_varname = Strings::to_utf16(varname); @@ -454,37 +499,34 @@ namespace vcpkg::System return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ; } - Optional<std::string> get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) + Optional<std::string> System::get_registry_string(void* base_hkey, StringView sub_key, StringView valuename) { HKEY k = nullptr; const LSTATUS ec = RegOpenKeyExW(reinterpret_cast<HKEY>(base_hkey), Strings::to_utf16(sub_key).c_str(), NULL, KEY_READ, &k); if (ec != ERROR_SUCCESS) return nullopt; + auto w_valuename = Strings::to_utf16(valuename); + DWORD dw_buffer_size = 0; DWORD dw_type = 0; - auto rc = - RegQueryValueExW(k, Strings::to_utf16(valuename).c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); + auto rc = RegQueryValueExW(k, w_valuename.c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 || dw_buffer_size % sizeof(wchar_t) != 0) return nullopt; std::wstring ret; ret.resize(dw_buffer_size / sizeof(wchar_t)); - rc = RegQueryValueExW(k, - Strings::to_utf16(valuename).c_str(), - nullptr, - &dw_type, - reinterpret_cast<LPBYTE>(ret.data()), - &dw_buffer_size); + rc = RegQueryValueExW( + k, w_valuename.c_str(), nullptr, &dw_type, reinterpret_cast<LPBYTE>(ret.data()), &dw_buffer_size); if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size()) return nullopt; ret.pop_back(); // remove extra trailing null byte - return Strings::to_utf8(ret.c_str()); + return Strings::to_utf8(ret); } #else - Optional<std::string> get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) + Optional<std::string> System::get_registry_string(void* base_hkey, StringView sub_key, StringView valuename) { return nullopt; } @@ -505,7 +547,7 @@ namespace vcpkg::System return PATH; } - const Optional<fs::path>& get_program_files_32_bit() + const Optional<fs::path>& System::get_program_files_32_bit() { static const auto PATH = []() -> Optional<fs::path> { auto value = System::get_environment_variable("ProgramFiles(x86)"); @@ -518,7 +560,7 @@ namespace vcpkg::System return PATH; } - const Optional<fs::path>& get_program_files_platform_bitness() + const Optional<fs::path>& System::get_program_files_platform_bitness() { static const auto PATH = []() -> Optional<fs::path> { auto value = System::get_environment_variable("ProgramW6432"); @@ -530,23 +572,27 @@ namespace vcpkg::System }(); return PATH; } -} -namespace vcpkg::Debug -{ - void println(const CStringView message) +#if defined(_WIN32) + static BOOL ctrl_handler(DWORD fdw_ctrl_type) { - if (GlobalState::debugging) + switch (fdw_ctrl_type) { - System::println("[DEBUG] %s", message); + case CTRL_C_EVENT: g_ctrl_c_state.transition_handle_ctrl_c(); return TRUE; + default: return FALSE; } } - void println(const System::Color c, const CStringView message) + void System::register_console_ctrl_handler() { - if (GlobalState::debugging) - { - System::println(c, "[DEBUG] %s", message); - } + SetConsoleCtrlHandler(reinterpret_cast<PHANDLER_ROUTINE>(ctrl_handler), TRUE); } +#else + void System::register_console_ctrl_handler() {} +#endif +} + +namespace vcpkg::Debug +{ + std::atomic<bool> g_debugging(false); } diff --git a/toolsrc/src/vcpkg/base/system.print.cpp b/toolsrc/src/vcpkg/base/system.print.cpp new file mode 100644 index 000000000..c7c9981a7 --- /dev/null +++ b/toolsrc/src/vcpkg/base/system.print.cpp @@ -0,0 +1,28 @@ +#include "pch.h" + +#include <vcpkg/base/system.print.h> + +namespace vcpkg::System +{ + namespace details + { + void print(StringView message) { fwrite(message.data(), 1, message.size(), stdout); } + + void print(const Color c, StringView message) + { +#if defined(_WIN32) + const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE); + + CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{}; + GetConsoleScreenBufferInfo(console_handle, &console_screen_buffer_info); + const auto original_color = console_screen_buffer_info.wAttributes; + + SetConsoleTextAttribute(console_handle, static_cast<WORD>(c) | (original_color & 0xF0)); + System::print2(message); + SetConsoleTextAttribute(console_handle, original_color); +#else + System::print2(message); +#endif + } + } +} diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 73ca23df1..4b80debab 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include <vcpkg/base/checks.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/binaryparagraph.h> #include <vcpkg/parse.h> @@ -37,7 +38,7 @@ namespace vcpkg parser.required_field(Fields::PACKAGE, name); std::string architecture; parser.required_field(Fields::ARCHITECTURE, architecture); - this->spec = PackageSpec::from_name_and_triplet(name, Triplet::from_canonical_name(architecture)) + this->spec = PackageSpec::from_name_and_triplet(name, Triplet::from_canonical_name(std::move(architecture))) .value_or_exit(VCPKG_LINE_INFO); } @@ -61,8 +62,7 @@ namespace vcpkg if (const auto err = parser.error_info(this->spec.to_string())) { - System::println( - System::Color::error, "Error: while parsing the Binary Paragraph for %s", this->spec.to_string()); + System::print2(System::Color::error, "Error: while parsing the Binary Paragraph for ", this->spec, '\n'); print_error_message(err); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index c0afd7772..43f1a6288 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -6,7 +6,8 @@ #include <vcpkg/base/hash.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/stringliteral.h>
-#include <vcpkg/base/system.h>
+#include <vcpkg/base/system.print.h>
+#include <vcpkg/base/system.process.h>
#include <vcpkg/build.h>
#include <vcpkg/commands.h>
@@ -81,19 +82,18 @@ namespace vcpkg::Build::Command const auto build_timer = Chrono::ElapsedTimer::create_started();
const auto result = Build::build_package(paths, build_config, status_db);
- System::println("Elapsed time for package %s: %s", spec.to_string(), build_timer.to_string());
+ System::print2("Elapsed time for package ", spec, ": ", build_timer, '\n');
if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES)
{
- System::println(System::Color::error,
- "The build command requires all dependencies to be already installed.");
- System::println("The following dependencies are missing:");
- System::println();
+ System::print2(System::Color::error,
+ "The build command requires all dependencies to be already installed.\n");
+ System::print2("The following dependencies are missing:\n\n");
for (const auto& p : result.unmet_dependencies)
{
- System::println(" %s", p);
+ System::print2(" ", p, '\n');
}
- System::println();
+ System::print2('\n');
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -101,8 +101,8 @@ namespace vcpkg::Build::Command if (result.code != BuildResult::SUCCEEDED)
{
- System::println(System::Color::error, Build::create_error_message(result.code, spec));
- System::println(Build::create_user_troubleshooting_message(spec));
+ System::print2(System::Color::error, Build::create_error_message(result.code, spec), '\n');
+ System::print2(Build::create_user_troubleshooting_message(spec), '\n');
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -125,9 +125,9 @@ namespace vcpkg::Build::Command {
// Build only takes a single package and all dependencies must already be installed
const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE);
- const std::string command_argument = args.command_arguments.at(0);
- const FullPackageSpec spec =
- Input::check_and_get_full_package_spec(command_argument, default_triplet, COMMAND_STRUCTURE.example_text);
+ std::string first_arg = args.command_arguments.at(0);
+ const FullPackageSpec spec = Input::check_and_get_full_package_spec(
+ std::move(first_arg), default_triplet, COMMAND_STRUCTURE.example_text);
Input::check_triplet(spec.package_spec.triplet(), paths);
if (!spec.features.empty() && !GlobalState::feature_packages)
{
@@ -506,13 +506,15 @@ namespace vcpkg::Build std::string key = Strings::format("file_%03d", counter++);
if (GlobalState::debugging)
{
- System::println("[DEBUG] mapping %s from %s", key, port_file.string());
+ System::print2("[DEBUG] mapping ", key, " from ", port_file.u8string(), "\n");
}
abi_tag_entries.emplace_back(AbiEntry{ key, vcpkg::Hash::get_file_hash(fs, port_file, "SHA1") });
}
}
- abi_tag_entries.emplace_back(AbiEntry{"vcpkg_fixup_cmake_targets", "1"});
+ abi_tag_entries.emplace_back(AbiEntry{
+ "vcpkg_fixup_cmake_targets",
+ vcpkg::Hash::get_file_hash(fs, paths.scripts / "cmake" / "vcpkg_fixup_cmake_targets.cmake", "SHA1")});
abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag});
@@ -529,12 +531,12 @@ namespace vcpkg::Build if (GlobalState::debugging)
{
- System::println("[DEBUG] <abientries>");
+ System::print2("[DEBUG] <abientries>\n");
for (auto&& entry : abi_tag_entries)
{
- System::println("[DEBUG] %s|%s", entry.key, entry.value);
+ System::print2("[DEBUG] ", entry.key, "|", entry.value, "\n");
}
- System::println("[DEBUG] </abientries>");
+ System::print2("[DEBUG] </abientries>\n");
}
auto abi_tag_entries_missing = abi_tag_entries;
@@ -550,9 +552,10 @@ namespace vcpkg::Build return AbiTagAndFile{Hash::get_file_hash(fs, abi_file_path, "SHA1"), abi_file_path};
}
- System::println(
- "Warning: binary caching disabled because abi keys are missing values:\n%s",
- Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { return " " + e.key + "\n"; }));
+ System::print2(
+ "Warning: binary caching disabled because abi keys are missing values:\n",
+ Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { return " " + e.key + "\n"; }),
+ "\n");
return nullopt;
}
@@ -592,10 +595,8 @@ namespace vcpkg::Build #if defined(_WIN32)
auto&& seven_zip_exe = paths.get_tool_exe(Tools::SEVEN_ZIP);
- System::cmd_execute_clean(Strings::format(R"("%s" a "%s" "%s\*" >nul)",
- seven_zip_exe.u8string(),
- destination.u8string(),
- source.u8string()));
+ System::cmd_execute_clean(Strings::format(
+ R"("%s" a "%s" "%s\*" >nul)", seven_zip_exe.u8string(), destination.u8string(), source.u8string()));
#else
System::cmd_execute_clean(Strings::format(
R"(cd '%s' && zip --quiet -r '%s' *)", source.u8string(), destination.u8string()));
@@ -662,7 +663,7 @@ namespace vcpkg::Build if (fs.exists(archive_path))
{
- System::println("Using cached binary package: %s", archive_path.u8string());
+ System::print2("Using cached binary package: ", archive_path.u8string(), "\n");
decompress_archive(paths, spec, archive_path);
@@ -676,17 +677,17 @@ namespace vcpkg::Build {
if (config.build_package_options.fail_on_tombstone == FailOnTombstone::YES)
{
- System::println("Found failure tombstone: %s", archive_tombstone_path.u8string());
+ System::print2("Found failure tombstone: ", archive_tombstone_path.u8string(), "\n");
return BuildResult::BUILD_FAILED;
}
else
{
- System::println(
- System::Color::warning, "Found failure tombstone: %s", archive_tombstone_path.u8string());
+ System::print2(
+ System::Color::warning, "Found failure tombstone: ", archive_tombstone_path.u8string(), "\n");
}
}
- System::println("Could not locate cached archive: %s", archive_path.u8string());
+ System::print2("Could not locate cached archive: ", archive_path.u8string(), "\n");
ExtendedBuildResult result = do_build_package_and_clean_buildtrees(
paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config);
@@ -707,13 +708,13 @@ namespace vcpkg::Build fs.rename_or_copy(tmp_archive_path, archive_path, ".tmp", ec);
if (ec)
{
- System::println(System::Color::warning,
- "Failed to store binary cache %s: %s",
- archive_path.u8string(),
- ec.message());
+ System::printf(System::Color::warning,
+ "Failed to store binary cache %s: %s\n",
+ archive_path.u8string(),
+ ec.message());
}
else
- System::println("Stored binary cache: %s", archive_path.u8string());
+ System::printf("Stored binary cache: %s\n", archive_path.u8string());
}
else if (result.code == BuildResult::BUILD_FAILED || result.code == BuildResult::POST_BUILD_CHECKS_FAILED)
{
@@ -729,7 +730,10 @@ namespace vcpkg::Build {
if (log_file.path().extension() == ".log")
{
- fs.copy_file(log_file.path(), tmp_log_path_destination / log_file.path().filename(), fs::stdfs::copy_options::none, ec);
+ fs.copy_file(log_file.path(),
+ tmp_log_path_destination / log_file.path().filename(),
+ fs::stdfs::copy_options::none,
+ ec);
}
}
diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 3b353feec..afef518eb 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/install.h> #include <vcpkg/metrics.h> @@ -14,7 +14,7 @@ namespace vcpkg::Commands::Autocomplete std::vector<std::string>&& results) { const SortedVector<std::string> sorted_results(results); - System::println(Strings::join("\n", sorted_results)); + System::print2(Strings::join("\n", sorted_results), '\n'); Checks::exit_success(line_info); } @@ -137,7 +137,7 @@ namespace vcpkg::Commands::Autocomplete if (is_option) { results = Util::fmap(command.structure.options.switches, - [](const CommandSwitch& s) -> std::string { return s.name; }); + [](const CommandSwitch& s) -> std::string { return s.name.to_string(); }); auto settings = Util::fmap(command.structure.options.settings, [](auto&& s) { return s.name; }); results.insert(results.end(), settings.begin(), settings.end()); diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp index 82d03db48..19b89c2f5 100644 --- a/toolsrc/src/vcpkg/commands.buildexternal.cpp +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -20,7 +20,7 @@ namespace vcpkg::Commands::BuildExternal const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const FullPackageSpec spec = Input::check_and_get_full_package_spec( - args.command_arguments.at(0), default_triplet, COMMAND_STRUCTURE.example_text); + std::string(args.command_arguments.at(0)), default_triplet, COMMAND_STRUCTURE.example_text); Input::check_triplet(spec.package_spec.triplet(), paths); const fs::path port_dir = args.command_arguments.at(1); diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 464f4f9ee..c321de3b5 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -1,7 +1,7 @@ #include "pch.h" #include <vcpkg/base/files.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/binaryparagraph.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> @@ -43,7 +43,7 @@ namespace vcpkg::Commands::Cache const std::vector<BinaryParagraph> binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) { - System::println("No packages are cached."); + System::print2("No packages are cached.\n"); Checks::exit_success(VCPKG_LINE_INFO); } @@ -51,8 +51,7 @@ namespace vcpkg::Commands::Cache { for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { - const std::string displayname = binary_paragraph.displayname(); - System::println(displayname); + System::print2(binary_paragraph.displayname(), '\n'); } } else @@ -66,7 +65,7 @@ namespace vcpkg::Commands::Cache continue; } - System::println(displayname); + System::print2(displayname, '\n'); } } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 4ff503e1c..10cb7d9fe 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -327,11 +327,11 @@ namespace vcpkg::Commands::CI b_will_build = true; } - System::println("%40s: %1s %8s: %s", p->spec, (b_will_build ? "*" : " "), state, abi); + System::printf("%40s: %1s %8s: %s\n", p->spec, (b_will_build ? "*" : " "), state, abi); } } - System::print("Time to determine pass/fail: %s\n", timer.elapsed().to_string()); + System::printf("Time to determine pass/fail: %s\n", timer.elapsed()); return ret; } @@ -340,7 +340,7 @@ namespace vcpkg::Commands::CI { if (!GlobalState::g_binary_caching) { - System::println(System::Color::warning, "Warning: Running ci without binary caching!"); + System::print2(System::Color::warning, "Warning: Running ci without binary caching!\n"); } const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); @@ -356,11 +356,8 @@ namespace vcpkg::Commands::CI const auto is_dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); const auto purge_tombstones = Util::Sets::contains(options.switches, OPTION_PURGE_TOMBSTONES); - std::vector<Triplet> triplets; - for (const std::string& triplet : args.command_arguments) - { - triplets.push_back(Triplet::from_canonical_name(triplet)); - } + std::vector<Triplet> triplets = Util::fmap( + args.command_arguments, [](std::string s) { return Triplet::from_canonical_name(std::move(s)); }); if (triplets.empty()) { @@ -491,8 +488,8 @@ namespace vcpkg::Commands::CI for (auto&& result : results) { - System::println("\nTriplet: %s", result.triplet); - System::println("Total elapsed time: %s", result.summary.total_elapsed_time); + System::print2("\nTriplet: ", result.triplet, "\n"); + System::print2("Total elapsed time: ", result.summary.total_elapsed_time, "\n"); result.summary.print(); } diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 9f86a67dc..afbdc1fa7 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -1,7 +1,8 @@ #include "pch.h" #include <vcpkg/base/chrono.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> #include <vcpkg/userconfig.h> @@ -45,15 +46,15 @@ namespace vcpkg::Commands::Contact #if defined(_WIN32) System::cmd_execute("start https://aka.ms/NPS_vcpkg"); - System::println("Default browser launched to https://aka.ms/NPS_vcpkg; thank you for your feedback!"); + System::print2("Default browser launched to https://aka.ms/NPS_vcpkg; thank you for your feedback!\n"); #else - System::println( - "Please navigate to https://aka.ms/NPS_vcpkg in your preferred browser. Thank you for your feedback!"); + System::print2("Please navigate to https://aka.ms/NPS_vcpkg in your preferred browser. Thank you for your " + "feedback!\n"); #endif } else { - System::println("Send an email to %s with any feedback.", email()); + System::print2("Send an email to ", email(), " with any feedback.\n"); } Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index db265514f..54e9346ba 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include <vcpkg/base/hash.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/build.h> #include <vcpkg/commands.h> @@ -77,7 +78,7 @@ namespace vcpkg::Commands::Fetch const std::string tool = args.command_arguments[0]; const fs::path tool_path = paths.get_tool_exe(tool); - System::println(tool_path.u8string()); + System::print2(tool_path.u8string(), '\n'); Checks::exit_success(VCPKG_LINE_INFO); } } @@ -100,7 +101,7 @@ namespace vcpkg::Commands::Hash const fs::path file_to_hash = args.command_arguments[0]; const std::string algorithm = args.command_arguments.size() == 2 ? args.command_arguments[1] : "SHA512"; const std::string hash = vcpkg::Hash::get_file_hash(paths.get_filesystem(), file_to_hash, algorithm); - System::println(hash); + System::print2(hash, '\n'); Checks::exit_success(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index dfb3ab784..a6f2c8838 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -1,7 +1,8 @@ #include "pch.h" +#include <vcpkg/base/checks.h> #include <vcpkg/base/files.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index 455f3b7c5..92ba15c1f 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -1,7 +1,7 @@ #include "pch.h"
#include <vcpkg/base/strings.h>
-#include <vcpkg/base/system.h>
+#include <vcpkg/base/system.print.h>
#include <vcpkg/base/util.h>
#include <vcpkg/commands.h>
#include <vcpkg/help.h>
@@ -11,10 +11,12 @@ namespace vcpkg::Commands::DependInfo {
constexpr StringLiteral OPTION_DOT = "--dot";
constexpr StringLiteral OPTION_DGML = "--dgml";
+ constexpr StringLiteral OPTION_NO_RECURSE = "--no-recurse";
- constexpr std::array<CommandSwitch, 2> DEPEND_SWITCHES = {{
+ constexpr std::array<CommandSwitch, 3> DEPEND_SWITCHES = {{
{OPTION_DOT, "Creates graph on basis of dot"},
{OPTION_DGML, "Creates graph on basis of dgml"},
+ {OPTION_NO_RECURSE, "Computes only immediate dependencies of packages explicitly specified on the command-line"},
}};
const CommandStructure COMMAND_STRUCTURE = {
@@ -121,7 +123,8 @@ namespace vcpkg::Commands::DependInfo void build_dependencies_list(std::set<std::string>& packages_to_keep,
const std::string& requested_package,
- const std::vector<std::unique_ptr<SourceControlFile>>& source_control_files)
+ const std::vector<std::unique_ptr<SourceControlFile>>& source_control_files,
+ const std::unordered_set<std::string>& switches)
{
const auto source_control_file =
Util::find_if(source_control_files, [&requested_package](const auto& source_control_file) {
@@ -132,17 +135,17 @@ namespace vcpkg::Commands::DependInfo {
const auto new_package = packages_to_keep.insert(requested_package).second;
- if (new_package)
+ if (new_package && !Util::Sets::contains(switches, OPTION_NO_RECURSE))
{
for (const auto& dependency : (*source_control_file)->core_paragraph->depends)
{
- build_dependencies_list(packages_to_keep, dependency.depend.name, source_control_files);
+ build_dependencies_list(packages_to_keep, dependency.depend.name, source_control_files, switches);
}
}
}
else
{
- System::println(System::Color::warning, "package '%s' does not exist", requested_package);
+ System::print2(System::Color::warning, "package '", requested_package, "' does not exist\n");
}
}
@@ -157,7 +160,7 @@ namespace vcpkg::Commands::DependInfo std::set<std::string> packages_to_keep;
for (const auto& requested_package : args.command_arguments)
{
- build_dependencies_list(packages_to_keep, requested_package, source_control_files);
+ build_dependencies_list(packages_to_keep, requested_package, source_control_files, options.switches);
}
Util::erase_remove_if(source_control_files, [&packages_to_keep](const auto& source_control_file) {
@@ -165,10 +168,10 @@ namespace vcpkg::Commands::DependInfo });
}
- if (!options.switches.empty())
+ if (Util::Sets::contains(options.switches, OPTION_DOT) || Util::Sets::contains(options.switches, OPTION_DGML))
{
const std::string graph_as_string = create_graph_as_string(options.switches, source_control_files);
- System::println(graph_as_string);
+ System::print2(graph_as_string, '\n');
Checks::exit_success(VCPKG_LINE_INFO);
}
@@ -176,7 +179,7 @@ namespace vcpkg::Commands::DependInfo {
const SourceParagraph& source_paragraph = *source_control_file->core_paragraph;
const auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); });
- System::println("%s: %s", source_paragraph.name, s);
+ System::print2(source_paragraph.name, ": ", s, "\n");
}
Checks::exit_success(VCPKG_LINE_INFO);
diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index c9d52c572..b2309aa41 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -1,7 +1,8 @@ #include "pch.h" #include <vcpkg/base/strings.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> @@ -13,19 +14,40 @@ 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; + StringLiteral 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); + const fs::path install_path = fs::u8path(*c); output.push_back(install_path / "Code - Insiders.exe"); output.push_back(install_path / "Code.exe"); } @@ -165,12 +187,12 @@ namespace vcpkg::Commands::Edit const auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); }); if (it == candidate_paths.cend()) { - System::println( + System::print2( System::Color::error, - "Error: Visual Studio Code was not found and the environment variable EDITOR is not set or invalid."); - System::println("The following paths were examined:"); + "Error: Visual Studio Code was not found and the environment variable EDITOR is not set or invalid.\n"); + System::print2("The following paths were examined:\n"); Files::print_paths(candidate_paths); - System::println("You can also set the environmental variable EDITOR to your editor of choice."); + System::print2("You can also set the environmental variable EDITOR to your editor of choice.\n"); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index ea00617d4..b81aeae55 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -1,7 +1,7 @@ #include "pch.h" #include <vcpkg/base/strings.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/build.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index 62725a90a..ba9e28233 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -1,5 +1,7 @@ #include "pch.h" +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/commands.h> #include <vcpkg/export.h> #include <vcpkg/export.ifw.h> @@ -81,7 +83,7 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", - package_xml_file_path.generic_string()); + package_xml_file_path.generic_u8string()); auto deps = Strings::join( ",", binary_paragraph.depends, [](const std::string& dep) { return "packages." + dep + ":"; }); @@ -126,7 +128,7 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", - package_xml_file_path.generic_string()); + package_xml_file_path.generic_u8string()); fs.write_contents(package_xml_file_path, Strings::format( R"###(<?xml version="1.0"?> @@ -150,7 +152,7 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", - package_xml_file_path.generic_string()); + package_xml_file_path.generic_u8string()); fs.write_contents(package_xml_file_path, Strings::format( @@ -183,7 +185,7 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", - package_xml_file_path.generic_string()); + package_xml_file_path.generic_u8string()); fs.write_contents(package_xml_file_path, Strings::format( R"###(<?xml version="1.0"?> @@ -204,7 +206,7 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", - package_xml_file_path.generic_string()); + package_xml_file_path.generic_u8string()); fs.write_contents(package_xml_file_path, Strings::format( R"###(<?xml version="1.0"?> @@ -230,7 +232,7 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", - package_xml_file_path.generic_string()); + package_xml_file_path.generic_u8string()); fs.write_contents(package_xml_file_path, Strings::format( @@ -256,7 +258,7 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for configuration file %s", - config_xml_file_path.generic_string()); + config_xml_file_path.generic_u8string()); std::string formatted_repo_url; std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); @@ -286,7 +288,7 @@ namespace vcpkg::Export::IFW void export_maintenance_tool(const fs::path& ifw_packages_dir_path, const VcpkgPaths& paths) { - System::println("Exporting maintenance tool... "); + System::print2("Exporting maintenance tool...\n"); std::error_code ec; Files::Filesystem& fs = paths.get_filesystem(); @@ -297,10 +299,10 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", - tempmaintenancetool.generic_string()); + tempmaintenancetool.generic_u8string()); fs.copy_file(installerbase_exe, tempmaintenancetool, fs::copy_options::overwrite_existing, ec); Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not write package file %s", tempmaintenancetool.generic_string()); + VCPKG_LINE_INFO, !ec, "Could not write package file %s", tempmaintenancetool.generic_u8string()); fs::path package_xml_file_path = ifw_packages_dir_path / "maintenance" / "meta" / "package.xml"; fs::path package_xml_dir_path = package_xml_file_path.parent_path(); @@ -308,7 +310,7 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", - package_xml_file_path.generic_string()); + package_xml_file_path.generic_u8string()); fs.write_contents(package_xml_file_path, Strings::format( R"###(<?xml version="1.0"?> @@ -328,9 +330,9 @@ namespace vcpkg::Export::IFW const fs::path script_destination = ifw_packages_dir_path / "maintenance" / "meta" / "maintenance.qs"; fs.copy_file(script_source, script_destination, fs::copy_options::overwrite_existing, ec); Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not write package file %s", script_destination.generic_string()); + VCPKG_LINE_INFO, !ec, "Could not write package file %s", script_destination.generic_u8string()); - System::println("Exporting maintenance tool... done"); + System::print2("Exporting maintenance tool... done\n"); } void do_repository(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) @@ -339,14 +341,16 @@ namespace vcpkg::Export::IFW const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); - System::println("Generating repository %s...", repository_dir.generic_string()); + System::print2("Generating repository ", repository_dir.generic_u8string(), "...\n"); std::error_code ec; Files::Filesystem& fs = paths.get_filesystem(); fs.remove_all(repository_dir, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not remove outdated repository directory %s", repository_dir.generic_string()); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not remove outdated repository directory %s", + repository_dir.generic_u8string()); const auto cmd_line = Strings::format(R"("%s" --packages "%s" "%s" > nul)", repogen_exe.u8string(), @@ -356,7 +360,8 @@ namespace vcpkg::Export::IFW const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW repository generating failed"); - System::println(System::Color::success, "Generating repository %s... done.", repository_dir.generic_string()); + System::printf( + System::Color::success, "Generating repository %s... done.\n", repository_dir.generic_u8string()); } void do_installer(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) @@ -367,7 +372,7 @@ namespace vcpkg::Export::IFW const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); const fs::path installer_file = get_installer_file_path(export_id, ifw_options, paths); - System::println("Generating installer %s...", installer_file.generic_string()); + System::printf("Generating installer %s...\n", installer_file.generic_u8string()); std::string cmd_line; @@ -392,7 +397,7 @@ namespace vcpkg::Export::IFW const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW installer generating failed"); - System::println(System::Color::success, "Generating installer %s... done.", installer_file.generic_string()); + System::printf(System::Color::success, "Generating installer %s... done.\n", installer_file.generic_u8string()); } void do_export(const std::vector<ExportPlanAction>& export_plan, @@ -410,16 +415,16 @@ namespace vcpkg::Export::IFW Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not remove outdated packages directory %s", - ifw_packages_dir_path.generic_string()); + ifw_packages_dir_path.generic_u8string()); fs.create_directory(ifw_packages_dir_path, ec); Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create packages directory %s", ifw_packages_dir_path.generic_string()); + VCPKG_LINE_INFO, !ec, "Could not create packages directory %s", ifw_packages_dir_path.generic_u8string()); // Export maintenance tool export_maintenance_tool(ifw_packages_dir_path, paths); - System::println("Exporting packages %s... ", ifw_packages_dir_path.generic_string()); + System::printf("Exporting packages %s...\n", ifw_packages_dir_path.generic_u8string()); // execute the plan std::map<std::string, const ExportPlanAction*> unique_packages; @@ -431,8 +436,7 @@ namespace vcpkg::Export::IFW Checks::unreachable(VCPKG_LINE_INFO); } - const std::string display_name = action.spec.to_string(); - System::println("Exporting package %s... ", display_name); + System::print2("Exporting package ", action.spec, "...\n"); const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO); @@ -449,14 +453,13 @@ namespace vcpkg::Export::IFW (binary_paragraph.fullstem() + ".list")); Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); - System::println("Exporting package %s... done", display_name); } - System::println("Exporting packages %s... done", ifw_packages_dir_path.generic_string()); + System::printf("Exporting packages %s... done\n", ifw_packages_dir_path.generic_u8string()); const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); - System::println("Generating configuration %s...", config_file.generic_string()); + System::printf("Generating configuration %s...\n", config_file.generic_u8string()); // Unique packages export_unique_packages(ifw_packages_dir_path, unique_packages, fs); @@ -472,7 +475,7 @@ namespace vcpkg::Export::IFW // Configuration export_config(export_id, ifw_options, paths); - System::println("Generating configuration %s... done.", config_file.generic_string()); + System::printf("Generating configuration %s... done.\n", config_file.generic_u8string()); // Do repository (optional) std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); diff --git a/toolsrc/src/vcpkg/commands.import.cpp b/toolsrc/src/vcpkg/commands.import.cpp index 4b595697a..a2fd5d15d 100644 --- a/toolsrc/src/vcpkg/commands.import.cpp +++ b/toolsrc/src/vcpkg/commands.import.cpp @@ -114,7 +114,7 @@ namespace vcpkg::Commands::Import Checks::check_exit(VCPKG_LINE_INFO, pghs.get() != nullptr, "Invalid control file %s for package", - control_file_path.generic_string()); + control_file_path.generic_u8string()); StatusParagraph spgh; spgh.package = BinaryParagraph(*pghs.get()); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index c1d3a8c8d..026ab3b77 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -3,7 +3,8 @@ #include <vcpkg/base/checks.h> #include <vcpkg/base/expected.h> #include <vcpkg/base/files.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> #include <vcpkg/commands.h> #include <vcpkg/metrics.h> @@ -73,7 +74,7 @@ namespace vcpkg::Commands::Integrate #if defined(_WIN32) static std::string get_nuget_id(const fs::path& vcpkg_root_dir) { - std::string dir_id = vcpkg_root_dir.generic_string(); + std::string dir_id = vcpkg_root_dir.generic_u8string(); std::replace(dir_id.begin(), dir_id.end(), '/', '.'); dir_id.erase(1, 1); // Erasing the ":" @@ -185,7 +186,7 @@ namespace vcpkg::Commands::Integrate { case ElevationPromptChoice::YES: break; case ElevationPromptChoice::NO: - System::println(System::Color::warning, "Warning: Previous integration file was not removed"); + System::print2(System::Color::warning, "Warning: Previous integration file was not removed\n"); Checks::exit_fail(VCPKG_LINE_INFO); default: Checks::unreachable(VCPKG_LINE_INFO); } @@ -219,7 +220,7 @@ namespace vcpkg::Commands::Integrate { case ElevationPromptChoice::YES: break; case ElevationPromptChoice::NO: - System::println(System::Color::warning, "Warning: integration was not applied"); + System::print2(System::Color::warning, "Warning: integration was not applied\n"); Checks::exit_fail(VCPKG_LINE_INFO); default: Checks::unreachable(VCPKG_LINE_INFO); } @@ -247,17 +248,19 @@ namespace vcpkg::Commands::Integrate const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; fs.write_contents(appdata_src_path, - create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); + create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.u8string())); auto appdata_dst_path = get_appdata_targets_path(); const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); if (!rc || ec) { - System::println(System::Color::error, - "Error: Failed to copy file: %s -> %s", - appdata_src_path.string(), - appdata_dst_path.string()); + System::print2(System::Color::error, + "Error: Failed to copy file: ", + appdata_src_path.u8string(), + " -> ", + appdata_dst_path.u8string(), + "\n"); Checks::exit_fail(VCPKG_LINE_INFO); } } @@ -268,26 +271,28 @@ namespace vcpkg::Commands::Integrate fs.write_contents(pathtxt, paths.root.generic_u8string(), ec); if (ec) { - System::println(System::Color::error, "Error: Failed to write file: %s", pathtxt.string()); + System::print2(System::Color::error, "Error: Failed to write file: ", pathtxt.u8string(), "\n"); Checks::exit_fail(VCPKG_LINE_INFO); } - System::println(System::Color::success, "Applied user-wide integration for this vcpkg root."); + System::print2(System::Color::success, "Applied user-wide integration for this vcpkg root.\n"); const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake"; #if defined(_WIN32) - System::println( + System::printf( R"( All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available. -CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", - cmake_toolchain.generic_string()); +CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s" +)", + cmake_toolchain.generic_u8string()); #else - System::println( + System::printf( R"( -CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", - cmake_toolchain.generic_string()); +CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s" +)", + cmake_toolchain.generic_u8string()); #endif Checks::exit_success(VCPKG_LINE_INFO); @@ -310,11 +315,11 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", if (was_deleted) { - System::println(System::Color::success, "User-wide integration was removed"); + System::print2(System::Color::success, "User-wide integration was removed\n"); } else { - System::println(System::Color::success, "User-wide integration is not installed"); + System::print2(System::Color::success, "User-wide integration is not installed\n"); } Checks::exit_success(VCPKG_LINE_INFO); @@ -354,17 +359,18 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", const fs::path nuget_package = buildsystems_dir / Strings::format("%s.%s.nupkg", nuget_id, nupkg_version); Checks::check_exit( VCPKG_LINE_INFO, exit_code == 0 && fs.exists(nuget_package), "Error: NuGet package creation failed"); - System::println(System::Color::success, "Created nupkg: %s", nuget_package.string()); + System::print2(System::Color::success, "Created nupkg: ", nuget_package.u8string(), '\n'); auto source_path = buildsystems_dir.u8string(); source_path = Strings::replace_all(std::move(source_path), "`", "``"); - System::println(R"( + System::printf(R"( With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: Install-Package %s -Source "%s" + )", - nuget_id, - source_path); + nuget_id, + source_path); Checks::exit_success(VCPKG_LINE_INFO); } @@ -389,12 +395,12 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console if (rc) { - System::println(System::Color::error, - "%s\n" - "Could not run:\n" - " '%s'", - TITLE, - script_path.generic_string()); + System::printf(System::Color::error, + "%s\n" + "Could not run:\n" + " '%s'\n", + TITLE, + script_path.generic_u8string()); { auto locked_metrics = Metrics::g_metrics.lock(); @@ -432,7 +438,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console if (!matches.empty()) { - System::print("vcpkg bash completion is already imported to your %s file.\n" + System::printf("vcpkg bash completion is already imported to your %s file.\n" "The following entries were found:\n" " %s\n" "Please make sure you have started a new bash shell for the changes to take effect.\n", @@ -441,9 +447,9 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console Checks::exit_success(VCPKG_LINE_INFO); } - System::print("Adding vcpkg completion entry to %s\n", bashrc_path.u8string()); + System::printf("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/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index cadc06ad3..71738427c 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> #include <vcpkg/vcpkglib.h> @@ -14,14 +14,14 @@ namespace vcpkg::Commands::List { if (full_desc) { - System::println("%-50s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); + System::printf("%-50s %-16s %s\n", pgh.package.displayname(), pgh.package.version, pgh.package.description); } else { - System::println("%-50s %-16s %s", - vcpkg::shorten_text(pgh.package.displayname(), 50), - vcpkg::shorten_text(pgh.package.version, 16), - vcpkg::shorten_text(pgh.package.description, 51)); + System::printf("%-50s %-16s %s\n", + vcpkg::shorten_text(pgh.package.displayname(), 50), + vcpkg::shorten_text(pgh.package.version, 16), + vcpkg::shorten_text(pgh.package.description, 51)); } } @@ -48,7 +48,7 @@ namespace vcpkg::Commands::List if (installed_ipv.empty()) { - System::println("No packages are installed. Did you mean `search`?"); + System::print2("No packages are installed. Did you mean `search`?\n"); Checks::exit_success(VCPKG_LINE_INFO); } @@ -63,11 +63,13 @@ namespace vcpkg::Commands::List return lhs->package.displayname() < rhs->package.displayname(); }); + const auto enable_fulldesc = Util::Sets::contains(options.switches, OPTION_FULLDESC.to_string()); + if (args.command_arguments.empty()) { for (const StatusParagraph* status_paragraph : installed_packages) { - do_print(*status_paragraph, Util::Sets::contains(options.switches, OPTION_FULLDESC)); + do_print(*status_paragraph, enable_fulldesc); } } else @@ -81,7 +83,7 @@ namespace vcpkg::Commands::List continue; } - do_print(*status_paragraph, Util::Sets::contains(options.switches, OPTION_FULLDESC)); + do_print(*status_paragraph, enable_fulldesc); } } diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp index ee9584651..58ed69e8b 100644 --- a/toolsrc/src/vcpkg/commands.owns.cpp +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> #include <vcpkg/vcpkglib.h> @@ -18,7 +18,7 @@ namespace vcpkg::Commands::Owns { if (file.find(file_substr) != std::string::npos) { - System::println("%s: %s", pgh.package.displayname(), file); + System::print2(pgh.package.displayname(), ": ", file, '\n'); } } } diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 2d2b4bd5f..b30c38f43 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -6,7 +6,8 @@ #include <vcpkg/versiont.h> #include <vcpkg/base/sortedvector.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> namespace vcpkg::Commands::PortsDiff @@ -71,7 +72,7 @@ namespace vcpkg::Commands::PortsDiff for (const std::string& name : ports_to_print) { const VersionT& version = names_and_versions.at(name); - System::println(" - %-14s %-16s", name, version); + System::printf(" - %-14s %-16s\n", name, version); } } @@ -155,14 +156,14 @@ namespace vcpkg::Commands::PortsDiff const std::vector<std::string>& added_ports = setp.only_left; if (!added_ports.empty()) { - System::println("\nThe following %zd ports were added:", added_ports.size()); + System::printf("\nThe following %zd ports were added:\n", added_ports.size()); do_print_name_and_version(added_ports, current_names_and_versions); } const std::vector<std::string>& removed_ports = setp.only_right; if (!removed_ports.empty()) { - System::println("\nThe following %zd ports were removed:", removed_ports.size()); + System::printf("\nThe following %zd ports were removed:\n", removed_ports.size()); do_print_name_and_version(removed_ports, previous_names_and_versions); } @@ -172,16 +173,16 @@ namespace vcpkg::Commands::PortsDiff if (!updated_ports.empty()) { - System::println("\nThe following %zd ports were updated:", updated_ports.size()); + System::printf("\nThe following %zd ports were updated:\n", updated_ports.size()); for (const UpdatedPort& p : updated_ports) { - System::println(" - %-14s %-16s", p.port, p.version_diff.to_string()); + System::printf(" - %-14s %-16s\n", p.port, p.version_diff.to_string()); } } if (added_ports.empty() && removed_ports.empty() && updated_ports.empty()) { - System::println("There were no changes in the ports between the two commits."); + System::print2("There were no changes in the ports between the two commits.\n"); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index 263c86698..a0afd69e1 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> @@ -12,34 +12,35 @@ namespace vcpkg::Commands::Search { static constexpr StringLiteral OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually - + static void do_print(const SourceParagraph& source_paragraph, bool full_desc) { if (full_desc) { - System::println( - "%-20s %-16s %s", source_paragraph.name, source_paragraph.version, source_paragraph.description); + System::printf( + "%-20s %-16s %s\n", source_paragraph.name, source_paragraph.version, source_paragraph.description); } else { - System::println("%-20s %-16s %s", - vcpkg::shorten_text(source_paragraph.name, 20), - vcpkg::shorten_text(source_paragraph.version, 16), - vcpkg::shorten_text(source_paragraph.description, 81)); + System::printf("%-20s %-16s %s\n", + vcpkg::shorten_text(source_paragraph.name, 20), + vcpkg::shorten_text(source_paragraph.version, 16), + vcpkg::shorten_text(source_paragraph.description, 81)); } } static void do_print(const std::string& name, const FeatureParagraph& feature_paragraph, bool full_desc) { + auto full_feature_name = Strings::concat(name, "[", feature_paragraph.name, "]"); if (full_desc) { - System::println("%-37s %s", name + "[" + feature_paragraph.name + "]", feature_paragraph.description); + System::printf("%-37s %s\n", full_feature_name, feature_paragraph.description); } else { - System::println("%-37s %s", - vcpkg::shorten_text(name + "[" + feature_paragraph.name + "]", 37), - vcpkg::shorten_text(feature_paragraph.description, 81)); + System::printf("%-37s %s\n", + vcpkg::shorten_text(full_feature_name, 37), + vcpkg::shorten_text(feature_paragraph.description, 81)); } } @@ -102,9 +103,9 @@ namespace vcpkg::Commands::Search } } - System::println( + System::print2( "\nIf your library is not listed, please open an issue at and/or consider making a pull request:\n" - " https://github.com/Microsoft/vcpkg/issues"); + " https://github.com/Microsoft/vcpkg/issues\n"); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index 0e58b012d..29627db3d 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -10,6 +10,7 @@ #include <vcpkg/update.h> #include <vcpkg/vcpkglib.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/base/util.h> namespace vcpkg::Commands::Upgrade @@ -47,7 +48,7 @@ namespace vcpkg::Commands::Upgrade // input sanitization const std::vector<PackageSpec> specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); + return Input::check_and_get_package_spec(std::string(arg), default_triplet, COMMAND_STRUCTURE.example_text); }); for (auto&& spec : specs) @@ -62,7 +63,7 @@ namespace vcpkg::Commands::Upgrade if (outdated_packages.empty()) { - System::println("All installed packages are up-to-date with the local portfiles."); + System::print2("All installed packages are up-to-date with the local portfiles.\n"); Checks::exit_success(VCPKG_LINE_INFO); } @@ -112,23 +113,29 @@ namespace vcpkg::Commands::Upgrade if (!up_to_date.empty()) { - System::println(System::Color::success, "The following packages are up-to-date:"); - System::println(Strings::join( - "", up_to_date, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + System::print2(System::Color::success, "The following packages are up-to-date:\n"); + System::print2(Strings::join("", + up_to_date, + [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; }), + '\n'); } if (!not_installed.empty()) { - System::println(System::Color::error, "The following packages are not installed:"); - System::println(Strings::join( - "", not_installed, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + System::print2(System::Color::error, "The following packages are not installed:\n"); + System::print2(Strings::join("", + not_installed, + [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; }), + '\n'); } if (!no_portfile.empty()) { - System::println(System::Color::error, "The following packages do not have a valid portfile:"); - System::println(Strings::join( - "", no_portfile, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + System::print2(System::Color::error, "The following packages do not have a valid portfile:\n"); + System::print2(Strings::join("", + no_portfile, + [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; }), + '\n'); } Checks::check_exit(VCPKG_LINE_INFO, not_installed.empty() && no_portfile.empty()); @@ -166,15 +173,15 @@ namespace vcpkg::Commands::Upgrade if (!no_dry_run) { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run this command with the " - "--no-dry-run option."); + System::print2(System::Color::warning, + "If you are sure you want to rebuild the above packages, run this command with the " + "--no-dry-run option.\n"); Checks::exit_fail(VCPKG_LINE_INFO); } const Install::InstallSummary summary = Install::perform(plan, keep_going, paths, status_db); - System::println("\nTotal elapsed time: %s\n", summary.total_elapsed_time); + System::print2("\nTotal elapsed time: ", summary.total_elapsed_time, "\n\n"); if (keep_going == KeepGoing::YES) { diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index 2ad91b57d..7029c8bfd 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> #include <vcpkg/metrics.h> @@ -60,15 +60,15 @@ namespace vcpkg::Commands::Version { if (maj1 != maj2 || min1 != min2 || rev1 != rev2) { - System::println(System::Color::warning, - "Warning: Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " - ".\\bootstrap-vcpkg.bat to update.", - maj2, - min2, - rev2, - maj1, - min1, - rev1); + System::printf(System::Color::warning, + "Warning: Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " + ".\\bootstrap-vcpkg.bat to update.\n", + maj2, + min2, + rev2, + maj1, + min1, + rev1); } } } @@ -85,10 +85,11 @@ namespace vcpkg::Commands::Version { Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); - System::println("Vcpkg package management program version %s\n" - "\n" - "See LICENSE.txt for license information.", - version()); + System::print2("Vcpkg package management program version ", + version(), + "\n" + "\n" + "See LICENSE.txt for license information.\n"); Checks::exit_success(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/commands.xvsinstances.cpp b/toolsrc/src/vcpkg/commands.xvsinstances.cpp index d748b6b2f..542ebd56c 100644 --- a/toolsrc/src/vcpkg/commands.xvsinstances.cpp +++ b/toolsrc/src/vcpkg/commands.xvsinstances.cpp @@ -1,5 +1,6 @@ #include "pch.h"
+#include <vcpkg/base/system.print.h>
#include <vcpkg/commands.h>
#include <vcpkg/help.h>
#include <vcpkg/visualstudio.h>
@@ -22,7 +23,7 @@ namespace vcpkg::Commands::X_VSInstances const auto instances = vcpkg::VisualStudio::get_visual_studio_instances(paths);
for (const std::string& instance : instances)
{
- System::println(instance);
+ System::print2(instance, '\n');
}
Checks::exit_success(VCPKG_LINE_INFO);
diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 19d8e7ae8..8fde28929 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -580,9 +580,10 @@ namespace vcpkg::Dependencies auto res = follow_plus_dependencies(f, cluster, graph, graph_plan, prevent_default_features); if (res != MarkPlusResult::SUCCESS) { - System::println(System::Color::warning, - "Warning: could not reinstall feature %s", - FeatureSpec{cluster.spec, f}); + System::print2(System::Color::warning, + "Warning: could not reinstall feature ", + FeatureSpec{cluster.spec, f}, + "\n"); } } @@ -596,9 +597,10 @@ namespace vcpkg::Dependencies auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features); if (res != MarkPlusResult::SUCCESS) { - System::println(System::Color::warning, - "Warning: could not install new default feature %s", - FeatureSpec{cluster.spec, default_feature}); + System::print2(System::Color::warning, + "Warning: could not install new default feature ", + FeatureSpec{cluster.spec, default_feature}, + "\n"); } } } @@ -837,40 +839,42 @@ namespace vcpkg::Dependencies if (!excluded.empty()) { - System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); + System::print2("The following packages are excluded:\n", actions_to_output_string(excluded), '\n'); } if (!already_installed_plans.empty()) { - System::println("The following packages are already installed:\n%s", - actions_to_output_string(already_installed_plans)); + System::print2("The following packages are already installed:\n", + actions_to_output_string(already_installed_plans), + '\n'); } if (!rebuilt_plans.empty()) { - System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); + System::print2("The following packages will be rebuilt:\n", actions_to_output_string(rebuilt_plans), '\n'); } if (!new_plans.empty()) { - System::println("The following packages will be built and installed:\n%s", - actions_to_output_string(new_plans)); + System::print2( + "The following packages will be built and installed:\n", actions_to_output_string(new_plans), '\n'); } if (!only_install_plans.empty()) { - System::println("The following packages will be directly installed:\n%s", - actions_to_output_string(only_install_plans)); + System::print2("The following packages will be directly installed:\n", + actions_to_output_string(only_install_plans), + '\n'); } if (has_non_user_requested_packages) - System::println("Additional packages (*) will be modified to complete this operation."); + System::print2("Additional packages (*) will be modified to complete this operation.\n"); if (!remove_plans.empty() && !is_recursive) { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run the command with the " - "--recurse option"); + System::print2(System::Color::warning, + "If you are sure you want to rebuild the above packages, run the command with the " + "--recurse option\n"); Checks::exit_fail(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index eec9a39f2..870d2c49e 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -11,7 +11,8 @@ #include <vcpkg/vcpkglib.h> #include <vcpkg/base/stringliteral.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> namespace vcpkg::Export @@ -96,10 +97,10 @@ namespace vcpkg::Export switch (plan_type) { case ExportPlanType::ALREADY_BUILT: - System::println("The following packages are already built and will be exported:\n%s", as_string); + System::print2("The following packages are already built and will be exported:\n", as_string, '\n'); continue; case ExportPlanType::NOT_BUILT: - System::println("The following packages need to be built:\n%s", as_string); + System::print2("The following packages need to be built:\n", as_string, '\n'); continue; default: Checks::unreachable(VCPKG_LINE_INFO); } @@ -316,7 +317,7 @@ namespace vcpkg::Export // input sanitization ret.specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); + return Input::check_and_get_package_spec(std::string(arg), default_triplet, COMMAND_STRUCTURE.example_text); }); ret.dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); ret.raw = options.switches.find(OPTION_RAW) != options.switches.cend(); @@ -329,9 +330,9 @@ namespace vcpkg::Export if (!ret.raw && !ret.nuget && !ret.ifw && !ret.zip && !ret.seven_zip && !ret.dry_run) { - System::println(System::Color::error, - "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); - System::print(COMMAND_STRUCTURE.example_text); + System::print2(System::Color::error, + "Must provide at least one export type: --raw --nuget --ifw --zip --7zip\n"); + System::print2(COMMAND_STRUCTURE.example_text); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -382,12 +383,12 @@ namespace vcpkg::Export const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; const System::CMakeVariable cmake_variable = System::CMakeVariable("CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); - System::println("\n" - "To use the exported libraries in CMake projects use:" - "\n" - " %s" - "\n", - cmake_variable.s); + System::print2("\n" + "To use the exported libraries in CMake projects use:" + "\n" + " ", + cmake_variable.s, + "\n\n"); } static void handle_raw_based_export(Span<const ExportPlanAction> export_plan, @@ -411,7 +412,7 @@ namespace vcpkg::Export } const std::string display_name = action.spec.to_string(); - System::println("Exporting package %s... ", display_name); + System::print2("Exporting package ", display_name, "...\n"); const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO); @@ -421,7 +422,6 @@ namespace vcpkg::Export raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); - System::println(System::Color::success, "Exporting package %s... done", display_name); } // Copy files needed for integration @@ -429,48 +429,47 @@ namespace vcpkg::Export if (opts.raw) { - System::println( - System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); + System::printf(System::Color::success, + R"(Files exported at: "%s")" + "\n", + raw_exported_dir_path.u8string()); print_next_step_info(raw_exported_dir_path); } if (opts.nuget) { - System::println("Creating nuget package... "); + System::print2("Packing nuget package...\n"); const std::string nuget_id = opts.maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); const std::string nuget_version = opts.maybe_nuget_version.value_or("1.0.0"); const fs::path output_path = do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); - System::println(System::Color::success, "Creating nuget package... done"); - System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); + System::print2(System::Color::success, "NuGet package exported at: ", output_path.u8string(), "\n"); - System::println(R"( + System::printf(R"( With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: Install-Package %s -Source "%s" )" - "\n", - nuget_id, - output_path.parent_path().u8string()); + "\n\n", + nuget_id, + output_path.parent_path().u8string()); } if (opts.zip) { - System::println("Creating zip archive... "); + System::print2("Creating zip archive...\n"); const fs::path output_path = do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); - System::println(System::Color::success, "Creating zip archive... done"); - System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); + System::print2(System::Color::success, "Zip archive exported at: ", output_path.u8string(), "\n"); print_next_step_info("[...]"); } if (opts.seven_zip) { - System::println("Creating 7zip archive... "); + System::print2("Creating 7zip archive...\n"); const fs::path output_path = do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); - System::println(System::Color::success, "Creating 7zip archive... done"); - System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); + System::print2(System::Color::success, "7zip archive exported at: ", output_path.u8string(), "\n"); print_next_step_info("[...]"); } @@ -503,14 +502,14 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console if (has_non_user_requested_packages) { - System::println(System::Color::warning, - "Additional packages (*) need to be exported to complete this operation."); + System::print2(System::Color::warning, + "Additional packages (*) need to be exported to complete this operation.\n"); } const auto it = group_by_plan_type.find(ExportPlanType::NOT_BUILT); if (it != group_by_plan_type.cend() && !it->second.empty()) { - System::println(System::Color::error, "There are packages that have not been built."); + System::print2(System::Color::error, "There are packages that have not been built.\n"); // No need to show all of them, just the user-requested ones. Dependency resolution will handle the rest. std::vector<const ExportPlanAction*> unbuilt = it->second; @@ -518,9 +517,10 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console unbuilt, [](const ExportPlanAction* a) { return a->request_type != RequestType::USER_REQUESTED; }); const auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); }); - System::println("To build them, run:\n" - " vcpkg install %s", - s); + System::print2("To build them, run:\n" + " vcpkg install ", + s, + "\n"); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp index a54c596fb..1a2c08474 100644 --- a/toolsrc/src/vcpkg/globalstate.cpp +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -14,47 +14,4 @@ namespace vcpkg std::atomic<int> GlobalState::g_init_console_cp(0); std::atomic<int> GlobalState::g_init_console_output_cp(0); std::atomic<bool> GlobalState::g_init_console_initialized(false); - - GlobalState::CtrlCStateMachine GlobalState::g_ctrl_c_state; - - GlobalState::CtrlCStateMachine::CtrlCStateMachine() : m_state(CtrlCState::normal) {} - - void GlobalState::CtrlCStateMachine::transition_to_spawn_process() noexcept - { - auto expected = CtrlCState::normal; - auto transitioned = m_state.compare_exchange_strong(expected, CtrlCState::blocked_on_child); - if (!transitioned) - { - // Ctrl-C was hit and is asynchronously executing on another thread - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - void GlobalState::CtrlCStateMachine::transition_from_spawn_process() noexcept - { - auto expected = CtrlCState::blocked_on_child; - auto transitioned = m_state.compare_exchange_strong(expected, CtrlCState::normal); - if (!transitioned) - { - // Ctrl-C was hit while blocked on the child process - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - void GlobalState::CtrlCStateMachine::transition_handle_ctrl_c() noexcept - { - auto prev_state = m_state.exchange(CtrlCState::exit_requested); - - if (prev_state == CtrlCState::normal) - { - // Not currently blocked on a child process and Ctrl-C has not been hit. - Checks::exit_fail(VCPKG_LINE_INFO); - } - else if (prev_state == CtrlCState::exit_requested) - { - // Ctrl-C was hit previously - } - else - { - // This is the case where we are currently blocked on a child process - } - } } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 5df878a91..84a054e0f 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/export.h> #include <vcpkg/help.h> @@ -34,9 +34,7 @@ namespace vcpkg::Help static void integrate_topic_fn(const VcpkgPaths&) { - System::print("Commands:\n" - "%s", - Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); + System::print2("Commands:\n", Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); } static void help_topics(const VcpkgPaths&); @@ -49,9 +47,10 @@ namespace vcpkg::Help nullptr, }; - static constexpr std::array<Topic, 12> topics = {{ + static constexpr std::array<Topic, 13> topics = {{ {"create", command_topic_fn<Commands::Create::COMMAND_STRUCTURE>}, {"edit", command_topic_fn<Commands::Edit::COMMAND_STRUCTURE>}, + {"depend-info", command_topic_fn<Commands::DependInfo::COMMAND_STRUCTURE>}, {"env", command_topic_fn<Commands::Env::COMMAND_STRUCTURE>}, {"export", command_topic_fn<Export::COMMAND_STRUCTURE>}, {"help", command_topic_fn<Help::COMMAND_STRUCTURE>}, @@ -66,60 +65,66 @@ namespace vcpkg::Help static void help_topics(const VcpkgPaths&) { - System::println("Available help topics:\n" - " triplet\n" - " integrate" - "%s", - Strings::join("", topics, [](const Topic& topic) { return std::string("\n ") + topic.name; })); + System::print2("Available help topics:\n" + " triplet\n" + " integrate", + Strings::join("", topics, [](const Topic& topic) { return std::string("\n ") + topic.name; }), + "\n"); } void help_topic_valid_triplet(const VcpkgPaths& paths) { - System::println("Available architecture triplets:"); + System::print2("Available architecture triplets:\n"); for (auto&& triplet : paths.get_available_triplets()) { - System::println(" %s", triplet); + System::print2(" ", triplet, '\n'); } } void print_usage() { - System::println( - "Commands:\n" - " vcpkg search [pat] Search for packages available to be built\n" - " vcpkg install <pkg>... Install a package\n" - " vcpkg remove <pkg>... Uninstall a package\n" - " vcpkg remove --outdated Uninstall all out-of-date packages\n" - " vcpkg list List installed packages\n" - " vcpkg update Display list of packages for updating\n" - " vcpkg upgrade Rebuild all outdated packages\n" - " vcpkg hash <file> [alg] Hash a file by specific algorithm, default SHA512\n" - " vcpkg help topics Display the list of help topics\n" - " vcpkg help <topic> Display help for a specific topic\n" - "\n" - "%s" // Integration help - "\n" - " vcpkg export <pkg>... [opt]... Exports a package\n" - " vcpkg edit <pkg> Open up a port for editing (uses " ENVVAR(EDITOR) ", default 'code')\n" - " vcpkg import <pkg> Import a pre-built library\n" - " vcpkg create <pkg> <url>\n" - " [archivename] Create a new package\n" - " vcpkg owns <pat> Search for files in installed packages\n" - " vcpkg env Creates a clean shell environment for development or compiling.\n" - " vcpkg version Display version information\n" - " vcpkg contact Display contact information to send feedback\n" - "\n" - "Options:\n" - " --triplet <t> Specify the target architecture triplet.\n" - " (default: " ENVVAR(VCPKG_DEFAULT_TRIPLET) ", see 'vcpkg help triplet')\n" - "\n" - " --vcpkg-root <path> Specify the vcpkg root directory\n" - " (default: " ENVVAR(VCPKG_ROOT) ")\n" - "\n" - " @response_file Specify a response file to provide additional parameters\n" - "\n" - "For more help (including examples) see the accompanying README.md.", - Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); + System::print2("Commands:\n" + " vcpkg search [pat] Search for packages available to be built\n" + " vcpkg install <pkg>... Install a package\n" + " vcpkg remove <pkg>... Uninstall a package\n" + " vcpkg remove --outdated Uninstall all out-of-date packages\n" + " vcpkg list List installed packages\n" + " vcpkg update Display list of packages for updating\n" + " vcpkg upgrade Rebuild all outdated packages\n" + " vcpkg hash <file> [alg] Hash a file by specific algorithm, default SHA512\n" + " vcpkg help topics Display the list of help topics\n" + " vcpkg help <topic> Display help for a specific topic\n" + "\n", + Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING, // Integration help + "\n" + " vcpkg export <pkg>... [opt]... Exports a package\n" + " vcpkg edit <pkg> Open up a port for editing (uses " ENVVAR(EDITOR) // + ", default 'code')\n" + " vcpkg import <pkg> Import a pre-built library\n" + " vcpkg create <pkg> <url>\n" + " [archivename] Create a new package\n" + " vcpkg owns <pat> Search for files in installed packages\n" + " vcpkg depend-info [pkg]... Display a list of dependencies for packages\n" + " vcpkg env Creates a clean shell environment for development or " + "compiling.\n" + " vcpkg version Display version information\n" + " vcpkg contact Display contact information to send feedback\n" + "\n" + "Options:\n" + " --triplet <t> Specify the target architecture triplet.\n" + " (default: " ENVVAR(VCPKG_DEFAULT_TRIPLET) // + ", see 'vcpkg help triplet')\n" + "\n" + " --vcpkg-root <path> Specify the vcpkg root " + "directory\n" + " (default: " ENVVAR(VCPKG_ROOT) // + ")\n" + "\n" + " @response_file Specify a " + "response file to provide additional parameters\n" + "\n" + "For more help (including examples) see the " + "accompanying README.md.\n"); } std::string create_example_string(const std::string& command_and_arguments) @@ -153,7 +158,7 @@ namespace vcpkg::Help Checks::exit_success(VCPKG_LINE_INFO); } - System::println(System::Color::error, "Error: unknown topic %s", topic); + System::print2(System::Color::error, "Error: unknown topic ", topic, '\n'); help_topics(paths); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/input.cpp b/toolsrc/src/vcpkg/input.cpp index aee0fac7f..42f81cbb9 100644 --- a/toolsrc/src/vcpkg/input.cpp +++ b/toolsrc/src/vcpkg/input.cpp @@ -1,18 +1,19 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> #include <vcpkg/input.h> #include <vcpkg/metrics.h> +#include <vcpkg/packagespec.h> -namespace vcpkg::Input +namespace vcpkg { - PackageSpec check_and_get_package_spec(const std::string& package_spec_as_string, - const Triplet& default_triplet, - CStringView example_text) + PackageSpec Input::check_and_get_package_spec(std::string&& spec_string, + const Triplet& default_triplet, + CStringView example_text) { - const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); + const std::string as_lowercase = Strings::ascii_to_lowercase(std::move(spec_string)); auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); if (const auto spec = expected_spec.get()) { @@ -20,27 +21,27 @@ namespace vcpkg::Input } // Intentionally show the lowercased string - System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase); - System::print(example_text); + System::print2(System::Color::error, "Error: ", expected_spec.error(), ": ", as_lowercase, '\n'); + System::print2(example_text); Checks::exit_fail(VCPKG_LINE_INFO); } - void check_triplet(const Triplet& t, const VcpkgPaths& paths) + void Input::check_triplet(const Triplet& t, const VcpkgPaths& paths) { if (!paths.is_valid_triplet(t)) { - System::println(System::Color::error, "Error: invalid triplet: %s", t); + System::print2(System::Color::error, "Error: invalid triplet: ", t, '\n'); Metrics::g_metrics.lock()->track_property("error", "invalid triplet: " + t.to_string()); Help::help_topic_valid_triplet(paths); Checks::exit_fail(VCPKG_LINE_INFO); } } - FullPackageSpec check_and_get_full_package_spec(const std::string& full_package_spec_as_string, - const Triplet& default_triplet, - CStringView example_text) + FullPackageSpec Input::check_and_get_full_package_spec(std::string&& full_package_spec_as_string, + const Triplet& default_triplet, + CStringView example_text) { - const std::string as_lowercase = Strings::ascii_to_lowercase(full_package_spec_as_string); + const std::string as_lowercase = Strings::ascii_to_lowercase(std::move(full_package_spec_as_string)); auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); if (const auto spec = expected_spec.get()) { @@ -48,8 +49,8 @@ namespace vcpkg::Input } // Intentionally show the lowercased string - System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase); - System::print(example_text); + System::print2(System::Color::error, "Error: ", expected_spec.error(), ": ", as_lowercase, '\n'); + System::print2(example_text); Checks::exit_fail(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 434876871..14dfb6fa3 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -1,7 +1,7 @@ #include "pch.h" #include <vcpkg/base/files.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/base/util.h> #include <vcpkg/build.h> #include <vcpkg/commands.h> @@ -19,6 +19,8 @@ namespace vcpkg::Install { using namespace Dependencies; + using file_pack = std::pair<std::string, std::string>; + InstallDir InstallDir::from_destination_root(const fs::path& destination_root, const std::string& destination_subdirectory, const fs::path& listfile) @@ -65,7 +67,7 @@ namespace vcpkg::Install const auto status = fs.symlink_status(file, ec); if (ec) { - System::println(System::Color::error, "failed: %s: %s", file.u8string(), ec.message()); + System::print2(System::Color::error, "failed: ", file.u8string(), ": ", ec.message(), "\n"); continue; } @@ -87,7 +89,7 @@ namespace vcpkg::Install fs.create_directory(target, ec); if (ec) { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + System::printf(System::Color::error, "failed: %s: %s\n", target.u8string(), ec.message()); } // Trailing backslash for directories @@ -98,15 +100,15 @@ namespace vcpkg::Install { if (fs.exists(target)) { - System::println(System::Color::warning, - "File %s was already present and will be overwritten", - target.u8string(), - ec.message()); + System::print2(System::Color::warning, + "File ", + target.u8string(), + " was already present and will be overwritten\n"); } fs.copy_file(file, target, fs::copy_options::overwrite_existing, ec); if (ec) { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + System::printf(System::Color::error, "failed: %s: %s\n", target.u8string(), ec.message()); } output.push_back(Strings::format(R"(%s/%s)", destination_subdirectory, suffix)); break; @@ -115,21 +117,21 @@ namespace vcpkg::Install { if (fs.exists(target)) { - System::println(System::Color::warning, - "File %s was already present and will be overwritten", - target.u8string(), - ec.message()); + System::print2(System::Color::warning, + "File ", + target.u8string(), + " was already present and will be overwritten\n"); } fs.copy_symlink(file, target, ec); if (ec) { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + System::printf(System::Color::error, "failed: %s: %s\n", target.u8string(), ec.message()); } output.push_back(Strings::format(R"(%s/%s)", destination_subdirectory, suffix)); break; } default: - System::println(System::Color::error, "failed: %s: cannot handle file type", file.u8string()); + System::printf(System::Color::error, "failed: %s: cannot handle file type\n", file.u8string()); break; } } @@ -139,18 +141,12 @@ namespace vcpkg::Install fs.write_lines(listfile, output); } - static void remove_first_n_chars(std::vector<std::string>* strings, const size_t n) - { - for (std::string& s : *strings) - { - s.erase(0, n); - } - }; - - static std::vector<std::string> extract_files_in_triplet( - const std::vector<StatusParagraphAndAssociatedFiles>& pgh_and_files, const Triplet& triplet) + static std::vector<file_pack> extract_files_in_triplet( + const std::vector<StatusParagraphAndAssociatedFiles>& pgh_and_files, + const Triplet& triplet, + const size_t remove_chars = 0) { - std::vector<std::string> output; + std::vector<file_pack> output; for (const StatusParagraphAndAssociatedFiles& t : pgh_and_files) { if (t.pgh.package.spec.triplet() != triplet) @@ -158,10 +154,16 @@ namespace vcpkg::Install continue; } - Util::Vectors::concatenate(&output, t.files); + const std::string name = t.pgh.package.displayname(); + + for (const std::string &file : t.files) + { + output.emplace_back(file_pack{std::string(file, remove_chars), name}); + } } - std::sort(output.begin(), output.end()); + std::sort(output.begin(), output.end(), + [](const file_pack &lhs, const file_pack &rhs) { return lhs.first < rhs.first; }); return output; } @@ -171,22 +173,21 @@ namespace vcpkg::Install const std::vector<fs::path> package_file_paths = fs.get_files_recursive(package_dir); const size_t package_remove_char_count = package_dir.generic_string().size() + 1; // +1 for the slash auto package_files = Util::fmap(package_file_paths, [package_remove_char_count](const fs::path& path) { - std::string as_string = path.generic_string(); - as_string.erase(0, package_remove_char_count); - return std::move(as_string); + return std::move(std::string(path.generic_string(), package_remove_char_count)); }); return SortedVector<std::string>(std::move(package_files)); } - static SortedVector<std::string> build_list_of_installed_files( - const std::vector<StatusParagraphAndAssociatedFiles>& pgh_and_files, const Triplet& triplet) + static SortedVector<file_pack> build_list_of_installed_files( + const std::vector<StatusParagraphAndAssociatedFiles>& pgh_and_files, + const Triplet& triplet) { - std::vector<std::string> installed_files = extract_files_in_triplet(pgh_and_files, triplet); const size_t installed_remove_char_count = triplet.canonical_name().size() + 1; // +1 for the slash - remove_first_n_chars(&installed_files, installed_remove_char_count); + std::vector<file_pack> installed_files = + extract_files_in_triplet(pgh_and_files, triplet, installed_remove_char_count); - return SortedVector<std::string>(std::move(installed_files)); + return SortedVector<file_pack>(std::move(installed_files)); } InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& bcf, StatusParagraphs* status_db) @@ -197,25 +198,57 @@ namespace vcpkg::Install const SortedVector<std::string> package_files = build_list_of_package_files(paths.get_filesystem(), package_dir); - const SortedVector<std::string> installed_files = build_list_of_installed_files(pgh_and_files, triplet); + const SortedVector<file_pack> installed_files = + build_list_of_installed_files(pgh_and_files, triplet); - std::vector<std::string> intersection; - std::set_intersection(package_files.begin(), - package_files.end(), - installed_files.begin(), + struct intersection_compare + { + bool operator()(const std::string &lhs, const file_pack &rhs) { return lhs < rhs.first; } + bool operator()(const file_pack &lhs, const std::string &rhs) { return lhs.first < rhs; } + }; + + std::vector<file_pack> intersection; + + std::set_intersection(installed_files.begin(), installed_files.end(), - std::back_inserter(intersection)); + package_files.begin(), + package_files.end(), + std::back_inserter(intersection), + intersection_compare()); + + std::sort(intersection.begin(), intersection.end(), + [](const file_pack &lhs, const file_pack &rhs) + { + return lhs.second < rhs.second; + }); if (!intersection.empty()) { const fs::path triplet_install_path = paths.installed / triplet.canonical_name(); - System::println(System::Color::error, - "The following files are already installed in %s and are in conflict with %s", - triplet_install_path.generic_string(), - bcf.core_paragraph.spec); - System::print("\n "); - System::println(Strings::join("\n ", intersection)); - System::println(); + System::printf(System::Color::error, + "The following files are already installed in %s and are in conflict with %s\n\n", + triplet_install_path.generic_string(), + bcf.core_paragraph.spec); + + auto i = intersection.begin(); + while (i != intersection.end()) { + System::print2("Installed by ", i->second, "\n "); + auto next = std::find_if(i, intersection.end(), + [i](const auto &val) + { + return i->second != val.second; + }); + + System::print2(Strings::join("\n ", i, next, + [](const file_pack &file) + { + return file.first; + })); + System::print2("\n\n"); + + i = next; + } + return InstallResult::FILE_CONFLICTS; } @@ -278,20 +311,21 @@ namespace vcpkg::Install if (plan_type == InstallPlanType::ALREADY_INSTALLED) { if (use_head_version && is_user_requested) - System::println( - System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name); + System::printf(System::Color::warning, + "Package %s is already installed -- not building from HEAD\n", + display_name); else - System::println(System::Color::success, "Package %s is already installed", display_name); + System::printf(System::Color::success, "Package %s is already installed\n", display_name); return BuildResult::SUCCEEDED; } auto aux_install = [&](const std::string& name, const BinaryControlFile& bcf) -> BuildResult { - System::println("Installing package %s... ", name); + System::printf("Installing package %s...\n", name); const auto install_result = install_package(paths, bcf, &status_db); switch (install_result) { case InstallResult::SUCCESS: - System::println(System::Color::success, "Installing package %s... done", name); + System::printf(System::Color::success, "Installing package %s... done\n", name); return BuildResult::SUCCEEDED; case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; default: Checks::unreachable(VCPKG_LINE_INFO); @@ -301,9 +335,9 @@ namespace vcpkg::Install if (plan_type == InstallPlanType::BUILD_AND_INSTALL) { if (use_head_version) - System::println("Building package %s from HEAD... ", display_name_with_features); + System::printf("Building package %s from HEAD...\n", display_name_with_features); else - System::println("Building package %s... ", display_name_with_features); + System::printf("Building package %s...\n", display_name_with_features); auto result = [&]() -> Build::ExtendedBuildResult { const Build::BuildPackageConfig build_config{action.source_control_file.value_or_exit(VCPKG_LINE_INFO), @@ -316,11 +350,11 @@ namespace vcpkg::Install if (result.code != Build::BuildResult::SUCCEEDED) { - System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); + System::print2(System::Color::error, Build::create_error_message(result.code, action.spec), "\n"); return result; } - System::println("Building package %s... done", display_name_with_features); + System::printf("Building package %s... done\n", display_name_with_features); auto bcf = std::make_unique<BinaryControlFile>( Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO)); @@ -339,7 +373,7 @@ namespace vcpkg::Install if (plan_type == InstallPlanType::EXCLUDED) { - System::println(System::Color::warning, "Package %s is excluded", display_name); + System::printf(System::Color::warning, "Package %s is excluded\n", display_name); return BuildResult::EXCLUDED; } @@ -348,11 +382,11 @@ namespace vcpkg::Install void InstallSummary::print() const { - System::println("RESULTS"); + System::print2("RESULTS\n"); for (const SpecSummary& result : this->results) { - System::println(" %s: %s: %s", result.spec, Build::to_string(result.build_result.code), result.timing); + System::printf(" %s: %s: %s\n", result.spec, Build::to_string(result.build_result.code), result.timing); } std::map<BuildResult, int> summary; @@ -366,10 +400,10 @@ namespace vcpkg::Install summary[r.build_result.code]++; } - System::println("\nSUMMARY"); + System::print2("\nSUMMARY\n"); for (const std::pair<const BuildResult, int>& entry : summary) { - System::println(" %s: %d", Build::to_string(entry.first), entry.second); + System::printf(" %s: %d\n", Build::to_string(entry.first), entry.second); } } @@ -391,7 +425,7 @@ namespace vcpkg::Install const PackageSpec& spec = action.spec(); const std::string display_name = spec.to_string(); - System::println("Starting package %zd/%zd: %s", counter, package_count, display_name); + System::printf("Starting package %zd/%zd: %s\n", counter, package_count, display_name); results.emplace_back(spec, &action); @@ -401,7 +435,7 @@ namespace vcpkg::Install if (result.code != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) { - System::println(Build::create_user_troubleshooting_message(install_action->spec)); + System::print2(Build::create_user_troubleshooting_message(install_action->spec), '\n'); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -417,7 +451,7 @@ namespace vcpkg::Install } results.back().timing = build_timer.elapsed(); - System::println("Elapsed time for package %s: %s", display_name, results.back().timing.to_string()); + System::printf("Elapsed time for package %s: %s\n", display_name, results.back().timing); } return InstallSummary{std::move(results), timer.to_string()}; @@ -471,7 +505,7 @@ namespace vcpkg::Install auto maybe_contents = fs.read_contents(usage_file); if (auto p_contents = maybe_contents.get()) { - System::println(*p_contents); + System::print2(*p_contents, '\n'); } return; } @@ -525,15 +559,15 @@ namespace vcpkg::Install } else { - System::println("The package %s provides CMake targets:\n", bpgh.spec); + System::print2("The package ", bpgh.spec, " provides CMake targets:\n\n"); for (auto&& library_target_pair : library_targets) { auto config_it = config_files.find(library_target_pair.first); if (config_it != config_files.end()) - System::println(" find_package(%s CONFIG REQUIRED)", config_it->second); + System::printf(" find_package(%s CONFIG REQUIRED)\n", config_it->second); else - System::println(" find_package(%s CONFIG REQUIRED)", library_target_pair.first); + System::printf(" find_package(%s CONFIG REQUIRED)\n", library_target_pair.first); std::sort(library_target_pair.second.begin(), library_target_pair.second.end(), @@ -545,18 +579,18 @@ namespace vcpkg::Install if (library_target_pair.second.size() <= 4) { - System::println(" target_link_libraries(main PRIVATE %s)\n", - Strings::join(" ", library_target_pair.second)); + System::printf(" target_link_libraries(main PRIVATE %s)\n\n", + Strings::join(" ", library_target_pair.second)); } else { auto omitted = library_target_pair.second.size() - 4; library_target_pair.second.erase(library_target_pair.second.begin() + 4, library_target_pair.second.end()); - System::println(" # Note: %zd target(s) were omitted.\n" - " target_link_libraries(main PRIVATE %s)\n", - omitted, - Strings::join(" ", library_target_pair.second)); + System::printf(" # Note: %zd target(s) were omitted.\n" + " target_link_libraries(main PRIVATE %s)\n\n", + omitted, + Strings::join(" ", library_target_pair.second)); } } } @@ -574,7 +608,8 @@ namespace vcpkg::Install const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::vector<FullPackageSpec> specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_full_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); + return Input::check_and_get_full_package_spec( + std::string(arg), default_triplet, COMMAND_STRUCTURE.example_text); }); for (auto&& spec : specs) @@ -667,7 +702,7 @@ namespace vcpkg::Install const InstallSummary summary = perform(action_plan, keep_going, paths, status_db); - System::println("\nTotal elapsed time: %s\n", summary.total_elapsed_time); + System::print2("\nTotal elapsed time: ", summary.total_elapsed_time, "\n\n"); if (keep_going == KeepGoing::YES) { @@ -729,7 +764,8 @@ namespace vcpkg::Install case BuildResult::FILE_CONFLICTS: case BuildResult::BUILD_FAILED: result_string = "Fail"; - message_block = Strings::format("<failure><message><![CDATA[%s]]></message></failure>", to_string(code)); + message_block = + Strings::format("<failure><message><![CDATA[%s]]></message></failure>", to_string(code)); break; case BuildResult::EXCLUDED: case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index c34f30974..5ca2b056a 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -7,7 +7,7 @@ #include <vcpkg/base/files.h> #include <vcpkg/base/hash.h> #include <vcpkg/base/strings.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.process.h> #pragma comment(lib, "version") #pragma comment(lib, "winhttp") diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp index 789aaca80..52edf4b6f 100644 --- a/toolsrc/src/vcpkg/packagespec.cpp +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include <vcpkg/base/checks.h> #include <vcpkg/base/util.h> #include <vcpkg/packagespec.h> #include <vcpkg/packagespecparseresult.h> @@ -16,8 +17,14 @@ namespace vcpkg std::string FeatureSpec::to_string() const { - if (feature().empty()) return spec().to_string(); - return Strings::format("%s[%s]:%s", name(), feature(), triplet()); + std::string ret; + this->to_string(ret); + return ret; + } + void FeatureSpec::to_string(std::string& out) const + { + if (feature().empty()) return spec().to_string(out); + Strings::append(out, name(), '[', feature(), "]:", triplet()); } std::vector<FeatureSpec> FeatureSpec::from_strings_and_triplet(const std::vector<std::string>& depends, @@ -71,7 +78,7 @@ namespace vcpkg if (auto p = res.get()) { FullPackageSpec fspec; - Triplet t = p->triplet.empty() ? default_triplet : Triplet::from_canonical_name(p->triplet); + Triplet t = p->triplet.empty() ? default_triplet : Triplet::from_canonical_name(std::move(p->triplet)); fspec.package_spec = PackageSpec::from_name_and_triplet(p->name, t).value_or_exit(VCPKG_LINE_INFO); fspec.features = std::move(p->features); return fspec; @@ -119,6 +126,7 @@ namespace vcpkg std::string PackageSpec::dir() const { return Strings::format("%s_%s", this->m_name, this->m_triplet); } std::string PackageSpec::to_string() const { return Strings::format("%s:%s", this->name(), this->triplet()); } + void PackageSpec::to_string(std::string& s) const { Strings::append(s, this->name(), ':', this->triplet()); } bool operator==(const PackageSpec& left, const PackageSpec& right) { diff --git a/toolsrc/src/vcpkg/packagespecparseresult.cpp b/toolsrc/src/vcpkg/packagespecparseresult.cpp index b12bd12d0..c5254f7be 100644 --- a/toolsrc/src/vcpkg/packagespecparseresult.cpp +++ b/toolsrc/src/vcpkg/packagespecparseresult.cpp @@ -18,4 +18,9 @@ namespace vcpkg default: Checks::unreachable(VCPKG_LINE_INFO); } } + + void to_string(std::string& out, PackageSpecParseResult p) + { + out.append(vcpkg::to_string(p).c_str()); + } } diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index 77c028937..45f939afd 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include <vcpkg/base/files.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/base/util.h> #include <vcpkg/globalstate.h> #include <vcpkg/paragraphparseresult.h> @@ -286,11 +287,11 @@ namespace vcpkg::Paragraphs { for (auto&& error : results.errors) { - System::println( - System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name); + System::print2( + System::Color::warning, "Warning: an error occurred while parsing '", error->name, "'\n"); } - System::println(System::Color::warning, - "Use '--debug' to get more information about the parse failures.\n"); + System::print2(System::Color::warning, + "Use '--debug' to get more information about the parse failures.\n\n"); } } return std::move(results.paragraphs); diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index a62d4ece5..d6581c2b4 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -2,7 +2,8 @@ #include <vcpkg/base/cofffilereader.h> #include <vcpkg/base/files.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> #include <vcpkg/build.h> #include <vcpkg/packagespec.h> @@ -88,9 +89,9 @@ namespace vcpkg::PostBuildLint const fs::path include_dir = package_dir / "include"; if (!fs.exists(include_dir) || fs.is_empty(include_dir)) { - System::println( - System::Color::warning, - "The folder /include is empty or not present. This indicates the library was not correctly installed."); + System::print2(System::Color::warning, + "The folder /include is empty or not present. This indicates the library was not correctly " + "installed.\n"); return LintStatus::ERROR_DETECTED; } @@ -109,10 +110,10 @@ namespace vcpkg::PostBuildLint if (!files_found.empty()) { - System::println(System::Color::warning, - "Include files should not be duplicated into the /debug/include directory. If this cannot " - "be disabled in the project cmake, use\n" - " file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)"); + System::print2(System::Color::warning, + "Include files should not be duplicated into the /debug/include directory. If this cannot " + "be disabled in the project cmake, use\n" + " file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)\n"); return LintStatus::ERROR_DETECTED; } @@ -125,9 +126,9 @@ namespace vcpkg::PostBuildLint if (fs.exists(debug_share)) { - System::println(System::Color::warning, - "/debug/share should not exist. Please reorganize any important files, then use\n" - " file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)"); + System::print2(System::Color::warning, + "/debug/share should not exist. Please reorganize any important files, then use\n" + " file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)\n"); return LintStatus::ERROR_DETECTED; } @@ -141,9 +142,9 @@ namespace vcpkg::PostBuildLint const fs::path lib_cmake = package_dir / "lib" / "cmake"; if (fs.exists(lib_cmake)) { - System::println( + System::printf( System::Color::warning, - "The /lib/cmake folder should be merged with /debug/lib/cmake and moved to /share/%s/cmake.", + "The /lib/cmake folder should be merged with /debug/lib/cmake and moved to /share/%s/cmake.\n", spec.name()); return LintStatus::ERROR_DETECTED; } @@ -175,9 +176,9 @@ namespace vcpkg::PostBuildLint if (!misplaced_cmake_files.empty()) { - System::println( + System::printf( System::Color::warning, - "The following cmake files were found outside /share/%s. Please place cmake files in /share/%s.", + "The following cmake files were found outside /share/%s. Please place cmake files in /share/%s.\n", spec.name(), spec.name()); Files::print_paths(misplaced_cmake_files); @@ -194,9 +195,9 @@ namespace vcpkg::PostBuildLint const fs::path lib_cmake_debug = package_dir / "debug" / "lib" / "cmake"; if (fs.exists(lib_cmake_debug)) { - System::println(System::Color::warning, - "The /debug/lib/cmake folder should be merged with /lib/cmake into /share/%s", - spec.name()); + System::printf(System::Color::warning, + "The /debug/lib/cmake folder should be merged with /lib/cmake into /share/%s\n", + spec.name()); return LintStatus::ERROR_DETECTED; } @@ -210,9 +211,9 @@ namespace vcpkg::PostBuildLint if (!dlls.empty()) { - System::println(System::Color::warning, - "\nThe following dlls were found in /lib or /debug/lib. Please move them to /bin or " - "/debug/bin, respectively."); + System::print2(System::Color::warning, + "\nThe following dlls were found in /lib or /debug/lib. Please move them to /bin or " + "/debug/bin, respectively.\n"); Files::print_paths(dlls); return LintStatus::ERROR_DETECTED; } @@ -251,18 +252,18 @@ namespace vcpkg::PostBuildLint } } - System::println(System::Color::warning, - "The software license must be available at ${CURRENT_PACKAGES_DIR}/share/%s/copyright", - spec.name()); + System::printf(System::Color::warning, + "The software license must be available at ${CURRENT_PACKAGES_DIR}/share/%s/copyright\n", + spec.name()); if (potential_copyright_files.size() == 1) // if there is only one candidate, provide the cmake lines needed to place it in the proper location { const fs::path found_file = potential_copyright_files[0]; const fs::path relative_path = found_file.string().erase( 0, current_buildtrees_dir.string().size() + 1); // The +1 is needed to remove the "/" - System::println( + System::printf( "\n file(COPY ${CURRENT_BUILDTREES_DIR}/%s DESTINATION ${CURRENT_PACKAGES_DIR}/share/%s)\n" - " file(RENAME ${CURRENT_PACKAGES_DIR}/share/%s/%s ${CURRENT_PACKAGES_DIR}/share/%s/copyright)", + " file(RENAME ${CURRENT_PACKAGES_DIR}/share/%s/%s ${CURRENT_PACKAGES_DIR}/share/%s/copyright)\n", relative_path.generic_string(), spec.name(), spec.name(), @@ -271,7 +272,7 @@ namespace vcpkg::PostBuildLint } else if (potential_copyright_files.size() > 1) { - System::println(System::Color::warning, "The following files are potential copyright files:"); + System::print2(System::Color::warning, "The following files are potential copyright files:\n"); Files::print_paths(potential_copyright_files); } return LintStatus::ERROR_DETECTED; @@ -284,9 +285,9 @@ namespace vcpkg::PostBuildLint if (!exes.empty()) { - System::println( + System::print2( System::Color::warning, - "The following EXEs were found in /bin or /debug/bin. EXEs are not valid distribution targets."); + "The following EXEs were found in /bin or /debug/bin. EXEs are not valid distribution targets.\n"); Files::print_paths(exes); return LintStatus::ERROR_DETECTED; } @@ -312,9 +313,9 @@ namespace vcpkg::PostBuildLint if (!dlls_with_no_exports.empty()) { - System::println(System::Color::warning, "The following DLLs have no exports:"); + System::print2(System::Color::warning, "The following DLLs have no exports:\n"); Files::print_paths(dlls_with_no_exports); - System::println(System::Color::warning, "DLLs without any exports are likely a bug in the build script."); + System::print2(System::Color::warning, "DLLs without any exports are likely a bug in the build script.\n"); return LintStatus::ERROR_DETECTED; } @@ -346,9 +347,9 @@ namespace vcpkg::PostBuildLint if (!dlls_with_improper_uwp_bit.empty()) { - System::println(System::Color::warning, "The following DLLs do not have the App Container bit set:"); + System::print2(System::Color::warning, "The following DLLs do not have the App Container bit set:\n"); Files::print_paths(dlls_with_improper_uwp_bit); - System::println(System::Color::warning, "This bit is required for Windows Store apps."); + System::print2(System::Color::warning, "This bit is required for Windows Store apps.\n"); return LintStatus::ERROR_DETECTED; } @@ -381,13 +382,17 @@ namespace vcpkg::PostBuildLint static void print_invalid_architecture_files(const std::string& expected_architecture, std::vector<FileAndArch> binaries_with_invalid_architecture) { - System::println(System::Color::warning, "The following files were built for an incorrect architecture:"); - System::println(); + System::print2(System::Color::warning, "The following files were built for an incorrect architecture:\n\n"); for (const FileAndArch& b : binaries_with_invalid_architecture) { - System::println(" %s", b.file.generic_string()); - System::println("Expected %s, but was: %s", expected_architecture, b.actual_arch); - System::println(); + System::print2(" ", + b.file.u8string(), + "\n" + "Expected ", + expected_architecture, + ", but was: ", + b.actual_arch, + "\n\n"); } } @@ -468,8 +473,8 @@ namespace vcpkg::PostBuildLint return LintStatus::SUCCESS; } - System::println(System::Color::warning, - "DLLs should not be present in a static build, but the following DLLs were found:"); + System::print2(System::Color::warning, + "DLLs should not be present in a static build, but the following DLLs were found:\n"); Files::print_paths(dlls); return LintStatus::ERROR_DETECTED; } @@ -484,26 +489,26 @@ namespace vcpkg::PostBuildLint return LintStatus::SUCCESS; } - System::println(System::Color::warning, - "Mismatching number of debug and release binaries. Found %zd for debug but %zd for release.", - debug_count, - release_count); - System::println("Debug binaries"); + System::printf(System::Color::warning, + "Mismatching number of debug and release binaries. Found %zd for debug but %zd for release.\n", + debug_count, + release_count); + System::print2("Debug binaries\n"); Files::print_paths(debug_binaries); - System::println("Release binaries"); + System::print2("Release binaries\n"); Files::print_paths(release_binaries); if (debug_count == 0) { - System::println(System::Color::warning, "Debug binaries were not found"); + System::print2(System::Color::warning, "Debug binaries were not found\n"); } if (release_count == 0) { - System::println(System::Color::warning, "Release binaries were not found"); + System::print2(System::Color::warning, "Release binaries were not found\n"); } - System::println(); + System::print2("\n"); return LintStatus::ERROR_DETECTED; } @@ -517,11 +522,11 @@ namespace vcpkg::PostBuildLint if (lib_count == 0 && dll_count != 0) { - System::println(System::Color::warning, "Import libs were not present in %s", lib_dir.u8string()); - System::println(System::Color::warning, - "If this is intended, add the following line in the portfile:\n" - " SET(%s enabled)", - to_cmake_variable(BuildPolicy::DLLS_WITHOUT_LIBS)); + System::print2(System::Color::warning, "Import libs were not present in ", lib_dir.u8string(), "\n"); + System::printf(System::Color::warning, + "If this is intended, add the following line in the portfile:\n" + " SET(%s enabled)\n", + to_cmake_variable(BuildPolicy::DLLS_WITHOUT_LIBS)); return LintStatus::ERROR_DETECTED; } @@ -541,19 +546,21 @@ namespace vcpkg::PostBuildLint if (fs.exists(bin)) { - System::println(System::Color::warning, - R"(There should be no bin\ directory in a static build, but %s is present.)", - bin.u8string()); + System::printf(System::Color::warning, + R"(There should be no bin\ directory in a static build, but %s is present.)" + "\n", + bin.u8string()); } if (fs.exists(debug_bin)) { - System::println(System::Color::warning, - R"(There should be no debug\bin\ directory in a static build, but %s is present.)", - debug_bin.u8string()); + System::printf(System::Color::warning, + R"(There should be no debug\bin\ directory in a static build, but %s is present.)" + "\n", + debug_bin.u8string()); } - System::println( + System::print2( System::Color::warning, R"(If the creation of bin\ and/or debug\bin\ cannot be disabled, use this in the portfile to remove them)" "\n" @@ -563,7 +570,7 @@ namespace vcpkg::PostBuildLint R"###( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin))###" "\n" R"###( endif())###" - "\n"); + "\n\n"); return LintStatus::ERROR_DETECTED; } @@ -578,10 +585,10 @@ namespace vcpkg::PostBuildLint if (!empty_directories.empty()) { - System::println(System::Color::warning, "There should be no empty directories in %s", dir.generic_string()); - System::println("The following empty directories were found: "); + System::print2(System::Color::warning, "There should be no empty directories in ", dir.u8string(), "\n"); + System::print2("The following empty directories were found:\n"); Files::print_paths(empty_directories); - System::println( + System::print2( System::Color::warning, "If a directory should be populated but is not, this might indicate an error in the portfile.\n" "If the directories are not needed and their creation cannot be disabled, use something like this in " @@ -589,6 +596,7 @@ namespace vcpkg::PostBuildLint "\n" R"###( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/a/dir ${CURRENT_PACKAGES_DIR}/some/other/dir))###" "\n" + "\n" "\n"); return LintStatus::ERROR_DETECTED; } @@ -635,18 +643,17 @@ namespace vcpkg::PostBuildLint if (!libs_with_invalid_crt.empty()) { - System::println(System::Color::warning, - "Expected %s crt linkage, but the following libs had invalid crt linkage:", - expected_build_type.to_string()); - System::println(); + System::printf(System::Color::warning, + "Expected %s crt linkage, but the following libs had invalid crt linkage:\n\n", + expected_build_type.to_string()); for (const BuildTypeAndFile btf : libs_with_invalid_crt) { - System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string()); + System::printf(" %s: %s\n", btf.file.generic_string(), btf.build_type.to_string()); } - System::println(); + System::print2("\n"); - System::println(System::Color::warning, - "To inspect the lib files, use:\n dumpbin.exe /directives mylibfile.lib"); + System::print2(System::Color::warning, + "To inspect the lib files, use:\n dumpbin.exe /directives mylibfile.lib\n"); return LintStatus::ERROR_DETECTED; } @@ -686,16 +693,15 @@ namespace vcpkg::PostBuildLint if (!dlls_with_outdated_crt.empty()) { - System::println(System::Color::warning, "Detected outdated dynamic CRT in the following files:"); - System::println(); + System::print2(System::Color::warning, "Detected outdated dynamic CRT in the following files:\n\n"); for (const OutdatedDynamicCrtAndFile btf : dlls_with_outdated_crt) { - System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name); + System::print2(" ", btf.file.u8string(), ": ", btf.outdated_crt.name, "\n"); } - System::println(); + System::print2("\n"); - System::println(System::Color::warning, - "To inspect the dll files, use:\n dumpbin.exe /dependents mydllfile.dll"); + System::print2(System::Color::warning, + "To inspect the dll files, use:\n dumpbin.exe /dependents mydllfile.dll\n"); return LintStatus::ERROR_DETECTED; } @@ -707,8 +713,8 @@ namespace vcpkg::PostBuildLint std::vector<fs::path> misplaced_files = fs.get_files_non_recursive(dir); Util::erase_remove_if(misplaced_files, [&fs](const fs::path& path) { const std::string filename = path.filename().generic_string(); - if (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") || - Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO")) + if (Strings::case_insensitive_ascii_equals(filename, "CONTROL") || + Strings::case_insensitive_ascii_equals(filename, "BUILD_INFO")) { return true; } @@ -718,9 +724,9 @@ namespace vcpkg::PostBuildLint if (!misplaced_files.empty()) { - System::println(System::Color::warning, "The following files are placed in\n%s: ", dir.u8string()); + System::print2(System::Color::warning, "The following files are placed in\n", dir.u8string(), ":\n"); Files::print_paths(misplaced_files); - System::println(System::Color::warning, "Files cannot be present in those directories.\n"); + System::print2(System::Color::warning, "Files cannot be present in those directories.\n\n"); return LintStatus::ERROR_DETECTED; } @@ -853,19 +859,21 @@ namespace vcpkg::PostBuildLint const PreBuildInfo& pre_build_info, const BuildInfo& build_info) { - System::println("-- Performing post-build validation"); + System::print2("-- Performing post-build validation\n"); const size_t error_count = perform_all_checks_and_return_error_count(spec, paths, pre_build_info, build_info); if (error_count != 0) { const fs::path portfile = paths.ports / spec.name() / "portfile.cmake"; - System::println(System::Color::error, - "Found %u error(s). Please correct the portfile:\n %s", - error_count, - portfile.string()); + System::print2(System::Color::error, + "Found ", + error_count, + " error(s). Please correct the portfile:\n ", + portfile.u8string(), + "\n"); } - System::println("-- Performing post-build validation done"); + System::print2("-- Performing post-build validation done\n"); return error_count; } diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 921a04c23..685cdfdc3 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/base/util.h> #include <vcpkg/commands.h> #include <vcpkg/dependencies.h> @@ -58,7 +58,8 @@ namespace vcpkg::Remove const auto status = fs.symlink_status(target, ec); if (ec) { - System::println(System::Color::error, "failed: status(%s): %s", target.u8string(), ec.message()); + System::print2( + System::Color::error, "failed: status(", target.u8string(), "): ", ec.message(), "\n"); continue; } @@ -76,22 +77,22 @@ namespace vcpkg::Remove fs.remove(target, ec); if (ec) { - System::println( - System::Color::error, "failed: remove(%s): %s", target.u8string(), ec.message()); + System::printf( + System::Color::error, "failed: remove(%s): %s\n", target.u8string(), ec.message()); } #else - System::println( - System::Color::error, "failed: remove(%s): %s", target.u8string(), ec.message()); + System::printf( + System::Color::error, "failed: remove(%s): %s\n", target.u8string(), ec.message()); #endif } } else if (!fs::stdfs::exists(status)) { - System::println(System::Color::warning, "Warning: %s: file not found", target.u8string()); + System::printf(System::Color::warning, "Warning: %s: file not found\n", target.u8string()); } else { - System::println(System::Color::warning, "Warning: %s: cannot handle file type", target.u8string()); + System::printf(System::Color::warning, "Warning: %s: cannot handle file type\n", target.u8string()); } } @@ -105,7 +106,7 @@ namespace vcpkg::Remove fs.remove(*b, ec); if (ec) { - System::println(System::Color::error, "failed: %s", ec.message()); + System::print2(System::Color::error, "failed: ", ec.message(), "\n"); } } } @@ -143,10 +144,10 @@ namespace vcpkg::Remove switch (plan_type) { case RemovePlanType::NOT_INSTALLED: - System::println("The following packages are not installed, so not removed:\n%s", as_string); + System::print2("The following packages are not installed, so not removed:\n", as_string, "\n"); continue; case RemovePlanType::REMOVE: - System::println("The following packages will be removed:\n%s", as_string); + System::print2("The following packages will be removed:\n", as_string, "\n"); continue; default: Checks::unreachable(VCPKG_LINE_INFO); } @@ -163,12 +164,12 @@ namespace vcpkg::Remove switch (action.plan_type) { case RemovePlanType::NOT_INSTALLED: - System::println(System::Color::success, "Package %s is not installed", display_name); + System::printf(System::Color::success, "Package %s is not installed\n", display_name); break; case RemovePlanType::REMOVE: - System::println("Removing package %s... ", display_name); + System::printf("Removing package %s...\n", display_name); remove_package(paths, action.spec, status_db); - System::println(System::Color::success, "Removing package %s... done", display_name); + System::printf(System::Color::success, "Removing package %s... done\n", display_name); break; case RemovePlanType::UNKNOWN: default: Checks::unreachable(VCPKG_LINE_INFO); @@ -176,11 +177,11 @@ namespace vcpkg::Remove if (purge == Purge::YES) { - System::println("Purging package %s... ", display_name); + System::printf("Purging package %s...\n", display_name); Files::Filesystem& fs = paths.get_filesystem(); std::error_code ec; fs.remove_all(paths.packages / action.spec.dir(), ec); - System::println(System::Color::success, "Purging package %s... done", display_name); + System::printf(System::Color::success, "Purging package %s... done\n", display_name); } } @@ -224,7 +225,7 @@ namespace vcpkg::Remove { if (args.command_arguments.size() != 0) { - System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); + System::print2(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'\n"); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -235,7 +236,7 @@ namespace vcpkg::Remove if (specs.empty()) { - System::println(System::Color::success, "There are no outdated packages."); + System::print2(System::Color::success, "There are no outdated packages.\n"); Checks::exit_success(VCPKG_LINE_INFO); } } @@ -243,11 +244,12 @@ namespace vcpkg::Remove { if (args.command_arguments.size() < 1) { - System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); + System::print2(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'\n"); Checks::exit_fail(VCPKG_LINE_INFO); } specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); + return Input::check_and_get_package_spec( + std::string(arg), default_triplet, COMMAND_STRUCTURE.example_text); }); for (auto&& spec : specs) @@ -258,8 +260,8 @@ namespace vcpkg::Remove const bool purge_was_passed = Util::Sets::contains(options.switches, OPTION_PURGE); if (purge_was_passed && no_purge_was_passed) { - System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); - System::print(COMMAND_STRUCTURE.example_text); + System::print2(System::Color::error, "Error: cannot specify both --no-purge and --purge.\n"); + System::print2(COMMAND_STRUCTURE.example_text); Checks::exit_fail(VCPKG_LINE_INFO); } const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); @@ -280,13 +282,13 @@ namespace vcpkg::Remove if (has_non_user_requested_packages) { - System::println(System::Color::warning, - "Additional packages (*) need to be removed to complete this operation."); + System::print2(System::Color::warning, + "Additional packages (*) need to be removed to complete this operation.\n"); if (!is_recursive) { - System::println(System::Color::warning, - "If you are sure you want to remove them, run the command with the --recurse option"); + System::print2(System::Color::warning, + "If you are sure you want to remove them, run the command with the --recurse option\n"); Checks::exit_fail(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index baa8b070b..b495c5f1d 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -6,7 +6,8 @@ #include <vcpkg/base/checks.h> #include <vcpkg/base/expected.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/span.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/base/util.h> namespace vcpkg @@ -47,8 +48,12 @@ namespace vcpkg Checks::check_exit(VCPKG_LINE_INFO, error_info != nullptr); if (error_info->error) { - System::println( - System::Color::error, "Error: while loading %s: %s", error_info->name, error_info->error.message()); + System::print2(System::Color::error, + "Error: while loading ", + error_info->name, + ": ", + error_info->error.message(), + '\n'); } } @@ -57,31 +62,36 @@ namespace vcpkg { if (!error_info->extra_fields.empty()) { - System::println(System::Color::error, - "Error: There are invalid fields in the control file of %s", - error_info->name); - System::println("The following fields were not expected:\n\n %s\n", - Strings::join("\n ", error_info->extra_fields)); + System::print2(System::Color::error, + "Error: There are invalid fields in the control file of ", + error_info->name, + '\n'); + System::print2("The following fields were not expected:\n\n ", + Strings::join("\n ", error_info->extra_fields), + "\n\n"); have_remaining_fields = true; } } if (have_remaining_fields) { - System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", - Strings::join("\n ", get_list_of_valid_fields())); - System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); + System::print2("This is the list of valid fields (case-sensitive): \n\n ", + Strings::join("\n ", get_list_of_valid_fields()), + "\n\n"); + System::print2("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n\n"); } for (auto&& error_info : error_info_list) { if (!error_info->missing_fields.empty()) { - System::println(System::Color::error, - "Error: There are missing fields in the control file of %s", - error_info->name); - System::println("The following fields were missing:\n\n %s\n", - Strings::join("\n ", error_info->missing_fields)); + System::print2(System::Color::error, + "Error: There are missing fields in the control file of ", + error_info->name, + '\n'); + System::print2("The following fields were missing:\n\n ", + Strings::join("\n ", error_info->missing_fields), + "\n\n"); } } } diff --git a/toolsrc/src/vcpkg/tools.cpp b/toolsrc/src/vcpkg/tools.cpp index b713b2752..7232971c7 100644 --- a/toolsrc/src/vcpkg/tools.cpp +++ b/toolsrc/src/vcpkg/tools.cpp @@ -8,9 +8,10 @@ #include <vcpkg/base/downloads.h> #include <vcpkg/base/files.h> #include <vcpkg/base/optional.h> -#include <vcpkg/base/stringrange.h> #include <vcpkg/base/strings.h> -#include <vcpkg/base/system.h> +#include <vcpkg/base/stringview.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> namespace vcpkg @@ -87,15 +88,15 @@ namespace vcpkg } const std::string tool_data = - StringRange::find_exactly_one_enclosed(XML, match_tool_entry[0], "</tool>").to_string(); + StringView::find_exactly_one_enclosed(XML, match_tool_entry[0], "</tool>").to_string(); const std::string version_as_string = - StringRange::find_exactly_one_enclosed(tool_data, "<version>", "</version>").to_string(); + StringView::find_exactly_one_enclosed(tool_data, "<version>", "</version>").to_string(); const std::string exe_relative_path = - StringRange::find_exactly_one_enclosed(tool_data, "<exeRelativePath>", "</exeRelativePath>").to_string(); - const std::string url = StringRange::find_exactly_one_enclosed(tool_data, "<url>", "</url>").to_string(); + StringView::find_exactly_one_enclosed(tool_data, "<exeRelativePath>", "</exeRelativePath>").to_string(); + const std::string url = StringView::find_exactly_one_enclosed(tool_data, "<url>", "</url>").to_string(); const std::string sha512 = - StringRange::find_exactly_one_enclosed(tool_data, "<sha512>", "</sha512>").to_string(); - auto archive_name = StringRange::find_at_most_one_enclosed(tool_data, "<archiveName>", "</archiveName>"); + StringView::find_exactly_one_enclosed(tool_data, "<sha512>", "</sha512>").to_string(); + auto archive_name = StringView::find_at_most_one_enclosed(tool_data, "<archiveName>", "</archiveName>"); const Optional<std::array<int, 3>> version = parse_version_string(version_as_string); Checks::check_exit(VCPKG_LINE_INFO, @@ -172,16 +173,16 @@ namespace vcpkg tool_name, version_as_string, tool_name); - System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", - tool_name, - version_as_string, - tool_name, - version_as_string); + System::printf("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...\n", + tool_name, + version_as_string, + tool_name, + version_as_string); auto& fs = paths.get_filesystem(); if (!fs.exists(tool_data.download_path)) { - System::println("Downloading %s...", tool_name); - System::println(" %s -> %s", tool_data.url, tool_data.download_path.string()); + System::print2("Downloading ", tool_name, "...\n"); + System::print2(" ", tool_data.url, " -> ", tool_data.download_path.u8string(), "\n"); Downloads::download_file(fs, tool_data.url, tool_data.download_path, tool_data.sha512); } else @@ -191,7 +192,7 @@ namespace vcpkg if (tool_data.is_archive) { - System::println("Extracting %s...", tool_name); + System::print2("Extracting ", tool_name, "...\n"); Archives::extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); } else @@ -286,7 +287,7 @@ cmake version 3.10.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). */ - return StringRange::find_exactly_one_enclosed(rc.output, "cmake version ", "\n").to_string(); + return StringView::find_exactly_one_enclosed(rc.output, "cmake version ", "\n").to_string(); } }; @@ -352,7 +353,7 @@ Type 'NuGet help <command>' for help on a specific command. [[[List of available commands follows]]] */ - return StringRange::find_exactly_one_enclosed(rc.output, "NuGet Version: ", "\n").to_string(); + return StringView::find_exactly_one_enclosed(rc.output, "NuGet Version: ", "\n").to_string(); } }; @@ -364,7 +365,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 +404,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"); diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp index c4ad3f690..1abfa0b39 100644 --- a/toolsrc/src/vcpkg/triplet.cpp +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -43,9 +43,9 @@ namespace vcpkg bool operator!=(const Triplet& left, const Triplet& right) { return !(left == right); } - Triplet Triplet::from_canonical_name(const std::string& triplet_as_string) + Triplet Triplet::from_canonical_name(std::string&& triplet_as_string) { - std::string s(Strings::ascii_to_lowercase(triplet_as_string)); + std::string s(Strings::ascii_to_lowercase(std::move(triplet_as_string))); const auto p = g_triplet_instances.emplace(std::move(s)); return &*p.first; } @@ -53,5 +53,6 @@ namespace vcpkg const std::string& Triplet::canonical_name() const { return this->m_instance->value; } const std::string& Triplet::to_string() const { return this->canonical_name(); } + void Triplet::to_string(std::string& out) const { out.append(this->canonical_name()); } size_t Triplet::hash_code() const { return m_instance->hash; } } diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 57259f952..344192d59 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> @@ -53,7 +53,7 @@ namespace vcpkg::Update void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { args.parse_arguments(COMMAND_STRUCTURE); - System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); + System::print2("Using local portfile versions. To update the local portfiles, use `git pull`.\n"); const StatusParagraphs status_db = database_load_check(paths); @@ -64,21 +64,22 @@ namespace vcpkg::Update if (outdated_packages.empty()) { - System::println("No packages need updating."); + System::print2("No packages need updating.\n"); } else { - System::println("The following packages differ from their port versions:"); + System::print2("The following packages differ from their port versions:\n"); for (auto&& package : outdated_packages) { - System::println(" %-32s %s", package.spec, package.version_diff.to_string()); + System::printf(" %-32s %s\n", package.spec, package.version_diff.to_string()); } - System::println("\n" - "To update these packages and all dependencies, run\n" - " .\\vcpkg upgrade\n" - "\n" - "To only remove outdated packages, run\n" - " .\\vcpkg remove --outdated\n"); + System::print2("\n" + "To update these packages and all dependencies, run\n" + " .\\vcpkg upgrade\n" + "\n" + "To only remove outdated packages, run\n" + " .\\vcpkg remove --outdated\n" + "\n"); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 5b3cf9ef1..8565c28f9 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include <vcpkg/base/system.h> +#include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> @@ -16,7 +16,7 @@ namespace vcpkg { if (arg_begin == arg_end) { - System::println(System::Color::error, "Error: expected value after %s", option_name); + System::print2(System::Color::error, "Error: expected value after ", option_name, '\n'); Metrics::g_metrics.lock()->track_property("error", "error option name"); Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); @@ -24,7 +24,7 @@ namespace vcpkg if (option_field != nullptr) { - System::println(System::Color::error, "Error: %s specified multiple times", option_name); + System::print2(System::Color::error, "Error: ", option_name, " specified multiple times\n"); Metrics::g_metrics.lock()->track_property("error", "error option specified multiple times"); Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); @@ -37,7 +37,7 @@ namespace vcpkg { if (option_field && option_field != new_setting) { - System::println(System::Color::error, "Error: conflicting values specified for --%s", option_name); + System::print2(System::Color::error, "Error: conflicting values specified for --", option_name, '\n'); Metrics::g_metrics.lock()->track_property("error", "error conflicting switches"); Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); @@ -65,7 +65,7 @@ namespace vcpkg auto lines = fs.read_lines(fs::u8path(arg)); if (!lines.has_value()) { - System::println(System::Color::error, "Error: Could not open response file %s", arg); + System::print2(System::Color::error, "Error: Could not open response file ", arg, '\n'); Checks::exit_fail(VCPKG_LINE_INFO); } std::copy(lines.get()->begin(), lines.get()->end(), std::back_inserter(v)); @@ -199,11 +199,11 @@ namespace vcpkg { if (actual_arg_count != command_structure.minimum_arity) { - System::println(System::Color::error, - "Error: '%s' requires %u arguments, but %u were provided.", - this->command, - command_structure.minimum_arity, - actual_arg_count); + System::printf(System::Color::error, + "Error: '%s' requires %u arguments, but %u were provided.\n", + this->command, + command_structure.minimum_arity, + actual_arg_count); failed = true; } } @@ -211,20 +211,20 @@ namespace vcpkg { if (actual_arg_count < command_structure.minimum_arity) { - System::println(System::Color::error, - "Error: '%s' requires at least %u arguments, but %u were provided", - this->command, - command_structure.minimum_arity, - actual_arg_count); + System::printf(System::Color::error, + "Error: '%s' requires at least %u arguments, but %u were provided\n", + this->command, + command_structure.minimum_arity, + actual_arg_count); failed = true; } if (actual_arg_count > command_structure.maximum_arity) { - System::println(System::Color::error, - "Error: '%s' requires at most %u arguments, but %u were provided", - this->command, - command_structure.maximum_arity, - actual_arg_count); + System::printf(System::Color::error, + "Error: '%s' requires at most %u arguments, but %u were provided\n", + this->command, + command_structure.maximum_arity, + actual_arg_count); failed = true; } } @@ -238,8 +238,8 @@ namespace vcpkg if (it->second.has_value()) { // Having a string value indicates it was passed like '--a=xyz' - System::println( - System::Color::error, "Error: The option '%s' does not accept an argument.", option.name); + System::printf( + System::Color::error, "Error: The option '%s' does not accept an argument.\n", option.name); failed = true; } else @@ -258,8 +258,8 @@ namespace vcpkg if (!it->second.has_value()) { // Not having a string value indicates it was passed like '--a' - System::println( - System::Color::error, "Error: The option '%s' must be passed an argument.", option.name); + System::printf( + System::Color::error, "Error: The option '%s' must be passed an argument.\n", option.name); failed = true; } else @@ -272,12 +272,12 @@ namespace vcpkg if (!options_copy.empty()) { - System::println(System::Color::error, "Unknown option(s) for command '%s':", this->command); + System::printf(System::Color::error, "Unknown option(s) for command '%s':\n", this->command); for (auto&& option : options_copy) { - System::println(" %s", option.first); + System::print2(" ", option.first, "\n"); } - System::println(); + System::print2("\n"); failed = true; } @@ -294,21 +294,21 @@ namespace vcpkg { if (!command_structure.example_text.empty()) { - System::println("%s", command_structure.example_text); + System::print2(command_structure.example_text, "\n"); } - System::println("Options:"); + System::print2("Options:\n"); for (auto&& option : command_structure.options.switches) { - System::println(" %-40s %s", option.name, option.short_help_text); + System::printf(" %-40s %s\n", option.name, option.short_help_text); } for (auto&& option : command_structure.options.settings) { - System::println(" %-40s %s", (option.name + "=..."), option.short_help_text); + System::printf(" %-40s %s\n", (option.name + "=..."), option.short_help_text); } - System::println(" %-40s %s", "--triplet <t>", "Set the default triplet for unqualified packages"); - System::println(" %-40s %s", - "--vcpkg-root <path>", - "Specify the vcpkg directory to use instead of current directory or tool directory"); + System::printf(" %-40s %s\n", "--triplet <t>", "Set the default triplet for unqualified packages"); + System::printf(" %-40s %s\n", + "--vcpkg-root <path>", + "Specify the vcpkg directory to use instead of current directory or tool directory"); } } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 47994660c..0f99e01d3 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -152,7 +152,7 @@ namespace vcpkg const std::vector<Toolset>& vs_toolsets = this->toolsets.get_lazy([this]() { return VisualStudio::find_toolset_instances_preferred_first(*this); }); - std::vector<const Toolset*> candidates = Util::element_pointers(vs_toolsets); + std::vector<const Toolset*> candidates = Util::fmap(vs_toolsets, [](auto&& x) { return &x; }); const auto tsv = prebuildinfo.platform_toolset.get(); auto vsp = prebuildinfo.visual_studio_path.get(); if (!vsp && !default_vs_path.empty()) diff --git a/toolsrc/src/vcpkg/visualstudio.cpp b/toolsrc/src/vcpkg/visualstudio.cpp index d2fccc716..df3c70de2 100644 --- a/toolsrc/src/vcpkg/visualstudio.cpp +++ b/toolsrc/src/vcpkg/visualstudio.cpp @@ -3,7 +3,9 @@ #if defined(_WIN32) #include <vcpkg/base/sortedvector.h> -#include <vcpkg/base/stringrange.h> +#include <vcpkg/base/stringview.h> +#include <vcpkg/base/system.print.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> #include <vcpkg/visualstudio.h> @@ -90,11 +92,11 @@ namespace vcpkg::VisualStudio code_and_output.output); const auto instance_entries = - StringRange::find_all_enclosed(code_and_output.output, "<instance>", "</instance>"); - for (const StringRange& instance : instance_entries) + StringView::find_all_enclosed(code_and_output.output, "<instance>", "</instance>"); + for (const StringView& instance : instance_entries) { auto maybe_is_prerelease = - StringRange::find_at_most_one_enclosed(instance, "<isPrerelease>", "</isPrerelease>"); + StringView::find_at_most_one_enclosed(instance, "<isPrerelease>", "</isPrerelease>"); VisualStudioInstance::ReleaseType release_type = VisualStudioInstance::ReleaseType::LEGACY; if (const auto p = maybe_is_prerelease.get()) @@ -109,9 +111,9 @@ namespace vcpkg::VisualStudio } instances.emplace_back( - StringRange::find_exactly_one_enclosed(instance, "<installationPath>", "</installationPath>") + StringView::find_exactly_one_enclosed(instance, "<installationPath>", "</installationPath>") .to_string(), - StringRange::find_exactly_one_enclosed(instance, "<installationVersion>", "</installationVersion>") + StringView::find_exactly_one_enclosed(instance, "<installationVersion>", "</installationVersion>") .to_string(), release_type); } @@ -326,23 +328,23 @@ namespace vcpkg::VisualStudio if (!excluded_toolsets.empty()) { - System::println( + System::print2( System::Color::warning, - "Warning: The following VS instances are excluded because the English language pack is unavailable."); + "Warning: The following VS instances are excluded because the English language pack is unavailable.\n"); for (const Toolset& toolset : excluded_toolsets) { - System::println(" %s", toolset.visual_studio_root_path.u8string()); + System::print2(" ", toolset.visual_studio_root_path.u8string(), '\n'); } - System::println(System::Color::warning, "Please install the English language pack."); + System::print2(System::Color::warning, "Please install the English language pack.\n"); } if (found_toolsets.empty()) { - System::println(System::Color::error, "Could not locate a complete toolset."); - System::println("The following paths were examined:"); + System::print2(System::Color::error, "Could not locate a complete toolset.\n"); + System::print2("The following paths were examined:\n"); for (const fs::path& path : paths_examined) { - System::println(" %s", path.u8string()); + System::print2(" ", path.u8string(), '\n'); } Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 8df9b5b9d..a64eb42fd 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -210,11 +210,11 @@ <ClCompile Include="..\src\vcpkg\base\enums.cpp" />
<ClCompile Include="..\src\vcpkg\base\files.cpp" />
<ClCompile Include="..\src\vcpkg\base\hash.cpp" />
- <ClCompile Include="..\src\vcpkg\base\lineinfo.cpp" />
<ClCompile Include="..\src\vcpkg\base\machinetype.cpp" />
- <ClCompile Include="..\src\vcpkg\base\stringrange.cpp" />
<ClCompile Include="..\src\vcpkg\base\strings.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\stringview.cpp" />
<ClCompile Include="..\src\vcpkg\base\system.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\system.print.cpp" />
<ClCompile Include="..\src\vcpkg\binaryparagraph.cpp" />
<ClCompile Include="..\src\vcpkg\build.cpp" />
<ClCompile Include="..\src\vcpkg\commands.autocomplete.cpp" />
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 3e0ccd885..36840c509 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -177,9 +177,6 @@ <ClCompile Include="..\src\vcpkg\base\files.cpp">
<Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg\base\lineinfo.cpp">
- <Filter>Source Files\vcpkg\base</Filter>
- </ClCompile>
<ClCompile Include="..\src\vcpkg\base\machinetype.cpp">
<Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
@@ -201,9 +198,6 @@ <ClCompile Include="..\src\vcpkg\visualstudio.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg\base\stringrange.cpp">
- <Filter>Source Files\vcpkg\base</Filter>
- </ClCompile>
<ClCompile Include="..\src\vcpkg\tools.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
@@ -216,6 +210,12 @@ <ClCompile Include="..\src\vcpkg\commands.xvsinstances.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
+ <ClCompile Include="..\src\vcpkg\base\stringview.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\vcpkg\base\system.print.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\pch.h">
|
