aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhoebe <20694052+PhoebeHui@users.noreply.github.com>2020-04-07 15:38:52 +0800
committerGitHub <noreply@github.com>2020-04-07 15:38:52 +0800
commitdeca92ce4eec3a3d6808cc11fbaa4456c9a600b0 (patch)
tree4b2417bbd7957b05664273c53b24925418dc8c84
parent7f2bb735dfcfa5ac580f9e825c687d017c476c17 (diff)
parent6c4e822611324de4af9c8bb0ef8094e4a9b30a6e (diff)
downloadvcpkg-deca92ce4eec3a3d6808cc11fbaa4456c9a600b0.tar.gz
vcpkg-deca92ce4eec3a3d6808cc11fbaa4456c9a600b0.zip
Merge branch 'master' into supported-version-change
-rw-r--r--.gitignore6
-rw-r--r--docs/maintainers/vcpkg_from_git.md2
-rw-r--r--docs/specifications/prefab.md124
-rw-r--r--ports/abseil/CONTROL4
-rw-r--r--ports/abseil/portfile.cmake2
-rw-r--r--ports/angle/CMakeLists.txt125
-rw-r--r--ports/angle/CONTROL2
-rw-r--r--ports/angle/portfile.cmake32
-rw-r--r--ports/blend2d/CONTROL3
-rw-r--r--ports/blend2d/portfile.cmake10
-rw-r--r--ports/cub/CONTROL2
-rw-r--r--ports/egl-registry/CONTROL2
-rw-r--r--ports/egl-registry/portfile.cmake4
-rw-r--r--ports/freerdp/CONTROL2
-rw-r--r--ports/freerdp/fix-include-path.patch26
-rw-r--r--ports/freerdp/portfile.cmake19
-rw-r--r--ports/fribidi/CONTROL8
-rw-r--r--ports/fribidi/portfile.cmake4
-rw-r--r--ports/function2/CONTROL2
-rw-r--r--ports/function2/portfile.cmake4
-rw-r--r--ports/glad/CONTROL2
-rw-r--r--ports/glad/encoding.patch13
-rw-r--r--ports/glad/portfile.cmake1
-rw-r--r--ports/googleapis/CONTROL2
-rw-r--r--ports/googleapis/portfile.cmake4
-rw-r--r--ports/hunspell/CMakeLists.txt2
-rw-r--r--ports/hunspell/CONTROL5
-rw-r--r--ports/hunspell/portfile.cmake22
-rw-r--r--ports/ixwebsocket/CONTROL2
-rw-r--r--ports/ixwebsocket/portfile.cmake4
-rw-r--r--ports/libepoxy/CONTROL2
-rw-r--r--ports/libepoxy/portfile.cmake6
-rw-r--r--ports/libffi/CMakeLists.txt8
-rw-r--r--ports/libffi/CONTROL5
-rw-r--r--ports/libffi/portfile.cmake12
-rw-r--r--ports/libwebsockets/CONTROL3
-rw-r--r--ports/libwebsockets/portfile.cmake15
-rw-r--r--ports/mpfr/CONTROL2
-rw-r--r--ports/mpfr/portfile.cmake7
-rw-r--r--ports/nana/CONTROL2
-rw-r--r--ports/nana/portfile.cmake9
-rw-r--r--ports/opengl-registry/CONTROL2
-rw-r--r--ports/opengl-registry/portfile.cmake11
-rw-r--r--ports/openvr/CONTROL3
-rw-r--r--ports/openvr/portfile.cmake60
-rw-r--r--ports/opus/CONTROL5
-rw-r--r--ports/opus/portfile.cmake11
-rw-r--r--ports/qt5-base/CONTROL2
-rw-r--r--ports/qt5-base/patches/Qt5GuiConfigExtras.patch13
-rw-r--r--ports/qt5-base/portfile.cmake9
-rw-r--r--ports/reproc/CONTROL2
-rw-r--r--ports/reproc/portfile.cmake8
-rw-r--r--ports/sciter/CONTROL10
-rw-r--r--ports/sciter/portfile.cmake10
-rw-r--r--ports/skyr-url/CONTROL5
-rw-r--r--ports/skyr-url/portfile.cmake27
-rw-r--r--ports/vulkan-hpp/CONTROL2
-rw-r--r--scripts/ci.baseline.txt18
-rw-r--r--scripts/cmake/vcpkg_configure_meson.cmake233
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake2
-rw-r--r--scripts/cmake/vcpkg_from_git.cmake9
-rw-r--r--scripts/vcpkgTools.xml12
-rw-r--r--toolsrc/include/vcpkg/export.prefab.h82
-rw-r--r--toolsrc/include/vcpkg/triplet.h5
-rw-r--r--toolsrc/include/vcpkg/vcpkgpaths.h2
-rw-r--r--toolsrc/src/vcpkg/base/system.process.cpp6
-rw-r--r--toolsrc/src/vcpkg/build.cpp2
-rw-r--r--toolsrc/src/vcpkg/export.cpp51
-rw-r--r--toolsrc/src/vcpkg/export.prefab.cpp695
-rw-r--r--toolsrc/src/vcpkg/triplet.cpp14
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj2
71 files changed, 1569 insertions, 255 deletions
diff --git a/.gitignore b/.gitignore
index 86fd538f6..eba62b6f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -304,6 +304,10 @@ __pycache__/
!triplets/community/x86-windows-static.cmake
!triplets/community/x86-windows-static-md.cmake
!triplets/community/x64-osx-dynamic.cmake
+!triplets/community/x64-android.cmake
+!triplets/community/x86-android.cmake
+!triplets/community/arm-android.cmake
+!triplets/community/arm64-android.cmake
!triplets/arm-uwp.cmake
!triplets/x64-uwp.cmake
!triplets/x64-windows.cmake
@@ -320,3 +324,5 @@ __pycache__/
# vcpkg - End
############################################################
archives
+.DS_Store
+prefab/ \ No newline at end of file
diff --git a/docs/maintainers/vcpkg_from_git.md b/docs/maintainers/vcpkg_from_git.md
index 4b9a26c62..2feed49aa 100644
--- a/docs/maintainers/vcpkg_from_git.md
+++ b/docs/maintainers/vcpkg_from_git.md
@@ -19,7 +19,7 @@ Specifies the out-variable that will contain the extracted location.
This should be set to `SOURCE_PATH` by convention.
### URL
-The url of the git repository. Must start with `https`.
+The url of the git repository.
### REF
The git sha of the commit to download.
diff --git a/docs/specifications/prefab.md b/docs/specifications/prefab.md
new file mode 100644
index 000000000..bb0479c4c
--- /dev/null
+++ b/docs/specifications/prefab.md
@@ -0,0 +1,124 @@
+## Exporting to Android Archives (AAR files)
+
+Vcpkg current supports exporting to android archive files([AAR files](https://developer.android.com/studio/projects/android-library)). Once the archive is created it can imported in Android Studio as a native dependent. The archive is automatically consumed using [android studio's prefab tool](https://github.com/google/prefab). For more information on Prefab checkout the following article ["Native Dependencies in Android Studio 4.0"](https://android-developers.googleblog.com/2020/02/native-dependencies-in-android-studio-40.html) and the documentation on how to use prefab on [https://google.github.io/prefab/](https://google.github.io/prefab).
+
+#### To support export to android the following tools should be available;
+
+- `maven <optional>`
+- `ndk <required>`
+- `7zip <required on windows>` or `zip <required on linux>`
+
+**Android triplets that support the following architectures arm64-v8a, armeabi-v7a, x86_64 x86 must be present**
+
+#### An example of a triplet configuration targeting android would be
+
+```cmake
+set(VCPKG_TARGET_ARCHITECTURE arm64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE dynamic)
+set(VCPKG_CMAKE_SYSTEM_NAME Android)
+```
+
+The following table outlines the mapping from vcpkg architectures to android architectures
+
+|vcpkg architecture | android architecture |
+|-------------------|----------------------|
+|arm64 | arm64-v8a |
+|arm | armeabi-v7a |
+|x64 | x86_64 |
+|x86 | x86 |
+
+**Please note the four architectures are required. If any is missing the export will fail**
+**To export the following environment `ANDROID_NDK_HOME` variable is required for exporting**
+
+#### Example exporting [jsoncpp]
+The `--prefab-maven` flag is option. Only call it when you have maven installed
+```
+./vcpkg export --triplet x64-android jsoncpp --prefab --prefab-maven
+```
+
+```
+The following packages are already built and will be exported:
+ jsoncpp:x86-android
+Exporting package jsoncpp...
+[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
+[INFO] Building Maven Stub Project (No POM) 1
+[INFO] --------------------------------[ pom ]---------------------------------
+[INFO]
+[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
+[INFO] Installing<root>/prefab/jsoncpp/jsoncpp-1.9.2.aar to /.m2/repository/com/vcpkg/ndk/support/jsoncpp/1.9.2/jsoncpp-1.9.2.aar
+[INFO] Installing <vcpkg_root>/prefab/jsoncpp/pom.xml to /.m2/repository/com/vcpkg/ndk/support/jsoncpp/1.9.2/jsoncpp-1.9.2.pom
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 0.301 s
+[INFO] Finished at: 2020-03-01T10:18:15Z
+[INFO] ------------------------------------------------------------------------
+In app/build.gradle
+
+ com.vcpkg.ndk.support:jsoncpp:1.9.2
+
+And cmake flags
+
+ externalNativeBuild {
+ cmake {
+ arguments '-DANDROID_STL=c++_shared'
+ cppFlags "-std=c++17"
+ }
+ }
+
+In gradle.properties
+
+ android.enablePrefab=true
+ android.enableParallelJsonGen=false
+ android.prefabVersion=${prefab.version}
+
+Successfuly exported jsoncpp. Checkout <vcpkg_root>/prefab/jsoncpp/aar
+```
+
+#### The output directory after export
+```
+prefab
+└── jsoncpp
+ ├── aar
+ │   ├── AndroidManifest.xml
+ │   ├── META-INF
+ │   │   └── LICENCE
+ │   └── prefab
+ │   ├── modules
+ │   │   └── jsoncpp
+ │   │   ├── include
+ │   │   │   └── json
+ │   │   │   ├── allocator.h
+ │   │   │   ├── assertions.h
+ │   │   │   ├── autolink.h
+ │   │   │   ├── config.h
+ │   │   │   ├── forwards.h
+ │   │   │   ├── json.h
+ │   │   │   ├── json_features.h
+ │   │   │   ├── reader.h
+ │   │   │   ├── value.h
+ │   │   │   ├── version.h
+ │   │   │   └── writer.h
+ │   │   ├── libs
+ │   │   │   ├── android.arm64-v8a
+ │   │   │   │   ├── abi.json
+ │   │   │   │   └── libjsoncpp.so
+ │   │   │   ├── android.armeabi-v7a
+ │   │   │   │   ├── abi.json
+ │   │   │   │   └── libjsoncpp.so
+ │   │   │   ├── android.x86
+ │   │   │   │   ├── abi.json
+ │   │   │   │   └── libjsoncpp.so
+ │   │   │   └── android.x86_64
+ │   │   │   ├── abi.json
+ │   │   │   └── libjsoncpp.so
+ │   │   └── module.json
+ │   └── prefab.json
+ ├── jsoncpp-1.9.2.aar
+ └── pom.xml
+
+13 directories, 25 files
+```
diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL
index 7e3f54a8b..bcde132e8 100644
--- a/ports/abseil/CONTROL
+++ b/ports/abseil/CONTROL
@@ -1,10 +1,10 @@
Source: abseil
-Version: 2020-03-03-1
+Version: 2020-03-03-2
Homepage: https://github.com/abseil/abseil-cpp
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.
Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole.
-Feature: c++17
+Feature: cxx17
Description: Enable compiler C++17.
diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake
index c569d766a..4c9196207 100644
--- a/ports/abseil/portfile.cmake
+++ b/ports/abseil/portfile.cmake
@@ -12,7 +12,7 @@ vcpkg_from_github(
)
set(CMAKE_CXX_STANDARD )
-if("c++17" IN_LIST FEATURES)
+if("cxx17" IN_LIST FEATURES)
set(CMAKE_CXX_STANDARD 17)
endif()
diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt
index e64b9aaa3..a9b8f07b9 100644
--- a/ports/angle/CMakeLists.txt
+++ b/ports/angle/CMakeLists.txt
@@ -44,8 +44,8 @@ add_definitions(
)
configure_file(commit.h include/id/commit.h COPYONLY)
-include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include)
-
+#include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include)
+include_directories("$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")
##########
# angle::common
if(WINDOWS_DESKTOP)
@@ -71,14 +71,14 @@ file(GLOB ANGLE_COMMON_SOURCES
"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)
+add_library(angle_common OBJECT ${ANGLE_COMMON_SOURCES})
+target_include_directories(angle_common PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/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})
+add_library(angle_image_util OBJECT ${ANGLE_IMAGE_UTIL_SOURCES})
target_link_libraries(angle_image_util PRIVATE angle::common)
add_library(angle::image_util ALIAS angle_image_util)
@@ -96,7 +96,7 @@ file(GLOB TRANSLATOR_SOURCES
"src/third_party/compiler/ArrayBoundsClamper.cpp"
)
list(FILTER TRANSLATOR_SOURCES EXCLUDE REGEX "_unittest")
-add_library(angle_translator STATIC ${TRANSLATOR_SOURCES})
+add_library(angle_translator OBJECT ${TRANSLATOR_SOURCES})
target_compile_definitions(angle_translator PUBLIC
-DANGLE_ENABLE_ESSL
-DANGLE_ENABLE_GLSL
@@ -111,7 +111,7 @@ file(GLOB PREPROCESSOR_SOURCES
"src/compiler/preprocessor/*.h"
"src/compiler/preprocessor/*.cpp"
)
-add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES})
+add_library(angle_preprocessor OBJECT ${PREPROCESSOR_SOURCES})
target_link_libraries(angle_preprocessor PRIVATE angle::common)
add_library(angle::preprocessor ALIAS angle_preprocessor)
@@ -151,7 +151,7 @@ if(WINDOWS_DESKTOP OR LINUX OR APPLE)
)
list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest")
add_library(angle_renderer_opengl INTERFACE)
- target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES})
+ target_sources(angle_renderer_opengl INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_GL_SOURCES}>")
target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL)
add_library(angle::renderer::opengl ALIAS angle_renderer_opengl)
endif()
@@ -171,7 +171,7 @@ if(WIN32)
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})
+ target_sources(angle_renderer_winrt INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_D3D_WINRT_SOURCES}>")
add_library(angle::renderer::winrt ALIAS angle_renderer_winrt)
endif()
@@ -181,7 +181,7 @@ if(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})
+ target_sources(angle_renderer_win32 INTERFACE "$<BUILD_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)
@@ -192,7 +192,7 @@ if(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_sources(angle_renderer_d3d INTERFACE "$<BUILD_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\" }"
@@ -207,7 +207,7 @@ file(GLOB ANGLE_GPU_INFO_UTIL_SOURCES
"src/gpu_info_util/SystemInfo_internal.h"
"src/gpu_info_util/SystemInfo.cpp"
)
-add_library(angle_gpu_info_util STATIC ${ANGLE_GPU_INFO_UTIL_SOURCES})
+add_library(angle_gpu_info_util OBJECT ${ANGLE_GPU_INFO_UTIL_SOURCES})
if(WIN32)
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp")
target_link_libraries(angle_gpu_info_util PRIVATE setupapi.lib dxgi.lib)
@@ -281,6 +281,9 @@ else()
endif()
if(LINUX)
+ find_package(X11)
+ include_directories(${X11_INCLUDE_DIR})
+ list(APPEND LIBANGLE_RENDERER_PLATFORM ${X11_LIBRARIES})
set(LIBANGLE_RENDERER_COMPILEDEF
-DANGLE_USE_X11
)
@@ -297,14 +300,24 @@ target_link_libraries(libANGLE PRIVATE
angle::preprocessor
${LIBANGLE_RENDERER_PLATFORM}
)
-target_include_directories(libANGLE PRIVATE "src/third_party/khronos")
+target_include_directories(libANGLE PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/khronos>")
target_compile_definitions(libANGLE
PRIVATE -DANGLE_ENABLE_NULL
PUBLIC
-DLIBANGLE_IMPLEMENTATION
- ${LIBANGLE_RENDERER_COMPILEDEF}
+ ${LIBANGLE_RENDERER_COMPILEDEF}
+ -DANGLE_EXPORT=
+ -DANGLE_UTIL_EXPORT=
+ -DEGLAPI=
+ -DGL_APICALL=
+ -DGL_API=
)
add_library(angle::libANGLE ALIAS libANGLE)
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(libANGLE
+ PRIVATE -DLIBANGLE_UTIL_IMPLEMENTATION
+ )
+endif()
##########
# libGLESv2
@@ -344,12 +357,28 @@ target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE)
target_compile_definitions(libGLESv2
PRIVATE -DLIBGLESV2_IMPLEMENTATION
PUBLIC
- -DGL_GLEXT_PROTOTYPES
- -DGL_API=
- -DGL_APICALL=
- -DEGLAPI=
- -DGL_API=
+ "-DGL_GLES_PROTOTYPES=1"
+ "-DGL_GLEXT_PROTOTYPES"
+ "-DEGL_EGL_PROTOTYPES=1"
+ "-DEGL_EGLEXT_PROTOTYPES"
)
+if(BUILD_SHARED_LIBS)
+else()
+ if(WIN32)
+ target_compile_definitions(libGLESv2 PRIVATE
+ "-DGL_API="
+ "-DGL_APICALL="
+ "-DEGLAPI="
+ )
+ else()
+ target_compile_definitions(libGLESv2 PRIVATE
+ "-DGL_API=__attribute__((visibility(\"default\")))"
+ "-DGL_APICALL=__attribute__((visibility(\"default\")))"
+ "-DEGLAPI=__attribute__((visibility(\"default\")))"
+ )
+ endif()
+endif()
+
target_include_directories(libGLESv2 PUBLIC "$<INSTALL_INTERFACE:include>")
##########
@@ -361,20 +390,72 @@ add_library(libEGL
"src/libEGL/resource.h"
)
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>")
+target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
+target_compile_definitions(libEGL
+ PRIVATE -DLIBGLESV2_IMPLEMENTATION
+ PUBLIC
+ "-DGL_GLES_PROTOTYPES=1"
+ "-DGL_GLEXT_PROTOTYPES"
+ "-DEGL_EGL_PROTOTYPES=1"
+ "-DEGL_EGLEXT_PROTOTYPES"
+)
+add_library(GL_VISIBILITY INTERFACE)
+if(WIN32)
+ target_compile_definitions(GL_VISIBILITY INTERFACE
+ "-DGL_API="
+ "-DGL_APICALL=")
+else()
+ target_compile_definitions(GL_VISIBILITY INTERFACE
+ "-DGL_API=__attribute__((visibility(\"default\")))"
+ "-DGL_APICALL=__attribute__((visibility(\"default\")))")
+endif()
+target_link_libraries(libEGL PRIVATE GL_VISIBILITY)
+target_link_libraries(libGLESv2 PRIVATE GL_VISIBILITY)
+
+if(WIN32)
+ target_compile_definitions(libEGL PRIVATE
+ "-DEGLAPI="
+ )
+else()
+ target_compile_definitions(libEGL PRIVATE
+ "-DEGLAPI=__attribute__((visibility(\"default\")))"
+ )
+endif()
+if(NOT BUILD_SHARED_LIBS)
+ add_definitions("-DANGLE_EXPORT=" "-DANGLE_UTIL_EXPORT=" "-DEGLAPI=" "-DGL_APICALL=" "-DGL_API=")
+endif()
SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(libGLESv2 PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(libEGL PROPERTIES PREFIX "")
-install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport
+install(TARGETS libEGL libGLESv2 libANGLE angle_common angle_image_util angle_gpu_info_util angle_translator angle_preprocessor GL_VISIBILITY EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
+if(WINDOWS_DESKTOP)
+ install(TARGETS angle_renderer_d3d angle_renderer_win32 angle_renderer_opengl EXPORT ANGLEExport
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+elseif(WINDOWS_STORE)
+ install(TARGETS angle_renderer_d3d angle_renderer_winrt EXPORT ANGLEExport
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+else()
+ install(TARGETS angle_renderer_opengl EXPORT ANGLEExport
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+endif()
+
install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle)
if(NOT DISABLE_INSTALL_HEADERS)
diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL
index 0fb81989d..4229c6f07 100644
--- a/ports/angle/CONTROL
+++ b/ports/angle/CONTROL
@@ -3,4 +3,4 @@ Version: 2019-12-31-2
Homepage: https://github.com/google/angle
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
+Build-Depends: egl-registry, opengl-registry
diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake
index 9a28591ad..08d70f608 100644
--- a/ports/angle/portfile.cmake
+++ b/ports/angle/portfile.cmake
@@ -1,5 +1,3 @@
-vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
-
if (VCPKG_TARGET_IS_LINUX)
message(WARNING "Building with a gcc version less than 6.1 is not supported.")
message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-dev\n libmesa-dev\n libxi-dev\n libxext-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libmesa-dev libxi-dev libxext-dev.")
@@ -22,6 +20,7 @@ vcpkg_from_github(
REPO google/angle
REF 1fdf6ca5141d8e349e875eab6e51d93d929a7f0e
SHA512 2553307f3d10b5c32166b9ed610b4b15310dccba00c644cd35026de86d87ea2e221c2e528f33b02f01c1ded2f08150e429de1fa300b73d655f8944f6f5047a82
+ # On update check headers against opengl-registry
PATCHES
001-fix-uwp.patch
002-fix-builder-error.patch
@@ -45,3 +44,32 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/u
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+
+# File conflict with opengl-registry! Make sure headers are similar on Update!
+# angle defines some additional entrypoints.
+# opengl-registry probably needs an upstream update to account for those
+# Due to that all angle headers get moved to include/angle.
+# If you want to use those instead of the onces provided by opengl-registry make sure
+# VCPKG_INSTALLED_DIR/include/angle is before VCPKG_INSTALLED_DIR/include
+file(GLOB_RECURSE angle_includes "${CURRENT_PACKAGES_DIR}/include")
+file(COPY ${angle_includes} DESTINATION "${CURRENT_PACKAGES_DIR}/include/angle")
+
+set(_double_files
+ include/GLES/egl.h
+ include/GLES/gl.h
+ include/GLES/glext.h
+ include/GLES/glplatform.h
+ include/GLES2/gl2.h
+ include/GLES2/gl2ext.h
+ include/GLES2/gl2platform.h
+ include/GLES3/gl3.h
+ include/GLES3/gl31.h
+ include/GLES3/gl32.h
+ include/GLES3/gl3platform.h)
+foreach(_file ${_double_files})
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}")
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}")
+ endif()
+endforeach()
+
+
diff --git a/ports/blend2d/CONTROL b/ports/blend2d/CONTROL
index a0a1f6cc7..999ab5061 100644
--- a/ports/blend2d/CONTROL
+++ b/ports/blend2d/CONTROL
@@ -1,7 +1,8 @@
Source: blend2d
-Version: beta_2019-12-27
+Version: beta_2020-03-29
Description: Beta 2D Vector Graphics Powered by a JIT Compiler
Default-Features: jit, logging
+Supports: !(arm|uwp)
Feature: jit
Description: Default feature. Enables jit pipeline compilation. Not supported for ARM and UWP.
diff --git a/ports/blend2d/portfile.cmake b/ports/blend2d/portfile.cmake
index aadc1e95b..ddf330a41 100644
--- a/ports/blend2d/portfile.cmake
+++ b/ports/blend2d/portfile.cmake
@@ -1,10 +1,10 @@
-include(vcpkg_common_functions)
+vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO blend2d/blend2d
- REF bddae39a210aa48c839901584eec647c8ae1b967
- SHA512 4d80571f5ec8f05753497af396046a75059002a1b7593cee80724a8b3c2495e566e88935bcc02c7380480a20b84ce44c228b1d6ca9c06e24af6564c2e40bc143
+ REF 95ab468e39e964f240b847bce0bcb585a260da4c
+ SHA512 b90cc290673f51560e5085b8db47c5424d092fcd767ad4633b6d37e762d0f1d62fd683b9003269697086ad4aa78672a5682f68c3fd4a478c03f6d5710df66e2f
HEAD_REF master
)
@@ -21,8 +21,8 @@ if(NOT BLEND2D_BUILD_NO_JIT)
vcpkg_from_github(
OUT_SOURCE_PATH ASMJIT_SOURCE_PATH
REPO asmjit/asmjit
- REF baa79895c81b47a9d39abec904204dc0d9e0e6bb
- SHA512 ec79736d22795de0135598e6649089df5f1594100ff6b6595ed2b83707808ba76d69cf807ecf5e4b9f17ebf7c00e4c7155105e600d56932cb209b77ee9b4fd96
+ REF 1491d5f2ea0b6b398a63f250e7456a032866320f
+ SHA512 1aba49a5b44737d9393cc6576ef79330a2282139a1d3c279851d79e76949cc4bc6b7160c584910e17199f7610fcd29d56362baffce367a84b5432f528782359c
HEAD_REF master
)
diff --git a/ports/cub/CONTROL b/ports/cub/CONTROL
index 7c62c25a2..eb708a84a 100644
--- a/ports/cub/CONTROL
+++ b/ports/cub/CONTROL
@@ -1,4 +1,4 @@
Source: cub
-Version: 1.8.0
+Version: 1.8.0-1
Description: CUB is a flexible library of cooperative threadblock primitives and other utilities for CUDA kernel programming
Build-Depends: cuda
diff --git a/ports/egl-registry/CONTROL b/ports/egl-registry/CONTROL
index 64b4745a4..dad0d9d20 100644
--- a/ports/egl-registry/CONTROL
+++ b/ports/egl-registry/CONTROL
@@ -1,3 +1,3 @@
Source: egl-registry
-Version: 2019-08-08
+Version: 2020-02-03
Description: the EGL API and Extension Registry
diff --git a/ports/egl-registry/portfile.cmake b/ports/egl-registry/portfile.cmake
index 9c7265d6b..68f6a2ee8 100644
--- a/ports/egl-registry/portfile.cmake
+++ b/ports/egl-registry/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/EGL-Registry
- REF 598f20e3b7b7eec3e8d8a83e64b9592a21c55bb6
- SHA512 360aa2399fec12ad23c5e4bce7e9287a9b1b1d98ba6c326dde2b1bc1c32735bc6933ca8e5c626ba421cda5aac216bc7c268e064cf0dd67605a23151e29ba1f36
+ REF aa9b63f3ab18aee92c95786a2478156430f809e4
+ SHA512 5ee7143c2cb46defbe1b2ecb0fabfb52fac2d9529b98c638dd4c04a312a62e7f7b3aee27d9749c92174ab967d533136b5881ce37ae9f2bee6685f52ffa8c8db6
HEAD_REF master
)
diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL
index 56e9b310a..86dd627a0 100644
--- a/ports/freerdp/CONTROL
+++ b/ports/freerdp/CONTROL
@@ -1,5 +1,5 @@
Source: freerdp
-Version: 2.0.0-rc4-6
+Version: 2.0.0-rc4-7
Homepage: https://github.com/FreeRDP/FreeRDP
Description: A free implementation of the Remote Desktop Protocol (RDP)
Build-Depends: openssl, glib (!windows)
diff --git a/ports/freerdp/fix-include-path.patch b/ports/freerdp/fix-include-path.patch
new file mode 100644
index 000000000..e9efc3bd3
--- /dev/null
+++ b/ports/freerdp/fix-include-path.patch
@@ -0,0 +1,26 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 019926901..91973c888 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -103,7 +103,7 @@ else()
+ endif()
+ message("FREERDP_VERSION=${FREERDP_VERSION_FULL}")
+
+-set(FREERDP_INCLUDE_DIR "include/freerdp${FREERDP_VERSION_MAJOR}/")
++set(FREERDP_INCLUDE_DIR "include/freerdp/")
+
+ # Compatibility options
+ if(DEFINED STATIC_CHANNELS)
+diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt
+index 2da25a426..b06f718e9 100644
+--- a/winpr/CMakeLists.txt
++++ b/winpr/CMakeLists.txt
+@@ -193,7 +193,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10")
+
+ SetFreeRDPCMakeInstallDir(WINPR_CMAKE_INSTALL_DIR "WinPR${WINPR_VERSION_MAJOR}")
+
+- set(WINPR_INCLUDE_DIR "include/winpr${WINPR_VERSION_MAJOR}")
++ set(WINPR_INCLUDE_DIR "include/winpr")
+
+ configure_package_config_file(WinPRConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/WinPRConfig.cmake
+ INSTALL_DESTINATION ${WINPR_CMAKE_INSTALL_DIR}
diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake
index b424441ba..0d15187c9 100644
--- a/ports/freerdp/portfile.cmake
+++ b/ports/freerdp/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
fix-linux-build.patch
openssl_threads.patch
fix-include-install-path.patch
+ fix-include-path.patch
)
if (NOT VCPKG_TARGET_IS_WINDOWS)
@@ -60,7 +61,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
else()
file(GLOB_RECURSE FREERDP_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*")
foreach(FREERDP_TOOL ${FREERDP_TOOLS})
- file(COPY ${FREERDP_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
+ file(COPY ${FREERDP_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(REMOVE ${FREERDP_TOOL})
endforeach()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
@@ -93,6 +94,22 @@ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cm
"lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
"bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
)
+vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP/FreeRDPTargets-debug.cmake
+ "debug/lib/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
+ "debug/bin/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
+)
+vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP/FreeRDPTargets-release.cmake
+ "lib/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
+ "bin/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
+)
+vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-ClientTargets-debug.cmake
+ "debug/lib/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
+ "debug/bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
+)
+vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-ClientTargets-release.cmake
+ "lib/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
+ "bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
+)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
diff --git a/ports/fribidi/CONTROL b/ports/fribidi/CONTROL
index 5c769a481..52d351727 100644
--- a/ports/fribidi/CONTROL
+++ b/ports/fribidi/CONTROL
@@ -1,4 +1,4 @@
-Source: fribidi
-Version: 1.0.9
-Description: GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi)
-Build-Depends: tool-meson
+Source: fribidi
+Version: 1.0.9
+Description: GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi)
+Build-Depends: tool-meson
diff --git a/ports/fribidi/portfile.cmake b/ports/fribidi/portfile.cmake
index a80909cf9..6c0c98ef2 100644
--- a/ports/fribidi/portfile.cmake
+++ b/ports/fribidi/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fribidi/fribidi
@@ -32,4 +30,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fribidi RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/function2/CONTROL b/ports/function2/CONTROL
index 9604e8084..e230af308 100644
--- a/ports/function2/CONTROL
+++ b/ports/function2/CONTROL
@@ -1,4 +1,4 @@
Source: function2
-Version: 4.0.0
+Version: 4.1.0
Homepage: https://github.com/Naios/function2
Description: Improved drop-in replacement to std::function
diff --git a/ports/function2/portfile.cmake b/ports/function2/portfile.cmake
index b57c722f8..54d313ad1 100644
--- a/ports/function2/portfile.cmake
+++ b/ports/function2/portfile.cmake
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Naios/function2
- REF d2acdb6c3c7612a6133cd03464ef941161258f4e
- SHA512 298f39db3c4e7a599e41fef71d1f953f3c5e20bc9f4af378c67bd47c10b126efd7be80be4ad919370a1151c8c5bc111ccd9054757a1aaf1ccf3f87ca958a7e3a
+ REF 3a0746bf5f601dfed05330aefcb6854354fce07d # 4.1.0
+ SHA512 48dd8fb1ce47df0835c03edf78ae427beebfeeaaabf6b993eb02843f72cce796ba5d1042f505990f29debd42bc834e531335484d45ca33e841657e9ff9e5034f
HEAD_REF master
PATCHES
disable-testing.patch
diff --git a/ports/glad/CONTROL b/ports/glad/CONTROL
index dc556e13d..a0d234f36 100644
--- a/ports/glad/CONTROL
+++ b/ports/glad/CONTROL
@@ -1,5 +1,5 @@
Source: glad
-Version: 0.1.33
+Version: 0.1.33-1
Description: Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
Build-Depends: egl-registry, opengl-registry
Homepage: https://github.com/Dav1dde/glad
diff --git a/ports/glad/encoding.patch b/ports/glad/encoding.patch
new file mode 100644
index 000000000..0497cc79a
--- /dev/null
+++ b/ports/glad/encoding.patch
@@ -0,0 +1,13 @@
+diff --git a/glad/__main__.py b/glad/__main__.py
+index e7c0544a5..1e10dcc60 100644
+--- a/glad/__main__.py
++++ b/glad/__main__.py
+@@ -32,7 +32,7 @@ def main():
+ if reproducible:
+ logger.info('reproducible build, using packaged specification: \'%s.xml\'', value)
+ try:
+- return spec_cls.from_file(glad.files.open_local(value + '.xml'))
++ return spec_cls.from_file(glad.files.open_local(value + '.xml', encoding='utf-8-sig'))
+ except IOError:
+ raise ValueError('unable to open reproducible copy of {}.xml, '
+ 'try dropping --reproducible'.format(value))
diff --git a/ports/glad/portfile.cmake b/ports/glad/portfile.cmake
index 9f08fe660..1c14ca77f 100644
--- a/ports/glad/portfile.cmake
+++ b/ports/glad/portfile.cmake
@@ -6,6 +6,7 @@ vcpkg_from_github(
REF de6c39e3040c987323b8ed078c36442f4fb681b3
SHA512 a24523186d59de5c0895791c639c62573eaacf1d3843d3bf81eba848b4a33a9a8d17f9b6f791202dac77692bf147e25b3650989731d5ddb7a22e7d023b66885e
HEAD_REF master
+ PATCHES encoding.patch
)
vcpkg_find_acquire_program(PYTHON3)
diff --git a/ports/googleapis/CONTROL b/ports/googleapis/CONTROL
index 4be6ae9a2..12617fc36 100644
--- a/ports/googleapis/CONTROL
+++ b/ports/googleapis/CONTROL
@@ -1,5 +1,5 @@
Source: googleapis
-Version: 0.6.0
+Version: 0.7.0
Build-Depends: grpc, protobuf
Description: C++ Proto Libraries for Google APIs.
Homepage: https://github.com/googleapis/cpp-cmakefiles
diff --git a/ports/googleapis/portfile.cmake b/ports/googleapis/portfile.cmake
index 1ed5c3211..55eab05b9 100644
--- a/ports/googleapis/portfile.cmake
+++ b/ports/googleapis/portfile.cmake
@@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO googleapis/cpp-cmakefiles
- REF v0.6.0
- SHA512 93f3b061ad9e20b31d597f48b476c1fdef09e822e556e9253318f0d387b2d6c143920658844690c7ea710be7b157e7a1473e1e2f0fdd3bf0e3e6fcb6b69a9e9d
+ REF v0.7.0
+ SHA512 45a9c8934c82a3e8c5c91e24c9879cbe9d928f5276b1e20d1fa51fde6a7e6711212ac7d298b4f07942e3538e2b99e8101906f509697c9aad26b8fba09c292a13
HEAD_REF master
)
diff --git a/ports/hunspell/CMakeLists.txt b/ports/hunspell/CMakeLists.txt
index 7794d36cf..810c894f7 100644
--- a/ports/hunspell/CMakeLists.txt
+++ b/ports/hunspell/CMakeLists.txt
@@ -98,7 +98,7 @@ set(TESTPARSER_SRCS
src/parsers/odfparser.cxx
)
-if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_BUILD_TYPE STREQUAL "Release")
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_TOOLS)
add_executable(testparser ${TESTPARSER_SRCS})
target_link_libraries(testparser libhunspell)
diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL
index d907a5536..967cc32c5 100644
--- a/ports/hunspell/CONTROL
+++ b/ports/hunspell/CONTROL
@@ -1,4 +1,7 @@
Source: hunspell
-Version: 1.7.0
+Version: 1.7.0-1
Homepage: https://github.com/hunspell/hunspell
Description: The most popular spellchecking library.
+
+Feature: tools
+Description: Build hunspell tools
diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake
index 67a4ff09e..a1acdfb97 100644
--- a/ports/hunspell/portfile.cmake
+++ b/ports/hunspell/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO hunspell/hunspell
@@ -12,9 +10,18 @@ vcpkg_from_github(
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH})
+if ("tools" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS)
+ message(FATAL_ERROR "Feature tools is only supported on Windows platforms.")
+endif()
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ tools BUILD_TOOLS
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
+ OPTIONS ${FEATURE_OPTIONS}
)
vcpkg_install_cmake()
@@ -24,11 +31,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright)
-
-file(COPY ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.LESSER ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-lgpl)
-
-file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.MPL ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-mpl)
+file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright-lgpl)
+file(INSTALL ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright-mpl)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/ixwebsocket/CONTROL b/ports/ixwebsocket/CONTROL
index db9c2adc9..4acae5c3f 100644
--- a/ports/ixwebsocket/CONTROL
+++ b/ports/ixwebsocket/CONTROL
@@ -1,5 +1,5 @@
Source: ixwebsocket
-Version: 8.0.5
+Version: 9.1.9
Build-Depends: zlib
Homepage: https://github.com/machinezone/IXWebSocket
Description: Lightweight WebSocket Client and Server + HTTP Client and Server
diff --git a/ports/ixwebsocket/portfile.cmake b/ports/ixwebsocket/portfile.cmake
index de082aece..68e523a05 100644
--- a/ports/ixwebsocket/portfile.cmake
+++ b/ports/ixwebsocket/portfile.cmake
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO machinezone/IXWebSocket
- REF v8.0.5
- SHA512 9dcc20d9a0629b92c62a68a8bd7c8206f18dbd9e93289b0b687ec13c478ce9ad1f3563b38c399c8277b0d3812cc78ca725786ba1dedbc3445b9bdb9b689e8add
+ REF v9.1.9
+ SHA512 f1fd731b5f6a9ce6d6d10bee22a5d9d9baaa8ea0564d6c4cd7eb91dcb88a45c49b2c7fdb75f8640a3589c1b30cee33ef5df8dcbb55920d013394d1e33ddd3c8e
)
vcpkg_configure_cmake(
diff --git a/ports/libepoxy/CONTROL b/ports/libepoxy/CONTROL
index f19def943..2ff219a8f 100644
--- a/ports/libepoxy/CONTROL
+++ b/ports/libepoxy/CONTROL
@@ -1,5 +1,5 @@
Source: libepoxy
-Version: 1.5.3-2
+Version: 1.5.3-3
Homepage: https://github.com/anholt/libepoxy
Description: Epoxy is a library for handling OpenGL function pointer management for you
Build-Depends: tool-meson
diff --git a/ports/libepoxy/portfile.cmake b/ports/libepoxy/portfile.cmake
index 50f3fa55f..e578dd659 100644
--- a/ports/libepoxy/portfile.cmake
+++ b/ports/libepoxy/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
@@ -72,5 +70,5 @@ endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig)
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libepoxy)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/libepoxy/COPYING ${CURRENT_PACKAGES_DIR}/share/libepoxy/copyright)
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
diff --git a/ports/libffi/CMakeLists.txt b/ports/libffi/CMakeLists.txt
index cbaa70b05..b8b70db5d 100644
--- a/ports/libffi/CMakeLists.txt
+++ b/ports/libffi/CMakeLists.txt
@@ -21,13 +21,13 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM")
set(TARGET ARM)
elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(TARGET X86_FREEBSD)
-elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM")
+elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(TARGET ARM_WIN32)
-elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
+elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(TARGET ARM_WIN64)
-elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(TARGET X86_WIN32)
-elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(TARGET X86_WIN64)
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(TARGET X86_DARWIN)
diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL
index 50b50a7c9..70e108a73 100644
--- a/ports/libffi/CONTROL
+++ b/ports/libffi/CONTROL
@@ -1,5 +1,4 @@
Source: libffi
-Version: 3.3
+Version: 3.3-1
Homepage: https://github.com/libffi/libffi
-Description: Portable, high level programming interface to various calling conventions
-Supports: !arm \ No newline at end of file
+Description: Portable, high level programming interface to various calling conventions \ No newline at end of file
diff --git a/ports/libffi/portfile.cmake b/ports/libffi/portfile.cmake
index b6549022c..7209ce8d6 100644
--- a/ports/libffi/portfile.cmake
+++ b/ports/libffi/portfile.cmake
@@ -23,13 +23,13 @@ vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
-file(READ ${CURRENT_PACKAGES_DIR}/include/ffi.h FFI_H)
-string(REPLACE " *know* they are going to link with the static library. */"
-" *know* they are going to link with the static library. */
+ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ffi.h
+ " *know* they are going to link with the static library. */"
+ " *know* they are going to link with the static library. */
#define FFI_BUILDING
-" FFI_H "${FFI_H}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/include/ffi.h "${FFI_H}")
+"
+ )
endif()
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file
diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL
index 77536b9f8..6cb5eda15 100644
--- a/ports/libwebsockets/CONTROL
+++ b/ports/libwebsockets/CONTROL
@@ -1,5 +1,6 @@
Source: libwebsockets
-Version: 3.2.2-1
+Version: 4.0.1
Build-Depends: zlib, openssl, libuv
Homepage: https://github.com/warmcat/libwebsockets
Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server.
+Supports: !(arm|uwp) \ No newline at end of file
diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake
index a05ce4b16..1b3df24d6 100644
--- a/ports/libwebsockets/portfile.cmake
+++ b/ports/libwebsockets/portfile.cmake
@@ -1,8 +1,10 @@
+vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO warmcat/libwebsockets
- REF v3.2.2
- SHA512 be6cd57ae1d15de059c277ce56e9ccc87f7918811b40a427c96978397f2b1d446e1b5ed6ae62a6aa82c6d775871d6a15885d283d74d7887e98205ab61d206fc0
+ REF 6eb39388f43f6e2a27f0efcbf8cb2391e38824e9 # v4.0.1
+ SHA512 2317ab66cd642280dc5cc7c47b8efa562731cc5b4a4eda83f34b6a7b60f02df6444a818c36e84f5cf118c79d6d62a9aa2e486d18f434199abd9812e7b88941e4
HEAD_REF master
PATCHES
CMakeLists.patch
@@ -134,10 +136,10 @@ vcpkg_configure_cmake(
OPTIONS
-DLWS_WITH_STATIC=${LWS_WITH_STATIC}
-DLWS_WITH_SHARED=${LWS_WITH_SHARED}
- -DLWS_USE_BUNDLED_ZLIB=OFF
+ -DLWS_WITH_BUNDLED_ZLIB=OFF
-DLWS_WITHOUT_TESTAPPS=ON
-DLWS_IPV6=ON
- -DLWS_HTTP2=ON
+ -DLWS_WITH_HTTP2=ON
-DLWS_WITH_HTTP_STREAM_COMPRESSION=ON # Since zlib is already a dependency
-DLWS_WITH_LIBUV=ON
# OPTIONS_RELEASE -DOPTIMIZE=1
@@ -164,10 +166,9 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debu
file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake LIBWEBSOCKETSTARGETSRELEASE_CMAKE)
string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSRELEASE_CMAKE "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}")
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebsockets)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/copyright)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ if (VCPKG_TARGET_IS_WINDOWS)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/websockets.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/lib/websockets.lib)
endif()
diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL
index 7d2ec7643..050de1d05 100644
--- a/ports/mpfr/CONTROL
+++ b/ports/mpfr/CONTROL
@@ -1,5 +1,5 @@
Source: mpfr
-Version: 4.0.2-1
+Version: 4.0.2-2
Homepage: https://www.mpfr.org
Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding
Build-Depends: mpir
diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake
index 5837976dd..2e202a578 100644
--- a/ports/mpfr/portfile.cmake
+++ b/ports/mpfr/portfile.cmake
@@ -1,7 +1,5 @@
-include(vcpkg_common_functions)
-
vcpkg_download_distfile(ARCHIVE
- URLS "http://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.xz"
+ URLS "http://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.xz" "https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz"
FILENAME "mpfr-4.0.2.tar.xz"
SHA512 d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88
)
@@ -24,5 +22,4 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpfr)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/mpfr/COPYING ${CURRENT_PACKAGES_DIR}/share/mpfr/copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL
index a3d5736c3..551051140 100644
--- a/ports/nana/CONTROL
+++ b/ports/nana/CONTROL
@@ -1,5 +1,5 @@
Source: nana
-Version: 1.7.2
+Version: 1.7.2-1
Homepage: https://github.com/cnjinhao/nana
Description: Cross-platform library for GUI programming in modern C++ style.
Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows)
diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake
index af85e02d9..d038242e1 100644
--- a/ports/nana/portfile.cmake
+++ b/ports/nana/portfile.cmake
@@ -1,9 +1,7 @@
-include(vcpkg_common_functions)
-
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
-if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- message(WARNING "You will need to install Xorg dependencies to use nana:\napt install libx11-dev libxft-dev\n")
+if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_TARGET_IS_UWP)
+ message(WARNING "You will need to install Xorg dependencies to use nana:\napt install libx11-dev libxft-dev libxcursor-dev\n")
endif()
vcpkg_from_github(
@@ -34,5 +32,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-nana TARGET_PATH share/un
vcpkg_copy_pdbs()
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nana)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/nana/LICENSE ${CURRENT_PACKAGES_DIR}/share/nana/copyright)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/opengl-registry/CONTROL b/ports/opengl-registry/CONTROL
index 3ff6c6e69..940158bed 100644
--- a/ports/opengl-registry/CONTROL
+++ b/ports/opengl-registry/CONTROL
@@ -1,4 +1,4 @@
Source: opengl-registry
-Version: 2019-08-22
+Version: 2020-02-03
Build-Depends: egl-registry
Description: the API and Extension registries for the OpenGL family APIs
diff --git a/ports/opengl-registry/portfile.cmake b/ports/opengl-registry/portfile.cmake
index 406ca1c3f..a9e3be246 100644
--- a/ports/opengl-registry/portfile.cmake
+++ b/ports/opengl-registry/portfile.cmake
@@ -1,14 +1,17 @@
-include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/OpenGL-Registry
- REF 3c9ab309994c2baeb5572aa0befd5f405166a275
- SHA512 f53018fe6dfb926dd6c1ce64ffde19b650a9071a1f6fa0c7a1596237e4ff84c3ff0092fb80811c4fea9b533c4b8607ed51f328d683d8f4aac18f0616f58b56a4
+ REF 2223f5bebde4aa6b170fb32cdaaf580703fddb67
+ SHA512 4e9b570f242942bd45a6601a6b0fcf1dc265c6ba03acaf782a639e7399842dd7350c2d4876236df80a070b2bd9ce7cee88cf2d85f2c50cfba7878d1f9379bbe9
HEAD_REF master
)
file(COPY ${SOURCE_PATH}/api/GL DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${SOURCE_PATH}/api/GLES DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${SOURCE_PATH}/api/GLES2 DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${SOURCE_PATH}/api/GLES3 DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${SOURCE_PATH}/api/GLSC DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${SOURCE_PATH}/api/GLSC2 DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY
${SOURCE_PATH}/xml/gl.xml
${SOURCE_PATH}/xml/glx.xml
diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL
index 545e0f341..ada8687b5 100644
--- a/ports/openvr/CONTROL
+++ b/ports/openvr/CONTROL
@@ -1,4 +1,5 @@
Source: openvr
-Version: 1.9.16
+Version: 1.10.30
Homepage: https://github.com/ValveSoftware/openvr
Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting.
+Supports: !(arm|uwp|osx|android) \ No newline at end of file
diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake
index e021d8eb2..0fb02dde1 100644
--- a/ports/openvr/portfile.cmake
+++ b/ports/openvr/portfile.cmake
@@ -1,47 +1,41 @@
-include(vcpkg_common_functions)
+vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "osx")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ValveSoftware/openvr
- REF 39205f6b281a6131d1373d0217c1ab9ed19735ea # v1.9.16
- SHA512 f609a25aaae42e23d8c1b89e9f7d7f5e0e18e52cd3b3125044fdfa348c0f0e8b1e9c9d884a8014bb5dbc07c4d2635a9852d229ba95568b6c33f86b6afb27140f
+ REF 26fa19eb86ab3c589af2bdbc77449d61a8ff799b # v1.10.30
+ SHA512 821e113c6a847a244cd138869b5c8192c67054e6b8d39c0764d4e88f7a839146e9d9ec1f189cd5566f8954ad07ee0c86cbf8d353806c9bceb0f0a45def1a0ca2
HEAD_REF master
)
set(VCPKG_LIBRARY_LINKAGE dynamic)
-if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
- set(ARCH_PATH "win64")
-elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
- set(ARCH_PATH "win32")
+if(VCPKG_TARGET_IS_WINDOWS)
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(ARCH_PATH "win64")
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(ARCH_PATH "win32")
+ else()
+ message(FATAL_ERROR "Package only supports x64 and x86 Windows.")
+ endif()
+elseif(VCPKG_TARGET_IS_LINUX)
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(ARCH_PATH "linux64")
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(ARCH_PATH "linux32")
+ else()
+ message(FATAL_ERROR "Package only supports x64 and x86 Linux.")
+ endif()
else()
- message(FATAL_ERROR "Package only supports x64 and x86 windows.")
+ message(FATAL_ERROR "Package only supports Windows and Linux.")
endif()
-if(VCPKG_CMAKE_SYSTEM_NAME)
- message(FATAL_ERROR "Package only supports windows desktop.")
-endif()
+file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-file(MAKE_DIRECTORY
- ${CURRENT_PACKAGES_DIR}/lib
- ${CURRENT_PACKAGES_DIR}/bin
- ${CURRENT_PACKAGES_DIR}/debug/lib
- ${CURRENT_PACKAGES_DIR}/debug/bin
-)
-file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
-file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-file(COPY
- ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll
- ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin
-)
-file(COPY
- ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll
- ${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
-)
-file(COPY ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR})
-file(RENAME ${CURRENT_PACKAGES_DIR}/headers ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${SOURCE_PATH}/bin/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+file(COPY ${SOURCE_PATH}/bin/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+
+file(INSTALL ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR} RENAME include)
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvr)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/openvr/LICENSE ${CURRENT_PACKAGES_DIR}/share/openvr/copyright)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file
diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL
index c7b8d246f..f4ed522c3 100644
--- a/ports/opus/CONTROL
+++ b/ports/opus/CONTROL
@@ -1,4 +1,7 @@
Source: opus
-Version: 1.3.1
+Version: 1.3.1-2
Homepage: https://github.com/xiph/opus
Description: Totally open, royalty-free, highly versatile audio codec
+
+Feature: avx
+Description: Builds the library with avx instruction set
diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake
index bf23718df..a770da51f 100644
--- a/ports/opus/portfile.cmake
+++ b/ports/opus/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH
SOURCE_PATH
@@ -12,7 +10,14 @@ vcpkg_from_github(
HEAD_REF
master)
-vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA)
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ avx AVX_SUPPORTED
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS ${FEATURE_OPTIONS}
+ PREFER_NINJA)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Opus)
vcpkg_copy_pdbs()
diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL
index c3159094a..11248c447 100644
--- a/ports/qt5-base/CONTROL
+++ b/ports/qt5-base/CONTROL
@@ -1,5 +1,5 @@
Source: qt5-base
-Version: 5.12.5-11
+Version: 5.12.5-12
Homepage: https://www.qt.io/
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, angle (!windows), egl-registry, icu (!uwp), fontconfig (!windows)
diff --git a/ports/qt5-base/patches/Qt5GuiConfigExtras.patch b/ports/qt5-base/patches/Qt5GuiConfigExtras.patch
new file mode 100644
index 000000000..0029f2aa5
--- /dev/null
+++ b/ports/qt5-base/patches/Qt5GuiConfigExtras.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
+index 84dbbfebd..accb86e3f 100644
+--- a/src/gui/Qt5GuiConfigExtras.cmake.in
++++ b/src/gui/Qt5GuiConfigExtras.cmake.in
+@@ -148,6 +153,8 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
+ !!ENDIF
+ unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE)
+
++ find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d ${_lib} NAMES_PER_DIR
++ PATHS \"${_qt5Gui_install_prefix}/debug/lib\" NO_DEFAULT_PATH)
+ find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d
+ PATHS \"${LibDir}\"
+ !!IF !mac
diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake
index 7a1f35ef8..e23862376 100644
--- a/ports/qt5-base/portfile.cmake
+++ b/ports/qt5-base/portfile.cmake
@@ -42,6 +42,7 @@ qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH
#patches/static_opengl.patch #Use this patch if you really want to statically link angle on windows (e.g. using -opengl es2 and -static).
#Be carefull since it requires definining _GDI32_ for all dependent projects due to redefinition errors in the
#the windows supplied gl.h header and the angle gl.h otherwise.
+ patches/Qt5GuiConfigExtras.patch # Patches the library search behavior for EGL since angle is not build with Qt
)
# Remove vendored dependencies to ensure they are not picked up by the build
@@ -334,6 +335,14 @@ file(COPY
${CURRENT_PACKAGES_DIR}/share/qt5
)
+# Fix Qt5GuiConfigExtras EGL path
+if(VCPKG_TARGET_IS_LINUX)
+ set(_file "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake")
+ file(READ "${_file}" _contents)
+ string(REGEX REPLACE "_qt5gui_find_extra_libs\\\(EGL[^\\\n]+" "_qt5gui_find_extra_libs(EGL \"EGL\" \"\" \"\${_qt5Gui_install_prefix}/include\")\n" _contents "${_contents}")
+ file(WRITE "${_file}" "${_contents}")
+endif()
+
if(QT_BUILD_LATEST)
file(COPY
${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_hashes_latest.cmake
diff --git a/ports/reproc/CONTROL b/ports/reproc/CONTROL
index b2ba2675a..36dee1083 100644
--- a/ports/reproc/CONTROL
+++ b/ports/reproc/CONTROL
@@ -1,4 +1,4 @@
Source: reproc
-Version: 11.0.1
+Version: 12.0.0
Description: Cross-platform (C99/C++11) process library
Homepage: https://github.com/DaanDeMeyer/reproc
diff --git a/ports/reproc/portfile.cmake b/ports/reproc/portfile.cmake
index 92609cff8..09989d8fa 100644
--- a/ports/reproc/portfile.cmake
+++ b/ports/reproc/portfile.cmake
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DaanDeMeyer/reproc
- REF 62dd002f8bd85e369d5a02e3adb49f5b894d344d # v11.0.1
- SHA512 d6d8cb53ab38c0f4c9a9add1068ef09f96674f8f64a6d1fc65cfc5790063570f6da2b8b80988785d5daa3640cde27949ab474bbc6f2cf7587f79c017ed43c621
+ REF 8a46b552d28b15ef584f9a6153c2c866754f7b94 # v12.0.0
+ SHA512 df5b9b2024a2f8e0ed3ac3d0f8df4b251601a91c037b0a81825fd7a0b034ed2e3fbd1d107fa307b00b828b15ac74fccd85df58686a7ab74de82640a889c680b2
HEAD_REF master
)
@@ -10,7 +10,7 @@ vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
- -DREPROCXX=ON
+ -DREPROC++=ON
-DREPROC_INSTALL_PKGCONFIG=OFF
-DREPROC_INSTALL_CMAKECONFIGDIR=share
)
@@ -19,7 +19,7 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-foreach(TARGET reproc reprocxx)
+foreach(TARGET reproc reproc++)
vcpkg_fixup_cmake_targets(
CONFIG_PATH share/${TARGET}
TARGET_PATH share/${TARGET}
diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL
index a760561e9..073bebce2 100644
--- a/ports/sciter/CONTROL
+++ b/ports/sciter/CONTROL
@@ -1,5 +1,5 @@
-Source: sciter
-Version: 4.4.0.7
-Homepage: https://github.com/c-smile/sciter-sdk
-Description: Sciter is an embeddable HTML/CSS/scripting engine.
-Supports: !uwp \ No newline at end of file
+Source: sciter
+Version: 4.4.1.5
+Homepage: https://github.com/c-smile/sciter-sdk
+Description: Sciter is an embeddable HTML/CSS/scripting engine.
+Supports: !uwp
diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake
index f148d4148..c70468ea7 100644
--- a/ports/sciter/portfile.cmake
+++ b/ports/sciter/portfile.cmake
@@ -9,8 +9,8 @@ endif()
# header-only library
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
-set(SCITER_REVISION 507dce1bed69d6ef7a0d5c7628cb7eb8680e0438)
-set(SCITER_SHA 24ccc7d09247ea84a5a3e3c479dc6eb99b4115a89fec8e766874f706addee163b327f5380632b554b02074423f97097f993f8d361d8948800f6477de2b4ab5b5)
+set(SCITER_REVISION e0f293ebfb59b9fbef058626bcaeafc38dad5fb8)
+set(SCITER_SHA 30b163c478db0c749464de1f18ce249f90018490c737c3d740cebeab0963f5f76d04b907d6cd93952953a7a0ee139fc1ecfa28f6100ada210a6a9ff0e4ff12d5)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(SCITER_ARCH x64)
@@ -73,6 +73,12 @@ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin)
file(INSTALL ${SCITER_BIN}/sciter.app DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${SCITER_TOOLS})
+ # not sure whether there is a better way to do this, because
+ # `file(INSTALL sciter.app FILE_PERMISSIONS EXECUTE)`
+ # would mark everything as executable which is no go.
+ execute_process(COMMAND sh -c "chmod +x sciter.app/Contents/MacOS/sciter" WORKING_DIRECTORY ${SCITER_TOOLS})
+ execute_process(COMMAND sh -c "chmod +x inspector.app/Contents/MacOS/inspector" WORKING_DIRECTORY ${SCITER_TOOLS})
+
file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
diff --git a/ports/skyr-url/CONTROL b/ports/skyr-url/CONTROL
new file mode 100644
index 000000000..bf05d73ca
--- /dev/null
+++ b/ports/skyr-url/CONTROL
@@ -0,0 +1,5 @@
+Source: skyr-url
+Version: 1.4.3
+Build-Depends: tl-expected
+Homepage: https://github.com/cpp-netlib/url
+Description: A C++ library that implements the WhatWG URL specification
diff --git a/ports/skyr-url/portfile.cmake b/ports/skyr-url/portfile.cmake
new file mode 100644
index 000000000..c6df3658a
--- /dev/null
+++ b/ports/skyr-url/portfile.cmake
@@ -0,0 +1,27 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO cpp-netlib/url
+ REF v1.4.5
+ SHA512 39501217e331a904daf928a5874f81808a9665a9e8debe39c15a3fb7607ab293a5a1b335062cc7ac8f4fe239d4233a2c5ed0e9b45dbec7edcc267eb3d25509d3
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DSkyr_BUILD_TESTS=OFF
+ -DSkyr_BUILD_DOCS=OFF
+ -DSkyr_BUILD_EXAMPLES=OFF
+ -DSkyr_WARNINGS_AS_ERRORS=OFF
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/skyr-url RENAME copyright)
diff --git a/ports/vulkan-hpp/CONTROL b/ports/vulkan-hpp/CONTROL
index 95b59f3f8..2449918e3 100644
--- a/ports/vulkan-hpp/CONTROL
+++ b/ports/vulkan-hpp/CONTROL
@@ -1,4 +1,4 @@
Source: vulkan-hpp
-Version: 2019-05-11
+Version: 2019-05-11-1
Description: Header only C++ bindings for the Vulkan C API
Build-Depends: vulkan
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index faf2bb104..62af21fe8 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -63,14 +63,6 @@ ampl-mp:arm-uwp=fail
ampl-mp:x64-uwp=fail
angelscript:arm64-windows=fail
angelscript:arm-uwp=fail
-
-# Conflicts with qt5-base and ms-angle
-angle:arm64-windows = skip
-angle:arm-uwp = skip
-angle:x64-uwp = skip
-angle:x64-windows = skip
-angle:x64-windows-static = skip
-angle:x86-windows = skip
antlr4:arm64-windows=fail
antlr4:arm-uwp=fail
antlr4:x64-uwp=fail
@@ -606,8 +598,6 @@ hidapi:x64-uwp=fail
hiredis:arm-uwp=fail
hiredis:x64-uwp=fail
hpx:x64-windows-static=fail
-hunspell:x64-linux=fail
-hunspell:x64-osx=fail
hwloc:arm64-windows=fail
hwloc:arm-uwp=fail
hwloc:x64-linux=fail
@@ -751,7 +741,6 @@ libfabric:x64-linux=fail
libfabric:x64-osx=fail
libfabric:x64-uwp=fail
libfabric:x64-windows=ignore
-libffi:arm-uwp=fail
libfreenect2:arm64-windows=fail
libgd:x64-linux=ignore
libgit2:arm64-windows=fail
@@ -1138,8 +1127,8 @@ mpir:x64-uwp=fail
#Conflicts with angle and qt-5base
ms-angle:arm64-windows = skip
ms-angle:arm-uwp = skip
-ms-angle:x64-linux = fail
-ms-angle:x64-osx = fail
+ms-angle:x64-linux = skip
+ms-angle:x64-osx = skip
ms-angle:x64-uwp = skip
ms-angle:x64-windows = skip
ms-angle:x64-windows-static = skip
@@ -1314,7 +1303,6 @@ openvdb:x64-windows-static=fail
openvpn3:x64-osx=fail
openvr:arm64-windows=fail
openvr:arm-uwp=fail
-openvr:x64-linux=fail
openvr:x64-osx=fail
openvr:x64-uwp=fail
openxr-loader:arm64-windows=fail
@@ -1340,6 +1328,7 @@ osgearth:x64-osx=fail
osgearth:x64-linux=fail
osgearth:x64-windows-static=fail
osg-qt:x64-windows-static=fail
+osg-qt:x64-linux=ignore
otl:x64-windows=ignore
otl:x64-windows-static=ignore
otl:x64-uwp=ignore
@@ -1536,7 +1525,6 @@ redis-plus-plus:arm64-windows=fail
replxx:arm-uwp=fail
replxx:x64-uwp=fail
replxx:arm64-windows=fail
-replxx:x86-windows=fail
reproc:arm-uwp=fail
reproc:x64-uwp=fail
restbed:arm-uwp=fail
diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake
index bbff5e9f6..2af64999e 100644
--- a/scripts/cmake/vcpkg_configure_meson.cmake
+++ b/scripts/cmake/vcpkg_configure_meson.cmake
@@ -38,83 +38,218 @@ function(vcpkg_configure_meson)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
-
- # use the same compiler options as in vcpkg_configure_cmake
- if(NOT VCPKG_TARGET_IS_WINDOWS)
- message(FATAL_ERROR "vcpkg_configure_meson() currently only supports windows targets.")
- endif()
- set(MESON_COMMON_CFLAGS "${MESON_COMMON_CFLAGS} /DWIN32 /D_WINDOWS /W3 /utf-8")
- set(MESON_COMMON_CXXFLAGS "${MESON_COMMON_CXXFLAGS} /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc")
-
- if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL "dynamic")
- set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1")
- set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1")
-
- set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MD /O2 /Gy /DNDEBUG /Z7")
- set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MD /O2 /Gy /DNDEBUG /Z7")
- elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL "static")
- set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1")
- set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1")
-
- set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MT /O2 /Gy /DNDEBUG /Z7")
- set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MT /O2 /Gy /DNDEBUG /Z7")
+
+ #Extract compiler flags
+ if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
+ set(MESON_CMAKE_FLAG_SUFFIX "_INIT")
+ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
+ set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake")
+ set(MESON_CMAKE_FLAG_SUFFIX "")
+ elseif(VCPKG_TARGET_IS_LINUX)
+ set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/linux.cmake")
+ elseif(VCPKG_TARGET_IS_ANDROID)
+ set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/android.cmake")
+ elseif(VCPKG_TARGET_IS_OSX)
+ set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/osx.cmake")
+ elseif(VVCPKG_TARGET_IS_FREEBSD)
+ set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/freebsd.cmake")
+ elseif(VCPKG_TARGET_IS_MINGW)
+ set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake")
+ endif()
endif()
+
+ include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
- set(MESON_COMMON_LDFLAGS "${MESON_COMMON_LDFLAGS} /DEBUG")
- set(MESON_RELEASE_LDFLAGS "${MESON_RELEASE_LDFLAGS} /INCREMENTAL:NO /OPT:REF /OPT:ICF")
+ string(APPEND MESON_COMMON_CFLAGS " ${CMAKE_C_FLAGS${MESON_CMAKE_FLAG_SUFFIX}}")
+ string(APPEND MESON_COMMON_CXXFLAGS " ${CMAKE_CXX_FLAGS${MESON_CMAKE_FLAG_SUFFIX}}")
+
+ string(APPEND MESON_DEBUG_CFLAGS " ${CMAKE_C_FLAGS_DEBUG${MESON_CMAKE_FLAG_SUFFIX}}")
+ string(APPEND MESON_DEBUG_CXXFLAGS " ${CMAKE_CXX_FLAGS_DEBUG${MESON_CMAKE_FLAG_SUFFIX}}")
+
+ string(APPEND MESON_RELEASE_CFLAGS " ${CMAKE_C_FLAGS_RELEASE${MESON_CMAKE_FLAG_SUFFIX}}")
+ string(APPEND MESON_RELEASE_CXXFLAGS " ${CMAKE_CXX_FLAGS_RELEASE${MESON_CMAKE_FLAG_SUFFIX}}")
+
+ string(APPEND MESON_COMMON_LDFLAGS " ${CMAKE_SHARED_LINKER_FLAGS${MESON_CMAKE_FLAG_SUFFIX}}")
+ string(APPEND MESON_DEBUG_LDFLAGS " ${CMAKE_SHARED_LINKER_FLAGS_DEBUG${MESON_CMAKE_FLAG_SUFFIX}}")
+ string(APPEND MESON_RELEASE_LDFLAGS " ${CMAKE_SHARED_LINKER_FLAGS_RELEASE${MESON_CMAKE_FLAG_SUFFIX}}")
# select meson cmd-line options
- list(APPEND _vcm_OPTIONS -Dcmake_prefix_path=${CURRENT_INSTALLED_DIR})
+ if(VCPKG_TARGET_IS_WINDOWS)
+ list(APPEND _vcm_OPTIONS "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/share']")
+ else()
+ list(APPEND _vcm_OPTIONS "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}']")
+ endif()
list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja --wrap-mode nodownload)
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(APPEND _vcm_OPTIONS --default-library shared)
else()
list(APPEND _vcm_OPTIONS --default-library static)
endif()
+ list(APPEND _vcm_OPTIONS --libdir lib) # else meson install into an architecture describing folder
list(APPEND _vcm_OPTIONS_DEBUG --prefix ${CURRENT_PACKAGES_DIR}/debug --includedir ../include)
list(APPEND _vcm_OPTIONS_RELEASE --prefix ${CURRENT_PACKAGES_DIR})
vcpkg_find_acquire_program(MESON)
+
+ get_filename_component(CMAKE_PATH ${CMAKE_COMMAND} DIRECTORY)
+ vcpkg_add_to_path("${CMAKE_PATH}") # Make CMake invokeable for Meson
+
vcpkg_find_acquire_program(NINJA)
get_filename_component(NINJA_PATH ${NINJA} DIRECTORY)
- if(CMAKE_HOST_WIN32)
- set(_PATHSEP ";")
+ vcpkg_add_to_path("${NINJA_PATH}")
+
+ if(NOT ENV{PKG_CONFIG})
+ find_program(PKGCONFIG pkg-config)
+ if(NOT PKGCONFIG AND CMAKE_HOST_WIN32)
+ vcpkg_acquire_msys(MSYS_ROOT PACKAGES pkg-config)
+ vcpkg_add_to_path("${MSYS_ROOT}/usr/bin")
+ endif()
+ find_program(PKGCONFIG pkg-config REQUIRED)
else()
- set(_PATHSEP ":")
+ debug_message(STATUS "PKG_CONFIG found in ENV! Using $ENV{PKG_CONFIG}")
+ set(PKGCONFIG $ENV{PKG_CONFIG})
+ endif()
+ set(PKGCONFIG_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig/")
+ if(WIN32)
+ string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" PKGCONFIG_SHARE_DIR "${PKGCONFIG_SHARE_DIR}")
endif()
- set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}")
+ # configure debug
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
+
+ #setting up PKGCONFIG
+ if(NOT PKGCONFIG MATCHES "--define-variable=prefix")
+ set(PKGCONFIG_PREFIX "${CURRENT_INSTALLED_DIR}/debug")
+ # if(WIN32)
+ # string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" PKGCONFIG_PREFIX "${PKGCONFIG_PREFIX}")
+ # endif()
+ set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${PKGCONFIG_PREFIX}")
+ endif()
+ set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig/")
+ if(WIN32)
+ string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" PKGCONFIG_INSTALLED_DIR "${PKGCONFIG_INSTALLED_DIR}")
+ endif()
+ if(ENV{PKG_CONFIG_PATH})
+ set(BACKUP_ENV_PKG_CONFIG_PATH_DEBUG $ENV{PKG_CONFIG_PATH})
+ set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}: ${PKGCONFIG_SHARE_DIR}: $ENV{PKG_CONFIG_PATH}")
+ else()
+ set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}: ${PKGCONFIG_SHARE_DIR}")
+ endif()
+
+ set(CFLAGS "-Dc_args=[${MESON_COMMON_CFLAGS} ${MESON_DEBUG_CFLAGS}]")
+ string(REGEX REPLACE " +(/|-)" "','\\1" CFLAGS ${CFLAGS}) # Seperate compiler arguments with comma and enclose in '
+ string(REGEX REPLACE " *\\\]" "']" CFLAGS ${CFLAGS}) # Add trailing ' at end
+ string(REGEX REPLACE "\\\['," "[" CFLAGS ${CFLAGS}) # Remove prepended ', introduced in #1
+ string(REGEX REPLACE "\\\['\\\]" "[]" CFLAGS ${CFLAGS}) # Remove trailing ' introduced in #2 if no elements
+
+ set(CXXFLAGS "-Dcpp_args=[${MESON_COMMON_CXXFLAGS} ${MESON_DEBUG_CXXFLAGS}]")
+ string(REGEX REPLACE " +(/|-)" "','\\1" CXXFLAGS ${CXXFLAGS})
+ string(REGEX REPLACE " *\\\]" "']" CXXFLAGS ${CXXFLAGS})
+ string(REGEX REPLACE "\\\['," "[" CXXFLAGS ${CXXFLAGS})
+ string(REGEX REPLACE "\\\['\\\]" "[]" CXXFLAGS ${CXXFLAGS})
+ set(LDFLAGS "[${MESON_COMMON_LDFLAGS} ${MESON_DEBUG_LDFLAGS}]")
+ string(REGEX REPLACE " +(/|-)" "','\\1" LDFLAGS ${LDFLAGS})
+ string(REGEX REPLACE " *\\\]" "']" LDFLAGS ${LDFLAGS})
+ string(REGEX REPLACE "\\\['," "[" LDFLAGS ${LDFLAGS})
+ string(REGEX REPLACE "\\\['\\\]" "[]" LDFLAGS ${LDFLAGS})
+ set(CLDFLAGS "-Dc_link_args=${LDFLAGS}")
+ set(CXXLDFLAGS "-Dcpp_link_args=${LDFLAGS}")
+ vcpkg_execute_required_process(
+ COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_DEBUG} ${_vcm_SOURCE_PATH} ${CFLAGS} ${CXXFLAGS} ${CLDFLAGS} ${CXXLDFLAGS}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
+ LOGNAME config-${TARGET_TRIPLET}-dbg
+ )
+
+ #Copy meson log files into buildtree for CI
+ if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/meson-logs/meson-log.txt")
+ file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/meson-logs/meson-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}")
+ file(RENAME "${CURRENT_BUILDTREES_DIR}/meson-log.txt" "${CURRENT_BUILDTREES_DIR}/meson-log-dbg.txt")
+ endif()
+ if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/meson-logs/install-log.txt")
+ file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/meson-logs/install-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}")
+ file(RENAME "${CURRENT_BUILDTREES_DIR}/install-log.txt" "${CURRENT_BUILDTREES_DIR}/install-log-dbg.txt")
+ endif()
+ message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
+
+ #Restore PKG_CONFIG_PATH
+ if(BACKUP_ENV_PKG_CONFIG_PATH_DEBUG)
+ set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_DEBUG}")
+ unset(BACKUP_ENV_PKG_CONFIG_PATH_DEBUG)
+ else()
+ unset(ENV{PKG_CONFIG_PATH})
+ endif()
+ endif()
+
# configure release
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
- file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
- set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_RELEASE_CFLAGS}")
- set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_RELEASE_CXXFLAGS}")
- set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_RELEASE_LDFLAGS}")
- set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_RELEASE_CPPFLAGS}")
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
+ #setting up PKGCONFIG
+ if(NOT PKGCONFIG MATCHES "--define-variable=prefix")
+ set(PKGCONFIG_PREFIX "${CURRENT_INSTALLED_DIR}")
+ # if(WIN32)
+ # string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" PKGCONFIG_PREFIX "${PKGCONFIG_PREFIX}")
+ # endif()
+ set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${PKGCONFIG_PREFIX}")
+ endif()
+ set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}/lib/pkgconfig/")
+ if(WIN32)
+ string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" PKGCONFIG_INSTALLED_DIR "${PKGCONFIG_INSTALLED_DIR}")
+ endif()
+ if(ENV{PKG_CONFIG_PATH})
+ set(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE $ENV{PKG_CONFIG_PATH})
+ set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}: ${PKGCONFIG_SHARE_DIR}: $ENV{PKG_CONFIG_PATH}")
+ else()
+ set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}: ${PKGCONFIG_SHARE_DIR}")
+ endif()
+
+ # Normalize flags for meson (i.e. " /string /with /flags " -> ['/string', '/with', '/flags'])
+ set(CFLAGS "-Dc_args=[${MESON_COMMON_CFLAGS} ${MESON_RELEASE_CFLAGS}]")
+ string(REGEX REPLACE " +(/|-)" "','\\1" CFLAGS ${CFLAGS}) # Seperate compiler arguments with comma and enclose in '
+ string(REGEX REPLACE " *\\\]" "']" CFLAGS ${CFLAGS}) # Add trailing ' at end
+ string(REGEX REPLACE "\\\['," "[" CFLAGS ${CFLAGS}) # Remove prepended ', introduced in #1
+ string(REGEX REPLACE "\\\['\\\]" "[]" CFLAGS ${CFLAGS}) # Remove trailing ' introduced in #2 if no elements
+ set(CXXFLAGS "-Dcpp_args=[${MESON_COMMON_CXXFLAGS} ${MESON_RELEASE_CXXFLAGS}]")
+ string(REGEX REPLACE " +(/|-)" "','\\1" CXXFLAGS ${CXXFLAGS})
+ string(REGEX REPLACE " *\\\]" "']" CXXFLAGS ${CXXFLAGS})
+ string(REGEX REPLACE "\\\['," "[" CXXFLAGS ${CXXFLAGS})
+ string(REGEX REPLACE "\\\['\\\]" "[]" CXXFLAGS ${CXXFLAGS})
+ set(LDFLAGS "[${MESON_COMMON_LDFLAGS} ${MESON_RELEASE_LDFLAGS}]")
+ string(REGEX REPLACE " +(/|-)" "','\\1" LDFLAGS ${LDFLAGS})
+ string(REGEX REPLACE " *\\\]" "']" LDFLAGS ${LDFLAGS})
+ string(REGEX REPLACE "\\\['," "[" LDFLAGS ${LDFLAGS})
+ string(REGEX REPLACE "\\\['\\\]" "[]" LDFLAGS ${LDFLAGS})
+ set(CLDFLAGS "-Dc_link_args=${LDFLAGS}")
+ set(CXXLDFLAGS "-Dcpp_link_args=${LDFLAGS}")
+
vcpkg_execute_required_process(
- COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_RELEASE} ${_vcm_SOURCE_PATH}
+ COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_RELEASE} ${_vcm_SOURCE_PATH} ${CFLAGS} ${CXXFLAGS} ${CLDFLAGS} ${CXXLDFLAGS}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME config-${TARGET_TRIPLET}-rel
)
+ #Copy meson log files into buildtree for CI
+ if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/meson-logs/meson-log.txt")
+ file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/meson-logs/meson-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}")
+ file(RENAME "${CURRENT_BUILDTREES_DIR}/meson-log.txt" "${CURRENT_BUILDTREES_DIR}/meson-log-rel.txt")
+ endif()
+ if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/meson-logs/install-log.txt")
+ file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/meson-logs/install-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}")
+ file(RENAME "${CURRENT_BUILDTREES_DIR}/install-log.txt" "${CURRENT_BUILDTREES_DIR}/install-log-rel.txt")
+ endif()
message(STATUS "Configuring ${TARGET_TRIPLET}-rel done")
- endif()
-
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- # configure debug
- message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
- file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
- set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_DEBUG_CFLAGS}")
- set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_DEBUG_CXXFLAGS}")
- set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_DEBUG_LDFLAGS}")
- set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_DEBUG_CPPFLAGS}")
- vcpkg_execute_required_process(
- COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_DEBUG} ${_vcm_SOURCE_PATH}
- WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
- LOGNAME config-${TARGET_TRIPLET}-dbg
- )
- message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
+
+ #Restore PKG_CONFIG_PATH
+ if(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE)
+ set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_RELEASE}")
+ unset(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE)
+ else()
+ unset(ENV{PKG_CONFIG_PATH})
+ endif()
+
endif()
endfunction()
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index ed5e010e0..1acb8f749 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -187,7 +187,7 @@ function(vcpkg_find_acquire_program VAR)
set(BREW_PACKAGE_NAME "ninja")
set(APT_PACKAGE_NAME "ninja-build")
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(ARCHIVE "ninja-win-1.8.2.zip")
set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5)
elseif(VAR MATCHES "NUGET")
set(PROGNAME nuget)
diff --git a/scripts/cmake/vcpkg_from_git.cmake b/scripts/cmake/vcpkg_from_git.cmake
index bad5384ca..f114f6fc6 100644
--- a/scripts/cmake/vcpkg_from_git.cmake
+++ b/scripts/cmake/vcpkg_from_git.cmake
@@ -19,7 +19,7 @@
## This should be set to `SOURCE_PATH` by convention.
##
## ### URL
-## The url of the git repository. Must start with `https`.
+## The url of the git repository.
##
## ### REF
## The git sha of the commit to download.
@@ -49,13 +49,6 @@ function(vcpkg_from_git)
message(FATAL_ERROR "The git url must be specified")
endif()
- if( NOT _vdud_URL MATCHES "^https:")
- # vcpkg_from_git does not support a SHA256 parameter because hashing the git archive is
- # not stable across all supported platforms. The tradeoff is to require https to download
- # and the ref to be the git sha (i.e. not things that can change like a label)
- message(FATAL_ERROR "The git url must be https")
- endif()
-
if(NOT DEFINED _vdud_REF)
message(FATAL_ERROR "The git ref must be specified.")
endif()
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml
index 01073fdbb..5ac380279 100644
--- a/scripts/vcpkgTools.xml
+++ b/scripts/vcpkgTools.xml
@@ -60,10 +60,10 @@
<sha512>f477842d0cebefcd6bf9c6d536ab8ea20ec5b0aa967ee963ab6a101aeff9df8742ca600d35f39e2e7158d76d8231f1ed2bef6104dce84d2bf8d6b07d17d706a1</sha512>
</tool>
<tool name="nuget" os="windows">
- <version>4.6.2</version>
+ <version>4.8.1</version>
<exeRelativePath>nuget.exe</exeRelativePath>
- <url>https://dist.nuget.org/win-x86-commandline/v4.6.2/nuget.exe</url>
- <sha512>60daea7bec2de23089f7ad73985dd788ac154171d6326c2c456726849b8f97dfc38cbdd9b9bf8d96aced009ccaaed317905b65c108e149cfbbbcdfb95f8f0519</sha512>
+ <url>https://dist.nuget.org/win-x86-commandline/v4.8.1/nuget.exe</url>
+ <sha512>42cb744338af8decc033a75bce5b4c4df28e102bafc45f9a8ba86d7bc010f5b43ebacae80d7b28c4f85ac900eefc2a349620ae65f27f6ca1c21c53b63b92924b</sha512>
</tool>
<tool name="installerbase" os="windows">
<version>3.1.81</version>
@@ -81,9 +81,9 @@
</tool>
<tool name="aria2" os="windows">
<version>18.01.0</version>
- <exeRelativePath>aria2-1.33.1-win-32bit-build1\aria2c.exe</exeRelativePath>
- <url>https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip</url>
- <sha512>2456176ba3d506a07cf0cc4f61f080e1ff8cb4106426d66f354c5bb67a9a8720b5ddb26904275e61b1f623c932355f7dcde4cd17556cc895f11293c23c3a9bf3</sha512>
+ <exeRelativePath>aria2-1.34.0-win-32bit-build1\aria2c.exe</exeRelativePath>
+ <url>https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip</url>
+ <sha512>2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27</sha512>
<archiveName>aria2-1.33.1-win-32bit-build1.zip</archiveName>
</tool>
<tool name="ninja" os="windows">
diff --git a/toolsrc/include/vcpkg/export.prefab.h b/toolsrc/include/vcpkg/export.prefab.h
new file mode 100644
index 000000000..56a5ba371
--- /dev/null
+++ b/toolsrc/include/vcpkg/export.prefab.h
@@ -0,0 +1,82 @@
+#pragma once
+
+#include <vcpkg/base/system.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/vcpkgpaths.h>
+
+
+#include <vector>
+
+namespace vcpkg::Export::Prefab
+{
+ constexpr int kFragmentSize = 3;
+
+ struct Options
+ {
+ Optional<std::string> maybe_group_id;
+ Optional<std::string> maybe_artifact_id;
+ Optional<std::string> maybe_version;
+ Optional<std::string> maybe_min_sdk;
+ Optional<std::string> maybe_target_sdk;
+ bool enable_maven;
+ bool enable_debug;
+ };
+ struct NdkVersion
+ {
+ NdkVersion(int _major, int _minor, int _patch) : m_major{_major},
+ m_minor{_minor},
+ m_patch{_patch}{
+ }
+ int major() { return this->m_major; }
+ int minor() { return this->m_minor; }
+ int patch() { return this->m_patch; }
+ std::string to_string();
+ void to_string(std::string& out);
+
+ private:
+ int m_major;
+ int m_minor;
+ int m_patch;
+ };
+
+ struct ABIMetadata
+ {
+ std::string abi;
+ int api;
+ int ndk;
+ std::string stl;
+ std::string to_string();
+ };
+
+ struct PlatformModuleMetadata
+ {
+ std::vector<std::string> export_libraries;
+ std::string library_name;
+ std::string to_json();
+ };
+
+ struct ModuleMetadata
+ {
+ std::vector<std::string> export_libraries;
+ std::string library_name;
+ PlatformModuleMetadata android;
+ std::string to_json();
+ };
+
+ struct PackageMetadata
+ {
+ std::string name;
+ int schema;
+ std::vector<std::string> dependencies;
+ std::string version;
+ std::string to_json();
+ };
+
+
+
+ void do_export(const std::vector<Dependencies::ExportPlanAction>& export_plan,
+ const VcpkgPaths& paths,
+ const Options& prefab_options, const Triplet& triplet);
+ Optional<std::string> find_ndk_version(const std::string &content);
+ Optional<NdkVersion> to_version(const std::string &version);
+}
diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h
index d836dd230..92ea10175 100644
--- a/toolsrc/include/vcpkg/triplet.h
+++ b/toolsrc/include/vcpkg/triplet.h
@@ -23,6 +23,11 @@ namespace vcpkg
static const Triplet X64_UWP;
static const Triplet ARM_UWP;
static const Triplet ARM64_UWP;
+
+ static const Triplet ARM_ANDROID;
+ static const Triplet ARM64_ANDROID;
+ static const Triplet X86_ANDROID;
+ static const Triplet X64_ANDROID;
const std::string& canonical_name() const;
const std::string& to_string() const;
diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h
index 63d19af2c..31d8374f1 100644
--- a/toolsrc/include/vcpkg/vcpkgpaths.h
+++ b/toolsrc/include/vcpkg/vcpkgpaths.h
@@ -14,6 +14,8 @@ namespace vcpkg
namespace Tools
{
static const std::string SEVEN_ZIP = "7zip";
+ static const std::string SEVEN_ZIP_ALT = "7z";
+ static const std::string MAVEN = "mvn";
static const std::string CMAKE = "cmake";
static const std::string GIT = "git";
static const std::string NINJA = "ninja";
diff --git a/toolsrc/src/vcpkg/base/system.process.cpp b/toolsrc/src/vcpkg/base/system.process.cpp
index bba29a2d7..5f34ace2a 100644
--- a/toolsrc/src/vcpkg/base/system.process.cpp
+++ b/toolsrc/src/vcpkg/base/system.process.cpp
@@ -241,6 +241,12 @@ namespace vcpkg
// Enables proxy information to be passed to Curl, the underlying download library in cmake.exe
L"http_proxy",
L"https_proxy",
+ // Environment variables to tell git to use custom SSH executable or command
+ L"GIT_SSH",
+ L"GIT_SSH_COMMAND",
+ // Environment variables needed for ssh-agent based authentication
+ L"SSH_AUTH_SOCK",
+ L"SSH_AGENT_PID",
// Enables find_package(CUDA) and enable_language(CUDA) in CMake
L"CUDA_PATH",
L"CUDA_PATH_V9_0",
diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp
index c1e91adf9..937c6b0a7 100644
--- a/toolsrc/src/vcpkg/build.cpp
+++ b/toolsrc/src/vcpkg/build.cpp
@@ -831,7 +831,7 @@ namespace vcpkg::Build
{
for (const FeatureSpec& fspec : kv.second)
{
- if (!(status_db.is_installed(fspec) || spec.name() == name))
+ if (!(status_db.is_installed(fspec) || fspec.name() == name))
{
missing_fspecs.emplace_back(fspec);
}
diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp
index a9dd3bba2..f6226ead6 100644
--- a/toolsrc/src/vcpkg/export.cpp
+++ b/toolsrc/src/vcpkg/export.cpp
@@ -3,6 +3,7 @@
#include <vcpkg/commands.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/export.chocolatey.h>
+#include <vcpkg/export.prefab.h>
#include <vcpkg/export.h>
#include <vcpkg/export.ifw.h>
#include <vcpkg/help.h>
@@ -196,6 +197,7 @@ namespace vcpkg::Export
{
constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, "zip", "zip");
constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, "7z", "7zip");
+ constexpr const ArchiveFormat AAR(ArchiveFormat::BackingEnum::ZIP, "aar", "zip");
}
static fs::path do_archive_export(const VcpkgPaths& paths,
@@ -263,6 +265,7 @@ namespace vcpkg::Export
bool zip = false;
bool seven_zip = false;
bool chocolatey = false;
+ bool prefab = false;
bool all_installed = false;
Optional<std::string> maybe_output;
@@ -271,6 +274,7 @@ namespace vcpkg::Export
Optional<std::string> maybe_nuget_version;
IFW::Options ifw_options;
+ Prefab::Options prefab_options;
Chocolatey::Options chocolatey_options;
std::vector<PackageSpec> specs;
};
@@ -293,8 +297,20 @@ namespace vcpkg::Export
static constexpr StringLiteral OPTION_CHOCOLATEY_MAINTAINER = "--x-maintainer";
static constexpr StringLiteral OPTION_CHOCOLATEY_VERSION_SUFFIX = "--x-version-suffix";
static constexpr StringLiteral OPTION_ALL_INSTALLED = "--x-all-installed";
+
+ static constexpr StringLiteral OPTION_PREFAB = "--prefab";
+ static constexpr StringLiteral OPTION_PREFAB_GROUP_ID = "--prefab-group-id";
+ static constexpr StringLiteral OPTION_PREFAB_ARTIFACT_ID = "--prefab-artifact-id";
+ static constexpr StringLiteral OPTION_PREFAB_VERSION = "--prefab-version";
+ static constexpr StringLiteral OPTION_PREFAB_SDK_MIN_VERSION = "--prefab-min-sdk";
+ static constexpr StringLiteral OPTION_PREFAB_SDK_TARGET_VERSION = "--prefab-target-sdk";
+ static constexpr StringLiteral OPTION_PREFAB_ENABLE_MAVEN = "--prefab-maven";
+ static constexpr StringLiteral OPTION_PREFAB_ENABLE_DEBUG = "--prefab-debug";
+
- static constexpr std::array<CommandSwitch, 8> EXPORT_SWITCHES = {{
+
+
+ static constexpr std::array<CommandSwitch, 11> EXPORT_SWITCHES = {{
{OPTION_DRY_RUN, "Do not actually export"},
{OPTION_RAW, "Export to an uncompressed directory"},
{OPTION_NUGET, "Export a NuGet package"},
@@ -302,10 +318,13 @@ namespace vcpkg::Export
{OPTION_ZIP, "Export to a zip file"},
{OPTION_SEVEN_ZIP, "Export to a 7zip (.7z) file"},
{OPTION_CHOCOLATEY, "Export a Chocolatey package (experimental feature)"},
+ {OPTION_PREFAB, "Export to Prefab format"},
+ {OPTION_PREFAB_ENABLE_MAVEN, "Enable maven"},
+ {OPTION_PREFAB_ENABLE_DEBUG, "Enable prefab debug"},
{OPTION_ALL_INSTALLED, "Export all installed packages"},
}};
- static constexpr std::array<CommandSetting, 10> EXPORT_SETTINGS = {{
+ static constexpr std::array<CommandSetting, 15> EXPORT_SETTINGS = {{
{OPTION_OUTPUT, "Specify the output name (used to construct filename)"},
{OPTION_NUGET_ID, "Specify the id for the exported NuGet package (overrides --output)"},
{OPTION_NUGET_VERSION, "Specify the version for the exported NuGet package"},
@@ -318,6 +337,11 @@ namespace vcpkg::Export
"Specify the maintainer for the exported Chocolatey package (experimental feature)"},
{OPTION_CHOCOLATEY_VERSION_SUFFIX,
"Specify the version suffix to add for the exported Chocolatey package (experimental feature)"},
+ {OPTION_PREFAB_GROUP_ID, "GroupId uniquely identifies your project according maven specifications"},
+ {OPTION_PREFAB_ARTIFACT_ID, "Artifact Id is the name of the project according maven specifications"},
+ {OPTION_PREFAB_VERSION, "Version is the name of the project according maven specifications"},
+ {OPTION_PREFAB_SDK_MIN_VERSION, "Android minimum supported sdk version"},
+ {OPTION_PREFAB_SDK_TARGET_VERSION, "Android target sdk version"},
}};
const CommandStructure COMMAND_STRUCTURE = {
@@ -343,8 +367,11 @@ namespace vcpkg::Export
ret.zip = options.switches.find(OPTION_ZIP) != options.switches.cend();
ret.seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend();
ret.chocolatey = options.switches.find(OPTION_CHOCOLATEY) != options.switches.cend();
- ret.all_installed = options.switches.find(OPTION_ALL_INSTALLED) != options.switches.end();
+ ret.prefab = options.switches.find(OPTION_PREFAB) != options.switches.cend();
+ ret.prefab_options.enable_maven = options.switches.find(OPTION_PREFAB_ENABLE_MAVEN) != options.switches.cend();
+ ret.prefab_options.enable_debug = options.switches.find(OPTION_PREFAB_ENABLE_DEBUG) != options.switches.cend();
ret.maybe_output = maybe_lookup(options.settings, OPTION_OUTPUT);
+ ret.all_installed = options.switches.find(OPTION_ALL_INSTALLED) != options.switches.end();
if (ret.all_installed)
{
@@ -363,10 +390,10 @@ namespace vcpkg::Export
});
}
- if (!ret.raw && !ret.nuget && !ret.ifw && !ret.zip && !ret.seven_zip && !ret.dry_run && !ret.chocolatey)
+ if (!ret.raw && !ret.nuget && !ret.ifw && !ret.zip && !ret.seven_zip && !ret.dry_run && !ret.chocolatey && !ret.prefab)
{
System::print2(System::Color::error,
- "Must provide at least one export type: --raw --nuget --ifw --zip --7zip --chocolatey\n");
+ "Must provide at least one export type: --raw --nuget --ifw --zip --7zip --chocolatey --prefab\n");
System::print2(COMMAND_STRUCTURE.example_text);
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -417,6 +444,16 @@ namespace vcpkg::Export
{OPTION_IFW_CONFIG_FILE_PATH, ret.ifw_options.maybe_config_file_path},
{OPTION_IFW_INSTALLER_FILE_PATH, ret.ifw_options.maybe_installer_file_path},
});
+
+ options_implies(OPTION_PREFAB,
+ ret.prefab,
+ {
+ {OPTION_PREFAB_ARTIFACT_ID, ret.prefab_options.maybe_artifact_id},
+ {OPTION_PREFAB_GROUP_ID, ret.prefab_options.maybe_group_id},
+ {OPTION_PREFAB_SDK_MIN_VERSION, ret.prefab_options.maybe_min_sdk},
+ {OPTION_PREFAB_SDK_TARGET_VERSION, ret.prefab_options.maybe_target_sdk},
+ {OPTION_PREFAB_VERSION, ret.prefab_options.maybe_version},
+ });
options_implies(OPTION_CHOCOLATEY,
ret.chocolatey,
@@ -605,6 +642,10 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
Chocolatey::do_export(export_plan, paths, opts.chocolatey_options);
}
+ if(opts.prefab){
+ Prefab::do_export(export_plan, paths, opts.prefab_options, default_triplet);
+ }
+
Checks::exit_success(VCPKG_LINE_INFO);
}
}
diff --git a/toolsrc/src/vcpkg/export.prefab.cpp b/toolsrc/src/vcpkg/export.prefab.cpp
new file mode 100644
index 000000000..57b7ea99d
--- /dev/null
+++ b/toolsrc/src/vcpkg/export.prefab.cpp
@@ -0,0 +1,695 @@
+#include "pch.h"
+
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.print.h>
+#include <vcpkg/base/system.process.h>
+#include <vcpkg/build.h>
+#include <vcpkg/cmakevars.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/export.h>
+#include <vcpkg/export.prefab.h>
+#include <vcpkg/install.h>
+
+namespace vcpkg::Export::Prefab
+{
+ using Dependencies::ExportPlanAction;
+ using Dependencies::ExportPlanType;
+ using Install::InstallDir;
+ using System::CPUArchitecture;
+
+
+
+ std::vector<fs::path> find_modules(const VcpkgPaths& system, const fs::path& root, const std::string& ext)
+ {
+ std::vector<fs::path> paths;
+ Files::Filesystem& utils = system.get_filesystem();
+ std::error_code error_code;
+ if (!utils.exists(root, error_code) || !utils.is_directory(root)) return paths;
+
+ fs::stdfs::recursive_directory_iterator it(root);
+ fs::stdfs::recursive_directory_iterator endit;
+
+ while (it != endit)
+ {
+ if (utils.is_regular_file(*it) && it->path().extension() == ext)
+ {
+ paths.push_back(it->path().filename());
+ }
+ ++it;
+ }
+ return paths;
+ }
+
+ std::string NdkVersion::to_string()
+ {
+ std::string ret;
+ this->to_string(ret);
+ return ret;
+ }
+ void NdkVersion::to_string(std::string& out)
+ {
+ out.append("NdkVersion{major=")
+ .append(std::to_string(major()))
+ .append(",minor=")
+ .append(std::to_string(minor()))
+ .append(",patch=")
+ .append(std::to_string(patch()))
+ .append("}");
+ }
+
+ std::string jsonify(const std::vector<std::string>& dependencies)
+ {
+ std::vector<std::string> deps;
+ for (const auto& dep : dependencies)
+ {
+ deps.push_back("\"" + dep + "\"");
+ }
+ return Strings::join(",", deps);
+ }
+
+ std::string null_if_empty(const std::string& str)
+ {
+ std::string copy = str;
+ if (copy.size() == 0)
+ {
+ copy = "null";
+ }
+ else
+ {
+ copy = "\"" + copy + "\"";
+ }
+ return copy;
+ }
+
+ std::string null_if_empty_array(const std::string& str)
+ {
+ std::string copy = str;
+ if (copy.size() == 0)
+ {
+ copy = "null";
+ }
+ else
+ {
+ copy = "[" + copy + "]";
+ }
+ return copy;
+ }
+
+ std::string ABIMetadata::to_string()
+ {
+ std::string TEMPLATE = R"({
+ "abi":"@ABI@",
+ "api":@API@,
+ "ndk":@NDK@,
+ "stl":"@STL@"
+})";
+ std::string json = Strings::replace_all(std::move(TEMPLATE), "@ABI@", abi);
+ json = Strings::replace_all(std::move(json), "@API@", std::to_string(api));
+ json = Strings::replace_all(std::move(json), "@NDK@", std::to_string(ndk));
+ json = Strings::replace_all(std::move(json), "@STL@", stl);
+ return json;
+ }
+
+ std::string PlatformModuleMetadata::to_json()
+ {
+ std::string TEMPLATE = R"({
+ "export_libraries": @LIBRARIES@,
+ "library_name": @LIBRARY_NAME@
+})";
+
+ std::string json = Strings::replace_all(std::move(TEMPLATE), "@LIBRARY_NAME@", null_if_empty(library_name));
+ json = Strings::replace_all(std::move(json), "@LIBRARIES@", null_if_empty_array(jsonify(export_libraries)));
+ return json;
+ }
+
+ std::string ModuleMetadata::to_json()
+ {
+ std::string TEMPLATE = R"({
+ "export_libraries": [@LIBRARIES@],
+ "library_name":@LIBRARY_NAME@,
+ "android": @ANDROID_METADATA@
+})";
+
+ std::string json = Strings::replace_all(std::move(TEMPLATE), "@LIBRARY_NAME@", null_if_empty(library_name));
+ json = Strings::replace_all(std::move(json), "@LIBRARIES@", jsonify(export_libraries));
+ json = Strings::replace_all(std::move(json), "@ANDROID_METADATA@", android.to_json());
+ return json;
+ }
+
+ std::string PackageMetadata::to_json()
+ {
+ std::string deps = jsonify(dependencies);
+
+ std::string TEMPLATE = R"({
+ "name":"@PACKAGE_NAME@",
+ "schema_version": @PACKAGE_SCHEMA@,
+ "dependencies":[@PACKAGE_DEPS@],
+ "version":"@PACKAGE_VERSION@"
+})";
+ std::string json = Strings::replace_all(std::move(TEMPLATE), "@PACKAGE_NAME@", name);
+ json = Strings::replace_all(std::move(json), "@PACKAGE_SCHEMA@", std::to_string(schema));
+ json = Strings::replace_all(std::move(json), "@PACKAGE_DEPS@", deps);
+ json = Strings::replace_all(std::move(json), "@PACKAGE_VERSION@", version);
+ return json;
+ }
+
+ Optional<std::string> find_ndk_version(const std::string& content)
+ {
+ std::smatch pkg_match;
+ std::regex pkg_regex(R"(Pkg\.Revision\s*=\s*(\d+)(\.\d+)(\.\d+)\s*)");
+
+ if (std::regex_search(content, pkg_match, pkg_regex))
+ {
+ for (const auto& p : pkg_match)
+ {
+ std::string delimiter = "=";
+ std::string s = p.str();
+ auto it = s.find(delimiter);
+ if (it != std::string::npos)
+ {
+ std::string token = (s.substr(s.find(delimiter) + 1, s.size()));
+ return Strings::trim(std::move(token));
+ }
+ }
+ }
+ return {};
+ }
+
+ Optional<NdkVersion> to_version(const std::string& version)
+ {
+ if (version.size() > 100) return {};
+ size_t last = 0;
+ size_t next = 0;
+ std::vector<int> fragments(0);
+
+ while ((next = version.find(".", last)) != std::string::npos)
+ {
+ fragments.push_back(std::stoi(version.substr(last, next - last)));
+ last = next + 1;
+ }
+ fragments.push_back(std::stoi(version.substr(last)));
+ if (fragments.size() == kFragmentSize)
+ {
+ return NdkVersion(fragments[0], fragments[1], fragments[2]);
+ }
+ return {};
+ }
+
+ static void compress_directory(const VcpkgPaths& paths, const fs::path& source, const fs::path& destination)
+ {
+ auto& fs = paths.get_filesystem();
+
+ std::error_code ec;
+
+ fs.remove(destination, ec);
+ Checks::check_exit(
+ VCPKG_LINE_INFO, !fs.exists(destination), "Could not remove file: %s", destination.u8string());
+#if defined(_WIN32)
+ auto&& seven_zip_exe = paths.get_tool_exe(Tools::SEVEN_ZIP);
+
+ System::cmd_execute_and_capture_output(
+ Strings::format(
+ R"("%s" a "%s" "%s\*")", seven_zip_exe.u8string(), destination.u8string(), source.u8string()),
+ System::get_clean_environment());
+#else
+ System::cmd_execute_clean(
+ Strings::format(R"(cd '%s' && zip --quiet -r '%s' *)", source.u8string(), destination.u8string()));
+#endif
+ }
+
+ void maven_install(const fs::path& aar, const fs::path& pom, const Options& prefab_options)
+ {
+ if(prefab_options.enable_debug){
+ System::print2("\n[DEBUG] Installing POM and AAR file to ~/.m2\n\n");
+ }
+ const char* cmd_line_format = prefab_options.enable_debug ? R"("%s" "install:install-file" "-Dfile=%s" "-DpomFile=%s")"
+ : R"("%s" "-q" "install:install-file" "-Dfile=%s" "-DpomFile=%s")";
+
+ const auto cmd_line = Strings::format(cmd_line_format,
+ Tools::MAVEN,
+ aar.u8string(),
+ pom.u8string());
+ const int exit_code = System::cmd_execute_clean(cmd_line);
+ Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: %s installing maven file", aar.generic_u8string());
+ }
+
+ Build::PreBuildInfo build_info_from_triplet(const VcpkgPaths& paths,
+ const std::unique_ptr<CMakeVars::CMakeVarProvider>& provider,
+ const Triplet& triplet)
+ {
+ provider->load_generic_triplet_vars(triplet);
+ const Build::PreBuildInfo pre_build_info(
+ paths, triplet, provider->get_generic_triplet_vars(triplet).value_or_exit(VCPKG_LINE_INFO));
+ return pre_build_info;
+ }
+
+ bool is_supported(const Build::PreBuildInfo& info)
+ {
+ return Strings::case_insensitive_ascii_equals(info.cmake_system_name, "android");
+ }
+
+ void do_export(const std::vector<ExportPlanAction>& export_plan,
+ const VcpkgPaths& paths,
+ const Options& prefab_options,
+ const Triplet& default_triplet)
+ {
+ auto provider = CMakeVars::make_triplet_cmake_var_provider(paths);
+
+ auto build_info = build_info_from_triplet(paths, provider, default_triplet);
+ Checks::check_exit(VCPKG_LINE_INFO, is_supported(build_info), "Currenty supported on android triplets");
+
+ std::vector<VcpkgPaths::TripletFile> available_triplets = paths.get_available_triplets();
+
+ std::unordered_map<CPUArchitecture, std::string> required_archs = {
+ {CPUArchitecture::ARM, "armeabi-v7a"},
+ {CPUArchitecture::ARM64, "arm64-v8a"},
+ {CPUArchitecture::X86, "x86"},
+ {CPUArchitecture::X64, "x86_64"}};
+
+ std::unordered_map<CPUArchitecture, int> cpu_architecture_api_map = {{CPUArchitecture::ARM64, 21},
+ {CPUArchitecture::ARM, 16},
+ {CPUArchitecture::X64, 21},
+ {CPUArchitecture::X86, 16}};
+
+
+ std::vector<Triplet> triplets;
+ std::unordered_map<Triplet, std::string> triplet_abi_map;
+ std::unordered_map<Triplet, int> triplet_api_map;
+
+ for (auto& triplet_file : available_triplets){
+ if (triplet_file.name.size() > 0){
+ Triplet triplet = Triplet::from_canonical_name(std::move(triplet_file.name));
+ auto build_info = build_info_from_triplet(paths, provider, triplet);
+ if (is_supported(build_info)){
+ auto cpu_architecture =System::to_cpu_architecture(build_info.target_architecture).value_or_exit(VCPKG_LINE_INFO);
+ auto required_arch = required_archs.find(cpu_architecture);
+ if (required_arch != required_archs.end()){
+ triplets.push_back(triplet);
+ triplet_abi_map[triplet] = required_archs[cpu_architecture];
+ triplet_api_map[triplet] = cpu_architecture_api_map[cpu_architecture];
+ required_archs.erase(required_arch);
+ }
+ }
+ }
+ }
+
+
+ Checks::check_exit(
+ VCPKG_LINE_INFO, required_archs.empty(), "Export requires the following architectures arm64-v8a, armeabi-v7a, x86_64, x86 to be present");
+
+ Optional<std::string> android_ndk_home = System::get_environment_variable("ANDROID_NDK_HOME");
+
+ Checks::check_exit(
+ VCPKG_LINE_INFO, android_ndk_home.has_value(), "Error: ANDROID_NDK_HOME environment missing");
+
+ Files::Filesystem& utils = paths.get_filesystem();
+
+ const fs::path ndk_location = android_ndk_home.value_or_exit(VCPKG_LINE_INFO);
+
+ Checks::check_exit(VCPKG_LINE_INFO,
+ utils.exists(ndk_location),
+ "Error: ANDROID_NDK_HOME Directory does not exists %s",
+ ndk_location.generic_u8string());
+ const fs::path source_properties_location = ndk_location / "source.properties";
+
+ Checks::check_exit(VCPKG_LINE_INFO,
+ utils.exists(ndk_location),
+ "Error: source.properties missing in ANDROID_NDK_HOME directory %s",
+ source_properties_location.generic_u8string());
+
+ std::string content = utils.read_contents(source_properties_location, VCPKG_LINE_INFO);
+
+ Optional<std::string> version_opt = find_ndk_version(content);
+
+ Checks::check_exit(VCPKG_LINE_INFO,
+ version_opt.has_value(),
+ "Error: NDK version missing %s",
+ source_properties_location.generic_u8string());
+
+ NdkVersion version = to_version(version_opt.value_or_exit(VCPKG_LINE_INFO)).value_or_exit(VCPKG_LINE_INFO);
+
+ const fs::path vcpkg_root_path = paths.root;
+ const fs::path raw_exported_dir_path = vcpkg_root_path / "prefab";
+
+ utils.remove_all(raw_exported_dir_path, VCPKG_LINE_INFO);
+
+ /*
+ prefab
+ └── <name>
+ ├── aar
+ │   ├── AndroidManifest.xml
+ │   ├── META-INF
+ │   │   └── LICENCE
+ │   └── prefab
+ │   ├── modules
+ │   │   └── <module>
+ │   │   ├── include
+ │   │   ├── libs
+ │   │   │   ├── android.arm64-v8a
+ │   │   │   │   ├── abi.json
+ │   │   │   │   └── lib<module>.so
+ │   │   │   ├── android.armeabi-v7a
+ │   │   │   │   ├── abi.json
+ │   │   │   │   └── lib<module>.so
+ │   │   │   ├── android.x86
+ │   │   │   │   ├── abi.json
+ │   │   │   │   └── lib<module>.so
+ │   │   │   └── android.x86_64
+ │   │   │   ├── abi.json
+ │   │   │   └── lib<module>.so
+ │   │   └── module.json
+ │   └── prefab.json
+ ├── <name>-<version>.aar
+ └── pom.xml
+ */
+
+ std::unordered_map<std::string, std::string> version_map;
+
+ std::error_code error_code;
+
+ std::unordered_map<std::string, std::set<PackageSpec>> empty_package_dependencies;
+
+ //
+
+ for (const auto& action : export_plan)
+ {
+
+ const std::string name = action.spec.name();
+ auto dependencies = action.dependencies(default_triplet);
+
+ const auto build_info = Build::read_build_info(utils, paths.build_info_file_path(action.spec));
+ const bool is_empty_package = build_info.policies.is_enabled(Build::BuildPolicy::EMPTY_PACKAGE);
+
+
+ if(is_empty_package){
+ empty_package_dependencies[name] = std::set<PackageSpec>();
+ for(auto dependency : dependencies){
+ if(empty_package_dependencies.find(dependency.name()) != empty_package_dependencies.end()){
+ auto& child_deps = empty_package_dependencies[name];
+ auto& parent_deps = empty_package_dependencies[dependency.name()];
+ for(auto parent_dep: parent_deps){
+ child_deps.insert(parent_dep);
+ }
+ }
+ else {
+ empty_package_dependencies[name].insert(dependency);
+ }
+ }
+ continue;
+ }
+
+ const fs::path per_package_dir_path = raw_exported_dir_path / name;
+
+ const auto& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO);
+ const std::string norm_version = binary_paragraph.version;
+
+ version_map[name] = norm_version;
+
+ System::print2("\nExporting package ", name, "...\n");
+
+ fs::path package_directory = per_package_dir_path / "aar";
+ fs::path prefab_directory = package_directory / "prefab";
+ fs::path modules_directory = prefab_directory / "modules";
+
+ utils.create_directories(modules_directory, error_code);
+
+ std::string artifact_id = prefab_options.maybe_artifact_id.value_or(name);
+ std::string group_id = prefab_options.maybe_group_id.value_or("com.vcpkg.ndk.support");
+ std::string sdk_min_version = prefab_options.maybe_min_sdk.value_or("16");
+ std::string sdk_target_version = prefab_options.maybe_target_sdk.value_or("29");
+
+ std::string MANIFEST_TEMPLATE =
+ R"(<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="@GROUP_ID@.@ARTIFACT_ID@" android:versionCode="1" android:versionName="1.0">
+ <uses-sdk android:minSdkVersion="@MIN_SDK_VERSION@" android:targetSdkVersion="@SDK_TARGET_VERSION@" />
+</manifest>)";
+ std::string manifest = Strings::replace_all(std::move(MANIFEST_TEMPLATE), "@GROUP_ID@", group_id);
+ manifest = Strings::replace_all(std::move(manifest), "@ARTIFACT_ID@", artifact_id);
+ manifest = Strings::replace_all(std::move(manifest), "@MIN_SDK_VERSION@", sdk_min_version);
+ manifest = Strings::replace_all(std::move(manifest), "@SDK_TARGET_VERSION@", sdk_target_version);
+
+ fs::path manifest_path = package_directory / "AndroidManifest.xml";
+ fs::path prefab_path = prefab_directory / "prefab.json";
+
+ fs::path meta_dir = package_directory / "META-INF";
+
+ utils.create_directories(meta_dir, error_code);
+
+ const fs::path share_root =
+ vcpkg_root_path / "packages" / Strings::format("%s_%s", name, action.spec.triplet());
+
+ utils.copy_file(share_root / "share" / name / "copyright",
+ meta_dir / "LICENSE",
+ fs::copy_options::overwrite_existing,
+ error_code);
+
+ PackageMetadata pm;
+ pm.name = artifact_id;
+ pm.schema = 1;
+ pm.version = norm_version;
+
+ std::set<PackageSpec> dependencies_minus_empty_packages;
+
+ for(auto dependency: dependencies){
+ if(empty_package_dependencies.find(dependency.name()) != empty_package_dependencies.end()){
+ for(auto& empty_package_dep: empty_package_dependencies[dependency.name()]){
+ dependencies_minus_empty_packages.insert(empty_package_dep);
+ }
+ }
+ else {
+ dependencies_minus_empty_packages.insert(dependency);
+ }
+ }
+
+ std::vector<std::string> pom_dependencies;
+
+ if (dependencies_minus_empty_packages.size() > 0)
+ {
+ pom_dependencies.push_back("\n<dependencies>");
+ }
+
+ for (const auto& it : dependencies_minus_empty_packages)
+ {
+ std::string maven_pom = R"( <dependency>
+ <groupId>@GROUP_ID@</groupId>
+ <artifactId>@ARTIFACT_ID@</artifactId>
+ <version>@VERSION@</version>
+ <type>aar</type>
+ <scope>runtime</scope>
+ </dependency>)";
+ std::string pom = Strings::replace_all(std::move(maven_pom), "@GROUP_ID@", group_id);
+ pom = Strings::replace_all(std::move(pom), "@ARTIFACT_ID@", it.name());
+ pom = Strings::replace_all(std::move(pom), "@VERSION@", version_map[it.name()]);
+ pom_dependencies.push_back(pom);
+ pm.dependencies.push_back(it.name());
+ }
+
+ if (dependencies_minus_empty_packages.size() > 0)
+ {
+ pom_dependencies.push_back("</dependencies>\n");
+ }
+
+ if(prefab_options.enable_debug){
+ System::print2(Strings::format(
+ "[DEBUG]\n\tWriting manifest\n\tTo %s\n\tWriting prefab meta data\n\tTo %s\n\n",
+ manifest_path.generic_u8string(), prefab_path.generic_u8string()));
+ }
+
+ utils.write_contents(manifest_path, manifest, VCPKG_LINE_INFO);
+ utils.write_contents(prefab_path, pm.to_json(), VCPKG_LINE_INFO);
+
+ if(prefab_options.enable_debug){
+ std::vector<std::string> triplet_names;
+ for(auto triplet: triplets){
+ triplet_names.push_back(triplet.canonical_name());
+ }
+ System::print2(Strings::format("[DEBUG] Found %d triplets\n\t%s\n\n", triplets.size(),
+ Strings::join("\n\t", triplet_names)));
+ }
+
+ for (const auto& triplet : triplets)
+ {
+ const fs::path listfile = vcpkg_root_path / "installed" / "vcpkg" / "info" /
+ (Strings::format("%s_%s_%s", name, norm_version, triplet) + ".list");
+ const fs::path installed_dir = vcpkg_root_path / "packages" / Strings::format("%s_%s", name, triplet);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ utils.exists(listfile),
+ "Error: Packages not installed %s:%s %s",
+ name,
+ triplet,
+ listfile.generic_u8string());
+
+ fs::path libs = installed_dir / "lib";
+
+ std::vector<fs::path> modules;
+
+ std::vector<fs::path> modules_shared = find_modules(paths, libs, ".so");
+
+ for (const auto& module : modules_shared)
+ {
+ modules.push_back(module);
+ }
+
+ std::vector<fs::path> modules_static = find_modules(paths, libs, ".a");
+ for (const auto& module : modules_static)
+ {
+ modules.push_back(module);
+ }
+
+ // header only libs
+ if (modules.empty())
+ {
+ fs::path module_dir = modules_directory / name;
+ fs::path module_libs_dir = module_dir / "libs";
+ utils.create_directories(module_libs_dir, error_code);
+ fs::path installed_headers_dir = installed_dir / "include";
+ fs::path exported_headers_dir = module_dir / "include";
+
+ ModuleMetadata meta;
+ fs::path module_meta_path = module_dir / "module.json";
+ utils.write_contents(module_meta_path, meta.to_json(), VCPKG_LINE_INFO);
+
+ utils.copy(installed_headers_dir, exported_headers_dir, fs::copy_options::recursive);
+ break;
+ }
+ else
+ {
+ for (const auto& module : modules)
+ {
+ std::string module_name = module.stem().generic_u8string();
+ std::string extension = module.extension().generic_u8string();
+
+ ABIMetadata ab;
+ ab.abi = triplet_abi_map[triplet];
+ ab.api = triplet_api_map[triplet];
+
+ ab.stl = Strings::contains(extension, "a") ?"c++_static": "c++_shared";
+ ab.ndk = version.major();
+
+ if(prefab_options.enable_debug){
+ System::print2(Strings::format("[DEBUG] Found module %s:%s\n", module_name, ab.abi));
+ }
+
+ module_name = Strings::trim(std::move(module_name));
+
+ if (Strings::starts_with(module_name, "lib"))
+ {
+ module_name = module_name.substr(3);
+ }
+ fs::path module_dir = (modules_directory / module_name);
+ fs::path module_libs_dir =
+ module_dir / "libs" / Strings::format("android.%s", ab.abi);
+ utils.create_directories(module_libs_dir, error_code);
+
+ fs::path abi_path = module_libs_dir / "abi.json";
+
+ if(prefab_options.enable_debug){
+ System::print2(Strings::format("\tWriting abi metadata\n\tTo %s\n",
+ abi_path.generic_u8string()));
+ }
+ utils.write_contents(abi_path, ab.to_string(), VCPKG_LINE_INFO);
+
+ fs::path installed_module_path = libs / module.filename();
+ fs::path exported_module_path = module_libs_dir / module.filename();
+
+ utils.copy_file(installed_module_path,
+ exported_module_path,
+ fs::copy_options::overwrite_existing,
+ error_code);
+ if(prefab_options.enable_debug){
+ System::print2(Strings::format("\tCopying libs\n\tFrom %s\n\tTo %s\n",
+ installed_module_path.generic_u8string(), exported_module_path.generic_u8string()));
+ }
+ fs::path installed_headers_dir = installed_dir / "include";
+ fs::path exported_headers_dir = module_libs_dir / "include";
+
+
+ if(prefab_options.enable_debug){
+ System::print2(Strings::format("\tCopying headers\n\tFrom %s\n\tTo %s\n",
+ installed_headers_dir.generic_u8string(), exported_headers_dir.generic_u8string()));
+ }
+
+ utils.copy(installed_headers_dir, exported_headers_dir, fs::copy_options::recursive);
+
+ ModuleMetadata meta;
+
+ fs::path module_meta_path = module_dir / "module.json";
+
+ if(prefab_options.enable_debug){
+ System::print2(Strings::format("\tWriting module metadata\n\tTo %s\n\n",
+ module_meta_path.generic_u8string()));
+ }
+
+ utils.write_contents(module_meta_path, meta.to_json(), VCPKG_LINE_INFO);
+ }
+ }
+ }
+
+ fs::path exported_archive_path = per_package_dir_path / Strings::format("%s-%s.aar", name, norm_version);
+ fs::path pom_path = per_package_dir_path / "pom.xml";
+
+ if(prefab_options.enable_debug){
+ System::print2(Strings::format("[DEBUG] Exporting AAR And POM\n\tAAR Path %s\n\tPOM Path %s\n",
+ exported_archive_path.generic_u8string(), pom_path.generic_u8string()));
+ }
+
+ compress_directory(paths, package_directory, exported_archive_path);
+
+ std::string POM = R"(<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+ <groupId>@GROUP_ID@</groupId>
+ <artifactId>@ARTIFACT_ID@</artifactId>
+ <version>@VERSION@</version>
+ <packaging>aar</packaging>
+ <description>The Vcpkg AAR for @ARTIFACT_ID@</description>
+ <url>https://github.com/microsoft/vcpkg.git</url>
+ @DEPENDENCIES@
+</project>)";
+
+ std::string pom = Strings::replace_all(std::move(POM), "@GROUP_ID@", group_id);
+ pom = Strings::replace_all(std::move(pom), "@ARTIFACT_ID@", artifact_id);
+ pom = Strings::replace_all(std::move(pom), "@DEPENDENCIES@", Strings::join("\n", pom_dependencies));
+ pom = Strings::replace_all(std::move(pom), "@VERSION@", norm_version);
+
+ utils.write_contents(pom_path, pom, VCPKG_LINE_INFO);
+
+ if (prefab_options.enable_maven)
+ {
+
+ maven_install(exported_archive_path, pom_path, prefab_options);
+ if(prefab_options.enable_debug){
+ System::print2(
+ Strings::format("\n\n[DEBUG] Configuration properties in Android Studio\nIn app/build.gradle\n\n\t%s:%s:%s\n\n",
+ group_id, artifact_id, norm_version));
+
+ System::print2(R"(And cmake flags
+
+ externalNativeBuild {
+ cmake {
+ arguments '-DANDROID_STL=c++_shared'
+ cppFlags "-std=c++17"
+ }
+ }
+
+)");
+
+ System::print2(R"(In gradle.properties
+
+ android.enablePrefab=true
+ android.enableParallelJsonGen=false
+ android.prefabVersion=${prefab.version}
+
+)");}
+ }
+ System::print2(System::Color::success,
+ Strings::format("Successfuly exported %s. Checkout %s \n",
+ name,
+ raw_exported_dir_path.generic_u8string()));
+ }
+ }
+}
diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp
index 8026baa8a..47b824989 100644
--- a/toolsrc/src/vcpkg/triplet.cpp
+++ b/toolsrc/src/vcpkg/triplet.cpp
@@ -39,6 +39,12 @@ namespace vcpkg
const Triplet Triplet::ARM_UWP = from_canonical_name("arm-uwp");
const Triplet Triplet::ARM64_UWP = from_canonical_name("arm64-uwp");
+ //
+ const Triplet Triplet::ARM_ANDROID = from_canonical_name("arm-android");
+ const Triplet Triplet::ARM64_ANDROID = from_canonical_name("arm64-android");
+ const Triplet Triplet::X86_ANDROID = from_canonical_name("x86-android");
+ const Triplet Triplet::X64_ANDROID = from_canonical_name("x64-android");
+
Triplet Triplet::from_canonical_name(std::string&& triplet_as_string)
{
std::string s(Strings::ascii_to_lowercase(std::move(triplet_as_string)));
@@ -55,19 +61,19 @@ namespace vcpkg
Optional<System::CPUArchitecture> Triplet::guess_architecture() const noexcept
{
using System::CPUArchitecture;
- if (*this == X86_WINDOWS || *this == X86_UWP)
+ if (*this == X86_WINDOWS || *this == X86_UWP || *this == X86_ANDROID)
{
return CPUArchitecture::X86;
}
- else if (*this == X64_WINDOWS || *this == X64_UWP)
+ else if (*this == X64_WINDOWS || *this == X64_UWP || *this ==X64_ANDROID)
{
return CPUArchitecture::X64;
}
- else if (*this == ARM_WINDOWS || *this == ARM_UWP)
+ else if (*this == ARM_WINDOWS || *this == ARM_UWP || *this == ARM_ANDROID)
{
return CPUArchitecture::ARM;
}
- else if (*this == ARM64_WINDOWS || *this == ARM64_UWP)
+ else if (*this == ARM64_WINDOWS || *this == ARM64_UWP || *this == ARM64_ANDROID)
{
return CPUArchitecture::ARM64;
}
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj
index fc6d37de7..78a2cc322 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj
@@ -179,6 +179,7 @@
<ClInclude Include="..\include\vcpkg\export.chocolatey.h" />
<ClInclude Include="..\include\vcpkg\export.h" />
<ClInclude Include="..\include\vcpkg\export.ifw.h" />
+ <ClInclude Include="..\include\vcpkg\export.prefab.h" />
<ClInclude Include="..\include\vcpkg\globalstate.h" />
<ClInclude Include="..\include\vcpkg\help.h" />
<ClInclude Include="..\include\vcpkg\input.h" />
@@ -258,6 +259,7 @@
<ClCompile Include="..\src\vcpkg\dependencies.cpp" />
<ClCompile Include="..\src\vcpkg\export.cpp" />
<ClCompile Include="..\src\vcpkg\export.chocolatey.cpp" />
+ <ClCompile Include="..\src\vcpkg\export.prefab.cpp" />
<ClCompile Include="..\src\vcpkg\globalstate.cpp" />
<ClCompile Include="..\src\vcpkg\help.cpp" />
<ClCompile Include="..\src\vcpkg\input.cpp" />