From 53185d6106381f2f11d82c503223ab8704a92309 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Fri, 25 Oct 2024 07:25:44 +0200 Subject: [PATCH] [cairo] Update to 1.18.2 (#41717) --- ports/cairo/cairo_static_fix.patch | 18 ----------- ports/cairo/disable-atomic-ops-check.patch | 13 -------- ports/cairo/fix-alloca-undefine.patch | 15 ---------- ...ib-msimg32.patch => msvc-convenience.diff} | 0 ports/cairo/portfile.cmake | 30 +++++-------------- ports/cairo/usage | 11 ------- ports/cairo/vcpkg.json | 18 ++++++----- ports/elements/vcpkg.json | 3 +- scripts/ci.baseline.txt | 11 +++++-- versions/baseline.json | 6 ++-- versions/c-/cairo.json | 5 ++++ versions/e-/elements.json | 5 ++++ 12 files changed, 41 insertions(+), 94 deletions(-) delete mode 100644 ports/cairo/cairo_static_fix.patch delete mode 100644 ports/cairo/disable-atomic-ops-check.patch delete mode 100644 ports/cairo/fix-alloca-undefine.patch rename ports/cairo/{fix-static-missing-lib-msimg32.patch => msvc-convenience.diff} (100%) delete mode 100644 ports/cairo/usage diff --git a/ports/cairo/cairo_static_fix.patch b/ports/cairo/cairo_static_fix.patch deleted file mode 100644 index 4d538b7f1e..0000000000 --- a/ports/cairo/cairo_static_fix.patch +++ /dev/null @@ -1,18 +0,0 @@ -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' -+ lib_default = get_option('default_library') -+ if lib_default == 'static' -+ add_project_arguments('-DCAIRO_WIN32_STATIC_BUILD', language: 'c') -+ endif -+endif -+ - pkgmod = import('pkgconfig') - python3 = import('python').find_installation() - diff --git a/ports/cairo/disable-atomic-ops-check.patch b/ports/cairo/disable-atomic-ops-check.patch deleted file mode 100644 index b7768013d0..0000000000 --- a/ports/cairo/disable-atomic-ops-check.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/meson.build b/meson.build -index e3ec5d9..7b20c0c 100644 ---- a/meson.build -+++ b/meson.build -@@ -870,7 +870,7 @@ if cc.links(files('meson-cc-tests/atomic-ops-cxx11.c'), name: 'Atomic ops: cxx11 - conf.set('HAVE_CXX11_ATOMIC_PRIMITIVES', 1) - elif cc.links(files('meson-cc-tests/atomic-ops-gcc-legacy.c'), name: 'Atomic ops: gcc legacy') - conf.set('HAVE_GCC_LEGACY_ATOMICS', 1) --elif cc.has_header('atomic_ops.h') -+elif false - conf.set('HAVE_LIB_ATOMIC_OPS', 1) - elif cc.has_header('libkern/OSAtomic.h') - conf.set('HAVE_OS_ATOMIC_OPS', 1) diff --git a/ports/cairo/fix-alloca-undefine.patch b/ports/cairo/fix-alloca-undefine.patch deleted file mode 100644 index 1821c2e855..0000000000 --- a/ports/cairo/fix-alloca-undefine.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 - #include - -+#ifdef _MSC_VER -+#include -+#endif -+ - #if HAVE_FT_COLR_V1 - - #include diff --git a/ports/cairo/fix-static-missing-lib-msimg32.patch b/ports/cairo/msvc-convenience.diff similarity index 100% rename from ports/cairo/fix-static-missing-lib-msimg32.patch rename to ports/cairo/msvc-convenience.diff diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 63d5497e7d..d71cec33cb 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -1,5 +1,6 @@ +set(EXTRA_PATCHES "") if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) - set(PATCHES fix_clang-cl_build.patch) + list(APPEND EXTRA_PATCHES fix_clang-cl_build.patch) endif() vcpkg_from_gitlab( @@ -7,14 +8,11 @@ vcpkg_from_gitlab( GITLAB_URL https://gitlab.freedesktop.org REPO cairo/cairo REF "${VERSION}" - SHA512 2ef3b948b354a9be5c3afe2bbf47f559a00a6114c67ef50ce19d54a1d4232218311f2277e271faad4df598e19e03492ba97af934ede9411494618ebe46f9eee9 + SHA512 5731eaa48857561aad023214ebb7be70344579a4bc75d00c46f8c622b4d34be7f79ab02e2cd54a419086490a3bf31aafa2418d873833b475b9824e3f2f5b17b6 PATCHES - cairo_static_fix.patch - disable-atomic-ops-check.patch # See https://gitlab.freedesktop.org/cairo/cairo/-/issues/554 - 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 + msvc-convenience.diff + ${EXTRA_PATCHES} ) if("fontconfig" IN_LIST FEATURES) @@ -69,29 +67,15 @@ vcpkg_install_meson() 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)" "0" CAIRO_H "${CAIRO_H}") -else() - string(REPLACE "!defined(CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/cairo/cairo.h" "defined(CAIRO_WIN32_STATIC_BUILD)" "1") endif() -file(WRITE ${_file} "${CAIRO_H}") vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() -#TODO: Fix script -#set(TOOLS) -#if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/cairo-trace${VCPKG_TARGET_EXECUTABLE_SUFFIX}") -# list(APPEND TOOLS cairo-trace) # sh script which needs to be fixed due to absolute paths in it. -#endif() -#vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS) 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" "${SOURCE_PATH}/COPYING-LGPL-2.1" "${SOURCE_PATH}/COPYING-MPL-1.1") diff --git a/ports/cairo/usage b/ports/cairo/usage deleted file mode 100644 index 0ebb90033d..0000000000 --- a/ports/cairo/usage +++ /dev/null @@ -1,11 +0,0 @@ -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) diff --git a/ports/cairo/vcpkg.json b/ports/cairo/vcpkg.json index 8985a87c1c..0e3f0b9c6d 100644 --- a/ports/cairo/vcpkg.json +++ b/ports/cairo/vcpkg.json @@ -1,7 +1,6 @@ { "name": "cairo", - "version": "1.18.0", - "port-version": 1, + "version": "1.18.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": "LGPL-2.1-only OR MPL-1.1", @@ -24,31 +23,34 @@ ], "features": { "fontconfig": { - "description": "build with fontconfig", + "description": "Build with fontconfig", "dependencies": [ "fontconfig" ] }, "freetype": { - "description": "use the freetype font backend", + "description": "Use the freetype font backend", "dependencies": [ - "freetype" + { + "name": "freetype", + "default-features": false + } ] }, "gobject": { - "description": "build gobject module", + "description": "Build the gobject module", "dependencies": [ "glib" ] }, "lzo": { - "description": "build with lzo support", + "description": "Build with lzo support", "dependencies": [ "lzo" ] }, "x11": { - "description": "build with x11 support", + "description": "Build with X11 support", "supports": "!windows" } } diff --git a/ports/elements/vcpkg.json b/ports/elements/vcpkg.json index e497752df6..219e75069c 100644 --- a/ports/elements/vcpkg.json +++ b/ports/elements/vcpkg.json @@ -1,6 +1,7 @@ { "name": "elements", "version-date": "2022-12-07", + "port-version": 1, "description": "Elements is a lightweight, fine-grained, resolution independent, modular GUI library.", "homepage": "https://cycfi.github.io/elements", "license": "MIT", @@ -9,7 +10,7 @@ "cairo", { "name": "gtk3", - "platform": "linux" + "platform": "!osx & !windows" }, { "name": "vcpkg-cmake", diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 437ede4821..59fbc141de 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -159,7 +159,6 @@ caf:arm64-uwp=fail caf:arm64-android=fail caf:x64-android=fail caf:x64-uwp=fail -cairo:x64-android=fail # file conflict with dbg-macro c-dbg-macro:x86-windows=skip c-dbg-macro:x64-windows=skip @@ -196,7 +195,6 @@ catch-classic:x64-windows = skip catch-classic:x64-windows-static = skip catch-classic:x64-windows-static-md=skip catch-classic:x86-windows = skip -cairo:arm64-android=fail cctag:x64-windows-static-md=fail cello:arm64-uwp=fail cello:x64-uwp=fail @@ -484,6 +482,9 @@ ijg-libjpeg:x86-windows = skip intelrdfpmathlib:arm-neon-android=fail intelrdfpmathlib:arm64-android=fail intelrdfpmathlib:x64-android=fail +io2d:arm-neon-android=fail +io2d:arm64-android=fail +io2d:x64-android=fail irrlicht:x64-android=fail isal:x64-android=fail # Failing on try_run() in cross builds @@ -553,6 +554,9 @@ libfreenect2:arm64-windows=fail libgpod:arm-neon-android=fail libgpod:arm64-android=fail libgpod:x64-android=fail +libgxps:arm-neon-android=fail +libgxps:arm64-android=fail +libgxps:x64-android=fail libgxps:x64-windows-static=fail libhdfs3:arm-neon-android=fail libhdfs3:arm64-android=fail @@ -873,6 +877,9 @@ orc:arm64-android=fail orc:x64-android=fail paho-mqtt:arm64-uwp=fail paho-mqtt:x64-uwp=fail +pango:arm-neon-android=fail +pango:arm64-android=fail +pango:x64-android=fail pcl:arm-neon-android=fail pcl:arm64-android=fail pcl:x64-android=fail diff --git a/versions/baseline.json b/versions/baseline.json index a373ba20b9..728b755ba7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1481,8 +1481,8 @@ "port-version": 0 }, "cairo": { - "baseline": "1.18.0", - "port-version": 1 + "baseline": "1.18.2", + "port-version": 0 }, "cairomm": { "baseline": "1.18.0", @@ -2542,7 +2542,7 @@ }, "elements": { "baseline": "2022-12-07", - "port-version": 0 + "port-version": 1 }, "elfio": { "baseline": "3.12", diff --git a/versions/c-/cairo.json b/versions/c-/cairo.json index 1bdc1a1385..40c86ef451 100644 --- a/versions/c-/cairo.json +++ b/versions/c-/cairo.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "84c6e863f1f936bd0db07b3302e568ac1c98531c", + "version": "1.18.2", + "port-version": 0 + }, { "git-tree": "0fda02793cfc3911468cd200b0a889c65035db1d", "version": "1.18.0", diff --git a/versions/e-/elements.json b/versions/e-/elements.json index 86d9525de7..f14f733349 100644 --- a/versions/e-/elements.json +++ b/versions/e-/elements.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1ab41f4881c43e4119c9f80141820e016db62ebf", + "version-date": "2022-12-07", + "port-version": 1 + }, { "git-tree": "ada1c4c9df8d559673c40e083adcab5e94285fc3", "version-date": "2022-12-07",