mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[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:
parent
0c7c52d5c8
commit
94bc827441
20
ports/gdk-pixbuf/loaders-cache.patch
Normal file
20
ports/gdk-pixbuf/loaders-cache.patch
Normal 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',
|
@ -1,15 +1,13 @@
|
||||
set(GDK_PIXBUF_VERSION 2.42)
|
||||
set(GDK_PIXBUF_PATCH 9)
|
||||
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.gnome.org/
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO GNOME/gdk-pixbuf
|
||||
REF "${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}"
|
||||
REF "${VERSION}"
|
||||
SHA512 3406f47b413fe3860df410a0cc0076ce47d10605b39347105690c85616739e67e5dfd0804efcad758614b0c8d1369e410b9efaa704a234bfd19686b82595b9e1
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix_build_error_windows.patch
|
||||
loaders-cache.patch
|
||||
)
|
||||
|
||||
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)
|
||||
-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
|
||||
ADDITIONAL_NATIVE_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'
|
||||
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'
|
||||
)
|
||||
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-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
|
||||
)
|
||||
vcpkg_install_meson(ADD_BIN_TO_PATH)
|
||||
|
||||
# Fix paths in pc file.
|
||||
set(_file "${CURRENT_PACKAGES_DIR}/debug/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}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gdk-pixbuf-2.0.pc" [[${bindir}]] "\${prefix}/tools/${PORT}")
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gdk-pixbuf-2.0.pc" [[${bindir}]] "\${prefix}/../tools/${PORT}")
|
||||
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()
|
||||
|
||||
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
|
||||
set(IS_NEED_REMOVE_THUMBNAILER ${VCPKG_CROSSCOMPILING})
|
||||
# This adjusting logic might be place in vcpkg_common_definitions.cmake.
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
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()
|
||||
# vcpkg-meson cross-build configuration differs from VCPKG_CROSSCOMPILING
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/gdk-pixbuf-thumbnailer${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
list(APPEND TOOL_NAMES gdk-pixbuf-thumbnailer)
|
||||
endif()
|
||||
if(IS_NEED_REMOVE_THUMBNAILER)
|
||||
list(REMOVE_ITEM TOOL_NAMES gdk-pixbuf-thumbnailer)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
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(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "gdk-pixbuf",
|
||||
"version": "2.42.9",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Image loading library.",
|
||||
"homepage": "https://gitlab.gnome.org/GNOME/gdk-pixbuf",
|
||||
"license": "LGPL-2.1-only",
|
||||
"license": "LGPL-2.1-or-later",
|
||||
"dependencies": [
|
||||
"gettext",
|
||||
"glib",
|
||||
@ -13,7 +13,10 @@
|
||||
"host": true
|
||||
},
|
||||
"libpng",
|
||||
"tiff",
|
||||
{
|
||||
"name": "tiff",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-tool-meson",
|
||||
"host": true
|
||||
|
@ -2550,7 +2550,7 @@
|
||||
},
|
||||
"gdk-pixbuf": {
|
||||
"baseline": "2.42.9",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"gemmlowp": {
|
||||
"baseline": "2021-09-28",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b42054b8e96faa6387ef8df5870276df1b0902e1",
|
||||
"version": "2.42.9",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "ec4e9442f7771435547892134cde77081fd013d7",
|
||||
"version": "2.42.9",
|
||||
|
Loading…
x
Reference in New Issue
Block a user