diff options
| author | kar <git@13f0.net> | 2025-06-01 23:35:58 -0400 |
|---|---|---|
| committer | kar <git@13f0.net> | 2025-06-01 23:35:58 -0400 |
| commit | 5347713a89ab9419132dd15ddb669884f6c751c9 (patch) | |
| tree | 92279b08d9db1da4b03d79bcfcf12adc5ae4b21e /x11-libs | |
| parent | b2470355be8626830ee82decaca490c37c05c62f (diff) | |
add my sort of unbloated x11-libs/gtk+2
Diffstat (limited to 'x11-libs')
| -rw-r--r-- | x11-libs/gtk+/Manifest | 1 | ||||
| -rw-r--r-- | x11-libs/gtk+/files/gtk+-2.24.24-out-of-source.patch | 33 | ||||
| -rw-r--r-- | x11-libs/gtk+/files/gtk+-2.24.31-update-icon-cache.patch | 78 | ||||
| -rw-r--r-- | x11-libs/gtk+/files/gtk+-2.24.33-Fix-casts.patch | 167 | ||||
| -rw-r--r-- | x11-libs/gtk+/files/gtk+-2.24.33-respect-NM.patch | 12 | ||||
| -rw-r--r-- | x11-libs/gtk+/gtk+-2.24.33-r4.ebuild | 307 |
6 files changed, 598 insertions, 0 deletions
diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest new file mode 100644 index 0000000..a472079 --- /dev/null +++ b/x11-libs/gtk+/Manifest | |||
| @@ -0,0 +1 @@ | |||
| DIST gtk+-2.24.33.tar.xz 12661828 BLAKE2B f3488b220aaee54bf36fa77e2112d060152e57938845d240014a7d43a5743b1d4de19cc09c683d9d238fd1967cd67cc3c493f2475e4e481f6709f5cdc652c65c SHA512 71b588797c81f727dfac8dcb1be193f7436f717d30ecf18eae2d3aeb0f445b3be4743400acac16435490db8f564f01032065d3f42d27871317f80c98aef929d5 | |||
diff --git a/x11-libs/gtk+/files/gtk+-2.24.24-out-of-source.patch b/x11-libs/gtk+/files/gtk+-2.24.24-out-of-source.patch new file mode 100644 index 0000000..451233c --- /dev/null +++ b/x11-libs/gtk+/files/gtk+-2.24.24-out-of-source.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 9e0f33144aff8d792ab105927cf686eda0afd25e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> | ||
| 3 | Date: Sun, 18 May 2014 10:50:05 +0200 | ||
| 4 | Subject: [PATCH] aliasfilecheck: check for sources both in builddir & srcdir. | ||
| 5 | |||
| 6 | The $gtk_all_c_sources variable contains both supplied and generated | ||
| 7 | sources. The former reside in $srcdir, the latter in the build directory | ||
| 8 | (cwd). | ||
| 9 | |||
| 10 | In order to handle both kinds properly, first try to find each source | ||
| 11 | file in cwd, and then fallback to $srcdir. This makes it possible to use | ||
| 12 | out-of-source builds, and guarantees that fresh-built source files will | ||
| 13 | be used rather than pre-generated copies included in the distribution | ||
| 14 | tarball. | ||
| 15 | --- | ||
| 16 | gtk/aliasfilescheck.sh | 2 +- | ||
| 17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/gtk/aliasfilescheck.sh b/gtk/aliasfilescheck.sh | ||
| 20 | index 31b49d4..3636a82 100755 | ||
| 21 | --- a/gtk/aliasfilescheck.sh | ||
| 22 | +++ b/gtk/aliasfilescheck.sh | ||
| 23 | @@ -6,6 +6,6 @@ if test "x$gtk_all_c_sources" = x; then | ||
| 24 | fi | ||
| 25 | |||
| 26 | grep 'IN_FILE' ${srcdir-.}/gtk.symbols | sed 's/.*(//;s/).*//' | grep __ | sort -u > expected-files | ||
| 27 | -{ cd ${srcdir-.}; grep '^ *# *define __' $gtk_all_c_sources; } | sed 's/.*define //;s/ *$//' | sort > actual-files | ||
| 28 | +{ for f in $gtk_all_c_sources; do if test -f ${f}; then grep '^ *# *define __' ${f}; else grep '^ *# *define __' "${srcdir-.}"/${f}; fi; done } | sed 's/.*define //;s/ *$//' | sort > actual-files | ||
| 29 | |||
| 30 | diff expected-files actual-files && rm -f expected-files actual-files | ||
| 31 | -- | ||
| 32 | 1.9.3 | ||
| 33 | |||
diff --git a/x11-libs/gtk+/files/gtk+-2.24.31-update-icon-cache.patch b/x11-libs/gtk+/files/gtk+-2.24.31-update-icon-cache.patch new file mode 100644 index 0000000..11dbb5e --- /dev/null +++ b/x11-libs/gtk+/files/gtk+-2.24.31-update-icon-cache.patch | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | From 260f94f3914ba18a256e6f1c222f643a57854e80 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gilles Dartiguelongue <eva@gentoo.org> | ||
| 3 | Date: Sat, 9 May 2015 23:30:58 +0200 | ||
| 4 | Subject: [PATCH] Always use external gtk-update-icon-cache | ||
| 5 | |||
| 6 | --- | ||
| 7 | configure.ac | 8 +++----- | ||
| 8 | docs/reference/gtk/Makefile.am | 2 +- | ||
| 9 | gtk/Makefile.am | 13 ++----------- | ||
| 10 | 3 files changed, 6 insertions(+), 17 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/configure.ac b/configure.ac | ||
| 13 | index 4e11b40..7ef8cb6 100644 | ||
| 14 | --- a/configure.ac | ||
| 15 | +++ b/configure.ac | ||
| 16 | @@ -913,11 +913,9 @@ dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling | ||
| 17 | |||
| 18 | AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) | ||
| 19 | |||
| 20 | -if test $cross_compiling = yes; then | ||
| 21 | - AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no) | ||
| 22 | - if test x$GTK_UPDATE_ICON_CACHE = xno; then | ||
| 23 | - REBUILD_PNGS=# | ||
| 24 | - fi | ||
| 25 | +AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no) | ||
| 26 | +if test x$GTK_UPDATE_ICON_CACHE = xno; then | ||
| 27 | + REBUILD_PNGS=# | ||
| 28 | fi | ||
| 29 | |||
| 30 | AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no) | ||
| 31 | diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am | ||
| 32 | index c239445..60b5265 100644 | ||
| 33 | --- a/docs/reference/gtk/Makefile.am | ||
| 34 | +++ b/docs/reference/gtk/Makefile.am | ||
| 35 | @@ -368,7 +368,7 @@ EXTRA_DIST += version.xml.in | ||
| 36 | |||
| 37 | if ENABLE_MAN | ||
| 38 | |||
| 39 | -man_MANS = gtk-query-immodules-2.0.1 gtk-update-icon-cache.1 gtk-builder-convert.1 | ||
| 40 | +man_MANS = gtk-query-immodules-2.0.1 gtk-builder-convert.1 | ||
| 41 | |||
| 42 | %.1 : %.xml | ||
| 43 | @XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | ||
| 44 | diff --git a/gtk/Makefile.am b/gtk/Makefile.am | ||
| 45 | index 8cc4536..a7afbf3 100644 | ||
| 46 | --- a/gtk/Makefile.am | ||
| 47 | +++ b/gtk/Makefile.am | ||
| 48 | @@ -1087,8 +1087,7 @@ endif | ||
| 49 | # Installed tools | ||
| 50 | # | ||
| 51 | bin_PROGRAMS = \ | ||
| 52 | - gtk-query-immodules-2.0 \ | ||
| 53 | - gtk-update-icon-cache | ||
| 54 | + gtk-query-immodules-2.0 | ||
| 55 | |||
| 56 | bin_SCRIPTS = gtk-builder-convert | ||
| 57 | |||
| 58 | @@ -1438,16 +1437,8 @@ stamp-icons: $(STOCK_ICONS) | ||
| 59 | ) done \ | ||
| 60 | && touch stamp-icons | ||
| 61 | |||
| 62 | -if CROSS_COMPILING | ||
| 63 | -gtk_update_icon_cache_program = $(GTK_UPDATE_ICON_CACHE) | ||
| 64 | -else | ||
| 65 | -gtk_update_icon_cache_program = \ | ||
| 66 | - ./gtk-update-icon-cache | ||
| 67 | -endif | ||
| 68 | - | ||
| 69 | gtkbuiltincache.h: @REBUILD@ stamp-icons | ||
| 70 | - $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) | ||
| 71 | - $(gtk_update_icon_cache_program) --force --ignore-theme-index \ | ||
| 72 | + $(GTK_UPDATE_ICON_CACHE) --force --ignore-theme-index \ | ||
| 73 | --include-image-data \ | ||
| 74 | --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \ | ||
| 75 | mv gtkbuiltincache.h.tmp gtkbuiltincache.h | ||
| 76 | -- | ||
| 77 | 2.10.0 | ||
| 78 | |||
diff --git a/x11-libs/gtk+/files/gtk+-2.24.33-Fix-casts.patch b/x11-libs/gtk+/files/gtk+-2.24.33-Fix-casts.patch new file mode 100644 index 0000000..4ee55d2 --- /dev/null +++ b/x11-libs/gtk+/files/gtk+-2.24.33-Fix-casts.patch | |||
| @@ -0,0 +1,167 @@ | |||
| 1 | https://bugs.gentoo.org/880617 | ||
| 2 | |||
| 3 | From 81c42586e6d9db7434e9b3f657fbd238294dd9d9 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: Matt Turner <mattst88@gentoo.org> | ||
| 5 | Date: Sat, 13 May 2023 11:35:28 -0400 | ||
| 6 | Subject: [PATCH] Fix casts | ||
| 7 | |||
| 8 | --- | ||
| 9 | gtk/gtkcellrendererspin.c | 2 +- | ||
| 10 | gtk/gtkcomboboxtext.c | 2 +- | ||
| 11 | gtk/gtkimmodule.c | 2 +- | ||
| 12 | gtk/gtklabel.c | 2 +- | ||
| 13 | gtk/gtkscale.c | 2 +- | ||
| 14 | gtk/gtktoolpalette.c | 2 +- | ||
| 15 | gtk/gtktreeview.c | 2 +- | ||
| 16 | gtk/gtkuimanager.c | 2 +- | ||
| 17 | gtk/gtkwidget.c | 2 +- | ||
| 18 | modules/other/gail/gailtreeview.c | 2 +- | ||
| 19 | modules/printbackends/cups/gtkprintbackendcups.c | 2 +- | ||
| 20 | 11 files changed, 11 insertions(+), 11 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/gtk/gtkcellrendererspin.c b/gtk/gtkcellrendererspin.c | ||
| 23 | index 2a3961bf20..68e5b9aaae 100644 | ||
| 24 | --- a/gtk/gtkcellrendererspin.c | ||
| 25 | +++ b/gtk/gtkcellrendererspin.c | ||
| 26 | @@ -207,7 +207,7 @@ gtk_cell_renderer_spin_set_property (GObject *object, | ||
| 27 | } | ||
| 28 | |||
| 29 | if (obj) | ||
| 30 | - priv->adjustment = g_object_ref_sink (obj); | ||
| 31 | + priv->adjustment = GTK_ADJUSTMENT (g_object_ref_sink (obj)); | ||
| 32 | break; | ||
| 33 | case PROP_CLIMB_RATE: | ||
| 34 | priv->climb_rate = g_value_get_double (value); | ||
| 35 | diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c | ||
| 36 | index 9ffba68766..42c51abebc 100644 | ||
| 37 | --- a/gtk/gtkcomboboxtext.c | ||
| 38 | +++ b/gtk/gtkcomboboxtext.c | ||
| 39 | @@ -275,7 +275,7 @@ gtk_combo_box_text_buildable_custom_tag_start (GtkBuildable *buildable, | ||
| 40 | |||
| 41 | parser_data = g_slice_new0 (ItemParserData); | ||
| 42 | parser_data->builder = g_object_ref (builder); | ||
| 43 | - parser_data->object = g_object_ref (buildable); | ||
| 44 | + parser_data->object = G_OBJECT (g_object_ref (buildable)); | ||
| 45 | parser_data->domain = gtk_builder_get_translation_domain (builder); | ||
| 46 | *parser = item_parser; | ||
| 47 | *data = parser_data; | ||
| 48 | diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c | ||
| 49 | index 1fcb17a7d8..445b2be87f 100644 | ||
| 50 | --- a/gtk/gtkimmodule.c | ||
| 51 | +++ b/gtk/gtkimmodule.c | ||
| 52 | @@ -662,7 +662,7 @@ lookup_immodule (gchar **immodules_list) | ||
| 53 | gboolean found; | ||
| 54 | gchar *context_id; | ||
| 55 | found = g_hash_table_lookup_extended (contexts_hash, *immodules_list, | ||
| 56 | - &context_id, NULL); | ||
| 57 | + (gpointer *) &context_id, NULL); | ||
| 58 | if (found) | ||
| 59 | return context_id; | ||
| 60 | } | ||
| 61 | diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c | ||
| 62 | index c47de5924f..cf68685536 100644 | ||
| 63 | --- a/gtk/gtklabel.c | ||
| 64 | +++ b/gtk/gtklabel.c | ||
| 65 | @@ -1336,7 +1336,7 @@ gtk_label_buildable_custom_tag_start (GtkBuildable *buildable, | ||
| 66 | |||
| 67 | parser_data = g_slice_new0 (PangoParserData); | ||
| 68 | parser_data->builder = g_object_ref (builder); | ||
| 69 | - parser_data->object = g_object_ref (buildable); | ||
| 70 | + parser_data->object = G_OBJECT (g_object_ref (buildable)); | ||
| 71 | *parser = pango_parser; | ||
| 72 | *data = parser_data; | ||
| 73 | return TRUE; | ||
| 74 | diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c | ||
| 75 | index 4317523fb8..a573b2f6ba 100644 | ||
| 76 | --- a/gtk/gtkscale.c | ||
| 77 | +++ b/gtk/gtkscale.c | ||
| 78 | @@ -1471,7 +1471,7 @@ gtk_scale_add_mark (GtkScale *scale, | ||
| 79 | mark->position = position; | ||
| 80 | |||
| 81 | priv->marks = g_slist_insert_sorted_with_data (priv->marks, mark, | ||
| 82 | - (GCompareFunc) compare_marks, | ||
| 83 | + compare_marks, | ||
| 84 | GINT_TO_POINTER ( | ||
| 85 | gtk_range_get_inverted (GTK_RANGE (scale)) | ||
| 86 | )); | ||
| 87 | diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c | ||
| 88 | index b984193ca3..f64b552fb0 100644 | ||
| 89 | --- a/gtk/gtktoolpalette.c | ||
| 90 | +++ b/gtk/gtktoolpalette.c | ||
| 91 | @@ -734,7 +734,7 @@ gtk_tool_palette_add (GtkContainer *container, | ||
| 92 | |||
| 93 | g_ptr_array_add (palette->priv->groups, info); | ||
| 94 | info->pos = palette->priv->groups->len - 1; | ||
| 95 | - info->widget = g_object_ref_sink (child); | ||
| 96 | + info->widget = (GtkToolItemGroup *) g_object_ref_sink (child); | ||
| 97 | |||
| 98 | gtk_widget_set_parent (child, GTK_WIDGET (palette)); | ||
| 99 | } | ||
| 100 | diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c | ||
| 101 | index 89301eb91d..0d2d15b488 100644 | ||
| 102 | --- a/gtk/gtktreeview.c | ||
| 103 | +++ b/gtk/gtktreeview.c | ||
| 104 | @@ -14147,7 +14147,7 @@ gtk_tree_view_set_search_entry (GtkTreeView *tree_view, | ||
| 105 | |||
| 106 | if (entry) | ||
| 107 | { | ||
| 108 | - tree_view->priv->search_entry = g_object_ref (entry); | ||
| 109 | + tree_view->priv->search_entry = GTK_WIDGET (g_object_ref (entry)); | ||
| 110 | tree_view->priv->search_custom_entry_set = TRUE; | ||
| 111 | |||
| 112 | if (tree_view->priv->search_entry_changed_id == 0) | ||
| 113 | diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c | ||
| 114 | index d004cf1ed3..8cbeda9e85 100644 | ||
| 115 | --- a/gtk/gtkuimanager.c | ||
| 116 | +++ b/gtk/gtkuimanager.c | ||
| 117 | @@ -503,7 +503,7 @@ gtk_ui_manager_buildable_construct_child (GtkBuildable *buildable, | ||
| 118 | g_signal_connect (widget, "hierarchy-changed", | ||
| 119 | G_CALLBACK (child_hierarchy_changed_cb), | ||
| 120 | GTK_UI_MANAGER (buildable)); | ||
| 121 | - return g_object_ref (widget); | ||
| 122 | + return G_OBJECT (g_object_ref (widget)); | ||
| 123 | } | ||
| 124 | |||
| 125 | static void | ||
| 126 | diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c | ||
| 127 | index 1d1f6bb60e..a2ae2b430f 100644 | ||
| 128 | --- a/gtk/gtkwidget.c | ||
| 129 | +++ b/gtk/gtkwidget.c | ||
| 130 | @@ -10679,7 +10679,7 @@ gtk_widget_buildable_custom_tag_start (GtkBuildable *buildable, | ||
| 131 | AccelGroupParserData *parser_data; | ||
| 132 | |||
| 133 | parser_data = g_slice_new0 (AccelGroupParserData); | ||
| 134 | - parser_data->object = g_object_ref (buildable); | ||
| 135 | + parser_data->object = G_OBJECT (g_object_ref (buildable)); | ||
| 136 | *parser = accel_group_parser; | ||
| 137 | *data = parser_data; | ||
| 138 | return TRUE; | ||
| 139 | diff --git a/modules/other/gail/gailtreeview.c b/modules/other/gail/gailtreeview.c | ||
| 140 | index 23923c59a1..ac6ff0a1c4 100644 | ||
| 141 | --- a/modules/other/gail/gailtreeview.c | ||
| 142 | +++ b/modules/other/gail/gailtreeview.c | ||
| 143 | @@ -995,7 +995,7 @@ gail_tree_view_ref_child (AtkObject *obj, | ||
| 144 | gail_cell_add_state (cell, ATK_STATE_FOCUSABLE, FALSE); | ||
| 145 | if (focus_index == i) | ||
| 146 | { | ||
| 147 | - gailview->focus_cell = g_object_ref (cell); | ||
| 148 | + gailview->focus_cell = ATK_OBJECT (g_object_ref (cell)); | ||
| 149 | gail_cell_add_state (cell, ATK_STATE_FOCUSED, FALSE); | ||
| 150 | g_signal_emit_by_name (gailview, | ||
| 151 | "active-descendant-changed", | ||
| 152 | diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c | ||
| 153 | index 2a000dc16f..753c53cb89 100644 | ||
| 154 | --- a/modules/printbackends/cups/gtkprintbackendcups.c | ||
| 155 | +++ b/modules/printbackends/cups/gtkprintbackendcups.c | ||
| 156 | @@ -3479,7 +3479,7 @@ cups_request_ppd (GtkPrinter *printer) | ||
| 157 | g_io_channel_set_encoding (data->ppd_io, NULL, NULL); | ||
| 158 | g_io_channel_set_close_on_unref (data->ppd_io, TRUE); | ||
| 159 | |||
| 160 | - data->printer = g_object_ref (printer); | ||
| 161 | + data->printer = GTK_PRINTER_CUPS (g_object_ref (printer)); | ||
| 162 | |||
| 163 | resource = g_strdup_printf ("/printers/%s.ppd", | ||
| 164 | gtk_printer_cups_get_ppd_name (GTK_PRINTER_CUPS (printer))); | ||
| 165 | -- | ||
| 166 | 2.39.3 | ||
| 167 | |||
diff --git a/x11-libs/gtk+/files/gtk+-2.24.33-respect-NM.patch b/x11-libs/gtk+/files/gtk+-2.24.33-respect-NM.patch new file mode 100644 index 0000000..0c74d96 --- /dev/null +++ b/x11-libs/gtk+/files/gtk+-2.24.33-respect-NM.patch | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | https://bugs.gentoo.org/725852 | ||
| 2 | --- a/configure.ac | ||
| 3 | +++ b/configure.ac | ||
| 4 | @@ -190,7 +190,7 @@ m4_ifdef([LT_OUTPUT], [LT_OUTPUT]) | ||
| 5 | AC_SYS_LARGEFILE | ||
| 6 | |||
| 7 | AM_PROG_AS | ||
| 8 | -AC_PATH_TOOL(NM, nm, nm) | ||
| 9 | +AC_CHECK_TOOL(NM, nm, nm) | ||
| 10 | |||
| 11 | dnl Initialize maintainer mode | ||
| 12 | AM_MAINTAINER_MODE([enable]) | ||
diff --git a/x11-libs/gtk+/gtk+-2.24.33-r4.ebuild b/x11-libs/gtk+/gtk+-2.24.33-r4.ebuild new file mode 100644 index 0000000..e5d431f --- /dev/null +++ b/x11-libs/gtk+/gtk+-2.24.33-r4.ebuild | |||
| @@ -0,0 +1,307 @@ | |||
| 1 | # Copyright 1999-2024 Gentoo Authors | ||
| 2 | # Distributed under the terms of the GNU General Public License v2 | ||
| 3 | |||
| 4 | EAPI=8 | ||
| 5 | GNOME2_EAUTORECONF="yes" | ||
| 6 | |||
| 7 | inherit flag-o-matic gnome2 multilib multilib-minimal readme.gentoo-r1 virtualx | ||
| 8 | |||
| 9 | DESCRIPTION="Gimp ToolKit +" | ||
| 10 | HOMEPAGE="https://www.gtk.org/" | ||
| 11 | |||
| 12 | LICENSE="LGPL-2+" | ||
| 13 | SLOT="2" | ||
| 14 | IUSE="aqua cups examples +introspection test vim-syntax xinerama" | ||
| 15 | REQUIRED_USE=" | ||
| 16 | xinerama? ( !aqua ) | ||
| 17 | " | ||
| 18 | |||
| 19 | KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" | ||
| 20 | |||
| 21 | # Upstream wants us to do their job: | ||
| 22 | # https://bugzilla.gnome.org/show_bug.cgi?id=768663#c1 | ||
| 23 | RESTRICT="test" | ||
| 24 | |||
| 25 | # >=app-accessibility/at-spi2-core-2.46.0[introspection?,${MULTILIB_USEDEP}] | ||
| 26 | COMMON_DEPEND=" | ||
| 27 | >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] | ||
| 28 | >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] | ||
| 29 | virtual/libintl[${MULTILIB_USEDEP}] | ||
| 30 | >=x11-libs/cairo-1.12.14-r4:=[aqua?,svg(+),${MULTILIB_USEDEP}] | ||
| 31 | >=x11-libs/gdk-pixbuf-2.30.7:2[introspection?,${MULTILIB_USEDEP}] | ||
| 32 | >=x11-libs/pango-1.36.3[introspection?,${MULTILIB_USEDEP}] | ||
| 33 | x11-misc/shared-mime-info | ||
| 34 | |||
| 35 | cups? ( >=net-print/cups-1.7.1-r2:=[${MULTILIB_USEDEP}] ) | ||
| 36 | introspection? ( >=dev-libs/gobject-introspection-0.9.3:= ) | ||
| 37 | !aqua? ( | ||
| 38 | >=x11-libs/cairo-1.12.14-r4:=[aqua?,svg(+),X,${MULTILIB_USEDEP}] | ||
| 39 | >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] | ||
| 40 | >=x11-libs/libXcomposite-0.4.4-r1[${MULTILIB_USEDEP}] | ||
| 41 | >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}] | ||
| 42 | >=x11-libs/libXdamage-1.1.4-r1[${MULTILIB_USEDEP}] | ||
| 43 | >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] | ||
| 44 | >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] | ||
| 45 | >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}] | ||
| 46 | >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}] | ||
| 47 | >=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}] | ||
| 48 | xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] ) | ||
| 49 | ) | ||
| 50 | " | ||
| 51 | DEPEND="${COMMON_DEPEND} | ||
| 52 | !aqua? ( x11-base/xorg-proto ) | ||
| 53 | test? ( | ||
| 54 | media-fonts/font-cursor-misc | ||
| 55 | media-fonts/font-misc-misc | ||
| 56 | x11-themes/hicolor-icon-theme | ||
| 57 | ) | ||
| 58 | " | ||
| 59 | |||
| 60 | # >=dev-util/gtk-update-icon-cache-2 | ||
| 61 | # >=x11-themes/adwaita-icon-theme-3.14 | ||
| 62 | # x11-themes/gnome-themes-standard | ||
| 63 | RDEPEND="${COMMON_DEPEND}" | ||
| 64 | # librsvg for svg icons (PDEPEND to avoid circular dep), bug #547710 | ||
| 65 | # x11-themes/gtk-engines-adwaita | ||
| 66 | PDEPEND=" | ||
| 67 | gnome-base/librsvg[${MULTILIB_USEDEP}] | ||
| 68 | vim-syntax? ( app-vim/gtk-syntax ) | ||
| 69 | " | ||
| 70 | # docbook-4.1.2 and xsl required for man pages | ||
| 71 | # docbook-4.3 required for gtk-doc | ||
| 72 | # app-text/docbook-xml-dtd:4.1.2 | ||
| 73 | # app-text/docbook-xml-dtd:4.3 | ||
| 74 | # app-text/docbook-xsl-stylesheets | ||
| 75 | # dev-libs/gobject-introspection-common | ||
| 76 | # dev-libs/libxslt | ||
| 77 | # >=dev-build/gtk-doc-am-1.20 | ||
| 78 | BDEPEND=" | ||
| 79 | dev-util/glib-utils | ||
| 80 | >=sys-devel/gettext-0.18.3 | ||
| 81 | virtual/pkgconfig | ||
| 82 | examples? ( x11-libs/gdk-pixbuf ) | ||
| 83 | " | ||
| 84 | |||
| 85 | DISABLE_AUTOFORMATTING="yes" | ||
| 86 | DOC_CONTENTS="To make the gtk2 file chooser use 'current directory' mode by default, | ||
| 87 | edit ~/.config/gtk-2.0/gtkfilechooser.ini to contain the following: | ||
| 88 | [Filechooser Settings] | ||
| 89 | StartupMode=cwd" | ||
| 90 | |||
| 91 | MULTILIB_CHOST_TOOLS=( | ||
| 92 | /usr/bin/gtk-query-immodules-2.0$(get_exeext) | ||
| 93 | ) | ||
| 94 | |||
| 95 | PATCHES=( | ||
| 96 | # Fix tests running when building out of sources, bug #510596, upstream bug #730319 | ||
| 97 | "${FILESDIR}"/${PN}-2.24.24-out-of-source.patch | ||
| 98 | # Rely on split gtk-update-icon-cache package, bug #528810 | ||
| 99 | "${FILESDIR}"/${PN}-2.24.31-update-icon-cache.patch # requires eautoreconf | ||
| 100 | # Respect ${NM}, bug #725852 | ||
| 101 | "${FILESDIR}"/${PN}-2.24.33-respect-NM.patch # requires eautoreconf | ||
| 102 | # Fix casts, bug #880617 | ||
| 103 | "${FILESDIR}"/${PN}-2.24.33-Fix-casts.patch | ||
| 104 | ) | ||
| 105 | |||
| 106 | strip_builddir() { | ||
| 107 | local rule=$1 | ||
| 108 | shift | ||
| 109 | local directory=$1 | ||
| 110 | shift | ||
| 111 | sed -e "s/^\(${rule} =.*\)${directory}\(.*\)$/\1\2/" -i $@ \ | ||
| 112 | || die "Could not strip director ${directory} from build." | ||
| 113 | } | ||
| 114 | |||
| 115 | set_gtk2_confdir() { | ||
| 116 | # An arch specific config directory is used on multilib systems | ||
| 117 | GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}" | ||
| 118 | } | ||
| 119 | |||
| 120 | src_prepare() { | ||
| 121 | # Various glib marshaller churn could break build against a different glib version, force regeneration | ||
| 122 | rm -v gdk/gdkmarshalers.{c,h} gtk/gtkmarshal.{c,h} gtk/gtkmarshalers.{c,h} \ | ||
| 123 | perf/marshalers.{c,h} gtk/gtkaliasdef.c gtk/gtkalias.h || die | ||
| 124 | |||
| 125 | # Stop trying to build unmaintained docs, bug #349754, upstream bug #623150 | ||
| 126 | strip_builddir SUBDIRS tutorial docs/Makefile.{am,in} | ||
| 127 | strip_builddir SUBDIRS faq docs/Makefile.{am,in} | ||
| 128 | |||
| 129 | # -O3 and company cause random crashes in applications, bug #133469 | ||
| 130 | replace-flags -O3 -O2 | ||
| 131 | strip-flags | ||
| 132 | # Not compatible with C23 decls | ||
| 133 | append-flags -std=gnu17 | ||
| 134 | |||
| 135 | if ! use test ; then | ||
| 136 | # don't waste time building tests | ||
| 137 | strip_builddir SRC_SUBDIRS tests Makefile.{am,in} | ||
| 138 | strip_builddir SUBDIRS tests gdk/Makefile.{am,in} gtk/Makefile.{am,in} | ||
| 139 | else | ||
| 140 | # Non-working test in gentoo's env | ||
| 141 | sed 's:\(g_test_add_func ("/ui-tests/keys-events.*\):/*\1*/:g' \ | ||
| 142 | -i gtk/tests/testing.c || die "sed 1 failed" | ||
| 143 | |||
| 144 | # Cannot work because glib is too clever to find real user's home | ||
| 145 | # gentoo bug #285687, upstream bug #639832 | ||
| 146 | # XXX: /!\ Pay extra attention to second sed when bumping /!\ | ||
| 147 | sed '/TEST_PROGS.*recentmanager/d' -i gtk/tests/Makefile.am \ | ||
| 148 | || die "failed to disable recentmanager test (1)" | ||
| 149 | sed '/^TEST_PROGS =/,+3 s/recentmanager//' -i gtk/tests/Makefile.in \ | ||
| 150 | || die "failed to disable recentmanager test (2)" | ||
| 151 | sed 's:\({ "GtkFileChooserButton".*},\):/*\1*/:g' -i gtk/tests/object.c \ | ||
| 152 | || die "failed to disable recentmanager test (3)" | ||
| 153 | |||
| 154 | # https://bugzilla.gnome.org/show_bug.cgi?id=617473 | ||
| 155 | sed -i -e 's:pltcheck.sh:$(NULL):g' \ | ||
| 156 | gtk/Makefile.am || die | ||
| 157 | |||
| 158 | # UI tests require immodules already installed; bug #413185 | ||
| 159 | if ! has_version 'x11-libs/gtk+:2'; then | ||
| 160 | ewarn "Disabling UI tests because this is the first install of" | ||
| 161 | ewarn "gtk+:2 on this machine. Please re-run the tests after ${P}" | ||
| 162 | ewarn "has been installed." | ||
| 163 | sed '/g_test_add_func.*ui-tests/ d' \ | ||
| 164 | -i gtk/tests/testing.c || die "sed 2 failed" | ||
| 165 | fi | ||
| 166 | fi | ||
| 167 | |||
| 168 | if ! use examples; then | ||
| 169 | # don't waste time building demos | ||
| 170 | strip_builddir SRC_SUBDIRS demos Makefile.{am,in} | ||
| 171 | fi | ||
| 172 | |||
| 173 | gnome2_src_prepare | ||
| 174 | } | ||
| 175 | |||
| 176 | multilib_src_configure() { | ||
| 177 | [[ ${ABI} == ppc64 ]] && append-flags -mminimal-toc | ||
| 178 | |||
| 179 | ECONF_SOURCE=${S} \ | ||
| 180 | gnome2_src_configure \ | ||
| 181 | $(usex aqua --with-gdktarget=quartz --with-gdktarget=x11) \ | ||
| 182 | $(usex aqua "" --with-xinput) \ | ||
| 183 | $(use_enable cups cups auto) \ | ||
| 184 | $(multilib_native_use_enable introspection) \ | ||
| 185 | $(use_enable xinerama) \ | ||
| 186 | --disable-papi \ | ||
| 187 | --enable-man \ | ||
| 188 | --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \ | ||
| 189 | CUPS_CONFIG="${EPREFIX}/usr/bin/${CHOST}-cups-config" | ||
| 190 | |||
| 191 | # work-around gtk-doc out-of-source brokedness | ||
| 192 | if multilib_is_native_abi; then | ||
| 193 | local d | ||
| 194 | for d in gdk gtk libgail-util; do | ||
| 195 | ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die | ||
| 196 | done | ||
| 197 | fi | ||
| 198 | } | ||
| 199 | |||
| 200 | multilib_src_test() { | ||
| 201 | virtx emake check | ||
| 202 | } | ||
| 203 | |||
| 204 | multilib_src_install() { | ||
| 205 | gnome2_src_install | ||
| 206 | } | ||
| 207 | |||
| 208 | multilib_src_install_all() { | ||
| 209 | # see bug #133241 | ||
| 210 | # Also set more default variables in sync with gtk3 and other distributions | ||
| 211 | insinto /usr/share/gtk-2.0 | ||
| 212 | newins - gtkrc <<- 'EOF' | ||
| 213 | gtk-fallback-icon-theme = "gnome" | ||
| 214 | gtk-theme-name = "Adwaita" | ||
| 215 | gtk-icon-theme-name = "Adwaita" | ||
| 216 | gtk-cursor-theme-name = "Adwaita" | ||
| 217 | EOF | ||
| 218 | |||
| 219 | einstalldocs | ||
| 220 | rm "${ED}"/usr/share/doc/${P}/ChangeLog # empty file | ||
| 221 | |||
| 222 | # dev-util/gtk-builder-convert split off into a separate package, #402905 | ||
| 223 | rm "${ED}"/usr/bin/gtk-builder-convert || die | ||
| 224 | rm "${ED}"/usr/share/man/man1/gtk-builder-convert.* || die | ||
| 225 | |||
| 226 | readme.gentoo_create_doc | ||
| 227 | } | ||
| 228 | |||
| 229 | pkg_preinst() { | ||
| 230 | gnome2_pkg_preinst | ||
| 231 | |||
| 232 | multilib_pkg_preinst() { | ||
| 233 | # Make immodules.cache belongs to gtk+ alone | ||
| 234 | local cache="/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" | ||
| 235 | |||
| 236 | if [[ -e "${EROOT}${cache}" ]]; then | ||
| 237 | cp "${EROOT}${cache}" "${ED}${cache}" || die | ||
| 238 | else | ||
| 239 | touch "${ED}${cache}" || die | ||
| 240 | fi | ||
| 241 | } | ||
| 242 | multilib_parallel_foreach_abi multilib_pkg_preinst | ||
| 243 | } | ||
| 244 | |||
| 245 | pkg_postinst() { | ||
| 246 | gnome2_pkg_postinst | ||
| 247 | |||
| 248 | multilib_pkg_postinst() { | ||
| 249 | gnome2_query_immodules_gtk2 \ | ||
| 250 | || die "Update immodules cache failed (for ${ABI})" | ||
| 251 | } | ||
| 252 | multilib_parallel_foreach_abi multilib_pkg_postinst | ||
| 253 | |||
| 254 | set_gtk2_confdir | ||
| 255 | |||
| 256 | if [[ -e "${EROOT}/etc/gtk-2.0/gtk.immodules" ]]; then | ||
| 257 | elog "File /etc/gtk-2.0/gtk.immodules has been moved to \$CHOST" | ||
| 258 | elog "aware location. Removing deprecated file." | ||
| 259 | rm -f "${EROOT}/etc/gtk-2.0/gtk.immodules" | ||
| 260 | fi | ||
| 261 | |||
| 262 | if [[ -e "${EROOT}${GTK2_CONFDIR}/gtk.immodules" ]]; then | ||
| 263 | elog "File /etc/gtk-2.0/gtk.immodules has been moved to" | ||
| 264 | elog "${EROOT}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" | ||
| 265 | elog "Removing deprecated file." | ||
| 266 | rm -f "${EROOT}${GTK2_CONFDIR}/gtk.immodules" | ||
| 267 | fi | ||
| 268 | |||
| 269 | # pixbufs are now handled by x11-libs/gdk-pixbuf | ||
| 270 | if [[ -e "${EROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders" ]]; then | ||
| 271 | elog "File ${EROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders is now handled by x11-libs/gdk-pixbuf" | ||
| 272 | elog "Removing deprecated file." | ||
| 273 | rm -f "${EROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders" | ||
| 274 | fi | ||
| 275 | |||
| 276 | # two checks needed since we dropped multilib conditional | ||
| 277 | if [[ -e "${EROOT}/etc/gtk-2.0/gdk-pixbuf.loaders" ]]; then | ||
| 278 | elog "File ${EROOT}/etc/gtk-2.0/gdk-pixbuf.loaders is now handled by x11-libs/gdk-pixbuf" | ||
| 279 | elog "Removing deprecated file." | ||
| 280 | rm -f "${EROOT}/etc/gtk-2.0/gdk-pixbuf.loaders" | ||
| 281 | fi | ||
| 282 | |||
| 283 | if [[ -e "${EROOT}"/usr/lib/gtk-2.0/2.[^1]* ]]; then | ||
| 284 | elog "You need to rebuild ebuilds that installed into" "${EROOT}"/usr/lib/gtk-2.0/2.[^1]* | ||
| 285 | elog "to do that you can use qfile from portage-utils:" | ||
| 286 | elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.[^1]*)" | ||
| 287 | fi | ||
| 288 | |||
| 289 | if ! has_version "app-text/evince"; then | ||
| 290 | elog "Please install app-text/evince for print preview functionality." | ||
| 291 | elog "Alternatively, check \"gtk-print-preview-command\" documentation and" | ||
| 292 | elog "add it to your gtkrc." | ||
| 293 | fi | ||
| 294 | |||
| 295 | readme.gentoo_print_elog | ||
| 296 | } | ||
| 297 | |||
| 298 | pkg_postrm() { | ||
| 299 | gnome2_pkg_postrm | ||
| 300 | |||
| 301 | if [[ -z ${REPLACED_BY_VERSION} ]]; then | ||
| 302 | multilib_pkg_postrm() { | ||
| 303 | rm -f "${EROOT}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" | ||
| 304 | } | ||
| 305 | multilib_foreach_abi multilib_pkg_postrm | ||
| 306 | fi | ||
| 307 | } | ||
