[arch-commits] Commit in transmageddon/trunk (3 files)

Balló György bgyorgy at archlinux.org
Thu May 13 20:16:25 UTC 2021


    Date: Thursday, May 13, 2021 @ 20:16:25
  Author: bgyorgy
Revision: 933668

upgpkg: transmageddon 1.5-8: Apply fixes for python3.9 and gtk4

Added:
  transmageddon/trunk/0001-Remove-the-usage-of-deprecated-xml.etree.ElementTree.patch
  transmageddon/trunk/0001-Specify-required-versions-of-GI-components.patch
Modified:
  transmageddon/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-Remove-the-usage-of-deprecated-xml.etree.ElementTree.patch |   81 ++++++++++
 0001-Specify-required-versions-of-GI-components.patch           |   35 ++++
 PKGBUILD                                                        |   14 +
 3 files changed, 128 insertions(+), 2 deletions(-)

Added: 0001-Remove-the-usage-of-deprecated-xml.etree.ElementTree.patch
===================================================================
--- 0001-Remove-the-usage-of-deprecated-xml.etree.ElementTree.patch	                        (rev 0)
+++ 0001-Remove-the-usage-of-deprecated-xml.etree.ElementTree.patch	2021-05-13 20:16:25 UTC (rev 933668)
@@ -0,0 +1,81 @@
+From 3f7dd82b90b29bb1ad701d82377a462d6fd80d16 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
+Date: Thu, 13 May 2021 21:53:45 +0200
+Subject: [PATCH] Remove the usage of deprecated
+ 'xml.etree.ElementTree.Element.getchildren'
+
+This fix is needed for Python 3.9.
+---
+ src/presets.py | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/presets.py b/src/presets.py
+index 2cc8cf5..40a6f48 100644
+--- a/src/presets.py
++++ b/src/presets.py
+@@ -271,7 +271,7 @@ def _load_author(root):
+     """
+     author = Author()
+     
+-    for child in root.getchildren():
++    for child in list(root):
+         if child.tag == "name":
+             author.name = child.text.strip()
+         elif child.tag == "email":
+@@ -290,7 +290,7 @@ def _load_audio_codec(root):
+     """
+     codec = AudioCodec()
+     
+-    for child in root.getchildren():
++    for child in list(root):
+         if child.tag == "name":
+             codec.name = child.text.strip()
+         elif child.tag == "container":
+@@ -304,7 +304,7 @@ def _load_audio_codec(root):
+         elif child.tag == "samplerate":
+             codec.samplerate = child.text.strip()
+         elif child.tag == "presets":
+-            for command in child.getchildren():
++            for command in list(child):
+                 codec.presets.append(command.text.strip())
+     
+     return codec
+@@ -320,7 +320,7 @@ def _load_video_codec(root):
+     """
+     codec = VideoCodec()
+     
+-    for child in root.getchildren():
++    for child in list(root):
+         if child.tag == "name":
+             codec.name = child.text.strip()
+         elif child.tag == "container":
+@@ -340,7 +340,7 @@ def _load_video_codec(root):
+         elif child.tag == "passes":
+             codec.passes = child.text.strip()
+         elif child.tag == "presets":
+-            for command in child.getchildren():
++            for command in list(child):
+                 codec.presets.append(command.text.strip())
+     
+     return codec
+@@ -356,7 +356,7 @@ def _load_preset(root):
+     """
+     preset = Preset()
+     
+-    for child in root.getchildren():
++    for child in list(root):
+         if child.tag == "name":
+             preset.name = child.text.strip()
+         elif child.tag == "container":
+@@ -391,7 +391,7 @@ def load(filename):
+     
+     device.filename = filename
+     
+-    for child in tree.getroot().getchildren():
++    for child in list(tree.getroot()):
+         if child.tag == "make":
+             device.make = child.text.strip()
+         elif child.tag == "model":
+-- 
+2.31.1
+

Added: 0001-Specify-required-versions-of-GI-components.patch
===================================================================
--- 0001-Specify-required-versions-of-GI-components.patch	                        (rev 0)
+++ 0001-Specify-required-versions-of-GI-components.patch	2021-05-13 20:16:25 UTC (rev 933668)
@@ -0,0 +1,35 @@
+From 0b36c28fe8e3086d0c0d7e991a09f713e8c1aa5c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
+Date: Thu, 13 May 2021 22:05:00 +0200
+Subject: [PATCH] Specify required versions of GI components
+
+This fixes transmageddon to run when GTK4 is installed on the system.
+---
+ src/transmageddon.py | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/transmageddon.py b/src/transmageddon.py
+index 0721249..89aa36c 100644
+--- a/src/transmageddon.py
++++ b/src/transmageddon.py
+@@ -31,8 +31,16 @@ if sys.version_info[0] < 3:
+ 
+ import which
+ import time
++import gi
++gi.require_version('Notify', '0.7')
++gi.require_version('Gdk', '3.0')
++gi.require_version('Gtk', '3.0')
++gi.require_version('Gst', '1.0')
++gi.require_version('GstPbutils', '1.0')
++gi.require_version('GstTag', '1.0')
++gi.require_version('GUdev', '1.0')
+ from gi.repository import Notify
+-from gi.repository import GdkX11, Gdk, Gio, Gtk, GLib, Gst, GstPbutils, GstTag
++from gi.repository import Gdk, GdkX11, Gio, Gtk, GLib, Gst, GstPbutils, GstTag
+ from gi.repository import GUdev
+ from gi.repository import GObject, GdkPixbuf
+ # GObject.threads_init()
+-- 
+2.31.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-13 20:16:06 UTC (rev 933667)
+++ PKGBUILD	2021-05-13 20:16:25 UTC (rev 933668)
@@ -4,12 +4,12 @@
 
 pkgname=transmageddon
 pkgver=1.5
-pkgrel=7
+pkgrel=8
 pkgdesc='Simple python application for transcoding video into formats supported by GStreamer'
 arch=('any')
 url='http://www.linuxrising.org/'
 license=('LGPL')
-depends=('python-gobject' 'libnotify' 'gtk3' 'gst-plugins-base')
+depends=('gst-plugins-base' 'gst-python' 'gtk3' 'libnotify' 'python-gobject')
 makedepends=('intltool')
 optdepends=('gst-plugins-good: Extra media codecs'
             'gst-plugins-bad: Extra media codecs'
@@ -16,13 +16,23 @@
             'gst-plugins-ugly: Extra media codecs'            
             'gst-libav: Extra media codecs')
 source=("http://www.linuxrising.org/files/$pkgname-$pkgver.tar.xz"
+        '0001-Specify-required-versions-of-GI-components.patch'
+        '0001-Remove-the-usage-of-deprecated-xml.etree.ElementTree.patch'
         '0001-Fix-AppStream-metadata-validation.patch')
 sha256sums=('ca24369a94ce4edc992c1c7b3e2d09d7cd82794ce4c1b862a1a83ea40121e296'
+            'b705242aae648a2554754880fb1c48d5415febe769a986df177b9792a6aefd27'
+            '7c127931f777d6655bf1323a7fd190b1b557a42bedb02017fa03d6afeee32b7a'
             'ca16192de33f8694a74220c3790a230d32c5576c663a34db050e0c2db9b0e002')
 
 prepare() {
   cd $pkgname-$pkgver
 
+  # Fix run with Python 3.9
+  patch -Np1 -i ../0001-Remove-the-usage-of-deprecated-xml.etree.ElementTree.patch
+
+  # Fix run when GTK 4 is installed
+  patch -Np1 -i ../0001-Specify-required-versions-of-GI-components.patch
+
   # Fix AppStream metadata validation
   patch -Np1 -i ../0001-Fix-AppStream-metadata-validation.patch
   sed -i 's|${datadir}/appdata|${datadir}/metainfo|' configure{,.ac}



More information about the arch-commits mailing list