Package Details: mcomix 3.2.0-1

Git Clone URL: https://aur.archlinux.org/mcomix.git (read-only, click to copy)
Package Base: mcomix
Description: GTK comic book viewer
Upstream URL: https://sourceforge.net/p/mcomix/wiki/Home/
Licenses: GPL-2.0-or-later
Submitter: arojas
Maintainer: qark
Last Packager: qark
Votes: 40
Popularity: 1.39
First Submitted: 2022-04-01 17:57 (UTC)
Last Updated: 2026-08-21 06:46 (UTC)

Dependencies (15)

Required by (0)

Sources (1)

Latest Comments

1 2 3 Next › Last »

dohq commented on 2026-07-29 16:44 (UTC)

fix keybinding patch

PKGBUILD

diff --git a/PKGBUILD b/PKGBUILD
index 62fc8cb..944a735 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@

 pkgname=mcomix
 pkgver=3.1.1
-pkgrel=1
+pkgrel=2
 pkgdesc="GTK comic book viewer"
 arch=('any')
 url="https://sourceforge.net/p/mcomix/wiki/Home/"
@@ -21,8 +21,18 @@ optdepends=(
 )
 source=(
   "https://downloads.sourceforge.net/project/${pkgname}/MComix-${pkgver}/${pkgname}-${pkgver}.tar.gz"
+  "fix-pygobject-modifier-hash.patch"
 )
-sha256sums=('a10aaaed7bc07deb74efde93bf9a8a27e1bcbf1824a0519b264cfee582becef8')
+sha256sums=('a10aaaed7bc07deb74efde93bf9a8a27e1bcbf1824a0519b264cfee582becef8'
+            '40c490b50af1f18d35f368ad4cf1b9e0f150bf7ad710aedd07aa34fde669e290')
+
+prepare() {
+  cd "${pkgname}-${pkgver}"
+  # Fix keybindings.conf shortcuts (arrow keys / page flipping) being dead on
+  # PyGObject 3.56 / Python 3.14: Gdk.ModifierType objects hash inconsistently
+  # inside the (keyval, modifier) dict keys, so every lookup missed.
+  patch -Np1 -i "${srcdir}/fix-pygobject-modifier-hash.patch"
+}

 build() {
   cd "${pkgname}-${pkgver}"

fix-pygobject-modifier-hash.patch

--- a/mcomix/keybindings.py
+++ b/mcomix/keybindings.py
@@ -149,6 +149,27 @@
     }


+class _NormKeyDict(dict):
+    """Normalize (keyval, modifier) tuple keys to plain ints.
+
+    On PyGObject 3.56 / Python 3.14, Gdk.ModifierType objects used inside
+    tuple dict keys hash inconsistently between Gtk.accelerator_parse() and
+    live key events, so lookups in _binding_to_action always missed and no
+    keybindings.conf shortcut fired. Coercing to int makes them match.
+    """
+    @staticmethod
+    def _k(key):
+        if isinstance(key, tuple) and len(key) == 2:
+            return (int(key[0]), int(key[1]))
+        return key
+    def __setitem__(self, k, v): super().__setitem__(self._k(k), v)
+    def __getitem__(self, k): return super().__getitem__(self._k(k))
+    def __delitem__(self, k): super().__delitem__(self._k(k))
+    def __contains__(self, k): return super().__contains__(self._k(k))
+    def get(self, k, d=None): return super().get(self._k(k), d)
+    def pop(self, k, *a): return super().pop(self._k(k), *a)
+
+
 class _KeybindingManager(object):
     def __init__(self, window):
         #: Main window instance
@@ -156,7 +177,7 @@

         self._action_to_callback = {} # action name => (func, args, kwargs)
         self._action_to_bindings = defaultdict(list) # action name => [ (key code, key modifier), ]
-        self._binding_to_action = {} # (key code, key modifier) => action name
+        self._binding_to_action = _NormKeyDict() # (key code, key modifier) => action name

         self._migrate_from_old_bindings()
         self._initialize()

AsfhtgkDavid commented on 2026-06-23 18:18 (UTC)

I cloned it myself; it works, but that's not it. To be more precise, the keybinds don't work here.

patrick_g commented on 2026-01-22 19:24 (UTC)

OK it worked. Thanks.

chowbok commented on 2026-01-22 18:59 (UTC)

You have to rebuild it now that you've upgraded Python.

patrick_g commented on 2026-01-22 16:25 (UTC) (edited on 2026-01-22 16:29 (UTC) by patrick_g)

Error when trying to launch mcomix :

Traceback (most recent call last):
File "/usr/bin/mcomix", line 5, in <module>
from mcomix.__main__ import main
ModuleNotFoundError: No module named 'mcomix'

silentnoodle commented on 2025-06-24 15:53 (UTC)

a patch that makes it run with python 3.13.5

diff --git a/mcomix/__main__.py b/mcomix/__main__.py
index bc307bd..760a1fd 100644
--- a/mcomix/__main__.py
+++ b/mcomix/__main__.py
@@ -19,10 +19,13 @@
 import multiprocessing as mp
 from .run import run

+try:
+    mp.set_start_method('spawn')
+except RuntimeError:
+    pass

 def main() -> None:
     mp.freeze_support()
-    mp.set_start_method('spawn')
     run()

qark commented on 2025-06-24 06:44 (UTC)

@gehenna14 Looks like it is an upstream issue. Would you mind opening ticket in their bug tracker?

gehenna14 commented on 2025-06-24 01:21 (UTC)

Hello This package is broken after updating to python-3.13.5-1 I get a "RuntimeError: context has already been set" error when trying to start mcomix

dno commented on 2024-05-11 15:47 (UTC)

Hm. When I build with makepkg it works correctly (builds with python3.12 paths) but is broken when I use my normal AUR helper (aura). My mistake, apologies for the noise.

qark commented on 2024-05-11 14:07 (UTC)

"real fix" is rebuild with current Python.