diff options
author | Matthew S. Turnbull <sparky@bluefang-logic.com> | 2024-06-24 02:09:54 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@gentoo.org> | 2024-08-04 23:35:48 -0400 |
commit | ea8b759bbfa31dbe09da71b565fa5bf0d91eb4bb (patch) | |
tree | fcceb736fefe88d83d4f06a8a512e5faac6723a9 /gnome-extra | |
parent | gnome-extra/cinnamon-control-center: drop 5.8.2, 6.0.0 (diff) | |
download | gentoo-ea8b759bbfa31dbe09da71b565fa5bf0d91eb4bb.tar.gz gentoo-ea8b759bbfa31dbe09da71b565fa5bf0d91eb4bb.tar.bz2 gentoo-ea8b759bbfa31dbe09da71b565fa5bf0d91eb4bb.zip |
gnome-extra/cinnamon: add 6.2.7
Remove the GOA dependency as it's no longer suported, and the
alternate is not currently packaged.
Make xdg-desktop-portal-xapp unconditional, as dark mode
breaks without it.
Closes: https://bugs.gentoo.org/934783
Signed-off-by: Matthew S. Turnbull <sparky@bluefang-logic.com>
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Diffstat (limited to 'gnome-extra')
6 files changed, 400 insertions, 0 deletions
diff --git a/gnome-extra/cinnamon/Manifest b/gnome-extra/cinnamon/Manifest index 7591256ae65b..b93a2052223f 100644 --- a/gnome-extra/cinnamon/Manifest +++ b/gnome-extra/cinnamon/Manifest @@ -1,2 +1,3 @@ DIST cinnamon-5.8.4.tar.gz 2517117 BLAKE2B 4c3f452480b9e3ce7713221f1b76c475204b8dc1bb34d42a8faf492b0ca86416bb2fbd3849a7f048fef672ecf4613f06c645ec548159b6c3662b7602142e75e6 SHA512 2eaa253cdd01f00cca05ed123db59fde27f84cc24d7b8a3ec751a5f8252642870cbece941d1101f31fe0db43c15d9779bbdcacbf7037757569a4d17205cb10ad DIST cinnamon-6.0.4.tar.gz 2538844 BLAKE2B de67c2e465d04dd4ed269172b4b58cfe0391446466e32e15410b5a847248566c075823d0a2fb87d7a693033b3e4e1fc21a18c7b9f45dca89ce8968a0be71eaba SHA512 357dd44f40b195a4a3ca3e88c5c9e55f1c06d36b4cec812a001c54ffb784b0d67bb9f41c1ae74fec590184b3480c9cd21ae54f7ee01e31f80eab0297b0d18a9c +DIST cinnamon-6.2.7.tar.gz 2547822 BLAKE2B 67f15fdd39c7168bcaa03f637fa6a4b9e9076657a92ba92472c69960c0c26fcad7aa0b4e1f6926e57d76364bf4a42f28381b67a03cba75de87a4fc31ef9e7377 SHA512 d8617cf73dd754b91915826527e674a8084ad141831112def661eac6b39b1c39e61e06fdf79bd7f0a7045b2abc29e223f8616796f5e51d1354486f0d0e4faf5a diff --git a/gnome-extra/cinnamon/cinnamon-6.2.7.ebuild b/gnome-extra/cinnamon/cinnamon-6.2.7.ebuild new file mode 100644 index 000000000000..faad5075ad15 --- /dev/null +++ b/gnome-extra/cinnamon/cinnamon-6.2.7.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_REQ_USE="xml(+)" + +inherit meson gnome2-utils pax-utils python-single-r1 xdg + +DESCRIPTION="A fork of GNOME Shell with layout similar to GNOME 2" +HOMEPAGE="https://projects.linuxmint.com/cinnamon/ https://github.com/linuxmint/cinnamon" +SRC_URI="https://github.com/linuxmint/cinnamon/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD GPL-2+ GPL-3+ GPL-3-with-openssl-exception LGPL-2+ LGPL-2.1 LGPL-2.1+ MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86" +IUSE="+eds +gstreamer gtk-doc internal-polkit +nls +networkmanager wayland" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND=" + ${PYTHON_DEPS} + >=app-accessibility/at-spi2-core-2.46.0:2 + >=dev-libs/glib-2.52.0:2[dbus] + >=dev-libs/gobject-introspection-1.29.15:= + dev-libs/libxml2:2 + >=gnome-extra/cinnamon-desktop-6.2:0= + >=gnome-extra/cinnamon-menus-6.2 + >=gnome-extra/cjs-6.2[cairo] + sys-apps/dbus + >=sys-auth/polkit-0.100[introspection] + virtual/opengl + x11-libs/cairo + x11-libs/gdk-pixbuf:2[introspection] + >=x11-libs/gtk+-3.12.0:3[introspection,wayland?] + >=x11-libs/libnotify-0.7.3:0=[introspection] + x11-libs/libX11 + >=x11-libs/libXfixes-5.0 + x11-libs/pango[introspection] + >=x11-libs/xapp-2.8.4[introspection] + >=x11-wm/muffin-6.2[introspection,wayland?] + + eds? ( + gnome-extra/evolution-data-server + ) + gstreamer? ( + media-libs/gst-plugins-base:1.0 + media-libs/gstreamer:1.0 + ) + networkmanager? ( + net-misc/networkmanager[introspection] + ) +" +# caribou used by onscreen keyboard +# libtimezonemap used by datetime settings +# iso-flag-png (unpackaged) used by keyboard layout settings +RDEPEND=" + ${DEPEND} + >=app-accessibility/caribou-0.3 + dev-libs/keybinder:3[introspection] + dev-libs/libtimezonemap + $(python_gen_cond_dep ' + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/distro[${PYTHON_USEDEP}] + dev-python/pexpect[${PYTHON_USEDEP}] + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/pycairo[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] + dev-python/pyinotify[${PYTHON_USEDEP}] + dev-python/python-pam[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/setproctitle[${PYTHON_USEDEP}] + dev-python/tinycss2[${PYTHON_USEDEP}] + >=dev-python/python3-xapp-2.4.2[${PYTHON_USEDEP}] + ') + >=gnome-base/dconf-0.4.1 + >=gnome-base/gsettings-desktop-schemas-2.91.91 + >=gnome-base/libgnomekbd-2.91.4 + >=gnome-extra/cinnamon-control-center-6.2[networkmanager=,wayland?] + >=gnome-extra/cinnamon-screensaver-6.2 + >=gnome-extra/cinnamon-session-6.2 + >=gnome-extra/cinnamon-settings-daemon-6.2[wayland?] + >=gnome-extra/nemo-6.2[wayland?] + media-libs/gsound + net-libs/libsoup:3.0[introspection] + net-misc/wget + sys-apps/accountsservice[introspection] + sys-apps/coreutils + sys-apps/pciutils + sys-apps/util-linux + sys-apps/xdg-desktop-portal-gtk + sys-apps/xdg-desktop-portal-xapp + sys-power/upower[introspection] + x11-misc/xdg-utils + x11-themes/adwaita-icon-theme + x11-themes/gnome-themes-standard + + !internal-polkit? ( + gnome-extra/polkit-gnome + ) + nls? ( + >=gnome-extra/cinnamon-translations-6.2 + ) +" +BDEPEND=" + >=dev-util/intltool-0.40 + >=sys-devel/gettext-0.17 + virtual/pkgconfig + + gtk-doc? ( dev-util/gtk-doc ) +" + +PATCHES=( + # Fix backgrounds path as cinnamon doesn't provide them + # https://github.com/linuxmint/Cinnamon/issues/3575 + "${FILESDIR}/${PN}-3.8.0-gnome-background-compatibility.patch" + + # Use wheel group instead of sudo (from Fedora/Arch) + # https://github.com/linuxmint/Cinnamon/issues/3576 + "${FILESDIR}/${PN}-3.6.6-wheel-sudo.patch" + + # Make wayland optional + # https://github.com/linuxmint/cinnamon/pull/12273 + "${FILESDIR}/${PN}-6.2.0-optional-wayland.patch" + + # Fix path for settings panels on arm64 + # https://github.com/linuxmint/cinnamon/pull/12278 + "${FILESDIR}/${PN}-6.2.0-fix-arm64-settings-panel-path.patch" +) + +src_prepare() { + if use internal-polkit; then + PATCHES+=( + # Use internal polkit agent on X11 + # https://github.com/linuxmint/cinnamon/pull/12272 + "${FILESDIR}/${PN}-6.2.0-polkit-agent-on-x11.patch" + ) + else + # Add polkit agent to required components + # https://github.com/linuxmint/Cinnamon/issues/3579 + sed -i "s/'REQUIRED', '/&polkit-cinnamon-authentication-agent-1;/" meson.build || die + fi + + default + + # shebang fixing craziness + local p + for p in $(grep -rl '#!.*python3' || die); do + python_fix_shebang "${p}" + done +} + +src_configure() { + local emesonargs=( + $(meson_use gstreamer build_recorder) + $(meson_use gtk-doc docs) + $(meson_use wayland) + -Ddisable_networkmanager=$(usex networkmanager false true) + -Dpy3modules_dir="$(python_get_sitedir)" + ) + meson_src_configure +} + +src_install() { + meson_src_install + + python_optimize "${D}$(python_get_sitedir)" + python_optimize "${ED}"/usr/share/cinnamon/ + + # Required for gnome-shell on hardened/PaX, bug #398941 + pax-mark mr "${ED}"/usr/bin/cinnamon + + # Doesn't exist by default + keepdir /etc/xdg/menus/applications-merged + + if ! use internal-polkit; then + # Ensure authentication-agent is started, bug #523958 + # https://github.com/linuxmint/Cinnamon/issues/3579 + insinto /etc/xdg/autostart/ + doins "${FILESDIR}"/polkit-cinnamon-authentication-agent-1.desktop + fi +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update + + if use gstreamer; then + if ! has_version 'media-libs/gst-plugins-good:1.0' || \ + ! has_version 'media-plugins/gst-plugins-vpx:1.0'; then + ewarn "To make use of Cinnamon's built-in screen recording utility," + ewarn "you need to either install media-libs/gst-plugins-good:1.0" + ewarn "and media-plugins/gst-plugins-vpx:1.0, or use dconf-editor to change" + ewarn "org.cinnamon.recorder/pipeline to what you want to use." + fi + else + ewarn "Cinnamon's built-in screen recording utility is not installed" + ewarn "because gstreamer support is disabled." + fi +} + +pkg_postrm() { + xdg_pkg_postinst + gnome2_schemas_update +} diff --git a/gnome-extra/cinnamon/files/cinnamon-6.2.0-fix-arm64-settings-panel-path.patch b/gnome-extra/cinnamon/files/cinnamon-6.2.0-fix-arm64-settings-panel-path.patch new file mode 100644 index 000000000000..c81de09a6c43 --- /dev/null +++ b/gnome-extra/cinnamon/files/cinnamon-6.2.0-fix-arm64-settings-panel-path.patch @@ -0,0 +1,38 @@ +From eadca68df52f0fd7db2035c7dad3bb87240ecf34 Mon Sep 17 00:00:00 2001 +From: Sparky Bluefang <sparky@bluefang-logic.com> +Date: Sat, 6 Jul 2024 04:43:53 -0400 +Subject: [PATCH] Simplify 64bit path handling. More than x86_64 uses + /usr/lib64 (i.e. arm64/aarch64). One additional path check is probably not + worth enumerating all of the applicable machine names. + +--- + files/usr/share/cinnamon/cinnamon-settings/bin/capi.py | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/files/usr/share/cinnamon/cinnamon-settings/bin/capi.py b/files/usr/share/cinnamon/cinnamon-settings/bin/capi.py +index 05d88dea20..77621a98a8 100644 +--- a/files/usr/share/cinnamon/cinnamon-settings/bin/capi.py ++++ b/files/usr/share/cinnamon/cinnamon-settings/bin/capi.py +@@ -27,20 +27,18 @@ def __init__(self): + self.extension_point = Gio.io_extension_point_register ("cinnamon-control-center-1") + self.modules = [] + +- architecture = platform.machine() + # get the arch-specific triplet, e.g. 'x86_64-linux-gnu' or 'arm-linux-gnueabihf' + # see also: https://wiki.debian.org/Python/MultiArch + triplet = sysconfig.get_config_var('MULTIARCH') +- paths = ["/usr/lib", f"/usr/lib/{triplet}"] ++ paths = ["/usr/lib", "/usr/lib64", f"/usr/lib/{triplet}"] + + # On x86 archs, iterate through multiple paths + # For instance, on a Mint i686 box, the path is actually /usr/lib/i386-linux-gnu ++ architecture = platform.machine() + x86archs = ["i386", "i486", "i586", "i686"] + if architecture in x86archs: + for arch in x86archs: + paths += ["/usr/lib/%s" % arch] +- elif architecture == "x86_64": +- paths += ["/usr/lib/x86_64", "/usr/lib64"] + else: + paths += ["/usr/lib/%s" % architecture] + diff --git a/gnome-extra/cinnamon/files/cinnamon-6.2.0-optional-wayland.patch b/gnome-extra/cinnamon/files/cinnamon-6.2.0-optional-wayland.patch new file mode 100644 index 000000000000..ca22e32f9fb7 --- /dev/null +++ b/gnome-extra/cinnamon/files/cinnamon-6.2.0-optional-wayland.patch @@ -0,0 +1,79 @@ +From 92bcc5aabd92001b4f05ce13875422066bf82732 Mon Sep 17 00:00:00 2001 +From: Sparky Bluefang <sparky@bluefang-logic.com> +Date: Wed, 3 Jul 2024 02:13:13 -0400 +Subject: [PATCH] Optionally install wayland session files + +--- + data/meson.build | 13 +++++++------ + meson.build | 11 ++++++++--- + meson_options.txt | 5 +++++ + 3 files changed, 20 insertions(+), 9 deletions(-) + +diff --git a/data/meson.build b/data/meson.build +index f46bf967fb..807ea218a8 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -16,11 +16,10 @@ desktop_conf.set('bindir', join_paths(prefix, bindir)) + desktop_conf.set('libexecdir', join_paths(prefix, libexecdir)) + desktop_conf.set('VERSION', meson.project_version()) + +-desktop_files = [ +- 'cinnamon.desktop', +- 'cinnamon-wayland.desktop', +- 'cinnamon2d.desktop', +-] ++desktop_files = ['cinnamon.desktop', 'cinnamon2d.desktop'] ++if get_option('wayland') ++ desktop_files += ['cinnamon-wayland.desktop'] ++endif + + foreach desktop_file : desktop_files + desktop = configure_file( +@@ -40,7 +39,9 @@ foreach desktop_file : desktop_files + endforeach + + subdir('xdg-portal') +-subdir('wayland_sessions') ++if get_option('wayland') ++ subdir('wayland_sessions') ++endif + subdir('xsessions') + subdir('services') + +diff --git a/meson.build b/meson.build +index d7705c0919..7b4c74c528 100644 +--- a/meson.build ++++ b/meson.build +@@ -165,10 +165,15 @@ else + session_conf.set('REQUIRED', '') + endif + +-foreach file : ['cinnamon.session', 'cinnamon2d.session', 'cinnamon-wayland.session'] ++session_files = ['cinnamon.session', 'cinnamon2d.session'] ++if get_option('wayland') ++ session_files += ['cinnamon-wayland.session'] ++endif ++ ++foreach session_file : session_files + configure_file( +- input: file + '.in', +- output: file, ++ input: session_file + '.in', ++ output: session_file, + configuration: session_conf, + install_dir: join_paths(prefix, datadir, 'cinnamon-session', 'sessions'), + ) +diff --git a/meson_options.txt b/meson_options.txt +index 82422246b0..321192d8c6 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -23,4 +23,9 @@ option('py3modules_dir', + value : '', + description: 'Where to install python3 modules' + ) ++option('wayland', ++ type : 'boolean', ++ value : true, ++ description: 'Enable wayland support' ++) + diff --git a/gnome-extra/cinnamon/files/cinnamon-6.2.0-polkit-agent-on-x11.patch b/gnome-extra/cinnamon/files/cinnamon-6.2.0-polkit-agent-on-x11.patch new file mode 100644 index 000000000000..7b8057fda647 --- /dev/null +++ b/gnome-extra/cinnamon/files/cinnamon-6.2.0-polkit-agent-on-x11.patch @@ -0,0 +1,75 @@ +From c6402be3b5eb84f53367ebd57b1a38664a240d44 Mon Sep 17 00:00:00 2001 +From: Sparky Bluefang <sparky@bluefang-logic.com> +Date: Wed, 3 Jul 2024 02:10:18 -0400 +Subject: [PATCH] Use Polkit agent for X11 sessions. Don't crash if polkit + doesn't start properly. + +--- + debian/control | 1 - + js/ui/main.js | 4 +--- + js/ui/polkitAuthenticationAgent.js | 20 +++++++++++++++++++- + 3 files changed, 20 insertions(+), 5 deletions(-) + +diff --git a/debian/control b/debian/control +index b9812a1276..d886fac1ec 100644 +--- a/debian/control ++++ b/debian/control +@@ -85,7 +85,6 @@ Depends: + metacity, + nemo, + network-manager-gnome [linux-any], +- policykit-1-gnome, + python3, + python3-dbus, + python3-distro, +diff --git a/js/ui/main.js b/js/ui/main.js +index 12bcfc0cfc..55703b96b3 100644 +--- a/js/ui/main.js ++++ b/js/ui/main.js +@@ -430,9 +430,7 @@ function start() { + _initUserSession(); + screenRecorder = new ScreenRecorder.ScreenRecorder(); + +- if (Meta.is_wayland_compositor()) { +- PolkitAuthenticationAgent.init(); +- } ++ PolkitAuthenticationAgent.init(); + + _startDate = new Date(); + +diff --git a/js/ui/polkitAuthenticationAgent.js b/js/ui/polkitAuthenticationAgent.js +index 5f0b55c387..e9ac7b8853 100644 +--- a/js/ui/polkitAuthenticationAgent.js ++++ b/js/ui/polkitAuthenticationAgent.js +@@ -35,6 +35,7 @@ const PolkitAgent = imports.gi.PolkitAgent; + const ModalDialog = imports.ui.modalDialog; + const CinnamonEntry = imports.ui.cinnamonEntry; + const UserWidget = imports.ui.userWidget; ++const Main = imports.ui.main; + + const DIALOG_ICON_SIZE = 64; + +@@ -389,5 +390,22 @@ AuthenticationAgent.prototype = { + } + + function init() { +- let agent = new AuthenticationAgent(); ++ try { ++ let agent = new AuthenticationAgent(); ++ } catch(err) { ++ if(!(err instanceof Error)) { ++ err = new Error(err); ++ } ++ ++ log('polkitAuthenticationAgent: init error ' + err); ++ ++ let icon = new St.Icon({ icon_name: 'dialog-warning', ++ icon_type: St.IconType.FULLCOLOR, ++ icon_size: 36 }); ++ ++ Main.warningNotify(_('Unable to start Cinnamon PolicyKit Agent'), err.message + ++ "\n\n" + ++ _("If you have another PolicyKit Agent configured to autostart, it should be disabled."), ++ icon); ++ } + } diff --git a/gnome-extra/cinnamon/metadata.xml b/gnome-extra/cinnamon/metadata.xml index 24e82c1c597d..3eaadcd0d9a0 100644 --- a/gnome-extra/cinnamon/metadata.xml +++ b/gnome-extra/cinnamon/metadata.xml @@ -14,5 +14,6 @@ </upstream> <use> <flag name="desktop-portal">Enable <pkg>sys-apps/xdg-desktop-portal</pkg> backend implementation for Cinnamon</flag> + <flag name="internal-polkit">Use Cinnamon's internal polkit agent instead of <pkg>gnome-extra/polkit-gnome</pkg>. This does not currently support multi-user fast switching.</flag> </use> </pkgmetadata> |