mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 05:38:00 +08:00
[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>
This commit is contained in:
parent
56174640c9
commit
61c055a6fc
@ -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.
|
||||
|
73
ports/brotli/pkgconfig.patch
Normal file
73
ports/brotli/pkgconfig.patch
Normal file
@ -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}
|
@ -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)
|
||||
|
@ -210,7 +210,7 @@ add_library(cairo ${SOURCES})
|
||||
if (WITH_X11)
|
||||
target_compile_definitions(cairo PUBLIC -DCAIRO_HAS_XLIB_SURFACE=1)
|
||||
endif()
|
||||
|
||||
target_include_directories(cairo PUBLIC ${FREETYPE_INCLUDE_DIRS})
|
||||
target_link_libraries(cairo PRIVATE ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig)
|
||||
|
||||
if(WIN32)
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: cairo
|
||||
Version: 1.16.0-6
|
||||
Version: 1.16.0
|
||||
Port-Version: 7
|
||||
Homepage: https://cairographics.org
|
||||
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, freetype, fontconfig
|
||||
|
@ -15,6 +15,7 @@ string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CAIROMM_MICRO_VERSION ${
|
||||
message(STATUS "Ciaromm version: ${CAIROMM_MAJOR_VERSION}.${CAIROMM_MINOR_VERSION}.${CAIROMM_MICRO_VERSION}")
|
||||
|
||||
find_package(Cairo REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
find_package(SigC++ REQUIRED)
|
||||
|
||||
#configure
|
||||
@ -87,7 +88,7 @@ set(cairomm_rc
|
||||
${CMAKE_BINARY_DIR}/cairomm.rc)
|
||||
|
||||
add_library(cairomm-1.0 ${cairomm_cc} ${cairomm_rc})
|
||||
target_link_libraries(cairomm-1.0 ${CAIRO_LIBRARY} ${SIGC++_LIBRARY} )
|
||||
target_link_libraries(cairomm-1.0 ${CAIRO_LIBRARY} ${SIGC++_LIBRARY} Freetype::Freetype)
|
||||
target_include_directories(cairomm-1.0 PRIVATE
|
||||
${CAIRO_INCLUDE_DIR}
|
||||
${SIGC++_INCLUDE_DIR}
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: cairomm
|
||||
Version: 1.15.3-4
|
||||
Version: 1.15.3
|
||||
Port-Version: 5
|
||||
Homepage: https://www.cairographics.org
|
||||
Description: A C++ wrapper for the cairo graphics library
|
||||
Build-Depends: cairo, libsigcpp
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: freetype-gl
|
||||
Version: 2019-03-29-3
|
||||
Version: 2019-03-29
|
||||
Port-Version: 4
|
||||
Homepage: https://github.com/rougier/freetype-gl
|
||||
Description: OpenGL text using one vertex buffer, one texture and FreeType
|
||||
Build-Depends: glew, freetype
|
||||
|
13
ports/freetype-gl/glew.patch
Normal file
13
ports/freetype-gl/glew.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1c2e89fba..9e2d112c4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -92,7 +92,7 @@ include_directories(
|
||||
${OPENGL_INCLUDE_DIRS}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- ${GLEW_INCLUDE_PATH}
|
||||
+ ${GLEW_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if(MSVC)
|
@ -6,6 +6,7 @@ vcpkg_from_github(
|
||||
REF a91a3dda326ceaf66b7279bf64ba07014d3f81b8
|
||||
SHA512 8e04573dfb400e14e2c1d3a2cd851a66f8218ccfdaa4f701ed9369d7f040d7028582e72af9b236af42d9d3c6c128014670e8ae0261c6f4770affd1aea1454b1e
|
||||
HEAD_REF master
|
||||
PATCHES glew.patch
|
||||
)
|
||||
|
||||
# make sure that no "internal" libraries are used by removing them
|
||||
|
@ -1,22 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c00902521..b24508654 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -176,6 +176,8 @@ option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF)
|
||||
option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." OFF)
|
||||
option(FT_WITH_BROTLI "Support compressed WOFF2 fonts." OFF)
|
||||
|
||||
+# vcpkg config install path
|
||||
+option(CONFIG_INSTALL_PATH "location to install cmake config files" lib/cmake/freetype)
|
||||
|
||||
# Disallow in-source builds
|
||||
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
||||
@@ -559,7 +561,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
COMPONENT libraries)
|
||||
install(
|
||||
EXPORT freetype-targets
|
||||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
|
||||
+ DESTINATION ${CONFIG_INSTALL_PATH}
|
||||
FILE freetype-config.cmake
|
||||
COMPONENT headers)
|
||||
endif ()
|
@ -1,7 +1,7 @@
|
||||
Source: freetype
|
||||
Version: 2.10.2
|
||||
Port-Version: 1
|
||||
Build-Depends: zlib
|
||||
Port-Version: 2
|
||||
Build-Depends: zlib, brotli
|
||||
Homepage: https://www.freetype.org/
|
||||
Description: A library to render fonts.
|
||||
Default-Features: bzip2, png
|
||||
|
21
ports/freetype/brotli-static.patch
Normal file
21
ports/freetype/brotli-static.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff --git a/builds/cmake/FindBrotliDec.cmake b/builds/cmake/FindBrotliDec.cmake
|
||||
index 7c484c7df..0bd49b825 100644
|
||||
--- a/builds/cmake/FindBrotliDec.cmake
|
||||
+++ b/builds/cmake/FindBrotliDec.cmake
|
||||
@@ -34,14 +34,14 @@ find_path(BROTLIDEC_INCLUDE_DIRS
|
||||
PATH_SUFFIXES brotli)
|
||||
|
||||
find_library(BROTLIDEC_LIBRARIES
|
||||
- NAMES brotlidec
|
||||
+ NAMES brotlidec brotlidec-static
|
||||
HINTS ${PC_BROTLIDEC_LIBDIR}
|
||||
${PC_BROTLIDEC_LIBRARY_DIRS})
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
- brotlidec
|
||||
+ BrotliDec
|
||||
REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
|
||||
FOUND_VAR BROTLIDEC_FOUND
|
||||
VERSION_VAR BROTLIDEC_VERSION)
|
20
ports/freetype/pkgconfig.patch
Normal file
20
ports/freetype/pkgconfig.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 65839ac58..54f2ce8ec 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -517,7 +517,6 @@ endif ()
|
||||
|
||||
if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
# Generate the pkg-config file
|
||||
- if (UNIX)
|
||||
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
|
||||
|
||||
string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}")
|
||||
@@ -551,7 +550,6 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
FILES ${PROJECT_BINARY_DIR}/freetype2.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
COMPONENT pkgconfig)
|
||||
- endif ()
|
||||
|
||||
install(
|
||||
TARGETS freetype
|
@ -11,8 +11,9 @@ vcpkg_extract_source_archive_ex(
|
||||
REF ${FT_VERSION}
|
||||
PATCHES
|
||||
0001-Fix-install-command.patch
|
||||
0002-Add-CONFIG_INSTALL_PATH-option.patch
|
||||
0003-Fix-UWP.patch
|
||||
pkgconfig.patch
|
||||
brotli-static.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
@ -28,41 +29,46 @@ vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DCONFIG_INSTALL_PATH=share/freetype
|
||||
-DFT_WITH_ZLIB=ON # Force system zlib.
|
||||
${FEATURE_OPTIONS}
|
||||
-DFT_WITH_BROTLI=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=ON
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/freetype)
|
||||
|
||||
# Rename for easy usage (VS integration; CMake and autotools will not care)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/freetype ${CURRENT_PACKAGES_DIR}/include/freetype)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h ${CURRENT_PACKAGES_DIR}/include/ft2build.h)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/freetype2)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config-debug.cmake DEBUG_MODULE)
|
||||
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}")
|
||||
string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake "${DEBUG_MODULE}")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake RELEASE_MODULE)
|
||||
string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake "${RELEASE_MODULE}")
|
||||
endif()
|
||||
|
||||
# Fix the include dir [freetype2 -> freetype]
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config.cmake CONFIG_MODULE)
|
||||
else() #if(VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake CONFIG_MODULE)
|
||||
endif()
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include;\${_IMPORT_PREFIX}/include/freetype" CONFIG_MODULE "${CONFIG_MODULE}")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake CONFIG_MODULE)
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include" CONFIG_MODULE "${CONFIG_MODULE}")
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec-static.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec-static.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake "${CONFIG_MODULE}")
|
||||
|
||||
find_library(FREETYPE_DEBUG NAMES freetyped PATHS "${CURRENT_PACKAGES_DIR}/debug/lib/" NO_DEFAULT_PATH)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc")
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc" _contents)
|
||||
if(FREETYPE_DEBUG)
|
||||
string(REPLACE "-lfreetype" "-lfreetyped" _contents "${_contents}")
|
||||
endif()
|
||||
string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc" "${_contents}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc")
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" _contents)
|
||||
string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" "${_contents}")
|
||||
endif()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(COPY
|
||||
|
@ -10,6 +10,14 @@ if(@USE_PNG@)
|
||||
find_package(PNG)
|
||||
endif()
|
||||
|
||||
find_library(BROTLIDEC_LIBRARY_RELEASE NAMES brotlidec brotlidec-static PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH)
|
||||
find_library(BROTLIDEC_LIBRARY_DEBUG NAMES brotlidec brotlidec-static brotlidecd brotlidec-staticd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH)
|
||||
find_library(BROTLICOMMON_LIBRARY_RELEASE NAMES brotlicommon brotlicommon-static PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH)
|
||||
find_library(BROTLICOMMON_LIBRARY_DEBUG NAMES brotlicommon brotlicommon-static brotlicommond brotlicommon-staticd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH)
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(BROTLIDEC)
|
||||
select_library_configurations(BROTLICOMMON)
|
||||
|
||||
if(TARGET Freetype::Freetype)
|
||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
|
||||
|
||||
@ -20,6 +28,7 @@ if(TARGET Freetype::Freetype)
|
||||
if(@USE_PNG@)
|
||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES PNG::PNG)
|
||||
endif()
|
||||
target_link_libraries(Freetype::Freetype INTERFACE ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(FREETYPE_LIBRARIES)
|
||||
@ -32,4 +41,6 @@ if(FREETYPE_LIBRARIES)
|
||||
if(@USE_PNG@)
|
||||
list(APPEND FREETYPE_LIBRARIES ${PNG_LIBRARIES})
|
||||
endif()
|
||||
|
||||
list(APPEND FREETYPE_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES})
|
||||
endif()
|
||||
|
@ -42,6 +42,9 @@ find_path(HARFBUZZ_INCLUDE_DIR
|
||||
NAMES hb.h
|
||||
PATH_SUFFIXES harfbuzz)
|
||||
|
||||
find_path(DIRENT_INCLUDE_DIR
|
||||
NAMES dirent.h)
|
||||
|
||||
find_library(FRIBIDI_LIBRARY NAMES fribidi)
|
||||
find_library(HARFBUZZ_LIBRARY NAMES harfbuzz)
|
||||
|
||||
@ -50,7 +53,10 @@ add_library(ass ${SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/libass.def)
|
||||
target_include_directories(ass PRIVATE
|
||||
${FRIBIDI_INCLUDE_DIR}
|
||||
${HARFBUZZ_INCLUDE_DIR})
|
||||
|
||||
if(DIRENT_INCLUDE_DIR)
|
||||
target_include_directories(ass PRIVATE
|
||||
${DIRENT_INCLUDE_DIR})
|
||||
endif()
|
||||
target_link_libraries(ass PRIVATE
|
||||
Freetype::Freetype
|
||||
${FRIBIDI_LIBRARY}
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: libass
|
||||
Version: 0.14.0
|
||||
Port-Version: 1
|
||||
Port-Version: 2
|
||||
Build-Depends: freetype, fribidi, harfbuzz, dirent (windows)
|
||||
Description: libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format.
|
||||
|
@ -11,7 +11,7 @@ find_package(harfbuzz CONFIG REQUIRED)
|
||||
find_path(HARFBUZZ_INCLUDE_DIRS
|
||||
NAMES hb.h
|
||||
PATH_SUFFIXES harfbuzz)
|
||||
find_path(FREETYPE_ADDITIONAL_INCLUDE_DIRS NAMES ft2build.h)
|
||||
find_path(FREETYPE_ADDITIONAL_INCLUDE_DIRS NAMES ft2build.h PATH_SUFFIXES freetype2)
|
||||
|
||||
configure_file(src/raqm-version.h.in src/raqm-version.h)
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
Source: libraqm
|
||||
Version: 0.7.0-1
|
||||
Version: 0.7.0
|
||||
Port-Version: 2
|
||||
Description: A library for complex text layout
|
||||
Build-Depends: freetype, harfbuzz, fribidi
|
@ -49,11 +49,7 @@ find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h)
|
||||
find_library(FONTCONFIG_LIBRARY fontconfig)
|
||||
|
||||
# find freetype
|
||||
find_path(FREETYPE_INCLUDE_DIR ft2build.h)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
set(FT_SUFFIX d)
|
||||
endif()
|
||||
find_library(FREETYPE_LIBRARY freetype${FT_SUFFIX})
|
||||
find_package(Freetype REQUIRED)
|
||||
|
||||
# find harfbuzz
|
||||
find_path(HARFBUZZ_INCLUDE_DIR harfbuzz/hb.h)
|
||||
@ -65,7 +61,7 @@ if (APPLE)
|
||||
endif()
|
||||
|
||||
set(FONT_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR} ${FONTCONFIG_INCLUDE_DIR} ${HARFBUZZ_INCLUDE_DIR}/harfbuzz)
|
||||
set(FONT_LIBRARIES ${FREETYPE_LIBRARY} ${FONTCONFIG_LIBRARY} ${HARFBUZZ_LIBRARY})
|
||||
set(FONT_LIBRARIES Freetype::Freetype ${FONTCONFIG_LIBRARY} ${HARFBUZZ_LIBRARY})
|
||||
|
||||
macro(pango_add_module MODULE_NAME)
|
||||
add_library(${MODULE_NAME} ${ARGN})
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: pango
|
||||
Version: 1.40.11-7
|
||||
Version: 1.40.11
|
||||
Port-Version: 8
|
||||
Homepage: https://ftp.gnome.org/pub/GNOME/sources/pango/
|
||||
Description: Text and font handling library.
|
||||
Build-Depends: glib, gettext, cairo[gobject], fontconfig, freetype, harfbuzz[glib] (!(windows&static)&!osx)
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: podofo
|
||||
Version: 0.9.6-11
|
||||
Version: 0.9.6
|
||||
Port-Version: 12
|
||||
Homepage: https://sourceforge.net/projects/podofo/
|
||||
Description: PoDoFo is a library to work with the PDF file format
|
||||
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype
|
||||
|
18
ports/podofo/freetype.patch
Normal file
18
ports/podofo/freetype.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/cmake/modules/FindFREETYPE.cmake b/cmake/modules/FindFREETYPE.cmake
|
||||
index 41114798f..0911dc092 100644
|
||||
--- a/cmake/modules/FindFREETYPE.cmake
|
||||
+++ b/cmake/modules/FindFREETYPE.cmake
|
||||
@@ -15,9 +15,13 @@ SET(FREETYPE_FIND_QUIETLY 1)
|
||||
# first we try to find ft2build.h in the new location as
|
||||
# of freetype 2.5.1
|
||||
FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h
|
||||
+ PATHS
|
||||
/usr/include/freetype2
|
||||
/usr/local/include/freetype2
|
||||
/usr/X11/include/freetype2
|
||||
+ PATH_SUFFIXES
|
||||
+ freetype2
|
||||
+ include/freetype2
|
||||
NO_CMAKE_SYSTEM_PATH
|
||||
)
|
||||
|
@ -13,6 +13,7 @@ vcpkg_from_sourceforge(
|
||||
PATCHES
|
||||
0001-unique_ptr.patch
|
||||
0002-HAVE_UNISTD_H.patch
|
||||
freetype.patch
|
||||
${ADDITIONAL_PATCH}
|
||||
)
|
||||
|
||||
|
@ -130,6 +130,13 @@ find_library(HARFBUZZ_DEBUG NAMES harfbuzz PATHS "${CURRENT_INSTALLED_DIR}/debug
|
||||
find_library(SQLITE_RELEASE NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux)
|
||||
find_library(SQLITE_DEBUG NAMES sqlite3 sqlite3d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
|
||||
find_library(BROTLI_COMMON_RELEASE NAMES brotlicommon brotlicommon-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
|
||||
find_library(BROTLI_COMMON_DEBUG NAMES brotlicommon brotlicommon-static brotlicommond brotlicommon-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
find_library(BROTLI_DEC_RELEASE NAMES brotlidec brotlidec-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
|
||||
find_library(BROTLI_DEC_DEBUG NAMES brotlidec brotlidec-static brotlidecd brotlidec-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
find_library(BROTLI_ENC_RELEASE NAMES brotlienc brotlienc-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
|
||||
find_library(BROTLI_ENC_DEBUG NAMES brotlienc brotlienc-static brotliencd brotlienc-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
|
||||
find_library(ICUUC_RELEASE NAMES icuuc libicuuc PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
|
||||
find_library(ICUUC_DEBUG NAMES icuucd libicuucd icuuc libicuuc PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
find_library(ICUTU_RELEASE NAMES icutu libicutu PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
|
||||
@ -166,8 +173,8 @@ find_library(SSL_DEBUG ssl ssleay32 ssld ssleay32d PATHS "${CURRENT_INSTALLED_DI
|
||||
find_library(EAY_RELEASE libeay32 crypto libcrypto PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
|
||||
find_library(EAY_DEBUG libeay32 crypto libcrypto libeay32d cryptod libcryptod PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
|
||||
set(FREETYPE_RELEASE_ALL "${FREETYPE_RELEASE} ${BZ2_RELEASE} ${LIBPNG_RELEASE} ${ZLIB_RELEASE}")
|
||||
set(FREETYPE_DEBUG_ALL "${FREETYPE_DEBUG} ${BZ2_DEBUG} ${LIBPNG_DEBUG} ${ZLIB_DEBUG}")
|
||||
set(FREETYPE_RELEASE_ALL "${FREETYPE_RELEASE} ${BZ2_RELEASE} ${LIBPNG_RELEASE} ${ZLIB_RELEASE} ${BROTLI_ENC_RELEASE} ${BROTLI_DEC_RELEASE} ${BROTLI_COMMON_RELEASE}")
|
||||
set(FREETYPE_DEBUG_ALL "${FREETYPE_DEBUG} ${BZ2_DEBUG} ${LIBPNG_DEBUG} ${ZLIB_DEBUG} ${BROTLI_ENC_DEBUG} ${BROTLI_DEC_DEBUG} ${BROTLI_COMMON_RELEASE}")
|
||||
|
||||
# If HarfBuzz is built with GLib enabled, it must be statically link
|
||||
set(GLIB_LIB_VERSION 2.0)
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: sfml
|
||||
Version: 2.5.1-7
|
||||
Version: 2.5.1
|
||||
Port-Version: 8
|
||||
Homepage: https://github.com/sfml/sfml
|
||||
Description: Simple and fast multimedia library
|
||||
Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb
|
||||
|
@ -5,6 +5,7 @@ vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
|
||||
SHA512 7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59
|
||||
PATCHES
|
||||
use-system-freetype.patch
|
||||
stb_include.patch
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs)
|
||||
|
14
ports/sfml/stb_include.patch
Normal file
14
ports/sfml/stb_include.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e821a49bc..c68264ef2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -188,6 +188,9 @@ if(SFML_USE_SYSTEM_DEPS)
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES CMAKE_IGNORE_PATH)
|
||||
+
|
||||
+ find_path(STB_INCLUDE_DIR stb.h)
|
||||
+ include_directories(${STB_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# Visual C++: remove warnings regarding SL security and algorithms on pointers
|
Loading…
x
Reference in New Issue
Block a user