[cairo] Move hard lzo dependency to feature (#38313)

Fixes #38312

- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] SHA512s are updated for each updated download.
- [ ] The "supports" clause reflects platforms that may be fixed by this
new version.
- [ ] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [ ] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
This commit is contained in:
Sebastian Schäfer 2024-04-24 14:05:39 +02:00 committed by GitHub
parent 8150939b69
commit a6fff517cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 45 additions and 2 deletions

View File

@ -0,0 +1,25 @@
diff --git a/meson.build b/meson.build
index 03eb140f0..eadd32088 100644
--- a/meson.build
+++ b/meson.build
@@ -196,7 +196,7 @@ else
endif
endif
-lzo_dep = dependency('lzo2', required: false)
+lzo_dep = dependency('lzo2', required: get_option('lzo'))
if lzo_dep.found()
conf.set('HAVE_LZO', 1)
endif
diff --git a/meson_options.txt b/meson_options.txt
index f481ef3ea..3ba4dacb1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -23,6 +23,7 @@ option('glib', type : 'feature', value : 'auto')
option('spectre', type : 'feature', value : 'auto')
option('symbol-lookup', type: 'feature', value : 'auto',
description: 'Symbol lookup in debug utils via binutils/bfd')
+option('lzo', type : 'feature', value : 'auto')
# Documentation
option('gtk_doc', type : 'boolean', value : false,

View File

@ -14,6 +14,7 @@ vcpkg_from_gitlab(
fix-static-missing-lib-msimg32.patch
${PATCHES}
fix-alloca-undefine.patch # Upstream PR: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/520
cairo_add_lzo_feature_option.patch
)
if("fontconfig" IN_LIST FEATURES)
@ -43,6 +44,12 @@ else()
list(APPEND OPTIONS -Dglib=disabled)
endif()
if("lzo" IN_LIST FEATURES)
list(APPEND OPTIONS -Dlzo=enabled)
else()
list(APPEND OPTIONS -Dlzo=disabled)
endif()
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(ENV{CPP} "cl_cpp_wrapper")
endif()

View File

@ -1,6 +1,7 @@
{
"name": "cairo",
"version": "1.18.0",
"port-version": 1,
"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": "LGPL-2.1-only OR MPL-1.1",
@ -9,7 +10,6 @@
"dirent",
"expat",
"libpng",
"lzo",
"pixman",
"pthread",
{
@ -41,6 +41,12 @@
"glib"
]
},
"lzo": {
"description": "build with lzo support",
"dependencies": [
"lzo"
]
},
"x11": {
"description": "build with x11 support",
"supports": "!windows"

View File

@ -1446,7 +1446,7 @@
},
"cairo": {
"baseline": "1.18.0",
"port-version": 0
"port-version": 1
},
"cairomm": {
"baseline": "1.17.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0fda02793cfc3911468cd200b0a889c65035db1d",
"version": "1.18.0",
"port-version": 1
},
{
"git-tree": "3b9181491cc6b0a115afa8dd5af2fca420a5cddd",
"version": "1.18.0",