initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

96
gtk/PKGBUILD Normal file
View File

@@ -0,0 +1,96 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
_pkgbase=gtk+
pkgbase=gtk
pkgname=(gtk gtk-update-icon-cache)
pkgver=3.24.24
_debver=$pkgver
_debrel=4
pkgrel=6
pkgdesc="GObject-based multi-platform GUI toolkit"
arch=('i686' 'x86_64')
license=('LGPL-2')
url='https://www.gtk.org/'
depends=('atk' 'cairo' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libepoxy' 'gdk-pixbuf2'
'libxcomposite' 'libxdamage' 'pango' 'shared-mime-info' 'libxkbcommon'
'arc-icon-theme' 'xcursor-premium' 'json-glib' 'librsvg-legacy'
'desktop-file-utils' 'mesa' 'cantarell-fonts' 'libcups' 'fribidi' 'iso-codes')
makedepends=('gobject-introspection' 'sassc' 'meson' 'docbook-xsl' 'quilt')
source=("https://download.gnome.org/sources/$_pkgbase/${pkgver:0:4}/${_pkgbase}-${pkgver}.tar.xz"
"https://deb.debian.org/debian/pool/main/g/gtk+3.0/gtk+3.0_${_debver}-${_debrel}+deb11u4.debian.tar.xz"
"settings.ini"
"gtk-query-immodules-3.0.hook"
"gtk-update-icon-cache.hook"
"gtk-update-icon-cache.script"
"optionalize-at-spi2-atk-dependency.patch")
sha512sums=('f4e22d7c78d7c641ac7c3beeb3181000b72b025c65074bab6bd51b9a86ec4f6a2e25f06ad7671a908be421c064f4c26e2185febb424f310a2530561aebde8520'
'35c7e94ff0e7951aae09c2f27a5e562428cb41477bfe6334efb135eecd1ed58797c46e65510955a51f4850b438cbd8e9769007a19e806d6bd9206abcf0df8fe2'
'1070d7f42cee3517f356ef57d0b1e1d8ca0af00ac8e86ca35a7109e5d0d8845d2f04e3ec81453e00aa4a4b0e9915d010bf7d9014ec44ef9bebe362c4e497704d'
'f0ffd95544863f2e10fda81488b4727aa9a8a35a7d39fb96872db6664d03442db2b58af788b5990825c7b3a83681f7220ca481409cca5421dfb39b9a3bbac9ac'
'abfd73de4faa6f53784182800395aa3c39bb98e15a0eb300fb4142073ff7ce565a0836a2363393b2f132060b5293dbc0c30c380a023f38d5bd39c62cb58389c2'
'5cd50d93bb6bc203438a2a0764bd717409658e124058b18a1da26a21f10ef7564a16f32fc0633a68b45b2e303fa63a5efefeadd6b0bf1d7f474556df8cdb6c58'
'9a1dccd0764fafa2a29edd317301b46eb1771d2e4b02c7b259ce6129944284ba30209dff8dd842b6be0d08f3af322cec49d3b821c3eaa96c15684b41e32a6a6c')
prepare() {
cd $_pkgbase-$pkgver
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
fi
# optionalize at-spi2-atk dependency
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194460
# https://svnweb.freebsd.org/ports?view=revision&revision=538187
patch -p1 -i $srcdir/optionalize-at-spi2-atk-dependency.patch
}
build() {
CFLAGS+=" -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"
hyperbola-meson $_pkgbase-$pkgver build \
-D wayland_backend=false \
-D broadway_backend=true \
-D colord=no \
-D gtk_doc=false \
-D man=true \
-D tests=false \
-D atk-bridge=false
ninja -C build
}
package_gtk() {
depends+=(gtk-update-icon-cache)
replaces=('gtk3')
conflicts=('gtk3')
provides=('gtk3')
install=gtk.install
DESTDIR="$pkgdir" meson install -C build
install -Dm644 settings.ini "$pkgdir/usr/share/gtk-3.0/settings.ini"
install -Dm644 gtk-query-immodules-3.0.hook "$pkgdir/usr/share/libalpm/hooks/gtk-query-immodules-3.0.hook"
# split this out to use with gtk2 too
mv "$pkgdir/usr/bin/gtk-update-icon-cache" "$srcdir"
install -Dm644 $_pkgbase-$pkgver/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
package_gtk-update-icon-cache() {
pkgdesc="GTK+ icon cache updater"
depends=(gdk-pixbuf2 librsvg-legacy hicolor-icon-theme)
cd $_pkgbase-$pkgver
install -D ../gtk-update-icon-cache "$pkgdir/usr/bin/gtk-update-icon-cache"
install -Dm644 ../gtk-update-icon-cache.hook "$pkgdir/usr/share/libalpm/hooks/gtk-update-icon-cache.hook"
install -D ../gtk-update-icon-cache.script "$pkgdir/usr/share/libalpm/scripts/gtk-update-icon-cache"
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

View File

@@ -0,0 +1,11 @@
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/gtk-3.0/3.0.0/immodules/*.so
[Action]
Description = Probing GTK3 input method modules...
When = PostTransaction
Exec = /usr/bin/gtk-query-immodules-3.0 --update-cache

View File

@@ -0,0 +1,13 @@
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/share/icons/*/
Target = !usr/share/icons/*/?*
[Action]
Description = Updating icon theme caches...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/gtk-update-icon-cache
NeedsTargets

View File

@@ -0,0 +1,10 @@
#!/bin/bash
while read -r f; do
if [[ -e ${f}index.theme ]]; then
gtk-update-icon-cache -q "$f"
elif [[ -d $f ]]; then
rm -f "${f}icon-theme.cache"
rmdir --ignore-fail-on-non-empty "$f"
fi
done

3
gtk/gtk.install Normal file
View File

@@ -0,0 +1,3 @@
pre_remove() {
rm -f /usr/lib/gtk-3.0/3.0.0/immodules.cache
}

View File

@@ -0,0 +1,130 @@
diff --git a/config.h.in b/config.h.in
index d78b226..ac46f89 100644
--- a/config.h.in
+++ b/config.h.in
@@ -10,6 +10,9 @@
/* Disable deprecation warnings from glib */
#undef GLIB_DISABLE_DEPRECATION_WARNINGS
+/* Define to use atk-bridge-2.0 */
+#undef HAVE_ATK_BRIDGE
+
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET
diff --git a/config.h.meson b/config.h.meson
index 2af5547..fa08c23 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -11,6 +11,9 @@
/* Disable deprecation warnings from glib */
#mesondefine GLIB_DISABLE_DEPRECATION_WARNINGS
+/* Define to use atk-bridge-2.0 */
+#mesondefine HAVE_ATK_BRIDGE
+
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#mesondefine HAVE_BIND_TEXTDOMAIN_CODESET
diff --git a/configure b/configure
index 34d3410..92289a3 100755
--- a/configure
+++ b/configure
@@ -1064,6 +1064,7 @@ enable_glibtest
enable_modules
with_included_immodules
with_x
+with_atk_bridge
enable_win32_gles
enable_cups
enable_papi
@@ -1844,6 +1845,7 @@ Optional Packages:
--with-included-immodules=MODULE1,MODULE2,...
build the specified input methods into gtk
--with-x use the X Window System
+ --without-atk-bridge Do not use AT-SPI ATK bridge
--with-html-dir=PATH path to installed docs
--with-xml-catalog=CATALOG
path to xml catalog to use
@@ -27048,8 +27050,20 @@ fi
# Check for Accessibility Toolkit flags
########################################
-if test x$enable_x11_backend = xyes; then
+
+# Check whether --with-atk-bridge was given.
+if test "${with_atk_bridge+set}" = set; then :
+ withval=$with_atk_bridge; :
+else
+ with_atk_bridge=$enable_x11_backend
+fi
+
+
+if test x$with_atk_bridge != xno; then
ATK_PACKAGES="atk atk-bridge-2.0"
+
+$as_echo "#define HAVE_ATK_BRIDGE 1" >>confdefs.h
+
else
ATK_PACKAGES="atk"
fi
diff --git a/gtk/a11y/gtkaccessibility.c b/gtk/a11y/gtkaccessibility.c
index 7f0e520..f2ef2eb 100644
--- a/gtk/a11y/gtkaccessibility.c
+++ b/gtk/a11y/gtkaccessibility.c
@@ -37,7 +37,7 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkaccessible.h>
-#ifdef GDK_WINDOWING_X11
+#ifdef HAVE_ATK_BRIDGE
#include <atk-bridge.h>
#endif
@@ -988,7 +988,7 @@ _gtk_accessibility_init (void)
_gtk_accessibility_override_atk_util ();
do_window_event_initialization ();
-#ifdef GDK_WINDOWING_X11
+#ifdef HAVE_ATK_BRIDGE
atk_bridge_adaptor_init (NULL, NULL);
#endif
diff --git a/meson.build b/meson.build
index b2eaa33..ec4bd00 100644
--- a/meson.build
+++ b/meson.build
@@ -576,7 +576,7 @@ if x11_enabled
xfixes_dep = dependency('xfixes', required: false)
xcomposite_dep = dependency('xcomposite', required: false)
fontconfig_dep = dependency('fontconfig', fallback: ['fontconfig', 'fontconfig_dep'])
- atkbridge_dep = dependency('atk-bridge-2.0', version: at_spi2_atk_req)
+ atkbridge_dep = dependency('atk-bridge-2.0', version: at_spi2_atk_req, required: get_option('atk-bridge'))
x11_pkgs = ['fontconfig', 'x11', 'xext', 'xi', 'xrandr']
@@ -593,7 +593,10 @@ if x11_enabled
x11_pkgs += ['xdamage']
endif
- atk_pkgs += ['atk-bridge-2.0']
+ if atkbridge_dep.found()
+ atk_pkgs += ['atk-bridge-2.0']
+ cdata.set('HAVE_ATK_BRIDGE', 1)
+ endif
cdata.set('HAVE_XDAMAGE', xdamage_dep.found() ? 1 : false)
cdata.set('HAVE_XCURSOR', xcursor_dep.found() ? 1 : false)
diff --git a/meson_options.txt b/meson_options.txt
index 4f605b4..a0f5b88 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,6 +11,8 @@ option('quartz_backend', type: 'boolean', value: true,
description : 'Enable the macOS gdk backend (only when building on macOS)')
# Optional dependencies
+option('atk-bridge', type: 'boolean', value: 'true',
+ description : 'Enable AT-SPI ATK bridge support')
option('xinerama', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
description : 'Enable support for the Xinerama extension')
option('cloudproviders', type: 'boolean', value: false,

5
gtk/settings.ini Normal file
View File

@@ -0,0 +1,5 @@
[Settings]
gtk-icon-theme-name = Arc
gtk-theme-name = Raleigh
gtk-font-name = Cantarell 11
gtk-cursor-theme-name = Premium