Merge pull request #12251 from Rmys/master

gtk4 ver. bump
This commit is contained in:
Rmys
2023-08-18 21:27:40 +03:00
committed by GitHub
4 changed files with 202 additions and 4 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ def setup():
-Dintrospection=enabled \
-Dcolord=enabled \
-Dcloudproviders=enabled \
-Dvulkan=enabled \
-Dgtk_doc=true")
-Ddocumentation=true")
# -Dvulkan=enabled \
def build():
mesontools.build()
@@ -0,0 +1,120 @@
From 5f5fd77f096174c45f8335afe6efd6745796d9a5 Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Mon, 25 Jul 2022 16:21:50 +0200
Subject: [PATCH] Revert "Meson: Simplify pkgconfig file generator"
Temporarily revert this until we figure out how to best restore
private requires that are needed for rpm automatic dep extraction.
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4756
This reverts commit 802bf4199911c811938b0454a876089bafa97dba.
---
meson.build | 47 +++++++++++++++++++++++++++++++++--------------
1 file changed, 33 insertions(+), 14 deletions(-)
diff --git a/meson.build b/meson.build
index 1b8f2d0248..4fc808dbd4 100644
--- a/meson.build
+++ b/meson.build
@@ -471,6 +471,9 @@ if not os_win32
endif
endif
+
+pc_gdk_extra_libs = []
+
cairo_backends = []
foreach backend: [ ['cairo-xlib', cairo_req, x11_enabled],
['cairo-win32', cairo_req, win32_enabled],
@@ -601,14 +604,26 @@ if x11_enabled
cdata.set('HAVE_RANDR15', xrandr15_dep.found())
endif
+if broadway_enabled
+ pc_gdk_extra_libs += ['-lz']
+endif
+
+if macos_enabled
+ pc_gdk_extra_libs += ['-framework Cocoa', '-framework Carbon']
+endif
+
extra_demo_ldflags = []
if win32_enabled
+ pc_gdk_extra_libs += ['-lgdi32', '-limm32', '-lshell32', '-lole32']
if cc.get_id() == 'msvc'
# Since the demo programs are now built as pure GUI programs, we
# need to pass in /entry:mainCRTStartup so that they will properly
# link on Visual Studio builds
extra_demo_ldflags = ['/entry:mainCRTStartup']
+ else
+ pc_gdk_extra_libs += ['-Wl,-luuid']
endif
+ pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32', '-lhid']
# Check whether libepoxy is built with EGL support on Windows
endif
@@ -826,7 +841,16 @@ gsk_private_packages = [] # all already in gdk_private_packages
pangoft2_pkgs = (wayland_enabled or x11_enabled) ? ['pangoft2'] : []
gtk_private_packages = pangoft2_pkgs
-pkgs = []
+gdk_extra_libs = pc_gdk_extra_libs
+gsk_extra_libs = []
+gtk_extra_libs = []
+
+gdk_extra_cflags = []
+gsk_extra_cflags = []
+gtk_extra_cflags = []
+
+pkgs = [ 'gtk4' ]
+
pkg_targets = []
display_backends = []
foreach backend: [ 'broadway', 'macos', 'wayland', 'win32', 'x11', ]
@@ -843,23 +867,18 @@ common_pc_variables = [
'gtk_host=@0@-@1@'.format(host_machine.cpu_family(), host_machine.system()), # FIXME
]
-pkg_config.generate(libgtk,
- filebase: 'gtk4',
- unescaped_variables: common_pc_variables,
- name: 'GTK',
- description: 'GTK Graphical UI Library',
- requires: gdk_packages + gsk_packages + gtk_packages,
- subdirs: ['gtk-@0@'.format(gtk_api_version)],
-)
-meson.override_dependency('gtk4', libgtk_dep)
-
foreach pkg: pkgs
pkg_config.generate(
filebase: pkg,
unescaped_variables: common_pc_variables,
name: 'GTK',
description: 'GTK Graphical UI Library',
- requires: 'gtk4',
+ requires: gdk_packages + gsk_packages + gtk_packages,
+ requires_private: gdk_private_packages + gsk_private_packages + gtk_private_packages,
+ libraries: ['-L${libdir}', '-lgtk-4'],
+ libraries_private: gdk_extra_libs + gsk_extra_libs + gtk_extra_libs,
+ subdirs: ['gtk-@0@'.format(gtk_api_version)],
+ extra_cflags: gdk_extra_cflags + gsk_extra_cflags + gtk_extra_cflags,
)
meson.override_dependency(pkg, libgtk_dep)
endforeach
@@ -870,10 +889,10 @@ if os_unix
unescaped_variables: common_pc_variables,
name: 'GTK',
description: 'GTK Unix print support',
- requires: 'gtk4',
+ requires: ['gtk4'] + gtk_packages,
+ libraries: [],
subdirs: ['gtk-@0@/unix-print'.format(gtk_api_version)],
)
- meson.override_dependency('gtk4-unix-print', libgtk_dep)
endif
subdir('po')
--
2.37.1
+69
View File
@@ -0,0 +1,69 @@
From 4d7277f72c8f4915f237e36982ffd7dfba524b15 Mon Sep 17 00:00:00 2001
From: Xi Ruoyao <xry111@xry111.site>
Date: Mon, 7 Aug 2023 18:00:34 +0800
Subject: [PATCH] print: Revert "Start sorting apart includes" change for
gtkprinteroptionprivate.h
The print backends needs the functions in gtkprinteroptionprivate.h to
be exported.
Fixes #6003.
---
gtk/print/gtkprinteroptionprivate.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gtk/print/gtkprinteroptionprivate.h b/gtk/print/gtkprinteroptionprivate.h
index 82dd8739ba1..a7d8e8ad5b6 100644
--- a/gtk/print/gtkprinteroptionprivate.h
+++ b/gtk/print/gtkprinteroptionprivate.h
@@ -27,6 +27,7 @@
#endif
#include <glib-object.h>
+#include <gdk/gdk.h>
G_BEGIN_DECLS
@@ -87,28 +88,39 @@ struct _GtkPrinterOptionClass
void (*_gtk_reserved4) (void);
};
+GDK_AVAILABLE_IN_ALL
GType gtk_printer_option_get_type (void) G_GNUC_CONST;
+GDK_AVAILABLE_IN_ALL
GtkPrinterOption *gtk_printer_option_new (const char *name,
const char *display_text,
GtkPrinterOptionType type);
+GDK_AVAILABLE_IN_ALL
void gtk_printer_option_set (GtkPrinterOption *option,
const char *value);
+GDK_AVAILABLE_IN_ALL
void gtk_printer_option_set_has_conflict (GtkPrinterOption *option,
gboolean has_conflict);
+GDK_AVAILABLE_IN_ALL
void gtk_printer_option_clear_has_conflict (GtkPrinterOption *option);
+GDK_AVAILABLE_IN_ALL
void gtk_printer_option_set_boolean (GtkPrinterOption *option,
gboolean value);
+GDK_AVAILABLE_IN_ALL
void gtk_printer_option_allocate_choices (GtkPrinterOption *option,
int num);
+GDK_AVAILABLE_IN_ALL
void gtk_printer_option_choices_from_array (GtkPrinterOption *option,
int num_choices,
const char **choices,
const char **choices_display);
+GDK_AVAILABLE_IN_ALL
gboolean gtk_printer_option_has_choice (GtkPrinterOption *option,
const char *choice);
+GDK_AVAILABLE_IN_ALL
void gtk_printer_option_set_activates_default (GtkPrinterOption *option,
gboolean activates);
+GDK_AVAILABLE_IN_ALL
gboolean gtk_printer_option_get_activates_default (GtkPrinterOption *option);
--
GitLab
+11 -2
View File
@@ -12,7 +12,7 @@
<Icon>gtk4-logo</Icon>
<Summary>The GIMP Toolkit version 4</Summary>
<Description>GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites.</Description>
<Archive sha1sum="b91d8dc1f988c6538fee7eb565ca13c09ef94f48" type="tarxz">mirrors://gnome/gtk/4.10/gtk-4.10.5.tar.xz</Archive>
<Archive sha1sum="5e56e8cf1eba0bf4b4dd21b37712f8dbfccb37c8" type="tarxz">mirrors://gnome/gtk/4.12/gtk-4.12.0.tar.xz</Archive>
<BuildDependencies>
<Dependency>gettext-devel</Dependency>
<Dependency>glib2-devel</Dependency>
@@ -55,7 +55,8 @@
<Dependency>python3-docutils</Dependency>
</BuildDependencies>
<Patches>
<!-- <Patch level="1">099955b0.patch</Patch> -->
<Patch level="1">6250.patch</Patch>
<Patch level="1">0001-Revert-Meson-Simplify-pkgconfig-file-generator.patch</Patch>
</Patches>
</Source>
@@ -108,6 +109,7 @@
<Path fileType="man">/usr/share/man/man1/gtk4-launch*</Path>
<Path fileType="man">/usr/share/man/man1/gtk4-query-settings*</Path>
<Path fileType="man">/usr/share/man/man1/gtk4-node-editor*</Path>
<Path fileType="man">/usr/share/man/man1/gtk4-rendernode-tool*</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="library">/usr/lib/libgtk*</Path>
<Path fileType="library">/usr/lib/gtk-4.0</Path>
@@ -197,6 +199,13 @@
</Package>
<History>
<Update release="22">
<Date>2023-08-05</Date>
<Version>4.12.0</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="21">
<Date>2023-08-05</Date>
<Version>4.10.5</Version>