diff options
| author | Daniel Shaw <t-dansha@microsoft.com> | 2017-07-14 13:22:09 -0700 |
|---|---|---|
| committer | Daniel Shaw <t-dansha@microsoft.com> | 2017-07-14 13:22:09 -0700 |
| commit | 4f7f1cf5d159f69af5f10925245799dc91af7968 (patch) | |
| tree | 9495a6abfe8494d8276dadef6c160e88d35128f1 | |
| parent | 336e25218a73f9b54120e3c35b3d28e6426deeb1 (diff) | |
| parent | 2055a9cd4490861aa7ce9e1af23c0232f97552c9 (diff) | |
| download | vcpkg-4f7f1cf5d159f69af5f10925245799dc91af7968.tar.gz vcpkg-4f7f1cf5d159f69af5f10925245799dc91af7968.zip | |
Merge remote-tracking branch 'origin' into create_install_tests
158 files changed, 4291 insertions, 797 deletions
diff --git a/docs/users/integration.md b/docs/users/integration.md index 1e52adb88..f1b5014bf 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -107,8 +107,8 @@ To override the automatically chosen [triplet][], you can specify the MSBuild pr ```xml <PropertyGroup Label="Globals"> <!-- .... --> - <VcpkgTriplet Condition="'$(Configuration)'=='Win32'">x86-windows-static</VcpkgTriplet> - <VcpkgTriplet Condition="'$(Configuration)'=='x64'">x64-windows-static</VcpkgTriplet> + <VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet> + <VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet> </PropertyGroup> ``` diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL new file mode 100644 index 000000000..29ec78bc1 --- /dev/null +++ b/ports/alembic/CONTROL @@ -0,0 +1,4 @@ +Source: alembic +Version: 1.7.1 +Build-Depends:ilmbase +Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake new file mode 100644 index 000000000..b57a1232d --- /dev/null +++ b/ports/alembic/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Alembic does not support static linkage. Building dynamically.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alembic/alembic + REF 1.7.1 + SHA512 89e30b681a76eaf79b20ebeff62c495971b0eb64b28f249a14bbcf3bdb40df7eda93b0ede299dd5511bd4587a2cc2d4ebd851fb89bf999fdccc31fee3cffbba2 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Alembic") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${EXE}) +file(REMOVE ${DEBUG_EXE}) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll) + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Alembic/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/Alembic/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/Alembic/copyright) diff --git a/ports/angle/001-fix-uwp.patch b/ports/angle/001-fix-uwp.patch new file mode 100644 index 000000000..bae1c8724 --- /dev/null +++ b/ports/angle/001-fix-uwp.patch @@ -0,0 +1,113 @@ +diff --git "a//src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" +index dd37ace8..9116b9e6 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" +@@ -141,6 +141,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, + unsigned int width, + unsigned int height, + bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) + { + if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 || +@@ -154,7 +155,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, + swapChainDesc.Height = height; + swapChainDesc.Format = format; + swapChainDesc.Stereo = FALSE; +- swapChainDesc.SampleDesc.Count = 1; ++ swapChainDesc.SampleDesc.Count = samples; + swapChainDesc.SampleDesc.Quality = 0; + swapChainDesc.BufferUsage = + DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER; +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" +index d43bf0ba..77b4ae95 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" +@@ -32,7 +32,8 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, public std::enabl + DXGI_FORMAT format, + unsigned int width, + unsigned int height, +- bool containsAlpha, ++ bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) override; + + protected: +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" +index 3e67269f..a66935ce 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" +@@ -53,6 +53,7 @@ class InspectableNativeWindow + unsigned int width, + unsigned int height, + bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) = 0; + + bool getClientRect(RECT *rect) +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" +index 2ef2235c..284fccbb 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" +@@ -89,6 +89,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, + DXGI_FORMAT format, + UINT width, + UINT height, ++ UINT samples, + IDXGISwapChain **swapChain) + { + if (mImpl) +@@ -96,7 +97,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, + IDXGIFactory2 *factory2 = d3d11::DynamicCastComObject<IDXGIFactory2>(factory); + IDXGISwapChain1 *swapChain1 = nullptr; + HRESULT result = +- mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, &swapChain1); ++ mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, samples, &swapChain1); + SafeRelease(factory2); + *swapChain = static_cast<IDXGISwapChain *>(swapChain1); + return result; +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" +index 996fd3a1..97a2c2c4 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" +@@ -34,6 +34,7 @@ class NativeWindow11WinRT : public NativeWindow11 + DXGI_FORMAT format, + UINT width, + UINT height, ++ UINT samples, + IDXGISwapChain **swapChain) override; + + void commitChange() override; +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" +index c6d07fc8..89d9f870 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" +@@ -246,6 +246,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device, + unsigned int width, + unsigned int height, + bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) + { + if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 || +@@ -259,7 +260,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device, + swapChainDesc.Height = height; + swapChainDesc.Format = format; + swapChainDesc.Stereo = FALSE; +- swapChainDesc.SampleDesc.Count = 1; ++ swapChainDesc.SampleDesc.Count = samples; + swapChainDesc.SampleDesc.Quality = 0; + swapChainDesc.BufferUsage = + DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER; +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" +index f9a2fc0e..dc5c804e 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" +@@ -27,6 +27,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, public std::e + unsigned int width, + unsigned int height, + bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) override; + + protected: diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt new file mode 100644 index 000000000..5a4c05359 --- /dev/null +++ b/ports/angle/CMakeLists.txt @@ -0,0 +1,206 @@ +cmake_minimum_required(VERSION 3.8) +project(angle CXX) + +if(WIN32 AND NOT WINDOWS_STORE) + set(WINDOWS_DESKTOP 1) +else() + set(WINDOWS_DESKTOP 0) +endif() + +add_compile_options(/d2guard4 /Wv:18) +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") + +add_definitions( + -D_CRT_SECURE_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + -D_HAS_EXCEPTIONS=0 + -DNOMINMAX + -DANGLE_STANDALONE_BUILD + -DANGLE_ENABLE_DEBUG_ANNOTATIONS +) + +configure_file(commit.h include/id/commit.h COPYONLY) +include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) + +########## +# angle::common +file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp" "src/common/third_party/base/*.h") +list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) +target_include_directories(angle_common PUBLIC src/common/third_party/base) +add_library(angle::common ALIAS angle_common) + +########## +# angle::image_util +file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") +add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) +target_link_libraries(angle_image_util PRIVATE angle::common) +add_library(angle::image_util ALIAS angle_image_util) + +########## +# angle::translator +file(GLOB TRANSLATOR_SOURCES + "src/compiler/translator/glslang.l" + "src/compiler/translator/glslang.y" + "src/compiler/translator/*.h" + "src/compiler/translator/*.cpp" + "src/third_party/compiler/ArrayBoundsClamper.cpp" +) +add_library(angle_translator STATIC ${TRANSLATOR_SOURCES}) +target_compile_definitions(angle_translator PUBLIC + -DANGLE_ENABLE_ESSL + -DANGLE_ENABLE_GLSL + -DANGLE_ENABLE_HLSL +) +target_link_libraries(angle_translator PRIVATE angle::common) +add_library(angle::translator ALIAS angle_translator) + +########## +# angle::preprocessor +file(GLOB PREPROCESSOR_SOURCES + "src/compiler/preprocessor/*.h" + "src/compiler/preprocessor/*.cpp" +) +add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES}) +target_link_libraries(angle_preprocessor PRIVATE angle::common) +add_library(angle::preprocessor ALIAS angle_preprocessor) + +########## +# libANGLE + +## OpenGL Renderer +if(WINDOWS_DESKTOP) + file(GLOB LIBANGLE_GL_SOURCES + "src/libANGLE/renderer/gl/*.cpp" + "src/libANGLE/renderer/gl/*.inl" + "src/libANGLE/renderer/gl/*.h" + + "src/libANGLE/renderer/gl/wgl/*.cpp" + "src/libANGLE/renderer/gl/wgl/*.inl" + "src/libANGLE/renderer/gl/wgl/*.h" + ) + list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest") + add_library(angle_renderer_opengl INTERFACE) + target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES}) + target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL) + add_library(angle::renderer::opengl ALIAS angle_renderer_opengl) +endif() + +## All D3D Sources +file(GLOB_RECURSE LIBANGLE_D3D_SOURCES + "src/libANGLE/renderer/d3d/*.cpp" + "src/libANGLE/renderer/d3d/*.inl" + "src/libANGLE/renderer/d3d/*.h" +) +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest") + +## WinRT D3D Renderer +if(WINDOWS_STORE) + set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt") + add_library(angle_renderer_winrt INTERFACE) + target_sources(angle_renderer_winrt INTERFACE ${LIBANGLE_D3D_WINRT_SOURCES}) + add_library(angle::renderer::winrt ALIAS angle_renderer_winrt) +endif() + +## Win32/d3d9 D3D Renderer +if(WINDOWS_DESKTOP) + set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32") + find_library(D3D9_LIB NAMES d3d9) + add_library(angle_renderer_win32 INTERFACE) + target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES}) + target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9) + target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB}) + add_library(angle::renderer::win32 ALIAS angle_renderer_win32) +endif() + +## D3D11 Base renderer +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32") +find_library(DXGUID_LIB NAMES dxguid) +find_library(D3D11_LIB NAMES d3d11) +add_library(angle_renderer_d3d INTERFACE) +target_sources(angle_renderer_d3d INTERFACE ${LIBANGLE_D3D_SOURCES}) +target_compile_definitions(angle_renderer_d3d INTERFACE + -DANGLE_ENABLE_D3D11 + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" +) +target_link_libraries(angle_renderer_d3d INTERFACE ${D3D11_LIB} ${DXGUID_LIB}) +add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) + +## Core libANGLE library +file(GLOB LIBANGLE_SOURCES + "src/third_party/systeminfo/SystemInfo.cpp" + "src/common/third_party/murmurhash/MurmurHash3.cpp" + "src/common/event_tracer.cpp" + + "src/libANGLE/*.cpp" + "src/libANGLE/*.inl" + "src/libANGLE/*.h" + + "src/libANGLE/renderer/*.cpp" + "src/libANGLE/renderer/*.inl" + "src/libANGLE/renderer/*.h" + + "src/libANGLE/renderer/null/*.cpp" + "src/libANGLE/renderer/null/*.inl" + "src/libANGLE/renderer/null/*.h" +) +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") + +add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) +target_link_libraries(libANGLE PRIVATE + angle::common + angle::image_util + angle::translator + angle::preprocessor + angle::renderer::d3d + $<$<BOOL:${WINDOWS_STORE}>:angle::renderer::winrt> + $<$<BOOL:${WINDOWS_DESKTOP}>:angle::renderer::win32> + $<$<BOOL:${WINDOWS_DESKTOP}>:angle::renderer::opengl> +) +target_include_directories(libANGLE PRIVATE "src/third_party/khronos") +target_compile_definitions(libANGLE + PRIVATE -DANGLE_ENABLE_NULL + PUBLIC -DLIBANGLE_IMPLEMENTATION +) +add_library(angle::libANGLE ALIAS libANGLE) + +########## +# libGLESv2 +file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") +add_library(libGLESv2 ${LIBGLESV2_SOURCES}) +target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE) +target_compile_definitions(libGLESv2 + PRIVATE -DLIBGLESV2_IMPLEMENTATION + PUBLIC + -DGL_GLEXT_PROTOTYPES + -DGL_APICALL= + -DEGLAPI= +) + +########## +# libEGL +add_library(libEGL + "src/libEGL/libEGL.def" + "src/libEGL/libEGL.cpp" + "src/libEGL/libEGL.rc" + "src/libEGL/resource.h" +) +target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) + +install(TARGETS libEGL libGLESv2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" + PATTERN "GLSLANG" EXCLUDE + PATTERN "export.h" EXCLUDE + ) +endif() diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL new file mode 100644 index 000000000..a7e261bb1 --- /dev/null +++ b/ports/angle/CONTROL @@ -0,0 +1,4 @@ +Source: angle
+Version: 2017-06-14-8d471f-1
+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.
diff --git a/ports/angle/commit.h b/ports/angle/commit.h new file mode 100644 index 000000000..57a20e3b7 --- /dev/null +++ b/ports/angle/commit.h @@ -0,0 +1,3 @@ +#define ANGLE_COMMIT_HASH "invalid-hash"
+#define ANGLE_COMMIT_HASH_SIZE 12
+#define ANGLE_COMMIT_DATE "invalid-date"
diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake new file mode 100644 index 000000000..aebf528dd --- /dev/null +++ b/ports/angle/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(STATUS "ANGLE currently only supports being built as a dynamic library")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
+
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(FATAL_ERROR "ANGLE currently only supports being built for desktop")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/angle
+ REF 8d471f907d8d4ec1d46bc9366493bd76c11c1870
+ SHA512 b9235d2a98330bc8533c3fe871129e7235c680420eac16610eae4ca7224c5284313ab6377f30ddfb8a2da39b69f3ef0d16023fe1e7cec3fc2198f4eb4bdccb26
+ HEAD_REF master
+)
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/angle RENAME copyright)
diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index eed3c518d..ac1b7d5c3 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,3 +1,3 @@ Source: apr -Version: 1.5.2 +Version: 1.6.2 Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index f65b44649..414ca1dda 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -7,11 +7,11 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-1.5.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-1.6.2) vcpkg_download_distfile(ARCHIVE - URLS "https://www.apache.org/dist/apr/apr-1.5.2.tar.bz2" - FILENAME "apr-1.5.2.tar.bz2" - SHA512 d1156ad16abf07887797777b56c2147c890f16d8445829b3e3b4917950d24c5fd2f8febd439992467a5ea0511da562c0fb4a7cfd8a235ab55882388bfa2b919d + URLS "https://www.apache.org/dist/apr/apr-1.6.2.tar.bz2" + FILENAME "apr-1.6.2.tar.bz2" + SHA512 20f449fde522f186b919b64ce6f90073b267557e17438607d31af917eca7941222dd7a7379d66f1430ff68f7e28fbccd140d24f3ca7aae8a876a550b19de284a ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt new file mode 100644 index 000000000..3e20a28f6 --- /dev/null +++ b/ports/aubio/CMakeLists.txt @@ -0,0 +1,94 @@ +cmake_minimum_required(VERSION 3.8) +project(aubio C) + +add_definitions( + -DHAVE_STDLIB_H=1 + -DHAVE_STDIO_H=1 + -DHAVE_MATH_H=1 + -DHAVE_STRING_H=1 + -DHAVE_LIMITS_H=1 + -DHAVE_STDARG_H=1 + -DHAVE_C99_VARARGS_MACROS=1 + + -DHAVE_SNDFILE=1 + -DHAVE_WAVWRITE=1 + -DHAVE_WAVREAD=1 + -DHAVE_LIBAV=1 + -DHAVE_SWRESAMPLE=1 +) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_DEBUG_POSTFIX d) + +option(BUILD_TOOLS "Build and install tools" ON) +set(TOOLS_INSTALLDIR "bin" CACHE STRING "Target directory for installed tools") + +find_path(LIBSNDFILE_H sndfile.h) +find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) +find_library(AVCODEC_LIB avcodec) +find_library(AVUTIL_LIB avutil) +find_library(AVDEVICE_LIB avdevice) +find_library(AVFILTER_LIB avfilter) +find_library(AVFORMAT_LIB avformat) +find_library(SWRESAMPLE_LIB swresample) +find_library(OGG_LIB ogg) +find_library(FLAC_LIB flac) +find_library(VORBIS_LIB vorbis) +find_library(VORBISENC_LIB vorbisenc) + +include_directories(src ${LIBSNDFILE_H}) + +file(GLOB_RECURSE SOURCES src/*.c) + +set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) +add_library(aubio ${SOURCES}) +target_link_libraries(aubio PUBLIC + ${LIBSNDFILE_LIB} + ${OGG_LIB} + ${FLAC_LIB} + ${VORBIS_LIB} + ${VORBISENC_LIB} + ${AVCODEC_LIB} + ${AVUTIL_LIB} + ${AVDEVICE_LIB} + ${AVFILTER_LIB} + ${AVFORMAT_LIB} + ${SWRESAMPLE_LIB} + ws2_32.lib +) + +if(BUILD_TOOLS) + set(EXAMPLE_EXECS aubiomfcc aubionotes aubioonset aubiopitch aubioquiet aubiotrack) + foreach(EXAMPLE_EXEC ${EXAMPLE_EXECS}) + add_executable(${EXAMPLE_EXEC} examples/${EXAMPLE_EXEC}.c examples/utils.c examples/jackio.c) + target_link_libraries(${EXAMPLE_EXEC} PRIVATE aubio) + target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_WIN_HACKS=1) + endforeach() + # Create and add fake config.h to avoid build errors (file is generated for + # cross-platform requirements in waf build-system) + file(WRITE "${CMAKE_BINARY_DIR}/config.h" "") + include_directories(${CMAKE_BINARY_DIR}) + + install( + TARGETS ${EXAMPLE_EXECS} + RUNTIME DESTINATION ${TOOLS_INSTALLDIR} + ) +endif() + +install( + TARGETS aubio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY src/ + DESTINATION include/aubio + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE + ) +endif() diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL new file mode 100644 index 000000000..55b20f655 --- /dev/null +++ b/ports/aubio/CONTROL @@ -0,0 +1,4 @@ +Source: aubio +Version: 0.46~alpha-2 +Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. +Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake new file mode 100644 index 000000000..9421f2487 --- /dev/null +++ b/ports/aubio/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aubio-3c230fae309e9ea3298783368dd71bae6172359a) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/aubio/aubio/archive/3c230fae309e9ea3298783368dd71bae6172359a.zip" + FILENAME "aubio-0.4.6-3c230f.zip" + SHA512 081fe59612f0b1860f465208739b1377869c64b91cecf4a6f6fbdea19204b801c650ff956b34be5988ef1905f3546d3c55846037487e0b34b014f1adbb68629c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE + -DTOOLS_INSTALLDIR=tools/aubio + -DBUILD_TOOLS=ON + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=1 + -DBUILD_TOOLS=OFF +) +vcpkg_install_cmake() + +# Handle copyright and credentials +file(COPY + ${SOURCE_PATH}/COPYING + ${SOURCE_PATH}/AUTHORS + ${SOURCE_PATH}/ChangeLog + ${SOURCE_PATH}/README.md + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/aubio) + +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/aubio) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/aubio/COPYING ${CURRENT_PACKAGES_DIR}/share/aubio/copyright) diff --git a/ports/aurora/CONTROL b/ports/aurora/CONTROL new file mode 100644 index 000000000..172c019cd --- /dev/null +++ b/ports/aurora/CONTROL @@ -0,0 +1,3 @@ +Source: aurora +Version: 2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933 +Description: Aurora is an open-source C++ library providing various rather uncommon C++ utilities diff --git a/ports/aurora/portfile.cmake b/ports/aurora/portfile.cmake new file mode 100644 index 000000000..32e3d804f --- /dev/null +++ b/ports/aurora/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Bromeon/Aurora + REF c75699d2a8caa726260c29b6d7a0fd35f8f28933 + SHA512 862253e281eb441b773feb330d5ce4d7fe10769f516e927c0f875477ec912671fc35132a48986b2394f6d0a7160a5cb70afe868c597350c385ce23686b9613d6 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/aurora RENAME copyright) +vcpkg_copy_pdbs() diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index c0dc43c05..5c32ec3e1 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v66 +Version: v76 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 726be4b1e..3f6b29705 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF 7fb75d0627f7842a6a706b810d427962509e0e52 - SHA512 5d086d2edf18facc3f379c42ffcc2679f9c03f891d58f2c8e6cb1a9aa6ee73b232544d1c2a86ce9c42dbc9a41a58bd3480f958cc1c569e8b3b1890755ecfd7fc + REF 1bc30cb6e4ce0fd2e288b2cd74d18f857801cbc7 + SHA512 c3d6b99273c2b2acdd366547119e78c25f788dabfae11f533aea8d31d03383b46516398370103b01e3b9bb0bb3921c981299cd3591107845630181b48e3b010e HEAD_REF master ) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index b8d56ee90..8db544237 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE}) # apply boost range hotfix vcpkg_download_distfile(DIFF URLS "https://github.com/boostorg/range/commit/e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff" - FILENAME "boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff" - SHA512 77dad42bfd9bbab2bbddf361d5b7ad3dd6f812f4294c6dd1a677bb4d0191a4fff43bca32fdd4fce05d428562abb6e38afd0fd33ca6a8b5f28481d70cd2f3dd67 + FILENAME "boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2-2.diff" + SHA512 88392fcf092d07ee2de66d937634688eef1d7491a4e2fb0fce064b4e631813a0814455a329f9eed8b968ff205883751d51a86edecc8e355790fc8a35d6742483 ) FILE(READ "${DIFF}" content) diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt index 348732130..692c29cd5 100644 --- a/ports/cairo/CMakeLists.txt +++ b/ports/cairo/CMakeLists.txt @@ -1,3 +1,213 @@ cmake_minimum_required(VERSION 3.0) -project(cairo VERSION 1.14.6 LANGUAGES C CXX) -add_subdirectory(src) +project(cairo C) + +# Add include directories +include_directories("." "./win32") + +file(GLOB SOURCES +"cairo-analysis-surface.c" +"cairo-arc.c" +"cairo-array.c" +"cairo-atomic.c" +"cairo-base64-stream.c" +"cairo-base85-stream.c" +"cairo-bentley-ottmann.c" +"cairo-bentley-ottmann-rectangular.c" +"cairo-bentley-ottmann-rectilinear.c" +"cairo-botor-scan-converter.c" +"cairo-boxes.c" +"cairo-boxes-intersect.c" +"cairo.c" +"cairo-cache.c" +"cairo-clip.c" +"cairo-clip-boxes.c" +"cairo-clip-polygon.c" +"cairo-clip-region.c" +"cairo-clip-surface.c" +"cairo-color.c" +"cairo-composite-rectangles.c" +"cairo-compositor.c" +"cairo-contour.c" +"cairo-damage.c" +"cairo-debug.c" +"cairo-default-context.c" +"cairo-device.c" +"cairo-error.c" +"cairo-fallback-compositor.c" +"cairo-fixed.c" +"cairo-font-face.c" +"cairo-font-face-twin.c" +"cairo-font-face-twin-data.c" +"cairo-font-options.c" +"cairo-freelist.c" +"cairo-freed-pool.c" +"cairo-gstate.c" +"cairo-hash.c" +"cairo-hull.c" +"cairo-image-compositor.c" +"cairo-image-info.c" +"cairo-image-source.c" +"cairo-image-surface.c" +"cairo-line.c" +"cairo-lzw.c" +"cairo-matrix.c" +"cairo-mask-compositor.c" +"cairo-mesh-pattern-rasterizer.c" +"cairo-mempool.c" +"cairo-misc.c" +"cairo-mono-scan-converter.c" +"cairo-mutex.c" +"cairo-no-compositor.c" +"cairo-observer.c" +"cairo-output-stream.c" +"cairo-paginated-surface.c" +"cairo-path-bounds.c" +"cairo-path.c" +"cairo-path-fill.c" +"cairo-path-fixed.c" +"cairo-path-in-fill.c" +"cairo-path-stroke.c" +"cairo-path-stroke-boxes.c" +"cairo-path-stroke-polygon.c" +"cairo-path-stroke-traps.c" +"cairo-path-stroke-tristrip.c" +"cairo-pattern.c" +"cairo-pen.c" +"cairo-polygon.c" +"cairo-polygon-intersect.c" +"cairo-polygon-reduce.c" +"cairo-raster-source-pattern.c" +"cairo-recording-surface.c" +"cairo-rectangle.c" +"cairo-rectangular-scan-converter.c" +"cairo-region.c" +"cairo-rtree.c" +"cairo-scaled-font.c" +"cairo-shape-mask-compositor.c" +"cairo-slope.c" +"cairo-spans.c" +"cairo-spans-compositor.c" +"cairo-spline.c" +"cairo-stroke-dash.c" +"cairo-stroke-style.c" +"cairo-surface.c" +"cairo-surface-clipper.c" +"cairo-surface-fallback.c" +"cairo-surface-observer.c" +"cairo-surface-offset.c" +"cairo-surface-snapshot.c" +"cairo-surface-subsurface.c" +"cairo-surface-wrapper.c" +"cairo-time.c" +"cairo-tor-scan-converter.c" +"cairo-tor22-scan-converter.c" +"cairo-clip-tor-scan-converter.c" +"cairo-tag-attributes.c" +"cairo-tag-stack.c" +"cairo-toy-font-face.c" +"cairo-traps.c" +"cairo-tristrip.c" +"cairo-traps-compositor.c" +"cairo-unicode.c" +"cairo-user-font.c" +"cairo-version.c" +"cairo-wideint.c" +# win32 +"win32/cairo-win32-debug.c" +"win32/cairo-win32-device.c" +"win32/cairo-win32-gdi-compositor.c" +"win32/cairo-win32-system.c" +"win32/cairo-win32-surface.c" +"win32/cairo-win32-display-surface.c" +"win32/cairo-win32-printing-surface.c" +"win32/cairo-win32-font.c" +# generic font support +"cairo-cff-subset.c" +"cairo-scaled-font-subsets.c" +"cairo-truetype-subset.c" +"cairo-type1-fallback.c" +"cairo-type1-glyph-names.c" +"cairo-type1-subset.c" +"cairo-type3-glyph-surface.c" +# pdf +"cairo-pdf-interchange.c" +"cairo-pdf-operators.c" +"cairo-pdf-shading.c" +"cairo-pdf-surface.c" +# png +"cairo-png.c" +# ps surface +"cairo-ps-surface.c" +# deflate source +"cairo-deflate-stream.c" +# svg surface +"cairo-svg-surface.c" +# script surface +"cairo-script-surface.c" +# fontconfig + freetype +"cairo-ft-font.c" +) + +set(CMAKE_DEBUG_POSTFIX "d") + +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) + +# Make the pixman library available +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(PIXMAN_SUFFIX "d") +endif() +find_library(PIXMAN_LIBRARY NAMES pixman-1${PIXMAN_SUFFIX}) + +find_package(Freetype CONFIG REQUIRED) + +# Cairo needs to be told which features of FreeType are availible +add_definitions( + -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 + -DHAVE_FT_LIBRARY_SETLCDFILTER=1 + -DHAVE_FT_GLYPHSLOT_OBLIQUE=1 + -DHAVE_FT_LOAD_SFNT_TABLE=1 + -DHAVE_FT_GET_X11_FONT_FORMAT=1) + +# Find FontConfig +find_library(FONTCONFIG_LIBRARY fontconfig) + +add_library(cairo ${SOURCES}) +# cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files +target_compile_options(cairo PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" + PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101") +target_link_libraries(cairo gdi32 msimg32 user32 ZLIB::ZLIB PNG::PNG freetype ${PIXMAN_LIBRARY} ${FONTCONFIG_LIBRARY}) + +install(TARGETS cairo + RUNTIME DESTINATION bin + LIBRARY DESTINATION bin + ARCHIVE DESTINATION lib +) + +# GObject support module + +set(CAIRO_GOBJECT_SOURCES + "../util/cairo-gobject/cairo-gobject-enums.c" + "../util/cairo-gobject/cairo-gobject-structs.c") + +# GObject support sources do not include header with export macro +if(BUILD_SHARED_LIBS) + set_source_files_properties( + "../util/cairo-gobject/cairo-gobject-enums.c" + "../util/cairo-gobject/cairo-gobject-structs.c" + PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)") +endif() + +# Make GLib's GObject available +find_path(GLIB_INCLUDE_DIR glib.h) +find_library(GLIB_LIBRARY NAMES glib-2.0) +find_library(GOBJECT_LIBRARY NAMES gobject-2.0) +set(GLIB_LIBRARIES ${GLIB_LIBRARY} ${GOBJECT_LIBRARY}) + +add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES}) +target_link_libraries(cairo-gobject cairo ${GLIB_LIBRARIES}) +target_include_directories(cairo-gobject PRIVATE ${GLIB_INCLUDE_DIR}) +install(TARGETS cairo-gobject + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/ports/cairo/CMakeLists_cairo.txt b/ports/cairo/CMakeLists_cairo.txt deleted file mode 100644 index 33077bc21..000000000 --- a/ports/cairo/CMakeLists_cairo.txt +++ /dev/null @@ -1,311 +0,0 @@ -set(CURRENT_INSTALLED_DIR ${CMAKE_PREFIX_PATH}) - -# Add include directories -include_directories("." "./win32" "${CURRENT_INSTALLED_DIR}/include") - -file(GLOB SOURCES -"cairo-analysis-surface.c" -"cairo-arc.c" -"cairo-array.c" -"cairo-atomic.c" -"cairo-base64-stream.c" -"cairo-base85-stream.c" -"cairo-bentley-ottmann.c" -"cairo-bentley-ottmann-rectangular.c" -"cairo-bentley-ottmann-rectilinear.c" -"cairo-botor-scan-converter.c" -"cairo-boxes.c" -"cairo-boxes-intersect.c" -"cairo.c" -"cairo-cache.c" -"cairo-clip.c" -"cairo-clip-boxes.c" -"cairo-clip-polygon.c" -"cairo-clip-region.c" -"cairo-clip-surface.c" -"cairo-color.c" -"cairo-composite-rectangles.c" -"cairo-compositor.c" -"cairo-contour.c" -"cairo-damage.c" -"cairo-debug.c" -"cairo-default-context.c" -"cairo-device.c" -"cairo-error.c" -"cairo-fallback-compositor.c" -"cairo-fixed.c" -"cairo-font-face.c" -"cairo-font-face-twin.c" -"cairo-font-face-twin-data.c" -"cairo-font-options.c" -"cairo-freelist.c" -"cairo-freed-pool.c" -"cairo-gstate.c" -"cairo-hash.c" -"cairo-hull.c" -"cairo-image-compositor.c" -"cairo-image-info.c" -"cairo-image-source.c" -"cairo-image-surface.c" -"cairo-line.c" -"cairo-lzw.c" -"cairo-matrix.c" -"cairo-mask-compositor.c" -"cairo-mesh-pattern-rasterizer.c" -"cairo-mempool.c" -"cairo-misc.c" -"cairo-mono-scan-converter.c" -"cairo-mutex.c" -"cairo-no-compositor.c" -"cairo-observer.c" -"cairo-output-stream.c" -"cairo-paginated-surface.c" -"cairo-path-bounds.c" -"cairo-path.c" -"cairo-path-fill.c" -"cairo-path-fixed.c" -"cairo-path-in-fill.c" -"cairo-path-stroke.c" -"cairo-path-stroke-boxes.c" -"cairo-path-stroke-polygon.c" -"cairo-path-stroke-traps.c" -"cairo-path-stroke-tristrip.c" -"cairo-pattern.c" -"cairo-pen.c" -"cairo-polygon.c" -"cairo-polygon-intersect.c" -"cairo-polygon-reduce.c" -"cairo-raster-source-pattern.c" -"cairo-recording-surface.c" -"cairo-rectangle.c" -"cairo-rectangular-scan-converter.c" -"cairo-region.c" -"cairo-rtree.c" -"cairo-scaled-font.c" -"cairo-shape-mask-compositor.c" -"cairo-slope.c" -"cairo-spans.c" -"cairo-spans-compositor.c" -"cairo-spline.c" -"cairo-stroke-dash.c" -"cairo-stroke-style.c" -"cairo-surface.c" -"cairo-surface-clipper.c" -"cairo-surface-fallback.c" -"cairo-surface-observer.c" -"cairo-surface-offset.c" -"cairo-surface-snapshot.c" -"cairo-surface-subsurface.c" -"cairo-surface-wrapper.c" -"cairo-time.c" -"cairo-tor-scan-converter.c" -"cairo-tor22-scan-converter.c" -"cairo-clip-tor-scan-converter.c" -"cairo-tag-attributes.c" -"cairo-tag-stack.c" -"cairo-toy-font-face.c" -"cairo-traps.c" -"cairo-tristrip.c" -"cairo-traps-compositor.c" -"cairo-unicode.c" -"cairo-user-font.c" -"cairo-version.c" -"cairo-wideint.c" -# win32 -"win32/cairo-win32-debug.c" -"win32/cairo-win32-device.c" -"win32/cairo-win32-gdi-compositor.c" -"win32/cairo-win32-system.c" -"win32/cairo-win32-surface.c" -"win32/cairo-win32-display-surface.c" -"win32/cairo-win32-printing-surface.c" -"win32/cairo-win32-font.c" -# generic font support -"cairo-cff-subset.c" -"cairo-scaled-font-subsets.c" -"cairo-truetype-subset.c" -"cairo-type1-fallback.c" -"cairo-type1-glyph-names.c" -"cairo-type1-subset.c" -"cairo-type3-glyph-surface.c" -# pdf -"cairo-pdf-interchange.c" -"cairo-pdf-operators.c" -"cairo-pdf-shading.c" -"cairo-pdf-surface.c" -# png -"cairo-png.c" -# ps surface -"cairo-ps-surface.c" -# deflate source -"cairo-deflate-stream.c" -# svg surface -"cairo-svg-surface.c" -# script surface -"cairo-script-surface.c" -# fontconfig + freetype -"cairo-ft-font.c" -) - -set(CMAKE_DEBUG_POSTFIX "d") - -if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") - # Make the zlib library available - find_library(ZLIB_DEBUG_IMPLIB NAMES zlibd) - if (ZLIB_DEBUG_IMPLIB STREQUAL ZLIB_DEBUG_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The zlibd.lib import library could not be found. Check to ensure that zlib is properly installed.") - endif() - add_library(zlib UNKNOWN IMPORTED) - set_property(TARGET zlib PROPERTY IMPORTED_LOCATION "${ZLIB_DEBUG_IMPLIB}") - - # Make the libpng library available - find_library(LIBPNG_DEBUG_IMPLIB NAMES libpng16d) - if (LIBPNG_DEBUG_IMPLIB STREQUAL LIBPNG_DEBUG_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The libpng16d.lib import library could not be found. Check to ensure that libpng is properly installed.") - endif() - add_library(libpng UNKNOWN IMPORTED) - set_property(TARGET libpng PROPERTY IMPORTED_LOCATION "${LIBPNG_DEBUG_IMPLIB}") - - # Make the pixman library available - find_library(PIXMAN_DEBUG_IMPLIB NAMES pixman-1d) - if (PIXMAN_DEBUG_IMPLIB STREQUAL PIXMAN_DEBUG_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The pixman-1d.lib import library could not be found. Check to ensure that pixman is properly installed.") - endif() - add_library(pixman UNKNOWN IMPORTED) - set_property(TARGET pixman PROPERTY IMPORTED_LOCATION "${PIXMAN_DEBUG_IMPLIB}") - -elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release") - # Make the zlib library available - find_library(ZLIB_RELEASE_IMPLIB NAMES zlib) - if (ZLIB_RELEASE_IMPLIB STREQUAL ZLIB_RELEASE_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The zlib.lib import library could not be found. Check to ensure that zlib is properly installed.") - endif() - add_library(zlib UNKNOWN IMPORTED) - set_property(TARGET zlib PROPERTY IMPORTED_LOCATION "${ZLIB_RELEASE_IMPLIB}") - - # Make the libpng library available - find_library(LIBPNG_RELEASE_IMPLIB NAMES libpng16) - if (LIBPNG_RELEASE_IMPLIB STREQUAL LIBPNG_RELEASE_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The libpng16.lib import library could not be found. Check to ensure that libpng is properly installed.") - endif() - add_library(libpng UNKNOWN IMPORTED) - set_property(TARGET libpng PROPERTY IMPORTED_LOCATION "${LIBPNG_RELEASE_IMPLIB}") - - # Make the pixman library available - find_library(PIXMAN_RELEASE_IMPLIB NAMES pixman-1) - if (PIXMAN_RELEASE_IMPLIB STREQUAL PIXMAN_RELEASE_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The pixman-1.lib import library could not be found. Check to ensure that pixman is properly installed.") - endif() - add_library(pixman UNKNOWN IMPORTED) - set_property(TARGET pixman PROPERTY IMPORTED_LOCATION "${PIXMAN_RELEASE_IMPLIB}") - -else() - message(FATAL_ERROR "Unexpected value '${CMAKE_BUILD_TYPE}' for CMAKE_BUILD_TYPE.") -endif() - -# Make the gdi32 library available -find_library(GDI32_LIBRARY NAMES gdi32) -if (GDI32_LIBRARY STREQUAL GDI32_LIBRARY-NOTFOUND) - message(FATAL_ERROR "The gdi32.lib import library could not be found. Check to ensure that the Windows SDK is installed.") -endif() -add_library(gdi32 UNKNOWN IMPORTED) -set_property(TARGET gdi32 PROPERTY IMPORTED_LOCATION "${GDI32_LIBRARY}") - -# Make the msimg32 library available -find_library(MSIMG32_LIBRARY NAMES msimg32) -if (MSIMG32_LIBRARY STREQUAL MSIMG32_LIBRARY-NOTFOUND) - message(FATAL_ERROR "The msimg32.lib import library could not be found. Check to ensure that the Windows SDK is installed.") -endif() -add_library(msimg32 UNKNOWN IMPORTED) -set_property(TARGET msimg32 PROPERTY IMPORTED_LOCATION "${MSIMG32_LIBRARY}") - -# Make the user32 library available -find_library(USER32_LIBRARY NAMES user32) -if (USER32_LIBRARY STREQUAL USER32_LIBRARY-NOTFOUND) - message(FATAL_ERROR "The user32.lib import library could not be found. Check to ensure that the Windows SDK is installed.") -endif() -add_library(user32 UNKNOWN IMPORTED) -set_property(TARGET user32 PROPERTY IMPORTED_LOCATION "${USER32_LIBRARY}") - -# Find dependencies of optional modules - -# Find FreeType -if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(FREETYPE_SUFFIX d) -endif() -find_library(FREETYPE_LIBRARY freetype${FREETYPE_SUFFIX}) -if (FREETYPE_LIBRARY MATCHES NOTFOUND) - message(FATAL_ERROR "The freetype library could not be found. Check to ensure that it is properly installed.") -endif() - -# Cairo needs to be told which features of FreeType are availible -add_definitions( - -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 - -DHAVE_FT_LIBRARY_SETLCDFILTER=1 - -DHAVE_FT_GLYPHSLOT_OBLIQUE=1 - -DHAVE_FT_LOAD_SFNT_TABLE=1 - -DHAVE_FT_GET_X11_FONT_FORMAT=1) - -# Find FontConfig -find_library(FONTCONFIG_LIBRARY fontconfig) -if (FONTCONFIG_LIBRARY MATCHES NOTFOUND) - message(FATAL_ERROR "The fontconfig library could not be found. Check to ensure that it is properly installed.") -endif() - -if (BUILD_SHARED_LIBS) - add_library(cairo ${SOURCES}) - # cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files - target_compile_options(cairo PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101") - target_link_libraries(cairo gdi32 msimg32 user32 zlib libpng pixman ${FREETYPE_LIBRARY} ${FONTCONFIG_LIBRARY}) - - install(TARGETS cairo - RUNTIME DESTINATION bin - LIBRARY DESTINATION bin - ARCHIVE DESTINATION lib - ) -else() - add_library(cairo-static ${SOURCES}) - target_compile_options(cairo-static PUBLIC "/DCAIRO_WIN32_STATIC_BUILD=1") - # cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files - target_compile_options(cairo-static PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101") - target_link_libraries(cairo-static gdi32 msimg32 user32 zlib libpng pixman ${FREETYPE_LIBRARY} ${FONTCONFIG_LIBRARY}) - - install(TARGETS cairo-static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - ) -endif() - -# GObject support module - -set(CAIRO_GOBJECT_SOURCES - "../util/cairo-gobject/cairo-gobject-enums.c" - "../util/cairo-gobject/cairo-gobject-structs.c") - -# GObject support sources do not include header with export macro -if(BUILD_SHARED_LIBS) - set_source_files_properties( - "../util/cairo-gobject/cairo-gobject-enums.c" - "../util/cairo-gobject/cairo-gobject-structs.c" - PROPERTIES COMPILE_DEFINITIONS cairo_public=__declspec\(dllexport\)) -endif() - -# Make GLib's GObject available -find_library(GLIB_LIBRARY NAMES glib-2.0) -find_library(GOBJECT_LIBRARY NAMES gobject-2.0) -set(GLIB_LIBRARIES ${GLIB_LIBRARY} ${GOBJECT_LIBRARY}) -if (GLIB_LIBRARIES MATCHES NOTFOUND) - message(FATAL_ERROR "The glib library could not be found. Check to ensure that it is properly installed.") -endif() - -add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES}) -if(BUILD_SHARED_LIBS) - target_link_libraries(cairo-gobject cairo ${GLIB_LIBRARIES}) -else() - target_link_libraries(cairo-gobject cairo-static ${GLIB_LIBRARIES}) -endif() -install(TARGETS cairo-gobject - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index b03290e9e..9a6a550a6 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.4-3 +Version: 1.15.6 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/export-only-in-shared-build.patch b/ports/cairo/export-only-in-shared-build.patch new file mode 100644 index 000000000..d8b46c1ee --- /dev/null +++ b/ports/cairo/export-only-in-shared-build.patch @@ -0,0 +1,15 @@ +diff --git a/src/cairoint.h b/src/cairoint.h +index 4fedf86..dfa149e 100644 +--- a/src/cairoint.h ++++ b/src/cairoint.h +@@ -50,7 +50,9 @@ + #include "config.h" + #endif + +-#ifdef _MSC_VER ++#if defined _MSC_VER && defined cairo_EXPORTS + #define cairo_public __declspec(dllexport) ++#else ++#define cairo_public + #endif + diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 7e6e02155..0ccf0c470 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -7,33 +7,28 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairo-1.15.4) +set(CAIRO_VERSION 1.15.6) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairo-${CAIRO_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "http://cairographics.org/snapshots/cairo-1.15.4.tar.xz" - FILENAME "cairo-1.15.4.tar.xz" - SHA512 ac3e6879fcf0876bca9f801cdf9e970ef1822644228cdd21962d0bf5db5fc074973f4ae651eb9c76b44fffd405cf0a0c7cbb228dba96b835ea137a2740277ee9 + URLS "http://cairographics.org/snapshots/cairo-${CAIRO_VERSION}.tar.xz" + FILENAME "cairo-${CAIRO_VERSION}.tar.xz" + SHA512 e4eccba745a03545001ebd6f1a7b87bee4b932f80a2d877a764500ad5c18011a5bac585f31eec6d0b65ccaa818de0df2b3b99f0792111363bd3554cfa7f688b6 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/Initialize-mutexes-for-static-builds-for-win32.patch" + "${CMAKE_CURRENT_LIST_DIR}/export-only-in-shared-build.patch" ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_cairo.txt DESTINATION ${SOURCE_PATH}/src) -file(RENAME ${SOURCE_PATH}/src/CMakeLists_cairo.txt ${SOURCE_PATH}/src/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) file(COPY ${CURRENT_PORT_DIR}/cairo-features.h DESTINATION ${SOURCE_PATH}/src) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - ) -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - ) -endif() +vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH}/src +) vcpkg_install_cmake() diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index cce74b299..1c8d6b94a 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.9.5-1 +Version: 1.9.6 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index d3cd5a2bb..98342e052 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.9.5) +set(CATCH_VERSION v1.9.6) vcpkg_download_distfile(HEADER URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 4e5dc6959903282c90c7e7981238248072c7f5d4083ccfcd62ca8db494bed46cbd280624d1bafaf2221ca02e7877a4cc319f1adee06dfaeee9da3757b7a7ba56 + SHA512 a0e4d568a5d90e72cef6ae9e741a66909235498c2901e96623892e5b323cb3bc51d55617ee6a42b30938a0cf2564323c621bd201d94eb67ba9c4fe5de65c10ee ) vcpkg_download_distfile(LICENSE diff --git a/ports/cereal/CONTROL b/ports/cereal/CONTROL index 3c598a735..77ca17835 100644 --- a/ports/cereal/CONTROL +++ b/ports/cereal/CONTROL @@ -1,3 +1,3 @@ Source: cereal -Version: 1.2.1 +Version: 1.2.2 Description: a header-only C++11 serialization library (built in support for binary, XML and JSon) diff --git a/ports/cereal/portfile.cmake b/ports/cereal/portfile.cmake index f6555416c..d70c9a6e9 100644 --- a/ports/cereal/portfile.cmake +++ b/ports/cereal/portfile.cmake @@ -1,16 +1,29 @@ #header-only library + include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cereal-1.2.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/USCiLab/cereal/archive/v1.2.1.tar.gz" - FILENAME "cereal-1.2.1.tar.gz" - SHA512 f0050f27433a4b544e7785aa94fc7b14a57eed6d542e25d3d0fda4d27cf55ea55e796be2138bf80809c96c392436513fe42764b3a456938395bf7f7177dd1c73 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO USCiLab/cereal + REF v1.2.2 + SHA512 9567b2e19add9446b24f8afd122eea09ba6ecd1a090335cf0ab31fdc8f64c6c97daa3d9eaf0801c36a770737488e0eebf81d96d7b7a65deed30da6130f2d47eb + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJUST_INSTALL_CEREAL=ON ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/cmake/cereal") + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cereal) file(RENAME ${CURRENT_PACKAGES_DIR}/share/cereal/LICENSE ${CURRENT_PACKAGES_DIR}/share/cereal/copyright) - -# Copy the cereal header files -file(COPY ${SOURCE_PATH}/include/cereal DESTINATION ${CURRENT_PACKAGES_DIR}/include)
\ No newline at end of file diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL new file mode 100644 index 000000000..d8fb3681a --- /dev/null +++ b/ports/corrade/CONTROL @@ -0,0 +1,3 @@ +Source: corrade +Version: jun2017-2 +Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake new file mode 100644 index 000000000..3ae3710f6 --- /dev/null +++ b/ports/corrade/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/corrade + REF c182fe636894a998f241212d0205d0c126b7926f + SHA512 e62486368eab9c5f90ef9f4af91500f465d9e3baa6e5f6e9f2a49844d09676faefcb965a9d5b27a54eda19436af6b23dcda19504be6cd0dcd52dfad2ad4bfa21 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_STATIC=${BUILD_STATIC} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Drop a copy of tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) + +# Tools require dlls +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade) + +file(GLOB_RECURSE TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${TO_REMOVE}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) + +vcpkg_copy_pdbs()
\ No newline at end of file diff --git a/ports/cppcms/CONTROL b/ports/cppcms/CONTROL new file mode 100644 index 000000000..74deb6633 --- /dev/null +++ b/ports/cppcms/CONTROL @@ -0,0 +1,4 @@ +Source: cppcms +Version: 1.1.0 +Description: CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development +Build-Depends: icu, pcre, openssl, zlib diff --git a/ports/cppcms/portfile.cmake b/ports/cppcms/portfile.cmake new file mode 100644 index 000000000..30371b6f8 --- /dev/null +++ b/ports/cppcms/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "cppcms doesn't support static linkage. Building dynamic instead.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL static) + message("cppcms doesn't support static CRT linkage.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO artyom-beilis/cppcms + REF v1.1.0 + SHA512 cfc77f28ddee05b8a350fff1dbd7c09adcf008b8662d4f977b203dee50b5fadae97df499a655ebb48263a7448e0bdca514c8ac52ea805bf33e48612dabaa69f4 +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DCMAKE_PROGRAM_PATH=${PYTHON2_DIR} -DUSE_WINDOWS6_API=ON +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB EXE_DEBUG_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${EXE_DEBUG_FILES}) +file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(REMOVE ${EXE_FILES}) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LGPLv3.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppcms) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppcms/LGPLv3.txt ${CURRENT_PACKAGES_DIR}/share/cppcms/copyright) diff --git a/ports/ctemplate/CMakeLists.txt b/ports/ctemplate/CMakeLists.txt new file mode 100644 index 000000000..c7cc211f4 --- /dev/null +++ b/ports/ctemplate/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.5.1) +project(libctemplate C CXX) + +# find_package(PythonInterp) +if(NOT PYTHON_EXECUTABLE) + message(FATAL_ERROR "PYTHON_EXECUTABLE must be set") +endif() + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_VARIADIC_MAX=10) +endif() + +set(SOURCE_PATH ${PROJECT_SOURCE_DIR}/src) +set(BASE_SOURCE_PATH ${SOURCE_PATH}/base) +set(WINDOWS_SOURCE_PATH ${SOURCE_PATH}/windows) +set(HTMLPARSER_SOURCE_PATH ${SOURCE_PATH}/htmlparser) + +set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) + +set(HTMLPARSER_CONFIG ${HTMLPARSER_SOURCE_PATH}/htmlparser_fsm.config) +set(JSPASPER_CONFIG ${HTMLPARSER_SOURCE_PATH}/jsparser_fsm.config) +set(FSM_GENERATOR ${HTMLPARSER_SOURCE_PATH}/generate_fsm.py) + +set(BASE_HEADERS + "${BASE_SOURCE_PATH}/arena.h" + "${BASE_SOURCE_PATH}/manual_constructor.h" + "${BASE_SOURCE_PATH}/mutex.h" + "${BASE_SOURCE_PATH}/small_map.h" + "${BASE_SOURCE_PATH}/thread_annotations.h" + "${BASE_SOURCE_PATH}/util.h" + "${BASE_SOURCE_PATH}/arena-inl.h" +) + +set( + HTMLPARSER_HEADERS + "${HTMLPARSER_SOURCE_PATH}/htmlparser.h" + "${HTMLPARSER_SOURCE_PATH}/htmlparser_cpp.h" + "${HTMLPARSER_SOURCE_PATH}/jsparser.h" + "${HTMLPARSER_SOURCE_PATH}/statemachine.h" +) +set(SRC_FILES + "${SOURCE_PATH}/base/arena.cc" + "${SOURCE_PATH}/htmlparser/htmlparser.cc" + "${SOURCE_PATH}/htmlparser/jsparser.cc" + "${SOURCE_PATH}/htmlparser/statemachine.cc" + "${SOURCE_PATH}/per_expand_data.cc" + "${SOURCE_PATH}/template.cc" + "${SOURCE_PATH}/template_annotator.cc" + "${SOURCE_PATH}/template_cache.cc" + "${SOURCE_PATH}/template_dictionary.cc" + "${SOURCE_PATH}/template_modifiers.cc" + "${SOURCE_PATH}/template_namelist.cc" + "${SOURCE_PATH}/template_pathops.cc" + "${SOURCE_PATH}/template_string.cc" + "${SOURCE_PATH}/windows/port.cc" +) + +file(COPY "${WINDOWS_SOURCE_PATH}/" DESTINATION ${COMMON_INCLUDES}) +file(COPY "${WINDOWS_SOURCE_PATH}/config.h" DESTINATION ${COMMON_INCLUDES}/windows) +file(COPY "${WINDOWS_SOURCE_PATH}/port.h" DESTINATION ${COMMON_INCLUDES}/windows) +file(COPY ${HTMLPARSER_HEADERS} DESTINATION ${COMMON_INCLUDES}/htmlparser) +file(COPY ${BASE_HEADERS} DESTINATION ${COMMON_INCLUDES}/base) + +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${FSM_GENERATOR} ${HTMLPARSER_CONFIG} + WORKING_DIRECTORY ${COMMON_INCLUDES}/htmlparser + OUTPUT_VARIABLE HTMLPARSER_CONFIG_H +) +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${FSM_GENERATOR} ${JSPASPER_CONFIG} + WORKING_DIRECTORY ${COMMON_INCLUDES}/htmlparser + OUTPUT_VARIABLE JSPASPER_CONFIG_H +) + +file(WRITE "${COMMON_INCLUDES}/htmlparser/htmlparser_fsm.h" "${HTMLPARSER_CONFIG_H}") +file(WRITE "${COMMON_INCLUDES}/htmlparser/jsparser_fsm.h" "${JSPASPER_CONFIG_H}") + +include_directories(${COMMON_INCLUDES}) + +add_library(libctemplate ${SRC_FILES}) +if(NOT BUILD_SHARED_LIBS) + # Note: CTEMPLATE_DLL_DECL should be empty to build static file + target_compile_definitions(libctemplate PRIVATE -DCTEMPLATE_DLL_DECL=) +endif() + +install( + TARGETS libctemplate + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/ctemplate/CONTROL b/ports/ctemplate/CONTROL new file mode 100644 index 000000000..eb78d4c0f --- /dev/null +++ b/ports/ctemplate/CONTROL @@ -0,0 +1,3 @@ +Source: ctemplate +Version: 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca +Description: C++ CTemplate system diff --git a/ports/ctemplate/fix-msvc.patch b/ports/ctemplate/fix-msvc.patch new file mode 100644 index 000000000..acfbce4bf --- /dev/null +++ b/ports/ctemplate/fix-msvc.patch @@ -0,0 +1,17 @@ +diff --git a/src/per_expand_data.cc b/src/per_expand_data.cc +index f8f3025..0a468cf 100644 +--- a/src/per_expand_data.cc ++++ b/src/per_expand_data.cc +@@ -42,10 +42,12 @@ namespace ctemplate { + + using std::string; + ++#ifndef _MSC_VER + bool PerExpandData::DataEq::operator()(const char* s1, const char* s2) const { + return ((s1 == 0 && s2 == 0) || + (s1 && s2 && *s1 == *s2 && strcmp(s1, s2) == 0)); + } ++#endif + + PerExpandData::~PerExpandData() { + delete map_; diff --git a/ports/ctemplate/portfile.cmake b/ports/ctemplate/portfile.cmake new file mode 100644 index 000000000..af1f0532c --- /dev/null +++ b/ports/ctemplate/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +set(GIT_REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OlafvdSpek/ctemplate + REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca + SHA512 b572f6d0d182e977d3a459e68bde6244dad7196c44c16407990dc1fb6a7a93bcd8d6851e515d50b6051c1d011f71695f895f6ab233664baadae0bf6a3d464305 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_find_acquire_program(PYTHON2) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-msvc.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ctemplate RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/dirent/CONTROL b/ports/dirent/CONTROL new file mode 100644 index 000000000..50f6d7ede --- /dev/null +++ b/ports/dirent/CONTROL @@ -0,0 +1,3 @@ +Source: dirent +Version: 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d +Description: Dirent is a C/C++ programming interface that allows programmers to retrieve information about files and directories under Linux/UNIX. This project provides Linux compatible Dirent interface for Microsoft Windows. diff --git a/ports/dirent/portfile.cmake b/ports/dirent/portfile.cmake new file mode 100644 index 000000000..9476a8dcd --- /dev/null +++ b/ports/dirent/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tronkko/dirent + REF 8b1db5092479a73d47eafd3de739b27e876e6bf3 + SHA512 f529aa65c2a4b8249c1291f3bccad25fa3a9c2146a2c74abc0a4710f68e2bd6f73cd52682bb406fbcab71d6a5225a354f9e8bdc22ce63b7a4e64bb65bab34b9f + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/dirent RENAME copyright) +vcpkg_copy_pdbs() diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index a6e886c4a..d9db5b99d 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,4 +1,4 @@ Source: dlib -Version: 19.4-3 +Version: 19.4-4 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3 Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 2a5ae6f44..6c1bad0f8 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -8,43 +8,48 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dlib-19.4) vcpkg_download_distfile(ARCHIVE - URLS "http://dlib.net/files/dlib-19.4.tar.bz2" - FILENAME "dlib-19.4.tar.bz2" - SHA512 c5ae22c507b57a13d880d79e9671730829114d0276508b0a41b373d3abae9057d960fce84fafe1be468d943910853baaa70c88f2516e20a0c41f3895bf217f7b + URLS "http://dlib.net/files/dlib-19.4.tar.bz2" + FILENAME "dlib-19.4.tar.bz2" + SHA512 c5ae22c507b57a13d880d79e9671730829114d0276508b0a41b373d3abae9057d960fce84fafe1be468d943910853baaa70c88f2516e20a0c41f3895bf217f7b ) vcpkg_extract_source_archive(${ARCHIVE}) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libjpeg) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libpng) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/zlib) +# This fixes static builds; dlib doesn't pull in the needed transitive dependencies +file(READ "${SOURCE_PATH}/dlib/CMakeLists.txt" DLIB_CMAKE) +string(REPLACE "PNG_LIBRARY" "PNG_LIBRARIES" DLIB_CMAKE "${DLIB_CMAKE}") +file(WRITE "${SOURCE_PATH}/dlib/CMakeLists.txt" "${DLIB_CMAKE}") + vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DDLIB_LINK_WITH_SQLITE3=ON - -DDLIB_USE_FFTW=ON - -DDLIB_PNG_SUPPORT=ON - -DDLIB_JPEG_SUPPORT=ON - -DDLIB_USE_BLAS=OFF - -DDLIB_USE_LAPACK=OFF - -DDLIB_USE_CUDA=OFF - -DDLIB_GIF_SUPPORT=OFF - -DDLIB_USE_MKL_FFT=OFF - #-DDLIB_USE_CUDA=ON - OPTIONS_DEBUG - -DDLIB_ENABLE_ASSERTS=ON - #-DDLIB_ENABLE_STACK_TRACE=ON + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDLIB_LINK_WITH_SQLITE3=ON + -DDLIB_USE_FFTW=ON + -DDLIB_PNG_SUPPORT=ON + -DDLIB_JPEG_SUPPORT=ON + -DDLIB_USE_BLAS=OFF + -DDLIB_USE_LAPACK=OFF + -DDLIB_USE_CUDA=OFF + -DDLIB_GIF_SUPPORT=OFF + -DDLIB_USE_MKL_FFT=OFF + #-DDLIB_USE_CUDA=ON + OPTIONS_DEBUG + -DDLIB_ENABLE_ASSERTS=ON + #-DDLIB_ENABLE_STACK_TRACE=ON ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + # There is no way to suppress installation of the headers and resource files in debug build. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) # Remove other files not required in package -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/travis) diff --git a/ports/draco/CONTROL b/ports/draco/CONTROL new file mode 100644 index 000000000..f8ce4ba96 --- /dev/null +++ b/ports/draco/CONTROL @@ -0,0 +1,4 @@ +Source: draco +Version: 0.10.0 +Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. +Build-Depends:
\ No newline at end of file diff --git a/ports/draco/portfile.cmake b/ports/draco/portfile.cmake new file mode 100644 index 000000000..0b9bca010 --- /dev/null +++ b/ports/draco/portfile.cmake @@ -0,0 +1,50 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/draco + REF 0.10.0 + SHA512 4e1c5d0799b7c005167847886f6cb9ae450beb4fe6dc58971955abe0cdf43317253a2e19a185cf1210169a6b2d1922c0d684e50d39145894b01e775717e6d173 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Install tools and plugins +file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") +if(TOOLS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/draco) + file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/draco) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/draco) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/draco/LICENSE ${CURRENT_PACKAGES_DIR}/share/draco/copyright) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index d6e01c6cc..8e397a6d0 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.3-2 +Version: 3.3.3-5 Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index 229da45e7..6afe3a9e4 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -6,7 +6,14 @@ vcpkg_download_distfile(ARCHIVE FILENAME "eigen-3.3.3.tar.bz2" SHA512 bb5a8b761371e516f0a344a7c9f6e369e21c2907c8548227933ca6010fc607a66c8d6ff7c41b1aec3dea7d482ce8c2a09e38ae5c7a2c5b16bdd8007e7a81ecc3 ) + vcpkg_extract_source_archive(${ARCHIVE}) +# check if required file exists +if((NOT EXISTS ${SOURCE_PATH}/Eigen/CMakeLists.txt) OR (NOT EXISTS ${SOURCE_PATH}/unsupported/Eigen/CMakeLists.txt)) + message(STATUS "Missing CMakeLists.txt in cache, re-extracting.") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}) + vcpkg_extract_source_archive(${ARCHIVE}) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -21,6 +28,14 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(READ "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" EIGEN_TARGETS) +string(REPLACE "set(_IMPORT_PREFIX " "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE) #" EIGEN_TARGETS "${EIGEN_TARGETS}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" "${EIGEN_TARGETS}") + +file(GLOB INCLUDES ${CURRENT_PACKAGES_DIR}/include/eigen3/*) +# Copy the eigen header files to conventional location for user-wide MSBuild integration +file(COPY ${INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/eigen3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/eigen3/COPYING.README ${CURRENT_PACKAGES_DIR}/share/eigen3/copyright) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index e5749ab1f..c4fd79f76 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 3.0.2 +Version: 4.0.0 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index 49728fbe0..f40e2adc9 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fmtlib/fmt - REF 3.0.2 - SHA512 50f5a25d1a10fd5b265f3811fa11886b9efdae2952f2aefc9f22c87c1a748128369f4d530b320e5e9c67c745cdab4607d1cb08940f4cf968300dee22e1150117 + REF 4.0.0 + SHA512 8b9f7ce4720c3caef6de4a75b8d4b0fd7db4f1638edca98d5ea95f4a5157aef8faefbac68438236691bd373111ca089b4d3864f7352f3fba1fe44392e9644f8b HEAD_REF master ) diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index 85a72c3fc..5fc4fcff2 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -1,4 +1,4 @@ Source: fontconfig
-Version: 2.12.3
+Version: 2.12.4
Description: Library for configuring and customizing font access.
-Build-Depends: freetype, expat, libiconv
+Build-Depends: freetype, expat, libiconv, dirent
diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index ec3122d67..f3bc3e2ef 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -1,26 +1,14 @@ include(vcpkg_common_functions)
-set(FONTCONFIG_VERSION 2.12.3)
+set(FONTCONFIG_VERSION 2.12.4)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fontconfig-${FONTCONFIG_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.gz"
FILENAME "fontconfig-${FONTCONFIG_VERSION}.tar.gz"
- SHA512 b17725c028be1c5e6f76c136b0ed7db1be7694cbbf217310083512708e05cdc1a824427f89082e6ef259c10297900f26cbe899f7c5762e7662855739f3eff5ea)
-
-# Download single-header implementation of dirent API for Windows and it's license
-vcpkg_download_distfile(DIRENT_H
- URLS "https://raw.githubusercontent.com/tronkko/dirent/8b1db5092479a73d47eafd3de739b27e876e6bf3/include/dirent.h"
- FILENAME "fontconfig-dirent.h"
- SHA512 dc9e63fd9cf4ccffdc052f92933633ef9d09dfcfe3b1d15f1f32c99349babd36a62d02283e3d8ba7766d92817be015eb211f11efc4fa52cc90d532a34d1ae785)
-vcpkg_download_distfile(DIRENT_LICENSE
- URLS "https://raw.githubusercontent.com/tronkko/dirent/8b1db5092479a73d47eafd3de739b27e876e6bf3/LICENSE"
- FILENAME "fontconfig-dirent-license"
- SHA512 58c294f80b679252dbee9687ff6bda660fe1ed6f94506e1b9edc19358de98b274b25b3697bdcd34becb28a4f186c6d321a16ab616164e2fb378b37357fc71e4f)
+ SHA512 2be3ee0e8e0e3b62571135a3cae06e456c289dd1ad40ef2a7c780406418ee5efce863a833eca5a8ef55bc737a0ea04ef562bba6fd27e174ae43e42131b52810d)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
-file(COPY ${DIRENT_H} DESTINATION ${SOURCE_PATH})
-file(RENAME ${SOURCE_PATH}/fontconfig-dirent.h ${SOURCE_PATH}/dirent.h)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@@ -44,5 +32,3 @@ endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/COPYING ${CURRENT_PACKAGES_DIR}/share/fontconfig/copyright)
-file(COPY ${DIRENT_LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/fontconfig-dirent-license ${CURRENT_PACKAGES_DIR}/share/fontconfig/dirent-for-vs-copyright)
diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL index 00680a773..775f98938 100644 --- a/ports/freeglut/CONTROL +++ b/ports/freeglut/CONTROL @@ -1,3 +1,3 @@ Source: freeglut -Version: 3.0.0 +Version: 3.0.0-1 Description: Open source implementation of GLUT with source and binary backwards compatibility.
\ No newline at end of file diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index 929d8b9e4..c2d1f2816 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -7,6 +7,12 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +# disable debug suffix, because FindGLUT.cmake from CMake 3.8 doesn't support it +file(READ ${SOURCE_PATH}/CMakeLists.txt FREEGLUT_CMAKELISTS) +string(REPLACE "SET( CMAKE_DEBUG_POSTFIX \"d\" )" + "\#SET( CMAKE_DEBUG_POSTFIX \"d\" )" FREEGLUT_CMAKELISTS "${FREEGLUT_CMAKELISTS}") +file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${FREEGLUT_CMAKELISTS}") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(FREEGLUT_STATIC OFF) set(FREEGLUT_DYNAMIC ON) @@ -26,6 +32,15 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +# Patch header +file(READ ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h FREEGLUT_STDH) +string(REPLACE "pragma comment (lib, \"freeglut_staticd.lib\")" + "pragma comment (lib, \"freeglut_static.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") +string(REPLACE "pragma comment (lib, \"freeglutd.lib\")" + "pragma comment (lib, \"freeglut.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") + +# Clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 8833c2f56..9fab690ce 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.0-3 +Version: 2.2.0-4 Description: A C++ library that implements commandline flags processing diff --git a/ports/glog/CONTROL b/ports/glog/CONTROL index 5cf97bd11..74653e8bc 100644 --- a/ports/glog/CONTROL +++ b/ports/glog/CONTROL @@ -1,4 +1,4 @@ Source: glog -Version: 0.3.4-0472b91-1 +Version: 0.3.5 Description: C++ implementation of the Google logging module Build-Depends: gflags diff --git a/ports/glog/fix-cmake-install-files.patch b/ports/glog/fix-cmake-install-files.patch deleted file mode 100644 index 34f6f07f3..000000000 --- a/ports/glog/fix-cmake-install-files.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1429590..5ed110d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -390,7 +390,8 @@ if (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS) - endif (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS) - - if (gflags_FOUND) -- target_include_directories (glog PUBLIC ${gflags_INCLUDE_DIR}) -+ # when set to PUBLIC, will cause some wrong interface_include_directory for vcpkg -+ target_include_directories (glog PRIVATE ${gflags_INCLUDE_DIR}) - target_link_libraries (glog PUBLIC ${gflags_LIBRARIES}) - - if (NOT BUILD_SHARED_LIBS) -@@ -557,7 +558,7 @@ endif (gflags_FOUND) - - configure_package_config_file (glog-config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake -- INSTALL_DESTINATION lib/cmake/glog -+ INSTALL_DESTINATION share/glog - NO_CHECK_REQUIRED_COMPONENTS_MACRO) - - write_basic_package_version_file (glog-config-version.cmake VERSION -@@ -569,6 +570,6 @@ export (PACKAGE glog) - install (FILES - ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/glog-config-version.cmake -- DESTINATION lib/cmake/glog) -+ DESTINATION share/glog) - --install (EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog) -+install (EXPORT glog-targets NAMESPACE glog:: DESTINATION share/glog) diff --git a/ports/glog/portfile.cmake b/ports/glog/portfile.cmake index d981c7e27..1fa6b0164 100644 --- a/ports/glog/portfile.cmake +++ b/ports/glog/portfile.cmake @@ -7,46 +7,28 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glog-0472b91c5defdf90cff7292e3bf7bd86770a9a0a) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/google/glog/archive/0472b91c5defdf90cff7292e3bf7bd86770a9a0a.zip" - FILENAME "glog-0472b91c5defdf90cff7292e3bf7bd86770a9a0a.zip" - SHA512 24506ad1cc05e8361379b925ecfc8f32cc47692a47598401cca340eb2a528fe28b8b0d3636983056c7910469d105095bd3bacacff6278bffa18d85603c3dbfa8 -) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmake-install-files.patch" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/glog + REF v0.3.5 + SHA512 a54a3b8b4b7660d7558ba5168c659bc3c8323c30908a4f6a4bbc6f9cd899350f3243aabc720daebfdeb799b276b51ba1eaa1a0f83149c4e1a038d552ada1ed72 + HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/glog) -file(GLOB GLOG_CMAKE_FILES ${CURRENT_PACKAGES_DIR}/debug/share/glog/*.cmake) -file(COPY ${GLOG_CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/glog) +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glog") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# changes target search path -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/glog/glog-targets-debug.cmake GLOG_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" GLOG_DEBUG_MODULE "${GLOG_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glog/glog-targets-debug.cmake "${GLOG_DEBUG_MODULE}") - -# remove not used cmake files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ) +vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glog) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glog/COPYING ${CURRENT_PACKAGES_DIR}/share/glog/copyright) - diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 47290a0d3..d9654cddf 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.3.1-1 +Version: 1.4.1 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework
\ No newline at end of file diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 10e79cd55..e26c758d0 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.3.1 - SHA512 1c9f35e84995158b75bb8694bb9d8c5ddafccf347c4827213290b221f9fc3ab9071c9f79a10a563e9cdfabae3f4b83d6148907f106066f54093242f818038438 + REF v1.4.1 + SHA512 5028e4f881a41e4c4ddf770bd824d1d5de825f86d68dbbfab22e2a34ec0e46b27754b0f5b40cfc02b0d22a756b08056b100837b590745b5fdbdce9a803e59f8d HEAD_REF master ) @@ -61,6 +61,7 @@ file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") if(TOOLS) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/grpc) file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) diff --git a/ports/grpc/revert-c019e05.patch b/ports/grpc/revert-c019e05.patch index 77c501f77..afb5cfa71 100644 --- a/ports/grpc/revert-c019e05.patch +++ b/ports/grpc/revert-c019e05.patch @@ -1,18 +1,18 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e09f729..c85a20a 100644 +index b7555b1bc3..edbffea76c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -11847,7 +11847,12 @@ endif (gRPC_BUILD_TESTS) +@@ -14204,6 +14204,13 @@ endif (gRPC_BUILD_TESTS) -- +if (gRPC_INSTALL) + install(EXPORT gRPCTargets + DESTINATION ${CMAKE_INSTALL_CMAKEDIR} + NAMESPACE gRPC:: + ) +endif() - ++ foreach(_config gRPCConfig gRPCConfigVersion) configure_file(tools/cmake/${_config}.cmake.in + ${_config}.cmake @ONLY) diff --git a/ports/kinectsdk1/CONTROL b/ports/kinectsdk1/CONTROL new file mode 100644 index 000000000..3d4c83fd2 --- /dev/null +++ b/ports/kinectsdk1/CONTROL @@ -0,0 +1,3 @@ +Source: kinectsdk1 +Version: 1.8-1 +Description: Kinect for Windows SDK for Kinect v1 sensor. diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake new file mode 100644 index 000000000..aef4cd1c2 --- /dev/null +++ b/ports/kinectsdk1/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) +if(NOT EXISTS "${KINECTSDK10_DIR}") + message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x. It can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=40278.") +endif() + +file( + INSTALL + "${KINECTSDK10_DIR}/inc/NuiApi.h" + "${KINECTSDK10_DIR}/inc/NuiImageCamera.h" + "${KINECTSDK10_DIR}/inc/NuiSensor.h" + "${KINECTSDK10_DIR}/inc/NuiSkeleton.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCHITECTURE x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCHITECTURE amd64) +else() + message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +file( + INSTALL + "${KINECTSDK10_DIR}/lib/${ARCHITECTURE}/Kinect10.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${KINECTSDK10_DIR}/lib/${ARCHITECTURE}/Kinect10.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +# Handle copyright +file(COPY "${KINECTSDK10_DIR}/SDKEula.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/kinectsdk1) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/kinectsdk1/SDKEula.rtf ${CURRENT_PACKAGES_DIR}/share/kinectsdk1/copyright)
\ No newline at end of file diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL index f4f9b8cdd..3cd81ee5c 100644 --- a/ports/libarchive/CONTROL +++ b/ports/libarchive/CONTROL @@ -1,4 +1,4 @@ Source: libarchive
-Version: 3.3.1-1
+Version: 3.3.2
Description: Library for reading and writing streaming archives
Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl
diff --git a/ports/libarchive/fix-buildsystem.patch b/ports/libarchive/fix-buildsystem.patch index fcfe67c4f..59ffec3c9 100644 --- a/ports/libarchive/fix-buildsystem.patch +++ b/ports/libarchive/fix-buildsystem.patch @@ -132,8 +132,8 @@ index 1f85c01..11b2fb1 100644 --- a/libarchive/CMakeLists.txt +++ b/libarchive/CMakeLists.txt @@ -210,28 +210,22 @@ IF(WIN32 AND NOT CYGWIN) - LIST(APPEND libarchive_SOURCES filter_fork_windows.c) - ENDIF(WIN32 AND NOT CYGWIN) + LIST(APPEND libarchive_SOURCES archive_disk_acl_sunos.c) + ENDIF() -# Libarchive is a shared library -ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index 72958dfda..a5bed4143 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -4,14 +4,13 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) endif()
include(vcpkg_common_functions)
-set(ARCHIVE_VERSION 3.3.1)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libarchive-${ARCHIVE_VERSION})
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/libarchive/libarchive/archive/v${ARCHIVE_VERSION}.zip"
- FILENAME "libarchive-${ARCHIVE_VERSION}.zip"
- SHA512 a54fe3c5c24c83df244f3f2346212a6aa8d8945cf4ddc407e54c891ebbf8c98b93492e5652c9813a6d5dc654a32479e08a40bb0d2af7400a29ac027028e986f5)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO libarchive/libarchive
+ REF v3.3.2
+ SHA512 7bc17d6f742080278e35f86b0233d70045df0ca1578cd427126e0acce183709bf33ecca689db65e2e67bdfaf687c04d36cae1202a926beeebc88076648aa40bc
+ HEAD_REF master)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt new file mode 100644 index 000000000..8762917ef --- /dev/null +++ b/ports/libconfig/CMakeLists.txt @@ -0,0 +1,51 @@ +cmake_minimum_required(VERSION 3.5.1) +project(libconfig C CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) + add_definitions(-Dscandir=libconfig_scandir) +endif() + +set(C_SOURCES + lib/grammar.c + lib/libconfig.c + lib/scanctx.c + lib/win32/scandir.c + lib/scanner.c + lib/strbuf.c +) + +set(CPP_SOURCES + lib/libconfigcpp.cc +) + +find_path(DIRENT_H dirent.h) +find_path(STDINT_H stdint.h) + +include_directories(lib ${DIRENT_H} ${STDINT_H}) + +add_definitions(-DYY_NO_UNISTD_H -DYY_USE_CONST) + +add_library(libconfig ${C_SOURCES}) +add_library(libconfig++ ${CPP_SOURCES}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS) + target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIGXX_EXPORTS) +else() + target_compile_definitions(libconfig PUBLIC -DLIBCONFIG_STATIC) + target_compile_definitions(libconfig++ PUBLIC -DLIBCONFIGXX_STATIC) +endif() + +target_link_libraries(libconfig++ PRIVATE libconfig) + +install( + TARGETS libconfig libconfig++ + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES lib/libconfig.h++ lib/libconfig.h DESTINATION include) +endif() diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL new file mode 100644 index 000000000..45bf1db9b --- /dev/null +++ b/ports/libconfig/CONTROL @@ -0,0 +1,4 @@ +Source: libconfig +Version: 1.6.0 +Description: C/C++ library for processing configuration files +Build-Depends: dirent diff --git a/ports/libconfig/fix-scanner-header-msvc-patch.patch b/ports/libconfig/fix-scanner-header-msvc-patch.patch new file mode 100644 index 000000000..c2e13c2ff --- /dev/null +++ b/ports/libconfig/fix-scanner-header-msvc-patch.patch @@ -0,0 +1,108 @@ +diff --git a/lib/scanner.h b/lib/scanner.h +index cdca3bb..1fc0509 100644 +--- a/lib/scanner.h ++++ b/lib/scanner.h +@@ -13,7 +13,7 @@ + #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 +-#define YY_FLEX_SUBMINOR_VERSION 39 ++#define YY_FLEX_SUBMINOR_VERSION 35 + #if YY_FLEX_SUBMINOR_VERSION > 0 + #define FLEX_BETA + #endif +@@ -132,7 +132,15 @@ typedef void* yyscan_t; + + /* Size of default input buffer. */ + #ifndef YY_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k. ++ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. ++ * Ditto for the __ia64__ case accordingly. ++ */ ++#define YY_BUF_SIZE 32768 ++#else + #define YY_BUF_SIZE 16384 ++#endif /* __ia64__ */ + #endif + + #ifndef YY_TYPEDEF_YY_BUFFER_STATE +@@ -162,7 +170,7 @@ struct yy_buffer_state + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ +- yy_size_t yy_n_chars; ++ int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to +@@ -206,13 +214,13 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner ); + + YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); + YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); ++YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + + void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner ); + void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); + void libconfig_yyfree (void * ,yyscan_t yyscanner ); + +-#define libconfig_yywrap(yyscanner) 1 ++#define libconfig_yywrap(n) 1 + #define YY_SKIP_YYWRAP + + #define yytext_ptr yytext_r +@@ -221,7 +229,8 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner ); + #define INITIAL 0 + #define COMMENT 1 + #define STRING 2 +-#define INCLUDE 3 ++#define INCLUDE_F 3 ++#define INCLUDE_D 4 + + #endif + +@@ -260,7 +269,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner ); + + void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner ); ++int libconfig_yyget_leng (yyscan_t yyscanner ); + + char *libconfig_yyget_text (yyscan_t yyscanner ); + +@@ -268,10 +277,6 @@ int libconfig_yyget_lineno (yyscan_t yyscanner ); + + void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +-int libconfig_yyget_column (yyscan_t yyscanner ); +- +-void libconfig_yyset_column (int column_no ,yyscan_t yyscanner ); +- + YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner ); + + void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +@@ -302,7 +307,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); + + /* Amount of stuff to slurp up with each read. */ + #ifndef YY_READ_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k */ ++#define YY_READ_BUF_SIZE 16384 ++#else + #define YY_READ_BUF_SIZE 8192 ++#endif /* __ia64__ */ + #endif + + /* Number of entries by which start-condition stack grows. */ +@@ -337,8 +347,8 @@ extern int libconfig_yylex \ + #undef YY_DECL + #endif + +-#line 207 "scanner.l" ++#line 315 "scanner.l" + +-#line 343 "scanner.h" ++#line 353 "scanner.h" + #undef libconfig_yyIN_HEADER + #endif /* libconfig_yyHEADER_H */ diff --git a/ports/libconfig/fix-scanner-source-msvc-patch.patch b/ports/libconfig/fix-scanner-source-msvc-patch.patch new file mode 100644 index 000000000..e8f24e638 --- /dev/null +++ b/ports/libconfig/fix-scanner-source-msvc-patch.patch @@ -0,0 +1,1122 @@ +diff --git a/lib/scanner.c b/lib/scanner.c +index dc07eb0..efb6730 100644 +--- a/lib/scanner.c ++++ b/lib/scanner.c +@@ -9,7 +9,7 @@ + #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 +-#define YY_FLEX_SUBMINOR_VERSION 39 ++#define YY_FLEX_SUBMINOR_VERSION 35 + #if YY_FLEX_SUBMINOR_VERSION > 0 + #define FLEX_BETA + #endif +@@ -159,7 +159,15 @@ typedef void* yyscan_t; + + /* Size of default input buffer. */ + #ifndef YY_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k. ++ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. ++ * Ditto for the __ia64__ case accordingly. ++ */ ++#define YY_BUF_SIZE 32768 ++#else + #define YY_BUF_SIZE 16384 ++#endif /* __ia64__ */ + #endif + + /* The state buf must be large enough to hold one state per character in the main buffer. +@@ -171,11 +179,6 @@ typedef void* yyscan_t; + typedef struct yy_buffer_state *YY_BUFFER_STATE; + #endif + +-#ifndef YY_TYPEDEF_YY_SIZE_T +-#define YY_TYPEDEF_YY_SIZE_T +-typedef size_t yy_size_t; +-#endif +- + #define EOB_ACT_CONTINUE_SCAN 0 + #define EOB_ACT_END_OF_FILE 1 + #define EOB_ACT_LAST_MATCH 2 +@@ -194,13 +197,6 @@ typedef size_t yy_size_t; + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) +- #define YY_LINENO_REWIND_TO(dst) \ +- do {\ +- const char *p;\ +- for ( p = yy_cp-1; p >= (dst); --p)\ +- if ( *p == '\n' )\ +- --yylineno;\ +- }while(0) + + /* Return all but the first "n" matched characters back to the input stream. */ + #define yyless(n) \ +@@ -218,6 +214,11 @@ typedef size_t yy_size_t; + + #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + ++#ifndef YY_TYPEDEF_YY_SIZE_T ++#define YY_TYPEDEF_YY_SIZE_T ++typedef size_t yy_size_t; ++#endif ++ + #ifndef YY_STRUCT_YY_BUFFER_STATE + #define YY_STRUCT_YY_BUFFER_STATE + struct yy_buffer_state +@@ -235,7 +236,7 @@ struct yy_buffer_state + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ +- yy_size_t yy_n_chars; ++ int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to +@@ -314,7 +315,7 @@ static void libconfig_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yys + + YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); + YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); ++YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + + void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner ); + void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +@@ -344,7 +345,7 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner ); + + #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +-#define libconfig_yywrap(yyscanner) 1 ++#define libconfig_yywrap(n) 1 + #define YY_SKIP_YYWRAP + + typedef unsigned char YY_CHAR; +@@ -368,8 +369,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +-#define YY_NUM_RULES 42 +-#define YY_END_OF_BUFFER 43 ++#define YY_NUM_RULES 47 ++#define YY_END_OF_BUFFER 48 + /* This struct is not used in this scanner, + but its presence is necessary. */ + struct yy_trans_info +@@ -377,20 +378,21 @@ struct yy_trans_info + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +-static yyconst flex_int16_t yy_accept[103] = ++static yyconst flex_int16_t yy_accept[117] = + { 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 43, 41, +- 22, 21, 21, 5, 41, 37, 38, 29, 41, 24, +- 30, 41, 31, 31, 23, 39, 29, 29, 35, 36, +- 25, 26, 22, 41, 3, 4, 3, 6, 15, 14, +- 17, 20, 42, 22, 0, 40, 29, 30, 31, 30, +- 0, 1, 0, 30, 0, 32, 0, 29, 29, 22, +- 0, 0, 2, 6, 12, 0, 11, 10, 7, 8, +- 9, 17, 19, 18, 0, 30, 30, 0, 0, 30, +- 32, 33, 29, 29, 0, 0, 0, 30, 34, 29, +- 27, 0, 13, 34, 28, 0, 0, 0, 0, 0, +- +- 16, 0 ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 48, 46, 27, 26, 26, 5, 46, 42, 43, 34, ++ 46, 29, 35, 46, 36, 36, 28, 44, 34, 34, ++ 40, 41, 30, 31, 27, 46, 3, 4, 3, 6, ++ 15, 14, 17, 20, 47, 22, 25, 47, 27, 0, ++ 45, 34, 35, 36, 35, 0, 1, 0, 35, 0, ++ 37, 0, 34, 34, 27, 0, 0, 2, 6, 12, ++ 0, 11, 10, 7, 8, 9, 17, 19, 18, 22, ++ 24, 23, 0, 35, 35, 0, 0, 35, 37, 38, ++ 34, 34, 0, 0, 0, 35, 39, 34, 32, 0, ++ ++ 13, 39, 33, 0, 0, 0, 0, 0, 0, 16, ++ 0, 0, 0, 0, 21, 0 + } ; + + static yyconst flex_int32_t yy_ec[256] = +@@ -434,110 +436,116 @@ static yyconst flex_int32_t yy_meta[49] = + 3, 3, 3, 3, 3, 3, 1, 1 + } ; + +-static yyconst flex_int16_t yy_base[113] = ++static yyconst flex_int16_t yy_base[129] = + { 0, +- 0, 47, 47, 48, 46, 47, 48, 49, 203, 204, +- 200, 204, 204, 204, 198, 204, 204, 0, 45, 204, +- 47, 50, 60, 74, 204, 204, 178, 28, 204, 204, +- 204, 204, 64, 158, 204, 204, 183, 0, 204, 63, +- 0, 204, 83, 195, 193, 204, 0, 88, 102, 98, +- 62, 204, 190, 104, 119, 162, 0, 67, 65, 121, +- 127, 124, 204, 0, 204, 0, 204, 204, 204, 204, +- 204, 0, 204, 204, 108, 117, 122, 134, 132, 136, +- 204, 139, 136, 116, 126, 0, 140, 142, 135, 130, +- 0, 102, 204, 204, 0, 85, 72, 63, 98, 158, +- +- 204, 204, 169, 173, 177, 181, 183, 187, 191, 89, +- 66, 63 ++ 0, 47, 47, 48, 46, 47, 48, 49, 50, 53, ++ 223, 224, 220, 224, 224, 224, 218, 224, 224, 0, ++ 46, 224, 49, 54, 62, 76, 224, 224, 198, 33, ++ 224, 224, 224, 224, 70, 178, 224, 224, 203, 0, ++ 224, 64, 0, 224, 61, 0, 224, 65, 215, 213, ++ 224, 0, 89, 100, 94, 109, 224, 212, 113, 125, ++ 187, 0, 70, 88, 100, 172, 169, 224, 0, 224, ++ 0, 224, 224, 224, 224, 224, 0, 224, 224, 0, ++ 224, 224, 58, 115, 127, 137, 129, 139, 224, 184, ++ 181, 123, 172, 0, 141, 143, 181, 125, 0, 165, ++ ++ 224, 224, 0, 160, 167, 165, 133, 159, 163, 224, ++ 156, 149, 166, 161, 224, 224, 169, 173, 177, 181, ++ 185, 187, 191, 195, 199, 136, 119, 81 + } ; + +-static yyconst flex_int16_t yy_def[113] = ++static yyconst flex_int16_t yy_def[129] = + { 0, +- 102, 1, 103, 103, 104, 104, 105, 105, 102, 102, +- 102, 102, 102, 102, 106, 102, 102, 107, 102, 102, +- 102, 102, 102, 102, 102, 102, 107, 107, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 108, 102, 102, +- 109, 102, 102, 102, 106, 102, 107, 102, 102, 102, +- 102, 102, 106, 102, 102, 102, 110, 107, 107, 102, +- 102, 102, 102, 108, 102, 111, 102, 102, 102, 102, +- 102, 109, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 110, 107, 107, 102, 112, 102, 102, 102, 107, +- 107, 102, 102, 102, 107, 102, 102, 102, 102, 102, +- +- 102, 0, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102 ++ 116, 1, 117, 117, 118, 118, 119, 119, 120, 120, ++ 116, 116, 116, 116, 116, 116, 121, 116, 116, 122, ++ 116, 116, 116, 116, 116, 116, 116, 116, 122, 122, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 123, ++ 116, 116, 124, 116, 116, 125, 116, 116, 116, 121, ++ 116, 122, 116, 116, 116, 116, 116, 121, 116, 116, ++ 116, 126, 122, 122, 116, 116, 116, 116, 123, 116, ++ 127, 116, 116, 116, 116, 116, 124, 116, 116, 125, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 126, ++ 122, 122, 116, 128, 116, 116, 116, 122, 122, 116, ++ ++ 116, 116, 122, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 0, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116 + } ; + +-static yyconst flex_int16_t yy_nxt[253] = ++static yyconst flex_int16_t yy_nxt[273] = + { 0, +- 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, +- 19, 20, 19, 21, 22, 23, 24, 25, 26, 25, +- 10, 18, 18, 18, 27, 18, 18, 18, 18, 28, +- 18, 18, 29, 10, 30, 10, 18, 18, 18, 27, +- 18, 18, 18, 18, 28, 18, 31, 32, 33, 36, +- 36, 39, 39, 42, 42, 59, 37, 37, 48, 52, +- 49, 49, 50, 50, 53, 60, 93, 34, 65, 86, +- 51, 59, 75, 54, 75, 49, 49, 76, 76, 40, +- 40, 43, 43, 55, 61, 51, 56, 54, 73, 49, +- 49, 57, 82, 83, 66, 84, 67, 55, 55, 100, +- +- 56, 99, 68, 50, 50, 69, 70, 71, 83, 98, +- 84, 51, 55, 50, 50, 54, 74, 49, 49, 77, +- 77, 51, 60, 76, 76, 55, 51, 78, 56, 79, +- 97, 79, 76, 76, 80, 80, 51, 77, 77, 91, +- 55, 61, 78, 96, 87, 78, 87, 80, 80, 88, +- 88, 80, 80, 95, 91, 88, 88, 88, 88, 100, +- 78, 94, 92, 101, 90, 89, 85, 62, 95, 35, +- 35, 35, 35, 38, 38, 38, 38, 41, 41, 41, +- 41, 45, 45, 45, 45, 47, 47, 64, 81, 64, +- 64, 72, 46, 72, 72, 46, 44, 63, 62, 58, +- +- 46, 44, 102, 9, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102 ++ 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, ++ 21, 22, 21, 23, 24, 25, 26, 27, 28, 27, ++ 12, 20, 20, 20, 29, 20, 20, 20, 20, 30, ++ 20, 20, 31, 12, 32, 12, 20, 20, 20, 29, ++ 20, 20, 20, 20, 30, 20, 33, 34, 35, 38, ++ 38, 41, 41, 44, 44, 47, 39, 39, 47, 53, ++ 64, 54, 54, 57, 55, 55, 78, 36, 58, 70, ++ 81, 65, 56, 84, 84, 59, 64, 54, 54, 42, ++ 42, 45, 45, 48, 101, 60, 48, 56, 61, 59, ++ 66, 54, 54, 62, 79, 71, 91, 72, 82, 60, ++ ++ 60, 65, 61, 73, 55, 55, 74, 75, 76, 55, ++ 55, 91, 56, 59, 60, 54, 54, 56, 92, 83, ++ 66, 83, 94, 60, 84, 84, 61, 56, 85, 85, ++ 84, 84, 56, 92, 108, 87, 86, 87, 60, 90, ++ 88, 88, 85, 85, 88, 88, 99, 95, 103, 95, ++ 86, 86, 96, 96, 88, 88, 96, 96, 96, 96, ++ 108, 99, 114, 103, 110, 86, 115, 114, 109, 37, ++ 37, 37, 37, 40, 40, 40, 40, 43, 43, 43, ++ 43, 46, 46, 46, 46, 50, 50, 50, 50, 52, ++ 52, 69, 113, 69, 69, 77, 112, 77, 77, 80, ++ ++ 111, 80, 80, 107, 106, 105, 104, 102, 100, 98, ++ 97, 93, 67, 89, 51, 51, 49, 68, 67, 63, ++ 51, 49, 116, 11, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116 + } ; + +-static yyconst flex_int16_t yy_chk[253] = ++static yyconst flex_int16_t yy_chk[273] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, +- 4, 5, 6, 7, 8, 28, 3, 4, 19, 22, +- 19, 19, 21, 21, 22, 33, 112, 2, 40, 111, +- 21, 28, 51, 23, 51, 23, 23, 51, 51, 5, +- 6, 7, 8, 23, 33, 21, 23, 24, 43, 24, +- 24, 23, 110, 58, 40, 59, 40, 24, 23, 99, +- +- 24, 98, 40, 48, 48, 40, 40, 40, 58, 97, +- 59, 48, 24, 50, 50, 49, 43, 49, 49, 54, +- 54, 50, 60, 75, 75, 49, 48, 54, 49, 55, +- 96, 55, 76, 76, 55, 55, 50, 77, 77, 84, +- 49, 60, 54, 92, 78, 77, 78, 79, 79, 78, +- 78, 80, 80, 90, 84, 87, 87, 88, 88, 100, +- 77, 89, 85, 100, 83, 82, 62, 61, 90, 103, +- 103, 103, 103, 104, 104, 104, 104, 105, 105, 105, +- 105, 106, 106, 106, 106, 107, 107, 108, 56, 108, +- 108, 109, 53, 109, 109, 45, 44, 37, 34, 27, +- +- 15, 11, 9, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102 ++ 4, 5, 6, 7, 8, 9, 3, 4, 10, 21, ++ 30, 21, 21, 24, 23, 23, 45, 2, 24, 42, ++ 48, 35, 23, 83, 83, 25, 30, 25, 25, 5, ++ 6, 7, 8, 9, 128, 25, 10, 23, 25, 26, ++ 35, 26, 26, 25, 45, 42, 63, 42, 48, 26, ++ ++ 25, 65, 26, 42, 53, 53, 42, 42, 42, 55, ++ 55, 63, 53, 54, 26, 54, 54, 55, 64, 56, ++ 65, 56, 127, 54, 56, 56, 54, 53, 59, 59, ++ 84, 84, 55, 64, 107, 60, 59, 60, 54, 126, ++ 60, 60, 85, 85, 87, 87, 92, 86, 98, 86, ++ 85, 59, 86, 86, 88, 88, 95, 95, 96, 96, ++ 108, 92, 114, 98, 108, 85, 114, 113, 107, 117, ++ 117, 117, 117, 118, 118, 118, 118, 119, 119, 119, ++ 119, 120, 120, 120, 120, 121, 121, 121, 121, 122, ++ 122, 123, 112, 123, 123, 124, 111, 124, 124, 125, ++ ++ 109, 125, 125, 106, 105, 104, 100, 97, 93, 91, ++ 90, 67, 66, 61, 58, 50, 49, 39, 36, 29, ++ 17, 13, 11, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116 + } ; + + /* Table of booleans, true if rule could match eol. */ +-static yyconst flex_int32_t yy_rule_can_match_eol[43] = ++static yyconst flex_int32_t yy_rule_can_match_eol[48] = + { 0, + 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, +- 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, }; ++ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, }; + + /* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. +@@ -550,7 +558,7 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] = + /* -*- mode: C -*- */ + /* -------------------------------------------------------------------------- + libconfig - A library for processing structured configuration files +- Copyright (C) 2005-2014 Mark A Lindner ++ Copyright (C) 2005-2015 Mark A Lindner + + This file is part of libconfig. + +@@ -577,9 +585,11 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] = + #endif + + #include <stdlib.h> ++#include <errno.h> + #include <ctype.h> + #include <string.h> + #include <limits.h> ++#include <dirent.h> + #include "parsectx.h" + #include "scanctx.h" + #include "grammar.h" +@@ -621,13 +631,30 @@ static unsigned long long fromhex(const char *s) + #endif /* __MINGW32__ */ + } + ++static int filter_dotfiles(const struct dirent *de) ++{ ++ const char *fname = de->d_name; ++ ++#ifdef _DIRENT_HAVE_D_TYPE ++ /* filter out non-files and non-symlinks */ ++ if((de->d_type != DT_REG) && (de->d_type != DT_LNK) && (de->d_type != DT_UNKNOWN)) ++ return 0; ++#endif ++ ++ return (fname /* != NULL */ ++ && ('\0' != fname[0]) /* can't really happen */ ++ && ('.' != fname[0]) ++ ) ? 1 : 0 ; ++} + +-#line 626 "scanner.c" ++ ++#line 652 "scanner.c" + + #define INITIAL 0 + #define COMMENT 1 + #define STRING 2 +-#define INCLUDE 3 ++#define INCLUDE_F 3 ++#define INCLUDE_D 4 + + #ifndef YY_NO_UNISTD_H + /* Special case for "unistd.h", since it is non-ANSI. We include it way +@@ -652,8 +679,8 @@ struct yyguts_t + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; +- yy_size_t yy_n_chars; +- yy_size_t yyleng_r; ++ int yy_n_chars; ++ int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; +@@ -706,7 +733,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner ); + + void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner ); ++int libconfig_yyget_leng (yyscan_t yyscanner ); + + char *libconfig_yyget_text (yyscan_t yyscanner ); + +@@ -714,10 +741,6 @@ int libconfig_yyget_lineno (yyscan_t yyscanner ); + + void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +-int libconfig_yyget_column (yyscan_t yyscanner ); +- +-void libconfig_yyset_column (int column_no ,yyscan_t yyscanner ); +- + YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner ); + + void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +@@ -754,7 +777,12 @@ static int input (yyscan_t yyscanner ); + + /* Amount of stuff to slurp up with each read. */ + #ifndef YY_READ_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k */ ++#define YY_READ_BUF_SIZE 16384 ++#else + #define YY_READ_BUF_SIZE 8192 ++#endif /* __ia64__ */ + #endif + + /* Copy whatever the last rule matched to the standard output. */ +@@ -861,6 +889,11 @@ YY_DECL + register int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + ++#line 121 "scanner.l" ++ ++ ++#line 896 "scanner.c" ++ + yylval = yylval_param; + + if ( !yyg->yy_init ) +@@ -889,12 +922,6 @@ YY_DECL + libconfig_yy_load_buffer_state(yyscanner ); + } + +- { +-#line 102 "scanner.l" +- +- +-#line 897 "scanner.c" +- + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; +@@ -912,7 +939,7 @@ YY_DECL + yy_match: + do + { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; ++ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; +@@ -921,13 +948,13 @@ yy_match: + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 103 ) ++ if ( yy_current_state >= 117 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } +- while ( yy_current_state != 102 ); ++ while ( yy_current_state != 116 ); + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + +@@ -938,7 +965,7 @@ yy_find_action: + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { +- yy_size_t yyl; ++ int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + +@@ -961,69 +988,69 @@ do_action: /* This label is used only to access EOF actions. */ + + case 1: + YY_RULE_SETUP +-#line 104 "scanner.l" ++#line 123 "scanner.l" + { BEGIN COMMENT; } + YY_BREAK + case 2: + YY_RULE_SETUP +-#line 105 "scanner.l" ++#line 124 "scanner.l" + { BEGIN INITIAL; } + YY_BREAK + case 3: + YY_RULE_SETUP +-#line 106 "scanner.l" ++#line 125 "scanner.l" + { /* ignore */ } + YY_BREAK + case 4: + /* rule 4 can match eol */ + YY_RULE_SETUP +-#line 107 "scanner.l" ++#line 126 "scanner.l" + { /* ignore */ } + YY_BREAK + case 5: + YY_RULE_SETUP +-#line 109 "scanner.l" ++#line 128 "scanner.l" + { BEGIN STRING; } + YY_BREAK + case 6: + /* rule 6 can match eol */ + YY_RULE_SETUP +-#line 110 "scanner.l" ++#line 129 "scanner.l" + { scanctx_append_string(yyextra, yytext); } + YY_BREAK + case 7: + YY_RULE_SETUP +-#line 111 "scanner.l" ++#line 130 "scanner.l" + { scanctx_append_string(yyextra, "\n"); } + YY_BREAK + case 8: + YY_RULE_SETUP +-#line 112 "scanner.l" ++#line 131 "scanner.l" + { scanctx_append_string(yyextra, "\r"); } + YY_BREAK + case 9: + YY_RULE_SETUP +-#line 113 "scanner.l" ++#line 132 "scanner.l" + { scanctx_append_string(yyextra, "\t"); } + YY_BREAK + case 10: + YY_RULE_SETUP +-#line 114 "scanner.l" ++#line 133 "scanner.l" + { scanctx_append_string(yyextra, "\f"); } + YY_BREAK + case 11: + YY_RULE_SETUP +-#line 115 "scanner.l" ++#line 134 "scanner.l" + { scanctx_append_string(yyextra, "\\"); } + YY_BREAK + case 12: + YY_RULE_SETUP +-#line 116 "scanner.l" ++#line 135 "scanner.l" + { scanctx_append_string(yyextra, "\""); } + YY_BREAK + case 13: + YY_RULE_SETUP +-#line 117 "scanner.l" ++#line 136 "scanner.l" + { + char c[2] = { (char)(strtol(yytext + 2, NULL, 16) & 0xFF), + 0 }; +@@ -1032,12 +1059,12 @@ YY_RULE_SETUP + YY_BREAK + case 14: + YY_RULE_SETUP +-#line 122 "scanner.l" ++#line 141 "scanner.l" + { scanctx_append_string(yyextra, "\\"); } + YY_BREAK + case 15: + YY_RULE_SETUP +-#line 123 "scanner.l" ++#line 142 "scanner.l" + { + yylval->sval = scanctx_take_string(yyextra); + BEGIN INITIAL; +@@ -1046,198 +1073,304 @@ YY_RULE_SETUP + YY_BREAK + case 16: + YY_RULE_SETUP +-#line 129 "scanner.l" +-{ BEGIN INCLUDE; } ++#line 148 "scanner.l" ++{ BEGIN INCLUDE_F; } + YY_BREAK + case 17: + /* rule 17 can match eol */ + YY_RULE_SETUP +-#line 130 "scanner.l" ++#line 149 "scanner.l" + { scanctx_append_string(yyextra, yytext); } + YY_BREAK + case 18: + YY_RULE_SETUP +-#line 131 "scanner.l" ++#line 150 "scanner.l" + { scanctx_append_string(yyextra, "\\"); } + YY_BREAK + case 19: + YY_RULE_SETUP +-#line 132 "scanner.l" ++#line 151 "scanner.l" + { scanctx_append_string(yyextra, "\""); } + YY_BREAK + case 20: + YY_RULE_SETUP +-#line 133 "scanner.l" ++#line 152 "scanner.l" + { +- const char *error; +- FILE *fp = scanctx_push_include(yyextra, +- (void *)YY_CURRENT_BUFFER, +- &error); +- if(fp) +- { +- yyin = fp; +- libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner); +- } +- else +- { +- yyextra->config->error_text = error; +- yyextra->config->error_file = scanctx_current_filename( +- yyextra); +- yyextra->config->error_line = libconfig_yyget_lineno( +- yyscanner); +- return TOK_ERROR; +- } +- BEGIN INITIAL; +- } ++ const char *error; ++ FILE *fp = scanctx_push_include(yyextra, ++ (void *)YY_CURRENT_BUFFER, ++ scanctx_getpath(yyextra), ++ &error); ++ if(fp) ++ { ++ yyin = fp; ++ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner ++ ); ++ } ++ else ++ { ++ yyextra->config->error_text = error; ++ yyextra->config->error_file = scanctx_current_filename( ++ yyextra); ++ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); ++ return TOK_ERROR; ++ } ++ BEGIN INITIAL; ++ } + YY_BREAK + case 21: +-/* rule 21 can match eol */ + YY_RULE_SETUP +-#line 157 "scanner.l" +-{ /* ignore */ } ++#line 177 "scanner.l" ++{ BEGIN INCLUDE_D; } + YY_BREAK + case 22: ++/* rule 22 can match eol */ + YY_RULE_SETUP +-#line 158 "scanner.l" +-{ /* ignore */ } ++#line 178 "scanner.l" ++{ scanctx_append_string(yyextra, yytext); } + YY_BREAK + case 23: + YY_RULE_SETUP +-#line 160 "scanner.l" +-{ return(TOK_EQUALS); } ++#line 179 "scanner.l" ++{ scanctx_append_string(yyextra, "\\"); } + YY_BREAK + case 24: + YY_RULE_SETUP +-#line 161 "scanner.l" +-{ return(TOK_COMMA); } ++#line 180 "scanner.l" ++{ scanctx_append_string(yyextra, "\""); } + YY_BREAK + case 25: + YY_RULE_SETUP +-#line 162 "scanner.l" +-{ return(TOK_GROUP_START); } ++#line 181 "scanner.l" ++{ ++ const char *error; ++ const char* basedir; ++ FILE *fp = NULL; ++ ++ basedir = scanctx_getpath(yyextra); ++ if(scanctx_dirscan(yyextra, basedir, filter_dotfiles, NULL) < 0) ++ { ++ if(basedir) ++ free((void*)basedir); ++ return TOK_ERROR; ++ } ++ ++ if(scanctx_inloop(yyextra)) ++ { ++ fp = scanctx_push_include(yyextra, ++ (void *)YY_CURRENT_BUFFER, ++ scanctx_filename(yyextra, NULL, scanctx_dirnext(yyextra)), ++ &error ++ ); ++ ++ if(fp) ++ { ++ yyin = fp; ++ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner ++ ); ++ } ++ else ++ { ++ yyextra->config->error_text = error; ++ yyextra->config->error_file = scanctx_current_filename(yyextra); ++ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); ++ } ++ } ++ else ++ scanctx_dirend(yyextra); /* avoid leaks */ ++ ++ BEGIN INITIAL; ++ } + YY_BREAK + case 26: ++/* rule 26 can match eol */ + YY_RULE_SETUP +-#line 163 "scanner.l" +-{ return(TOK_GROUP_END); } ++#line 223 "scanner.l" ++{ /* ignore */ } + YY_BREAK + case 27: + YY_RULE_SETUP +-#line 164 "scanner.l" +-{ yylval->ival = 1; return(TOK_BOOLEAN); } ++#line 224 "scanner.l" ++{ /* ignore */ } + YY_BREAK + case 28: + YY_RULE_SETUP +-#line 165 "scanner.l" +-{ yylval->ival = 0; return(TOK_BOOLEAN); } ++#line 226 "scanner.l" ++{ return(TOK_EQUALS); } + YY_BREAK + case 29: + YY_RULE_SETUP +-#line 166 "scanner.l" +-{ yylval->sval = yytext; return(TOK_NAME); } ++#line 227 "scanner.l" ++{ return(TOK_COMMA); } + YY_BREAK + case 30: + YY_RULE_SETUP +-#line 167 "scanner.l" +-{ yylval->fval = atof(yytext); return(TOK_FLOAT); } ++#line 228 "scanner.l" ++{ return(TOK_GROUP_START); } + YY_BREAK + case 31: + YY_RULE_SETUP +-#line 168 "scanner.l" ++#line 229 "scanner.l" ++{ return(TOK_GROUP_END); } ++ YY_BREAK ++case 32: ++YY_RULE_SETUP ++#line 230 "scanner.l" ++{ yylval->ival = 1; return(TOK_BOOLEAN); } ++ YY_BREAK ++case 33: ++YY_RULE_SETUP ++#line 231 "scanner.l" ++{ yylval->ival = 0; return(TOK_BOOLEAN); } ++ YY_BREAK ++case 34: ++YY_RULE_SETUP ++#line 232 "scanner.l" ++{ yylval->sval = yytext; return(TOK_NAME); } ++ YY_BREAK ++case 35: ++YY_RULE_SETUP ++#line 233 "scanner.l" ++{ yylval->fval = atof(yytext); return(TOK_FLOAT); } ++ YY_BREAK ++case 36: ++YY_RULE_SETUP ++#line 234 "scanner.l" + { + long long llval; +- llval = atoll(yytext); ++ char *endptr; ++ int errsave = errno; ++ errno = 0; ++ llval = strtoll(yytext, &endptr, 0); /* base 10 or base 8 */ ++ if(*endptr || errno) ++ { ++ errno = 0; ++ return(TOK_ERROR); /* some error occured ... */ ++ } ++ errno = errsave; ++ if((*yytext == '0') && (*(yytext+1) != '\0')) ++ { /* it's octal... so INT we go */ ++ yylval->ival = (int)(llval); ++ return(TOK_INTEGER); ++ } ++ + if((llval < INT_MIN) || (llval > INT_MAX)) + { +- yylval->llval = llval; +- return(TOK_INTEGER64); ++ yylval->llval = llval; ++ return(TOK_INTEGER64); + } + else + { +- yylval->ival = llval; +- return(TOK_INTEGER); ++ yylval->ival = llval; ++ return(TOK_INTEGER); + } + } + YY_BREAK +-case 32: ++case 37: + YY_RULE_SETUP +-#line 182 "scanner.l" ++#line 263 "scanner.l" + { yylval->llval = atoll(yytext); return(TOK_INTEGER64); } + YY_BREAK +-case 33: ++case 38: + YY_RULE_SETUP +-#line 183 "scanner.l" ++#line 264 "scanner.l" + { + yylval->ival = strtoul(yytext, NULL, 16); + return(TOK_HEX); + } + YY_BREAK +-case 34: ++case 39: + YY_RULE_SETUP +-#line 187 "scanner.l" ++#line 268 "scanner.l" + { yylval->llval = fromhex(yytext); return(TOK_HEX64); } + YY_BREAK +-case 35: ++case 40: + YY_RULE_SETUP +-#line 188 "scanner.l" ++#line 269 "scanner.l" + { return(TOK_ARRAY_START); } + YY_BREAK +-case 36: ++case 41: + YY_RULE_SETUP +-#line 189 "scanner.l" ++#line 270 "scanner.l" + { return(TOK_ARRAY_END); } + YY_BREAK +-case 37: ++case 42: + YY_RULE_SETUP +-#line 190 "scanner.l" ++#line 271 "scanner.l" + { return(TOK_LIST_START); } + YY_BREAK +-case 38: ++case 43: + YY_RULE_SETUP +-#line 191 "scanner.l" ++#line 272 "scanner.l" + { return(TOK_LIST_END); } + YY_BREAK +-case 39: ++case 44: + YY_RULE_SETUP +-#line 192 "scanner.l" ++#line 273 "scanner.l" + { return(TOK_SEMICOLON); } + YY_BREAK +-case 40: ++case 45: + *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ + yyg->yy_c_buf_p = yy_cp -= 1; + YY_DO_BEFORE_ACTION; /* set up yytext again */ + YY_RULE_SETUP +-#line 193 "scanner.l" ++#line 274 "scanner.l" + { /* ignore */ } + YY_BREAK +-case 41: ++case 46: + YY_RULE_SETUP +-#line 194 "scanner.l" ++#line 275 "scanner.l" + { return(TOK_GARBAGE); } + YY_BREAK + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(COMMENT): + case YY_STATE_EOF(STRING): +-case YY_STATE_EOF(INCLUDE): +-#line 196 "scanner.l" ++case YY_STATE_EOF(INCLUDE_F): ++case YY_STATE_EOF(INCLUDE_D): ++#line 277 "scanner.l" + { +- YY_BUFFER_STATE buf = (YY_BUFFER_STATE)scanctx_pop_include( +- yyextra); +- if(buf) +- { +- libconfig_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner); +- libconfig_yy_switch_to_buffer(buf,yyscanner); +- } +- else +- yyterminate(); +- } ++ const char* error; ++ FILE *fp; ++ YY_BUFFER_STATE buf = (YY_BUFFER_STATE)scanctx_pop_include(yyextra); ++ if(buf) ++ { ++ libconfig_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner); ++ libconfig_yy_switch_to_buffer(buf,yyscanner); ++ } ++ else /* if no more buffers, we are done */ ++ yyterminate(); ++ ++ if(scanctx_inloop(yyextra)) ++ { ++ /* gotta keep looping.... */ ++ fp = scanctx_push_include(yyextra, ++ (void *)YY_CURRENT_BUFFER, ++ scanctx_filename(yyextra, NULL, scanctx_dirnext(yyextra)), ++ &error ++ ); ++ if(fp) ++ { ++ yyin = fp; ++ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner ++ ); ++ } ++ else ++ { ++ yyextra->config->error_text = error; ++ yyextra->config->error_file = scanctx_current_filename(yyextra); ++ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); ++ } ++ } ++ else /* not on loop, or just finished */ ++ scanctx_dirend(yyextra); ++ } + YY_BREAK +-case 42: ++case 47: + YY_RULE_SETUP +-#line 207 "scanner.l" ++#line 315 "scanner.l" + ECHO; + YY_BREAK +-#line 1241 "scanner.c" ++#line 1374 "scanner.c" + + case YY_END_OF_BUFFER: + { +@@ -1367,7 +1500,6 @@ ECHO; + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +- } /* end of user's declarations */ + } /* end of libconfig_yylex */ + + /* yy_get_next_buffer - try to read in a new buffer +@@ -1424,21 +1556,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + + else + { +- yy_size_t num_to_read = ++ int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; ++ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { +- yy_size_t new_size = b->yy_buf_size * 2; ++ int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; +@@ -1469,7 +1601,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), +- yyg->yy_n_chars, num_to_read ); ++ yyg->yy_n_chars, (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } +@@ -1532,7 +1664,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 103 ) ++ if ( yy_current_state >= 117 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +@@ -1561,13 +1693,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 103 ) ++ if ( yy_current_state >= 117 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 102); ++ yy_is_jam = (yy_current_state == 116); + +- (void)yyg; + return yy_is_jam ? 0 : yy_current_state; + } + +@@ -1596,7 +1727,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + + else + { /* need more input */ +- yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) +@@ -1884,7 +2015,7 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner) + */ + static void libconfig_yyensure_buffer_stack (yyscan_t yyscanner) + { +- yy_size_t num_to_alloc; ++ int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { +@@ -1982,12 +2113,12 @@ YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char * yystr , yyscan_t yyscan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) ++YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; +- yy_size_t i; ++ int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; +@@ -2097,7 +2228,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner) + /** Get the length of the current token. + * @param yyscanner The scanner object. + */ +-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner) ++int libconfig_yyget_leng (yyscan_t yyscanner) + { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +@@ -2133,7 +2264,7 @@ void libconfig_yyset_lineno (int line_number , yyscan_t yyscanner) + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) +- YY_FATAL_ERROR( "libconfig_yyset_lineno called with no buffer" ); ++ yy_fatal_error( "libconfig_yyset_lineno called with no buffer" , yyscanner); + + yylineno = line_number; + } +@@ -2148,7 +2279,7 @@ void libconfig_yyset_column (int column_no , yyscan_t yyscanner) + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) +- YY_FATAL_ERROR( "libconfig_yyset_column called with no buffer" ); ++ yy_fatal_error( "libconfig_yyset_column called with no buffer" , yyscanner); + + yycolumn = column_no; + } +@@ -2372,4 +2503,4 @@ void libconfig_yyfree (void * ptr , yyscan_t yyscanner) + + #define YYTABLES_NAME "yytables" + +-#line 207 "scanner.l" ++#line 315 "scanner.l" diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake new file mode 100644 index 000000000..73028de7c --- /dev/null +++ b/ports/libconfig/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hyperrealm/libconfig + REF v1.6 + SHA512 6222110851970fda11d21e73bc322be95fb1ce62c513e2f4cc7875d7b32d1d211860971692db679edf8ac46151033a132fc669bd16590fec56360ef3a6e584f8 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-scanner-source-msvc-patch.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-scanner-header-msvc-patch.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/scandir.c DESTINATION ${SOURCE_PATH}/lib/win32) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/libconfig.h++ ${CURRENT_PACKAGES_DIR}/include/libconfig.h) + file(READ ${FILE} _contents) + string(REPLACE "defined(LIBCONFIGXX_EXPORTS)" "0" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_EXPORTS)" "0" _contents "${_contents}") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(LIBCONFIGXX_STATIC)" "0" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_STATIC)" "0" _contents "${_contents}") + else() + string(REPLACE "defined(LIBCONFIGXX_STATIC)" "1" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_STATIC)" "1" _contents "${_contents}") + endif() + file(WRITE ${FILE} "${_contents}") +endforeach() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/libconfig/scandir.c b/ports/libconfig/scandir.c new file mode 100644 index 000000000..cab75716e --- /dev/null +++ b/ports/libconfig/scandir.c @@ -0,0 +1,112 @@ +// "$Id: scandir.c 1339 2006-04-03 22:47:29Z spitzak $" +// +// Copyright 1998-2006 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems to "fltk-bugs@fltk.org". + +// Emulation of posix scandir() call +// This source file is #include'd by scandir.c +// THIS IS A C FILE! DO NOT CHANGE TO C++!!! +// See @http://www.fltk.org/strfiles/1779/scandir.c + +#include <string.h> +#include <windows.h> +#include <stdlib.h> +#include <io.h> +#include <dirent.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef FILENAME_MAX +#define FILENAME_MAX 2048 +#endif + +/** + * The scandir() function reads the directory dirname and builds an array of + * pointers to directory entries. It returns the number of entries in the array. + * A pointer to the array of directory entries is stored in the location + * referenced by namelist. + */ +int libconfig_scandir(const char *dirname, struct dirent ***namelist, + int (*select)(struct dirent *), + int (*compar)(struct dirent **, struct dirent **)) { + char *d; + WIN32_FIND_DATA find; + HANDLE h; + int nDir = 0, NDir = 0; + struct dirent **dir = 0, *selectDir; + unsigned long ret; + char findIn[MAX_PATH*4]; + + //utf8tomb(dirname, strlen(dirname), findIn, _MAX_PATH); + strcpy(findIn, dirname); + + d = findIn+strlen(findIn); + if (d==findIn) *d++ = '.'; + if (*(d-1)!='/' && *(d-1)!='\\') *d++ = '/'; + *d++ = '*'; + *d++ = 0; + + if ((h=FindFirstFile(findIn, &find))==INVALID_HANDLE_VALUE) { + ret = GetLastError(); + if (ret != ERROR_NO_MORE_FILES) { + // TODO: return some error code + } + *namelist = dir; + return nDir; + } + do { + selectDir=(struct dirent*)malloc(sizeof(struct dirent)); + strcpy(selectDir->d_name, find.cFileName); + if (!select || (*select)(selectDir)) { + if (nDir==NDir) { + struct dirent **tempDir = (struct dirent **)calloc(sizeof(struct dirent*), NDir+33); + if (NDir) memcpy(tempDir, dir, sizeof(struct dirent*)*NDir); + if (dir) free(dir); + dir = tempDir; + NDir += 32; + } + dir[nDir] = selectDir; + nDir++; + dir[nDir] = 0; + } else { + free(selectDir); + } + } while (FindNextFile(h, &find)); + ret = GetLastError(); + if (ret != ERROR_NO_MORE_FILES) { + // TODO: return some error code + } + FindClose(h); + + if (compar) qsort (dir, nDir, sizeof(*dir), + (int(*)(const void*, const void*))compar); + + *namelist = dir; + return nDir; +} + +#ifdef __cplusplus +} +#endif + +// +// End of "$Id: scandir.c 1339 2006-04-03 22:47:29Z spitzak $". +// diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL index 56ca1f4c7..87c0d0a64 100644 --- a/ports/libevent/CONTROL +++ b/ports/libevent/CONTROL @@ -1,3 +1,4 @@ Source: libevent -Version: 2.1.8-1 +Version: 2.1.8-2 +Build-Depends: openssl Description: An event notification library
\ No newline at end of file diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index ce0bc73ba..1c70dd11f 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libevent-release-2.1.8-stable) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/libevent/libevent/archive/release-2.1.8-stable.tar.gz" - FILENAME "libevent-2.1.8-stable.tar.gz" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libevent/libevent + REF release-2.1.8-stable SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549 ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -14,27 +14,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/libevent) - -file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/LibeventTargets-debug.cmake DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-debug.cmake "${DEBUG_MODULE}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-release.cmake RELEASE_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-release.cmake "${RELEASE_MODULE}") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) - -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventConfig.cmake CONFIG_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${LIBEVENT_CMAKE_DIR}/../.." CONFIG_MODULE "${CONFIG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventConfig.cmake "${CONFIG_MODULE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets.cmake TARGETS_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${LIBEVENT_CMAKE_DIR}/../.." TARGETS_MODULE "${TARGETS_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets.cmake "${TARGETS_MODULE}") +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_copy_pdbs() -file(COPY ${CURRENT_BUILDTREES_DIR}/src/libevent-release-2.1.8-stable/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libevent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libevent/copyright) -vcpkg_copy_pdbs() diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index d9df1c43d..14dd8ad9b 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,3 +1,3 @@ Source: libjpeg-turbo -Version: 1.5.1-1 +Version: 1.5.2 Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch b/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch index 5be2594c7..bd10a21bb 100644 --- a/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch +++ b/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index bfb7661..5373cd7 100644 +index 131b437..c29e604 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -55,6 +55,9 @@ option(WITH_JAVA "Build Java wrapper for the TurboJPEG library" FALSE) +@@ -62,6 +62,9 @@ option(WITH_JAVA "Build Java wrapper for the TurboJPEG library" FALSE) option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_SIMD=0 WITH_TURBOJPEG=0 WITH_ARITH_ENC=0 WITH_ARITH_DEC=0)" FALSE) option(ENABLE_STATIC "Build static libraries" TRUE) option(ENABLE_SHARED "Build shared libraries" TRUE) @@ -12,7 +12,7 @@ index bfb7661..5373cd7 100644 if(WITH_12BIT) set(WITH_SIMD FALSE) -@@ -264,14 +267,16 @@ if(WITH_TURBOJPEG) +@@ -279,14 +282,16 @@ if(WITH_TURBOJPEG) target_link_libraries(turbojpeg jpeg-static) set_target_properties(turbojpeg PROPERTIES LINK_INTERFACE_LIBRARIES "") @@ -36,7 +36,7 @@ index bfb7661..5373cd7 100644 endif() if(ENABLE_STATIC) -@@ -284,14 +289,16 @@ if(WITH_TURBOJPEG) +@@ -299,14 +304,16 @@ if(WITH_TURBOJPEG) add_dependencies(turbojpeg-static simd) endif() @@ -60,7 +60,7 @@ index bfb7661..5373cd7 100644 endif() endif() -@@ -303,7 +310,7 @@ else() +@@ -318,7 +325,7 @@ else() set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c) endif() @@ -69,7 +69,7 @@ index bfb7661..5373cd7 100644 add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c ${CJPEG_BMP_SOURCES}) set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS}) -@@ -319,10 +326,11 @@ if(ENABLE_STATIC) +@@ -334,10 +341,11 @@ if(ENABLE_STATIC) set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "-DUSE_SETMODE") endif() @@ -84,7 +84,7 @@ index bfb7661..5373cd7 100644 # # Tests -@@ -880,24 +888,30 @@ add_custom_target(installer +@@ -917,24 +925,30 @@ add_custom_target(installer if(WITH_TURBOJPEG) if(ENABLE_SHARED) @@ -119,7 +119,7 @@ index bfb7661..5373cd7 100644 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe DESTINATION bin RENAME cjpeg.exe) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe -@@ -907,14 +921,20 @@ if(ENABLE_STATIC) +@@ -944,17 +958,23 @@ if(ENABLE_STATIC) endif() endif() @@ -149,6 +149,10 @@ index bfb7661..5373cd7 100644 + ${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h + DESTINATION include) +endif() + + configure_file("${CMAKE_SOURCE_DIR}/cmakescripts/cmake_uninstall.cmake.in" + "cmake_uninstall.cmake" IMMEDIATE @ONLY) + diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt index d423cce..9da7c6e 100644 --- a/sharedlib/CMakeLists.txt diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index 995e8e0ee..d1138dbbf 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -1,16 +1,12 @@ include(vcpkg_common_functions) - -set(LIBJPEGTURBO_VERSION 1.5.1) -set(LIBJPEGTURBO_HASH "7b89f3c707daa98b0ed19ec417aab5273a1248ce7f98722a671ea80558a8eb0e73b136ce7be7c059f9f42262e682743abcab64e325f82cd4bd1531e0a4035209") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libjpeg-turbo-${LIBJPEGTURBO_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${LIBJPEGTURBO_VERSION}.zip" - FILENAME "libjpeg-turbo-${LIBJPEGTURBO_VERSION}.zip" - SHA512 ${LIBJPEGTURBO_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libjpeg-turbo/libjpeg-turbo + REF 1.5.2 + SHA512 43f0c3e8c87bef4f0010827fd3c245df2467c0a6c714d2984284d3a64f933d06bbffc9fb893c8f3f2cd7f8fce2702cf39074c34e5bf370d90d1ca0d03c803590 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch" @@ -45,7 +41,6 @@ vcpkg_configure_cmake( OPTIONS_DEBUG -DINSTALL_HEADERS=OFF ) -vcpkg_build_cmake() vcpkg_install_cmake() # Rename libraries for static builds diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 561cc81f8..5790f872d 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.29-2 +Version: 1.6.30 Build-Depends: zlib Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff --git a/ports/libpng/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch b/ports/libpng/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch deleted file mode 100644 index 3af02186f..000000000 --- a/ports/libpng/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e076d5e..428cf68 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -78,8 +78,8 @@ set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names") - set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings") - - # set definitions and sources for arm --if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm" OR -- ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^aarch64") -+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR -+ CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") - set(PNG_ARM_NEON_POSSIBLE_VALUES check on off) - set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations: - check: (default) use internal checking code; diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index ebcf78aa8..0dc6e2a0f 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -1,18 +1,17 @@ include(vcpkg_common_functions) -set(LIBPNG_VERSION 1.6.29) +set(LIBPNG_VERSION 1.6.30) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" FILENAME "libpng-${LIBPNG_VERSION}.tar.xz" - SHA512 070393423ec11f19e3264a0200959ae09238aa005615571586987253028b4ffb7e6b7c734a132f65180252b0259f79add03896d79fdc7dcfd8773b82c82a5ffc + SHA512 8c58f0f8523d7c7e8e641134c9a0e7fb6b60cddd6b4689afaafde0c99cff74652c6fb800a45149910aa2d8f06695ba4774f6a4d64810f2419a714d4188d72f82 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch - ${CMAKE_CURRENT_LIST_DIR}/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -32,6 +31,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DPNG_STATIC=${PNG_STATIC_LIBS} -DPNG_SHARED=${PNG_SHARED_LIBS} @@ -44,7 +44,6 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_HEADERS=ON ) -vcpkg_build_cmake() vcpkg_install_cmake() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -52,11 +51,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng ${CURRENT_PACKAGES_DIR}/share/libpng) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng/libpng16-debug.cmake ${CURRENT_PACKAGES_DIR}/share/libpng/libpng16-debug.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/libpng) +# Remove CMake config files as they are incorrectly generated and everyone uses built-in FindPNG anyway. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libpng ${CURRENT_PACKAGES_DIR}/debug/lib/libpng) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpng) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng/LICENSE ${CURRENT_PACKAGES_DIR}/share/libpng/copyright) diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL new file mode 100644 index 000000000..3e2294cee --- /dev/null +++ b/ports/libtorrent/CONTROL @@ -0,0 +1,4 @@ +Source: libtorrent +Version: 1.1.4 +Description: An efficient feature complete C++ BitTorrent implementation +Build-Depends: boost, openssl diff --git a/ports/libtorrent/add-datetime-to-boost-libs.patch b/ports/libtorrent/add-datetime-to-boost-libs.patch new file mode 100644 index 000000000..35d8de1cf --- /dev/null +++ b/ports/libtorrent/add-datetime-to-boost-libs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 340e38f..1963d90 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -258,7 +258,7 @@ endif() + + # Boost + if(NOT DEFINED Boost_INCLUDE_DIR OR NOT DEFINED Boost_LIBRARIES) +- FIND_PACKAGE(Boost REQUIRED COMPONENTS system chrono random) ++ FIND_PACKAGE(Boost REQUIRED COMPONENTS system date_time chrono random) + endif() + include_directories(${Boost_INCLUDE_DIRS}) + target_link_libraries(torrent-rasterbar ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) diff --git a/ports/libtorrent/add-dbghelp-to-win32-libs.patch b/ports/libtorrent/add-dbghelp-to-win32-libs.patch new file mode 100644 index 000000000..35df3bc2b --- /dev/null +++ b/ports/libtorrent/add-dbghelp-to-win32-libs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1963d90..99698a2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -267,7 +267,7 @@ target_link_libraries(torrent-rasterbar ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_I + #add_definitions(-DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -D__USE_W32_SOCKETS -DWIN32_LEAN_AND_MEAN ) + + if (WIN32) +- target_link_libraries(torrent-rasterbar wsock32 ws2_32 Iphlpapi) ++ target_link_libraries(torrent-rasterbar wsock32 ws2_32 Iphlpapi dbghelp) + add_definitions(-D_WIN32_WINNT=0x0600) + # prevent winsock1 to be included + add_definitions(-DWIN32_LEAN_AND_MEAN) diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake new file mode 100644 index 000000000..6eb49c0b4 --- /dev/null +++ b/ports/libtorrent/portfile.cmake @@ -0,0 +1,65 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtorrent-libtorrent-1_1_4) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/arvidn/libtorrent/archive/libtorrent-1_1_4.zip" + FILENAME "libtorrent-1_1_4.zip" + SHA512 fd3b875c9626721db9b3e719ce50deeb6f39a030df1e23dd421d0b142aac9c3bb7bee3a61f0c18bb30f85d4dd6131fe90d6138c09ba598f09230824f8d5a3fb1 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-datetime-to-boost-libs.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-dbghelp-to-win32-libs.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/vcpkg-boost-madness.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(LIBTORRENT_SHARED ON) +else() + set(LIBTORRENT_SHARED OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -Dshared=${LIBTORRENT_SHARED} + -Ddeprecated-functions=off +) + +vcpkg_install_cmake() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + # Put shared libraries into the proper directory + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/torrent-rasterbar.dll ${CURRENT_PACKAGES_DIR}/bin/torrent-rasterbar.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/torrent-rasterbar.dll ${CURRENT_PACKAGES_DIR}/debug/bin/torrent-rasterbar.dll) + + # Defines for shared lib + file(READ ${CURRENT_PACKAGES_DIR}/include/libtorrent/export.hpp EXPORT_H) + string(REPLACE "defined TORRENT_BUILDING_SHARED" "1" EXPORT_H "${EXPORT_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/libtorrent/export.hpp "${EXPORT_H}") +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtorrent) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libtorrent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtorrent/copyright) + +# Do not duplicate include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/libtorrent/vcpkg-boost-madness.patch b/ports/libtorrent/vcpkg-boost-madness.patch new file mode 100644 index 000000000..e9e498ee4 --- /dev/null +++ b/ports/libtorrent/vcpkg-boost-madness.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 99698a2..454bae6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -252,7 +252,7 @@ else() + + set(Boost_USE_STATIC_RUNTIME ON) + endif() +- set(Boost_USE_STATIC_LIBS ON) ++ set(Boost_USE_STATIC_LIBS OFF) + add_library(torrent-rasterbar STATIC ${sources2}) + endif() + diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index a4fb1457e..bbfcda090 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.12.0 +Version: 1.13.1 Description: libuv is a multi-platform support library with a focus on asynchronous I/O.
\ No newline at end of file diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 8c287bf5a..47447df99 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.12.0 - SHA512 879359747e8319b6e951157f9406176c53ee24833ab9ea3e6ad2b9cf25368fd8f166fa2074b89bdb75e2a6a77757d91a079c4ef86b92330a8ea11519cd1e3018 + REF v1.13.1 + SHA512 5d4bbc90f353ea438e8eac3ea0c4e89c09d3f51629c1d06b52072f04d8cccfd7119189ba21ad13eb8df28575e0844fbb1b09ed903bd95f6ea806e6cba353ef1a HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL new file mode 100644 index 000000000..9b7936004 --- /dev/null +++ b/ports/llvm/CONTROL @@ -0,0 +1,3 @@ +Source: llvm +Version: 4.0.0 +Description: The LLVM Compiler Infrastructure diff --git a/ports/llvm/install-cmake-modules-to-share.patch b/ports/llvm/install-cmake-modules-to-share.patch new file mode 100644 index 000000000..b5193beca --- /dev/null +++ b/ports/llvm/install-cmake-modules-to-share.patch @@ -0,0 +1,10 @@ +diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt +index ac4b0b7..13a271d 100644 +--- a/cmake/modules/CMakeLists.txt ++++ b/cmake/modules/CMakeLists.txt +@@ -1,4 +1,4 @@ +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + # First for users who use an installed LLVM, create the LLVMExports.cmake file. diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake new file mode 100644 index 000000000..9edf7f2b1 --- /dev/null +++ b/ports/llvm/portfile.cmake @@ -0,0 +1,45 @@ +# LLVM documentation recommends always using static library linkage when +# building with Microsoft toolchain; it's also the default on other platforms +set(VCPKG_LIBRARY_LINKAGE static) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-4.0.0.src) +vcpkg_download_distfile(ARCHIVE + URLS "http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz" + FILENAME "llvm-4.0.0.src.tar.xz" + SHA512 cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake-modules-to-share.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLLVM_TARGETS_TO_BUILD=X86 + -DLLVM_INCLUDE_TOOLS=OFF + -DLLVM_INCLUDE_UTILS=OFF + -DLLVM_INCLUDE_EXAMPLES=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF + -DLLVM_TOOLS_INSTALL_DIR=tools +) + +vcpkg_install_cmake() + +# Remove extra copy of cmake modules and include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Remove one empty include subdirectory if it is indeed empty +file(GLOB MCANALYSISFILES ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis/*) +if(NOT MCANALYSISFILES) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME copyright) diff --git a/ports/magnum-plugins/001-tools-path.patch b/ports/magnum-plugins/001-tools-path.patch new file mode 100644 index 000000000..18a351c2e --- /dev/null +++ b/ports/magnum-plugins/001-tools-path.patch @@ -0,0 +1,26 @@ +diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake +index e63bc03..052006f 100644 +--- a/modules/FindCorrade.cmake ++++ b/modules/FindCorrade.cmake +@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) + if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) + add_executable(Corrade::${_component} IMPORTED) + +- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) ++ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) + mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) + + if(CORRADE_${_COMPONENT}_EXECUTABLE) +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8df555d..12f7aa4 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) + add_executable(Magnum::${_component} IMPORTED) + +- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) ++ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) + mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) + + if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL new file mode 100644 index 000000000..f6e194c9f --- /dev/null +++ b/ports/magnum-plugins/CONTROL @@ -0,0 +1,4 @@ +Source: magnum-plugins +Version: jun2017-4 +Build-Depends: stb, magnum +Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake new file mode 100644 index 000000000..b26262490 --- /dev/null +++ b/ports/magnum-plugins/portfile.cmake @@ -0,0 +1,75 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-plugins + REF 34a3bc34335ca05097e735db19fe1fae81dbfbb5 + SHA512 918c3eeae246d1ac67e3595c50ff599872a0c1498e9a8a0386ad656f3d9d2209b048b53c25f198660e15201147795578c5c931b00116da46fd77d8e91c0826cb + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-tools-path.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) +else() + set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DWITH_STBIMAGECONVERTER=ON + -DWITH_STBIMAGEIMPORTER=ON + -DWITH_STBTRUETYPEFONT=ON + -DWITH_STBTRUETYPEFONT=ON + -DWITH_MINIEXRIMAGECONVERTER=ON + -DWITH_OPENGEXIMPORTER=ON + -DWITH_OPENGEXIMPORTER=ON + -DWITH_STANFORDIMPORTER=ON + -DWITH_DRWAVAUDIOIMPORTER=ON + -DWITH_ANYAUDIOIMPORTER=ON + -DWITH_ANYIMAGECONVERTER=ON + -DWITH_ANYSCENEIMPORTER=ON + -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) +else() + # remove headers and libs for plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + # hint vcpkg + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright) + +vcpkg_copy_pdbs()
\ No newline at end of file diff --git a/ports/magnum/001-sdl-includes.patch b/ports/magnum/001-sdl-includes.patch new file mode 100644 index 000000000..afa1301d9 --- /dev/null +++ b/ports/magnum/001-sdl-includes.patch @@ -0,0 +1,20 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h +index 99c3174..311b2c1 100644 +--- a/src/Magnum/Platform/Sdl2Application.h ++++ b/src/Magnum/Platform/Sdl2Application.h +@@ -42,11 +42,11 @@ + #ifdef CORRADE_TARGET_WINDOWS /* Windows version of SDL2 redefines main(), we don't want that */ + #define SDL_MAIN_HANDLED + #endif +-#include <SDL.h> +-#include <SDL_scancode.h> ++#include <SDL2/SDL.h> ++#include <SDL2/SDL_scancode.h> + + #ifdef CORRADE_TARGET_WINDOWS_RT +-#include <SDL_main.h> /* For SDL_WinRTRunApp */ ++#include <SDL2/SDL_main.h> /* For SDL_WinRTRunApp */ + #include <wrl.h> /* For the WinMain entrypoint */ + #endif + + diff --git a/ports/magnum/002-tools-path.patch b/ports/magnum/002-tools-path.patch new file mode 100644 index 000000000..18a351c2e --- /dev/null +++ b/ports/magnum/002-tools-path.patch @@ -0,0 +1,26 @@ +diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake +index e63bc03..052006f 100644 +--- a/modules/FindCorrade.cmake ++++ b/modules/FindCorrade.cmake +@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) + if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) + add_executable(Corrade::${_component} IMPORTED) + +- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) ++ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) + mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) + + if(CORRADE_${_COMPONENT}_EXECUTABLE) +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8df555d..12f7aa4 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) + add_executable(Magnum::${_component} IMPORTED) + +- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) ++ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) + mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) + + if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL new file mode 100644 index 000000000..a040014da --- /dev/null +++ b/ports/magnum/CONTROL @@ -0,0 +1,4 @@ +Source: magnum +Version: jun2017-5 +Build-Depends: corrade, sdl2, openal-soft +Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake new file mode 100644 index 000000000..9eff36dcf --- /dev/null +++ b/ports/magnum/portfile.cmake @@ -0,0 +1,88 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum + REF ed7eac0b42a598dff8984830e7f943dd6af07deb + SHA512 843e209b82b4f6f7c3f9612aec2641a28cb09361eefefe435bb7d2c06d0e4df65b6b9adf5893222cf31ddc3ccec967eb343da1da6180e9fbfef1b26234e145d5 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch + ${CMAKE_CURRENT_LIST_DIR}/002-tools-path.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) +else() + set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DWITH_SDL2APPLICATION=ON + -DWITH_WINDOWLESSWGLAPPLICATION=ON + -DWITH_WGLCONTEXT=ON + -DWITH_OPENGLTESTER=ON + -DWITH_AUDIO=ON + -DWITH_WAVAUDIOIMPORTER=ON + -DWITH_MAGNUMFONT=ON + -DWITH_MAGNUMFONTCONVERTER=ON + -DWITH_OBJIMPORTER=ON + -DWITH_TGAIMPORTER=ON + -DWITH_DISTANCEFIELDCONVERTER=ON + -DWITH_FONTCONVERTER=ON + -DWITH_TGAIMAGECONVERTER=ON + -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum + --trace +) + +vcpkg_install_cmake() + +# Drop a copy of tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) + +# Tools require dlls +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum) + +file(GLOB_RECURSE TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${TO_REMOVE}) + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) +else() + # remove headers and libs for plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum/copyright) + +vcpkg_copy_pdbs()
\ No newline at end of file diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt new file mode 100644 index 000000000..31b7e1e2b --- /dev/null +++ b/ports/matio/CMakeLists.txt @@ -0,0 +1,55 @@ +cmake_minimum_required(VERSION 3.8.0) +project(libmatio C) + +set(SRC + src/endian.c + src/inflate.c + src/io.c + src/mat.c + src/mat4.c + src/mat5.c + src/mat73.c + visual_studio/matio.def + src/matvar_cell.c + src/matvar_struct.c + src/read_data.c + src/snprintf.c +) + +add_library(libmatio ${SRC}) +target_include_directories(libmatio PRIVATE src visual_studio) +target_compile_definitions(libmatio PRIVATE + -DH5_NO_DEPRECATED_SYMBOLS + -DMAT73=1 + -DREPLACE_GETOPT + -DMATIO_HAVE_INTTYPES_H=1 + -DMATIO_HAVE_STDINT_H=1 +) + +find_package(ZLIB REQUIRED) +target_link_libraries(libmatio PRIVATE ZLIB::ZLIB) +target_compile_definitions(libmatio PRIVATE -DHAVE_ZLIB=1) + +find_package(HDF5 REQUIRED) +target_include_directories(libmatio PRIVATE ${HDF5_INCLUDE_DIRS} ) +target_link_libraries(libmatio PRIVATE ${HDF5_C_LIBRARIES}) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_DYNAMIC_LIB) +else() + target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_STATIC_LIB) +endif() + +install( + TARGETS libmatio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES + src/matio.h + visual_studio/matio_pubconf.h + DESTINATION include + ) +endif() diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL new file mode 100644 index 000000000..f4dac30a1 --- /dev/null +++ b/ports/matio/CONTROL @@ -0,0 +1,4 @@ +Source: matio +Version: 1.5.10-1 +Description: MATLAB MAT File I/O Library +Build-Depends: zlib, hdf5 diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake new file mode 100644 index 000000000..2878bdbfb --- /dev/null +++ b/ports/matio/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tbeu/matio + REF v1.5.10 + SHA512 c06ff6b3d17a136be20cebca4e1a4bb87eea98e35d979713e73f855487dee568895245528b1b8e55caf02f88aff1b742daf75f590e2d3b08158d0ad73e377243 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/matio RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/msinttypes/CONTROL b/ports/msinttypes/CONTROL new file mode 100644 index 000000000..a7ed816ee --- /dev/null +++ b/ports/msinttypes/CONTROL @@ -0,0 +1,3 @@ +Source: msinttypes +Version: 2017-06-26-f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 +Description: msinttypes is a package to provide missing ISO C9x compliant headers for Microsoft Visual Studio diff --git a/ports/msinttypes/portfile.cmake b/ports/msinttypes/portfile.cmake new file mode 100644 index 000000000..63fbd05eb --- /dev/null +++ b/ports/msinttypes/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chemeris/msinttypes + REF 7636cabe55318824dc702d15b69711f5d7c30250 + SHA512 1c3c350d12c6b69e1cb6469f742afc126d50fd92e137ecacdb8367e320350cd42d7d41fbb0aa38d6a13aefbef5308f9ec89825e9b80a932f552a889f63b35cb2 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/inttypes.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/msinttypes) +file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/msinttypes) +file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/msinttypes RENAME copyright) diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index c8270c56a..cc46b51b8 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,4 +1,4 @@ Source: nana
-Version: 1.5.1-hotfix-42f8985
+Version: 1.5.3
Description: Cross-platform library for GUI programming in modern C++ style.
Build-Depends: libpng, libjpeg-turbo
diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index f2b7fab17..7150122e7 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cnjinhao/nana
- REF 42f89854fd6795d9b2113d011a87404dcc9ba37e
- SHA512 89b75ccb95e5c4a2075a59064de0b0ff2fca90f90e9b391c2def7f74cc7484930b7139e314f33250bfaa148bfc5a5c9cf78ae3cac2336e0f32a9651670c36685
+ REF v1.5.3
+ SHA512 92f2a5023da180616420c411d4ebe0abf5043493688ada82aa5fa15a9331a8842f7def219a1d9edf476b40d311caac1354a5042c87b377af88117fdfae2daced
HEAD_REF develop
)
diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 8da12f3d9..97f2017ee 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.2.0-1 +Version: 3.2.0-2 Build-Depends: zlib, libpng, libjpeg-turbo, tiff #Use the following line instead for optional features from OpenCV-contrib that require protobuf #Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index c72eefba1..b296e3658 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -42,6 +42,7 @@ vcpkg_configure_cmake( -DBUILD_PNG=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF + -DBUILD_opencv_flann=OFF -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL new file mode 100644 index 000000000..b04914c5c --- /dev/null +++ b/ports/openimageio/CONTROL @@ -0,0 +1,4 @@ +Source: openimageio +Version: 1.7.15 +Description: An library for reading and writing images, and a bunch of related classes, utilities, and application +Build-Depends: boost, libjpeg-turbo, tiff, libpng, openexr
\ No newline at end of file diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake new file mode 100644 index 000000000..cc62bd58c --- /dev/null +++ b/ports/openimageio/portfile.cmake @@ -0,0 +1,53 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenImageIO/oiio + REF Release-1.7.15 + SHA512 5b83961a77de36082e0a3abeac8015f9455504680d7437777524a9ac17ac7994df2a2ad1af86a884cf17c1afcd71a36a30e24711cba8d8a30511c05e36d7fadc + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILDSTATIC ON) + set(LINKSTATIC ON) +else() + set(BUILDSTATIC OFF) + set(LINKSTATIC OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOIIO_BUILD_TOOLS=OFF + -DOIIO_BUILD_TESTS=OFF + -DHIDE_SYMBOLS=ON + -DUSE_FFMPEG=OFF + -DUSE_FIELD3D=OFF + -DUSE_FREETYPE=OFF + -DUSE_GIF=OFF + -DUSE_LIBRAW=OFF + -DUSE_NUKE=OFF + -DUSE_OCIO=OFF + -DUSE_OPENCV=OFF + -DUSE_OPENJPEG=OFF + -DUSE_PTEX=OFF + -DUSE_PYTHON=OFF + -DUSE_QT=OFF + -DBUILDSTATIC=${BUILDSTATIC} + -DLINKSTATIC=${LINKSTATIC} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openimageio) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openimageio/LICENSE ${CURRENT_PACKAGES_DIR}/share/openimageio/copyright) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index fb5861cd4..bb00f9cc3 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2k-5 +Version: 1.0.2l-1 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index cc29c7e4d..e1f7a7932 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -27,7 +27,7 @@ endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2k_WinRT) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2l_WinRT) vcpkg_find_acquire_program(PERL) vcpkg_find_acquire_program(JOM) @@ -36,9 +36,9 @@ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2k_WinRT.zip" - FILENAME "openssl-microsoft-1.0.2k_WinRT.zip" - SHA512 afb434ef69c399f690f7ce723fabb228f77a12428f19062c5df3b8b841a2a7881c01150fdcfd2fab23867e3963292874a08ad227b37d168907b507fb1d7fede7 + URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2l_WinRT.zip" + FILENAME "openssl-microsoft-1.0.2l_WinRT.zip" + SHA512 238b3daad7f1a2486e09d47e6d1bd4b0aa8e8a896358c6dfe11a77c2654da1b29d3c7612f9d200d5be5a020f33d96fe39cd75b99aa35aa4129feb756f7f98ee8 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL index 7177b2199..6f794c986 100644 --- a/ports/opus/CONTROL +++ b/ports/opus/CONTROL @@ -1,3 +1,3 @@ Source: opus -Version: 1.1.4 +Version: 1.2.1 Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index a004f09dd..5bc9b6b60 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -1,11 +1,26 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP builds not supported") +endif() + include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opus-1.1.4) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.xiph.org/releases/opus/opus-1.1.4.tar.gz" - FILENAME "opus-1.1.4.tar.gz" - SHA512 57f14b9e8037eaa02a4d86535d3bbcceca249310fbc9ef1a452cc19dd442d4cf338d5db241d20605c236e22549df2c8266b7486c5f1666b80c532afd52cb3585 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/opus + REF v1.2.1 + SHA512 fdc64b43875dd07dc9eb1c37e9a61d1c10e3095de62ed9597d51b93445136958c9f5fee78c33ae7f90c72a20200083cdc727d8e79f2f9e580ad4e2f8c50cccb4 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + +# Ensure proper crt linkage +file(READ ${SOURCE_PATH}/win32/VS2015/common.props OPUS_PROPS) +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + string(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" OPUS_PROPS "${OPUS_PROPS}") + string(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" OPUS_PROPS "${OPUS_PROPS}") +else() + string(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" OPUS_PROPS "${OPUS_PROPS}") + string(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" OPUS_PROPS "${OPUS_PROPS}") +endif() +file(WRITE ${SOURCE_PATH}/win32/VS2015/common.props "${OPUS_PROPS}") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(RELEASE_CONFIGURATION "Release") @@ -20,44 +35,21 @@ if(TARGET_TRIPLET MATCHES "x86") elseif(TARGET_TRIPLET MATCHES "x64") set(ARCH_DIR "x64") else() - message("Architecture not supported") + message(FATAL_ERROR "Architecture not supported") endif() -function(build_project PROJECT_PATH) - vcpkg_build_msbuild( - PROJECT_PATH ${PROJECT_PATH} - RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} - DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} - ) -endfunction(build_project) - - -build_project(${SOURCE_PATH}/win32/VS2015/celt.vcxproj) -build_project(${SOURCE_PATH}/win32/VS2015/silk_common.vcxproj) -build_project(${SOURCE_PATH}/win32/VS2015/silk_float.vcxproj) -build_project(${SOURCE_PATH}/win32/VS2015/silk_fixed.vcxproj) -build_project(${SOURCE_PATH}/win32/VS2015/opus.vcxproj) - +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/win32/VS2015/opus.vcxproj + RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} +) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) # Install release build file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/celt.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_common.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_fixed.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_float.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) # Install debug build file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/celt.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/celt.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_common.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_common.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_fixed.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_fixed.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_float.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_float.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) else() # Install release build file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) @@ -66,11 +58,18 @@ else() # Install debug build file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) endif() +vcpkg_copy_pdbs() + # Install headers file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME opus) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(READ ${CURRENT_PACKAGES_DIR}/include/opus/opus_defines.h OPUS_DEFINES) + string(REPLACE "define OPUS_EXPORT" "define OPUS_EXPORT __declspec(dllimport)" OPUS_DEFINES "${OPUS_DEFINES}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/opus/opus_defines.h "${OPUS_DEFINES}") +endif() + # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/opus RENAME copyright) diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL index aeabb2012..6a321d5d0 100644 --- a/ports/pcre/CONTROL +++ b/ports/pcre/CONTROL @@ -1,3 +1,3 @@ Source: pcre -Version: 8.40-1 +Version: 8.41 Description: Perl Compatible Regular Expresions diff --git a/ports/pcre/fix-arm-config-define.patch b/ports/pcre/fix-arm-config-define.patch index 94ca808c3..eb136a8cd 100644 --- a/ports/pcre/fix-arm-config-define.patch +++ b/ports/pcre/fix-arm-config-define.patch @@ -28,27 +28,33 @@ index 4dc452f..5a9827d 100644 #endif -diff --git "a/sljit/sljitNativeARM_32.c" "b/sljit/sljitNativeARM_32.c" -index a756f82..86bdcbb 100644 ---- "a/sljit/sljitNativeARM_32.c" -+++ "b/sljit/sljitNativeARM_32.c" -@@ -1798,7 +1798,8 @@ extern "C" { +diff --git a/sljit/sljitNativeARM_32.c b/sljit/sljitNativeARM_32.c +index 745da99..83942b0 100644 +--- a/sljit/sljitNativeARM_32.c ++++ b/sljit/sljitNativeARM_32.c +@@ -1573,12 +1573,8 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 + extern "C" { + #endif + +-#if defined(__GNUC__) extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); extern int __aeabi_idivmod(int numerator, int denominator); - #else +-#else -#error "Software divmod functions are needed" -+extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); -+extern int __aeabi_idivmod(int numerator, int denominator); - #endif +-#endif #ifdef __cplusplus -@@ -1852,7 +1853,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile + } +@@ -1635,12 +1631,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile + } + } + +-#if defined(__GNUC__) FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); - #else +-#else -#error "Software divmod functions are needed" -+ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, -+ ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); - #endif +-#endif - if ((op >= SLJIT_DIV_UW) && (compiler->scratches >= 3)) { + if (saved_reg_count > 0) { + if (saved_reg_count >= 3) { diff --git a/ports/pcre/fix-option-2.patch b/ports/pcre/fix-option-2.patch index f9d8e0e5e..de78c5f16 100644 --- a/ports/pcre/fix-option-2.patch +++ b/ports/pcre/fix-option-2.patch @@ -17,7 +17,7 @@ index 858a34bd..d1a64570 100644 - OPTION(PCRE_STATIC_RUNTIME - "ON=Compile against the static runtime (/MT)." - OFF) -+ add_definitions(/wd4703) ++ add_definitions(/wd4703 /wd4146 /wd4308) + OPTION(PCRE_STATIC_RUNTIME "ON=Compile against the static runtime (/MT)." OFF) OPTION(INSTALL_MSVC_PDB "ON=Install .pdb files built by MSVC, if generated" diff --git a/ports/pcre/fix-option.patch b/ports/pcre/fix-option.patch deleted file mode 100644 index d1a2b13eb..000000000 --- a/ports/pcre/fix-option.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 42451ad..858a34b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -191,7 +191,7 @@ IF (MINGW) - ENDIF(MINGW) - - IF(MSVC) -- OPTION(PCRE_STATIC_RUNTIME OFF CACHE BOOL -+ OPTION(PCRE_STATIC_RUNTIME - "ON=Compile against the static runtime (/MT)." - OFF) - OPTION(INSTALL_MSVC_PDB diff --git a/ports/pcre/portfile.cmake b/ports/pcre/portfile.cmake index f2088ef69..5e9009ace 100644 --- a/ports/pcre/portfile.cmake +++ b/ports/pcre/portfile.cmake @@ -6,20 +6,19 @@ # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # -set(PCRE_VERSION 8.40) +set(PCRE_VERSION 8.41) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre-${PCRE_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PCRE_VERSION}.zip" "https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.zip" FILENAME "pcre-${PCRE_VERSION}.zip" - SHA512 121c0389a739a2a1d7d5d87e5f15167601739ddfab9eed66a1f55b5bbadadb58730208430f5ad069f9342c9a84ee1817dfa07efc802c29c84f86147714ee8eff + SHA512 a3fd57090a5d9ce9d608aeecd59f42f04deea5b86a5c5899bdb25b18d8ec3a89b2b52b62e325c6485a87411eb65f1421604f80c3eaa653bd7dbab05ad22795ea ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-option-2.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option-2.patch ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch) vcpkg_configure_cmake( diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch new file mode 100644 index 000000000..aec510f44 --- /dev/null +++ b/ports/protobuf/001-add-compiler-flag.patch @@ -0,0 +1,65 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 7618ba21..bd92b09d 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -165,8 +165,11 @@ endif (protobuf_UNICODE) + + include(libprotobuf-lite.cmake) + include(libprotobuf.cmake) +-include(libprotoc.cmake) +-include(protoc.cmake) ++ ++if(protobuf_BUILD_COMPILER) ++ include(libprotoc.cmake) ++ include(protoc.cmake) ++endif() + + if (protobuf_BUILD_TESTS) + include(tests.cmake) +diff --git a/cmake/install.cmake b/cmake/install.cmake +index 28dc90dc..52c1f721 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -1,9 +1,12 @@ + include(GNUInstallDirs) + ++set(LIBRARIES_TO_SET_DEST libprotobuf-lite libprotobuf) ++if(protobuf_BUILD_COMPILER) ++ list(APPEND LIBRARIES_TO_SET_DEST libprotoc) ++endif() ++ + foreach(_library +- libprotobuf-lite +- libprotobuf +- libprotoc) ++ ${LIBRARIES_TO_SET_DEST}) + set_property(TARGET ${_library} + PROPERTY INTERFACE_INCLUDE_DIRECTORIES + $<BUILD_INTERFACE:${protobuf_source_dir}/src> +@@ -14,8 +17,10 @@ foreach(_library + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}) + endforeach() + +-install(TARGETS protoc EXPORT protobuf-targets +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) ++if(protobuf_BUILD_COMPILER) ++ install(TARGETS protoc EXPORT protobuf-targets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) ++endif() + + file(STRINGS extract_includes.bat.in _extract_strings + REGEX "^copy") +@@ -94,7 +99,12 @@ configure_file(protobuf-options.cmake + ${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY) + + # Allows the build directory to be used as a find directory. +-export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc ++set(FIND_DIRS libprotobuf-lite libprotobuf) ++if(protobuf_BUILD_COMPILER) ++ list(APPEND FIND_DIRS libprotoc protoc) ++endif() ++ ++export(TARGETS ${FIND_DIRS} + NAMESPACE protobuf:: + FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake + ) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 43e4ad1e8..192b57f96 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.3.0-1 +Version: 3.3.0-3 Build-Depends: zlib Description: Protocol Buffers - Google's data interchange format
\ No newline at end of file diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 852086ff5..fa81e0542 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -20,14 +20,23 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE}) # Patch to fix the missing export of fixed_address_empty_string, # see https://github.com/google/protobuf/pull/3216 +# Add a flag that can be set to disable the protobuf compiler vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION} PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-missing-export.patch" + "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" ) vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH}) +# Disable the protobuf compiler when targeting UWP +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + set(protobuf_BUILD_COMPILER OFF) +else() + set(protobuf_BUILD_COMPILER ON) +endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(protobuf_BUILD_SHARED_LIBS ON) else() @@ -47,6 +56,7 @@ vcpkg_configure_cmake( -Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME} -Dprotobuf_WITH_ZLIB=ON -Dprotobuf_BUILD_TESTS=OFF + -Dprotobuf_BUILD_COMPILER=${protobuf_BUILD_COMPILER} -DCMAKE_INSTALL_CMAKEDIR=share/protobuf ) @@ -85,6 +95,16 @@ else() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) endif() +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/arena.h ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/port.h) + file(READ ${FILE} _contents) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents "${_contents}") + else() + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents "${_contents}") + endif() + file(WRITE ${FILE} "${_contents}") +endforeach() + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright) file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) vcpkg_copy_pdbs() diff --git a/ports/ptex/CONTROL b/ports/ptex/CONTROL new file mode 100644 index 000000000..b2e6bff27 --- /dev/null +++ b/ports/ptex/CONTROL @@ -0,0 +1,4 @@ +Source: ptex +Version: 2.1.28 +Description: Per-Face Texture Mapping for Production Rendering. +Build-Depends: zlib diff --git a/ports/ptex/fix-build.patch b/ports/ptex/fix-build.patch new file mode 100644 index 000000000..6d6484d60 --- /dev/null +++ b/ports/ptex/fix-build.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dd327d0..5043452 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,15 +6,6 @@ include(CTest) + include(FindZLIB) + include(FindThreads) + +-enable_testing() +- +-# Detect the build type from the $FLAVOR environment variable +-if ("$ENV{FLAVOR}" MATCHES "debug") +- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE) +-else () +- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE) +-endif () +- + if (NOT WIN32) + set(CMAKE_CXX_FLAGS "-std=c++98 -Wall -Wextra -pedantic") + endif () +@@ -40,6 +31,6 @@ include_directories(src/ptex) + include_directories(${ZLIB_INCLUDE_DIR}) + + add_subdirectory(src/ptex) +-add_subdirectory(src/utils) +-add_subdirectory(src/tests) +-add_subdirectory(src/doc) ++#add_subdirectory(src/utils) ++#add_subdirectory(src/tests) ++#add_subdirectory(src/doc) +diff --git a/src/ptex/CMakeLists.txt b/src/ptex/CMakeLists.txt +index c926d98..ac2c71d 100644 +--- a/src/ptex/CMakeLists.txt ++++ b/src/ptex/CMakeLists.txt +@@ -1,6 +1,8 @@ +-if (WIN32) +- add_definitions(/DPTEX_EXPORTS) +-endif (WIN32) ++if (BUILD_SHARED_LIBS) ++ add_definitions(-DPTEX_EXPORTS) ++else () ++ add_definitions(-DPTEX_STATIC) ++endif () + + set(SRCS + PtexCache.cpp +@@ -14,15 +16,11 @@ set(SRCS + PtexUtils.cpp + PtexWriter.cpp) + +-add_library(Ptex_static STATIC ${SRCS}) +-set_target_properties(Ptex_static PROPERTIES OUTPUT_NAME Ptex) ++add_library(Ptex ${SRCS}) + +-add_library(Ptex_dynamic SHARED ${SRCS}) +-set_target_properties(Ptex_dynamic PROPERTIES OUTPUT_NAME Ptex) ++target_link_libraries(Ptex ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) + +-target_link_libraries(Ptex_dynamic ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) +- +-install(TARGETS Ptex_static Ptex_dynamic DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(TARGETS Ptex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + install(FILES + PtexHalf.h diff --git a/ports/ptex/portfile.cmake b/ports/ptex/portfile.cmake new file mode 100644 index 000000000..52d77096b --- /dev/null +++ b/ports/ptex/portfile.cmake @@ -0,0 +1,35 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP build not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wdas/ptex + REF v2.1.28 + SHA512 ddce3c79f14d196e550c1e8a5b371482f88190cd667a2e2aa84601de1639f7cabb8571c1b3a49b48df46ce550d27088a00a67b1403c3bfec2ed73437c3dca3e8 + HEAD_REF master) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-build.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +foreach(HEADER PtexHalf.h Ptexture.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} PTEX_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "ifndef PTEX_STATIC" "if 1" PTEX_HEADER "${PTEX_HEADER}") + else() + string(REPLACE "ifndef PTEX_STATIC" "if 0" PTEX_HEADER "${PTEX_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${PTEX_HEADER}") +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${SOURCE_PATH}/src/doc/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ptex) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/ptex/license.txt ${CURRENT_PACKAGES_DIR}/share/ptex/copyright) diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL index aaf569f25..a36061285 100644 --- a/ports/qhull/CONTROL +++ b/ports/qhull/CONTROL @@ -1,3 +1,3 @@ Source: qhull -Version:1.0 +Version: 2015.2 Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index 77c585b40..493a14e38 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/portfile.cmake @@ -1,7 +1,7 @@ # Common Ambient Variables: # CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} # PORT = current port name (zlib, etc) # TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) # VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) @@ -13,33 +13,45 @@ include(vcpkg_common_functions) vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH + OUT_SOURCE_PATH SOURCE_PATH REPO qhull/qhull - REF master - SHA512 16aa9f93ce6fe8342a3b579881f10bb417679b0a70849e6b0cc5a89551e4de773a43bb0d54948196690d68d168f3a2a215e4600745ff1566302b0b426565fb25 + REF 5a79a0009454c86e9848646b3c296009125231bf # Qhull 2015.2 + SHA512 ebcbf452eff420c62f92b734e5359b275493930b3e6798801eb1a81aa4fbf631b41e298a6071698c3b18c0939c55ddbc1b66b7019091bb4988dcfc7deb25e287 + HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include - -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - - OPTIONS_RELEASE - -Dqhull_TARGETS_INSTALL=qhullcpp - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib - - OPTIONS_DEBUG - -Dqhull_TARGETS_INSTALL=qhullcpp_d - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include + -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + OPTIONS_RELEASE + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib + OPTIONS_DEBUG + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib ) vcpkg_install_cmake() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(GLOB_RECURSE HTMFILES ${CURRENT_PACKAGES_DIR}/include/*.htm) file(REMOVE ${HTMFILES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) + +file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qhull) +file(COPY ${EXEFILES_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qhull) +file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_d.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_p.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_pd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_rd.lib) +endif() # Handle copyright file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull) diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index bcdde0e37..22a30137c 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,4 +1,4 @@ Source: qscintilla -Version: 2.10 -Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt)) +Version: 2.10-1 +Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) Build-Depends: qt5 diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index d07883b88..a03ecb7db 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -22,45 +22,60 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_find_acquire_program(PYTHON3) # Add python3 to path -get_filename_component(PYTHON_PATH ${PYTHON} DIRECTORY) +get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY) SET(ENV{PATH} "${PYTHON_PATH};$ENV{PATH}") +set(BUILD_OPTIONS + "${SOURCE_PATH}/Qt4Qt5/qscintilla.pro" + CONFIG+=build_all + CONFIG-=hide_symbols +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_OPTIONS + ${BUILD_OPTIONS} + CONFIG+=staticlib + ) +endif() + vcpkg_configure_qmake( SOURCE_PATH "${SOURCE_PATH}/Qt4Qt5" OPTIONS - CONFIG+=build_all - CONFIG-=hide_symbols + ${BUILD_OPTIONS} ) vcpkg_build_qmake() -# Install following vcpkg conventions (following qwt portfile) set(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -file(GLOB HEADER_FILES ${SOURCE_PATH}/include/*) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/qscintilla) +file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) file(INSTALL ${BUILD_DIR}/release/qscintilla2_qt5.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME qscintilla2.lib ) file(INSTALL ${BUILD_DIR}/debug/qscintilla2_qt5.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME qscintilla2.lib ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL - ${BUILD_DIR}/release/qscintilla2_qt5.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin + file(INSTALL + ${BUILD_DIR}/release/qscintilla2_qt5.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) file(INSTALL ${BUILD_DIR}/debug/qscintilla2_qt5.dll - ${BUILD_DIR}/debug/qscintilla2_qt5.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) + +vcpkg_copy_pdbs() + endif() # Handle copyright diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index cf127bf1b..a76186256 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -7,6 +7,10 @@ if(BUILDTREES_PATH_LENGTH GREATER 27) ) endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) include(configure_qt) include(install_qt) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL new file mode 100644 index 000000000..2efbda7c3 --- /dev/null +++ b/ports/rocksdb/CONTROL @@ -0,0 +1,4 @@ +Source: rocksdb +Version: 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c +Description: A library that provides an embeddable, persistent key-value store for fast storage +Build-Depends: snappy, lz4, gflags, zlib, gtest diff --git a/ports/rocksdb/fix-building-both-static-and-shared.patch b/ports/rocksdb/fix-building-both-static-and-shared.patch new file mode 100644 index 000000000..c9742450b --- /dev/null +++ b/ports/rocksdb/fix-building-both-static-and-shared.patch @@ -0,0 +1,91 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cbbde8e..cb19649 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -315,10 +315,13 @@ endif() + + include_directories(${PROJECT_SOURCE_DIR}) + include_directories(${PROJECT_SOURCE_DIR}/include) +-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) ++ + find_package(Threads REQUIRED) + +-add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) ++if(BUILD_TEST) ++ include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) ++ add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) ++endif() + + # Main library source code + +@@ -574,22 +577,28 @@ if(WITH_LIBRADOS) + list(APPEND THIRDPARTY_LIBS rados) + endif() + +-add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) +-target_link_libraries(${ROCKSDB_STATIC_LIB} ++if(NOT BUILD_SHARED_LIBS) ++ add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) ++ target_link_libraries(${ROCKSDB_STATIC_LIB} + ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) +- +-if(WIN32) +- add_library(${ROCKSDB_IMPORT_LIB} SHARED ${SOURCES}) +- target_link_libraries(${ROCKSDB_IMPORT_LIB} +- ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) +- set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES +- COMPILE_DEFINITIONS "ROCKSDB_DLL;ROCKSDB_LIBRARY_EXPORTS") + if(MSVC) + set_target_properties(${ROCKSDB_STATIC_LIB} PROPERTIES +- COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_STATIC_LIB}.pdb") ++ COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_STATIC_LIB}.pdb") ++ endif() ++ set(INSTALL_TARGETS ${INSTALL_TARGETS} ${ROCKSDB_STATIC_LIB}) ++else() ++ if(WIN32) ++ add_library(${ROCKSDB_IMPORT_LIB} SHARED ${SOURCES}) ++ target_link_libraries(${ROCKSDB_IMPORT_LIB} ++ ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) + set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES ++ COMPILE_DEFINITIONS "ROCKSDB_DLL;ROCKSDB_LIBRARY_EXPORTS") ++ if(MSVC) ++ set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES + COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_IMPORT_LIB}.pdb") ++ endif() + endif() ++ set(INSTALL_TARGETS ${INSTALL_TARGETS} ${ROCKSDB_IMPORT_LIB}) + endif() + + option(WITH_JNI "build with JNI" OFF) +@@ -600,6 +609,7 @@ else() + message(STATUS "JNI library is disabled") + endif() + ++if(BUILD_TEST) + set(TESTS + cache/cache_test.cc + cache/lru_cache_test.cc +@@ -810,6 +820,7 @@ foreach(sourcefile ${C_TEST_EXES}) + add_dependencies(check ${exename}${ARTIFACT_SUFFIX}) + endforeach(sourcefile ${C_TEST_EXES}) + add_subdirectory(tools) ++endif() + + # Installation and packaging for Linux + if(NOT WIN32) +@@ -819,4 +830,15 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/rocksdb/" + COMPONENT devel + DESTINATION include/rocksdb) + set(CMAKE_INSTALL_PREFIX /usr) ++else() ++ install( ++ TARGETS ${INSTALL_TARGETS} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) ++endif() ++ ++if(NOT DISABLE_INSTALL_HEADERS) ++ install(DIRECTORY "include/rocksdb/" DESTINATION include/rocksdb) + endif() diff --git a/ports/rocksdb/fix-third-party-deps.patch b/ports/rocksdb/fix-third-party-deps.patch new file mode 100644 index 000000000..7f832d158 --- /dev/null +++ b/ports/rocksdb/fix-third-party-deps.patch @@ -0,0 +1,64 @@ +diff --git a/thirdparty.inc b/thirdparty.inc +index 9fffd9b..2e1ea9d 100644 +--- a/thirdparty.inc ++++ b/thirdparty.inc +@@ -21,10 +21,10 @@ set (THIRDPARTY_LIBS "") # Initialization, don't touch + # + # Edit these 4 lines to define paths to GFLAGS + # +-set(GFLAGS_HOME $ENV{THIRDPARTY_HOME}/Gflags.Library) +-set(GFLAGS_INCLUDE ${GFLAGS_HOME}/inc/include) +-set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/bin/debug/amd64/gflags.lib) +-set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib) ++set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR}) ++set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include) ++set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/debug/lib/gflags.lib) ++set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/lib/gflags.lib) + + # ================================================== GFLAGS ================================================== + # +@@ -65,10 +65,10 @@ endif () + # + # Edit these 4 lines to define paths to Snappy + # +-set(SNAPPY_HOME $ENV{THIRDPARTY_HOME}/Snappy.Library) +-set(SNAPPY_INCLUDE ${SNAPPY_HOME}/inc/inc) +-set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/bin/debug/amd64/snappy.lib) +-set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib) ++set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR}) ++set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include) ++set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappy.lib) ++set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib) + + # + # Don't touch these lines +@@ -108,10 +108,10 @@ endif () + # + # Edit these 4 lines to define paths to LZ4 + # +-set(LZ4_HOME $ENV{THIRDPARTY_HOME}/LZ4.Library) +-set(LZ4_INCLUDE ${LZ4_HOME}/inc/include) +-set(LZ4_LIB_DEBUG ${LZ4_HOME}/bin/debug/amd64/lz4.lib) +-set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib) ++set(LZ4_HOME ${CURRENT_INSTALLED_DIR}) ++set(LZ4_INCLUDE ${LZ4_HOME}/include) ++set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4.lib) ++set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib) + + # + # Don't touch these lines +@@ -151,10 +151,10 @@ endif () + # + # Edit these 4 lines to define paths to ZLIB + # +-set(ZLIB_HOME $ENV{THIRDPARTY_HOME}/ZLIB.Library) +-set(ZLIB_INCLUDE ${ZLIB_HOME}/inc/include) +-set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/bin/debug/amd64/zlib.lib) +-set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/bin/retail/amd64/zlib.lib) ++set(ZLIB_HOME ${CURRENT_INSTALLED_DIR}) ++set(ZLIB_INCLUDE ${ZLIB_HOME}/include) ++set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/debug/lib/zlibd.lib) ++set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/lib/zlib.lib) + + # + # Don't touch these lines diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake new file mode 100644 index 000000000..a12ba4ca5 --- /dev/null +++ b/ports/rocksdb/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +find_program(GIT git) + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + message(FATAL_ERROR "Rocksdb only supports x64") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/rocksdb + REF 18c63af6ef2b9f014c404b88488ae52e6fead03c + SHA512 8dd4d27768feba6d9ddb61debe6cae21fa6d25c27dc347cba3b28cc39d2c1fa860dba7c8adedba4b40883eccccca190b60941cf958855c6b70ec5a3b96c20ac5 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-building-both-static-and-shared.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-third-party-deps.patch" +) + + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(WITH_MD_LIBRARY OFF) +else() + set(WITH_MD_LIBRARY ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGIT_EXECUTABLE=${GIT} + -DGFLAGS=1 + -DSNAPPY=1 + -DLZ4=1 + -DZLIB=1 + -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + -DFAIL_ON_WARNINGS=OFF + -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake(DISABLE_PARALLEL) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt new file mode 100644 index 000000000..91782fd18 --- /dev/null +++ b/ports/rtmidi/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.8) +project(rtmidi CXX) + +add_library(rtmidi RtMidi.cpp rtmidi_c.cpp) +if(BUILD_SHARED_LIBS) + target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) +endif() + +file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT) +if (BUILD_SHARED_LIBS) + string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}") +else() + string(REPLACE "if defined(RTMIDI_EXPORT)" "if 0" RTMIDI_EXPORT "${RTMIDI_EXPORT}") +endif() +file(WRITE "${PROJECT_BINARY_DIR}/rtmidi_c.h" "${RTMIDI_EXPORT}") + +install( + TARGETS rtmidi + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES "RtMidi.h" DESTINATION include) + install(FILES "${PROJECT_BINARY_DIR}/rtmidi_c.h" DESTINATION include) +endif() diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL new file mode 100644 index 000000000..9057812a0 --- /dev/null +++ b/ports/rtmidi/CONTROL @@ -0,0 +1,3 @@ +Source: rtmidi +Version: 2.1.1-1 +Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia) diff --git a/ports/rtmidi/portfile.cmake b/ports/rtmidi/portfile.cmake new file mode 100644 index 000000000..cee6e1a73 --- /dev/null +++ b/ports/rtmidi/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO thestk/rtmidi + REF 2.1.1 + SHA512 4d378720dd0f7c0e1a87741c088756839878ed56465b053040f70a1e039828fe221a6b1669b77b2fdd146cb192934c5719cc934c2c6a6304f44dbee2972c68e8 + HEAD_REF master +) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/readme DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtmidi RENAME copyright) diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt new file mode 100644 index 000000000..d0a9f0c82 --- /dev/null +++ b/ports/sdl2-gfx/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.0) +project(SDL2_GFX C) + +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_library(SDL_LIBRARY SDL2) + +# builtin formats +set(SDL_GFX_DEFINES WIN32) +if(BUILD_SHARED_LIBS) + list(APPEND SDL_GFX_DEFINES DLL_EXPORT) +endif() + +add_library(SDL2_gfx + SDL2_framerate.c + SDL2_gfxPrimitives.c + SDL2_imageFilter.c + SDL2_rotozoom.c) + +target_compile_definitions(SDL2_gfx PRIVATE ${SDL_GFX_DEFINES}) +target_include_directories(SDL2_gfx PRIVATE ${SDL_INCLUDE_DIR}/SDL2) +target_link_libraries(SDL2_gfx PRIVATE ${SDL_LIBRARY}) + +install(TARGETS SDL2_gfx + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT SDL_GFX_SKIP_HEADERS) + install(FILES SDL2_framerate.h SDL2_gfxPrimitives.h SDL2_imageFilter.h SDL2_rotozoom.h SDL2_gfxPrimitives_font.h DESTINATION include/SDL2) +endif() diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL new file mode 100644 index 000000000..799306235 --- /dev/null +++ b/ports/sdl2-gfx/CONTROL @@ -0,0 +1,4 @@ +Source: sdl2-gfx +Version: 1.0.3-1 +Build-Depends: sdl2 +Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake new file mode 100644 index 000000000..f7c2d63f6 --- /dev/null +++ b/ports/sdl2-gfx/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_gfx-1.0.3) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.3.zip" + FILENAME "SDL2_gfx-1.0.3.zip" + SHA512 f68485f71acf979aba68f3575f260fbc95a59496a9639498bcff80ffbfdb157c82a44bb5a0b0e3b1e157376ea4ff2f196f50466e6f24d850f94cfe7c24b1a497 +) +vcpkg_extract_source_archive(${ARCHIVE}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DSDL_GFX_SKIP_HEADERS=1 +) + +vcpkg_install_cmake() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/COPYING ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/copyright) + +vcpkg_copy_pdbs()
\ No newline at end of file diff --git a/ports/sobjectizer/001-cmake.patch b/ports/sobjectizer/001-cmake.patch new file mode 100644 index 000000000..cb4285e91 --- /dev/null +++ b/ports/sobjectizer/001-cmake.patch @@ -0,0 +1,36 @@ +diff --git a/so_5/CMakeLists.txt b/so_5/CMakeLists.txt +index bd6f1d7..0e30831 100644 +--- a/so_5/CMakeLists.txt ++++ b/so_5/CMakeLists.txt +@@ -71,12 +71,17 @@ set(SO_5_SRC exception.cpp + disp/prio_dedicated_threads/one_per_prio/pub.cpp + ) + +-add_library(${SO_5_TARGET} SHARED ${SO_5_SRC}) ++if (SO_BUILD_STATIC) ++ message(STATUS "Building static.") ++ add_library(${SO_5_TARGET} STATIC ${SO_5_SRC}) ++ target_compile_definitions(${SO_5_TARGET} ++ PUBLIC -DSO_5_STATIC_LIB ++ ) ++else() ++ message(STATUS "Building dynamic.") ++ add_library(${SO_5_TARGET} SHARED ${SO_5_SRC}) ++endif() + +-add_library(${SO_5_S_TARGET} STATIC ${SO_5_SRC}) +-target_compile_definitions(${SO_5_S_TARGET} +- PUBLIC -DSO_5_STATIC_LIB +-) + + set(SO_5_EXT_LIBS ) + if( ANDROID ) +@@ -90,7 +95,7 @@ foreach(__extLibrary ${SO_5_EXT_LIBS}) + endforeach() + + install( +- TARGETS ${SO_5_TARGET} ${SO_5_S_TARGET} ++ TARGETS ${SO_5_TARGET} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL new file mode 100644 index 000000000..9b9bd724e --- /dev/null +++ b/ports/sobjectizer/CONTROL @@ -0,0 +1,3 @@ +Source: sobjectizer +Version: 5.5.19.2 +Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels. diff --git a/ports/sobjectizer/portfile.cmake b/ports/sobjectizer/portfile.cmake new file mode 100644 index 000000000..5ea87917c --- /dev/null +++ b/ports/sobjectizer/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +set(VERSION 5.5.19.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev) + +vcpkg_download_distfile(ARCHIVE + URLS "https://downloads.sourceforge.net/project/sobjectizer/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip" + FILENAME "so-${VERSION}.tar.xz" + SHA512 8f70e751766ea43ddbc8e633aa729b81f01b84b7e3d4faf237e77a61dabe60bb1aaad8dabb868db4e473d801f5a639eb3d12aa8180feacb894f7a99b08375291 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-cmake.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(SO_BUILD_STATIC ON) + set(SO_BUILD_SHARED OFF) +else() + set(SO_BUILD_STATIC OFF) + set(SO_BUILD_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSO_BUILD_STATIC=${SO_BUILD_STATIC} + -DSO_BUILD_SHARED=${SO_BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# patch SO_5_STATIC_LIB in headers with actual value +set(DECLSPEC_FILE ${CURRENT_PACKAGES_DIR}/include/so_5/h/declspec.hpp) +file(READ ${DECLSPEC_FILE} DECLSPEC_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined( SO_5_STATIC_LIB )" "1" DECLSPEC_H "${DECLSPEC_H}") +else() + string(REPLACE "defined( SO_5_STATIC_LIB )" "0" DECLSPEC_H "${DECLSPEC_H}") +endif() +file(WRITE ${DECLSPEC_FILE} "${DECLSPEC_H}") + +# Handle copyright +file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sobjectizer/LICENSE ${CURRENT_PACKAGES_DIR}/share/sobjectizer/copyright) diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt new file mode 100644 index 000000000..839222ae6 --- /dev/null +++ b/ports/speex/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required (VERSION 3.8.0) +project (libspeex C) + +set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) + +option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) +if(MSVC) + add_definitions(-DHAVE_CONFIG_H) + if(USE_SSE) + add_definitions(-DUSE_SSE -DFLOATING_POINT) + else() + add_definitions(-DFIXED_POINT) + endif() +endif() + +include_directories(win32 include) + +set(CMAKE_DEBUG_POSTFIX d) + +set(SRC + "libspeex/bits.c" + "libspeex/cb_search.c" + "libspeex/exc_10_16_table.c" + "libspeex/exc_10_32_table.c" + "libspeex/exc_20_32_table.c" + "libspeex/exc_5_256_table.c" + "libspeex/exc_5_64_table.c" + "libspeex/exc_8_128_table.c" + "libspeex/fftwrap.c" + "libspeex/filters.c" + "libspeex/gain_table.c" + "libspeex/gain_table_lbr.c" + "libspeex/hexc_10_32_table.c" + "libspeex/hexc_table.c" + "libspeex/high_lsp_tables.c" + "libspeex/kiss_fft.c" + "libspeex/kiss_fftr.c" + "libspeex/lpc.c" + "libspeex/lsp.c" + "libspeex/lsp_tables_nb.c" + "libspeex/ltp.c" + "libspeex/modes.c" + "libspeex/modes_wb.c" + "libspeex/nb_celp.c" + "libspeex/quant_lsp.c" + "libspeex/sb_celp.c" + "libspeex/smallft.c" + "libspeex/speex.c" + "libspeex/speex_callbacks.c" + "libspeex/speex_header.c" + "libspeex/stereo.c" + "libspeex/vbr.c" + "libspeex/vq.c" + "libspeex/window.c" + "win32/libspeex.def" +) + +add_library(libspeex ${SRC}) + +install( + TARGETS libspeex + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL new file mode 100644 index 000000000..680dcdf13 --- /dev/null +++ b/ports/speex/CONTROL @@ -0,0 +1,3 @@ +Source: speex +Version: 1.2.0 +Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake new file mode 100644 index 000000000..6eed0cfc9 --- /dev/null +++ b/ports/speex/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/speex + REF Speex-1.2.0 + SHA512 612dfd67a9089f929b7f2a613ed3a1d2fda3d3ec0a4adafe27e2c1f4542de1870b42b8042f0dcb16d52e08313d686cc35b76940776419c775417f5bad18b448f + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/speex RENAME copyright) diff --git a/ports/think-cell-range/CONTROL b/ports/think-cell-range/CONTROL index 3b5872232..b7d53af12 100644 --- a/ports/think-cell-range/CONTROL +++ b/ports/think-cell-range/CONTROL @@ -1,5 +1,5 @@ Source: think-cell-range Maintainer: jfrederich@gmail.com -Version: e2d3018 +Version: 498839d Description: think-cell's range library <https://think-cell.com>, <https://github.com/think-cell/range>, <https://www.think-cell.com/en/career/talks/ranges/#1> Build-Depends: boost diff --git a/ports/think-cell-range/portfile.cmake b/ports/think-cell-range/portfile.cmake index 858461e36..56d01a55e 100644 --- a/ports/think-cell-range/portfile.cmake +++ b/ports/think-cell-range/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-e2d3018c3a797e7328dea005e72b34cace8b1fc6) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-498839d41519d38bb81089f7d0f517026bd042cc) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/think-cell/range/archive/e2d3018c3a797e7328dea005e72b34cace8b1fc6.zip" - FILENAME "think-cell_range-e2d3018.zip" - SHA512 13c74aba4950a84fdf446c976564030b18a740c5ce42b7650116a0559ba9e9a59471ff0f80132c626bc442402b3717805d3615b9ea70751e2dd1e648fd9f7916 + URLS "https://github.com/think-cell/range/archive/498839d41519d38bb81089f7d0f517026bd042cc.zip" + FILENAME "think-cell_range-498839d.zip" + SHA512 801e987c828c954cb50f9a6f9f2feee2ce05f7232d531ecce7394800ecc5a750992795da173fb72b6efcabd6978015a650730682b7db3f874fb8aaac28869711 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL new file mode 100644 index 000000000..46396427b --- /dev/null +++ b/ports/thor/CONTROL @@ -0,0 +1,4 @@ +Source: thor +Version: v2.0 +Description: Extends the multimedia library SFML with higher-level features +Build-Depends: sfml, aurora diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake new file mode 100644 index 000000000..c96df4728 --- /dev/null +++ b/ports/thor/portfile.cmake @@ -0,0 +1,70 @@ +include(vcpkg_common_functions) + + + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tests) +vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO Bromeon/Thor + REF v2.0 + SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9 + HEAD_REF master +) + +file(COPY ${CURRENT_INSTALLED_DIR}/include/Aurora DESTINATION ${SOURCE_PATH}/extlibs/aurora/include) + + +set(ENV{SFML_ROOT} ${CURRENT_INSTALLED_DIR}) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(THOR_STATIC_STD_LIBS ON) +else() + set(THOR_STATIC_STD_LIBS OFF) +endif() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(THOR_SHARED_LIBS ON) +else() + set(THOR_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTHOR_SHARED_LIBS=${THOR_SHARED_LIBS} + -DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS} +) + +vcpkg_install_cmake() + + +set(CONFIG_FILE "${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp") + +file(READ ${CONFIG_FILE} CONFIG_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(SFML_STATIC)" "1" CONFIG_H "${CONFIG_H}") + else() + string(REPLACE "defined(SFML_STATIC)" "0" CONFIG_H "${CONFIG_H}") + endif() + +file(WRITE ${CONFIG_FILE} "${CONFIG_H}") + +file(GLOB LICENSE + "${CURRENT_PACKAGES_DIR}/debug/LicenseThor.txt" + "${CURRENT_PACKAGES_DIR}/debug/LicenseAurora.txt" + "${CURRENT_PACKAGES_DIR}/LicenseThor.txt" + "${CURRENT_PACKAGES_DIR}/LicenseAurora.txt" +) + +if(LICENSE) + file(REMOVE ${LICENSE}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Aurora) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index ee5e20f34..aaa9a7c4f 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 5.0.0 -Description: A simple, small, efficient, C++ XML parser
\ No newline at end of file +Version: 5.0.1 +Description: A simple, small, efficient, C++ XML parser diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index 59184178d..0c8b0b84b 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -3,13 +3,21 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO leethomason/tinyxml2 - REF 5.0.0 - SHA512 ef310a466d0aec9dd0d25063c68f5312cd063366ee57499d8e462e25a556ea510617b66cdec1a368e8867dc082e0297e27fe09f16eb915392235be34206881e4 + REF 5.0.1 + SHA512 a51ec5843774df0482620c549fb6c61d30a6db5025be26ff6d25b3c53533a27a57f00b026bd9fbca78e9e30084b3f5f6fbff9dba315d078419da084b57f518ba HEAD_REF master ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC_LIBS 1) +else() + set(BUILD_STATIC_LIBS 0) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} ) vcpkg_install_cmake() diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index d963451ce..dc00025bf 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 7.1.0 +Version: 7.1.1 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi diff --git a/ports/vtk/fix-findhdf5-shared.patch b/ports/vtk/fix-findhdf5-shared.patch new file mode 100644 index 000000000..762a9ab07 --- /dev/null +++ b/ports/vtk/fix-findhdf5-shared.patch @@ -0,0 +1,20 @@ +diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake +index 6d558e39b1..9511e9a1ad 100644 +--- a/CMake/FindHDF5.cmake ++++ b/CMake/FindHDF5.cmake +@@ -3,11 +3,11 @@ + # (BUG #0014363). + + # include the default FindHDF5.cmake. +-if(CMAKE_VERSION VERSION_LESS 3.6.1) ++#if(CMAKE_VERSION VERSION_LESS 3.6.1) + include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindHDF5.cmake) +-else() +- include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) +-endif() ++#else() ++# include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) ++#endif() + + if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)) + include(vtkMPI) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 611023a61..16854513b 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/VTK-7.1.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/VTK-7.1.1) vcpkg_download_distfile(ARCHIVE - URLS "http://www.vtk.org/files/release/7.1/VTK-7.1.0.tar.gz" - FILENAME "VTK-7.1.0.tar.gz" - SHA512 83f0c9291cd2bc517a4bc449ad28a1d77e7ece169e846c7beab0b1140b9ef4b7bad30e3fa6e5a59826a707df78e2e336e07fa8bd30cf7498096ee80feef16534 + URLS "http://www.vtk.org/files/release/7.1/VTK-7.1.1.tar.gz" + FILENAME "VTK-7.1.1.tar.gz" + SHA512 34a068801fe45f98325e5334d2569fc9b15ed38620386f1b5b860c9735e5fb8510953b50a3340d3ef9795e22fecf798c25bf750215b2ff1ff1eb7a1ecd87b623 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -14,6 +14,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/transfer-hdf5-definitions.patch ${CMAKE_CURRENT_LIST_DIR}/netcdf-use-hdf5-definitions.patch ${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-findhdf5-shared.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index 19c1bd4e8..52713f2b8 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.2.0 +Version: 1.3.0 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/fix-buildsystem.diff b/ports/zstd/fix-buildsystem.diff deleted file mode 100644 index b0dfaf09c..000000000 --- a/ports/zstd/fix-buildsystem.diff +++ /dev/null @@ -1,100 +0,0 @@ -diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt -index 5c4eca6..2f933e2 100644 ---- a/build/cmake/CMakeLists.txt -+++ b/build/cmake/CMakeLists.txt -@@ -15,8 +15,8 @@ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") - #----------------------------------------------------------------------------- - # Add extra compilation flags - #----------------------------------------------------------------------------- --INCLUDE(AddZstdCompilationFlags) --ADD_ZSTD_COMPILATION_FLAGS() -+#INCLUDE(AddZstdCompilationFlags) -+#ADD_ZSTD_COMPILATION_FLAGS() Combination of flags set there makes no sense & triggers compiler errors in release - - #----------------------------------------------------------------------------- - # Options -diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt -index 429d494..4c13057 100644 ---- a/build/cmake/lib/CMakeLists.txt -+++ b/build/cmake/lib/CMakeLists.txt -@@ -90,37 +90,34 @@ IF (MSVC) - ENDIF (MSVC) - - # Split project to static and shared libraries build --ADD_LIBRARY(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources}) -+IF (ZSTD_BUILD_SHARED) -+ ADD_LIBRARY(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources}) -+ENDIF(ZSTD_BUILD_SHARED) - IF (ZSTD_BUILD_STATIC) - ADD_LIBRARY(libzstd_static STATIC ${Sources} ${Headers}) - ENDIF (ZSTD_BUILD_STATIC) - - # Add specific compile definitions for MSVC project - IF (MSVC) -- SET_PROPERTY(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS") -+ IF(ZSTD_BUILD_SHARED) -+ SET_PROPERTY(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS") -+ ENDIF(ZSTD_BUILD_SHARED) - IF (ZSTD_BUILD_STATIC) - SET_PROPERTY(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_HEAPMODE=0;_CRT_SECURE_NO_WARNINGS") - ENDIF (ZSTD_BUILD_STATIC) - ENDIF (MSVC) - - # Define library base name --IF (MSVC) -- -- IF (CMAKE_SIZEOF_VOID_P MATCHES "8") -- SET(LIBRARY_BASE_NAME "zstdlib_x64") -- ELSE () -- SET(LIBRARY_BASE_NAME "zstdlib_x86") -- ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8") --ELSE () -- SET(LIBRARY_BASE_NAME zstd) --ENDIF (MSVC) -+SET(LIBRARY_BASE_NAME zstd) - - # Define static and shared library names --SET_TARGET_PROPERTIES( -- libzstd_shared -- PROPERTIES -- OUTPUT_NAME ${LIBRARY_BASE_NAME} -- SOVERSION ${LIBVER_MAJOR}.${LIBVER_MINOR}.${LIBVER_RELEASE}) -+IF(ZSTD_BUILD_SHARED) -+ SET_TARGET_PROPERTIES( -+ libzstd_shared -+ PROPERTIES -+ OUTPUT_NAME ${LIBRARY_BASE_NAME} -+ SOVERSION ${LIBVER_MAJOR}.${LIBVER_MINOR}.${LIBVER_RELEASE}) -+ENDIF(ZSTD_BUILD_SHARED) - - IF (ZSTD_BUILD_STATIC) - SET_TARGET_PROPERTIES( -@@ -129,6 +126,15 @@ IF (ZSTD_BUILD_STATIC) - OUTPUT_NAME ${LIBRARY_BASE_NAME}) - ENDIF (ZSTD_BUILD_STATIC) - -+ -+INSTALL(FILES ${LIBRARY_DIR}/zstd.h ${LIBRARY_DIR}/deprecated/zbuff.h ${LIBRARY_DIR}/dictBuilder/zdict.h DESTINATION "include") -+IF(ZSTD_BUILD_SHARED) -+ INSTALL(TARGETS libzstd_shared RUNTIME DESTINATION "bin" ARCHIVE DESTINATION "lib" LIBRARY DESTINATION "lib") -+ENDIF(ZSTD_BUILD_SHARED) -+IF (ZSTD_BUILD_STATIC) -+ INSTALL(TARGETS libzstd_static ARCHIVE DESTINATION "lib") -+ENDIF (ZSTD_BUILD_STATIC) -+ - IF (UNIX) - # pkg-config - SET(PREFIX "${CMAKE_INSTALL_PREFIX}") -@@ -142,12 +148,7 @@ IF (UNIX) - COMMENT "Creating pkg-config file") - - # install target -- INSTALL(FILES ${LIBRARY_DIR}/zstd.h ${LIBRARY_DIR}/deprecated/zbuff.h ${LIBRARY_DIR}/dictBuilder/zdict.h DESTINATION "include") - INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/libzstd.pc" DESTINATION "share/pkgconfig") -- INSTALL(TARGETS libzstd_shared LIBRARY DESTINATION "lib") -- IF (ZSTD_BUILD_STATIC) -- INSTALL(TARGETS libzstd_static ARCHIVE DESTINATION "lib") -- ENDIF (ZSTD_BUILD_STATIC) - - # uninstall target - CONFIGURE_FILE( diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index d6fe4eb59..ba60826e0 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -2,13 +2,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF v1.2.0 - SHA512 b21910c6bdcfad3199c07b9f70f7c049062ebd1cce9249dd33c36153e29f24dd9e796ddbc2f37846b9f508c14b0d0f67651fd8d2bdce558128f20bdfff50a7df + REF v1.3.0 + SHA512 5eb9e001e14d3342e76eb57b672c636fd56839ba8fc0ba9a751484ea93389c72c494ad2125dc2f9be1f72481f3af34568477123f7e9d3c7504e061e4c083cb30 HEAD_REF dev) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.diff) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(ZSTD_STATIC 1) set(ZSTD_SHARED 0) @@ -33,7 +30,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - foreach(HEADER zdict.h zstd.h) + foreach(HEADER zdict.h zstd.h zstd_errors.h) file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS) string(REPLACE "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${HEADER_CONTENTS}") diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 932ba11cd..08a6d9a8f 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -50,6 +50,9 @@ function resolve([string]$targetBinary) { deployBinary $targetBinaryDir $installedDir "$_" if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" } resolve "$targetBinaryDir\$_" + } elseif (Test-Path "$targetBinaryDir\$_") { + Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" + resolve "$targetBinaryDir\$_" } else { Write-Verbose " ${_}: $installedDir\$_ not found" } diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 513c33ecb..41bdb3e60 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -140,3 +140,10 @@ if(NOT VCPKG_TOOLCHAIN) set(VCPKG_TOOLCHAIN ON) endif() + +set(_UNUSED ${CMAKE_TOOLCHAIN_FILE}) +set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}) +set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index c56b96ccc..eaf3bb966 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -73,7 +73,9 @@ function(vcpkg_fixup_cmake_targets) "${DEBUG_SHARE}/*[Cc]onfigVersion.cmake" "${DEBUG_SHARE}/*[Cc]onfig-version.cmake" ) - file(REMOVE ${UNUSED_FILES}) + if(UNUSED_FILES) + file(REMOVE ${UNUSED_FILES}) + endif() file(GLOB RELEASE_TARGETS "${RELEASE_SHARE}/*[Tt]argets-release.cmake" @@ -115,6 +117,10 @@ function(vcpkg_fixup_cmake_targets) foreach(MAIN_CONFIG ${MAIN_CONFIGS}) file(READ ${MAIN_CONFIG} _contents) string(REGEX REPLACE + "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}") + string(REGEX REPLACE "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\./(\\.\\./)*\" ABSOLUTE\\)" "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" _contents "${_contents}") diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index ca58ab10a..64d8838e7 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -2,6 +2,7 @@ function(vcpkg_get_windows_sdk ret) execute_process( COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1 + INPUT_FILE NUL OUTPUT_VARIABLE WINDOWS_SDK RESULT_VARIABLE error_code) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 82d50a68f..8e11ae5b1 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -775,15 +775,15 @@ namespace vcpkg::PostBuildLint error_count += check_lib_architecture(pre_build_info.target_architecture, libs); } + std::vector<fs::path> debug_dlls = fs.get_files_recursive(debug_bin_dir); + Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); + std::vector<fs::path> release_dlls = fs.get_files_recursive(release_bin_dir); + Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); + switch (build_info.library_linkage) { case Build::LinkageType::DYNAMIC: { - std::vector<fs::path> debug_dlls = fs.get_files_recursive(debug_bin_dir); - Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); - std::vector<fs::path> release_dlls = fs.get_files_recursive(release_bin_dir); - Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); - error_count += check_matching_debug_and_release_binaries(debug_dlls, release_dlls); error_count += check_lib_files_are_available_if_dlls_are_available( @@ -804,8 +804,8 @@ namespace vcpkg::PostBuildLint } case Build::LinkageType::STATIC: { - std::vector<fs::path> dlls = fs.get_files_recursive(package_dir); - Util::unstable_keep_if(dlls, has_extension_pred(fs, ".dll")); + auto dlls = release_dlls; + dlls.insert(dlls.end(), debug_dlls.begin(), debug_dlls.end()); error_count += check_no_dlls_present(dlls); error_count += check_bin_folders_are_not_present_in_static_build(fs, package_dir); diff --git a/toolsrc/src/commands_help.cpp b/toolsrc/src/commands_help.cpp index a9f9956fe..e4be11a77 100644 --- a/toolsrc/src/commands_help.cpp +++ b/toolsrc/src/commands_help.cpp @@ -56,7 +56,7 @@ namespace vcpkg::Commands::Help std::string create_example_string(const std::string& command_and_arguments) { std::string cs = Strings::format("Example:\n" - " vcpkg %s", + " vcpkg %s\n", command_and_arguments); return cs; } diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index c91c6be78..883fe6612 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -94,7 +94,7 @@ namespace vcpkg::System }; // Flush stdout before launching external process - _flushall(); + fflush(nullptr); std::vector<const wchar_t*> env_cstr; env_cstr.reserve(env_wstrings.size() + 2); @@ -125,7 +125,7 @@ namespace vcpkg::System int cmd_execute(const CWStringView cmd_line) { // Flush stdout before launching external process - _flushall(); + fflush(nullptr); // Basically we are wrapping it in quotes const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); |
