[cairo] Add usage (#32294)

* [cairo] Add usage

* update version
This commit is contained in:
Lily Wang 2023-06-30 17:36:41 -07:00 committed by GitHub
parent b74dfa1fe1
commit d10528c848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 5 deletions

View File

@ -1,4 +1,3 @@
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(PATCHES fix_clang-cl_build.patch)
endif()
@ -7,7 +6,7 @@ vcpkg_from_gitlab(
OUT_SOURCE_PATH SOURCE_PATH
GITLAB_URL https://gitlab.freedesktop.org
REPO cairo/cairo
REF ${VERSION}
REF "${VERSION}"
SHA512 e12f4b05326c1ac7d930e18d95398dc9c65f3af9745d7fd301ef1663dd378feeb43acc47de17fd082d0acf96e9fc60310557c24e3fe8af06d17931590c7759c6
PATCHES
cairo_static_fix.patch
@ -50,7 +49,8 @@ endif()
vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${OPTIONS}
OPTIONS
${OPTIONS}
-Dtests=disabled
-Dzlib=enabled
-Dpng=enabled
@ -85,5 +85,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

11
ports/cairo/usage Normal file
View File

@ -0,0 +1,11 @@
The package cairo can be imported via CMake FindPkgConfig module:
# cairo
find_package(PkgConfig REQUIRED)
pkg_check_modules(cairo REQUIRED IMPORTED_TARGET cairo)
target_link_libraries(main PkgConfig::cairo)
# cairo-script-interpreter
find_package(PkgConfig REQUIRED)
pkg_check_modules(cairo-script-interpreter REQUIRED IMPORTED_TARGET cairo-script-interpreter)
target_link_libraries(main PkgConfig::cairo-script-interpreter)

View File

@ -1,7 +1,7 @@
{
"name": "cairo",
"version": "1.17.8",
"port-version": 1,
"port-version": 2,
"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.",
"homepage": "https://cairographics.org",
"license": "MPL-1.1",

View File

@ -1362,7 +1362,7 @@
},
"cairo": {
"baseline": "1.17.8",
"port-version": 1
"port-version": 2
},
"cairomm": {
"baseline": "1.16.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e94aef48f94b5cdac2387269b5f2ad421a684873",
"version": "1.17.8",
"port-version": 2
},
{
"git-tree": "b28395e25157c57307d10e37eba8c9018dcd8f75",
"version": "1.17.8",