early-access version 2853
This commit is contained in:
13
externals/vcpkg/ports/brotli/fix-arm-uwp.patch
vendored
Executable file
13
externals/vcpkg/ports/brotli/fix-arm-uwp.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e6c6054..2c4b757 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -124,6 +124,8 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
add_definitions(-DOS_FREEBSD)
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
add_definitions(-DOS_MACOSX)
|
||||
+elseif(MSVC)
|
||||
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
function(transform_sources_list INPUT_FILE OUTPUT_FILE)
|
||||
12
externals/vcpkg/ports/brotli/fix-ios.patch
vendored
Executable file
12
externals/vcpkg/ports/brotli/fix-ios.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fcd9024..a717b87 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -225,6 +225,7 @@ if(NOT BROTLI_BUNDLED_MODE)
|
||||
install(
|
||||
TARGETS brotli
|
||||
RUNTIME DESTINATION tools/brotli
|
||||
+ BUNDLE DESTINATION tools/brotli
|
||||
CONFIGURATIONS Release
|
||||
)
|
||||
|
||||
58
externals/vcpkg/ports/brotli/install.patch
vendored
Executable file
58
externals/vcpkg/ports/brotli/install.patch
vendored
Executable file
@@ -0,0 +1,58 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4ff3401..46492d0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -185,14 +185,13 @@ endforeach()
|
||||
|
||||
foreach(lib IN LISTS BROTLI_SHARED_LIBS BROTLI_STATIC_LIBS)
|
||||
target_link_libraries(${lib} ${LIBM_LIBRARY})
|
||||
- set_property(TARGET ${lib} APPEND PROPERTY INCLUDE_DIRECTORIES ${BROTLI_INCLUDE_DIRS})
|
||||
set_target_properties(${lib} PROPERTIES
|
||||
VERSION "${BROTLI_ABI_COMPATIBILITY}.${BROTLI_ABI_AGE}.${BROTLI_ABI_REVISION}"
|
||||
SOVERSION "${BROTLI_ABI_COMPATIBILITY}")
|
||||
if(NOT BROTLI_EMSCRIPTEN)
|
||||
set_target_properties(${lib} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
- set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}")
|
||||
+ set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${BROTLI_INCLUDE_DIRS}>" $<INSTALL_INTERFACE:include>)
|
||||
endforeach()
|
||||
|
||||
if(NOT BROTLI_EMSCRIPTEN)
|
||||
@@ -223,27 +222,35 @@ if(NOT BROTLI_EMSCRIPTEN)
|
||||
if(NOT BROTLI_BUNDLED_MODE)
|
||||
install(
|
||||
TARGETS brotli
|
||||
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
+ RUNTIME DESTINATION tools/brotli
|
||||
+ CONFIGURATIONS Release
|
||||
)
|
||||
|
||||
+ if(BUILD_SHARED_LIBS)
|
||||
install(
|
||||
TARGETS ${BROTLI_LIBRARIES_CORE}
|
||||
+ EXPORT brotli
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
)
|
||||
-
|
||||
+ else()
|
||||
install(
|
||||
TARGETS ${BROTLI_LIBRARIES_CORE_STATIC}
|
||||
+ EXPORT brotli
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
)
|
||||
+ endif()
|
||||
|
||||
install(
|
||||
DIRECTORY ${BROTLI_INCLUDE_DIRS}/brotli
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
+ CONFIGURATIONS Release
|
||||
)
|
||||
+
|
||||
+ install(EXPORT brotli FILE unofficial-brotli-config.cmake NAMESPACE unofficial::brotli:: DESTINATION share/unofficial-brotli)
|
||||
endif() # BROTLI_BUNDLED_MODE
|
||||
endif() # BROTLI_EMSCRIPTEN
|
||||
|
||||
74
externals/vcpkg/ports/brotli/pkgconfig.patch
vendored
Executable file
74
externals/vcpkg/ports/brotli/pkgconfig.patch
vendored
Executable file
@@ -0,0 +1,74 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b1c654b..fcd9024 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -390,7 +390,7 @@ function(generate_pkg_config_path outvar path)
|
||||
set("${outvar}" "${${outvar}}" PARENT_SCOPE)
|
||||
endfunction(generate_pkg_config_path)
|
||||
|
||||
-function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION)
|
||||
+function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION SHARED_TARGET STATIC_TARGET)
|
||||
file(READ ${INPUT_FILE} TEXT)
|
||||
|
||||
set(PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
@@ -404,15 +404,22 @@ function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION)
|
||||
string(REGEX REPLACE "@includedir@" "${INCLUDEDIR}" TEXT ${TEXT})
|
||||
|
||||
string(REGEX REPLACE "@PACKAGE_VERSION@" "${VERSION}" TEXT ${TEXT})
|
||||
+
|
||||
+ if(BUILD_SHARED_LIBS)
|
||||
+ set(LIB_NAME "${SHARED_TARGET}")
|
||||
+ else()
|
||||
+ set(LIB_NAME "${STATIC_TARGET}")
|
||||
+ endif()
|
||||
+ string(REGEX REPLACE "@lib_name@" "${LIB_NAME}" TEXT ${TEXT})
|
||||
|
||||
file(WRITE ${OUTPUT_FILE} ${TEXT})
|
||||
endfunction()
|
||||
|
||||
-transform_pc_file("scripts/libbrotlicommon.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc" "${BROTLI_VERSION}")
|
||||
+transform_pc_file("scripts/libbrotlicommon.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc" "${BROTLI_VERSION}" brotlicommon brotlicommon-static)
|
||||
|
||||
-transform_pc_file("scripts/libbrotlidec.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlidec.pc" "${BROTLI_VERSION}")
|
||||
+transform_pc_file("scripts/libbrotlidec.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlidec.pc" "${BROTLI_VERSION}" brotlidec brotlidec-static)
|
||||
|
||||
-transform_pc_file("scripts/libbrotlienc.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc" "${BROTLI_VERSION}")
|
||||
+transform_pc_file("scripts/libbrotlienc.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc" "${BROTLI_VERSION}" brotlienc brotlienc-static)
|
||||
|
||||
if(NOT BROTLI_EMSCRIPTEN)
|
||||
if(NOT BROTLI_BUNDLED_MODE)
|
||||
diff --git a/scripts/libbrotlicommon.pc.in b/scripts/libbrotlicommon.pc.in
|
||||
index 10ca969..7736344 100644
|
||||
--- a/scripts/libbrotlicommon.pc.in
|
||||
+++ b/scripts/libbrotlicommon.pc.in
|
||||
@@ -7,5 +7,5 @@ Name: libbrotlicommon
|
||||
URL: https://github.com/google/brotli
|
||||
Description: Brotli common dictionary library
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -L${libdir} -R${libdir} -lbrotlicommon
|
||||
+Libs: -L${libdir} -l@lib_name@
|
||||
Cflags: -I${includedir}
|
||||
diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in
|
||||
index e7c3124..a7dc8ce 100644
|
||||
--- a/scripts/libbrotlidec.pc.in
|
||||
+++ b/scripts/libbrotlidec.pc.in
|
||||
@@ -7,6 +7,6 @@ Name: libbrotlidec
|
||||
URL: https://github.com/google/brotli
|
||||
Description: Brotli decoder library
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -L${libdir} -R${libdir} -lbrotlidec
|
||||
+Libs: -L${libdir} -l@lib_name@
|
||||
Requires.private: libbrotlicommon >= 1.0.2
|
||||
Cflags: -I${includedir}
|
||||
diff --git a/scripts/libbrotlienc.pc.in b/scripts/libbrotlienc.pc.in
|
||||
index 4dd0811..eb2712e 100644
|
||||
--- a/scripts/libbrotlienc.pc.in
|
||||
+++ b/scripts/libbrotlienc.pc.in
|
||||
@@ -7,6 +7,6 @@ Name: libbrotlienc
|
||||
URL: https://github.com/google/brotli
|
||||
Description: Brotli encoder library
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -L${libdir} -R${libdir} -lbrotlienc
|
||||
+Libs: -L${libdir} -l@lib_name@
|
||||
Requires.private: libbrotlicommon >= 1.0.2
|
||||
Cflags: -I${includedir}
|
||||
30
externals/vcpkg/ports/brotli/portfile.cmake
vendored
Executable file
30
externals/vcpkg/ports/brotli/portfile.cmake
vendored
Executable file
@@ -0,0 +1,30 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/brotli
|
||||
REF e61745a6b7add50d380cfd7d3883dd6c62fc2c71 # v1.0.9
|
||||
SHA512 303444695600b70ce59708e06bf21647d9b8dd33d772c53bbe49320f2f8f95ca8a7d6df2d29b7f36ff99001967e2d28380e0e305d778031940a3a5c6585f9a4f
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
install.patch
|
||||
fix-arm-uwp.patch
|
||||
pkgconfig.patch
|
||||
fix-ios.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DBROTLI_DISABLE_TESTS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-brotli TARGET_PATH share/unofficial-brotli)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-brotli)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
11
externals/vcpkg/ports/brotli/vcpkg-cmake-wrapper.cmake
vendored
Executable file
11
externals/vcpkg/ports/brotli/vcpkg-cmake-wrapper.cmake
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
_find_package(${ARGS})
|
||||
foreach(T brotlicommon brotlidec brotlienc)
|
||||
if(TARGET unofficial::brotli::${T} AND NOT TARGET unofficial::brotli::${T}-static)
|
||||
_add_library(unofficial::brotli::${T}-static INTERFACE IMPORTED)
|
||||
set_target_properties(unofficial::brotli::${T}-static PROPERTIES INTERFACE_LINK_LIBRARIES "unofficial::brotli::${T}")
|
||||
endif()
|
||||
if(NOT TARGET unofficial::brotli::${T} AND TARGET unofficial::brotli::${T}-static)
|
||||
_add_library(unofficial::brotli::${T} INTERFACE IMPORTED)
|
||||
set_target_properties(unofficial::brotli::${T} PROPERTIES INTERFACE_LINK_LIBRARIES "unofficial::brotli::${T}-static")
|
||||
endif()
|
||||
endforeach()
|
||||
7
externals/vcpkg/ports/brotli/vcpkg.json
vendored
Executable file
7
externals/vcpkg/ports/brotli/vcpkg.json
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "brotli",
|
||||
"version-string": "1.0.9",
|
||||
"port-version": 2,
|
||||
"description": "a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling.",
|
||||
"homepage": "https://github.com/google/brotli"
|
||||
}
|
||||
Reference in New Issue
Block a user