From 6c8e5412586253c1a21b8719462d6361d1c0dc6c Mon Sep 17 00:00:00 2001 From: Robert Kirkman Date: Sat, 31 Jan 2026 04:03:52 -0600 Subject: [PATCH] tree-wide: GNOME Desktop - Based on https://github.com/termux/termux-packages/pull/28268 Co-authored-by: Chongyun Lee Co-authored-by: Md Arif <111168803+sabamdarif@users.noreply.github.com> Co-authored-by: lfdevs --- packages/libical/build.sh | 27 +- ...fix-marcos.patch => 0007-fix-marcos.patch} | 26 +- ...hmem.patch => 0008-impl-posix-shmem.patch} | 21 +- ...ot-check-time_t-for-system-libevent.patch} | 0 ...tch => 0010-use-UnderrunHandlerNoop.patch} | 0 ...h => 0011-do-not-use-adaptive-mutex.patch} | 0 .../spidermonkey/0012-fix-rust-compile.patch | 47 + .../spidermonkey/0013-fix-rust-compile.patch | 52 - ...et-thread-priority-scheduling-macro.patch} | 0 ...ia-termux.patch => 0014-skia-termux.patch} | 0 ...tch => 0015-protobuf-no-android-log.patch} | 0 ...016-fix-include-dir-for-cpufeatures.patch} | 0 ...fix-sigbus.patch => 0017-fix-sigbus.patch} | 0 packages/spidermonkey/0017-icu-74.patch | 17 - ... => 0018-do-not-call-get-pci-status.patch} | 0 ...fix-missing-include-for-zlib-module.patch} | 0 ...0-configure-no-pack-relative-relocs.patch} | 0 ...f-dlpi_name-is-nullptr-before-using.patch} | 0 ...e-for-macro-MOZ_TRY-in-TimeZone.cpp.patch} | 0 ...24-disable-native-https-dns-resolve.patch} | 9 +- ...25-partially-disable-unified-builds.patch} | 0 packages/spidermonkey/build.sh | 8 +- scripts/setup-termux.sh | 11 +- .../0001-use-pregenerated-iconv-detect.patch | 20 + .../0002-do-not-run-configure-test.patch | 21 + .../0003-decode-scheme-use-script.patch | 20 + .../0004-use-host-tools.patch | 22 + .../0005-do-not-use-db_load.patch | 14 + x11-packages/evolution-data-server/build.sh | 48 + .../google-scheme-decode.py | 14 + .../evolution-data-server/iconv-detect.h | 5 + x11-packages/extension-manager/build.sh | 21 + x11-packages/gjs/0001-cross-build.patch | 41 + x11-packages/gjs/0002-skip-tests.patch | 27 + x11-packages/gjs/build.sh | 31 + x11-packages/gjs/gir/GjsPrivate-1.0.xml | 28 + x11-packages/gnome-autoar/build.sh | 20 + x11-packages/gnome-browser-connector/build.sh | 53 + x11-packages/gnome-console/build.sh | 18 + .../gnome-console/default-shell.patch | 33 + .../gnome-console/no-format-nonliteral.patch | 14 + .../0001-patch-meson-build.patch | 46 + ...e-accounts-power-printers-from-panel.patch | 65 + ...3-remove-color-management-from-panel.patch | 58 + .../gnome-control-center/0004-fix-paths.patch | 70 + ...remove-user-and-secure-shell-section.patch | 177 +++ .../0006-don-t-relay-on-pwquality.patch | 63 + .../0007-disable-polkit.patch | 401 ++++++ .../0008-remove-udev.patch | 182 +++ .../0009-remove-udisk2.patch | 64 + .../0010-fix-locale-issue.patch | 16 + .../0011-remove-remote-desktop.patch | 109 ++ .../0012-gnomevolumecontrol.patch | 13 + .../0013-disable-accountsservice.patch | 123 ++ x11-packages/gnome-control-center/build.sh | 26 + .../gnome-session/0001-no-logind.patch | 149 +++ x11-packages/gnome-session/0002-Werror.patch | 13 + .../0003-force-gnome-settings-daemon-49.patch | 13 + .../0004-manage-system-dbus.patch | 26 + x11-packages/gnome-session/build.sh | 26 + .../0001-no-polkit.patch | 67 + .../gnome-settings-daemon/0002-no-gudev.patch | 65 + x11-packages/gnome-settings-daemon/build.sh | 46 + .../gnome-shell/0001-use-gjs-option.patch | 37 + .../gnome-shell/0002-disable-polkit.patch | 184 +++ .../gnome-shell/0003-tagged-pointer.patch | 44 + .../0004-disable-accountsservice.patch | 202 +++ .../gnome-shell/0005-disable-gdm.patch | 238 ++++ .../gnome-shell/0006-gnomevolumecontrol.patch | 13 + x11-packages/gnome-shell/0007-set-gjs.patch | 11 + .../0008-gnome-session-48-backcompat.patch | 132 ++ .../gnome-shell/0009-disable-brightness.patch | 11 + .../gnome-shell/0101-disable-packagekit.patch | 23 + x11-packages/gnome-shell/build.sh | 31 + x11-packages/gnome-shell/gir/Gvc-1.0.xml | 129 ++ x11-packages/gnome-shell/gir/Shell-16.xml | 216 ++++ x11-packages/gnome-shell/gir/Shell-17.xml | 222 ++++ x11-packages/gnome-shell/gir/Shew-0.xml | 9 + x11-packages/gnome-shell/gir/St-16.xml | 300 +++++ x11-packages/gnome-shell/gir/St-17.xml | 304 +++++ x11-packages/gnome-tweaks/build.sh | 22 + x11-packages/gnome-tweaks/gnome-tweaks.diff | 40 + x11-packages/gnome-tweaks/no-gudev.patch | 34 + x11-packages/gnome/build.sh | 10 + .../localsearch/0001-no-udev-3.9.0.patch | 165 +++ x11-packages/localsearch/0002-fix-paths.patch | 372 ++++++ x11-packages/localsearch/build.sh | 24 + x11-packages/mutter/0003-missing-guards.patch | 3 +- x11-packages/mutter/0005-fill-memfd.patch | 14 +- x11-packages/mutter/0006-fix-anno-file.patch | 10 +- x11-packages/mutter/0007-revert-glycin.patch | 515 ++++++++ ...08-fix-build-cross-g-ir-scanner-1.80.patch | 11 + x11-packages/mutter/build.sh | 9 +- x11-packages/mutter/gir/Clutter-17.xml | 1142 +++++++++++++++++ x11-packages/mutter/gir/Cogl-17.xml | 222 ++++ x11-packages/mutter/gir/Meta-17.xml | 975 ++++++++++++++ x11-packages/mutter/gir/Mtk-17.xml | 5 + x11-packages/nautilus/0001-getpwent.patch | 35 + x11-packages/nautilus/0002-fix-paths.patch | 186 +++ x11-packages/nautilus/0003-Werror.patch | 25 + x11-packages/nautilus/build.sh | 29 + .../nautilus/gir/48.5/Nautilus-4.0.xml | 50 + .../nautilus/gir/49.3/Nautilus-4.1.xml | 50 + x11-packages/ptyxis/build.sh | 17 + x11-packages/ptyxis/default-shell.patch | 40 + x11-packages/ptyxis/no-conflict-environ.patch | 86 ++ x11-packages/ptyxis/no-xdg-portal.patch | 40 + 107 files changed, 8593 insertions(+), 130 deletions(-) rename packages/spidermonkey/{0008-fix-marcos.patch => 0007-fix-marcos.patch} (80%) rename packages/spidermonkey/{0009-impl-posix-shmem.patch => 0008-impl-posix-shmem.patch} (80%) rename packages/spidermonkey/{0010-do-not-check-time_t-for-system-libevent.patch => 0009-do-not-check-time_t-for-system-libevent.patch} (100%) rename packages/spidermonkey/{0011-use-UnderrunHandlerNoop.patch => 0010-use-UnderrunHandlerNoop.patch} (100%) rename packages/spidermonkey/{0012-do-not-use-adaptive-mutex.patch => 0011-do-not-use-adaptive-mutex.patch} (100%) create mode 100644 packages/spidermonkey/0012-fix-rust-compile.patch delete mode 100644 packages/spidermonkey/0013-fix-rust-compile.patch rename packages/spidermonkey/{0014-unset-thread-priority-scheduling-macro.patch => 0013-unset-thread-priority-scheduling-macro.patch} (100%) rename packages/spidermonkey/{0015-skia-termux.patch => 0014-skia-termux.patch} (100%) rename packages/spidermonkey/{0016-protobuf-no-android-log.patch => 0015-protobuf-no-android-log.patch} (100%) rename packages/spidermonkey/{0018-fix-include-dir-for-cpufeatures.patch => 0016-fix-include-dir-for-cpufeatures.patch} (100%) rename packages/spidermonkey/{0019-fix-sigbus.patch => 0017-fix-sigbus.patch} (100%) delete mode 100644 packages/spidermonkey/0017-icu-74.patch rename packages/spidermonkey/{0020-do-not-call-get-pci-status.patch => 0018-do-not-call-get-pci-status.patch} (100%) rename packages/spidermonkey/{0021-fix-missing-include-for-zlib-module.patch => 0019-fix-missing-include-for-zlib-module.patch} (100%) rename packages/spidermonkey/{0022-configure-no-pack-relative-relocs.patch => 0020-configure-no-pack-relative-relocs.patch} (100%) rename packages/spidermonkey/{0023-check-if-dlpi_name-is-nullptr-before-using.patch => 0022-check-if-dlpi_name-is-nullptr-before-using.patch} (100%) rename packages/spidermonkey/{0024-fix-missing-include-for-macro-MOZ_TRY-in-TimeZone.cpp.patch => 0023-fix-missing-include-for-macro-MOZ_TRY-in-TimeZone.cpp.patch} (100%) rename packages/spidermonkey/{0025-disable-native-https-dns-resolve.patch => 0024-disable-native-https-dns-resolve.patch} (86%) rename packages/spidermonkey/{0026-partially-disable-unified-builds.patch => 0025-partially-disable-unified-builds.patch} (100%) create mode 100644 x11-packages/evolution-data-server/0001-use-pregenerated-iconv-detect.patch create mode 100644 x11-packages/evolution-data-server/0002-do-not-run-configure-test.patch create mode 100644 x11-packages/evolution-data-server/0003-decode-scheme-use-script.patch create mode 100644 x11-packages/evolution-data-server/0004-use-host-tools.patch create mode 100644 x11-packages/evolution-data-server/0005-do-not-use-db_load.patch create mode 100644 x11-packages/evolution-data-server/build.sh create mode 100755 x11-packages/evolution-data-server/google-scheme-decode.py create mode 100644 x11-packages/evolution-data-server/iconv-detect.h create mode 100644 x11-packages/extension-manager/build.sh create mode 100644 x11-packages/gjs/0001-cross-build.patch create mode 100644 x11-packages/gjs/0002-skip-tests.patch create mode 100644 x11-packages/gjs/build.sh create mode 100644 x11-packages/gjs/gir/GjsPrivate-1.0.xml create mode 100644 x11-packages/gnome-autoar/build.sh create mode 100644 x11-packages/gnome-browser-connector/build.sh create mode 100644 x11-packages/gnome-console/build.sh create mode 100644 x11-packages/gnome-console/default-shell.patch create mode 100644 x11-packages/gnome-console/no-format-nonliteral.patch create mode 100644 x11-packages/gnome-control-center/0001-patch-meson-build.patch create mode 100644 x11-packages/gnome-control-center/0002-remove-online-accounts-power-printers-from-panel.patch create mode 100644 x11-packages/gnome-control-center/0003-remove-color-management-from-panel.patch create mode 100644 x11-packages/gnome-control-center/0004-fix-paths.patch create mode 100644 x11-packages/gnome-control-center/0005-remove-user-and-secure-shell-section.patch create mode 100644 x11-packages/gnome-control-center/0006-don-t-relay-on-pwquality.patch create mode 100644 x11-packages/gnome-control-center/0007-disable-polkit.patch create mode 100644 x11-packages/gnome-control-center/0008-remove-udev.patch create mode 100644 x11-packages/gnome-control-center/0009-remove-udisk2.patch create mode 100644 x11-packages/gnome-control-center/0010-fix-locale-issue.patch create mode 100644 x11-packages/gnome-control-center/0011-remove-remote-desktop.patch create mode 100644 x11-packages/gnome-control-center/0012-gnomevolumecontrol.patch create mode 100644 x11-packages/gnome-control-center/0013-disable-accountsservice.patch create mode 100644 x11-packages/gnome-control-center/build.sh create mode 100644 x11-packages/gnome-session/0001-no-logind.patch create mode 100644 x11-packages/gnome-session/0002-Werror.patch create mode 100644 x11-packages/gnome-session/0003-force-gnome-settings-daemon-49.patch create mode 100644 x11-packages/gnome-session/0004-manage-system-dbus.patch create mode 100644 x11-packages/gnome-session/build.sh create mode 100644 x11-packages/gnome-settings-daemon/0001-no-polkit.patch create mode 100644 x11-packages/gnome-settings-daemon/0002-no-gudev.patch create mode 100644 x11-packages/gnome-settings-daemon/build.sh create mode 100644 x11-packages/gnome-shell/0001-use-gjs-option.patch create mode 100644 x11-packages/gnome-shell/0002-disable-polkit.patch create mode 100644 x11-packages/gnome-shell/0003-tagged-pointer.patch create mode 100644 x11-packages/gnome-shell/0004-disable-accountsservice.patch create mode 100644 x11-packages/gnome-shell/0005-disable-gdm.patch create mode 100644 x11-packages/gnome-shell/0006-gnomevolumecontrol.patch create mode 100644 x11-packages/gnome-shell/0007-set-gjs.patch create mode 100644 x11-packages/gnome-shell/0008-gnome-session-48-backcompat.patch create mode 100644 x11-packages/gnome-shell/0009-disable-brightness.patch create mode 100644 x11-packages/gnome-shell/0101-disable-packagekit.patch create mode 100644 x11-packages/gnome-shell/build.sh create mode 100644 x11-packages/gnome-shell/gir/Gvc-1.0.xml create mode 100644 x11-packages/gnome-shell/gir/Shell-16.xml create mode 100644 x11-packages/gnome-shell/gir/Shell-17.xml create mode 100644 x11-packages/gnome-shell/gir/Shew-0.xml create mode 100644 x11-packages/gnome-shell/gir/St-16.xml create mode 100644 x11-packages/gnome-shell/gir/St-17.xml create mode 100644 x11-packages/gnome-tweaks/build.sh create mode 100644 x11-packages/gnome-tweaks/gnome-tweaks.diff create mode 100644 x11-packages/gnome-tweaks/no-gudev.patch create mode 100644 x11-packages/gnome/build.sh create mode 100644 x11-packages/localsearch/0001-no-udev-3.9.0.patch create mode 100644 x11-packages/localsearch/0002-fix-paths.patch create mode 100644 x11-packages/localsearch/build.sh create mode 100644 x11-packages/mutter/0007-revert-glycin.patch create mode 100644 x11-packages/mutter/0008-fix-build-cross-g-ir-scanner-1.80.patch create mode 100644 x11-packages/mutter/gir/Clutter-17.xml create mode 100644 x11-packages/mutter/gir/Cogl-17.xml create mode 100644 x11-packages/mutter/gir/Meta-17.xml create mode 100644 x11-packages/mutter/gir/Mtk-17.xml create mode 100644 x11-packages/nautilus/0001-getpwent.patch create mode 100644 x11-packages/nautilus/0002-fix-paths.patch create mode 100644 x11-packages/nautilus/0003-Werror.patch create mode 100644 x11-packages/nautilus/build.sh create mode 100644 x11-packages/nautilus/gir/48.5/Nautilus-4.0.xml create mode 100644 x11-packages/nautilus/gir/49.3/Nautilus-4.1.xml create mode 100644 x11-packages/ptyxis/build.sh create mode 100644 x11-packages/ptyxis/default-shell.patch create mode 100644 x11-packages/ptyxis/no-conflict-environ.patch create mode 100644 x11-packages/ptyxis/no-xdg-portal.patch diff --git a/packages/libical/build.sh b/packages/libical/build.sh index 373a7ef6017..e577e6770ac 100644 --- a/packages/libical/build.sh +++ b/packages/libical/build.sh @@ -3,19 +3,40 @@ TERMUX_PKG_DESCRIPTION="Libical is an Open Source implementation of the iCalenda TERMUX_PKG_LICENSE="LGPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="4.0.4" +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/libical/libical/releases/download/v$TERMUX_PKG_VERSION/libical-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=c851cdb46da5e6397881dafaa592c5516fb49da05dd1bb095f711a6d20eac422 TERMUX_PKG_AUTO_UPDATE=true -TERMUX_PKG_DEPENDS="libc++, libicu" +TERMUX_PKG_DEPENDS="glib, libc++, libicu, libxml2" TERMUX_PKG_BREAKS="libical-dev" TERMUX_PKG_REPLACES="libical-dev" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-DSHARED_ONLY=true -DLIBICAL_BUILD_DOCS=false --DLIBICAL_GLIB=false --DLIBICAL_GOBJECT_INTROSPECTION=false +-DLIBICAL_GLIB_BUILD_DOCS=false -DUSE_BUILTIN_TZDATA=true -DPERL_EXECUTABLE=/usr/bin/perl +-DICAL_GLIB=true +-DIMPORT_ICAL_GLIB_SRC_GENERATOR=$TERMUX_PKG_HOSTBUILD_DIR/host-prefix/lib/cmake/LibIcal/IcalGlibSrcGenerator.cmake +-DENABLE_GTK_DOC=false " +TERMUX_PKG_HOSTBUILD=true + +termux_step_host_build() { + termux_setup_cmake + termux_setup_ninja + + mkdir -p "$TERMUX_PKG_HOSTBUILD_DIR"/host-prefix + + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$TERMUX_PKG_HOSTBUILD_DIR"/host-prefix \ + -DENABLE_GTK_DOC=OFF \ + -G Ninja \ + "$TERMUX_PKG_SRCDIR" + cmake --build . + cmake --install . --prefix "$TERMUX_PKG_HOSTBUILD_DIR"/host-prefix +} termux_step_post_get_source() { # Do not forget to bump revision of reverse dependencies and rebuild them diff --git a/packages/spidermonkey/0008-fix-marcos.patch b/packages/spidermonkey/0007-fix-marcos.patch similarity index 80% rename from packages/spidermonkey/0008-fix-marcos.patch rename to packages/spidermonkey/0007-fix-marcos.patch index 256c711927a..b89a4ea14f9 100644 --- a/packages/spidermonkey/0008-fix-marcos.patch +++ b/packages/spidermonkey/0007-fix-marcos.patch @@ -53,17 +53,6 @@ # define MOZ_CUBEB_REMOTING #endif ---- a/mozglue/misc/ConditionVariable_posix.cpp -+++ b/mozglue/misc/ConditionVariable_posix.cpp -@@ -23,7 +23,7 @@ - // Android 4.4 or earlier & macOS 10.12 has the clock functions, but not - // pthread_condattr_setclock. - #if defined(HAVE_CLOCK_MONOTONIC) && \ -- !(defined(__ANDROID__) && __ANDROID_API__ < 21) && !defined(__APPLE__) -+ defined(__TERMUX__) - # define CV_USE_CLOCK_API - #endif - --- a/mozglue/misc/StackWalk.cpp +++ b/mozglue/misc/StackWalk.cpp @@ -692,7 +692,7 @@ @@ -77,12 +66,13 @@ pthread_getattr_np(pthread_self(), &sattr); --- a/nsprpub/pr/src/pthreads/ptsynch.c +++ b/nsprpub/pr/src/pthreads/ptsynch.c -@@ -953,7 +953,7 @@ - #if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \ - || (defined(FREEBSD) && __FreeBSD_version < 1200059) \ - || defined(OPENBSD) || defined(BSDI) \ -- || defined(DARWIN) -+ || defined(DARWIN) || defined(__TERMUX__) +@@ -864,7 +864,7 @@ + */ + # if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || \ + (defined(FREEBSD) && __FreeBSD_version < 1200059) || \ +- defined(OPENBSD) || defined(DARWIN) ++ defined(OPENBSD) || defined(DARWIN) || defined(__TERMUX__) /* union semun is defined by including */ - #else + # else /* according to X/OPEN we have to define it ourselves */ + diff --git a/packages/spidermonkey/0009-impl-posix-shmem.patch b/packages/spidermonkey/0008-impl-posix-shmem.patch similarity index 80% rename from packages/spidermonkey/0009-impl-posix-shmem.patch rename to packages/spidermonkey/0008-impl-posix-shmem.patch index e736e9e633b..d2fda0d1623 100644 --- a/packages/spidermonkey/0009-impl-posix-shmem.patch +++ b/packages/spidermonkey/0008-impl-posix-shmem.patch @@ -1,8 +1,8 @@ ---- a/ipc/chromium/src/base/shared_memory_posix.cc -+++ b/ipc/chromium/src/base/shared_memory_posix.cc -@@ -40,6 +40,65 @@ - #include "mozilla/UniquePtrExtensions.h" +--- a/ipc/glue/SharedMemoryPlatform_posix.cpp ++++ b/ipc/glue/SharedMemoryPlatform_posix.cpp +@@ -39,6 +39,65 @@ #include "prenv.h" + #include "nsXULAppAPI.h" // for XRE_IsParentProcess +static int shm_unlink(const char *name) { + size_t namelen; @@ -63,15 +63,16 @@ + return fd; +} + - namespace base { + namespace mozilla::ipc::shared_memory { - void SharedMemory::MappingDeleter::operator()(void* ptr) { -@@ -153,7 +212,7 @@ + // memfd_create is a nonstandard interface for creating anonymous +@@ -101,7 +160,7 @@ // FreeBSD in version 13. - # if !defined(HAVE_MEMFD_CREATE) && defined(XP_LINUX) && \ -- defined(SYS_memfd_create) -+ defined(SYS_memfd_create) && !defined(__TERMUX__) + #if !defined(HAVE_MEMFD_CREATE) && defined(XP_LINUX) && \ +- defined(SYS_memfd_create) ++ defined(SYS_memfd_create) && !defined(__TERMUX__) // Older libc versions (e.g., glibc before 2.27) don't have the // wrapper, but we can supply our own; see `linux_memfd_defs.h`. + diff --git a/packages/spidermonkey/0010-do-not-check-time_t-for-system-libevent.patch b/packages/spidermonkey/0009-do-not-check-time_t-for-system-libevent.patch similarity index 100% rename from packages/spidermonkey/0010-do-not-check-time_t-for-system-libevent.patch rename to packages/spidermonkey/0009-do-not-check-time_t-for-system-libevent.patch diff --git a/packages/spidermonkey/0011-use-UnderrunHandlerNoop.patch b/packages/spidermonkey/0010-use-UnderrunHandlerNoop.patch similarity index 100% rename from packages/spidermonkey/0011-use-UnderrunHandlerNoop.patch rename to packages/spidermonkey/0010-use-UnderrunHandlerNoop.patch diff --git a/packages/spidermonkey/0012-do-not-use-adaptive-mutex.patch b/packages/spidermonkey/0011-do-not-use-adaptive-mutex.patch similarity index 100% rename from packages/spidermonkey/0012-do-not-use-adaptive-mutex.patch rename to packages/spidermonkey/0011-do-not-use-adaptive-mutex.patch diff --git a/packages/spidermonkey/0012-fix-rust-compile.patch b/packages/spidermonkey/0012-fix-rust-compile.patch new file mode 100644 index 00000000000..8442d21449b --- /dev/null +++ b/packages/spidermonkey/0012-fix-rust-compile.patch @@ -0,0 +1,47 @@ +--- a/toolkit/components/extensions/storage/moz.build ++++ b/toolkit/components/extensions/storage/moz.build +@@ -11,7 +11,7 @@ + # a delegate for consumers to use instead. Android Components can then provide + # an implementation of the delegate that's backed by the Rust component. For + # details, please see bug 1626506, comment 4. +-if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android": ++if False: + EXTRA_JS_MODULES += [ + "ExtensionStorageComponents.sys.mjs", + ] +--- a/toolkit/library/rust/shared/Cargo.toml ++++ b/toolkit/library/rust/shared/Cargo.toml +@@ -112,7 +112,7 @@ + [target.'cfg(any(target_os = "macos",target_os = "ios", all(target_os = "windows", not(target_arch = "aarch64"))))'.dependencies] + osclientcerts = { path = "../../../../security/manager/ssl/osclientcerts" } + +-[target.'cfg(not(target_os = "android"))'.dependencies] ++[target.'cfg(target_os = "android")'.dependencies] + gkrust-uniffi-components = { path = "../../../components/uniffi-bindgen-gecko-js/components/", features = ["xpcom"] } + gkrust-uniffi-fixtures = { path = "../../../components/uniffi-bindgen-gecko-js/fixtures/", features = ["xpcom"], optional = true } + viaduct = "0.1" +--- a/toolkit/library/rust/shared/lib.rs ++++ b/toolkit/library/rust/shared/lib.rs +@@ -55,7 +55,6 @@ + + extern crate audio_thread_priority; + +-#[cfg(not(target_os = "android"))] + extern crate webext_storage; + + #[cfg(feature = "webrtc")] +@@ -91,13 +90,11 @@ + all(target_os = "windows", not(target_arch = "aarch64"))))] + extern crate osclientcerts; + +-#[cfg(not(target_os = "android"))] + extern crate gkrust_uniffi_components; + + #[cfg(feature = "uniffi_fixtures")] + extern crate gkrust_uniffi_fixtures; + +-#[cfg(not(target_os = "android"))] + extern crate viaduct; + + extern crate gecko_logger; + diff --git a/packages/spidermonkey/0013-fix-rust-compile.patch b/packages/spidermonkey/0013-fix-rust-compile.patch deleted file mode 100644 index c90e443dc1f..00000000000 --- a/packages/spidermonkey/0013-fix-rust-compile.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/toolkit/components/extensions/storage/moz.build -+++ b/toolkit/components/extensions/storage/moz.build -@@ -17,7 +17,7 @@ - # a delegate for consumers to use instead. Android Components can then provide - # an implementation of the delegate that's backed by the Rust component. For - # details, please see bug 1626506, comment 4. --if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android": -+if False: - EXPORTS.mozilla.extensions.storage += [ - "ExtensionStorageComponents.h", - ] ---- a/toolkit/library/rust/shared/Cargo.toml -+++ b/toolkit/library/rust/shared/Cargo.toml -@@ -104,7 +104,6 @@ - # Since we're building with at least rustc 1.63, enable rust 1.57 features (use of try_reserve methods). - fallible_collections = { version = "0.4", features = ["rust_1_57"] } - --[target.'cfg(not(target_os = "android"))'.dependencies] - viaduct = "0.1" - webext_storage_bridge = { path = "../../../components/extensions/storage/webext_storage_bridge" } - tabs = { version = "0.1" } ---- a/toolkit/library/rust/shared/lib.rs -+++ b/toolkit/library/rust/shared/lib.rs -@@ -51,20 +51,16 @@ - - extern crate audio_thread_priority; - --#[cfg(not(target_os = "android"))] - extern crate webext_storage_bridge; - --#[cfg(not(target_os = "android"))] - extern crate tabs; - --#[cfg(not(target_os = "android"))] - mod reexport_appservices_uniffi_scaffolding { - tabs::uniffi_reexport_scaffolding!(); - relevancy::uniffi_reexport_scaffolding!(); - suggest::uniffi_reexport_scaffolding!(); - } - --#[cfg(not(target_os = "android"))] - extern crate suggest; - - #[cfg(feature = "webrtc")] -@@ -93,7 +88,6 @@ - extern crate l10nregistry_ffi; - extern crate localization_ffi; - --#[cfg(not(target_os = "android"))] - extern crate viaduct; - - extern crate gecko_logger; diff --git a/packages/spidermonkey/0014-unset-thread-priority-scheduling-macro.patch b/packages/spidermonkey/0013-unset-thread-priority-scheduling-macro.patch similarity index 100% rename from packages/spidermonkey/0014-unset-thread-priority-scheduling-macro.patch rename to packages/spidermonkey/0013-unset-thread-priority-scheduling-macro.patch diff --git a/packages/spidermonkey/0015-skia-termux.patch b/packages/spidermonkey/0014-skia-termux.patch similarity index 100% rename from packages/spidermonkey/0015-skia-termux.patch rename to packages/spidermonkey/0014-skia-termux.patch diff --git a/packages/spidermonkey/0016-protobuf-no-android-log.patch b/packages/spidermonkey/0015-protobuf-no-android-log.patch similarity index 100% rename from packages/spidermonkey/0016-protobuf-no-android-log.patch rename to packages/spidermonkey/0015-protobuf-no-android-log.patch diff --git a/packages/spidermonkey/0018-fix-include-dir-for-cpufeatures.patch b/packages/spidermonkey/0016-fix-include-dir-for-cpufeatures.patch similarity index 100% rename from packages/spidermonkey/0018-fix-include-dir-for-cpufeatures.patch rename to packages/spidermonkey/0016-fix-include-dir-for-cpufeatures.patch diff --git a/packages/spidermonkey/0019-fix-sigbus.patch b/packages/spidermonkey/0017-fix-sigbus.patch similarity index 100% rename from packages/spidermonkey/0019-fix-sigbus.patch rename to packages/spidermonkey/0017-fix-sigbus.patch diff --git a/packages/spidermonkey/0017-icu-74.patch b/packages/spidermonkey/0017-icu-74.patch deleted file mode 100644 index 5e2b2256776..00000000000 --- a/packages/spidermonkey/0017-icu-74.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/intl/lwbrk/LineBreaker.cpp -+++ b/intl/lwbrk/LineBreaker.cpp -@@ -434,7 +434,13 @@ - /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER, - /* E_BASE = 40, [EB] */ CLASS_BREAKABLE, - /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER, -- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER}; -+ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER, -+ /* AKSARA = 43, [AK] */ CLASS_CHARACTER, -+ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER, -+ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER, -+ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER, -+ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER, -+ }; - - static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass), - "Gecko vs ICU LineBreak class mismatch"); diff --git a/packages/spidermonkey/0020-do-not-call-get-pci-status.patch b/packages/spidermonkey/0018-do-not-call-get-pci-status.patch similarity index 100% rename from packages/spidermonkey/0020-do-not-call-get-pci-status.patch rename to packages/spidermonkey/0018-do-not-call-get-pci-status.patch diff --git a/packages/spidermonkey/0021-fix-missing-include-for-zlib-module.patch b/packages/spidermonkey/0019-fix-missing-include-for-zlib-module.patch similarity index 100% rename from packages/spidermonkey/0021-fix-missing-include-for-zlib-module.patch rename to packages/spidermonkey/0019-fix-missing-include-for-zlib-module.patch diff --git a/packages/spidermonkey/0022-configure-no-pack-relative-relocs.patch b/packages/spidermonkey/0020-configure-no-pack-relative-relocs.patch similarity index 100% rename from packages/spidermonkey/0022-configure-no-pack-relative-relocs.patch rename to packages/spidermonkey/0020-configure-no-pack-relative-relocs.patch diff --git a/packages/spidermonkey/0023-check-if-dlpi_name-is-nullptr-before-using.patch b/packages/spidermonkey/0022-check-if-dlpi_name-is-nullptr-before-using.patch similarity index 100% rename from packages/spidermonkey/0023-check-if-dlpi_name-is-nullptr-before-using.patch rename to packages/spidermonkey/0022-check-if-dlpi_name-is-nullptr-before-using.patch diff --git a/packages/spidermonkey/0024-fix-missing-include-for-macro-MOZ_TRY-in-TimeZone.cpp.patch b/packages/spidermonkey/0023-fix-missing-include-for-macro-MOZ_TRY-in-TimeZone.cpp.patch similarity index 100% rename from packages/spidermonkey/0024-fix-missing-include-for-macro-MOZ_TRY-in-TimeZone.cpp.patch rename to packages/spidermonkey/0023-fix-missing-include-for-macro-MOZ_TRY-in-TimeZone.cpp.patch diff --git a/packages/spidermonkey/0025-disable-native-https-dns-resolve.patch b/packages/spidermonkey/0024-disable-native-https-dns-resolve.patch similarity index 86% rename from packages/spidermonkey/0025-disable-native-https-dns-resolve.patch rename to packages/spidermonkey/0024-disable-native-https-dns-resolve.patch index 166198d1a7a..11216900569 100644 --- a/packages/spidermonkey/0025-disable-native-https-dns-resolve.patch +++ b/packages/spidermonkey/0024-disable-native-https-dns-resolve.patch @@ -2,7 +2,7 @@ It uses `android_res_nquery`, but this function only got added in API level 29 --- a/netwerk/dns/nsHostResolver.cpp +++ b/netwerk/dns/nsHostResolver.cpp -@@ -237,6 +237,8 @@ +@@ -210,6 +210,8 @@ // native HTTPS records on Win 11 for now. sNativeHTTPSSupported = StaticPrefs::network_dns_native_https_query_win10() || mozilla::IsWin11OrLater(); @@ -13,15 +13,17 @@ It uses `android_res_nquery`, but this function only got added in API level 29 sNativeHTTPSSupported = jni::GetAPIVersion() >= 29; --- a/netwerk/dns/moz.build +++ b/netwerk/dns/moz.build -@@ -59,15 +59,7 @@ +@@ -53,17 +53,7 @@ "nsEffectiveTLDService.cpp", # Excluded from UNIFIED_SOURCES due to special build flags. ] -if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": - SOURCES += ["PlatformDNSWin.cpp"] --elif CONFIG["OS_TARGET"] == "Linux" or CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": +-elif CONFIG["OS_TARGET"] == "Linux": - SOURCES += ["PlatformDNSUnix.cpp"] - OS_LIBS += ["resolv"] +-elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": +- SOURCES += ["PlatformDNSMac.cpp"] -elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": - SOURCES += ["PlatformDNSAndroid.cpp"] -else: @@ -30,3 +32,4 @@ It uses `android_res_nquery`, but this function only got added in API level 29 UNIFIED_SOURCES += [ "ChildDNSService.cpp", + diff --git a/packages/spidermonkey/0026-partially-disable-unified-builds.patch b/packages/spidermonkey/0025-partially-disable-unified-builds.patch similarity index 100% rename from packages/spidermonkey/0026-partially-disable-unified-builds.patch rename to packages/spidermonkey/0025-partially-disable-unified-builds.patch diff --git a/packages/spidermonkey/build.sh b/packages/spidermonkey/build.sh index 4bb8236e535..1b598b2d188 100644 --- a/packages/spidermonkey/build.sh +++ b/packages/spidermonkey/build.sh @@ -2,11 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://spidermonkey.dev TERMUX_PKG_DESCRIPTION="Mozilla's JavaScript engine" TERMUX_PKG_LICENSE="MPL-2.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION="128.10.0" -TERMUX_PKG_REVISION=2 -_REAL_VERSION=${TERMUX_PKG_VERSION}esr -TERMUX_PKG_SRCURL=https://archive.mozilla.org/pub/firefox/releases/$_REAL_VERSION/source/firefox-$_REAL_VERSION.source.tar.xz -TERMUX_PKG_SHA256=2ed83e26e41a8b3e2c7c0d13448a84dbb9b7ed65ed46bc162d629b0c6b071caf +TERMUX_PKG_VERSION="140.7.0" +TERMUX_PKG_SRCURL="https://archive.mozilla.org/pub/firefox/releases/${TERMUX_PKG_VERSION}esr/source/firefox-${TERMUX_PKG_VERSION}esr.source.tar.xz" +TERMUX_PKG_SHA256=608a739071726f30236f7100ec5e30e1b8ec342d4e91e715948c287909cb1529 TERMUX_PKG_DEPENDS="libicu, libnspr, libnss, zlib" TERMUX_PKG_BUILD_IN_SRC=true diff --git a/scripts/setup-termux.sh b/scripts/setup-termux.sh index aa0598d2800..7f74215ec1f 100755 --- a/scripts/setup-termux.sh +++ b/scripts/setup-termux.sh @@ -52,11 +52,12 @@ PACKAGES+=" zip" PACKAGES+=" file" # Needed by nchat PYTHON_PACKAGES="" -PYTHON_PACKAGES+=" itstool" # necessary to build orca and some other packages -PYTHON_PACKAGES+=" pygments" # necessary to build mesa (dependency of mako that _must_ be kept `--upgrade`d) -PYTHON_PACKAGES+=" mako" # necessary to build mesa -PYTHON_PACKAGES+=" pyyaml" # necessary to build mesa -PYTHON_PACKAGES+=" setuptools" # necessary to build mesa (explicitly 'system'-wide unlike the setuptools in termux_setup_python_pip) +PYTHON_PACKAGES+=" itstool" # necessary to build orca and some other packages +PYTHON_PACKAGES+=" pygments" # necessary to build mesa (dependency of mako that _must_ be kept `--upgrade`d) +PYTHON_PACKAGES+=" mako" # necessary to build mesa +PYTHON_PACKAGES+=" pyyaml" # necessary to build mesa +PYTHON_PACKAGES+=" setuptools" # necessary to build mesa (explicitly 'system'-wide unlike the setuptools in termux_setup_python_pip) +PYTHON_PACKAGES+=" docutils" # necesary to build gnome-shell # More 'system-wide' python packages should be added here if working towards the goal # of setup-termux.sh for on-device building having closer behavior # to setup-ubuntu.sh for cross-compilation. If adding packages here, please add a comment diff --git a/x11-packages/evolution-data-server/0001-use-pregenerated-iconv-detect.patch b/x11-packages/evolution-data-server/0001-use-pregenerated-iconv-detect.patch new file mode 100644 index 00000000000..1868258dd18 --- /dev/null +++ b/x11-packages/evolution-data-server/0001-use-pregenerated-iconv-detect.patch @@ -0,0 +1,20 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -569,12 +569,17 @@ + message(FATAL_ERROR "You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv") + endif(NOT HAVE_ICONV) + ++if(CMAKE_CROSSCOMPILING) ++ file(COPY "$ENV{ICONV_DETECT_H}" DESTINATION "${CMAKE_BINARY_DIR}/") ++ set(_correct_iconv 1) ++else() + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBS}) + file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/" _binary_dir_with_separator) + CHECK_C_SOURCE_RUNS("#define ICONV_DETECT_BUILD_DIR \"${_binary_dir_with_separator}\" + #include \"${CMAKE_SOURCE_DIR}/iconv-detect.c\"" _correct_iconv) + unset(_binary_dir_with_separator) + unset(CMAKE_REQUIRED_LIBRARIES) ++endif() + + if(NOT _correct_iconv) + message(FATAL_ERROR "You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv") diff --git a/x11-packages/evolution-data-server/0002-do-not-run-configure-test.patch b/x11-packages/evolution-data-server/0002-do-not-run-configure-test.patch new file mode 100644 index 00000000000..991ae8050b9 --- /dev/null +++ b/x11-packages/evolution-data-server/0002-do-not-run-configure-test.patch @@ -0,0 +1,21 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -639,6 +639,10 @@ + # Check to see if strftime supports the use of %l and %k + # ******************************************************* + ++if(CMAKE_CROSSCOMPILING) ++ message(INFO "Cross compiling, assume HAVE_LKSTRFTIME is 0") ++ set(HAVE_LKSTRFTIME 0) ++else() + CHECK_C_SOURCE_RUNS(" + #include + #include +@@ -657,6 +661,7 @@ + return 1; + return 0; + }" HAVE_LKSTRFTIME) ++endif() + + # ****************************** + # system mail stuff diff --git a/x11-packages/evolution-data-server/0003-decode-scheme-use-script.patch b/x11-packages/evolution-data-server/0003-decode-scheme-use-script.patch new file mode 100644 index 00000000000..30d1fbf40f5 --- /dev/null +++ b/x11-packages/evolution-data-server/0003-decode-scheme-use-script.patch @@ -0,0 +1,20 @@ +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -35,10 +35,17 @@ + set(CMAKE_REQUIRED_LIBRARIES ${DATA_SERVER_LDFLAGS}) + list(APPEND CMAKE_REQUIRED_DEFINITIONS -DG_LOG_DOMAIN=\"oauth2-value-helper\" -DBUILDING_VALUE_HELPER=1) + file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/oauth2-google-client-id" _binary_dir_to_file) ++if(CMAKE_CROSSCOMPILING) ++ execute_process( ++ COMMAND "$ENV{GOOGLE_OAUTH2_SCHEME_SCRIPT}" "${WITH_GOOGLE_CLIENT_ID}" "${_binary_dir_to_file}" ++ ) ++ set(_decoded 1) ++else() + CHECK_C_SOURCE_RUNS("#define DECODE_KEY \"${WITH_GOOGLE_CLIENT_ID}\" + #define DECODE_TO_FILE \"${_binary_dir_to_file}\" + #define DECODE_REVERSED 1 + #include \"${CMAKE_SOURCE_DIR}/src/libedataserver/e-oauth2-service.c\"" _decoded) ++endif() + file(READ ${_binary_dir_to_file} _google_oauth2_scheme) + unset(_binary_dir_to_file) + unset(_decoded) diff --git a/x11-packages/evolution-data-server/0004-use-host-tools.patch b/x11-packages/evolution-data-server/0004-use-host-tools.patch new file mode 100644 index 00000000000..212d3703907 --- /dev/null +++ b/x11-packages/evolution-data-server/0004-use-host-tools.patch @@ -0,0 +1,22 @@ +--- a/src/camel/CMakeLists.txt ++++ b/src/camel/CMakeLists.txt +@@ -20,7 +20,7 @@ + + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c +- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables >${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c ++ COMMAND camel-gen-tables >${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c + DEPENDS camel-gen-tables + ) + +--- a/src/addressbook/libebook-contacts/CMakeLists.txt ++++ b/src/addressbook/libebook-contacts/CMakeLists.txt +@@ -25,7 +25,7 @@ + + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h +- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gen-western-table "${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in" >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h ++ COMMAND gen-western-table "${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in" >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h + DEPENDS gen-western-table e-name-western-tables.h.in + ) + diff --git a/x11-packages/evolution-data-server/0005-do-not-use-db_load.patch b/x11-packages/evolution-data-server/0005-do-not-use-db_load.patch new file mode 100644 index 00000000000..7a4291b4534 --- /dev/null +++ b/x11-packages/evolution-data-server/0005-do-not-use-db_load.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -335,7 +335,11 @@ + # db_load checking, it's optional + # ****************************** + ++if(ENABLE_TESTS) + find_program(DB_LOAD NAMES db_load db4_load db_load-4 db5_load db_load-5) ++else() ++set(DB_LOAD 0) ++endif() + if(DB_LOAD) + set(HAVE_DB_LOAD ON) + else(DB_LOAD) diff --git a/x11-packages/evolution-data-server/build.sh b/x11-packages/evolution-data-server/build.sh new file mode 100644 index 00000000000..fcc602c9fc7 --- /dev/null +++ b/x11-packages/evolution-data-server/build.sh @@ -0,0 +1,48 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/evolution/-/wikis/home +TERMUX_PKG_DESCRIPTION="Unified contacts, tasks and calendar backend" +TERMUX_PKG_LICENSE="LGPL-2.0-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="3.59.2" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/evolution-data-server/${TERMUX_PKG_VERSION%.*}/evolution-data-server-$TERMUX_PKG_VERSION.tar.xz" +TERMUX_PKG_SHA256=15bd798c85dee923462bebe880761b4668b6c5065584e840900988389add83bf +TERMUX_PKG_DEPENDS="glib, gtk3, gtk4, json-glib, krb5, libcanberra, libical, libicu, libnspr, libnss, libsecret, libsoup3, libsqlite, libuuid, libxml2, openldap" +TERMUX_PKG_BUILD_DEPENDS="glib-cross" +TERMUX_PKG_HOSTBUILD=true +TERMUX_PKG_VERSIONED_GIR=false + +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-DCMAKE_SYSTEM_NAME=Linux +-DENABLE_TESTS=OFF +-DWITH_NSPR_INCLUDES=$TERMUX_PREFIX/include +-DWITH_NSS_INCLUDES=$TERMUX_PREFIX/include/nss +-DENABLE_OAUTH2_WEBKITGTK=OFF +-DENABLE_OAUTH2_WEBKITGTK4=OFF +-DENABLE_GOA=OFF +-DENABLE_WEATHER=OFF +-DWITH_LIBDB=OFF +-DENABLE_GTK_DOC=OFF +" + +termux_step_host_build() { + touch evolution-data-server-config.h + gcc -I. \ + "$TERMUX_PKG_SRCDIR"/src/camel/camel-gen-tables.c \ + -o camel-gen-tables + chmod +x camel-gen-tables + gcc -I. \ + $(pkg-config --cflags glib-2.0) \ + "$TERMUX_PKG_SRCDIR"/src/addressbook/libebook-contacts/gen-western-table.c \ + $(pkg-config --libs glib-2.0) \ + -o gen-western-table + chmod +x gen-western-table +} + +termux_step_pre_configure() { + export SENDMAIL_PATH="$TERMUX_PREFIX/bin/sendmail" + export GOOGLE_OAUTH2_SCHEME_SCRIPT="$TERMUX_PKG_BUILDER_DIR/google-scheme-decode.py" + export ICONV_DETECT_H="$TERMUX_PKG_BUILDER_DIR/iconv-detect.h" + + export PATH="$TERMUX_PKG_HOSTBUILD_DIR:$PATH" + + LDFLAGS="-Wl,-rpath=$TERMUX_PREFIX/lib/evolution-data-server $LDFLAGS" +} diff --git a/x11-packages/evolution-data-server/google-scheme-decode.py b/x11-packages/evolution-data-server/google-scheme-decode.py new file mode 100755 index 00000000000..983434e7e01 --- /dev/null +++ b/x11-packages/evolution-data-server/google-scheme-decode.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +import base64 +import sys + +if __name__ == '__main__': + enc = sys.argv[1] + out = sys.argv[2] + + t = base64.b64decode(enc) + t = bytes(map(lambda x: x^t[-1], t[:-1])) + t = b".".join(t.split(b".")[::-1]) + + with open(out, "wb") as fp: + fp.write(t + b"\n") diff --git a/x11-packages/evolution-data-server/iconv-detect.h b/x11-packages/evolution-data-server/iconv-detect.h new file mode 100644 index 00000000000..6694b341c5f --- /dev/null +++ b/x11-packages/evolution-data-server/iconv-detect.h @@ -0,0 +1,5 @@ +/* This is an auto-generated header, DO NOT EDIT! */ + +#define ICONV_ISO_D_FORMAT "iso-%d-%d" +#define ICONV_ISO_S_FORMAT "iso-%d-%s" +#define ICONV_10646 "UCS-4BE" diff --git a/x11-packages/extension-manager/build.sh b/x11-packages/extension-manager/build.sh new file mode 100644 index 00000000000..1c99115f3f7 --- /dev/null +++ b/x11-packages/extension-manager/build.sh @@ -0,0 +1,21 @@ +TERMUX_PKG_HOMEPAGE=https://mattjakeman.com/apps/extension-manager +TERMUX_PKG_DESCRIPTION="Native tool for browsing, installing, and managing GNOME Shell Extensions" +TERMUX_PKG_LICENSE="GPL-3.0-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="0.6.5" +TERMUX_PKG_SRCURL="https://github.com/mjakeman/extension-manager/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz" +TERMUX_PKG_SHA256=5a43c7b9570775948a35f402b1c1d5f0f0401e339ab2144d466f75eae26ef9de +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_DEPENDS="gtk4, json-glib, libadwaita, libsoup3, libxml2" +TERMUX_PKG_BUILD_DEPENDS="blueprint-compiler, glib, glib-cross, g-ir-scanner, gobject-introspection" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dpackage=Termux +-Dbacktrace=false +" + +termux_step_pre_configure() { + termux_setup_meson + termux_setup_glib_cross_pkg_config_wrapper + termux_setup_bpc + export TERMUX_MESON_ENABLE_SOVERSION=1 +} diff --git a/x11-packages/gjs/0001-cross-build.patch b/x11-packages/gjs/0001-cross-build.patch new file mode 100644 index 00000000000..3dbbd15d239 --- /dev/null +++ b/x11-packages/gjs/0001-cross-build.patch @@ -0,0 +1,41 @@ +--- a/meson.build ++++ b/meson.build +@@ -255,6 +255,14 @@ + # Check if a minimal SpiderMonkey program compiles, links, and runs. If not, + # it's most likely the case that SpiderMonkey was configured incorrectly, for + # example by building mozglue as a shared library. ++recommended_configuration = ''' Check the recommended configuration: ++https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr91/docs/Building%20SpiderMonkey.md''' ++if meson.is_cross_build() ++ warning('''This is a cross build. A check that a minimal ++SpiderMonkey program executes will not be performed. Before shipping GJS, you ++should check that it does not crash on startup, since building SpiderMonkey with ++the wrong configuration may cause that.''' + recommended_configuration) ++else + minimal_program = cxx.run(''' + #include + int main(void) { +@@ -266,22 +274,16 @@ + args: debug_arg, dependencies: spidermonkey, + name: 'SpiderMonkey sanity check') + +-recommended_configuration = ''' Check the recommended configuration: +-https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr91/docs/Building%20SpiderMonkey.md''' + if not minimal_program.compiled() + error('''A minimal SpiderMonkey program + could not be compiled or linked. Most likely you should build it with a + different configuration.''' + recommended_configuration) +-elif meson.is_cross_build() +- warning('''This is a cross build. A check that a minimal +-SpiderMonkey program executes will not be performed. Before shipping GJS, you +-should check that it does not crash on startup, since building SpiderMonkey with +-the wrong configuration may cause that.''' + recommended_configuration) + elif minimal_program.returncode() != 0 + error('''A minimal SpiderMonkey program + failed to execute. Most likely you should build it with a different + configuration.''' + recommended_configuration) + endif ++endif + + ### Check for external programs ################################################ + diff --git a/x11-packages/gjs/0002-skip-tests.patch b/x11-packages/gjs/0002-skip-tests.patch new file mode 100644 index 00000000000..ad436941f28 --- /dev/null +++ b/x11-packages/gjs/0002-skip-tests.patch @@ -0,0 +1,27 @@ +--- a/meson.build ++++ b/meson.build +@@ -644,6 +644,7 @@ + + ### Tests and test setups ###################################################### + ++if not get_option('skip_tests') + # External code should not error out even when building with -Werror + gi_tests = subproject('gobject-introspection-tests', + default_options: ['werror=false', 'cairo=true', +@@ -695,6 +696,8 @@ + zeal11_environment.set('JS_GC_ZEAL', '11') + add_test_setup('post_verify', timeout_multiplier: 2, env: zeal11_environment) + ++endif ++ + ### Warn about conditions that may affect runtime ############################## + + if tests_locale == 'C' or tests_locale == 'N/A' +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -24,3 +24,5 @@ + description: 'Skip tests that need a display connection') + option('verbose_logs', type: 'boolean', value: false, + description: 'Enable extra log messages that may decrease performance (not allowed in release builds)') ++option('skip_tests', type: 'boolean', value: false, ++ description: 'Skip all the tests') diff --git a/x11-packages/gjs/build.sh b/x11-packages/gjs/build.sh new file mode 100644 index 00000000000..cf793aa870f --- /dev/null +++ b/x11-packages/gjs/build.sh @@ -0,0 +1,31 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gjs +TERMUX_PKG_DESCRIPTION="JavaScript Bindings for GNOME" +TERMUX_PKG_LICENSE="MIT, LGPL-2.0-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="1.87.1" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gjs/${TERMUX_PKG_VERSION%.*}/gjs-$TERMUX_PKG_VERSION.tar.xz" +TERMUX_PKG_SHA256=95f7a73acc5b2dbe643a6851ba5b4001230a75e1e859afc9a81fbf4861b899cf +TERMUX_PKG_DEPENDS="glib, gobject-introspection, libcairo, libffi, libx11, readline, spidermonkey" +TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner, glib-cross" +TERMUX_PKG_VERSIONED_GIR=false +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Db_pch=false +-Dinstalled_tests=false +-Dskip_dbus_tests=true +-Dskip_gtk_tests=true +-Dskip_tests=true +" + +termux_step_post_get_source() { + # Do not use meson wrap projects + rm -f subprojects/*.wrap +} + +termux_step_pre_configure() { + termux_setup_gir + termux_setup_glib_cross_pkg_config_wrapper + + CPPFLAGS+=" -DXP_UNIX=1" + + export TERMUX_MESON_ENABLE_SOVERSION=1 +} diff --git a/x11-packages/gjs/gir/GjsPrivate-1.0.xml b/x11-packages/gjs/gir/GjsPrivate-1.0.xml new file mode 100644 index 00000000000..6a6516ea128 --- /dev/null +++ b/x11-packages/gjs/gir/GjsPrivate-1.0.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/gnome-autoar/build.sh b/x11-packages/gnome-autoar/build.sh new file mode 100644 index 00000000000..cb8420ac872 --- /dev/null +++ b/x11-packages/gnome-autoar/build.sh @@ -0,0 +1,20 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gnome-autoar +TERMUX_PKG_DESCRIPTION="gnome-autoar provides functions and widgets for GNOME applications" +TERMUX_PKG_LICENSE="GPL-3.0" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="0.4.5" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gnome-autoar/${TERMUX_PKG_VERSION%.*}/gnome-autoar-${TERMUX_PKG_VERSION}.tar.xz" +TERMUX_PKG_SHA256=838c5306fc38bfaa2f23abe24262f4bf15771e3303fb5dcb74f5b9c7a615dabe +TERMUX_PKG_BUILD_DEPENDS="pkg-config, xorgproto, libxml2, libffi, libarchive" +TERMUX_PKG_DEPENDS="python, pygobject, gtk4, desktop-file-utils" +TERMUX_PKG_PYTHON_COMMON_DEPS="docutils" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dintrospection=disabled +-Dgtk_doc=false +-Dtests=false +" + +termux_step_pre_configure() { + termux_setup_cmake + termux_setup_meson +} diff --git a/x11-packages/gnome-browser-connector/build.sh b/x11-packages/gnome-browser-connector/build.sh new file mode 100644 index 00000000000..8e768bf4790 --- /dev/null +++ b/x11-packages/gnome-browser-connector/build.sh @@ -0,0 +1,53 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gnome-browser-connector +TERMUX_PKG_DESCRIPTION="GNOME Shell browser connector" +TERMUX_PKG_LICENSE="GPL-3.0" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="42.1" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gnome-browser-connector/${TERMUX_PKG_VERSION%%.*}/gnome-browser-connector-${TERMUX_PKG_VERSION}.tar.xz" +TERMUX_PKG_SHA256=bd9702ce1c163606ca32b8c13d1f3ba6e82b247cf87aac60610b411df1556212 +TERMUX_PKG_DEPENDS="python, pygobject" +TERMUX_PKG_SUGGESTS="firefox" +TERMUX_PKG_AUTO_UPDATE=true + +termux_step_pre_configure() { + termux_setup_meson + + # Fix incorrect install path by overriding py.get_install_dir() + sed -i \ + "s|py.get_install_dir()|join_paths(get_option('prefix'), 'lib', 'python${TERMUX_PYTHON_VERSION}', 'site-packages')|" \ + "$TERMUX_PKG_SRCDIR/meson.build" +} + +termux_step_create_debscripts() { + # Post-install script + cat <<-EOF >./postinst + #!$TERMUX_PREFIX/bin/sh + set -e + + # Set up Firefox native messaging host + mkdir -p "\$HOME/.mozilla/native-messaging-hosts" + cp "$TERMUX_PREFIX/lib/mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json" "\$HOME/.mozilla/native-messaging-hosts/" + + # Set up Chromium native messaging host + mkdir -p "\$HOME/.config/chromium/NativeMessagingHosts" + cp "$TERMUX_PREFIX/etc/chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json" "\$HOME/.config/chromium/NativeMessagingHosts/" + + exit 0 + EOF + + # Pre-remove script + cat <<-EOF >./prerm + #!$TERMUX_PREFIX/bin/sh + set -e + + # Clean up Firefox native messaging host + rm -f "\$HOME/.mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json" + + # Clean up Chromium native messaging host + rm -f "\$HOME/.config/chromium/NativeMessagingHosts/org.gnome.chrome_gnome_shell.json" + + exit 0 + EOF + + chmod 0755 ./postinst ./prerm +} diff --git a/x11-packages/gnome-console/build.sh b/x11-packages/gnome-console/build.sh new file mode 100644 index 00000000000..0754b7513c0 --- /dev/null +++ b/x11-packages/gnome-console/build.sh @@ -0,0 +1,18 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/console +TERMUX_PKG_DESCRIPTION="Simple, user-friendly terminal emulator for the GNOME desktop" +TERMUX_PKG_LICENSE="GPL-3.0-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="49.2" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gnome-console/${TERMUX_PKG_VERSION%%.*}/gnome-console-$TERMUX_PKG_VERSION.tar.xz" +TERMUX_PKG_SHA256=27b02ce8e890ff8f53ca85db786b1ae35903f0b6327812f0224dc0b54b1088db +TERMUX_PKG_DEPENDS="dconf, gtk4, glib, gsettings-desktop-schemas, hicolor-icon-theme, libadwaita, libnotify, libgtop, libvte, pango" +TERMUX_PKG_BUILD_DEPENDS="glib-cross" +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dtests=false +" + +termux_step_pre_configure() { + termux_setup_gir + termux_setup_glib_cross_pkg_config_wrapper +} diff --git a/x11-packages/gnome-console/default-shell.patch b/x11-packages/gnome-console/default-shell.patch new file mode 100644 index 00000000000..870ebccc115 --- /dev/null +++ b/x11-packages/gnome-console/default-shell.patch @@ -0,0 +1,33 @@ +--- a/data/org.gnome.Console.gschema.xml.in ++++ b/data/org.gnome.Console.gschema.xml.in +@@ -23,7 +23,7 @@ + true + + +- [] ++ ['@TERMUX_PREFIX@/bin/bash'] + + + false +--- a/src/kgx-settings.c ++++ b/src/kgx-settings.c +@@ -638,7 +638,7 @@ kgx_settings_get_shell (KgxSettings *self) + + /* We could probably do something other than /bin/sh */ + shell = g_new0 (char *, 2); +- shell[0] = g_strdup ("/bin/sh"); ++ shell[0] = g_strdup ("@TERMUX_PREFIX@/bin/bash"); + shell[1] = NULL; + g_warning ("No Shell! Defaulting to “%s”", shell[0]); + +--- a/src/kgx-utils.c ++++ b/src/kgx-utils.c +@@ -54,7 +54,7 @@ process_single_arg (const char *const raw_arg) + g_set_str (&argv[0], bin); + } else { + argv = g_new0 (char *, 4); +- g_set_str (&argv[0], "/bin/sh"); ++ g_set_str (&argv[0], "@TERMUX_PREFIX@/bin/sh"); + g_set_str (&argv[1], "-c"); + g_set_str (&argv[2], bin); + } diff --git a/x11-packages/gnome-console/no-format-nonliteral.patch b/x11-packages/gnome-console/no-format-nonliteral.patch new file mode 100644 index 00000000000..5e0a0a0c07a --- /dev/null +++ b/x11-packages/gnome-console/no-format-nonliteral.patch @@ -0,0 +1,14 @@ +--- a/meson.build ++++ b/meson.build +@@ -121,11 +121,7 @@ cc = meson.get_compiler('c') + + foreach arg : [ + '-Wdeclaration-after-statement', +- ['-Werror=format-security', '-Werror=format=2'], + '-Werror=missing-declarations', +- '-Wformat-nonliteral', +- '-Wformat-security', +- '-Werror=format', + '-Winit-self', + '-Wmaybe-uninitialized', + '-Wno-strict-aliasing', diff --git a/x11-packages/gnome-control-center/0001-patch-meson-build.patch b/x11-packages/gnome-control-center/0001-patch-meson-build.patch new file mode 100644 index 00000000000..1f90f25109e --- /dev/null +++ b/x11-packages/gnome-control-center/0001-patch-meson-build.patch @@ -0,0 +1,46 @@ +diff --git a/meson.build b/meson.build +index a7ca06b..8bb074f 100644 +--- a/meson.build ++++ b/meson.build +@@ -20,7 +20,7 @@ control_center_schemadir = join_paths (control_center_datadir, 'glib-2.0', 'sche + + control_center_gettext = meson.project_name() + '-2.0' + +-host_is_linux = host_machine.system().contains('linux') ++host_is_linux = host_machine.system().contains('linux') and not host_machine.system().contains('android') + host_is_linux_not_s390 = host_is_linux and not host_machine.cpu().contains('s390') + + cc = meson.get_compiler('c') +@@ -134,7 +134,6 @@ libgvc = subproject( + libgvc_dep = libgvc.get_variable('libgvc_dep') + + libadwaita_version = '>= 1.8.alpha' +-goa_req_version = '>= 3.51.0' + pulse_req_version = '>= 2.0' + + gtk_dep = dependency( +@@ -191,7 +190,6 @@ gnome_desktop_dep = dependency('gnome-desktop-4') + gnome_bg_dep = dependency('gnome-bg-4') + gnome_rr_dep = dependency('gnome-rr-4') + gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 48.rc', fallback: 'gsd') +-goa_dep = dependency('goa-1.0', version: goa_req_version, fallback: 'goa') + gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 48.alpha') # actually requires commit 9d55553, just after alpha + libxml_dep = dependency('libxml-2.0') + pulse_dep = dependency('libpulse', version: pulse_req_version) +diff --git a/panels/meson.build b/panels/meson.build +index 0877009..7813ae2 100644 +--- a/panels/meson.build ++++ b/panels/meson.build +@@ -18,11 +18,10 @@ panels = [ + 'system', + 'universal-access', + 'wellbeing', +- 'wwan', + ] + + if host_is_linux +- panels += ['network'] ++ panels += ['network', 'wwan'] + endif + + if host_is_linux_not_s390 diff --git a/x11-packages/gnome-control-center/0002-remove-online-accounts-power-printers-from-panel.patch b/x11-packages/gnome-control-center/0002-remove-online-accounts-power-printers-from-panel.patch new file mode 100644 index 00000000000..f88ee176de5 --- /dev/null +++ b/x11-packages/gnome-control-center/0002-remove-online-accounts-power-printers-from-panel.patch @@ -0,0 +1,65 @@ +diff --git a/panels/keyboard/meson.build b/panels/keyboard/meson.build +index cd1b54e..d742787 100644 +--- a/panels/keyboard/meson.build ++++ b/panels/keyboard/meson.build +@@ -47,8 +47,8 @@ endforeach + libkeyboard_shortcuts = static_library( + 'keyboard-shortcuts', + sources: 'keyboard-shortcuts.c', +- include_directories: [top_inc], +- dependencies: deps, ++ include_directories: [top_inc, common_inc], ++ dependencies: deps + [generates_sources_dep], + ) + + keyboard_shortcuts_dep = declare_dependency( +diff --git a/panels/meson.build b/panels/meson.build +index 07c7733..fc37f02 100644 +--- a/panels/meson.build ++++ b/panels/meson.build +@@ -12,9 +12,6 @@ panels = [ + 'mouse', + 'multitasking', + 'notifications', +- 'online-accounts', +- 'power', +- 'printers', + 'privacy', + 'search', + 'sharing', +diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c +index 28a1671..85482e5 100644 +--- a/shell/cc-panel-loader.c ++++ b/shell/cc-panel-loader.c +@@ -47,9 +47,15 @@ extern GType cc_network_panel_get_type (void); + extern GType cc_wifi_panel_get_type (void); + #endif /* BUILD_NETWORK */ + extern GType cc_notifications_panel_get_type (void); ++#ifdef BUILD_ONLINE_ACCOUNTS + extern GType cc_online_accounts_panel_get_type (void); ++#endif /* BUILD_ONLINE_ACCOUNTS */ ++#ifdef BUILD_POWER + extern GType cc_power_panel_get_type (void); ++#endif /* BUILD_POWER */ ++#ifdef BUILD_PRINTERS + extern GType cc_printers_panel_get_type (void); ++#endif /* BUILD_PRINTERS */ + extern GType cc_privacy_panel_get_type (void); + extern GType cc_search_panel_get_type (void); + extern GType cc_sharing_panel_get_type (void); +@@ -101,9 +107,15 @@ static CcPanelLoaderVtable default_panels[] = + PANEL_TYPE("wifi", cc_wifi_panel_get_type, cc_wifi_panel_static_init_func), + #endif + PANEL_TYPE("notifications", cc_notifications_panel_get_type, NULL), ++#ifdef BUILD_ONLINE_ACCOUNTS + PANEL_TYPE("online-accounts", cc_online_accounts_panel_get_type, NULL), ++#endif ++#ifdef BUILD_POWER + PANEL_TYPE("power", cc_power_panel_get_type, NULL), ++#endif ++#ifdef BUILD_PRINTERS + PANEL_TYPE("printers", cc_printers_panel_get_type, NULL), ++#endif + PANEL_TYPE("privacy", cc_privacy_panel_get_type, NULL), + PANEL_TYPE("search", cc_search_panel_get_type, NULL), + PANEL_TYPE("sharing", cc_sharing_panel_get_type, cc_sharing_panel_static_init_func), diff --git a/x11-packages/gnome-control-center/0003-remove-color-management-from-panel.patch b/x11-packages/gnome-control-center/0003-remove-color-management-from-panel.patch new file mode 100644 index 00000000000..fcebb3ccc6d --- /dev/null +++ b/x11-packages/gnome-control-center/0003-remove-color-management-from-panel.patch @@ -0,0 +1,58 @@ +diff --git a/meson.build b/meson.build +index 684fccd..6e4a052 100644 +--- a/meson.build ++++ b/meson.build +@@ -182,7 +182,7 @@ subproject('libgxdp', + ) + + accounts_dep = dependency('accountsservice', version: '>= 23.11.69') +-colord_dep = dependency('colord', version: '>= 0.1.34') ++colord_dep = dependency('colord', version: '>= 0.1.34', required: false) + gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.23.0') + gio_dep = dependency('gio-2.0') + glib_dep = dependency('glib-2.0', version: '>= 2.76.6') +@@ -334,6 +334,8 @@ config_h.set('HAVE_WACOM', host_is_linux_not_s390, + description: 'Define to 1 if Wacom is supportted') + config_h.set('BUILD_THUNDERBOLT', host_is_linux_not_s390, + description: 'Define to 1 to build the Thunderbolt panel') ++config_h.set('HAVE__COLORD', colord_dep.found(), ++ description: 'Build with color management in panel') + + gnome = import('gnome') + i18n = import('i18n') +diff --git a/panels/meson.build b/panels/meson.build +index fc37f02..0877009 100644 +--- a/panels/meson.build ++++ b/panels/meson.build +@@ -7,7 +7,6 @@ dependent_panels = [ + panels = [ + 'applications', + 'background', +- 'color', + 'display', + 'mouse', + 'multitasking', +diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c +index 85482e5..ffeda92 100644 +--- a/shell/cc-panel-loader.c ++++ b/shell/cc-panel-loader.c +@@ -36,7 +36,9 @@ extern GType cc_background_panel_get_type (void); + #ifdef BUILD_BLUETOOTH + extern GType cc_bluetooth_panel_get_type (void); + #endif /* BUILD_BLUETOOTH */ ++#ifdef HAVE__COLORD + extern GType cc_color_panel_get_type (void); ++#endif + extern GType cc_date_time_panel_get_type (void); + extern GType cc_display_panel_get_type (void); + extern GType cc_keyboard_panel_get_type (void); +@@ -97,7 +99,9 @@ static CcPanelLoaderVtable default_panels[] = + #ifdef BUILD_BLUETOOTH + PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type, NULL), + #endif ++#ifdef HAVE__COLORD + PANEL_TYPE("color", cc_color_panel_get_type, NULL), ++#endif + PANEL_TYPE("display", cc_display_panel_get_type, NULL), + PANEL_TYPE("keyboard", cc_keyboard_panel_get_type, NULL), + PANEL_TYPE("mouse", cc_mouse_panel_get_type, NULL), diff --git a/x11-packages/gnome-control-center/0004-fix-paths.patch b/x11-packages/gnome-control-center/0004-fix-paths.patch new file mode 100644 index 00000000000..e3e4f376d5c --- /dev/null +++ b/x11-packages/gnome-control-center/0004-fix-paths.patch @@ -0,0 +1,70 @@ +diff --git a/build-aux/meson/find_xdg_file.py b/build-aux/meson/find_xdg_file.py +index 8e12823..1704a72 100644 +--- a/build-aux/meson/find_xdg_file.py ++++ b/build-aux/meson/find_xdg_file.py +@@ -21,7 +21,7 @@ if not data_home or data_home == '': + + data_dirs_str = os.getenv('XDG_DATA_DIRS') + if not data_dirs_str or data_dirs_str == '': +- data_dirs_str = '/usr/local/share/:/usr/share/' ++ data_dirs_str = '@TERMUX_PREFIX@/local/share/:@TERMUX_PREFIX@/share/' + + dirs = [] + dirs += [ data_home ] +diff --git a/panels/power/power-panel-scenario-tester.py b/panels/power/power-panel-scenario-tester.py +index 75adc7d..ae34ae6 100755 +--- a/panels/power/power-panel-scenario-tester.py ++++ b/panels/power/power-panel-scenario-tester.py +@@ -62,7 +62,7 @@ class GccDBusTestCase(DBusTestCase): + + if not os.environ.get('UNDER_JHBUILD', False) or klass.upowerd_path == None: + klass.upowerd_path = None +- with open('/usr/share/dbus-1/system-services/org.freedesktop.UPower.service') as f: ++ with open('@TERMUX_PREFIX@/share/dbus-1/system-services/org.freedesktop.UPower.service') as f: + for line in f: + if line.startswith('Exec='): + klass.upowerd_path = line.split('=', 1)[1].strip() +diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c +index a31a606..424c935 100644 +--- a/panels/printers/pp-host.c ++++ b/panels/printers/pp-host.c +@@ -256,7 +256,7 @@ _pp_host_get_snmp_devices_thread (GTask *task, + devices = g_ptr_array_new_with_free_func (g_object_unref); + + argv = g_new0 (gchar *, 3); +- argv[0] = g_strdup ("/usr/lib/cups/backend/snmp"); ++ argv[0] = g_strdup ("@TERMUX_PREFIX@/lib/cups/backend/snmp"); + argv[1] = g_strdup (priv->hostname); + + /* Use SNMP to get printer's informations */ +diff --git a/panels/printers/pp-options-dialog.c b/panels/printers/pp-options-dialog.c +index e7416f3..89dccf4 100644 +--- a/panels/printers/pp-options-dialog.c ++++ b/panels/printers/pp-options-dialog.c +@@ -805,8 +805,8 @@ test_page_cb (PpOptionsDialog *self) + + if (self->printer_name) + { +- const gchar *const dirs[] = { "/usr/share/cups", +- "/usr/local/share/cups", ++ const gchar *const dirs[] = { "@TERMUX_PREFIX@/share/cups", ++ "@TERMUX_PREFIX@/local/share/cups", + NULL }; + const gchar *datadir = NULL; + g_autofree gchar *filename = NULL; +diff --git a/panels/system/datetime/tz.h b/panels/system/datetime/tz.h +index feef165..c50fd4d 100644 +--- a/panels/system/datetime/tz.h ++++ b/panels/system/datetime/tz.h +@@ -28,9 +28,9 @@ + G_BEGIN_DECLS + + #ifndef __sun +-# define TZ_DATA_FILE "/usr/share/zoneinfo/zone.tab" ++# define TZ_DATA_FILE "@TERMUX_PREFIX@/share/zoneinfo/zone.tab" + #else +-# define TZ_DATA_FILE "/usr/share/lib/zoneinfo/tab/zone_sun.tab" ++# define TZ_DATA_FILE "@TERMUX_PREFIX@/share/lib/zoneinfo/tab/zone_sun.tab" + #endif + + typedef struct _TzDB TzDB; diff --git a/x11-packages/gnome-control-center/0005-remove-user-and-secure-shell-section.patch b/x11-packages/gnome-control-center/0005-remove-user-and-secure-shell-section.patch new file mode 100644 index 00000000000..a5a91ee5928 --- /dev/null +++ b/x11-packages/gnome-control-center/0005-remove-user-and-secure-shell-section.patch @@ -0,0 +1,177 @@ +diff --git a/panels/system/cc-system-panel.c b/panels/system/cc-system-panel.c +index a81e9a4..bf58e46 100644 +--- a/panels/system/cc-system-panel.c ++++ b/panels/system/cc-system-panel.c +@@ -32,8 +32,10 @@ + #include "datetime/cc-datetime-page.h" + #include "region/cc-region-page.h" + #include "remote-desktop/cc-remote-desktop-page.h" ++#ifndef __ANDROID__ + #include "secure-shell/cc-secure-shell-page.h" + #include "users/cc-users-page.h" ++#endif + + struct _CcSystemPanel + { +@@ -43,9 +45,11 @@ struct _CcSystemPanel + AdwActionRow *datetime_row; + AdwActionRow *region_row; + AdwActionRow *remote_desktop_row; ++#ifndef __ANDROID__ + AdwActionRow *users_row; + + CcSecureShellPage *secure_shell_dialog; ++#endif + AdwNavigationPage *software_updates_group; + }; + +@@ -118,6 +122,7 @@ cc_system_page_open_software_update (CcSystemPanel *self) + g_warning ("Failed to spawn %s: %s", argv[0], error->message); + } + ++#ifndef __ANDROID__ + static void + on_secure_shell_row_clicked (CcSystemPanel *self) + { +@@ -130,7 +135,7 @@ on_secure_shell_row_clicked (CcSystemPanel *self) + + adw_dialog_present (ADW_DIALOG (self->secure_shell_dialog), GTK_WIDGET (self)); + } +- ++#endif + static void + cc_system_panel_class_init (CcSystemPanelClass *klass) + { +@@ -142,19 +147,25 @@ cc_system_panel_class_init (CcSystemPanelClass *klass) + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, datetime_row); + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, region_row); + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, remote_desktop_row); ++#ifndef __ANDROID__ + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, users_row); ++#endif + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, software_updates_group); + + gtk_widget_class_bind_template_callback (widget_class, cc_system_page_open_software_update); ++#ifndef __ANDROID__ + gtk_widget_class_bind_template_callback (widget_class, on_secure_shell_row_clicked); ++#endif + + g_type_ensure (CC_TYPE_ABOUT_PAGE); + g_type_ensure (CC_TYPE_DATE_TIME_PAGE); + g_type_ensure (CC_TYPE_LIST_ROW); + g_type_ensure (CC_TYPE_REGION_PAGE); + g_type_ensure (CC_TYPE_REMOTE_DESKTOP_PAGE); ++#ifndef __ANDROID__ + g_type_ensure (CC_TYPE_SECURE_SHELL_PAGE); + g_type_ensure (CC_TYPE_USERS_PAGE); ++#endif + } + + static void +@@ -175,5 +186,7 @@ cc_system_panel_init (CcSystemPanel *self) + cc_panel_add_static_subpage (CC_PANEL (self), "datetime", CC_TYPE_DATE_TIME_PAGE); + cc_panel_add_static_subpage (CC_PANEL (self), "region", CC_TYPE_REGION_PAGE); + cc_panel_add_static_subpage (CC_PANEL (self), "remote-desktop", CC_TYPE_REMOTE_DESKTOP_PAGE); ++#ifndef __ANDROID__ + cc_panel_add_static_subpage (CC_PANEL (self), "users", CC_TYPE_USERS_PAGE); ++#endif + } +--- a/panels/system/cc-system-panel.blp ++++ b/panels/system/cc-system-panel.blp +@@ -30,16 +30,6 @@ template $CcSystemPanel: $CcPanel { + action-target: "'datetime'"; + } + +- $CcListRow users_row { +- title: _("_Users"); +- subtitle: _("Add and remove accounts, change password"); +- icon-name: "org.gnome.Settings-users-symbolic"; +- use-underline: true; +- show-arrow: true; +- action-name: "navigation.push"; +- action-target: "'users'"; +- } +- + $CcListRow remote_desktop_row { + title: _("R_emote Desktop"); + subtitle: _("Allow this device to be used remotely"); +@@ -49,14 +39,6 @@ template $CcSystemPanel: $CcPanel { + action-target: "'remote-desktop'"; + } + +- $CcListRow { +- title: _("Se_cure Shell"); +- subtitle: _("SSH network access"); +- icon-name: "utilities-terminal-symbolic"; +- show-arrow: true; +- activated => $on_secure_shell_row_clicked(template); +- } +- + $CcListRow about_row { + title: _("_About"); + subtitle: _("Hardware details and software versions"); +diff --git a/panels/system/meson.build b/panels/system/meson.build +index a9ac171..b8b06b9 100644 +--- a/panels/system/meson.build ++++ b/panels/system/meson.build +@@ -41,23 +41,7 @@ sources = files( + 'remote-desktop/cc-remote-desktop-page.c', + 'remote-desktop/cc-remote-login-page.c', + 'remote-desktop/cc-tls-certificate.c', +- 'secure-shell/cc-secure-shell.c', +- 'secure-shell/cc-secure-shell-page.c', +- 'users/cc-add-user-dialog.c', +- 'users/cc-avatar-chooser.c', +- 'users/cc-crop-area.c', +- 'users/cc-entry-feedback.c', +- 'users/cc-enterprise-login-dialog.c', +- 'users/cc-fingerprint-dialog.c', +- 'users/cc-fingerprint-manager.c', +- 'users/cc-password-dialog.c', +- 'users/cc-realm-manager.c', +- 'users/cc-user-page.c', +- 'users/cc-users-page.c', +- 'users/pw-utils.c', +- 'users/run-passwd.c', +- 'users/user-utils.c', +-) ++ ) + + sources += gnome.compile_resources( + 'cc-' + cappletname + '-resources', +@@ -132,8 +116,10 @@ subdir('datetime') + subdir('icons') + subdir('region') + subdir('remote-desktop') ++if host_is_linux + subdir('secure-shell') + subdir('users') ++endif + + panels_libs += static_library( + cappletname, +diff --git a/panels/system/system.gresource.xml b/panels/system/system.gresource.xml +index 6df8843..bc90942 100644 +--- a/panels/system/system.gresource.xml ++++ b/panels/system/system.gresource.xml +@@ -14,20 +14,6 @@ + region/cc-format-chooser.ui + region/cc-format-preview.ui + region/region.css +- remote-desktop/cc-encryption-fingerprint-dialog.ui +- remote-desktop/cc-remote-desktop-page.ui +- remote-desktop/cc-remote-login-page.ui +- remote-desktop/cc-desktop-sharing-page.ui +- remote-desktop/remote-desktop.css +- secure-shell/cc-secure-shell-page.ui +- users/cc-add-user-dialog.ui +- users/cc-avatar-chooser.ui +- users/cc-entry-feedback.ui +- users/cc-enterprise-login-dialog.ui +- users/cc-fingerprint-dialog.ui +- users/cc-password-dialog.ui +- users/cc-users-page.ui +- users/cc-user-page.ui + users/users.css + eff_short_wordlist_2_0.txt + diff --git a/x11-packages/gnome-control-center/0006-don-t-relay-on-pwquality.patch b/x11-packages/gnome-control-center/0006-don-t-relay-on-pwquality.patch new file mode 100644 index 00000000000..6651af4f9b0 --- /dev/null +++ b/x11-packages/gnome-control-center/0006-don-t-relay-on-pwquality.patch @@ -0,0 +1,63 @@ +diff --git a/meson.build b/meson.build +index 22da3cf..ceb222c 100644 +--- a/meson.build ++++ b/meson.build +@@ -208,7 +208,6 @@ x11_dep = dependency('x11', version: '>= 1.8') + xi_dep = dependency('xi', version: '>= 1.2') + epoxy_dep = dependency('epoxy') + gcr_dep = dependency('gcr-4', version: '>= 4.1.0') +-pwquality_dep = dependency('pwquality', version: '>= 1.2.2') + + m_dep = cc.find_library('m') + +diff --git a/panels/system/meson.build b/panels/system/meson.build +index b8b06b9..00a5105 100644 +--- a/panels/system/meson.build ++++ b/panels/system/meson.build +@@ -82,7 +82,6 @@ deps = common_deps + [ + libsecret_dep, + krb_dep, + polkit_gobject_dep, +- pwquality_dep, + udisks2, + ] + +diff --git a/panels/system/remote-desktop/cc-desktop-sharing-page.c b/panels/system/remote-desktop/cc-desktop-sharing-page.c +index 58178d8..9d53d9e 100644 +--- a/panels/system/remote-desktop/cc-desktop-sharing-page.c ++++ b/panels/system/remote-desktop/cc-desktop-sharing-page.c +@@ -44,7 +44,6 @@ + #endif + + #include +-#include + #include + + #include "org.gnome.RemoteDesktop.h" +@@ -418,10 +417,23 @@ setup_desktop_sharing_page (CcDesktopSharingPage *self) + if (username == NULL) + { + struct passwd *pw = getpwuid (getuid ()); +- if (pw != NULL) +- username = g_strdup (pw->pw_name); ++ if (pw != NULL && pw->pw_name != NULL) ++ { ++ username = g_strdup (pw->pw_name); ++ } + else +- g_warning ("Failed to get username: %s", g_strerror (errno)); ++ { ++ const char *env_user = g_getenv ("USER"); ++ if (env_user != NULL) ++ { ++ username = g_strdup (env_user); ++ } ++ else ++ { ++ username = g_strdup ("termux"); ++ g_warning ("Failed to get username, using fallback 'termux': %s", g_strerror (errno)); ++ } ++ } + } + gtk_editable_set_text (GTK_EDITABLE (self->username_entry), username); + diff --git a/x11-packages/gnome-control-center/0007-disable-polkit.patch b/x11-packages/gnome-control-center/0007-disable-polkit.patch new file mode 100644 index 00000000000..4e39b083b94 --- /dev/null +++ b/x11-packages/gnome-control-center/0007-disable-polkit.patch @@ -0,0 +1,401 @@ +diff --git a/meson.build b/meson.build +index 052babb..5b2a3af 100644 +--- a/meson.build ++++ b/meson.build +@@ -214,14 +214,22 @@ common_deps = [ + gtk_dep, + ] + +-polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103') +-# Also verify that polkit ITS files exist: +-# https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/491 +-polkit_files = [ 'gettext/its/polkit.its', 'gettext/its/polkit.loc' ] +-foreach polkit_file: polkit_files +- r = run_command('build-aux/meson/find_xdg_file.py', polkit_file, check: true) +- assert(r.returncode() == 0, 'ITS support missing from polkit, please upgrade or contact your distribution') +-endforeach ++build_with_polkit = get_option('polkit') ++if build_with_polkit ++ polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103') ++ # Also verify that polkit ITS files exist: ++ # https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/491 ++ polkit_files = [ 'gettext/its/polkit.its', 'gettext/its/polkit.loc' ] ++ foreach polkit_file: polkit_files ++ r = run_command('build-aux/meson/find_xdg_file.py', polkit_file, check: true) ++ assert(r.returncode() == 0, 'ITS support missing from polkit, please upgrade or contact your distribution') ++ endforeach ++else ++ polkit_gobject_dep = dependency('', required: false) ++endif ++ ++config_h.set('HAVE_POLKIT_SUPPORT', build_with_polkit, ++ description: 'Defined if build with polkit') + + # Localisation API + if cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY') +diff --git a/meson_options.txt b/meson_options.txt +index b2302bf..8ea5c57 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -10,3 +10,4 @@ option('profile', type: 'combo', choices: ['default','development'], value: 'def + option('malcontent', type: 'boolean', value: false, description: 'build with malcontent support') + option('distributor_logo', type: 'string', description: 'absolute path to distributor logo for the About panel') + option('dark_mode_distributor_logo', type: 'string', description: 'absolute path to distributor logo dark mode variant') ++option('polkit', type: 'boolean', value: true, description: 'Enable polkit support') +diff --git a/panels/common/cc-hostname-entry.c b/panels/common/cc-hostname-entry.c +index 29e3b98..9838aed 100644 +--- a/panels/common/cc-hostname-entry.c ++++ b/panels/common/cc-hostname-entry.c +@@ -23,8 +23,9 @@ + #include "cc-hostname.h" + #include "cc-hostname-entry.h" + #include "hostname-helper.h" +- ++#ifdef HAVE_POLKIT_SUPPORT + #include ++#endif + + struct _CcHostnameEntry + { +@@ -87,7 +88,7 @@ cc_hostname_entry_constructed (GObject *object) + GPermission *permission; + g_autoptr(GError) error = NULL; + g_autofree gchar *str = NULL; +- ++#ifdef HAVE_POLKIT_SUPPORT + permission = polkit_permission_new_sync ("org.freedesktop.hostname1.set-static-hostname", + NULL, NULL, NULL); + +@@ -108,7 +109,7 @@ cc_hostname_entry_constructed (GObject *object) + g_debug ("Not allowed to change the hostname"); + gtk_widget_set_sensitive (GTK_WIDGET (self), FALSE); + } +- ++#endif + str = cc_hostname_get_display_hostname (cc_hostname_get_default ()); + if (str != NULL) + gtk_editable_set_text (GTK_EDITABLE (self), str); +diff --git a/panels/common/meson.build b/panels/common/meson.build +index 7314235..88420e5 100644 +--- a/panels/common/meson.build ++++ b/panels/common/meson.build +@@ -107,6 +107,7 @@ libdevice_dep = declare_dependency( + link_with: libdevice + ) + ++if build_with_polkit + polkit_conf = configuration_data() + polkit_conf.set('PRIVILEGED_GROUP', get_option('privileged_group')) + configure_file( +@@ -115,3 +116,4 @@ configure_file( + configuration: polkit_conf, + install_dir: join_paths(control_center_datadir, 'polkit-1', 'rules.d') + ) ++endif +diff --git a/panels/system/datetime/cc-datetime-page.c b/panels/system/datetime/cc-datetime-page.c +index 0c51dc3..6060d02 100644 +--- a/panels/system/datetime/cc-datetime-page.c ++++ b/panels/system/datetime/cc-datetime-page.c +@@ -42,7 +42,9 @@ + #include + #include + #include ++#ifdef HAVE_POLKIT_SUPPORT + #include ++#endif + + /* FIXME: This should be "Etc/GMT" instead */ + #define DEFAULT_TZ "Europe/London" +@@ -870,6 +872,7 @@ cc_date_time_page_init (CcDateTimePage *self) + gtk_list_box_invalidate_sort (self->date_box); + + /* add the lock button */ ++#ifdef HAVE_POLKIT_SUPPORT + self->permission = polkit_permission_new_sync (DATETIME_PERMISSION, NULL, NULL, NULL); + self->tz_permission = polkit_permission_new_sync (DATETIME_TZ_PERMISSION, NULL, NULL, NULL); + if (self->permission != NULL) +@@ -882,6 +885,7 @@ cc_date_time_page_init (CcDateTimePage *self) + g_warning ("Your system does not have the '%s' PolicyKit files installed. Please check your installation", + DATETIME_PERMISSION); + } ++#endif + cc_permission_infobar_set_permission (self->permission_infobar, self->permission); + + self->location_settings = g_settings_new (LOCATION_SETTINGS); +diff --git a/panels/system/datetime/meson.build b/panels/system/datetime/meson.build +index cd94085..5202509 100644 +--- a/panels/system/datetime/meson.build ++++ b/panels/system/datetime/meson.build +@@ -7,7 +7,7 @@ i18n.merge_file( + install: true, + install_dir: control_center_desktopdir + ) +- ++if build_with_polkit + polkit = 'org.gnome.controlcenter.@0@.policy'.format(cappletname) + + i18n.merge_file( +@@ -17,7 +17,7 @@ i18n.merge_file( + install: true, + install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions') + ) +- ++endif + gdbus = 'timedated' + gdbus_iface_xml = gdbus + '1-interface.xml' + +diff --git a/panels/system/region/cc-region-page.c b/panels/system/region/cc-region-page.c +index d723018..aa821fe 100644 +--- a/panels/system/region/cc-region-page.c ++++ b/panels/system/region/cc-region-page.c +@@ -46,7 +46,9 @@ + #include + + #include ++#ifdef HAVE_POLKIT_SUPPORT + #include ++#endif + + #define GNOME_SYSTEM_LOCALE_DIR "org.gnome.system.locale" + #define KEY_REGION "region" +@@ -70,8 +72,9 @@ struct _CcRegionPage { + CcListRow *language_row; + CcLanguageChooser *language_chooser; + CcFormatChooser *format_chooser; +- ++#ifdef HAVE_POLKIT_SUPPORT + gboolean login_auto_apply; ++#endif + GPermission *permission; + GDBusProxy *localed; + GDBusProxy *session; +@@ -314,8 +317,10 @@ update_language (CcRegionPage *self, + g_set_str (&self->language, language); + set_accountservice_languages (self); + ++#ifdef HAVE_POLKIT_SUPPORT + if (self->login_auto_apply) + set_system_language (self, language); ++#endif + maybe_notify (self, LC_MESSAGES, language); + + update_user_language_row (self); +@@ -357,8 +362,10 @@ update_region (CcRegionPage *self, + + set_accountservice_languages (self); + ++#ifdef HAVE_POLKIT_SUPPORT + if (self->login_auto_apply) + set_system_region (self, region); ++#endif + + if (region == NULL || region[0] == '\0') { + // Formats (region) are being reset as part of changing the language, +@@ -615,8 +622,12 @@ set_login_button_visibility (CcRegionPage *self) + + g_object_get (self->user_manager, "has-multiple-users", &has_multiple_users, NULL); + ++#ifdef HAVE_POLKIT_SUPPORT + self->login_auto_apply = !has_multiple_users && g_permission_get_allowed (self->permission); + gtk_widget_set_visible (self->login_group, !self->login_auto_apply); ++#else ++ gtk_widget_set_visible (self->login_group, TRUE); ++#endif + + g_signal_handlers_disconnect_by_func (self->user_manager, set_login_button_visibility, self); + } +@@ -696,6 +707,7 @@ localed_proxy_ready (GObject *source, + static void + setup_login_permission (CcRegionPage *self) + { ++#ifdef HAVE_POLKIT_SUPPORT + g_autoptr(GDBusConnection) bus = NULL; + g_autoptr(GError) error = NULL; + gboolean can_acquire; +@@ -730,6 +742,7 @@ setup_login_permission (CcRegionPage *self) + (g_permission_get_allowed (self->permission) || + g_permission_get_can_acquire (self->permission)); + gtk_widget_set_sensitive (self->login_group, can_acquire); ++#endif + } + + static void +@@ -755,6 +768,7 @@ session_proxy_ready (GObject *source, + static void + on_login_formats_row_activated_cb (CcRegionPage *self) + { ++#ifdef HAVE_POLKIT_SUPPORT + if (g_permission_get_allowed (self->permission)) { + show_format_chooser (self, SYSTEM); + } else if (g_permission_get_can_acquire (self->permission)) { +@@ -763,11 +777,15 @@ on_login_formats_row_activated_cb (CcRegionPage *self) + choose_region_permission_cb, + self); + } ++#else ++ show_format_chooser (self, SYSTEM); ++#endif + } + + static void + on_login_language_row_activated_cb (CcRegionPage *self) + { ++#ifdef HAVE_POLKIT_SUPPORT + if (g_permission_get_allowed (self->permission)) { + show_language_chooser (self, SYSTEM); + } else if (g_permission_get_can_acquire (self->permission)) { +@@ -776,6 +794,9 @@ on_login_language_row_activated_cb (CcRegionPage *self) + choose_language_permission_cb, + self); + } ++#else ++ show_language_chooser(self, SYSTEM); ++#endif + } + + static void +diff --git a/panels/system/remote-desktop/cc-remote-login-page.c b/panels/system/remote-desktop/cc-remote-login-page.c +index 0e9ba99..a5bc09f 100644 +--- a/panels/system/remote-desktop/cc-remote-login-page.c ++++ b/panels/system/remote-desktop/cc-remote-login-page.c +@@ -22,7 +22,9 @@ + + #include + #include ++#ifdef HAVE_POLKIT_SUPPORT + #include ++#endif + #include + #include + +@@ -43,7 +45,9 @@ + #define REMOTE_DESKTOP_STORE_CREDENTIALS_TIMEOUT_S 2 + #define REMOTE_LOGIN_DBUS_SERVICE "org.gnome.RemoteDesktop.Configuration" + #define REMOTE_LOGIN_OBJECT_PATH "/org/gnome/RemoteDesktop/Configuration" ++#ifdef HAVE_POLKIT_SUPPORT + #define REMOTE_LOGIN_PERMISSION "org.gnome.controlcenter.remote-session-helper" ++#endif + + struct _CcRemoteLoginPage { + AdwBin parent_instance; +@@ -52,7 +56,9 @@ struct _CcRemoteLoginPage { + + AdwSwitchRow *remote_login_row; + GtkWidget *toast_overlay; ++#ifdef HAVE_POLKIT_SUPPORT + CcPermissionInfobar *permission_infobar; ++#endif + AdwActionRow *hostname_row; + AdwActionRow *port_row; + GtkWidget *credentials_group; +@@ -64,7 +70,9 @@ struct _CcRemoteLoginPage { + GTlsCertificate *certificate; + + GCancellable *cancellable; ++#ifdef HAVE_POLKIT_SUPPORT + GPermission *permission; ++#endif + + char *temp_cert_dir; + char *cert_path; +@@ -157,7 +165,9 @@ block_remote_login_row_activation (CcRemoteLoginPage *self) + static void + unblock_remote_login_row_activation (CcRemoteLoginPage *self) + { ++#ifdef HAVE_POLKIT_SUPPORT + if (g_permission_get_allowed (self->permission)) ++#endif + gtk_widget_set_sensitive (GTK_WIDGET (self->remote_login_row), TRUE); + self->activating_blocked = FALSE; + } +@@ -364,10 +374,12 @@ disable_remote_login_service (CcRemoteLoginPage *self) + static void + on_remote_login_active_changed (CcRemoteLoginPage *self) + { ++#ifdef HAVE_POLKIT_SUPPORT + if (adw_switch_row_get_active (self->remote_login_row)) + enable_remote_login (self); + else + disable_remote_login_service (self); ++#endif + } + + static void +@@ -451,6 +463,7 @@ hide_password (CcRemoteLoginPage *self) + static void + sync_permissions (CcRemoteLoginPage *self) + { ++#ifdef HAVE_POLKIT_SUPPORT + if (!g_permission_get_allowed (self->permission)) + { + hide_password (self); +@@ -467,6 +480,7 @@ sync_permissions (CcRemoteLoginPage *self) + if (self->have_credentials) + gtk_widget_set_sensitive (self->credentials_group, TRUE); + } ++#endif + } + + static void +@@ -476,7 +490,9 @@ cc_remote_login_page_dispose (GObject *object) + + g_cancellable_cancel (self->cancellable); + g_clear_object (&self->cancellable); ++#ifdef HAVE_POLKIT_SUPPORT + g_clear_object (&self->permission); ++#endif + + g_clear_pointer (&self->temp_cert_dir, g_free); + g_clear_pointer (&self->cert_path, g_free); +@@ -570,6 +586,7 @@ on_got_rdp_credentials (GObject *source_object, + static void + fetch_credentials (CcRemoteLoginPage *self) + { ++#ifdef HAVE_POLKIT_SUPPORT + g_autoptr(GError) error = NULL; + g_autofree gchar *username = NULL; + g_autofree gchar *password = NULL; +@@ -582,6 +599,7 @@ fetch_credentials (CcRemoteLoginPage *self) + (GAsyncReadyCallback) + on_got_rdp_credentials, + self); ++#endif + } + + static void +@@ -706,6 +724,7 @@ cc_remote_login_page_init (CcRemoteLoginPage *self) + G_CALLBACK (on_remote_login_active_changed), self, + G_CONNECT_SWAPPED); + ++#ifdef HAVE_POLKIT_SUPPORT + self->permission = (GPermission*) polkit_permission_new_sync (REMOTE_LOGIN_PERMISSION, NULL, self->cancellable, &error); + + if (error != NULL) +@@ -718,7 +737,9 @@ cc_remote_login_page_init (CcRemoteLoginPage *self) + g_signal_connect_swapped (self->permission, "notify::allowed", + G_CALLBACK (sync_permissions), + self); +- ++#else ++ self->permission = NULL; ++#endif + g_object_bind_property (self->password_entry, "sensitive", + self->generate_password_button_row, "sensitive", + G_BINDING_SYNC_CREATE); +diff --git a/panels/system/remote-desktop/meson.build b/panels/system/remote-desktop/meson.build +index 16dfc40..579eea2 100644 +--- a/panels/system/remote-desktop/meson.build ++++ b/panels/system/remote-desktop/meson.build +@@ -6,6 +6,7 @@ sources += gnome.gdbus_codegen( + namespace: 'Gsd' + ) + ++if build_with_polkit + polkit_conf = configuration_data() + polkit_conf.set('libexecdir', control_center_libexecdir) + polkit = 'org.gnome.controlcenter.remote-session-helper.policy' +@@ -23,3 +24,4 @@ i18n.merge_file( + install: true, + install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions') + ) ++endif diff --git a/x11-packages/gnome-control-center/0008-remove-udev.patch b/x11-packages/gnome-control-center/0008-remove-udev.patch new file mode 100644 index 00000000000..7d3ebf0c5ff --- /dev/null +++ b/x11-packages/gnome-control-center/0008-remove-udev.patch @@ -0,0 +1,182 @@ +--- a/meson.build ++++ b/meson.build +@@ -208,7 +208,14 @@ libxml_dep = dependency('libxml-2.0') + pulse_dep = dependency('libpulse', version: pulse_req_version) + pulse_mainloop_dep = dependency('libpulse-mainloop-glib', version: pulse_req_version) + upower_glib_dep = dependency('upower-glib', version: '>= 1.90.6') +-gudev_dep = dependency('gudev-1.0', version: '>= 232') ++enable_udev = get_option('udev') ++if enable_udev.enabled() ++ gudev_dep = dependency('gudev-1.0', version: '>= 232') ++else ++ gudev_dep = dependency('', required: false) ++endif ++config_h.set('HAVE_UDEV', enable_udev.enabled(), ++ description: 'Defined if to build with udev support') + epoxy_dep = dependency('epoxy') + gcr_dep = dependency('gcr-4', version: '>= 4.1.0') + +diff --git a/meson_options.txt b/meson_options.txt +index 8ea5c57..17f03ea 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -11,3 +11,4 @@ option('malcontent', type: 'boolean', value: false, description: 'build with mal + option('distributor_logo', type: 'string', description: 'absolute path to distributor logo for the About panel') + option('dark_mode_distributor_logo', type: 'string', description: 'absolute path to distributor logo dark mode variant') + option('polkit', type: 'boolean', value: true, description: 'Enable polkit support') ++option('udev', type: 'feature', value: 'enabled', description: 'Enable udev support') +diff --git a/panels/common/gsd-device-manager.c b/panels/common/gsd-device-manager.c +index 5a5002e..f0d893a 100644 +--- a/panels/common/gsd-device-manager.c ++++ b/panels/common/gsd-device-manager.c +@@ -22,7 +22,9 @@ + #include "config.h" + + #include ++#ifdef HAVE_UDEV + #include ++#endif + + #include "gsd-device-manager.h" + #include "gsd-common-enums.h" +@@ -53,8 +55,10 @@ G_DEFINE_TYPE_WITH_PRIVATE (GsdDevice, gsd_device, G_TYPE_OBJECT) + typedef struct + { + GObject parent_instance; ++#ifdef HAVE_UDEV + GHashTable *devices; + GUdevClient *udev_client; ++#endif + } GsdDeviceManagerPrivate; + + enum { +@@ -75,6 +79,7 @@ enum { + N_SIGNALS + }; + ++#ifdef HAVE_UDEV + /* Index matches GsdDeviceType */ + const gchar *udev_ids[] = { + "ID_INPUT_MOUSE", +@@ -84,6 +89,7 @@ const gchar *udev_ids[] = { + "ID_INPUT_TOUCHSCREEN", + "ID_INPUT_TABLET_PAD", + }; ++#endif + + static guint signals[N_SIGNALS] = { 0 }; + +@@ -272,10 +278,10 @@ gsd_device_manager_finalize (GObject *object) + { + GsdDeviceManager *manager = GSD_DEVICE_MANAGER (object); + GsdDeviceManagerPrivate *priv = gsd_device_manager_get_instance_private (manager); +- ++#ifdef HAVE_UDEV + g_hash_table_destroy (priv->devices); + g_object_unref (priv->udev_client); +- ++#endif + G_OBJECT_CLASS (gsd_device_manager_parent_class)->finalize (object); + } + +@@ -283,6 +289,7 @@ static GList * + gsd_device_manager_real_list_devices (GsdDeviceManager *manager, + GsdDeviceType type) + { ++#ifdef HAVE_UDEV + GsdDeviceManagerPrivate *priv = gsd_device_manager_get_instance_private (manager); + GsdDeviceType device_type; + GList *devices = NULL; +@@ -299,12 +306,16 @@ gsd_device_manager_real_list_devices (GsdDeviceManager *manager, + } + + return devices; ++#else ++ return NULL; ++#endif + } + + static GsdDevice * + gsd_device_manager_real_lookup_device (GsdDeviceManager *manager, + GdkDevice *gdk_device) + { ++#ifdef HAVE_UDEV + GsdDeviceManagerPrivate *priv = gsd_device_manager_get_instance_private (manager); + GdkDisplay *display = gdk_device_get_display (gdk_device); + const gchar *node_path = NULL; +@@ -351,6 +362,9 @@ gsd_device_manager_real_lookup_device (GsdDeviceManager *manager, + } + + return NULL; ++#else ++ return NULL; ++#endif + } + + static void +@@ -391,6 +405,7 @@ gsd_device_manager_class_init (GsdDeviceManagerClass *klass) + GSD_TYPE_DEVICE | G_SIGNAL_TYPE_STATIC_SCOPE); + } + ++#ifdef HAVE_UDEV + static GsdDeviceType + udev_device_get_device_type (GUdevDevice *device) + { +@@ -505,10 +520,12 @@ udev_event_cb (GUdevClient *client, + remove_device (manager, device); + } + } ++#endif + + static void + gsd_device_manager_init (GsdDeviceManager *manager) + { ++#ifdef HAVE_UDEV + GsdDeviceManagerPrivate *priv = gsd_device_manager_get_instance_private (manager); + const gchar *subsystems[] = { "input", NULL }; + g_autoptr(GList) devices = NULL; +@@ -531,6 +548,7 @@ gsd_device_manager_init (GsdDeviceManager *manager) + if (device_is_evdev (device)) + add_device (manager, device); + } ++#endif + } + + GsdDeviceManager * +diff --git a/panels/system/about/cc-system-details-window.c b/panels/system/about/cc-system-details-window.c +index 028ed1d..05c87f5 100644 +--- a/panels/system/about/cc-system-details-window.c ++++ b/panels/system/about/cc-system-details-window.c +@@ -34,7 +34,9 @@ + #include + #include + #include ++#ifdef HAVE_UDEV + #include ++#endif + + #include + +@@ -623,6 +625,7 @@ get_ram_size_libgtop (void) + return mem.total; + } + ++#ifdef HAVE_UDEV + guint64 + get_ram_size_dmi (void) + { +@@ -646,6 +649,14 @@ get_ram_size_dmi (void) + } + return ram_total; + } ++#else ++guint64 ++get_ram_size_dmi (void) ++{ ++ /* udev not available, return 0 to fall back to libgtop */ ++ return 0; ++} ++#endif + + static void + system_details_window_title_print_padding (const gchar *title, GString *dst_string, gsize maxlen) diff --git a/x11-packages/gnome-control-center/0009-remove-udisk2.patch b/x11-packages/gnome-control-center/0009-remove-udisk2.patch new file mode 100644 index 00000000000..6bfefd8699a --- /dev/null +++ b/x11-packages/gnome-control-center/0009-remove-udisk2.patch @@ -0,0 +1,64 @@ +diff --git a/panels/system/about/cc-system-details-window.c b/panels/system/about/cc-system-details-window.c +index 05c87f5..f8a3f96 100644 +--- a/panels/system/about/cc-system-details-window.c ++++ b/panels/system/about/cc-system-details-window.c +@@ -33,7 +33,11 @@ + #include + #include + #include ++ ++#ifdef HAVE__UDISK2 + #include ++#endif ++ + #ifdef HAVE_UDEV + #include + #endif +@@ -351,12 +355,13 @@ get_os_type (void) + { + if (GLIB_SIZEOF_VOID_P == 8) + /* translators: This is the type of architecture for the OS */ +- return g_strdup_printf (_("64-bit")); ++ return g_strdup_printf ("%s", _("64-bit")); + else + /* translators: This is the type of architecture for the OS */ +- return g_strdup_printf (_("32-bit")); ++ return g_strdup_printf ("%s", _("32-bit")); + } + ++#ifdef HAVE__UDISK2 + char * + get_primary_disk_info (void) + { +@@ -401,6 +406,15 @@ get_primary_disk_info (void) + + return NULL; + } ++#else ++char * ++get_primary_disk_info (void) ++{ ++ /* UDisks2 not available, return NULL or some default value */ ++ g_warning("UDisks2 is not available. Disk information will not be available."); ++ return NULL; ++} ++#endif + + char * + get_hardware_model_string (void) +diff --git a/panels/system/meson.build b/panels/system/meson.build +index b8b06b9..bbc7b8b 100644 +--- a/panels/system/meson.build ++++ b/panels/system/meson.build +@@ -64,8 +64,9 @@ sources += gnome.mkenums_simple( + libsecret_dep = dependency('libsecret-1') + gnutls_dep = dependency('gnutls') + libgtop2 = dependency('libgtop-2.0') +-udisks2 = dependency('udisks2', version: '>= 2.8.2') +- ++udisks2 = dependency('udisks2', version: '>= 2.8.2', required: false) ++config_h.set('HAVE__UDISK2', udisks2.found(), ++ description: 'Build with udisk2') + # Kerberos support + krb_dep = dependency('krb5', required: false) + assert(krb_dep.found(), 'kerberos libraries not found in your path') diff --git a/x11-packages/gnome-control-center/0010-fix-locale-issue.patch b/x11-packages/gnome-control-center/0010-fix-locale-issue.patch new file mode 100644 index 00000000000..83e045428fa --- /dev/null +++ b/x11-packages/gnome-control-center/0010-fix-locale-issue.patch @@ -0,0 +1,16 @@ +diff --git a/panels/system/region/cc-format-preview.c b/panels/system/region/cc-format-preview.c +index 895f063..a79e3ba 100644 +--- a/panels/system/region/cc-format-preview.c ++++ b/panels/system/region/cc-format-preview.c +@@ -133,7 +133,11 @@ update_format_examples (CcFormatPreview *self) + else + old_locale = uselocale (locale); + ++#if defined(_NL_MEASUREMENT_MEASUREMENT) && defined(__GLIBC__) + fmt = nl_langinfo (_NL_MEASUREMENT_MEASUREMENT); ++#else ++ fmt = "1"; ++#endif + /* The returned pointer of nl_langinfo could be invalid after switching + locale, so we must use it here. */ + is_imperial = fmt && *fmt == 2; diff --git a/x11-packages/gnome-control-center/0011-remove-remote-desktop.patch b/x11-packages/gnome-control-center/0011-remove-remote-desktop.patch new file mode 100644 index 00000000000..d6294684b28 --- /dev/null +++ b/x11-packages/gnome-control-center/0011-remove-remote-desktop.patch @@ -0,0 +1,109 @@ +diff --git a/meson.build b/meson.build +index 5b2a3af..9dea0a9 100644 +--- a/meson.build ++++ b/meson.build +@@ -342,8 +342,6 @@ config_h.set('HAVE_WACOM', host_is_linux_not_s390, + description: 'Define to 1 if Wacom is supportted') + config_h.set('BUILD_THUNDERBOLT', host_is_linux_not_s390, + description: 'Define to 1 to build the Thunderbolt panel') +-config_h.set('HAVE__COLORD', colord_dep.found(), +- description: 'Build with color management in panel') + + gnome = import('gnome') + i18n = import('i18n') +diff --git a/panels/system/cc-system-panel.c b/panels/system/cc-system-panel.c +index bf58e46..58b33a1 100644 +--- a/panels/system/cc-system-panel.c ++++ b/panels/system/cc-system-panel.c +@@ -31,7 +31,6 @@ + #include "about/cc-about-page.h" + #include "datetime/cc-datetime-page.h" + #include "region/cc-region-page.h" +-#include "remote-desktop/cc-remote-desktop-page.h" + #ifndef __ANDROID__ + #include "secure-shell/cc-secure-shell-page.h" + #include "users/cc-users-page.h" +@@ -44,7 +43,6 @@ struct _CcSystemPanel + AdwActionRow *about_row; + AdwActionRow *datetime_row; + AdwActionRow *region_row; +- AdwActionRow *remote_desktop_row; + #ifndef __ANDROID__ + AdwActionRow *users_row; + +@@ -146,7 +144,6 @@ cc_system_panel_class_init (CcSystemPanelClass *klass) + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, about_row); + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, datetime_row); + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, region_row); +- gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, remote_desktop_row); + #ifndef __ANDROID__ + gtk_widget_class_bind_template_child (widget_class, CcSystemPanel, users_row); + #endif +@@ -161,7 +158,6 @@ cc_system_panel_class_init (CcSystemPanelClass *klass) + g_type_ensure (CC_TYPE_DATE_TIME_PAGE); + g_type_ensure (CC_TYPE_LIST_ROW); + g_type_ensure (CC_TYPE_REGION_PAGE); +- g_type_ensure (CC_TYPE_REMOTE_DESKTOP_PAGE); + #ifndef __ANDROID__ + g_type_ensure (CC_TYPE_SECURE_SHELL_PAGE); + g_type_ensure (CC_TYPE_USERS_PAGE); +@@ -176,16 +172,11 @@ cc_system_panel_init (CcSystemPanel *self) + g_resources_register (cc_system_get_resource ()); + gtk_widget_init_template (GTK_WIDGET (self)); + +- service_state = cc_get_service_state (REMOTE_DESKTOP_SERVICE, G_BUS_TYPE_SYSTEM); +- /* Hide the remote-desktop page if the g-r-d service is either "masked", "static", or "not-found". */ +- gtk_widget_set_visible (GTK_WIDGET (self->remote_desktop_row), service_state == CC_SERVICE_STATE_ENABLED || +- service_state == CC_SERVICE_STATE_DISABLED); + gtk_widget_set_visible (GTK_WIDGET (self->software_updates_group), show_software_updates_group (self)); + + cc_panel_add_static_subpage (CC_PANEL (self), "about", CC_TYPE_ABOUT_PAGE); + cc_panel_add_static_subpage (CC_PANEL (self), "datetime", CC_TYPE_DATE_TIME_PAGE); + cc_panel_add_static_subpage (CC_PANEL (self), "region", CC_TYPE_REGION_PAGE); +- cc_panel_add_static_subpage (CC_PANEL (self), "remote-desktop", CC_TYPE_REMOTE_DESKTOP_PAGE); + #ifndef __ANDROID__ + cc_panel_add_static_subpage (CC_PANEL (self), "users", CC_TYPE_USERS_PAGE); + #endif +diff --git a/panels/system/meson.build b/panels/system/meson.build +index b8b06b9..d63007e 100644 +--- a/panels/system/meson.build ++++ b/panels/system/meson.build +@@ -1,6 +1,7 @@ + panels_list += cappletname + desktop = 'gnome-@0@-panel.desktop'.format(cappletname) + ++if build_with_polkit + i18n.merge_file( + type: 'desktop', + input: desktop + '.in', +@@ -18,6 +19,7 @@ i18n.merge_file( + install: true, + install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions') + ) ++endif + + sources = files( + 'cc-password-utils.c', +@@ -35,13 +37,7 @@ sources = files( + 'region/cc-region-page.c', + 'region/cc-format-chooser.c', + 'region/cc-format-preview.c', +- 'remote-desktop/cc-desktop-sharing-page.c', +- 'remote-desktop/cc-encryption-fingerprint-dialog.c', +- 'remote-desktop/cc-gnome-remote-desktop.c', +- 'remote-desktop/cc-remote-desktop-page.c', +- 'remote-desktop/cc-remote-login-page.c', +- 'remote-desktop/cc-tls-certificate.c', +- ) ++ ) + + sources += gnome.compile_resources( + 'cc-' + cappletname + '-resources', +@@ -115,7 +111,6 @@ subdir('about') + subdir('datetime') + subdir('icons') + subdir('region') +-subdir('remote-desktop') + if host_is_linux + subdir('secure-shell') + subdir('users') diff --git a/x11-packages/gnome-control-center/0012-gnomevolumecontrol.patch b/x11-packages/gnome-control-center/0012-gnomevolumecontrol.patch new file mode 100644 index 00000000000..e2b62fe7dac --- /dev/null +++ b/x11-packages/gnome-control-center/0012-gnomevolumecontrol.patch @@ -0,0 +1,13 @@ +Fixes link-time conflict with graphviz + +--- a/subprojects/gvc/meson.build ++++ b/subprojects/gvc/meson.build +@@ -90,7 +90,7 @@ else + error('Installing shared library, but pkglibdir is unset!') + endif + +- libgvc_shared = shared_library('gvc', ++ libgvc_shared = shared_library('gnomevolumecontrol', + sources: libgvc_gir_sources + libgvc_no_gir_sources + libgvc_enums, + dependencies: libgvc_deps, + c_args: c_args, diff --git a/x11-packages/gnome-control-center/0013-disable-accountsservice.patch b/x11-packages/gnome-control-center/0013-disable-accountsservice.patch new file mode 100644 index 00000000000..ddaebaa3cdc --- /dev/null +++ b/x11-packages/gnome-control-center/0013-disable-accountsservice.patch @@ -0,0 +1,123 @@ +diff --git a/meson.build b/meson.build +index 7841741..779aa81 100644 +--- a/meson.build ++++ b/meson.build +@@ -181,7 +181,6 @@ subproject('libgxdp', + default_options: 'tests=false', + ) + +-accounts_dep = dependency('accountsservice', version: '>= 23.11.69') + colord_dep = dependency('colord', version: '>= 0.1.34', required: false) + gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.23.0') + gio_dep = dependency('gio-2.0') +diff --git a/panels/system/meson.build b/panels/system/meson.build +index db0897f..4ba9b20 100644 +--- a/panels/system/meson.build ++++ b/panels/system/meson.build +@@ -68,7 +68,6 @@ krb_dep = dependency('krb5', required: false) + assert(krb_dep.found(), 'kerberos libraries not found in your path') + + deps = common_deps + [ +- accounts_dep, + gcr_dep, + gdk_pixbuf_dep, + gnome_desktop_dep, +diff --git a/panels/system/region/cc-region-page.c b/panels/system/region/cc-region-page.c +index f32c2ad..e63dc93 100644 +--- a/panels/system/region/cc-region-page.c ++++ b/panels/system/region/cc-region-page.c +@@ -34,7 +34,6 @@ + #include "cc-list-row.h" + #include "cc-region-page.h" + +-#include + #include + #include + #include +@@ -78,8 +78,6 @@ struct _CcRegionPage { + GDBusProxy *localed; + GDBusProxy *session; + +- ActUserManager *user_manager; +- ActUser *user; + GSettings *locale_settings; + + gchar *language; +@@ -303,7 +302,6 @@ set_accountservice_languages (CcRegionPage *self) + if (g_strcmp0 (self->language, self->region) != 0 && self->region[0] != '\0') + languages[1] = self->region; + +- act_user_set_languages (self->user, languages); + } + + static void update_user_language_row (CcRegionPage *self); +@@ -547,8 +545,6 @@ update_language_from_user (CcRegionPage *self) + { + const gchar *language = NULL; + +- if (act_user_is_loaded (self->user)) +- language = act_user_get_language (self->user); + + if (language == NULL || *language == '\0') + language = setlocale (LC_MESSAGES, NULL); +@@ -569,12 +565,6 @@ update_region_from_setting (CcRegionPage *self) + static void + setup_language_section (CcRegionPage *self) + { +- self->user = act_user_manager_get_user_by_id (self->user_manager, getuid ()); +- g_signal_connect_object (self->user, "notify::language", +- G_CALLBACK (update_language_from_user), self, G_CONNECT_SWAPPED); +- g_signal_connect_object (self->user, "notify::is-loaded", +- G_CALLBACK (update_language_from_user), self, G_CONNECT_SWAPPED); +- + self->locale_settings = g_settings_new (GNOME_SYSTEM_LOCALE_DIR); + g_signal_connect_object (self->locale_settings, "changed::" KEY_REGION, + G_CALLBACK (update_region_from_setting), self, G_CONNECT_SWAPPED); +@@ -619,11 +609,7 @@ set_login_button_visibility (CcRegionPage *self) + gboolean has_multiple_users; + gboolean loaded; + +- g_object_get (self->user_manager, "is-loaded", &loaded, NULL); +- if (!loaded) +- return; +- +- g_object_get (self->user_manager, "has-multiple-users", &has_multiple_users, NULL); ++ return; + + #ifdef HAVE_POLKIT_SUPPORT + self->login_auto_apply = !has_multiple_users && g_permission_get_allowed (self->permission); +@@ -631,8 +617,6 @@ set_login_button_visibility (CcRegionPage *self) + #else + gtk_widget_set_visible (self->login_group, TRUE); + #endif +- +- g_signal_handlers_disconnect_by_func (self->user_manager, set_login_button_visibility, self); + } + + /* Callbacks */ +@@ -821,16 +805,6 @@ cc_region_page_finalize (GObject *object) + { + CcRegionPage *self = CC_REGION_PAGE (object); + +- if (self->user_manager) { +- g_signal_handlers_disconnect_by_data (self->user_manager, self); +- self->user_manager = NULL; +- } +- +- if (self->user) { +- g_signal_handlers_disconnect_by_data (self->user, self); +- self->user = NULL; +- } +- + g_clear_object (&self->permission); + g_clear_object (&self->localed); + g_clear_object (&self->session); +@@ -881,8 +855,6 @@ cc_region_page_init (CcRegionPage *self) + + self->cancellable = g_cancellable_new (); + +- self->user_manager = act_user_manager_get_default (); +- + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, + G_DBUS_PROXY_FLAGS_NONE, + NULL, diff --git a/x11-packages/gnome-control-center/build.sh b/x11-packages/gnome-control-center/build.sh new file mode 100644 index 00000000000..895a399583b --- /dev/null +++ b/x11-packages/gnome-control-center/build.sh @@ -0,0 +1,26 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gnome-control-center +TERMUX_PKG_DESCRIPTION="GNOME's main interface to configure various aspects of the desktop" +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="49.4" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gnome-control-center/${TERMUX_PKG_VERSION%%.*}/gnome-control-center-${TERMUX_PKG_VERSION}.tar.xz" +TERMUX_PKG_SHA256=131975e5fddd208f3a30f766a1c667f8cb3f15b689a868d285a641a234204b02 +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_DEPENDS="glib, libglibmm-2.68, libcanberra, gtk4, libadwaita, gobject-introspection, pulseaudio, gettext, gdk-pixbuf, gnome-desktop4, gsettings-desktop-schemas, gnome-settings-daemon, libxml2, upower, gcr4, fontconfig, cups, krb5, ibus, gsound, samba, libsecret" +TERMUX_PKG_BUILD_DEPENDS="blueprint-compiler, glib-cross, glib, libwayland, libepoxy, libwayland-protocols, mutter, libwayland-cross-scanner, libx11, libxi, libgtop, libcairo, libandroid-glob" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dlocation-services=disabled +-Dsnap=false +-Dtests=false +-Ddocumentation=false +-Dpolkit=false +-Dudev=disabled +" + +termux_step_pre_configure() { + termux_setup_bpc + termux_setup_gir + termux_setup_meson + termux_setup_pkg_config_wrapper "${TERMUX_PREFIX}/opt/glib/cross/lib/x86_64-linux-gnu/pkgconfig:${TERMUX_PREFIX}/opt/libwayland/cross/lib/x86_64-linux-gnu/pkgconfig" + LDFLAGS+=" -landroid-glob" +} diff --git a/x11-packages/gnome-session/0001-no-logind.patch b/x11-packages/gnome-session/0001-no-logind.patch new file mode 100644 index 00000000000..e9d03a8cfb2 --- /dev/null +++ b/x11-packages/gnome-session/0001-no-logind.patch @@ -0,0 +1,149 @@ +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -4,3 +4,4 @@ + option('docbook', type: 'boolean', value: true, description: 'build documentation') + option('man', type: 'boolean', value: true, description: 'build documentation (requires xmlto)') + option('x11', type: 'boolean', value: true, description: 'enable x11 session support') ++option('systemd', type: 'boolean', value: true, description: 'Use systemd') +--- a/meson.build ++++ b/meson.build +@@ -125,7 +125,12 @@ + pkgconfig_define: ['prefix', session_prefix]) + endif + ++if not get_option('systemd') ++libsystemd_dep = dependency('', required : false) ++else + libsystemd_dep = dependency('libsystemd', version: '>= 209', required: true) ++config_h.set(HAVE_SYSTEMD, true) ++endif + session_bin_deps += libsystemd_dep + + configure_file( +--- a/gnome-session/gsm-autostart-app.c ++++ b/gnome-session/gsm-autostart-app.c +@@ -31,8 +31,10 @@ + #define GNOME_DESKTOP_USE_UNSTABLE_API + #include + ++#ifdef HAVE_SYSTEMD + #include + #include ++#endif + + #include "gsm-autostart-app.h" + #include "gsm-util.h" +@@ -966,12 +968,16 @@ on_child_setup (GsmAutostartApp *app) + /* The FALSE means programs aren't expected to prefix each + * line with prefix to specify priority. + */ ++#ifdef HAVE_SYSTEMD + standard_output = sd_journal_stream_fd (priv->desktop_id, + LOG_INFO, + FALSE); + standard_error = sd_journal_stream_fd (priv->desktop_id, + LOG_WARNING, + FALSE); ++#else ++ standard_output = standard_error = -1; ++#endif + + if (standard_output >= 0) { + dup2 (standard_output, STDOUT_FILENO); +@@ -1033,10 +1040,12 @@ autostart_app_start_spawn (GsmAutostartApp *app, + g_app_launch_context_setenv (ctx, "DESKTOP_AUTOSTART_ID", startup_id); + } + ++#ifdef HAVE_SYSTEMD + if (sd_booted () > 0) { + child_setup_func = (GSpawnChildSetupFunc) on_child_setup; + child_setup_data = app; + } ++#endif + + handler = g_signal_connect (ctx, "launched", G_CALLBACK (app_launched), app); + success = g_desktop_app_info_launch_uris_as_manager (priv->app_info, +--- a/gnome-session/gsm-manager.c ++++ b/gnome-session/gsm-manager.c +@@ -40,9 +40,15 @@ + #include "gsm-manager.h" + #include "org.gnome.SessionManager.h" + ++#ifdef HAVE_SYSTEMD + #include + + #include ++#else ++#define sd_notify(...) ++#define sd_notifyf(...) ++#define sd_journal_send(...) ++#endif + + #include "gsm-store.h" + #include "gsm-inhibitor.h" +--- a/gnome-session/gsm-systemd.c ++++ b/gnome-session/gsm-systemd.c +@@ -28,6 +28,7 @@ + #include + #include + ++#ifdef HAVE_SYSTEMD + #include + + #include +@@ -1194,4 +1195,10 @@ sd_proxy_signal_cb (GDBusProxy *proxy, + } + } + +- ++#else ++GsmSystemd * ++gsm_systemd_new (void) ++{ ++ return NULL; ++} ++#endif +--- a/gnome-session/main.c ++++ b/gnome-session/main.c +@@ -43,7 +43,9 @@ + #include "gsm-system.h" + #include "gsm-fail-whale.h" + ++#ifdef HAVE_SYSTEMD + #include ++#endif + + #define GSM_DBUS_NAME "org.gnome.SessionManager" + +@@ -558,6 +560,7 @@ main (int argc, char **argv) + * journald picks ups the nicer "gnome-session" as the program + * name instead of whatever shell script GDM happened to use. + */ ++#ifdef HAVE_SYSTEMD + if (!debug) { + int journalfd; + +@@ -567,6 +570,7 @@ main (int argc, char **argv) + dup2(journalfd, 2); + } + } ++#endif + + gdm_log_init (); + gdm_log_set_debug (debug); +--- a/tools/gnome-session-ctl.c ++++ b/tools/gnome-session-ctl.c +@@ -28,7 +28,12 @@ + #include + #include + #include ++#ifdef HAVE_SYSTEMD + #include ++#else ++#define sd_notify(...) ++#define sd_notifyf(...) ++#endif + + #include + #include + diff --git a/x11-packages/gnome-session/0002-Werror.patch b/x11-packages/gnome-session/0002-Werror.patch new file mode 100644 index 00000000000..e06b3ff3d88 --- /dev/null +++ b/x11-packages/gnome-session/0002-Werror.patch @@ -0,0 +1,13 @@ +--- a/meson.build ++++ b/meson.build +@@ -76,6 +76,10 @@ + + compiler_flags += cc.get_supported_arguments(test_cflags) + endif ++compiler_flags += [ ++ '-Wno-format-nonliteral', ++ '-Wno-format-security' ++] + + add_project_arguments(common_flags + compiler_flags, language: 'c') + diff --git a/x11-packages/gnome-session/0003-force-gnome-settings-daemon-49.patch b/x11-packages/gnome-session/0003-force-gnome-settings-daemon-49.patch new file mode 100644 index 00000000000..085495e586b --- /dev/null +++ b/x11-packages/gnome-session/0003-force-gnome-settings-daemon-49.patch @@ -0,0 +1,13 @@ +Set to FALSE for testing with gnome-settings-daemon 49+ + +--- a/gnome-session/gsm-session-fill.c ++++ b/gnome-session/gsm-session-fill.c +@@ -79,7 +79,7 @@ check_required_components_helper (const char *component, + + if (app_path == NULL) { + g_warning ("Unable to find required component '%s'", component); +- *error = TRUE; ++ *error = TRUE; + } + } + diff --git a/x11-packages/gnome-session/0004-manage-system-dbus.patch b/x11-packages/gnome-session/0004-manage-system-dbus.patch new file mode 100644 index 00000000000..c443420a38d --- /dev/null +++ b/x11-packages/gnome-session/0004-manage-system-dbus.patch @@ -0,0 +1,26 @@ +--- a/gnome-session/main.c ++++ b/gnome-session/main.c +@@ -518,6 +518,23 @@ main (int argc, char **argv) + gsm_util_init_error (TRUE, "%s", error->message); + } + ++ /* Termux gnome-session: Start dbus-daemon --system first before anything */ ++ { ++ const char *pid_file = "@TERMUX_PREFIX@/var/run/dbus/pid"; ++ FILE *f = fopen (pid_file, "r"); ++ if (f) { ++ int pid = 0; ++ if (fscanf (f, "%d", &pid) == 1 && pid > 0) { ++ g_message ("Termux gnome-session: Killing stale system dbus-daemon (pid %d)", pid); ++ kill (pid, SIGTERM); ++ } ++ fclose (f); ++ } ++ remove (pid_file); ++ g_message ("Termux gnome-session: starting system dbus-daemon..."); ++ system ("dbus-daemon --system --fork"); ++ } ++ + /* From 3.14 GDM sets XDG_CURRENT_DESKTOP. For compatibility with + * older versions of GDM, other display managers, and startx, + * set a fallback value if we don't find it set. diff --git a/x11-packages/gnome-session/build.sh b/x11-packages/gnome-session/build.sh new file mode 100644 index 00000000000..cb4141b4be0 --- /dev/null +++ b/x11-packages/gnome-session/build.sh @@ -0,0 +1,26 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gnome-session/ +TERMUX_PKG_DESCRIPTION="The GNOME session manager" +TERMUX_PKG_LICENSE="GPL-2.0-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="48.0" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gnome-session/${TERMUX_PKG_VERSION%%.*}/gnome-session-$TERMUX_PKG_VERSION.tar.xz" +TERMUX_PKG_SHA256=dd909fbc5b22cdbdb2fc4df1a47d78d1b5943ccc5e61e6a20a1846246347c417 +TERMUX_PKG_DEPENDS="glib, gnome-desktop3, gtk3, json-glib, libice, libsm, libx11" +TERMUX_PKG_RECOMMENDS="gnome-shell" +TERMUX_PKG_BUILD_DEPENDS="glib-cross" +TERMUX_PKG_VERSIONED_GIR=false +# Should be bumped with gnome-shell +TERMUX_PKG_AUTO_UPDATE=false + +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dx11=true +-Dsystemd=false +-Dsystemduserunitdir=$TERMUX_PKG_TMPDIR +" + +termux_step_pre_configure() { + termux_setup_gir + termux_setup_glib_cross_pkg_config_wrapper + + export TERMUX_MESON_ENABLE_SOVERSION=1 +} diff --git a/x11-packages/gnome-settings-daemon/0001-no-polkit.patch b/x11-packages/gnome-settings-daemon/0001-no-polkit.patch new file mode 100644 index 00000000000..4691cf1aa9b --- /dev/null +++ b/x11-packages/gnome-settings-daemon/0001-no-polkit.patch @@ -0,0 +1,67 @@ +diff --git a/meson.build b/meson.build +index d2900f6..d44251c 100644 +--- a/meson.build ++++ b/meson.build +@@ -111,7 +111,6 @@ libgeoclue_dep = dependency('libgeoclue-2.0', version: '>= 2.3.1') + libnotify_dep = dependency('libnotify', version: '>= 0.7.3') + libpulse_mainloop_glib_dep = dependency('libpulse-mainloop-glib', version: '>= 2.0') + pango_dep = dependency('pango', version: '>= 1.20.0') +-polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.114') + upower_glib_dep = dependency('upower-glib', version: '>= 0.99.12') + x11_dep = dependency('x11') + xfixes_dep = dependency('xfixes', version: '>= 6.0') +diff --git a/plugins/datetime/meson.build b/plugins/datetime/meson.build +index 0562a3e..4a5254f 100644 +--- a/plugins/datetime/meson.build ++++ b/plugins/datetime/meson.build +@@ -24,8 +24,7 @@ deps = plugins_deps + [ + gweather_dep, + libgeoclue_dep, + libnotify_dep, +- m_dep, +- polkit_gobject_dep ++ m_dep + ] + + cflags += ['-DGNOMECC_DATA_DIR="@0@"'.format(gsd_pkgdatadir)] +diff --git a/plugins/wwan/meson.build b/plugins/wwan/meson.build +index a81ce41..7e149d0 100644 +--- a/plugins/wwan/meson.build ++++ b/plugins/wwan/meson.build +@@ -5,7 +5,7 @@ sources = files( + ) + sources += main_helper_sources + +-deps = plugins_deps + [gio_dep, gcr_dep, mm_glib_dep, polkit_gobject_dep] ++deps = plugins_deps + [gio_dep, gcr_dep, mm_glib_dep] + + cflags += ['-DGNOMECC_DATA_DIR="@0@"'.format(gsd_pkgdatadir)] + +diff --git a/plugins/datetime/gsd-timezone-monitor.c b/plugins/datetime/gsd-timezone-monitor.c +index a6e8a48..464ccdf 100644 +--- a/plugins/datetime/gsd-timezone-monitor.c ++++ b/plugins/datetime/gsd-timezone-monitor.c +@@ -27,7 +27,6 @@ + + #include + #include +-#include + + #define DESKTOP_ID "gnome-datetime-panel" + #define SET_TIMEZONE_PERMISSION "org.freedesktop.timedate1.set-timezone" +@@ -434,6 +433,7 @@ gsd_timezone_monitor_init (GsdTimezoneMonitor *self) + + g_debug ("Starting timezone monitor"); + ++#ifndef __ANDROID__ + priv->permission = polkit_permission_new_sync (SET_TIMEZONE_PERMISSION, + NULL, NULL, + &error); +@@ -449,6 +449,7 @@ gsd_timezone_monitor_init (GsdTimezoneMonitor *self) + g_debug ("No permission to set timezone"); + return; + } ++#endif + + priv->cancellable = g_cancellable_new (); + priv->dtm = timedate1_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, diff --git a/x11-packages/gnome-settings-daemon/0002-no-gudev.patch b/x11-packages/gnome-settings-daemon/0002-no-gudev.patch new file mode 100644 index 00000000000..d478c13cb27 --- /dev/null +++ b/x11-packages/gnome-settings-daemon/0002-no-gudev.patch @@ -0,0 +1,65 @@ +--- a/plugins/power/gsd-backlight.c ++++ b/plugins/power/gsd-backlight.c +@@ -27,7 +27,7 @@ + #include "gsd-power-constants.h" + #include "gsd-power-manager.h" + +-#ifdef __linux__ ++#if defined(__linux__) && defined(HAVE_GUDEV) && HAVE_GUDEV + #include + #endif /* __linux__ */ + +@@ -53,7 +53,7 @@ + + BacklightBackend backend; + +-#ifdef __linux__ ++#if defined(__linux__) && defined(HAVE_GUDEV) && HAVE_GUDEV + GDBusProxy *logind_proxy; + + GUdevClient *udev; +@@ -93,7 +93,7 @@ + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, + gsd_backlight_initable_iface_init);) + +-#ifdef __linux__ ++#if defined(__linux__) && defined(HAVE_GUDEV) && HAVE_GUDEV + static GUdevDevice* + gsd_backlight_udev_get_type (GList *devices, const gchar *type) + { +@@ -511,7 +511,7 @@ + return; + } + +-#ifdef __linux__ ++#if defined(__linux__) && defined(HAVE_GUDEV) && HAVE_GUDEV + if (backlight->backend == BACKLIGHT_BACKEND_UDEV) { + BacklightHelperData *task_data; + +@@ -915,7 +915,7 @@ + G_CONNECT_SWAPPED); + maybe_update_mutter_backlight (backlight); + +-#ifdef __linux__ ++#if defined(__linux__) && defined(HAVE_GUDEV) && HAVE_GUDEV + backlight->logind_proxy = + g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, + 0, +@@ -987,7 +987,7 @@ + { + GsdBacklight *backlight = GSD_BACKLIGHT (object); + +-#ifdef __linux__ ++#if defined(__linux__) && defined(HAVE_GUDEV) && HAVE_GUDEV + g_assert (backlight->active_task == NULL); + g_assert (g_queue_is_empty (&backlight->tasks)); + g_clear_object (&backlight->logind_proxy); +@@ -1033,7 +1033,7 @@ + backlight->brightness_val = -1; + backlight->brightness_step = 1; + +-#ifdef __linux__ ++#if defined(__linux__) && defined(HAVE_GUDEV) && HAVE_GUDEV + backlight->active_task = NULL; + g_queue_init (&backlight->tasks); + #endif /* __linux__ */ diff --git a/x11-packages/gnome-settings-daemon/build.sh b/x11-packages/gnome-settings-daemon/build.sh new file mode 100644 index 00000000000..f397c605705 --- /dev/null +++ b/x11-packages/gnome-settings-daemon/build.sh @@ -0,0 +1,46 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gnome-settings-daemon +TERMUX_PKG_DESCRIPTION="GNOME Settings Daemon" +TERMUX_PKG_LICENSE="GPL-2.0-or-later, LGPL-2.1-only" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="48.1" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gnome-settings-daemon/${TERMUX_PKG_VERSION%%.*}/gnome-settings-daemon-$TERMUX_PKG_VERSION.tar.xz" +TERMUX_PKG_SHA256=3860a2ea214dcbcb6600ae7a1e3358a5389215087bc3e4a47cee3f87baee062e +TERMUX_PKG_DEPENDS="alsa-lib, glib, geoclue, geocode-glib, gnome-desktop3, gtk3, libcanberra, libcolord, libgweather, libnotify, libx11, libxfixes, pango, pulseaudio-glib, upower" +TERMUX_PKG_BUILD_DEPENDS="glib-cross" + +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dsystemd=false +-Delogind=false +-Dalsa=true +-Dgudev=false +-Dsmartcard=false +-Dcups=false +-Drfkill=false +-Dwwan=false +-Dwayland=false +-Dnetwork_manager=false +" + +termux_step_pre_configure() { + termux_setup_glib_cross_pkg_config_wrapper + + if [ "$TERMUX_ON_DEVICE_BUILD" = false ]; then + # Create host pkg-config wrapper + mkdir -p "$TERMUX_PKG_TMPDIR"/host-pkg-config + cat > "$TERMUX_PKG_TMPDIR"/host-pkg-config/pkg-config <<-HERE + #!/bin/sh + unset PKG_CONFIG_DIR + unset PKG_CONFIG_LIBDIR + exec /usr/bin/pkg-config "\$@" + HERE + chmod +x "$TERMUX_PKG_TMPDIR"/host-pkg-config/pkg-config + + # Use it in meson + local _native_file="$TERMUX_PKG_TMPDIR"/native-file.ini + echo "[binaries]" > $_native_file + echo "pkg-config = '$TERMUX_PKG_TMPDIR/host-pkg-config/pkg-config'" >> $_native_file + TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--native-file $_native_file $TERMUX_PKG_EXTRA_CONFIGURE_ARGS" + fi + + export TERMUX_MESON_ENABLE_SOVERSION=1 +} diff --git a/x11-packages/gnome-shell/0001-use-gjs-option.patch b/x11-packages/gnome-shell/0001-use-gjs-option.patch new file mode 100644 index 00000000000..6fdcc7434f6 --- /dev/null +++ b/x11-packages/gnome-shell/0001-use-gjs-option.patch @@ -0,0 +1,37 @@ +--- a/meson.build ++++ b/meson.build +@@ -142,7 +142,10 @@ endif + + mutter_typelibdir = mutter_dep.get_variable('typelibdir') + python = find_program('python3') +-gjs = find_program('gjs') ++gjs_path = get_option('gjs_path') ++if gjs_path == '' ++ gjs_path = find_program('gjs').full_path() ++endif + generate_app_list = find_program('build-aux/generate-app-list.py') + + cc = meson.get_compiler('c') +--- a/meson.options ++++ b/meson.options +@@ -51,3 +51,9 @@ + value: true, + description: 'Enable systemd integration' + ) ++ ++option('gjs_path', ++ type: 'string', ++ value: '', ++ description: 'The path to gjs' ++) +--- a/js/dbusServices/meson.build ++++ b/js/dbusServices/meson.build +@@ -22,7 +22,7 @@ + + serviceconf = configuration_data() + serviceconf.set('service', service) +- serviceconf.set('gjs', gjs.full_path()) ++ serviceconf.set('gjs', gjs_path) + serviceconf.set('pkgdatadir', pkgdatadir) + + configure_file( diff --git a/x11-packages/gnome-shell/0002-disable-polkit.patch b/x11-packages/gnome-shell/0002-disable-polkit.patch new file mode 100644 index 00000000000..b513b60e47d --- /dev/null +++ b/x11-packages/gnome-shell/0002-disable-polkit.patch @@ -0,0 +1,184 @@ +diff --git a/config.h.meson b/config.h.meson +index a357e1c..b686322 100644 +--- a/config.h.meson ++++ b/config.h.meson +@@ -45,3 +45,6 @@ + + /* Whether GNOME Shell is built with X11 clients support */ + #mesondefine HAVE_X11_CLIENT ++ ++/* Whether GNOME Shell is built with polkit support */ ++#mesondefine HAVE_POLKIT_SUPPORT +diff --git a/js/misc/dependencies.js b/js/misc/dependencies.js +index c0816f0..11398a8 100644 +--- a/js/misc/dependencies.js ++++ b/js/misc/dependencies.js +@@ -19,8 +19,6 @@ import 'gi://Graphene?version=1.0'; + import 'gi://GWeather?version=4.0'; + import 'gi://IBus?version=1.0'; + import 'gi://Pango?version=1.0'; +-import 'gi://Polkit?version=1.0'; +-import 'gi://PolkitAgent?version=1.0'; + import 'gi://Rsvg?version=2.0'; + import 'gi://Soup?version=3.0'; + import 'gi://UPowerGlib?version=1.0'; +diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js +index 7455526..2e56da7 100644 +--- a/js/ui/endSessionDialog.js ++++ b/js/ui/endSessionDialog.js +@@ -20,7 +20,6 @@ import Gio from 'gi://Gio'; + import GLib from 'gi://GLib'; + import GObject from 'gi://GObject'; + import Pango from 'gi://Pango'; +-import Polkit from 'gi://Polkit'; + import Shell from 'gi://Shell'; + import St from 'gi://St'; + import UPower from 'gi://UPowerGlib'; +diff --git a/js/ui/environment.js b/js/ui/environment.js +index 64ee2b8..7f5dbc2 100644 +--- a/js/ui/environment.js ++++ b/js/ui/environment.js +@@ -11,7 +11,6 @@ import Gio from 'gi://Gio'; + import GLib from 'gi://GLib'; + import GObject from 'gi://GObject'; + import Meta from 'gi://Meta'; +-import Polkit from 'gi://Polkit'; + import Shell from 'gi://Shell'; + import St from 'gi://St'; + +@@ -29,7 +28,6 @@ Gio._promisify(Gio.DBusProxy, 'new'); + Gio._promisify(Gio.DBusProxy.prototype, 'init_async'); + Gio._promisify(Gio.DBusProxy.prototype, 'call_with_unix_fd_list'); + Gio._promisify(Gio.File.prototype, 'query_info_async'); +-Gio._promisify(Polkit.Permission, 'new'); + Gio._promisify(Shell.App.prototype, 'activate_action'); + + // We can't import shell JS modules yet, because they may have +diff --git a/js/ui/status/network.js b/js/ui/status/network.js +index b732a9b..a6347c7 100644 +--- a/js/ui/status/network.js ++++ b/js/ui/status/network.js +@@ -4,7 +4,6 @@ import Gio from 'gi://Gio'; + import GLib from 'gi://GLib'; + import GObject from 'gi://GObject'; + import NM from 'gi://NM'; +-import Polkit from 'gi://Polkit'; + import Shell from 'gi://Shell'; + import St from 'gi://St'; + +diff --git a/js/ui/status/thunderbolt.js b/js/ui/status/thunderbolt.js +index 6c14003..068411a 100644 +--- a/js/ui/status/thunderbolt.js ++++ b/js/ui/status/thunderbolt.js +@@ -3,7 +3,6 @@ + import Gio from 'gi://Gio'; + import GLib from 'gi://GLib'; + import GObject from 'gi://GObject'; +-import Polkit from 'gi://Polkit'; + import Shell from 'gi://Shell'; + import * as Signals from '../../misc/signals.js'; + +@@ -238,7 +237,6 @@ class Indicator extends SystemIndicator { + this._sync(); + + this._perm = null; +- this._createPermission(); + } + + async _createPermission() { +diff --git a/meson.build b/meson.build +index 908cfb2..90107ed 100644 +--- a/meson.build ++++ b/meson.build +@@ -83,7 +83,11 @@ clutter_dep = dependency(clutter_pc, version: mutter_req) + mtk_dep = dependency(mtk_pc, version: mutter_req) + cogl_dep = dependency(cogl_pc, version: mutter_req) + mutter_dep = dependency(libmutter_pc, version: mutter_req) ++if get_option('polkit') + polkit_dep = dependency('polkit-agent-1', version: polkit_req) ++else ++polkit_dep = dependency('', required : false) ++endif + schemas_dep = dependency('gsettings-desktop-schemas', version: schemas_req) + gnome_desktop_dep = dependency('gnome-desktop-4', version: gnome_desktop_req) + pango_dep = dependency('pango', version: pango_req) +@@ -181,6 +185,7 @@ cdata.set('HAVE_FDWALK', + cc.has_function('fdwalk') + ) + ++cdata.set('HAVE_POLKIT_SUPPORT', get_option('polkit')) + polkit_has_autocleanup = cc.compiles( + ''' + #define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE +diff --git a/meson.options b/meson.options +index a2cf12f..2d23b91 100644 +--- a/meson.options ++++ b/meson.options +@@ -57,3 +57,9 @@ option('gjs_path', + value: '', + description: 'The path to gjs' + ) ++ ++option('polkit', ++ type: 'boolean', ++ value: true, ++ description: 'Enable polkit support' ++) +diff --git a/src/meson.build b/src/meson.build +index 9691ef8..62576f6 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -258,10 +258,13 @@ libshell_gir_includes = [ + 'Meta-@0@'.format(mutter_api_version), + 'Gcr-4', + 'GioUnix-2.0', +- 'PolkitAgent-1.0', + 'GdkPixbuf-2.0' + ] + ++if get_option('polkit') ++ libshell_gir_includes += ['PolkitAgent-1.0'] ++endif ++ + if have_networkmanager + libshell_gir_includes += ['NM-1.0'] + endif +diff --git a/src/shell-polkit-authentication-agent.c b/src/shell-polkit-authentication-agent.c +index 6815f01..73dc7ba 100644 +--- a/src/shell-polkit-authentication-agent.c ++++ b/src/shell-polkit-authentication-agent.c +@@ -8,6 +8,8 @@ + + #include "config.h" + ++#ifdef HAVE_POLKIT_SUPPORT ++ + #include + + #include "shell-polkit-authentication-agent.h" +@@ -427,3 +429,5 @@ shell_polkit_authentication_agent_complete (ShellPolkitAuthenticationAgent *agen + + auth_request_complete (agent->current_request, dismissed); + } ++ ++#endif +diff --git a/src/shell-polkit-authentication-agent.h b/src/shell-polkit-authentication-agent.h +index e4fccda..74af569 100644 +--- a/src/shell-polkit-authentication-agent.h ++++ b/src/shell-polkit-authentication-agent.h +@@ -8,6 +8,9 @@ + + #pragma once + ++#include "config.h" ++#ifdef HAVE_POLKIT_SUPPORT ++ + #define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE + #include + #include +@@ -32,3 +35,5 @@ void shell_polkit_authentication_agent_register (Shel + void shell_polkit_authentication_agent_unregister (ShellPolkitAuthenticationAgent *agent); + + G_END_DECLS ++ ++#endif diff --git a/x11-packages/gnome-shell/0003-tagged-pointer.patch b/x11-packages/gnome-shell/0003-tagged-pointer.patch new file mode 100644 index 00000000000..b7e0bda95f3 --- /dev/null +++ b/x11-packages/gnome-shell/0003-tagged-pointer.patch @@ -0,0 +1,44 @@ +--- a/src/main.c ++++ b/src/main.c +@@ -25,6 +25,32 @@ + #include + #endif + ++#ifdef __TERMUX__ ++#include ++#include ++static void android_disable_tags() { ++ void *lib_handle = dlopen("libc.so", RTLD_LAZY); ++ if (lib_handle) { ++ if (android_get_device_api_level() >= 31) { ++ int (*mallopt_func)(int, int) = dlsym(lib_handle, "mallopt"); ++ if (mallopt_func) { ++ mallopt_func(M_BIONIC_SET_HEAP_TAGGING_LEVEL, 0); ++ } ++ return; ++ } ++ /* android_get_device_api_level() < 31 */ ++ bool (*android_mallopt)(int opcode, void* arg, size_t arg_size) = dlsym(lib_handle, "android_mallopt"); ++ if (android_mallopt) { ++ int android_malloc_tag_level = 0; ++ android_mallopt(8, &android_malloc_tag_level, sizeof(android_malloc_tag_level)); ++ } ++ dlclose(lib_handle); ++ } ++} ++#else ++static void android_disable_tags(){} ++#endif ++ + #include "shell-global.h" + #include "shell-global-private.h" + #include "shell-perf-log.h" +@@ -598,6 +624,8 @@ + GError *error = NULL; + int ecode = EXIT_SUCCESS; + ++ android_disable_tags(); ++ + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); diff --git a/x11-packages/gnome-shell/0004-disable-accountsservice.patch b/x11-packages/gnome-shell/0004-disable-accountsservice.patch new file mode 100644 index 00000000000..2ed4552671d --- /dev/null +++ b/x11-packages/gnome-shell/0004-disable-accountsservice.patch @@ -0,0 +1,202 @@ +diff --git a/js/misc/dependencies.js b/js/misc/dependencies.js +index 88997a9..b820a39 100644 +--- a/js/misc/dependencies.js ++++ b/js/misc/dependencies.js +@@ -4,7 +4,6 @@ import gi from 'gi'; + * Required dependencies + */ + +-import 'gi://AccountsService?version=1.0'; + import 'gi://Atk?version=1.0'; + import 'gi://Atspi?version=2.0'; + import 'gi://Gcr?version=4'; +diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js +index cdf020d..13ee439 100644 +--- a/js/misc/systemActions.js ++++ b/js/misc/systemActions.js +@@ -1,4 +1,3 @@ +-import AccountsService from 'gi://AccountsService'; + import Clutter from 'gi://Clutter'; + import Gdm from 'gi://Gdm'; + import Gio from 'gi://Gio'; +@@ -159,17 +158,6 @@ const SystemActions = GObject.registerClass({ + this._loginManager = LoginManager.getLoginManager(); + this._monitorManager = global.backend.get_monitor_manager(); + +- this._userManager = AccountsService.UserManager.get_default(); +- +- this._userManager.connect('notify::is-loaded', +- () => this._updateMultiUser()); +- this._userManager.connect('notify::has-multiple-users', +- () => this._updateMultiUser()); +- this._userManager.connect('user-added', +- () => this._updateMultiUser()); +- this._userManager.connect('user-removed', +- () => this._updateMultiUser()); +- + this._lockdownSettings.connect(`changed::${DISABLE_USER_SWITCH_KEY}`, + () => this._updateSwitchUser()); + this._lockdownSettings.connect(`changed::${DISABLE_LOG_OUT_KEY}`, +@@ -381,7 +369,7 @@ const SystemActions = GObject.registerClass({ + + _updateSwitchUser() { + let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY); +- let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users; ++ let multiUser = false; + let shouldShowInMode = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter; + + let visible = allowSwitch && multiUser && shouldShowInMode; +@@ -392,13 +380,11 @@ const SystemActions = GObject.registerClass({ + } + + _updateLogout() { +- let user = this._userManager.get_user(GLib.get_user_name()); +- + let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY); + let alwaysShow = global.settings.get_boolean(ALWAYS_SHOW_LOG_OUT_KEY); +- let systemAccount = user.system_account; +- let localAccount = user.local_account; +- let multiUser = this._userManager.has_multiple_users; ++ let systemAccount = true; ++ let localAccount = true; ++ let multiUser = false; + let multiSession = Gdm.get_session_ids().length > 1; + let shouldShowInMode = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter; + +diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js +index 9369d99..2e56da7 100644 +--- a/js/ui/endSessionDialog.js ++++ b/js/ui/endSessionDialog.js +@@ -15,7 +15,6 @@ + * along with this program; if not, see . + */ + +-import AccountsService from 'gi://AccountsService'; + import Clutter from 'gi://Clutter'; + import Gio from 'gi://Gio'; + import GLib from 'gi://GLib'; +@@ -235,8 +234,6 @@ class EndSessionDialog extends ModalDialog.ModalDialog { + this._canRebootToBootLoaderMenu = false; + this._getCanRebootToBootLoaderMenu().catch(logError); + +- this._userManager = AccountsService.UserManager.get_default(); +- this._user = this._userManager.get_user(GLib.get_user_name()); + this._updatesPermission = null; + + try { +@@ -271,10 +268,6 @@ class EndSessionDialog extends ModalDialog.ModalDialog { + + this.connect('opened', this._onOpened.bind(this)); + +- this._user.connectObject( +- 'notify::is-loaded', this._sync.bind(this), +- 'changed', this._sync.bind(this), this); +- + this._messageDialogContent = new Dialog.MessageDialogContent(); + + this._checkBox = new CheckBox.CheckBox(); +@@ -654,20 +647,14 @@ class EndSessionDialog extends ModalDialog.ModalDialog { + continue; + + const session = { +- user: this._userManager.get_user(userName), + username: userName, + type: proxy.Type, + remote: proxy.Remote, + }; + const nSessions = this._sessions.push(session); + +- let userAvatar = new UserWidget.Avatar(session.user, { +- iconSize: _ITEM_ICON_SIZE, +- }); +- userAvatar.update(); +- + const displayUserName = +- session.user.get_real_name() ?? session.username; ++ session.username; + + let userLabelText; + if (session.remote) +@@ -680,7 +667,6 @@ class EndSessionDialog extends ModalDialog.ModalDialog { + userLabelText = userName; + + let listItem = new Dialog.ListSectionItem({ +- icon_actor: userAvatar, + title: userLabelText, + }); + this._sessionSection.list.add_child(listItem); +diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js +index 733346f..96a1cad 100644 +--- a/js/ui/screenShield.js ++++ b/js/ui/screenShield.js +@@ -1,4 +1,3 @@ +-import AccountsService from 'gi://AccountsService'; + import Clutter from 'gi://Clutter'; + import Gio from 'gi://Gio'; + import GLib from 'gi://GLib'; +@@ -672,14 +671,10 @@ export class ScreenShield extends Signals.EventEmitter { + St.Clipboard.get_default().set_text(St.ClipboardType.CLIPBOARD, ''); + St.Clipboard.get_default().set_text(St.ClipboardType.PRIMARY, ''); + +- let userManager = AccountsService.UserManager.get_default(); +- let user = userManager.get_user(GLib.get_user_name()); + + this.activate(animate); + +- const lock = this._isGreeter +- ? true +- : user.password_mode !== AccountsService.UserPasswordMode.NONE; ++ const lock = false; + this._setLocked(lock); + } + +diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js +index f94f2ec..a162fa9 100644 +--- a/js/ui/unlockDialog.js ++++ b/js/ui/unlockDialog.js +@@ -1,4 +1,3 @@ +-import AccountsService from 'gi://AccountsService'; + import Atk from 'gi://Atk'; + import Clutter from 'gi://Clutter'; + import Gdm from 'gi://Gdm'; +@@ -553,9 +552,7 @@ export const UnlockDialog = GObject.registerClass({ + Main.layoutManager.connectObject('monitors-changed', + this._updateBackgrounds.bind(this), this); + +- this._userManager = AccountsService.UserManager.get_default(); + this._userName = GLib.get_user_name(); +- this._user = this._userManager.get_user(this._userName); + + // Authentication & Clock stack + this._stack = new Shell.Stack(); +@@ -603,11 +600,6 @@ export const UnlockDialog = GObject.registerClass({ + this._lockdownSettings.connect('changed::disable-user-switching', + this._updateUserSwitchVisibility.bind(this)); + +- this._user.connectObject( +- 'notify::is-loaded', () => this._updateUserSwitchVisibility(), +- 'notify::has-multiple-users', () => this._updateUserSwitchVisibility(), +- this); +- + this._updateUserSwitchVisibility(); + + // Main Box +@@ -807,7 +799,6 @@ export const UnlockDialog = GObject.registerClass({ + _onReset(authPrompt, beginRequest) { + let userName; + if (beginRequest === AuthPrompt.BeginRequestType.PROVIDE_USERNAME) { +- this._authPrompt.setUser(this._user); + userName = this._userName; + } else { + userName = null; +@@ -876,8 +867,8 @@ export const UnlockDialog = GObject.registerClass({ + } + + _updateUserSwitchVisibility() { +- this._otherUserButton.visible = this._userManager.can_switch() && +- this._userManager.has_multiple_users && ++ this._otherUserButton.visible = ++ false && + this._screenSaverSettings.get_boolean('user-switch-enabled') && + !this._lockdownSettings.get_boolean('disable-user-switching'); + } diff --git a/x11-packages/gnome-shell/0005-disable-gdm.patch b/x11-packages/gnome-shell/0005-disable-gdm.patch new file mode 100644 index 00000000000..78354fb16f4 --- /dev/null +++ b/x11-packages/gnome-shell/0005-disable-gdm.patch @@ -0,0 +1,238 @@ +diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml +index df23e5e..67eff29 100644 +--- a/js/js-resources.gresource.xml ++++ b/js/js-resources.gresource.xml +@@ -1,16 +1,6 @@ + + + +- gdm/authList.js +- gdm/authPrompt.js +- gdm/batch.js +- gdm/credentialManager.js +- gdm/loginDialog.js +- gdm/oVirt.js +- gdm/realmd.js +- gdm/util.js +- gdm/vmware.js +- + extensions/extension.js + extensions/sharedInternals.js + +diff --git a/js/misc/dependencies.js b/js/misc/dependencies.js +index b820a39..11398a8 100644 +--- a/js/misc/dependencies.js ++++ b/js/misc/dependencies.js +@@ -8,7 +8,6 @@ import 'gi://Atk?version=1.0'; + import 'gi://Atspi?version=2.0'; + import 'gi://Gcr?version=4'; + import 'gi://Gdk?version=4.0'; +-import 'gi://Gdm?version=1.0'; + import 'gi://Geoclue?version=2.0'; + import 'gi://Gio?version=2.0'; + import 'gi://GioUnix?version=2.0'; +diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js +index 13ee439..0193230 100644 +--- a/js/misc/systemActions.js ++++ b/js/misc/systemActions.js +@@ -1,5 +1,4 @@ + import Clutter from 'gi://Clutter'; +-import Gdm from 'gi://Gdm'; + import Gio from 'gi://Gio'; + import GLib from 'gi://GLib'; + import GObject from 'gi://GObject'; +@@ -10,7 +10,6 @@ import * as Main from '../ui/main.js'; + import * as Screenshot from '../ui/screenshot.js'; + + const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown'; +-const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen'; + const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver'; + const DISABLE_USER_SWITCH_KEY = 'disable-user-switching'; + const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen'; +@@ -150,7 +148,6 @@ const SystemActions = GObject.registerClass({ + available: true, + }); + +- this._loginScreenSettings = new Gio.Settings({schema_id: LOGIN_SCREEN_SCHEMA}); + this._lockdownSettings = new Gio.Settings({schema_id: LOCKDOWN_SCHEMA}); + this._orientationSettings = new Gio.Settings({schema_id: 'org.gnome.settings-daemon.peripherals.touchscreen'}); + +@@ -340,10 +340,7 @@ const SystemActions = GObject.registerClass({ + } + + _updatePowerOff() { +- let disabled = (Main.sessionMode.isLocked && +- !this._screenSaverSettings.get_boolean(RESTART_ENABLED_KEY)) || +- (Main.sessionMode.isGreeter && +- this._loginScreenSettings.get_boolean(DISABLE_RESTART_KEY)); ++ let disabled = true; + this._actions.get(POWER_OFF_ACTION_ID).available = this._canHavePowerOff && !disabled; + this.notify('can-power-off'); + +@@ -354,10 +349,7 @@ const SystemActions = GObject.registerClass({ + } + + _updateSuspend() { +- let disabled = (Main.sessionMode.isLocked && +- this._suspendNeedsAuth) || +- (Main.sessionMode.isGreeter && +- this._loginScreenSettings.get_boolean(DISABLE_RESTART_KEY)); ++ let disabled = true; + this._actions.get(SUSPEND_ACTION_ID).available = this._canHaveSuspend && !disabled; + this.notify('can-suspend'); + } +@@ -385,7 +377,7 @@ const SystemActions = GObject.registerClass({ + let systemAccount = true; + let localAccount = true; + let multiUser = false; +- let multiSession = Gdm.get_session_ids().length > 1; ++ let multiSession = false; + let shouldShowInMode = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter; + + let visible = allowLogout && (alwaysShow || multiUser || multiSession || systemAccount || !localAccount) && shouldShowInMode; +@@ -418,7 +410,6 @@ const SystemActions = GObject.registerClass({ + Main.screenShield.lock(false); + + Clutter.threads_add_repaint_func(Clutter.RepaintFlags.POST_PAINT, () => { +- Gdm.goto_login_session_sync(null); + return false; + }); + } +diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js +index 96a1cad..f1e6fdc 100644 +--- a/js/ui/screenShield.js ++++ b/js/ui/screenShield.js +@@ -9,7 +9,6 @@ import St from 'gi://St'; + import * as Signals from '../misc/signals.js'; + + import * as GnomeSession from '../misc/gnomeSession.js'; +-import * as OVirt from '../gdm/oVirt.js'; + import * as LoginManager from '../misc/loginManager.js'; + import * as Lightbox from './lightbox.js'; + import * as Main from './main.js'; +@@ -96,7 +95,6 @@ export class ScreenShield extends Signals.EventEmitter { + }); + + this._credentialManagers = {}; +- this.addCredentialManager(OVirt.SERVICE_NAME, OVirt.getOVirtCredentialsManager()); + + this._loginManager = LoginManager.getLoginManager(); + this._loginManager.connect('prepare-for-sleep', +diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js +index 6c2a15e..72e8195 100644 +--- a/js/ui/sessionMode.js ++++ b/js/ui/sessionMode.js +@@ -3,7 +3,6 @@ import * as Signals from '../misc/signals.js'; + + import * as FileUtils from '../misc/fileUtils.js'; + +-import {LoginDialog} from '../gdm/loginDialog.js'; + import {UnlockDialog} from '../ui/unlockDialog.js'; + + import * as Config from '../misc/config.js'; +@@ -52,7 +51,6 @@ const _modes = { + hasNotifications: true, + isGreeter: true, + isPrimary: true, +- unlockDialog: LoginDialog, + components: Config.HAVE_NETWORKMANAGER + ? ['networkAgent', 'polkitAgent'] + : ['polkitAgent'], +diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js +index a162fa9..9962ef1 100644 +--- a/js/ui/unlockDialog.js ++++ b/js/ui/unlockDialog.js +@@ -1,6 +1,5 @@ + import Atk from 'gi://Atk'; + import Clutter from 'gi://Clutter'; +-import Gdm from 'gi://Gdm'; + import Gio from 'gi://Gio'; + import GnomeDesktop from 'gi://GnomeDesktop'; + import GLib from 'gi://GLib'; +@@ -13,8 +13,6 @@ import * as Main from './main.js'; + import * as MessageTray from './messageTray.js'; + import * as SwipeTracker from './swipeTracker.js'; + import {formatDateWithCFormatString} from '../misc/dateUtils.js'; +-import * as AuthPrompt from '../gdm/authPrompt.js'; +-import {AuthPromptStatus} from '../gdm/authPrompt.js'; + import {MprisSource} from './mpris.js'; + import {MediaMessage} from './messageList.js'; + +@@ -493,15 +490,6 @@ export const UnlockDialog = GObject.registerClass({ + + parentActor.add_child(this); + +- this._gdmClient = new Gdm.Client(); +- +- try { +- this._gdmClient.set_enabled_extensions([ +- Gdm.UserVerifierChoiceList.interface_info().name, +- ]); +- } catch { +- } +- + this._adjustment = new St.Adjustment({ + actor: this, + lower: 0, +@@ -699,6 +687,7 @@ export const UnlockDialog = GObject.registerClass({ + } + + _ensureAuthPrompt() { ++ return; + if (!this._authPrompt) { + this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient, + AuthPrompt.AuthPromptMode.UNLOCK_ONLY); +@@ -746,8 +735,6 @@ export const UnlockDialog = GObject.registerClass({ + } + + _showPrompt() { +- this._ensureAuthPrompt(); +- + if (this._activePage === this._promptBox) + return; + +@@ -798,13 +785,12 @@ export const UnlockDialog = GObject.registerClass({ + + _onReset(authPrompt, beginRequest) { + let userName; +- if (beginRequest === AuthPrompt.BeginRequestType.PROVIDE_USERNAME) { ++ if (true) { + userName = this._userName; + } else { + userName = null; + } + +- this._authPrompt.begin({userName}); + } + + _escape() { +@@ -818,8 +804,6 @@ export const UnlockDialog = GObject.registerClass({ + + this._adjustment.remove_transition('value'); + +- this._ensureAuthPrompt(); +- + let progress = this._adjustment.value; + tracker.confirmSwipe(this._stack.height, + [0, 1], +@@ -847,8 +831,6 @@ export const UnlockDialog = GObject.registerClass({ + } + + _otherUserClicked() { +- Gdm.goto_login_session_sync(null); +- + this._authPrompt.cancel(); + } + +@@ -859,11 +841,6 @@ export const UnlockDialog = GObject.registerClass({ + this._idleMonitor.remove_watch(this._idleWatchId); + this._idleWatchId = 0; + } +- +- if (this._gdmClient) { +- this._gdmClient = null; +- delete this._gdmClient; +- } + } + + _updateUserSwitchVisibility() { diff --git a/x11-packages/gnome-shell/0006-gnomevolumecontrol.patch b/x11-packages/gnome-shell/0006-gnomevolumecontrol.patch new file mode 100644 index 00000000000..e2b62fe7dac --- /dev/null +++ b/x11-packages/gnome-shell/0006-gnomevolumecontrol.patch @@ -0,0 +1,13 @@ +Fixes link-time conflict with graphviz + +--- a/subprojects/gvc/meson.build ++++ b/subprojects/gvc/meson.build +@@ -90,7 +90,7 @@ else + error('Installing shared library, but pkglibdir is unset!') + endif + +- libgvc_shared = shared_library('gvc', ++ libgvc_shared = shared_library('gnomevolumecontrol', + sources: libgvc_gir_sources + libgvc_no_gir_sources + libgvc_enums, + dependencies: libgvc_deps, + c_args: c_args, diff --git a/x11-packages/gnome-shell/0007-set-gjs.patch b/x11-packages/gnome-shell/0007-set-gjs.patch new file mode 100644 index 00000000000..4c6797e63b9 --- /dev/null +++ b/x11-packages/gnome-shell/0007-set-gjs.patch @@ -0,0 +1,11 @@ +--- a/subprojects/extensions-app/meson.build ++++ b/subprojects/extensions-app/meson.build +@@ -47,7 +47,7 @@ metainfodir = join_paths(datadir, 'metainfo') + schemadir = join_paths(datadir, 'glib-2.0', 'schemas') + servicedir = join_paths(datadir, 'dbus-1', 'services') + +-gjs = find_program('gjs') ++gjs = find_program('@TERMUX_PREFIX@/bin/gjs', native : false) + appstreamcli = find_program('appstreamcli', required: false) + desktop_file_validate = find_program('desktop-file-validate', required: false) + diff --git a/x11-packages/gnome-shell/0008-gnome-session-48-backcompat.patch b/x11-packages/gnome-shell/0008-gnome-session-48-backcompat.patch new file mode 100644 index 00000000000..5bf3aed6719 --- /dev/null +++ b/x11-packages/gnome-shell/0008-gnome-session-48-backcompat.patch @@ -0,0 +1,132 @@ +We don't ship gnome-session 49 yet. +--- +From 078fbcde4147147d47b9facafba5de4a9db4abd7 Mon Sep 17 00:00:00 2001 +From: Achill Gilgenast +Date: Tue, 16 Sep 2025 09:36:10 +0200 +Subject: [PATCH 1/2] Reapply "main: Notify gnome-session when we're ready" + +This reverts commit d697bdceaefeae49ad0e03df7352884899c3e14a. + +Signed-off-by: Achill Gilgenast +--- + js/ui/main.js | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/js/ui/main.js b/js/ui/main.js +index 40898e15c23d..ae7a80527361 100644 +--- a/js/ui/main.js ++++ b/js/ui/main.js +@@ -326,6 +326,7 @@ async function _initializeUI() { + GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { + Shell.util_sd_notify(); + global.context.notify_ready(); ++ _notifyGnomeSessionReady(); + return GLib.SOURCE_REMOVE; + }); + +@@ -390,6 +391,20 @@ async function _initializeUI() { + }); + } + ++async function _notifyGnomeSessionReady() { ++ try { ++ let params = GLib.Variant.new('(ss)', ['org.gnome.Shell.desktop', '']); ++ await Gio.DBus.session.call( ++ 'org.gnome.SessionManager', ++ '/org/gnome/SessionManager', ++ 'org.gnome.SessionManager', ++ 'RegisterClient', params, null, ++ Gio.DBusCallFlags.NONE, -1, null); ++ } catch (e) { ++ log(`Error notifying gnome-session that we're ready: ${e.message}`); ++ } ++} ++ + function _handleShowWelcomeScreen() { + const lastShownVersion = global.settings.get_string(WELCOME_DIALOG_LAST_SHOWN_VERSION); + if (Util.GNOMEversionCompare(WELCOME_DIALOG_LAST_TOUR_CHANGE, lastShownVersion) > 0) { +-- +2.51.0 + +From ca32ea422d2b075406a78058a14b0898ddb87698 Mon Sep 17 00:00:00 2001 +From: Achill Gilgenast +Date: Tue, 16 Sep 2025 09:36:18 +0200 +Subject: [PATCH 2/2] Revert "data: Drop org.gnome.Shell.desktop" + +This reverts commit f3911151da7b0e3c630011cb26bd85f719e531d2. + +Signed-off-by: Achill Gilgenast +--- + data/meson.build | 13 ++++++++++++- + ....in => org.gnome.Shell.Extensions.desktop.in.in} | 0 + ...n => org.gnome.Shell.PortalHelper.desktop.in.in} | 0 + data/org.gnome.Shell.desktop.in.in | 13 +++++++++++++ + 4 files changed, 25 insertions(+), 1 deletion(-) + rename data/{org.gnome.Shell.Extensions.desktop.in => org.gnome.Shell.Extensions.desktop.in.in} (100%) + rename data/{org.gnome.Shell.PortalHelper.desktop.in => org.gnome.Shell.PortalHelper.desktop.in.in} (100%) + create mode 100644 data/org.gnome.Shell.desktop.in.in + +diff --git a/data/meson.build b/data/meson.build +index cc7b5e2a1fe6..76a32ca59f1b 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -1,6 +1,7 @@ + data_builddir = meson.current_build_dir() + + desktop_files = [ ++ 'org.gnome.Shell.desktop', + 'org.gnome.Shell.Extensions.desktop', + ] + service_files = [] +@@ -10,9 +11,19 @@ if have_portal_helper + service_files += 'org.gnome.Shell.PortalHelper.service' + endif + ++desktopconf = configuration_data() ++# We substitute in bindir so it works as an autostart ++# file when built in a non-system prefix ++desktopconf.set('bindir', bindir) ++desktopconf.set('systemd_hidden', have_systemd ? 'true' : 'false') ++ + foreach desktop_file : desktop_files + i18n.merge_file( +- input: desktop_file + '.in', ++ input: configure_file( ++ input: desktop_file + '.in.in', ++ output: desktop_file + '.in', ++ configuration: desktopconf ++ ), + output: desktop_file, + po_dir: po_dir, + install: true, +diff --git a/data/org.gnome.Shell.Extensions.desktop.in b/data/org.gnome.Shell.Extensions.desktop.in.in +similarity index 100% +rename from data/org.gnome.Shell.Extensions.desktop.in +rename to data/org.gnome.Shell.Extensions.desktop.in.in +diff --git a/data/org.gnome.Shell.PortalHelper.desktop.in b/data/org.gnome.Shell.PortalHelper.desktop.in.in +similarity index 100% +rename from data/org.gnome.Shell.PortalHelper.desktop.in +rename to data/org.gnome.Shell.PortalHelper.desktop.in.in +diff --git a/data/org.gnome.Shell.desktop.in.in b/data/org.gnome.Shell.desktop.in.in +new file mode 100644 +index 000000000000..59d1cd2fe924 +--- /dev/null ++++ b/data/org.gnome.Shell.desktop.in.in +@@ -0,0 +1,13 @@ ++[Desktop Entry] ++Type=Application ++Name=GNOME Shell ++Comment=Window management and application launching ++Exec=@bindir@/gnome-shell ++Categories=GNOME;GTK;Core; ++OnlyShowIn=GNOME; ++NoDisplay=true ++X-GNOME-Autostart-Phase=DisplayServer ++X-GNOME-Provides=panel;windowmanager; ++X-GNOME-Autostart-Notify=true ++X-GNOME-AutoRestart=false ++X-GNOME-HiddenUnderSystemd=@systemd_hidden@ +-- +2.51.0 + + diff --git a/x11-packages/gnome-shell/0009-disable-brightness.patch b/x11-packages/gnome-shell/0009-disable-brightness.patch new file mode 100644 index 00000000000..f165cb0c8af --- /dev/null +++ b/x11-packages/gnome-shell/0009-disable-brightness.patch @@ -0,0 +1,11 @@ +--- a/js/ui/status/brightness.js ++++ b/js/ui/status/brightness.js +@@ -49,8 +49,5 @@ class BrightnessItem extends QuickSlider { + this.menu.addMenuItem(this._monitorBrightnessSection); + + this._manager = Main.brightnessManager; +- this._manager.connectObject('changed', +- this._sync.bind(this), this); +- this._sync(); + } + diff --git a/x11-packages/gnome-shell/0101-disable-packagekit.patch b/x11-packages/gnome-shell/0101-disable-packagekit.patch new file mode 100644 index 00000000000..929c834ff69 --- /dev/null +++ b/x11-packages/gnome-shell/0101-disable-packagekit.patch @@ -0,0 +1,23 @@ +It is much difficult to port packagekit to Termux + +--- a/js/ui/endSessionDialog.js ++++ b/js/ui/endSessionDialog.js +@@ -240,10 +240,14 @@ + this._user = this._userManager.get_user(GLib.get_user_name()); + this._updatesPermission = null; + +- this._pkOfflineProxy = new PkOfflineProxy(Gio.DBus.system, +- 'org.freedesktop.PackageKit', +- '/org/freedesktop/PackageKit', +- this._onPkOfflineProxyCreated.bind(this)); ++ try { ++ this._pkOfflineProxy = new PkOfflineProxy(Gio.DBus.system, ++ 'org.freedesktop.PackageKit', ++ '/org/freedesktop/PackageKit', ++ this._onPkOfflineProxyCreated.bind(this)); ++ } catch (error) { ++ log(`Failed to connect to PackageKit: ${error.message}`); ++ } + + this._powerProxy = new UPowerProxy(Gio.DBus.system, + 'org.freedesktop.UPower', diff --git a/x11-packages/gnome-shell/build.sh b/x11-packages/gnome-shell/build.sh new file mode 100644 index 00000000000..31274eb2032 --- /dev/null +++ b/x11-packages/gnome-shell/build.sh @@ -0,0 +1,31 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gnome-shell +TERMUX_PKG_DESCRIPTION="GNOME shell" +TERMUX_PKG_LICENSE="GPL-2.0-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="49.3" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gnome-shell/${TERMUX_PKG_VERSION%%.*}/gnome-shell-$TERMUX_PKG_VERSION.tar.xz" +TERMUX_PKG_SHA256=28f0dbd64452f0057129f226753c95d2726de07f1f5f473addc7c3c507a6d31a +TERMUX_PKG_DEPENDS="atk, evolution-data-server, gcr4, gdk-pixbuf, gjs, glib, gnome-autoar, gnome-desktop4, gnome-session, gobject-introspection, graphene, gsettings-desktop-schemas, ibus, libgweather, libx11, libxfixes, libxml2, mutter, pango, pulseaudio" +TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner, glib-cross" +TERMUX_PKG_VERSIONED_GIR=false + +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dpolkit=false +-Dnetworkmanager=false +-Dportal_helper=false +-Dcamera_monitor=false +-Dsystemd=false +-Dgjs_path=$TERMUX_PREFIX/bin/gjs +-Dextensions_tool=true +-Dextensions_app=true +-Dtests=false +" + +termux_step_pre_configure() { + termux_setup_gir + termux_setup_glib_cross_pkg_config_wrapper + + export TERMUX_MESON_ENABLE_SOVERSION=1 + + rm -rf "$TERMUX_PKG_SRCDIR/js/gdm" +} diff --git a/x11-packages/gnome-shell/gir/Gvc-1.0.xml b/x11-packages/gnome-shell/gir/Gvc-1.0.xml new file mode 100644 index 00000000000..0699b6b05d9 --- /dev/null +++ b/x11-packages/gnome-shell/gir/Gvc-1.0.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/gnome-shell/gir/Shell-16.xml b/x11-packages/gnome-shell/gir/Shell-16.xml new file mode 100644 index 00000000000..312960a88f0 --- /dev/null +++ b/x11-packages/gnome-shell/gir/Shell-16.xml @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/gnome-shell/gir/Shell-17.xml b/x11-packages/gnome-shell/gir/Shell-17.xml new file mode 100644 index 00000000000..e7842a82f6a --- /dev/null +++ b/x11-packages/gnome-shell/gir/Shell-17.xml @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/gnome-shell/gir/Shew-0.xml b/x11-packages/gnome-shell/gir/Shew-0.xml new file mode 100644 index 00000000000..2a0e86a431a --- /dev/null +++ b/x11-packages/gnome-shell/gir/Shew-0.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/x11-packages/gnome-shell/gir/St-16.xml b/x11-packages/gnome-shell/gir/St-16.xml new file mode 100644 index 00000000000..43b2ab02440 --- /dev/null +++ b/x11-packages/gnome-shell/gir/St-16.xml @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/gnome-shell/gir/St-17.xml b/x11-packages/gnome-shell/gir/St-17.xml new file mode 100644 index 00000000000..9a3d8891f60 --- /dev/null +++ b/x11-packages/gnome-shell/gir/St-17.xml @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/gnome-tweaks/build.sh b/x11-packages/gnome-tweaks/build.sh new file mode 100644 index 00000000000..d7b7cf28512 --- /dev/null +++ b/x11-packages/gnome-tweaks/build.sh @@ -0,0 +1,22 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/gnome-tweaks +TERMUX_PKG_DESCRIPTION="Graphical interface for advanced GNOME settings" +TERMUX_PKG_LICENSE="GPL-3.0-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="49.0" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/gnome-tweaks/${TERMUX_PKG_VERSION%%.*}/gnome-tweaks-$TERMUX_PKG_VERSION.tar.xz" +TERMUX_PKG_SHA256=b3909bdcb4905b68427d6ab581e01f436dff8e5c0a389b1e0b14500f18806ebb +TERMUX_PKG_DEPENDS="dconf, glib, gnome-desktop4, gsettings-desktop-schemas, gtk4, hicolor-icon-theme, libadwaita, libnotify, pango, python, pygobject" +TERMUX_PKG_BUILD_DEPENDS="rsync, glib-cross" +TERMUX_PKG_SETUP_PYTHON=true +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_PLATFORM_INDEPENDENT=true + +termux_step_pre_configure() { + termux_setup_gir + termux_setup_glib_cross_pkg_config_wrapper + + local p="${TERMUX_PKG_BUILDER_DIR}/gnome-tweaks.diff" + sed -e "s|@TERMUX_PYTHON_HOME@|${TERMUX_PYTHON_HOME}|g" \ + -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \ + "${p}" | patch -p1 --silent -d "$TERMUX_PKG_SRCDIR" +} diff --git a/x11-packages/gnome-tweaks/gnome-tweaks.diff b/x11-packages/gnome-tweaks/gnome-tweaks.diff new file mode 100644 index 00000000000..77d8a1a2707 --- /dev/null +++ b/x11-packages/gnome-tweaks/gnome-tweaks.diff @@ -0,0 +1,40 @@ +--- a/gnome-tweaks ++++ b/gnome-tweaks +@@ -14,7 +14,6 @@ import gi + gi.require_version("Gtk", "4.0") + gi.require_version("Adw", "1") + gi.require_version("GDesktopEnums", "3.0") +-gi.require_version('GUdev', '1.0') + + import gtweak + from gtweak.defs import VERSION, APP_ID, GSETTINGS_SCHEMA_DIR, TWEAK_DIR, DATA_DIR, \ +@@ -28,7 +27,7 @@ def set_internationalization(domain, locale_dir): + try: + locale.bindtextdomain(domain, locale_dir) + locale.textdomain(domain) +- except AttributeError as e: ++ except (AttributeError,OSError) as e: + # Python built without gettext support does not have + # bindtextdomain() and textdomain(). + logging.error( +@@ -49,9 +49,8 @@ def setup_defs_for_prefix(prefix: str): + gtweak.LOCALE_DIR = os.path.join(prefix, "share", "locale") + gtweak.GSETTINGS_SCHEMA_DIR = os.path.join(prefix, "share", "glib-2.0", "schemas") + +- me = os.path.abspath(os.path.dirname(__file__)) +- gtweak.TWEAK_DIR = os.path.join(me, "gtweak", "tweaks") +- gtweak.PKG_DATA_DIR = os.path.join(me, "data") ++ gtweak.TWEAK_DIR = "@TERMUX_PYTHON_HOME@/site-packages/gtweak/tweaks" ++ gtweak.PKG_DATA_DIR = "@TERMUX_PREFIX@/share/gnome-tweaks" + + + def setup_defs(prefix: str | None = None): +@@ -84,7 +83,7 @@ if __name__ == '__main__': + parser.add_option("--gapplication-service", action="store_true") + options, args = parser.parse_args() + +- setup_defs(options.prefix or None) ++ setup_defs(options.prefix or "@TERMUX_PREFIX@") + + gtweak.VERBOSE = options.verbose + diff --git a/x11-packages/gnome-tweaks/no-gudev.patch b/x11-packages/gnome-tweaks/no-gudev.patch new file mode 100644 index 00000000000..9ace0dcf46c --- /dev/null +++ b/x11-packages/gnome-tweaks/no-gudev.patch @@ -0,0 +1,34 @@ +diff --git a/meson.build b/meson.build +index 2c7b6d0..31753ca 100644 +--- a/meson.build ++++ b/meson.build +@@ -23,7 +23,6 @@ dependency('gobject-introspection-1.0', version: '>= 1.78.0') + dependency('gtk4', version: '>= 4.10.0') + dependency('libadwaita-1', version: '>= 1.4.0') + dependency('pygobject-3.0', version: '>= 3.46.0') +-dependency('gudev-1.0', version: '>= 238') + dependency('gsettings-desktop-schemas', version: '>= 46.0') + + prefix = get_option('prefix') +--- a/gtweak/devicemanager.py ++++ b/gtweak/devicemanager.py +@@ -2,7 +2,6 @@ + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 + +-from gi.repository import GUdev + + # Inspired by panels/common/gsd-device-manager.c in GNOME Settings + # https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/6d2add0e30538692c151e5fa0bd94ae9bece7690/panels/common/gsd-device-manager.c +@@ -28,10 +27,7 @@ def udev_device_is_evdev(device): + + + def get_input_devices(): +- udev_client = GUdev.Client() +- devices = udev_client.query_by_subsystem ("input") +- +- return [device for device in devices if udev_device_is_evdev(device)] ++ return [] + + + def udev_device_get_device_types (device): diff --git a/x11-packages/gnome/build.sh b/x11-packages/gnome/build.sh new file mode 100644 index 00000000000..a8b1751da6e --- /dev/null +++ b/x11-packages/gnome/build.sh @@ -0,0 +1,10 @@ +TERMUX_PKG_HOMEPAGE=https://www.gnome.org/ +TERMUX_PKG_DESCRIPTION="A metapackage that installs all parts of the GNOME desktop environment" +TERMUX_PKG_LICENSE="Public Domain" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="49.0" +TERMUX_PKG_AUTO_UPDATE=false +TERMUX_PKG_SKIP_SRC_EXTRACT=true +TERMUX_PKG_DEPENDS="epiphany, gnome-backgrounds, gnome-calculator, gnome-clocks, gnome-console, gnome-control-center, gnome-keyring, gnome-menus, gnome-session, gnome-settings-daemon, gnome-shell, gvfs, nautilus, orca" +TERMUX_PKG_METAPACKAGE=true +TERMUX_PKG_PLATFORM_INDEPENDENT=true diff --git a/x11-packages/localsearch/0001-no-udev-3.9.0.patch b/x11-packages/localsearch/0001-no-udev-3.9.0.patch new file mode 100644 index 00000000000..dc5eed5b276 --- /dev/null +++ b/x11-packages/localsearch/0001-no-udev-3.9.0.patch @@ -0,0 +1,165 @@ +From 151cb704db837b1a5d59b6c146bf42e42c0c2dbc Mon Sep 17 00:00:00 2001 +From: Md Arif <111168803+sabamdarif@users.noreply.github.com> +Date: Wed, 9 Jul 2025 14:56:31 +0530 +Subject: [PATCH] no udev 3.9.0 + +--- + meson.build | 1 - + src/common/tracker-enums.h | 18 +++++++++--------- + src/indexer/meson.build | 1 - + src/indexer/tracker-miner-files-methods.c | 17 +++++------------ + src/indexer/tracker-miner-files.c | 8 -------- + src/indexer/tracker-miner-files.h | 2 -- + 6 files changed, 14 insertions(+), 33 deletions(-) + +diff --git a/meson.build b/meson.build +index a5820e3..2f38233 100644 +--- a/meson.build ++++ b/meson.build +@@ -23,7 +23,6 @@ gexiv2 = dependency('gexiv2', required: get_option('raw')) + gio = dependency('gio-2.0', version: '>=' + glib_required) + gio_unix = dependency('gio-unix-2.0', version: '>=' + glib_required) + glib = dependency('glib-2.0', version: '>=' + glib_required) +-gudev = dependency('gudev-1.0') + gmodule = dependency('gmodule-2.0', version: '>=' + glib_required) + gobject = dependency('gobject-2.0', version: '>=' + glib_required) + gobject_introspection = dependency('gobject-introspection-1.0') +diff --git a/src/common/tracker-enums.h b/src/common/tracker-enums.h +index acd6493..6f69244 100644 +--- a/src/common/tracker-enums.h ++++ b/src/common/tracker-enums.h +@@ -23,18 +23,18 @@ + G_BEGIN_DECLS + + typedef enum { +- TRACKER_SERIALIZATION_FORMAT_SPARQL, +- TRACKER_SERIALIZATION_FORMAT_TURTLE, +- /* JSON and JSON_LD are treated as the same thing right now, but we could +- * treat them differently if we wanted. also it's nice to be able to pass +- * both 'json' and 'json-ld' to `tracker extract --output-format=`. +- */ +- TRACKER_SERIALIZATION_FORMAT_JSON, +- TRACKER_SERIALIZATION_FORMAT_JSON_LD, ++ TRACKER_SERIALIZATION_FORMAT_SPARQL, ++ TRACKER_SERIALIZATION_FORMAT_TURTLE, ++ /* JSON and JSON_LD are treated as the same thing right now, but we could ++ * treat them differently if we wanted. also it's nice to be able to pass ++ * both 'json' and 'json-ld' to `tracker extract --output-format=`. ++ */ ++ TRACKER_SERIALIZATION_FORMAT_JSON, ++ TRACKER_SERIALIZATION_FORMAT_JSON_LD + } TrackerSerializationFormat; + + typedef enum { +- TRACKER_INDEX_LOCATION_FLAGS_NONE = 0, ++ TRACKER_INDEX_LOCATION_FLAGS_NONE = 0 + } TrackerIndexLocationFlags; + + G_END_DECLS +diff --git a/src/indexer/meson.build b/src/indexer/meson.build +index 95baf5b..21663e5 100644 +--- a/src/indexer/meson.build ++++ b/src/indexer/meson.build +@@ -56,7 +56,6 @@ sources = [ + tracker_miner_fs_deps = [ + tracker_miners_common_dep, + tracker_miner_dep, +- gudev, + ] + + executable('localsearch-@0@'.format(tracker_api_major), +diff --git a/src/indexer/tracker-miner-files-methods.c b/src/indexer/tracker-miner-files-methods.c +index 403c971..501e429 100644 +--- a/src/indexer/tracker-miner-files-methods.c ++++ b/src/indexer/tracker-miner-files-methods.c +@@ -412,9 +412,8 @@ static gchar * + lookup_filesystem_id (TrackerMinerFiles *files, + GFile *file) + { +- const gchar *id = NULL, *devname = NULL; +- GUdevClient *udev_client; +- g_autoptr (GUdevDevice) udev_device = NULL; ++ const gchar *id = NULL; ++ const char *devname = NULL; + MountData *mount_data = NULL; + const char *path; + int path_len; +@@ -455,15 +454,9 @@ lookup_filesystem_id (TrackerMinerFiles *files, + } + } + +- if (devname) { +- udev_client = tracker_miner_files_get_udev_client (files); +- udev_device = g_udev_client_query_by_device_file (udev_client, devname); +- if (udev_device) { +- id = g_udev_device_get_property (udev_device, "ID_FS_UUID_SUB"); +- if (!id) +- id = g_udev_device_get_property (udev_device, "ID_FS_UUID"); +- } +- } ++ // Without udev, just return the device path as a fallback or NULL ++ if (devname) ++ id = devname; + + return g_strdup (id); + } +diff --git a/src/indexer/tracker-miner-files.c b/src/indexer/tracker-miner-files.c +index 25e1d1a..b559ff4 100644 +--- a/src/indexer/tracker-miner-files.c ++++ b/src/indexer/tracker-miner-files.c +@@ -79,7 +79,6 @@ struct _TrackerMinerFilesPrivate { + gboolean low_battery_pause; + gboolean initial_index; + +- GUdevClient *udev_client; + #ifdef HAVE_POWER + TrackerPower *power; + #endif /* HAVE_POWER) */ +@@ -309,7 +308,6 @@ tracker_miner_files_init (TrackerMinerFiles *mf) + priv->finished_handler = g_signal_connect_after (mf, "finished", + G_CALLBACK (miner_finished_cb), + NULL); +- priv->udev_client = g_udev_client_new (NULL); + } + + static void +@@ -429,7 +427,6 @@ miner_files_finalize (GObject *object) + #endif /* HAVE_POWER */ + + tracker_domain_ontology_unref (priv->domain_ontology); +- g_clear_pointer (&priv->udev_client, g_object_unref); + + if (priv->storage) { + g_object_unref (priv->storage); +@@ -1221,8 +1218,3 @@ tracker_miner_files_check_allowed_text_file (TrackerMinerFiles *mf, + return FALSE; + } + +-GUdevClient * +-tracker_miner_files_get_udev_client (TrackerMinerFiles *mf) +-{ +- return mf->private->udev_client; +-} +diff --git a/src/indexer/tracker-miner-files.h b/src/indexer/tracker-miner-files.h +index 96acf01..e9ed27a 100644 +--- a/src/indexer/tracker-miner-files.h ++++ b/src/indexer/tracker-miner-files.h +@@ -21,7 +21,6 @@ + #define __TRACKER_MINER_FS_FILES_H__ + + #include +-#include + + #include "tracker-config.h" + +@@ -45,7 +44,6 @@ TrackerStorage * tracker_miner_files_get_storage (TrackerMinerFiles *mf); + gboolean tracker_miner_files_check_allowed_text_file (TrackerMinerFiles *mf, + GFile *file); + +-GUdevClient * tracker_miner_files_get_udev_client (TrackerMinerFiles *mf); + + G_END_DECLS + +-- +2.48.1 + diff --git a/x11-packages/localsearch/0002-fix-paths.patch b/x11-packages/localsearch/0002-fix-paths.patch new file mode 100644 index 00000000000..763b1bb2adc --- /dev/null +++ b/x11-packages/localsearch/0002-fix-paths.patch @@ -0,0 +1,372 @@ +From 705664ef5394beb4eb9ab948935a85e9b9e75527 Mon Sep 17 00:00:00 2001 +From: Md Arif <111168803+sabamdarif@users.noreply.github.com> +Date: Thu, 10 Jul 2025 12:00:00 +0530 +Subject: [PATCH] fix paths + +--- + docs/reference/build.py | 2 +- + examples/flatpak/example-app.py | 2 +- + examples/python/query-async.py | 2 +- + examples/python/query-sync.py | 2 +- + gitlog-to-changelog | 2 +- + meson_integration_commands.sh | 2 +- + run-uninstalled.in | 2 +- + src/cli/tracker-sandbox.in | 2 +- + src/create-miner-symlinks.sh | 2 +- + src/extractor/calculate-hash.sh | 2 +- + src/extractor/setup-extract-rules.sh | 2 +- + src/install-generated-header.sh | 2 +- + tests/common/tracker-file-utils-test.c | 46 ++++++++++++------------- + tests/estress/abstract_engine.py | 2 +- + tests/estress/abstract_text_engine.py | 2 +- + tests/estress/client.py | 2 +- + tests/estress/mock_engine.py | 2 +- + tests/estress/options.py | 2 +- + tests/estress/rss_engine.py | 2 +- + tests/estress/wh_engine.py | 2 +- + tests/functional-tests/configuration.py | 2 +- + utils/trackertestutils/__main__.py | 6 ++-- + 22 files changed, 46 insertions(+), 46 deletions(-) + +diff --git a/docs/reference/build.py b/docs/reference/build.py +index 62bdd4a..293ab14 100755 +--- a/docs/reference/build.py ++++ b/docs/reference/build.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # Tracker website build script. + # + # Copyright 2020, Sam Thursfield +diff --git a/examples/flatpak/example-app.py b/examples/flatpak/example-app.py +index ec6e1d8..bf4efce 100644 +--- a/examples/flatpak/example-app.py ++++ b/examples/flatpak/example-app.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + + """A simple search app that works inside Flatpak.""" + +diff --git a/examples/python/query-async.py b/examples/python/query-async.py +index e96933d..6737ca5 100755 +--- a/examples/python/query-async.py ++++ b/examples/python/query-async.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # Copyright (C) 2020, Sam Thursfield + # + # This program is free software; you can redistribute it and/or +diff --git a/examples/python/query-sync.py b/examples/python/query-sync.py +index f7b26e3..3af54f4 100755 +--- a/examples/python/query-sync.py ++++ b/examples/python/query-sync.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # Copyright (C) 2020, Sam Thursfield + # + # This program is free software; you can redistribute it and/or +diff --git a/gitlog-to-changelog b/gitlog-to-changelog +index 1f0216a..3a59aa0 100755 +--- a/gitlog-to-changelog ++++ b/gitlog-to-changelog +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!@TERMUX_PREFIX@/bin/perl + # Convert git log output to ChangeLog format. + + my $VERSION = '2023-10-19 07:20'; # UTC +diff --git a/meson_integration_commands.sh b/meson_integration_commands.sh +index 34a526f..3897df9 100644 +--- a/meson_integration_commands.sh ++++ b/meson_integration_commands.sh +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!@TERMUX_PREFIX@/bin/sh + + # Post install triggers. + # +diff --git a/run-uninstalled.in b/run-uninstalled.in +index 795ab3e..560ddfb 100755 +--- a/run-uninstalled.in ++++ b/run-uninstalled.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright (C) 2019 Sam Thursfield + # +diff --git a/src/cli/tracker-sandbox.in b/src/cli/tracker-sandbox.in +index b75ceb6..5ef31a6 100755 +--- a/src/cli/tracker-sandbox.in ++++ b/src/cli/tracker-sandbox.in +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!@TERMUX_PREFIX@/bin/sh + + export GI_TYPELIB_PATH=@typelibdir@/:$GI_TYPELIB_PATH + export PYTHONPATH=@testutils_dir@:$PYTHONPATH +diff --git a/src/create-miner-symlinks.sh b/src/create-miner-symlinks.sh +index c46f9c0..20e4bb3 100644 +--- a/src/create-miner-symlinks.sh ++++ b/src/create-miner-symlinks.sh +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!@TERMUX_PREFIX@/bin/sh + # Post-install script for install stuff that Meson doesn't support directly. + # + # We can't pass the necessary variables directly to the script, so we +diff --git a/src/extractor/calculate-hash.sh b/src/extractor/calculate-hash.sh +index 223d9b0..79de190 100755 +--- a/src/extractor/calculate-hash.sh ++++ b/src/extractor/calculate-hash.sh +@@ -1,2 +1,2 @@ +-#!/bin/sh ++#!@TERMUX_PREFIX@/bin/sh + cat $@ | sha256sum | cut -f 1 -d ' ' +diff --git a/src/extractor/setup-extract-rules.sh b/src/extractor/setup-extract-rules.sh +index b681ab6..34736a3 100644 +--- a/src/extractor/setup-extract-rules.sh ++++ b/src/extractor/setup-extract-rules.sh +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!@TERMUX_PREFIX@/bin/sh + # Create a directory of enabled extract rules inside the build tree, for + # use when running tracker-extract from the build tree. + +diff --git a/src/install-generated-header.sh b/src/install-generated-header.sh +index 0078aaf..47cc625 100644 +--- a/src/install-generated-header.sh ++++ b/src/install-generated-header.sh +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!@TERMUX_PREFIX@/bin/sh + + # Script to install generated .h files. This only exists to workaround + # a Meson bug: https://github.com/mesonbuild/meson/issues/705 +diff --git a/tests/common/tracker-file-utils-test.c b/tests/common/tracker-file-utils-test.c +index 78fa6f2..dd4f3f4 100644 +--- a/tests/common/tracker-file-utils-test.c ++++ b/tests/common/tracker-file-utils-test.c +@@ -81,11 +81,11 @@ string_in_list (GSList *list, const gchar *string) + static void + test_path_list_filter_duplicates (void) + { +- const gchar *input_roots [] = {"/home/ivan", +- "/home", +- "/tmp", +- "/usr/", +- "/usr/share/local", NULL}; ++ const gchar *input_roots [] = {"@TERMUX_HOME@/ivan", ++ "@TERMUX_HOME@", ++ "@TERMUX_PREFIX@/tmp", ++ "@TERMUX_PREFIX@", ++ "@TERMUX_PREFIX@/share/local", NULL}; + + GSList *input_as_list = NULL; + GSList *result; +@@ -95,9 +95,9 @@ test_path_list_filter_duplicates (void) + result = tracker_path_list_filter_duplicates (input_as_list, ".", TRUE); + g_assert_cmpint (3, ==, g_slist_length (result)); + +- g_assert_true (string_in_list (result, "/home")); +- g_assert_true (string_in_list (result, "/tmp")); +- g_assert_true (string_in_list (result, "/usr")); ++ g_assert_true (string_in_list (result, "@TERMUX_HOME@")); ++ g_assert_true (string_in_list (result, "@TERMUX_PREFIX@/tmp")); ++ g_assert_true (string_in_list (result, "@TERMUX_PREFIX@")); + + g_slist_foreach (input_as_list, (GFunc) g_free, NULL); + g_slist_foreach (result, (GFunc) g_free, NULL); +@@ -106,25 +106,25 @@ test_path_list_filter_duplicates (void) + static void + test_path_list_filter_duplicates_with_exceptions () + { +- const gchar *input_roots [] = { "/home/user/MyDocs", +- "/home/user/MyDocs/.sounds", +- "/home/user/MyDocs/visible", ++ const gchar *input_roots [] = { "@TERMUX_HOME@/user/MyDocs", ++ "@TERMUX_HOME@/user/MyDocs/.sounds", ++ "@TERMUX_HOME@/user/MyDocs/visible", + NULL}; + GSList *input_as_list = NULL, *result = NULL; + + input_as_list = array_as_list (input_roots); + +- result = tracker_path_list_filter_duplicates (input_as_list, "/home/user/MyDocs", FALSE); ++ result = tracker_path_list_filter_duplicates (input_as_list, "@TERMUX_HOME@/user/MyDocs", FALSE); + g_assert_cmpint (g_slist_length (result), ==, 3); +- g_assert_true (string_in_list (result, "/home/user/MyDocs")); +- g_assert_true (string_in_list (result, "/home/user/MyDocs/.sounds")); +- g_assert_true (string_in_list (result, "/home/user/MyDocs/visible")); ++ g_assert_true (string_in_list (result, "@TERMUX_HOME@/user/MyDocs")); ++ g_assert_true (string_in_list (result, "@TERMUX_HOME@/user/MyDocs/.sounds")); ++ g_assert_true (string_in_list (result, "@TERMUX_HOME@/user/MyDocs/visible")); + g_slist_foreach (result, (GFunc) g_free, NULL); + + +- result = tracker_path_list_filter_duplicates (input_as_list, "/home/user/MyDocs", TRUE); ++ result = tracker_path_list_filter_duplicates (input_as_list, "@TERMUX_HOME@/user/MyDocs", TRUE); + g_assert_cmpint (g_slist_length (result), ==, 1); +- g_assert_true (string_in_list (result, "/home/user/MyDocs")); ++ g_assert_true (string_in_list (result, "@TERMUX_HOME@/user/MyDocs")); + g_slist_foreach (result, (GFunc) g_free, NULL); + + g_slist_foreach (input_as_list, (GFunc) g_free, NULL); +@@ -144,15 +144,15 @@ test_path_evaluate_name (void) + g_setenv ("TEST_TRACKER_DIR", test, TRUE); + + +- result = tracker_path_evaluate_name ("/home/user/all/ok"); +- g_assert_cmpstr (result, ==, "/home/user/all/ok"); ++ result = tracker_path_evaluate_name ("@TERMUX_HOME@/user/all/ok"); ++ g_assert_cmpstr (result, ==, "@TERMUX_HOME@/user/all/ok"); + g_free (result); + + /* The result of this test and the next one are not consistent! + * Must it remove the end '/' or not? + */ +- result = tracker_path_evaluate_name ("/home/user/all/dir/"); +- g_assert_cmpstr (result, ==, "/home/user/all/dir"); ++ result = tracker_path_evaluate_name ("@TERMUX_HOME@/user/all/dir/"); ++ g_assert_cmpstr (result, ==, "@TERMUX_HOME@/user/all/dir"); + g_free (result); + + +@@ -343,7 +343,7 @@ test_file_system_get_remaining_space () + { + guint64 space; + +- space = tracker_file_system_get_remaining_space ("/home"); ++ space = tracker_file_system_get_remaining_space ("@TERMUX_HOME@"); + g_assert_cmpint (space, >, 0); + + // This is a critical (aborts the process) +@@ -355,7 +355,7 @@ test_file_system_get_remaining_space_percentage () + { + gdouble space; + +- space = tracker_file_system_get_remaining_space_percentage ("/home"); ++ space = tracker_file_system_get_remaining_space_percentage ("@TERMUX_HOME@"); + g_assert_cmpfloat (space, >=, 0); + g_assert_cmpfloat (space, <=, 100); + +diff --git a/tests/estress/abstract_engine.py b/tests/estress/abstract_engine.py +index fb35baa..99663d8 100644 +--- a/tests/estress/abstract_engine.py ++++ b/tests/estress/abstract_engine.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright (C) 2009, Nokia + # +diff --git a/tests/estress/abstract_text_engine.py b/tests/estress/abstract_text_engine.py +index a506457..72f2d6c 100644 +--- a/tests/estress/abstract_text_engine.py ++++ b/tests/estress/abstract_text_engine.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright (C) 2009, Nokia + # +diff --git a/tests/estress/client.py b/tests/estress/client.py +index 19aabe7..ca12c35 100755 +--- a/tests/estress/client.py ++++ b/tests/estress/client.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright (C) 2009, Nokia + # +diff --git a/tests/estress/mock_engine.py b/tests/estress/mock_engine.py +index 72976fe..f2859c8 100644 +--- a/tests/estress/mock_engine.py ++++ b/tests/estress/mock_engine.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright (C) 2009, Nokia + # +diff --git a/tests/estress/options.py b/tests/estress/options.py +index 828f9a2..62a696b 100644 +--- a/tests/estress/options.py ++++ b/tests/estress/options.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright (C) 2009, Nokia + # +diff --git a/tests/estress/rss_engine.py b/tests/estress/rss_engine.py +index ed40edd..43078aa 100755 +--- a/tests/estress/rss_engine.py ++++ b/tests/estress/rss_engine.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright (C) 2009, Nokia + # +diff --git a/tests/estress/wh_engine.py b/tests/estress/wh_engine.py +index 1787e24..10e74e5 100755 +--- a/tests/estress/wh_engine.py ++++ b/tests/estress/wh_engine.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright (C) 2009, Nokia + # +diff --git a/tests/functional-tests/configuration.py b/tests/functional-tests/configuration.py +index 193dc0a..f180601 100644 +--- a/tests/functional-tests/configuration.py ++++ b/tests/functional-tests/configuration.py +@@ -74,7 +74,7 @@ def tap_protocol_enabled(): + # 'filter-hidden' property of TrackerIndexingTree is hardwired to be True at + # present :/ + _TEST_MONITORED_TMP_DIR = os.path.join(config["TEST_ROOT"], "tracker-tests") +-if _TEST_MONITORED_TMP_DIR.startswith("/tmp"): ++if _TEST_MONITORED_TMP_DIR.startswith("@TERMUX_PREFIX@/tmp"): + if "REAL_HOME" in os.environ: + _TEST_MONITORED_TMP_DIR = os.path.join(os.environ["REAL_HOME"], "tracker-tests") + else: +diff --git a/utils/trackertestutils/__main__.py b/utils/trackertestutils/__main__.py +index bec5b45..04337fa 100644 +--- a/utils/trackertestutils/__main__.py ++++ b/utils/trackertestutils/__main__.py +@@ -49,7 +49,7 @@ script_about = "Tracker Sandbox developer tool." + prog = os.path.basename(getattr(sys, 'orig_argv', ['python'])[0]) + script_name = "tracker-sandbox" if prog.startswith("python") else prog + +-default_store_location = '/tmp/tracker-sandbox' ++default_store_location = '@TERMUX_PREFIX@/tmp/tracker-sandbox' + + store_pid = -1 + store_proc = None +@@ -118,7 +118,7 @@ def create_sandbox(store_location, prefix=None, use_session_dirs=False, + extra_env['XDG_RUNTIME_DIR'] = '%s/run/' % store_location + + # Prefix - only set if non-standard +- if prefix and prefix != '/usr': ++ if prefix and prefix != '@TERMUX_PREFIX@': + environment_set_and_add_path(extra_env, 'PATH', prefix, 'bin') + environment_set_and_add_path(extra_env, 'LD_LIBRARY_PATH', prefix, 'lib') + environment_set_and_add_path(extra_env, 'LD_LIBRARY_PATH', prefix, 'lib64') +@@ -214,7 +214,7 @@ def argument_parser(): + parser.add_argument('-p', '--prefix', metavar='DIR', action=expand_path, + help="run Tracker from the given install prefix. You " + "can run the system version of Tracker by " +- "specifying --prefix=/usr") ++ "specifying --prefix=@TERMUX_PREFIX@") + parser.add_argument('--use-session-dirs', action='store_true', + help=f"update the real Tracker index (use with care!)") + store_group = parser.add_mutually_exclusive_group() +-- +2.48.1 + diff --git a/x11-packages/localsearch/build.sh b/x11-packages/localsearch/build.sh new file mode 100644 index 00000000000..e0ad18b3b0b --- /dev/null +++ b/x11-packages/localsearch/build.sh @@ -0,0 +1,24 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/GNOME/localsearch +TERMUX_PKG_DESCRIPTION="Local search library that uses Tracker" +TERMUX_PKG_LICENSE="LGPL-2.1-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION=3.9.0 +TERMUX_PKG_SRCURL=https://github.com/GNOME/localsearch/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=6d8d5ff2a2320632e2cd14ef5a9c6a57d67430ac71d36428a257404a81dcf943 +TERMUX_PKG_DEPENDS="asciidoc, dbus, glib, sqlite, gstreamer, upower, totem-pl-parser, tinysparql, libexif, gexiv2, libgxps, libseccomp, libpng, ffmpeg, libportal, libportal-gtk3, libportal-gtk4" +TERMUX_PKG_BUILD_DEPENDS="glib-cross" +TERMUX_PKG_PYTHON_COMMON_DEPS="jinja2, markupsafe, markdown, pygments, typogrify" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dsystemd_user_services=false +-Dlandlock=disabled +" +TERMUX_PKG_RM_AFTER_INSTALL=" +lib/python*/site-packages/asciidoc +" + +termux_step_pre_configure() { + termux_setup_cmake + termux_setup_meson + termux_setup_glib_cross_pkg_config_wrapper + export TERMUX_MESON_ENABLE_SOVERSION=1 +} diff --git a/x11-packages/mutter/0003-missing-guards.patch b/x11-packages/mutter/0003-missing-guards.patch index a4495ecf32b..096deb85f4a 100644 --- a/x11-packages/mutter/0003-missing-guards.patch +++ b/x11-packages/mutter/0003-missing-guards.patch @@ -18,6 +18,7 @@ +#ifdef HAVE_LIBGUDEV #include "backends/meta-udev.h" +#endif + #include "backends/native/meta-backend-native-types.h" #include "backends/native/meta-clutter-backend-native.h" #include "backends/native/meta-kms-types.h" - + diff --git a/x11-packages/mutter/0005-fill-memfd.patch b/x11-packages/mutter/0005-fill-memfd.patch index 9678f990d5a..4a08b859fc4 100644 --- a/x11-packages/mutter/0005-fill-memfd.patch +++ b/x11-packages/mutter/0005-fill-memfd.patch @@ -13,11 +13,11 @@ #define PRIVATE_OWNER_FROM_FIELD(TypeName, field_ptr, field_name) \ (TypeName *)((guint8 *)(field_ptr) - G_PRIVATE_OFFSET (TypeName, field_name)) ---- a/src/core/meta-anonymous-file.h -+++ b/src/core/meta-anonymous-file.h -@@ -22,6 +22,13 @@ - #include "meta/common.h" - #include "core/util-private.h" +--- a/mtk/mtk/mtk-anonymous-file.h ++++ b/mtk/mtk/mtk-anonymous-file.h +@@ -24,6 +24,13 @@ + + #include "mtk/mtk-macros.h" +#if defined(__ANDROID__) && __ANDROID_API__ < 30 +#include @@ -26,6 +26,6 @@ +#define HAVE_MEMFD_CREATE +#endif + - typedef struct _MetaAnonymousFile MetaAnonymousFile; + typedef struct _MtkAnonymousFile MtkAnonymousFile; - typedef enum _MetaAnonymousFileMapmode + typedef enum _MtkAnonymousFileMapmode diff --git a/x11-packages/mutter/0006-fix-anno-file.patch b/x11-packages/mutter/0006-fix-anno-file.patch index 96e366b7952..11eaa5c2501 100644 --- a/x11-packages/mutter/0006-fix-anno-file.patch +++ b/x11-packages/mutter/0006-fix-anno-file.patch @@ -1,11 +1,11 @@ Fallback to `@TERMUX_PREFIX@/tmp` if env `XDG_RUNTIME_DIR` is not set. ---- a/src/core/meta-anonymous-file.c -+++ b/src/core/meta-anonymous-file.c -@@ -115,6 +115,12 @@ - char *name; +--- a/mtk/mtk/mtk-anonymous-file.c ++++ b/mtk/mtk/mtk-anonymous-file.c +@@ -121,6 +121,12 @@ create_anonymous_file (const char *name, + g_autofree char *filename = NULL; - path = getenv ("XDG_RUNTIME_DIR"); + path = g_get_user_runtime_dir (); +#ifdef __TERMUX__ + if (!path) + { diff --git a/x11-packages/mutter/0007-revert-glycin.patch b/x11-packages/mutter/0007-revert-glycin.patch new file mode 100644 index 00000000000..7dad66b1acd --- /dev/null +++ b/x11-packages/mutter/0007-revert-glycin.patch @@ -0,0 +1,515 @@ +Partially revert https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4554 +glycin does not work on Android + +diff --git a/config.h.meson b/config.h.meson +index 655227c..fc1e518 100644 +--- a/config.h.meson ++++ b/config.h.meson +@@ -130,6 +130,9 @@ + /* Supports timerfd_create/timerfd_settime */ + #mesondefine HAVE_TIMERFD + ++/* Supports malloc_trim */ ++#mesondefine HAVE_MALLOC_TRIM ++ + /* Supports eventfd */ + #mesondefine HAVE_EVENTFD + +diff --git a/meson.build b/meson.build +index c9f85b1..5feca07 100644 +--- a/meson.build ++++ b/meson.build +@@ -21,7 +21,7 @@ gi_req = '>= 0.9.5' + graphene_req = '>= 1.10.2' + gtk3_req = '>= 3.19.8' + gtk4_req = '>= 4.14.0' +-glycin_req = '>= 2.0.beta.2' ++gdk_pixbuf_req = '>= 2.0' + pango_req = '>= 1.46.0' + cairo_req = '>= 1.10.0' + pangocairo_req = '>= 1.20' +@@ -117,7 +117,7 @@ subproject('gvdb') + + m_dep = cc.find_library('m', required: true) + graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req) +-glycin_dep = dependency('glycin-2', version: glycin_req) ++gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req) + cairo_dep = dependency('cairo', version: cairo_req) + pixman_dep = dependency('pixman-1', version: pixman_req) + gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', +@@ -394,6 +394,8 @@ int main (int argc, char ** argv) { + } + ''', name : 'timerfd_create(2) system call') + ++have_malloc_trim = cc.has_function('malloc_trim') ++ + have_documentation = get_option('docs') + have_tests = get_option('tests').enable_auto_if(have_native_backend).enabled() + have_mutter_tests = false +@@ -617,6 +619,7 @@ cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification) + cdata.set('HAVE_INTROSPECTION', have_introspection) + cdata.set('HAVE_PROFILER', have_profiler) + cdata.set('HAVE_TIMERFD', have_timerfd) ++cdata.set('HAVE_MALLOC_TRIM', have_malloc_trim) + cdata.set('HAVE_EVENTFD', have_eventfd) + cdata.set('HAVE_FONTS', have_fonts) + cdata.set('HAVE_DRM_PLANE_SIZE_HINT', have_drm_plane_size_hint) +diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c +index cf3d6a0..71591a7 100644 +--- a/src/compositor/meta-background-actor.c ++++ b/src/compositor/meta-background-actor.c +@@ -22,7 +22,6 @@ + #include "config.h" + + #include "compositor/meta-background-content-private.h" +-#include "compositor/meta-background-private.h" + #include "compositor/meta-cullable.h" + #include "meta/meta-background-actor.h" + +@@ -47,26 +46,6 @@ static void cullable_iface_init (MetaCullableInterface *iface); + G_DEFINE_TYPE_WITH_CODE (MetaBackgroundActor, meta_background_actor, CLUTTER_TYPE_ACTOR, + G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init)); + +-static void +-on_background_changed (MetaBackgroundContent *content, +- GParamSpec *pspec, +- gpointer data) +-{ +- MetaBackgroundActor *self = META_BACKGROUND_ACTOR (data); +- MetaBackground *background; +- ClutterColorState *color_state; +- +- background = meta_background_content_get_background (content); +- if (!background) +- return; +- +- color_state = meta_background_get_color_state (background); +- if (!color_state) +- return; +- +- clutter_actor_set_color_state (CLUTTER_ACTOR (self), color_state); +-} +- + static void + maybe_create_content (MetaBackgroundActor *self) + { +@@ -78,10 +57,6 @@ maybe_create_content (MetaBackgroundActor *self) + content = meta_background_content_new (self->display, self->monitor); + self->content = META_BACKGROUND_CONTENT (content); + clutter_actor_set_content (CLUTTER_ACTOR (self), content); +- g_signal_connect_object (content, "notify::background", +- G_CALLBACK (on_background_changed), self, +- G_CONNECT_DEFAULT); +- on_background_changed (self->content, NULL, self); + } + + static void +diff --git a/src/compositor/meta-background-content-private.h b/src/compositor/meta-background-content-private.h +index ac83784..36031a4 100644 +--- a/src/compositor/meta-background-content-private.h ++++ b/src/compositor/meta-background-content-private.h +@@ -11,5 +11,3 @@ void meta_background_content_cull_unobscured (MetaBackgroundContent *self, + + void meta_background_content_cull_redraw_clip (MetaBackgroundContent *self, + MtkRegion *clip_region); +- +-MetaBackground * meta_background_content_get_background (MetaBackgroundContent *self); +diff --git a/src/compositor/meta-background-content.c b/src/compositor/meta-background-content.c +index 918d5f8..481765c 100644 +--- a/src/compositor/meta-background-content.c ++++ b/src/compositor/meta-background-content.c +@@ -303,7 +303,6 @@ on_background_changed (MetaBackground *background, + { + invalidate_pipeline (self, CHANGED_BACKGROUND); + clutter_content_invalidate (CLUTTER_CONTENT (self)); +- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BACKGROUND]); + } + + static CoglPipeline * +@@ -970,9 +969,7 @@ meta_background_content_class_init (MetaBackgroundContentClass *klass) + properties[PROP_BACKGROUND] = + g_param_spec_object ("background", NULL, NULL, + META_TYPE_BACKGROUND, +- G_PARAM_READWRITE | +- G_PARAM_STATIC_STRINGS | +- G_PARAM_EXPLICIT_NOTIFY); ++ G_PARAM_READWRITE); + + properties[PROP_GRADIENT] = + g_param_spec_boolean ("gradient", NULL, NULL, +@@ -1075,7 +1072,6 @@ meta_background_content_set_background (MetaBackgroundContent *self, + + invalidate_pipeline (self, CHANGED_BACKGROUND); + clutter_content_invalidate (CLUTTER_CONTENT (self)); +- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BACKGROUND]); + } + + void +@@ -1233,9 +1229,3 @@ meta_background_content_cull_redraw_clip (MetaBackgroundContent *self, + { + set_clip_region (self, clip_region); + } +- +-MetaBackground * +-meta_background_content_get_background (MetaBackgroundContent *self) +-{ +- return self->background; +-} +diff --git a/src/compositor/meta-background-image-private.h b/src/compositor/meta-background-image-private.h +deleted file mode 100644 +index d29260d..0000000 +--- a/src/compositor/meta-background-image-private.h ++++ /dev/null +@@ -1,26 +0,0 @@ +-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +-/* +- * Copyright 2025 Red Hat, Inc. +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2 of the +- * License, or (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, but +- * WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . +- * +- * Author: Matthias Clasen +- */ +- +-#pragma once +- +-#include "clutter/clutter.h" +-#include "meta/meta-background-image.h" +- +-ClutterColorState * meta_background_image_get_color_state (MetaBackgroundImage *self); +diff --git a/src/compositor/meta-background-image.c b/src/compositor/meta-background-image.c +index 6cf9187..59e43bd 100644 +--- a/src/compositor/meta-background-image.c ++++ b/src/compositor/meta-background-image.c +@@ -18,13 +18,16 @@ + + #include "config.h" + +-#include "compositor/meta-background-image-private.h" ++#include "meta/meta-background-image.h" + +-#include ++#include + #include + ++#ifdef HAVE_MALLOC_TRIM ++#include ++#endif ++ + #include "clutter/clutter.h" +-#include "clutter/clutter-backend-private.h" + #include "compositor/cogl-utils.h" + + enum +@@ -63,7 +66,6 @@ struct _MetaBackgroundImage + gboolean in_cache; + gboolean loaded; + CoglTexture *texture; +- ClutterColorState *color_state; + }; + + G_DEFINE_TYPE (MetaBackgroundImageCache, meta_background_image_cache, G_TYPE_OBJECT); +@@ -117,111 +119,37 @@ meta_background_image_cache_get_default (void) + return cache; + } + +-static CoglPixelFormat +-gly_memory_format_to_cogl (GlyMemoryFormat format) +-{ +- switch ((guint) format) +- { +- case GLY_MEMORY_B8G8R8A8_PREMULTIPLIED: +- return COGL_PIXEL_FORMAT_BGRA_8888_PRE; +- case GLY_MEMORY_A8R8G8B8_PREMULTIPLIED: +- return COGL_PIXEL_FORMAT_ARGB_8888_PRE; +- case GLY_MEMORY_R8G8B8A8_PREMULTIPLIED: +- return COGL_PIXEL_FORMAT_RGBA_8888_PRE; +- case GLY_MEMORY_B8G8R8A8: +- return COGL_PIXEL_FORMAT_BGRA_8888; +- case GLY_MEMORY_A8R8G8B8: +- return COGL_PIXEL_FORMAT_ARGB_8888; +- case GLY_MEMORY_R8G8B8A8: +- return COGL_PIXEL_FORMAT_RGBA_8888; +- case GLY_MEMORY_A8B8G8R8: +- return COGL_PIXEL_FORMAT_ABGR_8888; +- case GLY_MEMORY_R8G8B8: +- return COGL_PIXEL_FORMAT_RGB_888; +- case GLY_MEMORY_B8G8R8: +- return COGL_PIXEL_FORMAT_BGR_888; +- case GLY_MEMORY_R16G16B16A16_PREMULTIPLIED: +- return COGL_PIXEL_FORMAT_RGBA_16161616_PRE; +- case GLY_MEMORY_R16G16B16A16: +- return COGL_PIXEL_FORMAT_RGBA_16161616; +- case GLY_MEMORY_R16G16B16A16_FLOAT: +- return COGL_PIXEL_FORMAT_RGBA_FP_16161616; +- case GLY_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED: +- return COGL_PIXEL_FORMAT_RGBA_FP_32323232_PRE; +- case GLY_MEMORY_R32G32B32A32_FLOAT: +- return COGL_PIXEL_FORMAT_RGBA_FP_32323232; +- default: +- g_assert_not_reached (); +- } +-} +- +-static GlyMemoryFormatSelection +-glycin_supported_memory_formats (void) +-{ +- return GLY_MEMORY_SELECTION_B8G8R8A8_PREMULTIPLIED | +- GLY_MEMORY_SELECTION_A8R8G8B8_PREMULTIPLIED | +- GLY_MEMORY_SELECTION_R8G8B8A8_PREMULTIPLIED | +- GLY_MEMORY_SELECTION_B8G8R8A8 | +- GLY_MEMORY_SELECTION_A8R8G8B8 | +- GLY_MEMORY_SELECTION_R8G8B8A8 | +- GLY_MEMORY_SELECTION_A8B8G8R8 | +- GLY_MEMORY_SELECTION_R8G8B8 | +- GLY_MEMORY_SELECTION_B8G8R8 | +- GLY_MEMORY_SELECTION_R16G16B16A16_PREMULTIPLIED | +- GLY_MEMORY_SELECTION_R16G16B16A16 | +- GLY_MEMORY_SELECTION_R16G16B16A16_FLOAT | +- GLY_MEMORY_SELECTION_R32G32B32A32_FLOAT_PREMULTIPLIED | +- GLY_MEMORY_SELECTION_R32G32B32A32_FLOAT; +-} +- +-static void +-gly_cicp_to_clutter (const GlyCicp *gly_cicp, +- ClutterCicp *clutter_cicp) +-{ +- clutter_cicp->primaries = (ClutterCicpPrimaries) gly_cicp->color_primaries; +- clutter_cicp->transfer = (ClutterCicpTransfer) gly_cicp->transfer_characteristics; +- clutter_cicp->matrix_coefficients = gly_cicp->matrix_coefficients; +- clutter_cicp->video_full_range_flag = gly_cicp->video_full_range_flag; +-} +- + static void + load_file (GTask *task, +- MetaBackgroundImage *source, ++ MetaBackgroundImage *image, + gpointer task_data, + GCancellable *cancellable) + { +- g_autoptr (GFileInputStream) stream = NULL; +- g_autoptr (GlyLoader) loader = NULL; +- g_autoptr (GlyImage) image = NULL; +- GlyFrame *frame; + GError *error = NULL; ++ GdkPixbuf *pixbuf; ++ GFileInputStream *stream; + +- stream = g_file_read (source->file, NULL, &error); ++ stream = g_file_read (image->file, NULL, &error); + if (stream == NULL) + { + g_task_return_error (task, error); + return; + } + +- loader = gly_loader_new_for_stream (G_INPUT_STREAM (stream)); ++ pixbuf = gdk_pixbuf_new_from_stream (G_INPUT_STREAM (stream), NULL, &error); ++ g_object_unref (stream); + +- gly_loader_set_accepted_memory_formats (loader, glycin_supported_memory_formats ()); ++#ifdef HAVE_MALLOC_TRIM ++ malloc_trim (0); ++#endif + +- image = gly_loader_load (loader, &error); +- if (!image) ++ if (pixbuf == NULL) + { + g_task_return_error (task, error); + return; + } + +- frame = gly_image_next_frame (image, &error); +- if (!frame) +- { +- g_task_return_error (task, error); +- return; +- } +- +- g_task_return_pointer (task, frame, (GDestroyNotify) g_object_unref); ++ g_task_return_pointer (task, pixbuf, (GDestroyNotify) g_object_unref); + } + + static void +@@ -236,16 +164,15 @@ file_loaded (GObject *source_object, + g_autoptr (GError) local_error = NULL; + GTask *task; + CoglTexture *texture; +- g_autoptr (GlyFrame) frame = NULL; ++ GdkPixbuf *pixbuf, *rotated; + int width, height, row_stride; +- GlyMemoryFormat format; +- g_autoptr (GlyCicp) cicp = NULL; +- GBytes *bytes; ++ guchar *pixels; ++ gboolean has_alpha; + + task = G_TASK (result); +- frame = g_task_propagate_pointer (task, &error); ++ pixbuf = g_task_propagate_pointer (task, &error); + +- if (frame == NULL) ++ if (pixbuf == NULL) + { + char *uri = g_file_get_uri (image->file); + g_warning ("Failed to load background '%s': %s", +@@ -254,23 +181,27 @@ file_loaded (GObject *source_object, + goto out; + } + +- width = gly_frame_get_width (frame); +- height = gly_frame_get_height (frame); +- row_stride = gly_frame_get_stride (frame); +- bytes = gly_frame_get_buf_bytes (frame); +- format = gly_frame_get_memory_format (frame); +- cicp = gly_frame_get_color_cicp (frame); ++ rotated = gdk_pixbuf_apply_embedded_orientation (pixbuf); ++ if (rotated != NULL) ++ { ++ g_object_unref (pixbuf); ++ pixbuf = rotated; ++ } ++ ++ width = gdk_pixbuf_get_width (pixbuf); ++ height = gdk_pixbuf_get_height (pixbuf); ++ row_stride = gdk_pixbuf_get_rowstride (pixbuf); ++ pixels = gdk_pixbuf_get_pixels (pixbuf); ++ has_alpha = gdk_pixbuf_get_has_alpha (pixbuf); + + texture = meta_create_texture (width, height, ctx, +- gly_memory_format_has_alpha (format) +- ? COGL_TEXTURE_COMPONENTS_RGBA +- : COGL_TEXTURE_COMPONENTS_RGB, ++ has_alpha ? COGL_TEXTURE_COMPONENTS_RGBA : COGL_TEXTURE_COMPONENTS_RGB, + META_TEXTURE_ALLOW_SLICING); + + if (!cogl_texture_set_data (texture, +- gly_memory_format_to_cogl (format), ++ has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888, + row_stride, +- g_bytes_get_data (bytes, NULL), 0, ++ pixels, 0, + &local_error)) + { + g_warning ("Failed to create texture for background: %s", +@@ -280,28 +211,10 @@ file_loaded (GObject *source_object, + + image->texture = texture; + +- if (cicp) +- { +- ClutterCicp clutter_cicp; +- ClutterBackend *clutter_backend = clutter_get_default_backend (); +- ClutterContext *clutter_context = clutter_backend->context; +- g_autoptr (GError) local_error2 = NULL; +- +- gly_cicp_to_clutter (cicp, &clutter_cicp); +- +- image->color_state = +- clutter_color_state_params_new_from_cicp (clutter_context, +- &clutter_cicp, +- &local_error2); +- if (local_error2) +- g_warning ("%s", local_error2->message); +- } +- else +- { +- image->color_state = NULL; +- } +- + out: ++ if (pixbuf != NULL) ++ g_object_unref (pixbuf); ++ + image->loaded = TRUE; + g_signal_emit (image, signals[LOADED], 0); + } +@@ -395,8 +308,6 @@ meta_background_image_finalize (GObject *object) + if (image->file) + g_object_unref (image->file); + +- g_clear_object (&image->color_state); +- + G_OBJECT_CLASS (meta_background_image_parent_class)->finalize (object); + } + +@@ -462,11 +373,3 @@ meta_background_image_get_texture (MetaBackgroundImage *image) + + return image->texture; + } +- +-ClutterColorState * +-meta_background_image_get_color_state (MetaBackgroundImage *image) +-{ +- g_return_val_if_fail (META_IS_BACKGROUND_IMAGE (image), NULL); +- +- return image->color_state; +-} +diff --git a/src/compositor/meta-background-private.h b/src/compositor/meta-background-private.h +index 056e274..dca3a5d 100644 +--- a/src/compositor/meta-background-private.h ++++ b/src/compositor/meta-background-private.h +@@ -9,5 +9,3 @@ CoglTexture * meta_background_get_texture (MetaBackground *self, + int monitor_index, + MtkRectangle *texture_area, + CoglPipelineWrapMode *wrap_mode); +- +-ClutterColorState * meta_background_get_color_state (MetaBackground *self); +diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c +index 18833ff..7e33bc1 100644 +--- a/src/compositor/meta-background.c ++++ b/src/compositor/meta-background.c +@@ -24,11 +24,9 @@ + #include + + #include "backends/meta-backend-private.h" +-#include "clutter/clutter-color-state.h" + #include "compositor/cogl-utils.h" +-#include "compositor/meta-background-image-private.h" +-#include "meta/compositor.h" + #include "meta/display.h" ++#include "meta/meta-background-image.h" + #include "meta/meta-background.h" + #include "meta/meta-monitor-manager.h" + #include "meta/util.h" +@@ -1034,16 +1032,3 @@ meta_background_refresh_all (void) + for (l = all_backgrounds; l; l = l->next) + mark_changed (l->data); + } +- +-ClutterColorState * +-meta_background_get_color_state (MetaBackground *self) +-{ +- g_return_val_if_fail (META_IS_BACKGROUND (self), NULL); +- +- if (self->background_image1) +- return meta_background_image_get_color_state (self->background_image1); +- else if (self->background_image2) +- return meta_background_image_get_color_state (self->background_image2); +- else +- return NULL; +-} +diff --git a/src/meson.build b/src/meson.build +index 508c341..c36efc3 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -25,7 +25,7 @@ mutter_pkg_private_deps = [ + gmodule_no_export_dep, + gnome_settings_daemon_dep, + xkbcommon_dep, +- glycin_dep, ++ gdk_pixbuf_dep, + libeis_dep, + libdisplay_info_dep, + ] diff --git a/x11-packages/mutter/0008-fix-build-cross-g-ir-scanner-1.80.patch b/x11-packages/mutter/0008-fix-build-cross-g-ir-scanner-1.80.patch new file mode 100644 index 00000000000..c10d99b0677 --- /dev/null +++ b/x11-packages/mutter/0008-fix-build-cross-g-ir-scanner-1.80.patch @@ -0,0 +1,11 @@ +--- a/meson.build ++++ b/meson.build +@@ -367,7 +367,7 @@ if have_introspection + '-U_GNU_SOURCE', + ] + +- if gobject_introspection_dep.version().version_compare('>=1.83.2') ++ if false + introspection_args += [ + '--doc-format=gi-docgen', + ] diff --git a/x11-packages/mutter/build.sh b/x11-packages/mutter/build.sh index 2c5c05ec144..dcf12050b90 100644 --- a/x11-packages/mutter/build.sh +++ b/x11-packages/mutter/build.sh @@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://mutter.gnome.org/ TERMUX_PKG_DESCRIPTION="A Wayland display server and X11 window manager and compositor library" TERMUX_PKG_LICENSE="GPL-2.0-or-later" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION="48.1" -TERMUX_PKG_REVISION=1 +TERMUX_PKG_VERSION="49.3" TERMUX_PKG_SRCURL="https://download.gnome.org/sources/mutter/${TERMUX_PKG_VERSION%%.*}/mutter-$TERMUX_PKG_VERSION.tar.xz" -TERMUX_PKG_SHA256=e9970b3d81c76aed1e91f3436a82e7b14c5e32cf55949b1c9a18d0f157bacafc +TERMUX_PKG_SHA256=9ef1f61d6fe401cca3fcbe6d9a3b2a4f9b42638cbf8443735666a61964a8f0c3 TERMUX_PKG_DEPENDS="atk, fribidi, gdk-pixbuf, glib, gnome-desktop4, gobject-introspection, graphene, gsettings-desktop-schemas, gtk4, harfbuzz, libandroid-shmem, libcairo, libcanberra, libcolord, libdisplay-info, libdrm, libei, libice, libpixman, libsm, libwayland, libx11, libxau, libxcb, libxcomposite, libxcursor, libxdamage, libxext, libxfixes, libxi, libxinerama, libxkbcommon, libxkbfile, libxrandr, libxtst, littlecms, opengl, pango, pipewire, startup-notification, xkeyboard-config, xwayland" TERMUX_PKG_BUILD_DEPENDS="glib-cross, libwayland-protocols" TERMUX_PKG_VERSIONED_GIR=false @@ -21,12 +20,14 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" -Dinstalled_tests=false -Dbash_completion=false -Dprofiler=false +-Dx11=true -Dxwayland_path=$TERMUX_PREFIX/bin/Xwayland " termux_step_pre_configure() { termux_setup_gir - termux_setup_glib_cross_pkg_config_wrapper + termux_setup_pkg_config_wrapper "${TERMUX_PREFIX}/opt/glib/cross/lib/x86_64-linux-gnu/pkgconfig:${TERMUX_PREFIX}/opt/libwayland/cross/lib/x86_64-linux-gnu/pkgconfig" + export TERMUX_MESON_ENABLE_SOVERSION=1 LDFLAGS+=" -landroid-shmem" diff --git a/x11-packages/mutter/gir/Clutter-17.xml b/x11-packages/mutter/gir/Clutter-17.xml new file mode 100644 index 00000000000..2f07a72ca88 --- /dev/null +++ b/x11-packages/mutter/gir/Clutter-17.xml @@ -0,0 +1,1142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/mutter/gir/Cogl-17.xml b/x11-packages/mutter/gir/Cogl-17.xml new file mode 100644 index 00000000000..d729c76328a --- /dev/null +++ b/x11-packages/mutter/gir/Cogl-17.xml @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/mutter/gir/Meta-17.xml b/x11-packages/mutter/gir/Meta-17.xml new file mode 100644 index 00000000000..2de3f929d1b --- /dev/null +++ b/x11-packages/mutter/gir/Meta-17.xml @@ -0,0 +1,975 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/mutter/gir/Mtk-17.xml b/x11-packages/mutter/gir/Mtk-17.xml new file mode 100644 index 00000000000..bd62f252cb1 --- /dev/null +++ b/x11-packages/mutter/gir/Mtk-17.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/x11-packages/nautilus/0001-getpwent.patch b/x11-packages/nautilus/0001-getpwent.patch new file mode 100644 index 00000000000..e243aaba1ba --- /dev/null +++ b/x11-packages/nautilus/0001-getpwent.patch @@ -0,0 +1,35 @@ +From 4726c280cea4ef689119415aa96ccf98b9229aeb Mon Sep 17 00:00:00 2001 +From: Md Arif <111168803+sabamdarif@users.noreply.github.com> +Date: Fri, 11 Jul 2025 10:12:34 +0530 +Subject: [PATCH] getpwent + +--- + src/nautilus-file.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/nautilus-file.c b/src/nautilus-file.c +index 5a7629c..8270569 100644 +--- a/src/nautilus-file.c ++++ b/src/nautilus-file.c +@@ -5846,6 +5846,10 @@ nautilus_file_set_owner (NautilusFile *file, + GList * + nautilus_get_user_names (void) + { ++#ifdef __ANDROID__ ++ /* Not supported on Android. */ ++ return NULL; ++#else + GList *list; + char *real_name, *name; + struct passwd *user; +@@ -5872,6 +5876,7 @@ nautilus_get_user_names (void) + endpwent (); + + return g_list_sort (list, (GCompareFunc) g_utf8_collate); ++#endif + } + + /** +-- +2.48.1 + diff --git a/x11-packages/nautilus/0002-fix-paths.patch b/x11-packages/nautilus/0002-fix-paths.patch new file mode 100644 index 00000000000..5478ca13be9 --- /dev/null +++ b/x11-packages/nautilus/0002-fix-paths.patch @@ -0,0 +1,186 @@ +From 27516506261ce834974e6efa54fcfa5b42685a0b Mon Sep 17 00:00:00 2001 +From: Md Arif <111168803+sabamdarif@users.noreply.github.com> +Date: Thu, 10 Jul 2025 12:42:34 +0530 +Subject: [PATCH] fix paths + +--- + data/check-potfiles.sh | 2 +- + data/lineup-parameters | 2 +- + .../display/test-nautilus-directory-async.c | 2 +- + test/automated/displayless/test-directory.c | 14 +++++++------- + .../automated/displayless/test-file-metadata.c | 2 +- + ...file-utilities-get-common-filename-prefix.c | 2 +- + test/automated/displayless/test-file.c | 18 +++++++++--------- + 7 files changed, 21 insertions(+), 21 deletions(-) + +--- a/build-aux/check-potfiles.sh ++++ b/build-aux/check-potfiles.sh +@@ -1,4 +1,4 @@ +-#!/usr/bin/env bash ++#!@TERMUX_PREFIX@/bin/bash + + srcdirs="eel extensions src libnautilus-extension" + uidirs="src/resources/ui src/gtk" +--- a/build-aux/lineup-parameters ++++ b/build-aux/lineup-parameters +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!@TERMUX_PREFIX@/bin/python3 + # + # Copyright © 2019 Michael Catanzaro + # +diff --git a/test/automated/display/test-nautilus-directory-async.c b/test/automated/display/test-nautilus-directory-async.c +index a4dc24e..4f27c78 100644 +--- a/test/automated/display/test-nautilus-directory-async.c ++++ b/test/automated/display/test-nautilus-directory-async.c +@@ -68,7 +68,7 @@ main (int argc, + + if (argv[1] == NULL) + { +- uri = "file:///tmp"; ++ uri = "file://@TERMUX_PREFIX@/tmp"; + } + else + { +diff --git a/test/automated/displayless/test-directory.c b/test/automated/displayless/test-directory.c +index 886bad7..ef3b22d 100644 +--- a/test/automated/displayless/test-directory.c ++++ b/test/automated/displayless/test-directory.c +@@ -12,19 +12,19 @@ static int data_dummy; + static void + test_directory_duplicate_pointers (void) + { +- g_autoptr (NautilusDirectory) directory = nautilus_directory_get_by_uri ("file:///etc"); +- g_autoptr (NautilusFile) file = nautilus_file_get_by_uri ("file:///etc/passwd"); ++ g_autoptr (NautilusDirectory) directory = nautilus_directory_get_by_uri ("file://@TERMUX_PREFIX@/etc"); ++ g_autoptr (NautilusFile) file = nautilus_file_get_by_uri ("file://@TERMUX_PREFIX@/etc/passwd"); + + /* Assert that the NautilusFile reuses the existing NautilusDirectory instance.. */ + g_assert_cmpuint (nautilus_directory_number_outstanding (), ==, 1); + +- g_assert_true (nautilus_directory_get_by_uri ("file:///etc") == directory); ++ g_assert_true (nautilus_directory_get_by_uri ("file://@TERMUX_PREFIX@/etc") == directory); + nautilus_directory_unref (directory); + +- g_assert_true (nautilus_directory_get_by_uri ("file:///etc/") == directory); ++ g_assert_true (nautilus_directory_get_by_uri ("file://@TERMUX_PREFIX@/etc/") == directory); + nautilus_directory_unref (directory); + +- g_assert_true (nautilus_directory_get_by_uri ("file:///etc////") == directory); ++ g_assert_true (nautilus_directory_get_by_uri ("file://@TERMUX_PREFIX@/etc////") == directory); + nautilus_directory_unref (directory); + } + +@@ -32,7 +32,7 @@ test_directory_duplicate_pointers (void) + static void + test_directory_hash_table_cleanup (void) + { +- NautilusDirectory *directory = nautilus_directory_get_by_uri ("file:///etc"); ++ NautilusDirectory *directory = nautilus_directory_get_by_uri ("file://@TERMUX_PREFIX@/etc"); + + g_assert_cmpuint (nautilus_directory_number_outstanding (), ==, 1); + +@@ -68,7 +68,7 @@ got_files_callback (NautilusDirectory *directory, + static void + test_directory_call_when_ready (void) + { +- g_autoptr (NautilusDirectory) directory = nautilus_directory_get_by_uri ("file:///etc"); ++ g_autoptr (NautilusDirectory) directory = nautilus_directory_get_by_uri ("file://@TERMUX_PREFIX@/etc"); + g_assert_cmpuint (nautilus_directory_number_outstanding (), ==, 1); + + got_files_flag = FALSE; +diff --git a/test/automated/displayless/test-file-metadata.c b/test/automated/displayless/test-file-metadata.c +index 86aadc8..342cbe1 100644 +--- a/test/automated/displayless/test-file-metadata.c ++++ b/test/automated/displayless/test-file-metadata.c +@@ -4,7 +4,7 @@ + #include + #include + +-static const char *TEST_FILE = "file:///etc/passwd"; ++static const char *TEST_FILE = "file://@TERMUX_PREFIX@/etc/passwd"; + static const char *KEY_BOOL = NAUTILUS_METADATA_KEY_ICON_VIEW_SORT_REVERSED; + static const char *KEY_STR = NAUTILUS_METADATA_KEY_ICON_VIEW_SORT_BY; + +diff --git a/test/automated/displayless/test-file-utilities-get-common-filename-prefix.c b/test/automated/displayless/test-file-utilities-get-common-filename-prefix.c +index 186ec91..4c15efa 100644 +--- a/test/automated/displayless/test-file-utilities-get-common-filename-prefix.c ++++ b/test/automated/displayless/test-file-utilities-get-common-filename-prefix.c +@@ -363,7 +363,7 @@ get_files_for_names (const GStrv files_names) + for (gsize i = 0; i < len; i++) + { + gchar *name = files_names[i]; +- g_autofree gchar *uri = g_strconcat ("file:///", name, NULL); ++ g_autofree gchar *uri = g_strconcat ("file://@TERMUX_PREFIX@/", name, NULL); + NautilusFile *file = nautilus_file_get_by_uri (uri); + + if (name[strlen (name) - 1] == G_DIR_SEPARATOR) +diff --git a/test/automated/displayless/test-file.c b/test/automated/displayless/test-file.c +index 1dfba7f..01c2516 100644 +--- a/test/automated/displayless/test-file.c ++++ b/test/automated/displayless/test-file.c +@@ -11,7 +11,7 @@ test_file_refcount_single_file (void) + { + g_assert_cmpint (nautilus_directory_number_outstanding (), ==, 0); + +- NautilusFile *file = nautilus_file_get_by_uri ("file:///home/"); ++ NautilusFile *file = nautilus_file_get_by_uri ("file://@TERMUX_HOME@/"); + + g_assert_cmpint (G_OBJECT (file)->ref_count, ==, 1); + g_assert_cmpint (G_OBJECT (file->details->directory)->ref_count, ==, 1); +@@ -25,7 +25,7 @@ test_file_refcount_single_file (void) + static void + test_file_check_name_bland (void) + { +- g_autoptr (NautilusFile) file = nautilus_file_get_by_uri ("file:///home"); ++ g_autoptr (NautilusFile) file = nautilus_file_get_by_uri ("file://@TERMUX_HOME@/"); + const char *name = nautilus_file_get_name (file); + g_assert_cmpstr (name, ==, "home"); + } +@@ -33,7 +33,7 @@ test_file_check_name_bland (void) + static void + test_file_check_name_trailing_slash (void) + { +- g_autoptr (NautilusFile) file = nautilus_file_get_by_uri ("file:///home/"); ++ g_autoptr (NautilusFile) file = nautilus_file_get_by_uri ("file://@TERMUX_HOME@/"); + const char *name = nautilus_file_get_name (file); + g_assert_cmpstr (name, ==, "home"); + } +@@ -41,20 +41,20 @@ test_file_check_name_trailing_slash (void) + static void + test_file_duplicate_pointers (void) + { +- g_autoptr (NautilusFile) file = nautilus_file_get_by_uri ("file:///home/"); ++ g_autoptr (NautilusFile) file = nautilus_file_get_by_uri ("file://@TERMUX_HOME@/"); + +- g_assert_true (nautilus_file_get_by_uri ("file:///home/") == file); ++ g_assert_true (nautilus_file_get_by_uri ("file://@TERMUX_HOME@/") == file); + nautilus_file_unref (file); + +- g_assert_true (nautilus_file_get_by_uri ("file:///home") == file); ++ g_assert_true (nautilus_file_get_by_uri ("file://@TERMUX_HOME@") == file); + nautilus_file_unref (file); + } + + static void + test_file_sort_order (void) + { +- g_autoptr (NautilusFile) file_1 = nautilus_file_get_by_uri ("file:///etc"); +- g_autoptr (NautilusFile) file_2 = nautilus_file_get_by_uri ("file:///usr"); ++ g_autoptr (NautilusFile) file_1 = nautilus_file_get_by_uri ("file://@TERMUX_PREFIX@/etc"); ++ g_autoptr (NautilusFile) file_2 = nautilus_file_get_by_uri ("file://@TERMUX_PREFIX@"); + NautilusFileSortType sort_type = NAUTILUS_FILE_SORT_BY_DISPLAY_NAME; + + g_assert_cmpint (G_OBJECT (file_1)->ref_count, ==, 1); +@@ -70,7 +70,7 @@ test_file_sort_order (void) + static void + test_file_sort_with_self (void) + { +- g_autoptr (NautilusFile) file_1 = nautilus_file_get_by_uri ("file:///etc"); ++ g_autoptr (NautilusFile) file_1 = nautilus_file_get_by_uri ("file://@TERMUX_PREFIX@/etc"); + NautilusFileSortType sort_type = NAUTILUS_FILE_SORT_BY_DISPLAY_NAME; + int order; + +-- +2.48.1 + diff --git a/x11-packages/nautilus/0003-Werror.patch b/x11-packages/nautilus/0003-Werror.patch new file mode 100644 index 00000000000..f91172f87f6 --- /dev/null +++ b/x11-packages/nautilus/0003-Werror.patch @@ -0,0 +1,25 @@ +From 69074d38c40bff266e32671affcc6030b9705908 Mon Sep 17 00:00:00 2001 +From: Md Arif <111168803+sabamdarif@users.noreply.github.com> +Date: Thu, 10 Jul 2025 19:34:45 +0530 +Subject: [PATCH] Werror + +--- + meson.build | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/meson.build b/meson.build +index d12a545..0ebfdff 100644 +--- a/meson.build ++++ b/meson.build +@@ -70,6 +70,8 @@ add_project_arguments( + '-Wextra', + '-Wno-cast-function-type', + '-Wno-unused-parameter', ++ '-Wno-format-nonliteral', ++ '-Wno-format-security', + # Context: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/commit/ce54a2527555e51e4ebf4cce9cbb6259cafa89a4 + # -O2 and -fexceptions unmask some cases of -Wmaybe-uninitialized, which + # become errors for some reason (I’m guessing because of the +-- +2.48.1 + diff --git a/x11-packages/nautilus/build.sh b/x11-packages/nautilus/build.sh new file mode 100644 index 00000000000..bf172ad6158 --- /dev/null +++ b/x11-packages/nautilus/build.sh @@ -0,0 +1,29 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/GNOME/nautilus +TERMUX_PKG_DESCRIPTION="File browser for GNOME" +TERMUX_PKG_LICENSE="GPL-3.0-or-later" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="49.3" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/nautilus/${TERMUX_PKG_VERSION%%.*}/nautilus-${TERMUX_PKG_VERSION}.tar.xz" +TERMUX_PKG_SHA256=aa6bf376f08992362805eae01890b1bf5ad148f356aa7ccfe1f664eda88d413e +TERMUX_PKG_DEPENDS="dbus, gexiv2, glib, gstreamer, tinysparql, totem-pl-parser, libportal, libportal-gtk4, localsearch, gdk-pixbuf, gnome-autoar, gnome-desktop4, libadwaita" +TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner, gst-plugins-base, glib-cross" +TERMUX_PKG_PYTHON_COMMON_DEPS="setuptools, docutils" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Ddocs=false +-Dcloudproviders=false +-Dpackagekit=false +-Dselinux=false +-Dtests=none +" + +termux_step_pre_configure() { + termux_setup_cmake + termux_setup_meson + termux_setup_gir + termux_setup_glib_cross_pkg_config_wrapper + export TERMUX_MESON_ENABLE_SOVERSION=1 + + # ERROR: Destination '/data/data/com.termux/files/usr/lib/libnautilus-extension.so.4' + # already exists and is not a symlink + rm -rf "$TERMUX__PREFIX__LIB_DIR"/libnautilus* +} diff --git a/x11-packages/nautilus/gir/48.5/Nautilus-4.0.xml b/x11-packages/nautilus/gir/48.5/Nautilus-4.0.xml new file mode 100644 index 00000000000..da909fd86ce --- /dev/null +++ b/x11-packages/nautilus/gir/48.5/Nautilus-4.0.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/nautilus/gir/49.3/Nautilus-4.1.xml b/x11-packages/nautilus/gir/49.3/Nautilus-4.1.xml new file mode 100644 index 00000000000..da909fd86ce --- /dev/null +++ b/x11-packages/nautilus/gir/49.3/Nautilus-4.1.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x11-packages/ptyxis/build.sh b/x11-packages/ptyxis/build.sh new file mode 100644 index 00000000000..17b49ba746f --- /dev/null +++ b/x11-packages/ptyxis/build.sh @@ -0,0 +1,17 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.gnome.org/chergert/ptyxis +TERMUX_PKG_DESCRIPTION="Advanced terminal for GNOME" +TERMUX_PKG_LICENSE="GPL-3.0-only" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="49.3" +TERMUX_PKG_SRCURL="https://download.gnome.org/sources/ptyxis/${TERMUX_PKG_VERSION%%.*}/ptyxis-$TERMUX_PKG_VERSION.tar.xz" +TERMUX_PKG_SHA256=d15b6ed8ebd19dfbe46be48ea4ab3ba4dc5048e277c9733a62ea19111f0bfc5b +TERMUX_PKG_DEPENDS="dconf, glib, gtk4, hicolor-icon-theme, json-glib, libadwaita, libandroid-wordexp, libc++, libcairo, libvte, pango" +TERMUX_PKG_BUILD_DEPENDS="glib-cross" +TERMUX_PKG_AUTO_UPDATE=true + +termux_step_pre_configure() { + termux_setup_gir + termux_setup_glib_cross_pkg_config_wrapper + CFLAGS+=" -Wno-format-nonliteral" + LDFLAGS+=" -landroid-wordexp" +} diff --git a/x11-packages/ptyxis/default-shell.patch b/x11-packages/ptyxis/default-shell.patch new file mode 100644 index 00000000000..e42b0abd261 --- /dev/null +++ b/x11-packages/ptyxis/default-shell.patch @@ -0,0 +1,40 @@ +--- a/agent/ptyxis-agent-impl.c ++++ b/agent/ptyxis-agent-impl.c +@@ -349,7 +349,7 @@ ptyxis_agent_impl_get_preferred_shell_cb (GObject *object, + g_autoptr(GError) error = NULL; + g_autofree char *stdout_buf = NULL; + PtyxisIpcAgent *agent; +- const char *default_shell = "/bin/sh"; ++ const char *default_shell = "@TERMUX_PREFIX@/bin/bash"; + + g_assert (G_IS_SUBPROCESS (subprocess)); + g_assert (G_IS_ASYNC_RESULT (result)); +@@ -381,7 +381,7 @@ static gboolean + ptyxis_agent_impl_handle_get_preferred_shell (PtyxisIpcAgent *agent, + GDBusMethodInvocation *invocation) + { +- const char *default_shell = "/bin/sh"; ++ const char *default_shell = "@TERMUX_PREFIX@/bin/bash"; + struct passwd *pw; + + g_assert (PTYXIS_IS_AGENT_IMPL (agent)); +--- a/src/org.gnome.Ptyxis.gschema.xml.in ++++ b/src/org.gnome.Ptyxis.gschema.xml.in +@@ -287,7 +287,7 @@ + + + +- false ++ true + Use Custom Command + If a custom command should be used + +@@ -299,7 +299,7 @@ + + + +- '' ++ '@TERMUX_PREFIX@/bin/bash' + Custom Command + A custom command for the shell + diff --git a/x11-packages/ptyxis/no-conflict-environ.patch b/x11-packages/ptyxis/no-conflict-environ.patch new file mode 100644 index 00000000000..0488a6c00f5 --- /dev/null +++ b/x11-packages/ptyxis/no-conflict-environ.patch @@ -0,0 +1,86 @@ +Prevents: +../src/agent/ptyxis-run-context.c:67:48: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] + 67 | const char * const *environ, + +--- a/agent/ptyxis-run-context.c ++++ b/agent/ptyxis-run-context.c +@@ -64,13 +64,13 @@ ptyxis_run_context_new (void) + + static void + copy_envvar_with_fallback (PtyxisRunContext *run_context, +- const char * const *environ, ++ const char * const *ptyxis_environ, + const char *key, + const char *fallback) + { + const char *val; + +- if ((val = g_environ_getenv ((char **)environ, key))) ++ if ((val = g_environ_getenv ((char **)ptyxis_environ, key))) + ptyxis_run_context_setenv (run_context, key, val); + else if (fallback != NULL) + ptyxis_run_context_setenv (run_context, key, fallback); +@@ -215,7 +215,7 @@ ptyxis_run_context_class_init (PtyxisRunContextClass *klass) + static void + ptyxis_run_context_init (PtyxisRunContext *self) + { +- g_auto(GStrv) environ = g_get_environ (); ++ g_auto(GStrv) ptyxis_environ = g_get_environ (); + + self->setup_tty = TRUE; + +@@ -226,7 +226,7 @@ ptyxis_run_context_init (PtyxisRunContext *self) + /* Always start with full environment at the base layer, but allow + * removal by _set_environ(NULL) to clear it. + */ +- ptyxis_run_context_set_environ (self, (const char * const *)environ); ++ ptyxis_run_context_set_environ (self, (const char * const *)ptyxis_environ); + } + + void +@@ -461,7 +461,7 @@ ptyxis_run_context_get_environ (PtyxisRunContext *self) + + void + ptyxis_run_context_set_environ (PtyxisRunContext *self, +- const char * const *environ) ++ const char * const *ptyxis_environ) + { + PtyxisRunContextLayer *layer; + +@@ -471,9 +471,9 @@ ptyxis_run_context_set_environ (PtyxisRunContext *self, + + g_array_set_size (layer->env, 0); + +- if (environ != NULL && environ[0] != NULL) ++ if (ptyxis_environ != NULL && ptyxis_environ[0] != NULL) + { +- char **copy = g_strdupv ((char **)environ); ++ char **copy = g_strdupv ((char **)ptyxis_environ); + g_array_append_vals (layer->env, copy, g_strv_length (copy)); + g_free (copy); + } +@@ -481,20 +481,20 @@ ptyxis_run_context_set_environ (PtyxisRunContext *self, + + void + ptyxis_run_context_add_environ (PtyxisRunContext *self, +- const char * const *environ) ++ const char * const *ptyxis_environ) + { + PtyxisRunContextLayer *layer; + + g_return_if_fail (PTYXIS_IS_RUN_CONTEXT (self)); + +- if (environ == NULL || environ[0] == NULL) ++ if (ptyxis_environ == NULL || ptyxis_environ[0] == NULL) + return; + + layer = ptyxis_run_context_current_layer (self); + +- for (guint i = 0; environ[i]; i++) ++ for (guint i = 0; ptyxis_environ[i]; i++) + { +- const char *pair = environ[i]; ++ const char *pair = ptyxis_environ[i]; + const char *eq = strchr (pair, '='); + char **dest = NULL; + gsize keylen; diff --git a/x11-packages/ptyxis/no-xdg-portal.patch b/x11-packages/ptyxis/no-xdg-portal.patch new file mode 100644 index 00000000000..6374ebd905e --- /dev/null +++ b/x11-packages/ptyxis/no-xdg-portal.patch @@ -0,0 +1,40 @@ +--- a/src/ptyxis-tab.c ++++ b/src/ptyxis-tab.c +@@ -25,7 +25,7 @@ + + #include + +-#ifdef __linux__ ++#if defined(__linux__) && !defined(__ANDROID__) + # include + # include + #endif +@@ -115,7 +115,7 @@ static void ptyxis_tab_respawn (PtyxisTab *self); + + G_DEFINE_FINAL_TYPE (PtyxisTab, ptyxis_tab, GTK_TYPE_WIDGET) + +-#ifdef __linux__ ++#if defined(__linux__) && !defined(__ANDROID__) + static XdpPortal *portal; + #endif + +@@ -2005,7 +2005,7 @@ ptyxis_tab_get_command_line (PtyxisTab *self) + return self->command_line; + } + +-#ifdef __linux__ ++#if defined(__linux__) && !defined(__ANDROID__) + static void + ptyxis_tab_toast (PtyxisTab *self, + int timeout, +--- a/agent/meson.build ++++ b/agent/meson.build +@@ -43,7 +43,7 @@ ptyxis_agent_c_args = [ + ] + + libc_compat = true +-if target_machine.cpu_family() == 'x86_64' ++if false + ptyxis_agent_c_args += ['-include', 'x86_64/force_link_glibc_2.17.h'] + else + libc_compat = false