[vcpkg baseline][gdk-pixbuf] Fix build issues, license, cleanup (#27371)

* Minor changes

* Shortcut loaders.cache generation

With -Dbuiltin-loaders=all, the cache file contains nothing but comment lines.
However, the generation is flaky on windows in vcpkg CI.

* Revise tool fixup (fixes mingw cross builds)

* Update versions
This commit is contained in:
Kai Pastor 2022-10-24 21:09:25 +02:00 committed by GitHub
parent 0c7c52d5c8
commit 94bc827441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 42 deletions

View File

@ -0,0 +1,20 @@
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index 54ff9dd..27f8512 100644
--- a/gdk-pixbuf/meson.build
+++ b/gdk-pixbuf/meson.build
@@ -348,7 +348,14 @@ foreach bin: gdkpixbuf_bin
set_variable(bin_name.underscorify(), bin)
endforeach
-if not meson.is_cross_build()
+if dynamic_loaders.length() == 0
+ # skip tool invocation
+ cmake = find_program('cmake', required : true)
+ loaders_cache = custom_target('loaders.cache', output: 'loaders.cache', capture: true,
+ command: [ cmake, '-E', 'echo', '# No dynamic loaders enabled at build time' ],
+ build_by_default: true)
+ loaders_dep = declare_dependency(sources: [ loaders_cache ])
+elif not meson.is_cross_build()
# The 'loaders.cache' used for testing, so we don't accidentally
# load the installed cache; we always build it by default
loaders_cache = custom_target('loaders.cache',

View File

@ -1,15 +1,13 @@
set(GDK_PIXBUF_VERSION 2.42)
set(GDK_PIXBUF_PATCH 9)
vcpkg_from_gitlab( vcpkg_from_gitlab(
GITLAB_URL https://gitlab.gnome.org/ GITLAB_URL https://gitlab.gnome.org/
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO GNOME/gdk-pixbuf REPO GNOME/gdk-pixbuf
REF "${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}" REF "${VERSION}"
SHA512 3406f47b413fe3860df410a0cc0076ce47d10605b39347105690c85616739e67e5dfd0804efcad758614b0c8d1369e410b9efaa704a234bfd19686b82595b9e1 SHA512 3406f47b413fe3860df410a0cc0076ce47d10605b39347105690c85616739e67e5dfd0804efcad758614b0c8d1369e410b9efaa704a234bfd19686b82595b9e1
HEAD_REF master HEAD_REF master
PATCHES PATCHES
fix_build_error_windows.patch fix_build_error_windows.patch
loaders-cache.patch
) )
if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_IS_WINDOWS)
@ -31,48 +29,27 @@ vcpkg_configure_meson(
-Dgio_sniffing=false # Perform file type detection using GIO (Unused on MacOS and Windows) -Dgio_sniffing=false # Perform file type detection using GIO (Unused on MacOS and Windows)
-Dbuiltin_loaders=all # since it is unclear where loadable plugins should be located; -Dbuiltin_loaders=all # since it is unclear where loadable plugins should be located;
# Comma-separated list of loaders to build into gdk-pixbuf, or "none", or "all" to build all buildable loaders into gdk-pixbuf # Comma-separated list of loaders to build into gdk-pixbuf, or "none", or "all" to build all buildable loaders into gdk-pixbuf
ADDITIONAL_NATIVE_BINARIES glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources' ADDITIONAL_BINARIES glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources'
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
ADDITIONAL_CROSS_BINARIES glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources' )
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
)
vcpkg_install_meson(ADD_BIN_TO_PATH) vcpkg_install_meson(ADD_BIN_TO_PATH)
# Fix paths in pc file. vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gdk-pixbuf-2.0.pc" [[${bindir}]] "\${prefix}/tools/${PORT}")
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gdk-pixbuf-2.0.pc") if(NOT VCPKG_BUILD_TYPE)
if(EXISTS "${_file}") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gdk-pixbuf-2.0.pc" [[${bindir}]] "\${prefix}/../tools/${PORT}")
file(READ "${_file}" _contents)
string(REPLACE [[${bindir}]] "\${prefix}/../tools/${PORT}" _contents "${_contents}")
file(WRITE "${_file}" "${_contents}")
endif() endif()
set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gdk-pixbuf-2.0.pc")
if(EXISTS "${_file}")
file(READ "${_file}" _contents)
string(REPLACE [[${bindir}]] "\${prefix}/tools/${PORT}" _contents "${_contents}")
file(WRITE "${_file}" "${_contents}")
endif()
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()
set(TOOL_NAMES gdk-pixbuf-csource gdk-pixbuf-pixdata gdk-pixbuf-query-loaders gdk-pixbuf-thumbnailer) set(TOOL_NAMES gdk-pixbuf-csource gdk-pixbuf-pixdata gdk-pixbuf-query-loaders)
# gdk-pixbuf-thumbnailer is not compiled for cross-compiling # gdk-pixbuf-thumbnailer is not compiled for cross-compiling
set(IS_NEED_REMOVE_THUMBNAILER ${VCPKG_CROSSCOMPILING}) # vcpkg-meson cross-build configuration differs from VCPKG_CROSSCOMPILING
# This adjusting logic might be place in vcpkg_common_definitions.cmake. if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/gdk-pixbuf-thumbnailer${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
if(VCPKG_TARGET_IS_WINDOWS) list(APPEND TOOL_NAMES gdk-pixbuf-thumbnailer)
if(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)86" OR VCPKG_TARGET_ARCHITECTURE MATCHES "(amd|AMD|x|X)64")
set(IS_NEED_REMOVE_THUMBNAILER false)
endif()
endif() endif()
if(IS_NEED_REMOVE_THUMBNAILER)
list(REMOVE_ITEM TOOL_NAMES gdk-pixbuf-thumbnailer)
endif()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,10 +1,10 @@
{ {
"name": "gdk-pixbuf", "name": "gdk-pixbuf",
"version": "2.42.9", "version": "2.42.9",
"port-version": 1, "port-version": 2,
"description": "Image loading library.", "description": "Image loading library.",
"homepage": "https://gitlab.gnome.org/GNOME/gdk-pixbuf", "homepage": "https://gitlab.gnome.org/GNOME/gdk-pixbuf",
"license": "LGPL-2.1-only", "license": "LGPL-2.1-or-later",
"dependencies": [ "dependencies": [
"gettext", "gettext",
"glib", "glib",
@ -13,7 +13,10 @@
"host": true "host": true
}, },
"libpng", "libpng",
"tiff", {
"name": "tiff",
"default-features": false
},
{ {
"name": "vcpkg-tool-meson", "name": "vcpkg-tool-meson",
"host": true "host": true

View File

@ -2550,7 +2550,7 @@
}, },
"gdk-pixbuf": { "gdk-pixbuf": {
"baseline": "2.42.9", "baseline": "2.42.9",
"port-version": 1 "port-version": 2
}, },
"gemmlowp": { "gemmlowp": {
"baseline": "2021-09-28", "baseline": "2021-09-28",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "b42054b8e96faa6387ef8df5870276df1b0902e1",
"version": "2.42.9",
"port-version": 2
},
{ {
"git-tree": "ec4e9442f7771435547892134cde77081fd013d7", "git-tree": "ec4e9442f7771435547892134cde77081fd013d7",
"version": "2.42.9", "version": "2.42.9",