Skip to content

Commit

Permalink
[asmjit][botan][brotli] Update version (microsoft#13676)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBoosY authored Sep 28, 2020
1 parent d0511fb commit 7a05bde
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 101 deletions.
2 changes: 1 addition & 1 deletion ports/asmjit/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: asmjit
Version: 2020-07-22
Version: 2020-09-14
Homepage: https://github.com/asmjit/asmjit
Description: Complete x86/x64 JIT and Remote Assembler for C++
Supports: !arm
6 changes: 4 additions & 2 deletions ports/asmjit/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ vcpkg_fail_port_install(ON_ARCH "arm")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO asmjit/asmjit
REF 8474400e82c3ea65bd828761539e5d9b25f6bd83
SHA512 435be4ed22abbbbcdea3869b31bc2fc27aae969775773c24155d7490bca9591f51613fa3319cce54200c6d18dbe73a6be2d5449c49afb46934d93760501e98f6
REF 5bc166efdb419f88bd5b5774c62cfc4d08a0bfa4 # accessed on 2020-09-14
SHA512 6e31617e62dccbec5fa4d8aeacb1076167f870578a0dd2915403d414f8fcaab16692968287f912dc41a2ec7d10a343d5b687144f04d2ec7adb2880044752543c
HEAD_REF master
)

Expand All @@ -24,6 +24,8 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/asmjit)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

# Handle copyright
Expand Down
2 changes: 1 addition & 1 deletion ports/botan/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: botan
Version: 2.12.1-1
Version: 2.15.0
Homepage: https://botan.randombit.net
Description: A cryptography library written in C++11
17 changes: 0 additions & 17 deletions ports/botan/fix-msvc-build.patch

This file was deleted.

11 changes: 3 additions & 8 deletions ports/botan/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
set(BOTAN_VERSION 2.12.1)
set(BOTAN_VERSION 2.15.0)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO randombit/botan
REF 1a6ad661ce64287ccbe26460ccc3aa4247d86ba8 # 2.12.1
SHA512 7a774f325c85761e2d076847f1fc8bc67592d696c4ebde839928591f7c85352e2df6032c122bdcc603adf84d76f5a1897c7118aa3859d38f79e474f27bc3b588
REF 3ed6eaa3c1236aed844f5475e2df8b89b3286ac4 # 2.15.0
SHA512 a5c76e22f1ad8455ed5dab7c1dff2dd21e8a6e720e024144fe117982fd3b8815e8200844f6fd3abf8326fa4b18d2598c724f7ad5752c517d4b8fab83fb1b5907
HEAD_REF master
PATCHES
fix-generate-build-path.patch
fix-msvc-build.patch # Remove this patch on next update
)

if(CMAKE_HOST_WIN32)
Expand Down Expand Up @@ -104,10 +103,6 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE)
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}"
LOGNAME install-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})

if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND CMAKE_HOST_WIN32)
file(RENAME ${BOTAN_FLAG_PREFIX}/lib/botan${BOTAN_DEBUG_SUFFIX}.dll ${BOTAN_FLAG_PREFIX}/bin/botan${BOTAN_DEBUG_SUFFIX}.dll)
endif()

message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done")
endfunction()

Expand Down
3 changes: 1 addition & 2 deletions ports/brotli/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Source: brotli
Version: 1.0.7
Port-Version: 3
Version: 1.0.9
Homepage: https://github.com/google/brotli
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.
114 changes: 58 additions & 56 deletions ports/brotli/install.patch
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac55f6b..e016967 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,12 +166,11 @@ endforeach()

foreach(lib brotlicommon brotlidec brotlienc brotlicommon-static brotlidec-static brotlienc-static)
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}"
POSITION_INDEPENDENT_CODE TRUE)
- 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()

target_link_libraries(brotlidec brotlicommon)
@@ -199,27 +198,35 @@ target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC})
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()

# Tests
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

25 changes: 13 additions & 12 deletions ports/brotli/pkgconfig.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c4b757f9..eed560c1d 100644
index b1c654b..fcd9024 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -351,7 +351,7 @@ function(generate_pkg_config_path outvar path)
@@ -390,7 +390,7 @@ function(generate_pkg_config_path outvar path)
set("${outvar}" "${${outvar}}" PARENT_SCOPE)
endfunction(generate_pkg_config_path)

Expand All @@ -11,17 +11,18 @@ index 2c4b757f9..eed560c1d 100644
file(READ ${INPUT_FILE} TEXT)

set(PREFIX "${CMAKE_INSTALL_PREFIX}")
@@ -366,14 +366,21 @@ function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION)
@@ -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()

Expand All @@ -34,40 +35,40 @@ index 2c4b757f9..eed560c1d 100644
-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)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc"
diff --git a/scripts/libbrotlicommon.pc.in b/scripts/libbrotlicommon.pc.in
index 2a8cf7a35..464a21292 100644
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} -lbrotlicommon
-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 6f8ef2e41..f87d3f65f 100644
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} -lbrotlidec
-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 2098afe2c..7b6371bcb 100644
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} -lbrotlienc
-Libs: -L${libdir} -R${libdir} -lbrotlienc
+Libs: -L${libdir} -l@lib_name@
Requires.private: libbrotlicommon >= 1.0.2
Cflags: -I${includedir}
4 changes: 2 additions & 2 deletions ports/brotli/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/brotli
REF v1.0.7
SHA512 a82362aa36d2f2094bca0b2808d9de0d57291fb3a4c29d7c0ca0a37e73087ec5ac4df299c8c363e61106fccf2fe7f58b5cf76eb97729e2696058ef43b1d3930a
REF e61745a6b7add50d380cfd7d3883dd6c62fc2c71 # v1.0.9
SHA512 303444695600b70ce59708e06bf21647d9b8dd33d772c53bbe49320f2f8f95ca8a7d6df2d29b7f36ff99001967e2d28380e0e305d778031940a3a5c6585f9a4f
HEAD_REF master
PATCHES
install.patch
Expand Down

0 comments on commit 7a05bde

Please sign in to comment.