diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2020-08-06 22:07:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-06 13:07:46 -0700 |
| commit | 61c055a6fcfee2a7e764997bb2478adf49db6edf (patch) | |
| tree | 708267482f32dabbbb9b41f6c6e8dfb331b451a0 /ports/brotli | |
| parent | 56174640c9b593f088145ea9cea70d84edf65c92 (diff) | |
| download | vcpkg-61c055a6fcfee2a7e764997bb2478adf49db6edf.tar.gz vcpkg-61c055a6fcfee2a7e764997bb2478adf49db6edf.zip | |
[brotli] add pkgconfig / [freetype] depend on brotli (#12405)
* [brotli] add pkgconfig
* [freetype] add pkgconfig and add dependency on brotli
* [qt5-base] add new freetype dependency to brotli and zstd
* [freetype] fix cmake paths
* [freetype] removed renaming of include dir and unnecessary cmake fixes
* [freetype-gl] fix glew include dir
* [podofo] fix freetype search.
* fixing wrong freetype stuff due to vcpkg owned wrong CMakeLists.txt .....
* fixing more freetype hidden issues.
* [sfml] fix missing include
* fix typo
* [freetype] uncomment previous renaming of include folders
* fix brotli linkage in static builds
* remove added alias to avoid problems.
* [freetype] add brotli to the wrapper
* [lzokay] format manifest
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Diffstat (limited to 'ports/brotli')
| -rw-r--r-- | ports/brotli/CONTROL | 3 | ||||
| -rw-r--r-- | ports/brotli/pkgconfig.patch | 73 | ||||
| -rw-r--r-- | ports/brotli/portfile.cmake | 3 |
3 files changed, 78 insertions, 1 deletions
diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index ff152f83b..7db9ffb6c 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,4 +1,5 @@ Source: brotli
-Version: 1.0.7-1
+Version: 1.0.7
+Port-Version: 3
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.
diff --git a/ports/brotli/pkgconfig.patch b/ports/brotli/pkgconfig.patch new file mode 100644 index 000000000..8ceafe1b1 --- /dev/null +++ b/ports/brotli/pkgconfig.patch @@ -0,0 +1,73 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2c4b757f9..eed560c1d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -351,7 +351,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}") +@@ -366,14 +366,21 @@ function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION) + + 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_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 +--- 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} -l@lib_name@ + Cflags: -I${includedir} +diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in +index 6f8ef2e41..f87d3f65f 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} -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 +--- 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} -l@lib_name@ + Requires.private: libbrotlicommon >= 1.0.2 + Cflags: -I${includedir} diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index 6fa75937c..81960a9ee 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES install.patch fix-arm-uwp.patch + pkgconfig.patch ) vcpkg_configure_cmake( @@ -21,6 +22,8 @@ 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) |
