Skip to content

Commit

Permalink
Merge branch 'master' into port/cpuinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Apr 10, 2021
2 parents b76d735 + fe112d8 commit bcb6171
Show file tree
Hide file tree
Showing 283 changed files with 3,687 additions and 933 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This too
- [Manifest files - vcpkg.json](maintainers/manifest-files.md)
- [Control files](maintainers/control-files.md)
- [Portfile functions](maintainers/portfile-functions.md)
- [Common CMake definitions](maintainers/vcpkg_common_definitions.md)
- [Maintainer Guidelines](maintainers/maintainer-guide.md)

### [Vcpkg-Tool](https://github.com/microsoft/vcpkg-tool) Maintainer Help
Expand Down
4 changes: 4 additions & 0 deletions docs/maintainers/portfile-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@
### [vcpkg-cmake-config](ports/vcpkg-cmake-config.md)

- [vcpkg\_cmake\_config\_fixup](ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md)

### [vcpkg-pkgconfig-get-modules](ports/vcpkg-pkgconfig-get-modules.md)

- [x\_vcpkg\_pkgconfig\_get\_modules](ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md)
6 changes: 6 additions & 0 deletions docs/maintainers/ports/vcpkg-pkgconfig-get-modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# vcpkg-pkgconfig-get-modules

**Experimental: will change or be removed at any time**

`vcpkg-pkgconfig-get-modules` provides `x_vcpkg_pkgconfig_get_modules()`, a function which simplifies calling
`pkg-config` in portfiles in order to gather dependencies for exotic buildsystems.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# x_vcpkg_pkgconfig_get_modules

The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md).

Experimental
Retrieve required module information from pkgconfig modules

## Usage
```cmake
x_vcpkg_pkgconfig_get_modules(
PREFIX <prefix>
MODULES <pkgconfig_modules>...
[LIBS]
[LIBRARIES]
[LIBRARIES_DIRS]
[INCLUDE_DIRS]
)
```
## Parameters

### PREFIX
Used variable prefix to use

### MODULES
List of pkgconfig modules to retrieve information for.

### LIBS
Returns `"${PKGCONFIG}" --libs` in <prefix>_LIBS_(DEBUG|RELEASE)

### LIBRARIES
Returns `"${PKGCONFIG}" --libs-only-l` in <prefix>_LIBRARIES_(DEBUG|RELEASE)

### LIBRARIES_DIRS
Returns `"${PKGCONFIG}" --libs-only-L` in <prefix>_LIBRARIES_DIRS_(DEBUG|RELEASE)

### INCLUDE_DIRS
Returns `"${PKGCONFIG}" --cflags-only-I` in <prefix>_INCLUDE_DIRS_(DEBUG|RELEASE)

## Examples

* [qt5-base](https://github.com/microsoft/vcpkg/blob/master/ports/qt5-base/portfile.cmake)

## Source
[ports/vcpkg-pkgconfig-get-modules/x\_vcpkg\_pkgconfig\_get\_modules.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.cmake)
1 change: 1 addition & 0 deletions docs/regenerate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class CMakeDocumentation {
[String[]]$cmakeScriptsPorts = @(
'vcpkg-cmake'
'vcpkg-cmake-config'
'vcpkg-pkgconfig-get-modules'
)

[CMakeDocumentation[]]$tableOfContents = @()
Expand Down
8 changes: 4 additions & 4 deletions ports/behaviortree-cpp/001_port_fixes.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75dea11..4eea781 100644
index a390aed..658f994 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -229,7 +229,7 @@ if( ZMQ_FOUND )
@@ -233,7 +233,7 @@ if( ZMQ_FOUND )
endif()

if(MSVC)
- target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W4 /WX)
+ target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W4 /wd4702)
- target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W3 /WX)
+ target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W3 /wd4702)
else()
target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE
-Wall -Wextra -Werror=return-type)
11 changes: 5 additions & 6 deletions ports/behaviortree-cpp/002_fix_dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75dea11..23053ca 100644
index 658f994..a04cf27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ if(MSVC)
Expand All @@ -8,27 +8,26 @@ index 75dea11..23053ca 100644
#---- Include boost to add coroutines ----
-find_package(Boost COMPONENTS coroutine QUIET)
+find_package(Boost REQUIRED) # coroutine2 is header-only

if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
string(REPLACE "." "0" Boost_VERSION_NODOT ${Boost_VERSION})
@@ -45,18 +45,18 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON)
@@ -46,17 +46,18 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON)

#---- Find other packages ----
find_package(Threads)
-find_package(ZMQ)
+find_package(cppzmq)

list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES
list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
${Boost_LIBRARIES} )
)

-if( ZMQ_FOUND )
+if( ZMQ_FOUND OR ON )
message(STATUS "ZeroMQ found.")
add_definitions( -DZMQ_FOUND )
list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp)
- list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES ${ZMQ_LIBRARIES})
+ list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES cppzmq)
else()
message(WARNING "ZeroMQ NOT found. Skipping the build of [PublisherZMQ] and [bt_recorder].")
Expand Down
6 changes: 3 additions & 3 deletions ports/behaviortree-cpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/3.5.1.tar.gz"
FILENAME "BehaviorTree.CPP.3.5.1.tar.gz"
SHA512 66db43225e692fa0f9073e63bdff765c037440372478792a9b442103a8bed945f5c3ae1d66266b86cb41d0006404a8297708a799ec0c7286c2beec6f964a4ac6
URLS "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/3.5.6.tar.gz"
FILENAME "BehaviorTree.CPP.3.5.6.tar.gz"
SHA512 cd3b15eb7c5bab68239b697da166220b4df8dd7e6cf5e831f316d411e24be56c9ed74e54a3e3dd332164d740159eaf9ce62d005601fd65133809dab29430c9b7
)

vcpkg_extract_source_archive_ex(
Expand Down
3 changes: 1 addition & 2 deletions ports/behaviortree-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "behaviortree-cpp",
"version-string": "3.5.1",
"port-version": 2,
"version": "3.5.6",
"description": "Behavior Trees Library in C++.",
"homepage": "https://www.behaviortree.dev",
"supports": "!uwp & !osx",
Expand Down
31 changes: 31 additions & 0 deletions ports/bext-ut/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boost-ext/ut
REF v1.1.8
SHA512 0df2f8ce784dc69c3cca5554a8b2be7c1664dd66bf52e83f305db5fae84d416a851e9282e9a8cfe50fbcada85b17da00fb25c1228d9cca32226a18bae18acb83
HEAD_REF master
)

vcpkg_download_distfile(LICENSE_FILE
URLS https://www.boost.org/LICENSE_1_0.txt
FILENAME d6078467835dba893231.txt
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBOOST_UT_BUILD_BENCHMARKS=OFF
-DBOOST_UT_BUILD_EXAMPLES=OFF
-DBOOST_UT_BUILD_TESTS=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ut TARGET_PATH share/ut)

configure_file("${LICENSE_FILE}" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug
${CURRENT_PACKAGES_DIR}/lib
)
6 changes: 6 additions & 0 deletions ports/bext-ut/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "bext-ut",
"version": "1.1.8",
"description": "UT: C++20 μ(micro)/Unit Testing Framework",
"homepage": "https://boost-ext.github.io/ut/"
}
3 changes: 3 additions & 0 deletions ports/boost-regex/b2-options.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
if("icu" IN_LIST FEATURES)
set(B2_REQUIREMENTS "<library>/user-config//icuuc <library>/user-config//icudt <library>/user-config//icuin <define>BOOST_HAS_ICU=1")
if(APPLE)
list(APPEND B2_OPTIONS cxxstd=11)
endif()
endif()
2 changes: 1 addition & 1 deletion ports/boost-regex/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "boost-regex",
"version-string": "1.75.0",
"port-version": 1,
"port-version": 2,
"description": "Boost regex module",
"homepage": "https://github.com/boostorg/regex",
"dependencies": [
Expand Down
6 changes: 0 additions & 6 deletions ports/clamav/CONTROL

This file was deleted.

44 changes: 44 additions & 0 deletions ports/clamav/mspack.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/cmake/FindMSPack.cmake b/cmake/FindMSPack.cmake
index cad448f..4ce4f87 100644
--- a/cmake/FindMSPack.cmake
+++ b/cmake/FindMSPack.cmake
@@ -50,7 +50,7 @@ find_path(MSPack_INCLUDE_DIR
PATH_SUFFIXES mspack
)
find_library(MSPack_LIBRARY
- NAMES mspack
+ NAMES libmspack
PATHS ${PC_MSPack_LIBRARY_DIRS}
)

diff --git a/libclamav/CMakeLists.txt b/libclamav/CMakeLists.txt
index 136ea30..72db826 100644
--- a/libclamav/CMakeLists.txt
+++ b/libclamav/CMakeLists.txt
@@ -504,7 +504,7 @@ target_link_libraries( clamav_obj
yara
tomsfastmath
bytecode_runtime
- ClamAV::libmspack
+ ${MSPack_LIBRARIES}
ClamAV::libclamunrar_iface_iface
OpenSSL::SSL
OpenSSL::Crypto
@@ -547,7 +547,7 @@ if(ENABLE_SHARED_LIB)
yara
tomsfastmath
bytecode_runtime
- ClamAV::libmspack
+ ${MSPack_LIBRARIES}
ClamAV::libclamunrar_iface_iface
OpenSSL::SSL
OpenSSL::Crypto
@@ -588,7 +588,7 @@ if(ENABLE_STATIC_LIB)
yara
tomsfastmath
bytecode_runtime
- ClamAV::libmspack
+ ${MSPack_LIBRARIES}
ClamAV::libclamunrar_iface_iface
OpenSSL::SSL
OpenSSL::Crypto
2 changes: 2 additions & 0 deletions ports/clamav/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ vcpkg_from_github(
"build.patch"
"cmakefiles.patch"
"curl.patch"
"mspack.patch"
)

vcpkg_configure_cmake(
Expand All @@ -21,6 +22,7 @@ vcpkg_configure_cmake(
-DENABLE_DOCS=OFF
-DENABLE_SHARED_LIB=ON
-DENABLE_STATIC_LIB=OFF
-DENABLE_EXTERNAL_MSPACK=ON
)

vcpkg_install_cmake()
Expand Down
18 changes: 18 additions & 0 deletions ports/clamav/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "clamav",
"version-semver": "0.103.0",
"port-version": 1,
"description": "ClamAV is an open-source anti-virus toolkit.",
"homepage": "https://www.clamav.net",
"supports": "!uwp & !static",
"dependencies": [
"bzip2",
"json-c",
"libmspack",
"libxml2",
"openssl",
"pcre2",
"pthreads",
"zlib"
]
}
6 changes: 3 additions & 3 deletions ports/directxmesh/CONTROL
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Source: directxmesh
Version: jan2021b
Homepage: https://walbourn.github.io/directxmesh
Version: apr2021
Homepage: https://github.com/microsoft/DirectXMesh
Description: DirectXMesh geometry processing library
Build-Depends: directxmath(linux), directx-headers(linux)
Build-Depends: directxmath, directx-headers
Supports: windows|linux

Feature: dx12
Expand Down
28 changes: 15 additions & 13 deletions ports/directxmesh/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ vcpkg_fail_port_install(ON_TARGET "OSX")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXMesh
REF jan2021b
SHA512 dab353d5033c32cf5667b95820cf3048e4773fa3fed16d24b25a515fbf4b6f6792ab5955dc9bb790c911b4cae1af1166aa0fdc4f5a639b3f4c3c81a2451a9a40
REF apr2021
SHA512 9e125c1b00c03cb0ff2f5297567e3d5c885acf5c3309208b7f846543eb4114129733676fe6f77b9c33adeb2ad50504927fff9fe48b7fe3f2c042432d0737564c
HEAD_REF master
)

Expand Down Expand Up @@ -35,18 +35,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)

if((VCPKG_TARGET_IS_WINDOWS) AND (NOT VCPKG_TARGET_IS_UWP))
vcpkg_copy_tools(
TOOL_NAMES meshconvert
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
)

elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
vcpkg_download_distfile(
MESHCONVERT_EXE
URLS "https://github.com/Microsoft/DirectXMesh/releases/download/jan2021/meshconvert.exe"
FILENAME "meshconvert-jan2021.exe"
SHA512 7df51baa495859aab418d194fd885cf37945ec2927122c18718b3a1a7d7ceb08c6853d084d74bf2bf2bc9ace47a351fd6b8d03706507f4966111ec1cb83f43a2
URLS "https://github.com/Microsoft/DirectXMesh/releases/download/apr2021/meshconvert.exe"
FILENAME "meshconvert-apr2021.exe"
SHA512 0b2dd64f89d884734ad0c58690f50b84acbcd3ab61db79a5b2edf8effb9a756e38862cf599da9969cd30adc9a8f8fe6c8a3c0a3a4b4beef9be87dee8ad496871
)

file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxmesh/")
Expand All @@ -55,7 +49,15 @@ elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
${MESHCONVERT_EXE}
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxmesh/)

file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert-jan2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert.exe)
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert-apr2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert.exe)

elseif((VCPKG_TARGET_IS_WINDOWS) AND (NOT VCPKG_TARGET_IS_UWP))

vcpkg_copy_tools(
TOOL_NAMES meshconvert
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
)

endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
Expand Down
6 changes: 3 additions & 3 deletions ports/directxtex/CONTROL
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Source: directxtex
Version: jan2021b
Homepage: https://walbourn.github.io/directxtex
Version: apr2021
Homepage: https://github.com/microsoft/DirectXTex
Description: DirectXTex texture processing library
Build-Depends: directxmath(linux), directx-headers(linux)
Build-Depends: directxmath, directx-headers
Supports: windows|linux

Feature: dx12
Expand Down
8 changes: 4 additions & 4 deletions ports/directxtex/enable_openexr_support.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/DirectXTex/DirectXTexEXR.cpp b/DirectXTex/DirectXTexEXR.cpp
index c78f1d1..e073539 100644
diff --git a/DirectXTexEXR.cpp b/DirectXTexEXR.cpp
index 9ac601f..204bde2 100644
--- a/DirectXTex/DirectXTexEXR.cpp
+++ b/DirectXTex/DirectXTexEXR.cpp
@@ -8,7 +8,7 @@
Expand All @@ -11,10 +11,10 @@ index c78f1d1..e073539 100644

#include "DirectXTexEXR.h"

@@ -55,7 +55,7 @@ using namespace DirectX;
@@ -56,7 +56,7 @@ using namespace DirectX;
using PackedVector::XMHALF4;

// Comment out this anonymous namespace if you add the include of DirectXTexP.h above
// Comment out this first anonymous namespace if you add the include of DirectXTexP.h above
-#ifdef WIN32
+#if 0
namespace
Expand Down
Loading

0 comments on commit bcb6171

Please sign in to comment.