Skip to content

Commit

Permalink
[cairo] Update to 1.18.0 (#36444)
Browse files Browse the repository at this point in the history
<!-- If your PR fixes issues, please note that here by adding "Fixes
#NNNNNN." for each fixed issue on separate lines. -->
Fixes #36397
<!-- If you are still working on the PR, open it as a Draft:
https://github.blog/2019-02-14-introducing-draft-pull-requests/. -->



- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] 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.~~
- [x] 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.

All features passed with following triplets:
```
x86-windows
x64-windows
x64-windows-static
```
Usage test passed on `x64-windows`.

<!-- If this PR adds a new port, please uncomment and fill out this
checklist:

- [ ] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] The name of the port matches an existing name for this component
on https://repology.org/ if possible, and/or is strongly associated with
that component on search engines.
- [ ] Optional dependencies are resolved in exactly one way. For
example, if the component is built with CMake, all `find_package` calls
are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or
disabled with
[CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html).
- [ ] The versioning scheme in `vcpkg.json` matches what upstream says.
- [ ] The license declaration in `vcpkg.json` matches what upstream
says.
- [ ] The installed as the "copyright" file matches what upstream says.
- [ ] The source code of the component installed comes from an
authoritative source.
- [ ] The generated "usage text" is accurate. See
[adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md)
for context.
- [ ] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [ ] Only one version is in the new port's versions file.
- [ ] Only one version is added to each modified port's versions file.

END OF NEW PORT CHECKLIST (delete this line) -->

---------

Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
  • Loading branch information
LilyWangLL and Lily Wang committed Feb 22, 2024
1 parent deb4361 commit 1580d22
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 29 deletions.
17 changes: 9 additions & 8 deletions ports/cairo/cairo_static_fix.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
--- meson.build.orig 2022-03-19 03:40:07.000000000 +0900
+++ meson.build 2022-03-29 21:32:41.000000000 +0900
@@ -96,6 +96,13 @@
endif

diff --git a/meson.build b/meson.build
index 9100152..7005f7e 100644
--- a/meson.build
+++ b/meson.build
@@ -97,6 +97,13 @@ endif

add_project_arguments('-D_GNU_SOURCE', language: 'c')

+if host_machine.system() == 'windows'
Expand All @@ -12,6 +13,6 @@
+ endif
+endif
+
# Make sure source directory hasn't been configured with autotools
fs = import('fs')
if fs.exists('config.h') or fs.exists('src/cairo-features.h') or fs.exists('src/cairo-supported-features.h')
pkgmod = import('pkgconfig')
python3 = import('python').find_installation()

15 changes: 15 additions & 0 deletions ports/cairo/fix-alloca-undefine.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/cairo-colr-glyph-render.c b/src/cairo-colr-glyph-render.c
index 28254fd..a9ad84b 100644
--- a/src/cairo-colr-glyph-render.c
+++ b/src/cairo-colr-glyph-render.c
@@ -43,6 +43,10 @@
#include <stdio.h>
#include <string.h>

+#ifdef _MSC_VER
+#include <malloc.h>
+#endif
+
#if HAVE_FT_COLR_V1

#include <ft2build.h>
13 changes: 0 additions & 13 deletions ports/cairo/mingw-dllexport.patch

This file was deleted.

8 changes: 4 additions & 4 deletions ports/cairo/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org
REPO cairo/cairo
REF "${VERSION}"
SHA512 e12f4b05326c1ac7d930e18d95398dc9c65f3af9745d7fd301ef1663dd378feeb43acc47de17fd082d0acf96e9fc60310557c24e3fe8af06d17931590c7759c6
SHA512 2ef3b948b354a9be5c3afe2bbf47f559a00a6114c67ef50ce19d54a1d4232218311f2277e271faad4df598e19e03492ba97af934ede9411494618ebe46f9eee9
PATCHES
cairo_static_fix.patch
disable-atomic-ops-check.patch # See https://gitlab.freedesktop.org/cairo/cairo/-/issues/554
mingw-dllexport.patch
fix-static-missing-lib-msimg32.patch
${PATCHES}
fix-alloca-undefine.patch # Upstream PR: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/520
)

if("fontconfig" IN_LIST FEATURES)
Expand Down Expand Up @@ -65,9 +65,9 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
set(_file "${CURRENT_PACKAGES_DIR}/include/cairo/cairo.h")
file(READ ${_file} CAIRO_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}")
string(REPLACE "!defined(CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}")
else()
string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}")
string(REPLACE "!defined(CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}")
endif()
file(WRITE ${_file} "${CAIRO_H}")

Expand Down
3 changes: 1 addition & 2 deletions ports/cairo/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "cairo",
"version": "1.17.8",
"port-version": 4,
"version": "1.18.0",
"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",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1437,8 +1437,8 @@
"port-version": 8
},
"cairo": {
"baseline": "1.17.8",
"port-version": 4
"baseline": "1.18.0",
"port-version": 0
},
"cairomm": {
"baseline": "1.17.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/cairo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3b9181491cc6b0a115afa8dd5af2fca420a5cddd",
"version": "1.18.0",
"port-version": 0
},
{
"git-tree": "127eefeeba4725293adb6ea574b7bad98c845298",
"version": "1.17.8",
Expand Down

0 comments on commit 1580d22

Please sign in to comment.