From 95836f4883ffb481b7dd5f89569bc6ef55c31a7e Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Tue, 4 May 2021 01:14:23 +0200 Subject: [PATCH] [cairo] Windows: Fix cairo dll definition (#17596) * [cairo] fix def name for dll * version stuff * use same approach as the fontconfig fix * update version --- ports/cairo/portfile.cmake | 6 ++++++ ports/cairo/vcpkg.json | 2 +- ports/cairo/win_dll_def.patch | 13 +++++++++++++ versions/baseline.json | 2 +- versions/c-/cairo.json | 5 +++++ 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 ports/cairo/win_dll_def.patch diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 3b7448d7be..bca27e5c19 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -5,6 +5,11 @@ vcpkg_download_distfile(ARCHIVE FILENAME "cairo-${CAIRO_VERSION}.tar.xz" SHA512 9eb27c4cf01c0b8b56f2e15e651f6d4e52c99d0005875546405b64f1132aed12fbf84727273f493d84056a13105e065009d89e94a8bfaf2be2649e232b82377f ) + +if(NOT VCPKG_TARGET_IS_MINGW AND VCPKG_TARGET_IS_WINDOWS) + set(PATCHES win_dll_def.patch) +endif() + vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} @@ -14,6 +19,7 @@ vcpkg_extract_source_archive_ex( 0001_fix_osx_defined.patch build2.patch remove_test_perf.patch + ${PATCHES} ) #TODO the autoconf script has a lot of additional option which use auto detection and should be disabled! diff --git a/ports/cairo/vcpkg.json b/ports/cairo/vcpkg.json index a2ff0d2563..aa8cd3d2b7 100644 --- a/ports/cairo/vcpkg.json +++ b/ports/cairo/vcpkg.json @@ -1,7 +1,7 @@ { "name": "cairo", "version": "1.16.0", - "port-version": 11, + "port-version": 12, "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": [ diff --git a/ports/cairo/win_dll_def.patch b/ports/cairo/win_dll_def.patch new file mode 100644 index 0000000000..0e50ed7872 --- /dev/null +++ b/ports/cairo/win_dll_def.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index df6de0136..b8de9669c 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -72,7 +72,7 @@ cairo.def: cairo-features.h $(enabled_cairo_headers) + $(EGREP) '^cairo_.* \(' | \ + sed -e 's/[ ].*//' | \ + sort; \ +- echo LIBRARY libcairo-$(CAIRO_VERSION_SONUM).dll; \ ++ echo LIBRARY cairo-$(CAIRO_VERSION_SONUM).dll; \ + ) >$@ + @ ! grep -q cairo_ERROR $@ || ($(RM) $@; false) + diff --git a/versions/baseline.json b/versions/baseline.json index c894511d7e..46f07f90e8 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1082,7 +1082,7 @@ }, "cairo": { "baseline": "1.16.0", - "port-version": 11 + "port-version": 12 }, "cairomm": { "baseline": "1.16.0", diff --git a/versions/c-/cairo.json b/versions/c-/cairo.json index c31cbcbb55..12b3b63e88 100644 --- a/versions/c-/cairo.json +++ b/versions/c-/cairo.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ea721528bdf86a3a1fd35b78550e3c9463a8e715", + "version": "1.16.0", + "port-version": 12 + }, { "git-tree": "f5e2e3535796b2fb785709ae2273c1243b4aa2fc", "version": "1.16.0",