aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Bique <bique.alexandre@gmail.com>2021-05-13 22:13:16 +0200
committerGitHub <noreply@github.com>2021-05-13 13:13:16 -0700
commitd850857eb406cdee76c1464886f67e2229e033e4 (patch)
tree7d313718c68abe8407d935860065594714d5cba0
parent5568f110b509a9fd90711978a7cb76bae75bb092 (diff)
downloadvcpkg-d850857eb406cdee76c1464886f67e2229e033e4.tar.gz
vcpkg-d850857eb406cdee76c1464886f67e2229e033e4.zip
[cairo] fixes cross compilation problems (#17846)
https://gitlab.freedesktop.org/cairo/cairo/-/issues/481
-rw-r--r--ports/cairo/0001-meson-fix-macOS-build-and-add-macOS-ci.patch112
-rw-r--r--ports/cairo/portfile.cmake19
-rw-r--r--ports/cairo/vcpkg.json2
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/c-/cairo.json5
5 files changed, 130 insertions, 10 deletions
diff --git a/ports/cairo/0001-meson-fix-macOS-build-and-add-macOS-ci.patch b/ports/cairo/0001-meson-fix-macOS-build-and-add-macOS-ci.patch
new file mode 100644
index 000000000..5bc6ca885
--- /dev/null
+++ b/ports/cairo/0001-meson-fix-macOS-build-and-add-macOS-ci.patch
@@ -0,0 +1,112 @@
+From d8d16562ec094593eba4446432e918704590ab20 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
+Date: Sat, 26 Sep 2020 19:25:21 +0100
+Subject: [PATCH] meson: fix macOS build and add macOS ci
+
+Fixes #441
+---
+ .gitlab-ci.yml | 26 ++++++++++++++++++++
+ meson.build | 61 ++++++++++++++++++++++-------------------------
+ meson_options.txt | 1 +
+ 3 files changed, 56 insertions(+), 32 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 53a9af343..fe7757b1f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -371,37 +371,34 @@ if qtgui_dep.found() and false
+ deps += [qtgui_dep]
+ endif
+
+-# Untested
+-if cc.has_header('ApplicationServices/ApplicationServices.h')
+- if cc.has_header('CoreGraphics/CoreGraphics.h')
+- quartz_extra_libs = ['-Xlinker', '-framework', '-Xlinker', 'CoreGraphics']
+- else
+- quartz_extra_libs = ['-Xlinker', '-framework', '-Xlinker', 'ApplicationServices']
++if host_machine.system() == 'darwin' and not get_option('quartz').disabled()
++ quartz_deps = dependency('appleframeworks', modules : ['CoreFoundation', 'ApplicationServices'], required: get_option('quartz'))
++
++ if quartz_deps.found()
++ deps += [quartz_deps]
++
++ feature_conf.set('CAIRO_HAS_QUARTZ_SURFACE', 1)
++ feature_conf.set('CAIRO_HAS_QUARTZ_FONT', 1)
++ feature_conf.set('CAIRO_HAS_QUARTZ_IMAGE_SURFACE', 1)
++
++ built_features += [
++ {
++ 'name': 'cairo-quartz',
++ 'description': 'Quartz surface backend',
++ 'deps': quartz_deps,
++ },
++ {
++ 'name': 'cairo-quartz-image',
++ 'description': 'Quartz Image surface backend',
++ 'deps': quartz_deps,
++ },
++ {
++ 'name': 'cairo-quartz-font',
++ 'description': 'Quartz font backend',
++ 'deps': quartz_deps,
++ },
++ ]
+ endif
+-
+- extra_link_args += quartz_extra_libs
+-
+- feature_conf.set('CAIRO_HAS_QUARTZ_SURFACE', 1)
+- feature_conf.set('CAIRO_HAS_QUARTZ_FONT', 1)
+- feature_conf.set('CAIRO_HAS_QUARTZ_IMAGE_SURFACE', 1)
+-
+- built_features += [
+- {
+- 'name': 'cairo-quartz',
+- 'description': 'Quartz surface backend',
+- 'libs': quartz_extra_libs,
+- },
+- {
+- 'name': 'cairo-quartz-image',
+- 'description': 'Quartz Image surface backend',
+- 'libs': quartz_extra_libs,
+- },
+- {
+- 'name': 'cairo-quartz-font',
+- 'description': 'Quartz font backend',
+- 'libs': quartz_extra_libs,
+- },
+- ]
+ endif
+
+ if host_machine.system() == 'windows'
+@@ -887,13 +884,13 @@ foreach feature: built_features
+ feature_deps = feature.get('deps', [])
+ feature_libs = feature.get('libs', [])
+ feature_compile_deps = feature.get('compile-deps', [])
+- pkgmod.generate(libraries: [libcairo] + feature_deps + feature_libs,
++ pkgmod.generate(libraries: [libcairo, feature_deps, feature_libs],
+ name: feature['name'],
+ description: feature['description'] + ' for cairo graphics library',
+ )
+ meson.override_dependency(feature['name'],
+ declare_dependency(link_with: libcairo,
+- dependencies: feature_deps + feature_compile_deps,
++ dependencies: [feature_deps, feature_compile_deps],
+ link_args: feature_libs,
+ )
+ )
+diff --git a/meson_options.txt b/meson_options.txt
+index ff11fe7ed..5cafe8bda 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -13,6 +13,7 @@ option('glesv3', type : 'feature', value : 'disabled')
+ option('drm', type : 'feature', value : 'disabled')
+ option('openvg', type : 'feature', value : 'disabled')
+ option('png', type : 'feature', value : 'auto') # png and svg surfaces
++option('quartz', type : 'feature', value : 'auto')
+ option('qt', type : 'feature', value : 'disabled')
+ option('tee', type : 'feature', value : 'disabled')
+ option('xcb', type : 'feature', value : 'auto')
+--
+2.29.2
+
diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake
index 7bb3fd094..f14e1b609 100644
--- a/ports/cairo/portfile.cmake
+++ b/ports/cairo/portfile.cmake
@@ -7,6 +7,7 @@ vcpkg_from_gitlab(
REF 156cd3eaaebfd8635517c2baf61fcf3627ff7ec2 #v1.17.4
SHA512 2c516ad3ffe56cf646b2435d6ef3cf25e8c05aeb13d95dd18a7d0510d134d9990cba1b376063352ff99483cfc4e5d2af849afd2f9538f9136f22d44d34be362c
HEAD_REF master
+ PATCHES 0001-meson-fix-macOS-build-and-add-macOS-ci.patch
)
if("fontconfig" IN_LIST FEATURES)
@@ -49,12 +50,12 @@ endif()
vcpkg_configure_meson(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS ${OPTIONS}
- -Dtests=disabled
- -Dzlib=enabled
- -Dpng=enabled
- -Dspectre=auto
- -Dsymbol-lookup=disabled
- -Dgtk2-utils=disabled
+ -Dtests=disabled
+ -Dzlib=enabled
+ -Dpng=enabled
+ -Dspectre=auto
+ -Dsymbol-lookup=disabled
+ -Dgtk2-utils=disabled
)
vcpkg_install_meson()
@@ -75,13 +76,13 @@ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
-#TODO: Fix script
+#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.
+# 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")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
-endif() \ No newline at end of file
+endif()
diff --git a/ports/cairo/vcpkg.json b/ports/cairo/vcpkg.json
index c33161ebd..3372061c1 100644
--- a/ports/cairo/vcpkg.json
+++ b/ports/cairo/vcpkg.json
@@ -1,10 +1,12 @@
{
"name": "cairo",
"version": "1.17.4",
+ "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",
"dependencies": [
"dirent",
+ "expat",
"libpng",
"lzo",
"pixman",
diff --git a/versions/baseline.json b/versions/baseline.json
index b4e6edf3b..63231169f 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1086,7 +1086,7 @@
},
"cairo": {
"baseline": "1.17.4",
- "port-version": 0
+ "port-version": 1
},
"cairomm": {
"baseline": "1.16.0",
diff --git a/versions/c-/cairo.json b/versions/c-/cairo.json
index dab624f11..3dca40696 100644
--- a/versions/c-/cairo.json
+++ b/versions/c-/cairo.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "a2fa5a9972a7b796f56fdda01f644b5c40d93580",
+ "version": "1.17.4",
+ "port-version": 1
+ },
+ {
"git-tree": "c80532bb0f4abd6b3bba09e48ddab1724bdc0ec1",
"version": "1.17.4",
"port-version": 0