aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoelf-Jilling <r-j.wolthuis@live.com>2018-11-20 19:45:21 +0100
committerRoelf-Jilling <r-j.wolthuis@live.com>2018-11-20 19:45:21 +0100
commit370984d139c0799446e45706b45c8cb8eb77db44 (patch)
tree571d28239f4015588db65f91eb5c77531eb9d4d3
parent381e4c94af038bd0ff364ddec918ea077c405ecf (diff)
parent2a283bd5224b5335a90539faa1b0ac7260411465 (diff)
downloadvcpkg-370984d139c0799446e45706b45c8cb8eb77db44.tar.gz
vcpkg-370984d139c0799446e45706b45c8cb8eb77db44.zip
Merge branch 'master' into documentation
-rw-r--r--README.md4
-rw-r--r--docs/about/faq.md4
-rw-r--r--docs/examples/installing-and-using-packages.md (renamed from docs/examples/using-sqlite.md)6
-rw-r--r--docs/examples/packaging-github-repos.md59
-rw-r--r--docs/examples/packaging-zipfiles.md (renamed from docs/examples/packaging-zlib.md)2
-rw-r--r--docs/examples/patching.md (renamed from docs/examples/patching-libpng.md)2
-rw-r--r--docs/index.md9
-rw-r--r--docs/users/integration.md2
-rw-r--r--ports/berkeleydb/CMakeLists.txt6
-rw-r--r--ports/berkeleydb/CONTROL2
-rw-r--r--ports/freeimage/CMakeLists.txt8
-rw-r--r--ports/freeimage/CONTROL2
-rw-r--r--ports/freeimage/fix-function-overload.patch40
-rw-r--r--ports/freeimage/portfile.cmake7
-rw-r--r--ports/freeimage/use-external-webp.patch5
-rw-r--r--ports/freeimage/use-freeimage-config-include.patch4
-rw-r--r--ports/stlab/CONTROL5
-rw-r--r--ports/stlab/portfile.cmake24
-rw-r--r--toolsrc/src/vcpkg/dependencies.cpp60
-rw-r--r--toolsrc/src/vcpkg/tools.cpp2
20 files changed, 188 insertions, 65 deletions
diff --git a/README.md b/README.md
index 71a4091e0..93262a1ca 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ The best way to use installed libraries with CMake is via the toolchain file `sc
In Visual Studio, you can create a New Project (or open an existing one). All installed libraries are immediately ready to be `#include`'d and used in your project without additional configuration.
-For more information, see our [using a package](docs/examples/using-sqlite.md) example for the specifics.
+For more information, see our [using a package](docs/examples/installing-and-using-packages.md) example for the specifics.
Additional notes on macOS and Linux support can be found in the [official announcement](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/).
@@ -50,7 +50,7 @@ and restart Powershell.
## Examples
-See the [documentation](docs/index.md) for specific walkthroughs, including [using a package](docs/examples/using-sqlite.md) and [adding a new package](docs/examples/packaging-zlib.md).
+See the [documentation](docs/index.md) for specific walkthroughs, including [installing and using a package](docs/examples/installing-and-using-packages.md), [adding a new package from a zipfile](docs/examples/packaging-zipfiles.md), and [adding a new package from a GitHub repo](docs/examples/packaging-github-repos.md).
Our docs are now also available online at ReadTheDocs: <https://vcpkg.readthedocs.io/>!
diff --git a/docs/about/faq.md b/docs/about/faq.md
index 0178e051a..b7c9d67c8 100644
--- a/docs/about/faq.md
+++ b/docs/about/faq.md
@@ -10,12 +10,12 @@ Yes! See [the `export` command](../users/integration.md#export).
The `vcpkg update` command lists all packages which are out-of-sync with your current portfiles. To update a package, follow the instructions in the command.
## How do I get more libraries?
-The list of libraries is enumerated from the [`ports\`](https://github.com/Microsoft/vcpkg/blob/master/ports) directory. By design, you can add and remove libraries from this directory as you see fit for yourself or your company -- see [Example #2](../examples/packaging-zlib.md).
+The list of libraries is enumerated from the [`ports\`](https://github.com/Microsoft/vcpkg/blob/master/ports) directory. By design, you can add and remove libraries from this directory as you see fit for yourself or your company -- see our examples on packaging [zipfiles](../examples/packaging-zipfiles.md) and [GitHub repos](../examples/packaging-github-repos.md).
We recommend cloning directly from [GitHub](https://github.com/microsoft/vcpkg) and using `git pull` to update the list of portfiles. Once you've updated your portfiles, `vcpkg update` will indicate any installed libraries that are now out of date.
## Can I build a private library with this tool?
-Yes. Follow [our Packaging zlib Example](../examples/packaging-zlib.md) for creating a portfile using a fake URL. Then, either pre-seed the `downloads\` folder with a zip containing your private sources or replace the normal calls to `vcpkg_download_distfile` and `vcpkg_extract_source_archive` with functions that unpack your source code.
+Yes. Follow [our packaging zlib Example](../examples/packaging-zipfiles.md) for creating a portfile using a fake URL. Then, either pre-seed the `downloads\` folder with a zip containing your private sources or replace the normal calls to `vcpkg_download_distfile` and `vcpkg_extract_source_archive` with functions that unpack your source code.
## Can I use a prebuilt private library with this tool?
Yes. The `portfile.cmake` for a library is fundamentally a script that places the headers and binaries into the correct arrangement in the `${CURRENT_PACKAGES_DIR}`, so to pull in prebuilt binaries you can write a portfile which directly downloads and arranges the files.
diff --git a/docs/examples/using-sqlite.md b/docs/examples/installing-and-using-packages.md
index eb03d57d2..73f9d29a9 100644
--- a/docs/examples/using-sqlite.md
+++ b/docs/examples/installing-and-using-packages.md
@@ -1,4 +1,4 @@
-# Example: Using Sqlite
+## Installing and Using Packages Example: SQLite
- [Step 1: Install](#install)
- [Step 2: Use](#use)
@@ -10,7 +10,7 @@
<a name="install"></a>
## Step 1: Install
-First, we need to know what name [Sqlite](https://sqlite.org) goes by in the ports tree. To do that, we'll run the `search` command and inspect the output:
+First, we need to know what name [SQLite](https://sqlite.org) goes by in the ports tree. To do that, we'll run the `search` command and inspect the output:
```no-highlight
PS D:\src\vcpkg> .\vcpkg search sqlite
libodb-sqlite 2.4.0 Sqlite support for the ODB ORM library
@@ -82,7 +82,7 @@ Installing new libraries will make them instantly available.
```
*Note: You will need to restart Visual Studio or perform a Build to update intellisense with the changes.*
-You can now simply use File -> New Project in Visual Studio 2015 or Visual Studio 2017 and the library will be automatically available. For Sqlite, you can try out their [C/C++ sample](https://sqlite.org/quickstart.html).
+You can now simply use File -> New Project in Visual Studio 2015 or Visual Studio 2017 and the library will be automatically available. For SQLite, you can try out their [C/C++ sample](https://sqlite.org/quickstart.html).
To remove the integration for your user, you can use `.\vcpkg integrate remove`.
diff --git a/docs/examples/packaging-github-repos.md b/docs/examples/packaging-github-repos.md
new file mode 100644
index 000000000..af2e6141a
--- /dev/null
+++ b/docs/examples/packaging-github-repos.md
@@ -0,0 +1,59 @@
+## Packaging Github Repos Example: libogg
+### Create the CONTROL file
+The `CONTROL` file is a simple set of fields describing the package's metadata.
+
+*For libogg, we'll create the file `ports\libogg\CONTROL` with the following contents:*
+```no-highlight
+Source: libogg
+Version: 1.3.3
+Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs.
+```
+
+### Create the portfile
+`portfile.cmake` describes how to build and install the package. First we include `vcpkg_common_functions` to give us utilities for carrying this out:
+
+```no-highlight
+include(vcpkg_common_functions)
+```
+
+Now we download the project from Github with [`vcpkg_from_github`](../maintainers/vcpkg_from_github.md):
+
+```no-highlight
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO xiph/ogg
+ REF v1.3.3
+ SHA512 0bd6095d647530d4cb1f509eb5e99965a25cc3dd9b8125b93abd6b248255c890cf20710154bdec40568478eb5c4cde724abfb2eff1f3a04e63acef0fbbc9799b
+ HEAD_REF master
+)
+```
+
+The important parts to update are `REPO` for the GitHub repository path, `REF` for a stable tag/commit to use, and `SHA512` with the checksum of the downloaded zipfile (you can get this easily by setting it to `1`, trying to install the package, and copying the checksum).
+
+Finally, we configure the project with CMake, install the package, and copy over the license file:
+
+```no-highlight
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+vcpkg_install_cmake()
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libogg RENAME copyright)
+```
+
+Check the documentation for [`vcpkg_configure_cmake`](../maintainers/vcpkg_configure_cmake.md) and [`vcpkg_install_cmake`](../maintainers/vcpkg_install_cmake.md) if your package needs additional options.
+
+Now you can run `vcpkg install libogg` to build and install the package.
+
+### Suggested example portfiles
+In the `ports\` directory are many libraries that can be used as examples, including many that are not based on CMake.
+
+- Header only libraries
+ - rapidjson
+ - range-v3
+- MSBuild-based
+ - cppunit
+ - mpg123
+- Non-CMake, custom buildsystem
+ - openssl
+ - ffmpeg
diff --git a/docs/examples/packaging-zlib.md b/docs/examples/packaging-zipfiles.md
index 1d61cfee1..ed63637fd 100644
--- a/docs/examples/packaging-zlib.md
+++ b/docs/examples/packaging-zipfiles.md
@@ -1,4 +1,4 @@
-## Example 2: Packaging zlib
+## Packaging Zipfiles Example: zlib
### Bootstrap with `create`
First, locate a globally accessible archive of the library's sources. Zip, gzip, and bzip are all supported. Strongly prefer official sources or mirrors over unofficial mirrors.
diff --git a/docs/examples/patching-libpng.md b/docs/examples/patching.md
index 2337b73da..98115400e 100644
--- a/docs/examples/patching-libpng.md
+++ b/docs/examples/patching.md
@@ -1,4 +1,4 @@
-## Example 3: Patching libpng to work for x86-uwp
+## Patching Example: Patching libpng to work for x86-uwp
### Initial error logs
First, try building:
diff --git a/docs/index.md b/docs/index.md
index 90245d36a..69dbdcd1e 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -2,13 +2,14 @@
Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement are vital to its success!
-- [How to use Sqlite in your application](examples/using-sqlite.md)
+- [Installing and Using Packages Example: sqlite](examples/installing-and-using-packages.md)
### Examples
-- [Example 1: Using Sqlite](examples/using-sqlite.md)
-- [Example 2: Packaging zlib](examples/packaging-zlib.md)
-- [Example 3: Patching libpng for x86-uwp](examples/patching-libpng.md)
+- [Installing and Using Packages Example: sqlite](examples/installing-and-using-packages.md)
+- [Packaging Zipfiles Example: zlib](examples/packaging-zipfiles.md)
+- [Packaging GitHub Repositories Example: libogg](examples/packaging-github-repos.md)
+- [Patching Example: Patching libpng to work for x86-uwp](examples/patching.md)
### User Help
diff --git a/docs/users/integration.md b/docs/users/integration.md
index ce52abe23..fbaea41d9 100644
--- a/docs/users/integration.md
+++ b/docs/users/integration.md
@@ -35,7 +35,7 @@ cmake ../my/project -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.c
```
Projects configured with the Vcpkg toolchain file will have the appropriate Vcpkg folders added to the cmake search paths. This makes all libraries available to be found through `find_package()`, `find_path()`, and `find_library()`.
-See [Example: Using Sqlite](../examples/using-sqlite.md) for a fully worked example using our CMake toolchain.
+See [Installing and Using Packages Example: sqlite](../examples/installing-and-using-packages.md) for a fully worked example using our CMake toolchain.
Note that we do not automatically add ourselves to your compiler include paths. To use a header-only library, simply use `find_path()`, which will correctly work on all platforms:
```cmake
diff --git a/ports/berkeleydb/CMakeLists.txt b/ports/berkeleydb/CMakeLists.txt
index eada8360a..9297aacef 100644
--- a/ports/berkeleydb/CMakeLists.txt
+++ b/ports/berkeleydb/CMakeLists.txt
@@ -15,12 +15,12 @@ add_definitions(
if (BUILD_SHARED_LIBS)
add_definitions(
- -D_LIB
+ -DDB_CREATE_DLL
+ -D_USRDLL
)
else()
add_definitions(
- -DDB_CREATE_DLL
- -D_USRDLL
+ -D_LIB
)
endif()
diff --git a/ports/berkeleydb/CONTROL b/ports/berkeleydb/CONTROL
index 18eaae5d9..e77e5793a 100644
--- a/ports/berkeleydb/CONTROL
+++ b/ports/berkeleydb/CONTROL
@@ -1,3 +1,3 @@
Source: berkeleydb
-Version: 4.8.30-1
+Version: 4.8.30-2
Description: A high-performance embedded database for key/value data.
diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt
index 9f4f1677b..997fba37a 100644
--- a/ports/freeimage/CMakeLists.txt
+++ b/ports/freeimage/CMakeLists.txt
@@ -7,6 +7,9 @@ project(FreeImage C CXX)
find_package(zlib REQUIRED)
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
+if(NOT JPEG_LIBRARY_DEBUG)
+ set(JPEG_LIBRARY_DEBUG ${JPEG_LIBRARY_RELEASE})
+endif()
find_package(TIFF REQUIRED)
find_package(OPENJPEG REQUIRED)
@@ -36,9 +39,8 @@ set(ROOT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/CacheFile.h
${REAL_SOURCE_DIR}/Plugin.h
${REAL_SOURCE_DIR}/Quantizers.h
${REAL_SOURCE_DIR}/ToneMapping.h
- ${REAL_SOURCE_DIR}/Utilities.h
- ${REAL_SOURCE_DIR}/DeprecationManager/DeprecationMgr.h)
-
+ ${REAL_SOURCE_DIR}/Utilities.h)
+
file(GLOB FREEIMAGE_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImage/*.h)
file(GLOB FREEIMAGE_TOOLKIT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.h)
file(GLOB METADATA_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/Metadata/*.h)
diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL
index 6e8de82fc..d8bd820e6 100644
--- a/ports/freeimage/CONTROL
+++ b/ports/freeimage/CONTROL
@@ -1,4 +1,4 @@
Source: freeimage
-Version: 3.17.0-4
+Version: 3.18.0-2
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr
Description: Support library for graphics image formats
diff --git a/ports/freeimage/fix-function-overload.patch b/ports/freeimage/fix-function-overload.patch
new file mode 100644
index 000000000..adb1164f6
--- /dev/null
+++ b/ports/freeimage/fix-function-overload.patch
@@ -0,0 +1,40 @@
+diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp
+index 8db177d..efa2c4e 100644
+--- a/Source/FreeImage/PluginJPEG.cpp
++++ b/Source/FreeImage/PluginJPEG.cpp
+@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) {
+ return FALSE. You might want to issue an error message instead.
+ */
+ static BOOL
+-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
++jpeg_read_icc_profile_(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
+ jpeg_saved_marker_ptr marker;
+ int num_markers = 0;
+ int seq_no;
+@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) {
+ BYTE *icc_profile = NULL;
+ unsigned icc_length = 0;
+
+- if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) {
++ if( jpeg_read_icc_profile_(cinfo, &icc_profile, &icc_length) ) {
+ // copy ICC profile data
+ FreeImage_CreateICCProfile(dib, icc_profile, icc_length);
+ // clean up
+@@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) {
+ Write JPEG_APP2 marker (ICC profile)
+ */
+ static BOOL
+-jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) {
++jpeg_write_icc_profile_(j_compress_ptr cinfo, FIBITMAP *dib) {
+ // marker identifying string "ICC_PROFILE" (null-terminated)
+ BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 };
+
+@@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) {
+ jpeg_write_comment(cinfo, dib);
+
+ // write ICC profile
+- jpeg_write_icc_profile(cinfo, dib);
++ jpeg_write_icc_profile_(cinfo, dib);
+
+ // write IPTC profile
+ jpeg_write_iptc_profile(cinfo, dib);
diff --git a/ports/freeimage/portfile.cmake b/ports/freeimage/portfile.cmake
index db8d2537a..6f3cfaebe 100644
--- a/ports/freeimage/portfile.cmake
+++ b/ports/freeimage/portfile.cmake
@@ -2,9 +2,9 @@ include(${CMAKE_TRIPLET_FILE})
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeImage)
vcpkg_download_distfile(ARCHIVE
- URLS "http://downloads.sourceforge.net/freeimage/FreeImage3170.zip"
- FILENAME "FreeImage3170.zip"
- SHA512 703c2626c0bcfe73eb40d720f45745208ca9650a7730759680a2b38ad3f6c719a43008477032bc70b76a95761f7d4b6f901b961359d36b54ace906dd78fb391b
+ URLS "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip"
+ FILENAME "FreeImage3180.zip"
+ SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818
)
vcpkg_extract_source_archive(${ARCHIVE})
@@ -40,6 +40,7 @@ vcpkg_apply_patches(
"${CMAKE_CURRENT_LIST_DIR}/use-external-webp.patch"
"${CMAKE_CURRENT_LIST_DIR}/use-external-openexr.patch"
"${CMAKE_CURRENT_LIST_DIR}/use-freeimage-config-include.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/fix-function-overload.patch"
)
vcpkg_configure_cmake(
diff --git a/ports/freeimage/use-external-webp.patch b/ports/freeimage/use-external-webp.patch
index ae6328431..4d1757c39 100644
--- a/ports/freeimage/use-external-webp.patch
+++ b/ports/freeimage/use-external-webp.patch
@@ -1,14 +1,13 @@
diff --git a/Source/FreeImage/PluginWebP.cpp b/Source/FreeImage/PluginWebP.cpp
-index 9fb0b69..c401447 100644
+index 7c9f62f..c401447 100644
--- a/Source/FreeImage/PluginWebP.cpp
+++ b/Source/FreeImage/PluginWebP.cpp
-@@ -24,10 +24,9 @@
+@@ -24,9 +24,9 @@
#include "../Metadata/FreeImageTag.h"
-#include "../LibWebP/src/webp/decode.h"
-#include "../LibWebP/src/webp/encode.h"
--#include "../LibWebP/src/enc/vp8enci.h"
-#include "../LibWebP/src/webp/mux.h"
+#include <webp/decode.h>
+#include <webp/encode.h>
diff --git a/ports/freeimage/use-freeimage-config-include.patch b/ports/freeimage/use-freeimage-config-include.patch
index 4927aff5b..579f08845 100644
--- a/ports/freeimage/use-freeimage-config-include.patch
+++ b/ports/freeimage/use-freeimage-config-include.patch
@@ -1,9 +1,9 @@
diff --git a/Source/FreeImage.h b/Source/FreeImage.h
-index cc66b7d..cc66812 100644
+index 12182cd..86a1e68 100644
--- a/Source/FreeImage.h
+++ b/Source/FreeImage.h
@@ -32,6 +32,11 @@
- #define FREEIMAGE_MINOR_VERSION 17
+ #define FREEIMAGE_MINOR_VERSION 18
#define FREEIMAGE_RELEASE_SERIAL 0
+// vcpkg specific includes --------------------------------------------------
diff --git a/ports/stlab/CONTROL b/ports/stlab/CONTROL
new file mode 100644
index 000000000..c1a752a5e
--- /dev/null
+++ b/ports/stlab/CONTROL
@@ -0,0 +1,5 @@
+Source: stlab
+Version: 1.3.3
+Description:
+ stlab is the ongoing work of what was Adobe’s Software Technology Lab.
+ The Concurrency library provides futures and channels, high level constructs for implementing algorithms that eases the use of multiple CPU cores while minimizing contention. This library solves several problems of the C++11 and C++17 TS futures. \ No newline at end of file
diff --git a/ports/stlab/portfile.cmake b/ports/stlab/portfile.cmake
new file mode 100644
index 000000000..a2bd71e56
--- /dev/null
+++ b/ports/stlab/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO stlab/libraries
+ REF v1.3.3
+ SHA512 2c0eec5638b40f8285cc3b0d756df619b53ba44421c47713aaf45196100765a31a6aea3c5bedba4fcc44494b74e3f0a919271601e717e7f274fe15beb93f8889
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DBUILD_TESTING=OFF
+)
+
+vcpkg_install_cmake()
+
+# cleanup
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/cmake/stlab ${CURRENT_PACKAGES_DIR}/share/stlab)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/cmake)
+
+# handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/stlab RENAME copyright) \ No newline at end of file
diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp
index 8fb35b0da..8f2b4eaef 100644
--- a/toolsrc/src/vcpkg/dependencies.cpp
+++ b/toolsrc/src/vcpkg/dependencies.cpp
@@ -488,26 +488,24 @@ namespace vcpkg::Dependencies
if (plus) return MarkPlusResult::SUCCESS;
plus = true;
+ auto p_source = cluster.source.get();
+ if (!p_source)
+ {
+ Checks::exit_with_message(
+ VCPKG_LINE_INFO, "Error: Cannot find definition for package `%s`.", cluster.spec.name());
+ }
+
if (feature.empty())
{
// Add default features for this package. This is an exact reference, so ignore prevent_default_features.
- if (auto p_source = cluster.source.get())
+ for (auto&& default_feature : p_source->scf->core_paragraph.get()->default_features)
{
- for (auto&& default_feature : p_source->scf->core_paragraph.get()->default_features)
+ auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features);
+ if (res != MarkPlusResult::SUCCESS)
{
- auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features);
- if (res != MarkPlusResult::SUCCESS)
- {
- return res;
- }
+ return res;
}
}
- else
- {
- Checks::exit_with_message(VCPKG_LINE_INFO,
- "Error: Unable to install default features because can't find CONTROL for %s",
- cluster.spec);
- }
// "core" is always required.
return mark_plus("core", cluster, graph, graph_plan, prevent_default_features);
@@ -515,28 +513,20 @@ namespace vcpkg::Dependencies
if (feature == "*")
{
- if (auto p_source = cluster.source.get())
+ for (auto&& fpgh : p_source->scf->feature_paragraphs)
{
- for (auto&& fpgh : p_source->scf->feature_paragraphs)
- {
- auto res = mark_plus(fpgh->name, cluster, graph, graph_plan, prevent_default_features);
+ auto res = mark_plus(fpgh->name, cluster, graph, graph_plan, prevent_default_features);
- Checks::check_exit(VCPKG_LINE_INFO,
- res == MarkPlusResult::SUCCESS,
- "Error: Unable to locate feature %s in %s",
- fpgh->name,
- cluster.spec);
- }
+ Checks::check_exit(VCPKG_LINE_INFO,
+ res == MarkPlusResult::SUCCESS,
+ "Error: Internal error while installing feature %s in %s",
+ fpgh->name,
+ cluster.spec);
+ }
- auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features);
+ auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features);
- Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS);
- }
- else
- {
- Checks::exit_with_message(
- VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", cluster.spec);
- }
+ Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS);
return MarkPlusResult::SUCCESS;
}
@@ -643,7 +633,7 @@ namespace vcpkg::Dependencies
}
/// <summary>Figure out which actions are required to install features specifications in `specs`.</summary>
- /// <param name="map">Map of all source files in the current environment.</param>
+ /// <param name="map">Map of all source control files in the current environment.</param>
/// <param name="specs">Feature specifications to resolve dependencies for.</param>
/// <param name="status_db">Status of installed packages in the current environment.</param>
std::vector<AnyAction> create_feature_install_plan(const std::unordered_map<std::string, SourceControlFile>& map,
@@ -666,7 +656,11 @@ namespace vcpkg::Dependencies
auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan, prevent_default_features);
- Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ res == MarkPlusResult::SUCCESS,
+ "Error: `%s` is not a feature of package `%s`",
+ spec.feature(),
+ spec.name());
m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster});
}
diff --git a/toolsrc/src/vcpkg/tools.cpp b/toolsrc/src/vcpkg/tools.cpp
index e28291428..f4ee2d653 100644
--- a/toolsrc/src/vcpkg/tools.cpp
+++ b/toolsrc/src/vcpkg/tools.cpp
@@ -193,7 +193,6 @@ namespace vcpkg
System::println("Downloading %s...", tool_name);
System::println(" %s -> %s", tool_data.url, tool_data.download_path.string());
Downloads::download_file(fs, tool_data.url, tool_data.download_path, tool_data.sha512);
- System::println("Downloading %s... done.", tool_name);
}
else
{
@@ -204,7 +203,6 @@ namespace vcpkg
{
System::println("Extracting %s...", tool_name);
Archives::extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path);
- System::println("Extracting %s... done.", tool_name);
}
else
{