Skip to content

Commit

Permalink
[gtk] update to 4.10.1 (#30897)
Browse files Browse the repository at this point in the history
* [gtk] update to 4.10.1 (#30896)

gtk-4.8.2 and newer no longer contain a python script to emulate meson's
post-install logic, so we can't manually trigger it after patching meson
not to run the post-install. Patch the meson file to run the post-install
even when cross-compiling, though if it's execution is optional and all
it does is to generate some caches, i.e. pollute the build system, then
we might be better off not running the post-install logic at all.

Also, we now have a direct harfbuzz dependency by gtk/gtkmain.c and
it also needs harfbuzz with glib support enabled.

* [gtk] Regenerate version registries (#30896)
  • Loading branch information
SchaichAlonso committed Apr 20, 2023
1 parent 4223108 commit ec4a7d7
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 97 deletions.
44 changes: 13 additions & 31 deletions ports/gtk/0001-build.patch
Original file line number Diff line number Diff line change
@@ -1,44 +1,26 @@
diff --git a/meson.build b/meson.build
index 41cf592..cb4d638 100644
index 13517714b7..2132611c88 100644
--- a/meson.build
+++ b/meson.build
@@ -897,24 +897,24 @@ subdir('po-properties')
subdir('docs/tools')
@@ -857,15 +857,15 @@ subdir('po')

subdir('docs/reference')

-if not meson.is_cross_build()
- if meson.version().version_compare('>=0.57.0')
- gnome.post_install(
- glib_compile_schemas: true,
- gio_querymodules: gio_module_dirs,
- gtk_update_icon_cache: get_option('demos'),
- )
- else
- meson.add_install_script('build-aux/meson/post-install.py',
- gtk_api_version,
- gtk_binary_version,
- gtk_libdir,
- gtk_datadir,
- gtk_bindir)
- endif
- gnome.post_install(
- glib_compile_schemas: true,
- gio_querymodules: gio_module_dirs,
- gtk_update_icon_cache: get_option('demos'),
- )
-else
- message('Not executing post-install steps automatically when cross compiling')
-endif
+#if not meson.is_cross_build()
+# if meson.version().version_compare('>=0.57.0')
+# gnome.post_install(
+# glib_compile_schemas: true,
+# gio_querymodules: gio_module_dirs,
+# gtk_update_icon_cache: get_option('demos'),
+# )
+# else
+# meson.add_install_script('build-aux/meson/post-install.py',
+# gtk_api_version,
+# gtk_binary_version,
+# gtk_libdir,
+# gtk_datadir,
+# gtk_bindir)
+# endif
+ gnome.post_install(
+ glib_compile_schemas: true,
+ gio_querymodules: gio_module_dirs,
+ gtk_update_icon_cache: get_option('demos'),
+ )
+#else
+# message('Not executing post-install steps automatically when cross compiling')
+#endif
Expand Down
11 changes: 0 additions & 11 deletions ports/gtk/0002-windows-build.patch

This file was deleted.

12 changes: 0 additions & 12 deletions ports/gtk/0004-macos-build.patch

This file was deleted.

43 changes: 4 additions & 39 deletions ports/gtk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ vcpkg_from_gitlab(
GITLAB_URL https://gitlab.gnome.org/
OUT_SOURCE_PATH SOURCE_PATH
REPO GNOME/gtk
REF 73bea05c3386075528542c2714790199f2bb5861 #v4.6.8
SHA512 5e7b994d1e26a4d97bd5788b61ca3a43a04c96c10161d29e185d5854b925e07b1bba5f1e35509d4df078f918bb6cc7149bcb720aaec8c04e5d8254280c0076ed
REF 74677018183b7b815c54b236841447132c0141e3 #v4.10.1
SHA512 7611c09c1b259c1e079b84abae603920b27403c0900b3265a07e540166bd468603ee2eb77e68e820921d979c345e69c62447fcead6fe38bb21d32bde8ece1e26
HEAD_REF master # branch name
PATCHES
0001-build.patch
0002-windows-build.patch
0004-macos-build.patch
)

vcpkg_find_acquire_program(PKGCONFIG)
Expand Down Expand Up @@ -55,9 +53,9 @@ vcpkg_configure_meson(
OPTIONS
${OPTIONS}
-Ddemos=false
-Dbuild-testsuite=false
-Dbuild-examples=false
-Dbuild-tests=false
-Dinstall-tests=false
-Dgtk_doc=false
-Dman-pages=false
-Dmedia-ffmpeg=disabled # Build the ffmpeg media backend
Expand All @@ -68,6 +66,7 @@ vcpkg_configure_meson(
-Dsysprof=disabled # include tracing support for sysprof
-Dtracker=disabled # Enable Tracker3 filechooser search
-Dcolord=disabled # Build colord support for the CUPS printing backend
-Df16c=disabled # Enable F16C fast paths (requires F16C)
OPTIONS_DEBUG
${OPTIONS_DEBUG}
OPTIONS_RELEASE
Expand All @@ -85,40 +84,6 @@ vcpkg_configure_meson(

vcpkg_install_meson(ADD_BIN_TO_PATH)

# If somebody finds out how to access and forward env variables to
# the meson install script be my guest. Nevertheless the script still
# needs manual execution in the crosscompiling case.
vcpkg_find_acquire_program(PYTHON3)
foreach(_config release debug)
if(_config STREQUAL "release")
set(_short rel)
set(_path_suffix)
else()
set(_short dbg)
set(_path_suffix /debug)
endif()
if(NOT EXISTS "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib")
continue()
endif()
message(STATUS "Running post install script: ${TARGET_TRIPLET}-${_short}")

set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${_path_suffix}/lib/pkgconfig/")
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}")
#file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0/4.0.0/media")
#file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0/4.0.0/immodules")
#file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0/4.0.0/printbackends")
vcpkg_execute_required_process(
COMMAND "${PYTHON3}" "${SOURCE_PATH}/build-aux/meson/post-install.py" 4.0 4.0.0 "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib" "${CURRENT_PACKAGES_DIR}${_path_suffix}/share" "${CURRENT_PACKAGES_DIR}${_path_suffix}/bin"
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME post-install-${TARGET_TRIPLET}-${_short}
)
unset(ENV{PKG_CONFIG_PATH})
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0")
#file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}${_path_suffix}/bin/gtk-4.0")
#file(RENAME "${CURRENT_PACKAGES_DIR}${_path_suffix}/lib/gtk-4.0/" "${CURRENT_PACKAGES_DIR}${_path_suffix}/bin/gtk-4.0")
message(STATUS "Post install ${TARGET_TRIPLET}-${_short} done")
endforeach()

vcpkg_copy_pdbs()

vcpkg_fixup_pkgconfig()
Expand Down
9 changes: 7 additions & 2 deletions ports/gtk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "gtk",
"version": "4.6.8",
"port-version": 2,
"version": "4.10.1",
"description": "Portable library for creating graphical user interfaces.",
"homepage": "https://www.gtk.org/",
"license": "LGPL-2.0-only",
Expand Down Expand Up @@ -38,6 +37,12 @@
"host": true
},
"graphene",
{
"name": "harfbuzz",
"features": [
"glib"
]
},
"libepoxy",
"pango",
{
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2965,8 +2965,8 @@
"port-version": 0
},
"gtk": {
"baseline": "4.6.8",
"port-version": 2
"baseline": "4.10.1",
"port-version": 0
},
"gtk3": {
"baseline": "3.24.34",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gtk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "416961a907f2f0412d4d59517a904d06b4985ffb",
"version": "4.10.1",
"port-version": 0
},
{
"git-tree": "52d572bf77d0fa30174893ca6fe1bf6c17935cb2",
"version": "4.6.8",
Expand Down

0 comments on commit ec4a7d7

Please sign in to comment.