commit a74df3da7774c1d5b6e53e36ce36df511c2cbc44
Author: Martin Gansser <martinkg(a)fedoraproject.org>
Date: Thu Feb 1 08:47:06 2018 +0100
Add OpenGL_fix.patch
OpenGL_fix.patch | 37 +++++++++++++++++++++++++++++++++++++
vidcutter.spec | 8 +++++---
2 files changed, 42 insertions(+), 3 deletions(-)
---
diff --git a/OpenGL_fix.patch b/OpenGL_fix.patch
new file mode 100644
index 0000000..cb8a403
--- /dev/null
+++ b/OpenGL_fix.patch
@@ -0,0 +1,37 @@
+--- a/vidcutter/libs/mpvwidget.py 2017-12-15 09:54:25.000000000 -0600
++++ b/vidcutter/libs/mpvwidget-1.py 2017-12-26 11:25:14.629090000 -0600
+@@ -6,6 +6,11 @@
+ import os
+ import sys
+
++# this is required for Ubuntu which seems to have a broken PyQt5 OpenGL implementation
++# so we use PyOpenGL instead for the GL context
++# noinspection PyUnresolvedReferences
++from OpenGL import GL
++
+ from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QEvent, QTimer
+ from PyQt5.QtGui import QKeyEvent, QMouseEvent, QWheelEvent
+ from PyQt5.QtOpenGL import QGLContext
+@@ -156,7 +161,7 @@
+ def setLogLevel(self, loglevel):
+ self.mpv.set_log_level(loglevel)
+
+- def showText(self, msg: str, duration: int=5, level: int=0):
++ def showText(self, msg: str, duration: int = 5, level: int = 0):
+ self.mpv.command('show-text', msg, duration * 1000, level)
+
+ def play(self, filepath) -> None:
+@@ -181,10 +186,10 @@
+ def volume(self, vol: int) -> None:
+ self.mpv.set_property('volume', vol)
+
+- def codec(self, stream: str='video') -> str:
+- return self.mpv.get_property('{}-codec'.format(stream))
++ def codec(self, stream: str = 'video') -> str:
++ return self.mpv.get_property('audio-codec' if stream == 'audio'
else 'video-codec')
+
+- def format(self, stream: str='video') -> str:
++ def format(self, stream: str = 'video') -> str:
+ return self.mpv.get_property('audio-codec-name' if stream ==
'audio' else 'video-format')
+
+ def property(self, prop: str):
diff --git a/vidcutter.spec b/vidcutter.spec
index 572acf2..a145201 100644
--- a/vidcutter.spec
+++ b/vidcutter.spec
@@ -7,6 +7,8 @@ Summary: The simplest + fastest video cutter & joiner
License: GPLv3+
Url:
http://vidcutter.ozmartians.com
Source0:
https://github.com/ozmartian/%{name}/archive/%{version}.tar.gz#/%{name}-%...
+#
https://github.com/UnitedRPMs/vidcutter/blob/master/OpenGL_fix.patch
+Patch0: OpenGL_fix.patch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@@ -18,7 +20,6 @@ Requires: ffmpeg
Requires: python3-pyopengl
Requires: mediainfo
Requires: hicolor-icon-theme
-Requires: mpv-libs
%description
The simplest & sexiest tool for cutting and joining your videos without the
@@ -27,6 +28,7 @@ the job done using tried and true tech in its arsenal via mpv and
FFmpeg.
%prep
%setup -q
+%patch0 -p1
sed -i "s/pypi/rpm/" vidcutter/__init__.py
# Fix error: Empty %%files file debugsourcefiles.list
sed -i "s/-g0/-g/" setup.py
@@ -75,8 +77,8 @@ fi
%{_datadir}/pixmaps/%{name}.svg
%changelog
-* Mon Jan 29 2018 Martin Gansser <martinkg(a)fedoraproject.org> - 5.0.5-2
-- Add RR mpv-libs
+* Wed Jan 31 2018 Martin Gansser <martinkg(a)fedoraproject.org> - 5.0.5-2
+- Add OpenGL_fix.patch
* Sun Dec 03 2017 Martin Gansser <martinkg(a)fedoraproject.org> - 5.0.5-1
- Update to 5.0.5