From 60a8f7971e5b23c329c2bca3b0bb82e7f65a0e35 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Mon, 29 Nov 2021 21:31:32 +0100 Subject: [PATCH] [glib] update to 2.70.1 (#21676) * [glib] update to 2.70.1 * version stuff * fix dependency * version stuff * CI Retrigger * trying to fix glib on osx. * version stuff * Trigger CI --- ports/glib/fix-libintl-detection.patch | 13 ------- ports/glib/libintl.patch | 50 ++++++++++++++++++++++++++ ports/glib/portfile.cmake | 18 ++++------ ports/glib/vcpkg.json | 8 +++-- versions/baseline.json | 4 +-- versions/g-/glib.json | 5 +++ 6 files changed, 69 insertions(+), 29 deletions(-) delete mode 100644 ports/glib/fix-libintl-detection.patch create mode 100644 ports/glib/libintl.patch diff --git a/ports/glib/fix-libintl-detection.patch b/ports/glib/fix-libintl-detection.patch deleted file mode 100644 index 0ee0063b4c..0000000000 --- a/ports/glib/fix-libintl-detection.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/meson.build b/meson.build ---- a/meson.build -+++ b/meson.build -@@ -2029,6 +2029,9 @@ else - libintl = disabler() - endif - endif -+ if not libintl.found() -+ libintl = dependency('Intl', required : false, method : 'cmake') -+ endif - if not libintl.found() - libintl = subproject('proxy-libintl').get_variable('intl_dep') - libintl_deps = [libintl] + libintl_deps diff --git a/ports/glib/libintl.patch b/ports/glib/libintl.patch new file mode 100644 index 0000000000..c21c279426 --- /dev/null +++ b/ports/glib/libintl.patch @@ -0,0 +1,50 @@ +diff --git a/meson.build b/meson.build +index c418f50b1..e7158c036 100644 +--- a/meson.build ++++ b/meson.build +@@ -2048,42 +2048,10 @@ endif + # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible + # implementations. This could be extended if issues are found in some platforms. + libintl_deps = [] +-if cc.has_function('ngettext', args : osx_ldflags) +- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset') +-else +- # First just find the bare library. +- libintl = cc.find_library('intl', required : false) +- # The bare library probably won't link without help if it's static. +- if libintl.found() and not cc.has_function('ngettext', args : osx_ldflags, dependencies : libintl) +- libintl_iconv = cc.find_library('iconv', required : false) +- # libintl supports different threading APIs, which may not +- # require additional flags, but it defaults to using pthreads if +- # found. Meson's "threads" dependency does not allow you to +- # prefer pthreads. We may not be using pthreads for glib itself +- # either so just link the library to satisfy libintl rather than +- # also defining the macros with the -pthread flag. +- libintl_pthread = cc.find_library('pthread', required : false) +- # Try linking with just libiconv. +- if libintl_iconv.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv]) +- libintl_deps += [libintl_iconv] +- # Then also try linking with pthreads. +- elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv, libintl_pthread]) +- libintl_deps += [libintl_iconv, libintl_pthread] +- else +- libintl = disabler() +- endif +- endif +- if not libintl.found() +- libintl = subproject('proxy-libintl').get_variable('intl_dep') +- libintl_deps = [libintl] + libintl_deps +- have_bind_textdomain_codeset = true # proxy-libintl supports it +- else +- libintl_deps = [libintl] + libintl_deps +- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags, ++libintl = dependency('Intl', method:'cmake', required : true) ++libintl_deps += [libintl] ++have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags, + dependencies : libintl_deps) +- endif +-endif +- + glib_conf.set('HAVE_BIND_TEXTDOMAIN_CODESET', have_bind_textdomain_codeset) + + # We require gettext to always be present diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index 3fe401c06f..f44148415a 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -7,12 +7,12 @@ if (VCPKG_TARGET_IS_WINDOWS) #remove if merged: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1655 endif() -set(GLIB_MAJOR_MINOR 2.66) -set(GLIB_PATCH 4) +set(GLIB_MAJOR_MINOR 2.70) +set(GLIB_PATCH 1) vcpkg_download_distfile(ARCHIVE URLS "https://ftp.gnome.org/pub/gnome/sources/glib/${GLIB_MAJOR_MINOR}/glib-${GLIB_MAJOR_MINOR}.${GLIB_PATCH}.tar.xz" FILENAME "glib-${GLIB_MAJOR_MINOR}.${GLIB_PATCH}.tar.xz" - SHA512 b3bc3e6e5cca793139848940e5c0894f1c7e3bd3a770b213a1ea548ac54a2432aebb140ed54518712fb8af36382b3b13d5f7ffd3d87ff63cba9e2f55434f7260) + SHA512 639317c98ab72ad853608ab4d395484daff135c0222556c51ca93fd8533c5759db14478beda964e4feb02bb2737a46a4eda25063f98a9c6ba6ae4bc5d74bf5e1) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH @@ -20,7 +20,7 @@ vcpkg_extract_source_archive_ex( REF ${GLIB_VERSION} PATCHES use-libiconv-on-windows.patch - fix-libintl-detection.patch + libintl.patch ) @@ -41,21 +41,17 @@ endif() if(VCPKG_TARGET_IS_WINDOWS) list(APPEND OPTIONS -Diconv=external) -else() - #list(APPEND OPTIONS -Diconv=libc) ? endif() vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -Dbuild_tests=false -Dinstalled_tests=false ${OPTIONS} - -Dinternal_pcre=false + -Dtests=false + -Dxattr=false + -Dlibelf=disabled ) -#-Dnls=true -#-Dlibelf=false -#-Dxattr=true? vcpkg_install_meson(ADD_BIN_TO_PATH) diff --git a/ports/glib/vcpkg.json b/ports/glib/vcpkg.json index 0fc11043f5..0afb22048d 100644 --- a/ports/glib/vcpkg.json +++ b/ports/glib/vcpkg.json @@ -1,7 +1,6 @@ { "name": "glib", - "version": "2.66.4", - "port-version": 2, + "version": "2.70.1", "description": "Portable, general-purpose utility library.", "homepage": "https://developer.gnome.org/glib/", "supports": "!uwp & !(windows & static)", @@ -11,7 +10,10 @@ "libffi", "libiconv", "pcre", - "tool-meson", + { + "name": "tool-meson", + "host": true + }, "zlib" ], "features": { diff --git a/versions/baseline.json b/versions/baseline.json index deb891a385..a4a21e154e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2469,8 +2469,8 @@ "port-version": 0 }, "glib": { - "baseline": "2.66.4", - "port-version": 2 + "baseline": "2.70.1", + "port-version": 0 }, "glibmm": { "baseline": "2.68.1", diff --git a/versions/g-/glib.json b/versions/g-/glib.json index e7c94ff782..6efc32a794 100644 --- a/versions/g-/glib.json +++ b/versions/g-/glib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "21a2facd76ae194ca1880c497122f7785750f912", + "version": "2.70.1", + "port-version": 0 + }, { "git-tree": "c8d7eeabc89610c8b583c319b572b16e07f3f035", "version": "2.66.4",