diff --git a/ports/glib/libintl.patch b/ports/glib/libintl.patch index a718e4dfdec3b7..6e966aab2d2b0a 100644 --- a/ports/glib/libintl.patch +++ b/ports/glib/libintl.patch @@ -2,14 +2,14 @@ diff --git a/meson.build b/meson.build index f44fa2d4e..d465253af 100644 --- a/meson.build +++ b/meson.build -@@ -2090,9 +2090,9 @@ libz_dep = dependency('zlib') +@@ -2088,9 +2088,9 @@ # proxy-libintl subproject. # 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 = [] --libintl = dependency('intl', required: false) +-libintl = dependency('intl', required: false, allow_fallback: false) -if libintl.found() -+libintl = dependency('Intl', method:'cmake', required : true) ++libintl = dependency('Intl', method:'cmake', required: true) +libintl_deps = [libintl] +if false # libintl supports different threading APIs, which may not diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index 2b7f9b8b94c637..77816ddc3746e8 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -1,10 +1,8 @@ -vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} - string(REGEX MATCH "^([0-9]*[.][0-9]*)" GLIB_MAJOR_MINOR "${VERSION}") vcpkg_download_distfile(GLIB_ARCHIVE URLS "https://download.gnome.org/sources/glib/${GLIB_MAJOR_MINOR}/glib-${VERSION}.tar.xz" FILENAME "glib-${VERSION}.tar.xz" - SHA512 4338bf3e42ccbf3679f60b917194070040ff94ba3643121e8916180d6949f3b8cc308b6ad73912bebcb53a29920954bcfb2216bacca0503473a897f1fd023981 + SHA512 44aa53d0dae69e50c8d5d9adb7c90034c4c2ab5db3c74106c91bfdbdca41bc5523b32b16c33bc65b3c6bf0037bdecb344b80e9708930bde54ac7c618c34ea5a8 ) vcpkg_extract_source_archive(SOURCE_PATH @@ -84,11 +82,27 @@ elseif(VCPKG_TARGET_IS_OSX) endif() vcpkg_copy_tools(TOOL_NAMES ${GLIB_TOOLS} AUTO_CLEAN) +vcpkg_fixup_pkgconfig() + +if(VCPKG_TARGET_IS_WINDOWS) + set(LIBINTL_NAME "intl.lib") +else() + set(LIBINTL_NAME "libintl") + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(APPEND LIBINTL_NAME "${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + else() + string(APPEND LIBINTL_NAME "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") + endif() +endif() + set(pc_replace_intl_path gio glib gmodule-no-export gobject gthread) foreach(pc_prefix IN LISTS pc_replace_intl_path) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${pc_prefix}-2.0.pc" "\${prefix}/debug/lib/intl" "-lintl") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${pc_prefix}-2.0.pc" "\"" "") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${pc_prefix}-2.0.pc" "\${prefix}/debug/lib/${LIBINTL_NAME}" "-lintl") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${pc_prefix}-2.0.pc" "\${prefix}/lib/${LIBINTL_NAME}" "-lintl") if(NOT VCPKG_BUILD_TYPE) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${pc_prefix}-2.0.pc" "\${prefix}/lib/intl" "-lintl") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${pc_prefix}-2.0.pc" "\"" "") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${pc_prefix}-2.0.pc" "\${prefix}/lib/${LIBINTL_NAME}" "-lintl") endif() endforeach() @@ -98,7 +112,6 @@ if(NOT VCPKG_BUILD_TYPE) vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gio-2.0.pc" "\${bindir}" "\${prefix}/../tools/${PORT}") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glib-2.0.pc" "\${bindir}" "\${prefix}/../tools/${PORT}") endif() -vcpkg_fixup_pkgconfig() # Fix python scripts set(_file "${CURRENT_PACKAGES_DIR}/tools/${PORT}/gdbus-codegen") @@ -117,8 +130,8 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/gdb" + "${CURRENT_PACKAGES_DIR}/debug/lib/gio" + "${CURRENT_PACKAGES_DIR}/lib/gio" ) -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gio" "${CURRENT_PACKAGES_DIR}/lib/gio") - -file(INSTALL "${SOURCE_PATH}/LICENSES/LGPL-2.1-or-later.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSES/LGPL-2.1-or-later.txt") diff --git a/ports/glib/vcpkg.json b/ports/glib/vcpkg.json index 121b18a96ad1b3..b430f868bfd550 100644 --- a/ports/glib/vcpkg.json +++ b/ports/glib/vcpkg.json @@ -1,6 +1,6 @@ { "name": "glib", - "version": "2.75.1", + "version": "2.75.3", "description": "Portable, general-purpose utility library.", "homepage": "https://developer.gnome.org/glib/", "license": "LGPL-2.1-or-later", diff --git a/versions/baseline.json b/versions/baseline.json index 248188602b6642..9040f3f64b6735 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2757,7 +2757,7 @@ "port-version": 0 }, "glib": { - "baseline": "2.75.1", + "baseline": "2.75.3", "port-version": 0 }, "glibmm": { diff --git a/versions/g-/glib.json b/versions/g-/glib.json index cde8dc0730acf0..91f96951d81cd6 100644 --- a/versions/g-/glib.json +++ b/versions/g-/glib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "787197c9431b9d1f8a5436aeca0fd1155d26c83b", + "version": "2.75.3", + "port-version": 0 + }, { "git-tree": "8f7840ed02d20169b1610123b0f35463c81c523d", "version": "2.75.1",