From e01bb328360a6fd1cb769792527c1b3c64e1f013 Mon Sep 17 00:00:00 2001 From: Phoebe <20694052+PhoebeHui@users.noreply.github.com> Date: Thu, 29 Apr 2021 03:06:01 +0800 Subject: [vcpkg baseline][gdk-pixbuf] Fix build error on windows (#17528) Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com> --- ports/gdk-pixbuf/fix_build_error_windows.patch | 21 +++++++++++++++++++++ ports/gdk-pixbuf/portfile.cmake | 4 +++- ports/gdk-pixbuf/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/g-/gdk-pixbuf.json | 5 +++++ 5 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 ports/gdk-pixbuf/fix_build_error_windows.patch diff --git a/ports/gdk-pixbuf/fix_build_error_windows.patch b/ports/gdk-pixbuf/fix_build_error_windows.patch new file mode 100644 index 000000000..b6f6332da --- /dev/null +++ b/ports/gdk-pixbuf/fix_build_error_windows.patch @@ -0,0 +1,21 @@ +diff --git a/meson.build b/meson.build +index b39c55d..4b050c7 100644 +--- a/meson.build ++++ b/meson.build +@@ -89,8 +89,14 @@ if cc.has_function('round', dependencies: mathlib_dep) + gdk_pixbuf_conf.set('HAVE_ROUND', 1) + endif + +-if cc.has_function('lrint', dependencies: mathlib_dep) +- gdk_pixbuf_conf.set('HAVE_LRINT', 1) ++if cc.get_id() == 'msvc' ++ if cc.has_function('lrint', dependencies: mathlib_dep, args: '-Oi-') ++ gdk_pixbuf_conf.set('HAVE_LRINT', 1) ++ endif ++else ++ if cc.has_function('lrint', dependencies: mathlib_dep) ++ gdk_pixbuf_conf.set('HAVE_LRINT', 1) ++ endif + endif + + if cc.has_function('bind_textdomain_codeset', prefix: '#include ') diff --git a/ports/gdk-pixbuf/portfile.cmake b/ports/gdk-pixbuf/portfile.cmake index f235c5b31..bf16064f8 100644 --- a/ports/gdk-pixbuf/portfile.cmake +++ b/ports/gdk-pixbuf/portfile.cmake @@ -10,7 +10,9 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} - PATCHES fix_build.patch + PATCHES + fix_build.patch + fix_build_error_windows.patch ) if(VCPKG_TARGET_IS_WINDOWS) #list(APPEND OPTIONS -Dnative_windows_loaders=true) # Use Windows system components to handle BMP, EMF, GIF, ICO, JPEG, TIFF and WMF images, overriding jpeg and tiff. To build this into gdk-pixbuf, pass in windows" with the other loaders to build in or use "all" with the builtin_loaders option diff --git a/ports/gdk-pixbuf/vcpkg.json b/ports/gdk-pixbuf/vcpkg.json index c123f6a3e..ca65da57a 100644 --- a/ports/gdk-pixbuf/vcpkg.json +++ b/ports/gdk-pixbuf/vcpkg.json @@ -1,6 +1,7 @@ { "name": "gdk-pixbuf", "version": "2.42.2", + "port-version": 1, "description": "Image loading library.", "homepage": "https://developer.gnome.org/gdk-pixbuf/", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index d25f9575a..fbf4f191f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2170,7 +2170,7 @@ }, "gdk-pixbuf": { "baseline": "2.42.2", - "port-version": 0 + "port-version": 1 }, "genann": { "baseline": "2019-07-10", diff --git a/versions/g-/gdk-pixbuf.json b/versions/g-/gdk-pixbuf.json index 60824653d..efc409eaf 100644 --- a/versions/g-/gdk-pixbuf.json +++ b/versions/g-/gdk-pixbuf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f90cd0dd11fd312fe803519706f422a9207336d0", + "version": "2.42.2", + "port-version": 1 + }, { "git-tree": "609b77f244ec0d76aac5616cd8654dfcbc608297", "version": "2.42.2", -- cgit v1.2.3