Skip to content

Commit

Permalink
Don't build cairo with LZO
Browse files Browse the repository at this point in the history
  • Loading branch information
dchengTSC committed Aug 1, 2023
1 parent de8087c commit 6ae22f1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions ports/cairo/disable-lzo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/meson.build b/meson.build
index 12512d115..aec6b003a 100644
--- a/meson.build
+++ b/meson.build
@@ -201,7 +201,16 @@ else
endif
endif

-lzo_dep = dependency('lzo2', required: false)
+# TSC patch: Never look for lzo (GPL-licensed), but keep lzo_dep around so
+# downstream meson.build files will still work
+#
+# From the docs at https://mesonbuild.com/Reference-manual_functions.html#dependency
+#
+# If dependency_name is '', the dependency is always not found.
+# So with required: false, this always returns a dependency object
+# for which the found() method returns false, and which can be passed
+# like any other dependency to the dependencies: keyword argument of a build_target.
+lzo_dep = dependency('', required: false)
if lzo_dep.found()
conf.set('HAVE_LZO', 1)
endif
1 change: 1 addition & 0 deletions ports/cairo/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_gitlab(
disable-atomic-ops-check.patch # See https://gitlab.freedesktop.org/cairo/cairo/-/issues/554
mingw-dllexport.patch
fix-static-missing-lib-msimg32.patch
disable-lzo.patch
${PATCHES}
)

Expand Down
1 change: 0 additions & 1 deletion ports/cairo/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"dirent",
"expat",
"libpng",
"lzo",
"pixman",
"pthread",
{
Expand Down

0 comments on commit 6ae22f1

Please sign in to comment.