From 476e4be7f01a762e196496a80d65e6bf9bcf3594 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 11 Mar 2025 10:38:19 +0800 Subject: [PATCH 1/2] fix mingw build failure new file: ports/cairo/dw-extra.patch modified: ports/cairo/portfile.cmake modified: ports/cairo/vcpkg.json modified: versions/baseline.json modified: versions/c-/cairo.json --- ports/cairo/dw-extra.patch | 13 +++++++++++++ ports/cairo/portfile.cmake | 2 ++ ports/cairo/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/c-/cairo.json | 5 +++++ 5 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ports/cairo/dw-extra.patch diff --git a/ports/cairo/dw-extra.patch b/ports/cairo/dw-extra.patch new file mode 100644 index 00000000000000..4ca23053547eba --- /dev/null +++ b/ports/cairo/dw-extra.patch @@ -0,0 +1,13 @@ +diff --git a/src/win32/dw-extra.h b/src/win32/dw-extra.h +index 424fb606d..a9daced21 100644 +--- a/src/win32/dw-extra.h ++++ b/src/win32/dw-extra.h +@@ -23,6 +23,8 @@ + typedef DWRITE_COLOR_GLYPH_RUN1 DWRITE_COLOR_GLYPH_RUN1_WORKAROUND; + #endif + ++#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 11 + DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS); ++#endif + + #endif /* DWRITE_EXTRA_H */ diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index d71cec33cb71fa..e7101c217536d4 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -3,6 +3,8 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) list(APPEND EXTRA_PATCHES fix_clang-cl_build.patch) endif() +list(APPEND EXTRA_PATCHES dw-extra.patch) + vcpkg_from_gitlab( OUT_SOURCE_PATH SOURCE_PATH GITLAB_URL https://gitlab.freedesktop.org diff --git a/ports/cairo/vcpkg.json b/ports/cairo/vcpkg.json index 0e3f0b9c6d9031..53d118e7da326c 100644 --- a/ports/cairo/vcpkg.json +++ b/ports/cairo/vcpkg.json @@ -1,6 +1,7 @@ { "name": "cairo", "version": "1.18.2", + "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", diff --git a/versions/baseline.json b/versions/baseline.json index 5ed690f82b69a8..f045e6d6bc18d9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1482,7 +1482,7 @@ }, "cairo": { "baseline": "1.18.2", - "port-version": 0 + "port-version": 1 }, "cairomm": { "baseline": "1.18.0", diff --git a/versions/c-/cairo.json b/versions/c-/cairo.json index 40c86ef4515947..c78e105851147e 100644 --- a/versions/c-/cairo.json +++ b/versions/c-/cairo.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "862af45fc3b9935807833a3917a755b202d529e9", + "version": "1.18.2", + "port-version": 1 + }, { "git-tree": "84c6e863f1f936bd0db07b3302e568ac1c98531c", "version": "1.18.2", From 6655638cf025791e5eb2c4ea3729ac8525224c5e Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 11 Mar 2025 14:29:27 +0800 Subject: [PATCH 2/2] overwrite version --- versions/c-/cairo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/cairo.json b/versions/c-/cairo.json index c78e105851147e..0061ac98fbf57b 100644 --- a/versions/c-/cairo.json +++ b/versions/c-/cairo.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "862af45fc3b9935807833a3917a755b202d529e9", + "git-tree": "b332aecd569cb46a2677231dd3b326c139453401", "version": "1.18.2", "port-version": 1 },