From fad47312b8c8ef7aaa3979f25243d81e5f3adf52 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Dec 10 2016 00:26:58 +0000 Subject: Add a patch to always run on X11 --- diff --git a/printrun-x11.patch b/printrun-x11.patch new file mode 100644 index 0000000..dd9597a --- /dev/null +++ b/printrun-x11.patch @@ -0,0 +1,39 @@ +diff --git a/plater.py b/plater.py +index 469eeb2..bfcc975 100755 +--- a/plater.py ++++ b/plater.py +@@ -15,12 +15,14 @@ + # You should have received a copy of the GNU General Public License + # along with Printrun. If not, see . + ++import os + import sys + import wx + + from printrun.stlplater import StlPlater + + if __name__ == '__main__': ++ os.environ['GDK_BACKEND'] = 'x11' + app = wx.App(False) + main = StlPlater(filenames = sys.argv[1:]) + main.Show() +diff --git a/pronterface.py b/pronterface.py +index dbe295a..4152288 100755 +--- a/pronterface.py ++++ b/pronterface.py +@@ -15,6 +15,7 @@ + # You should have received a copy of the GNU General Public License + # along with Printrun. If not, see . + ++import os + import sys + + try: +@@ -32,6 +33,7 @@ not yet available for python3. You should try running with python2 instead.""") + from printrun.pronterface import PronterApp + + if __name__ == '__main__': ++ os.environ['GDK_BACKEND'] = 'x11' + app = PronterApp(False) + try: + app.MainLoop() diff --git a/printrun.spec b/printrun.spec index a93e66b..c8eb08b 100644 --- a/printrun.spec +++ b/printrun.spec @@ -4,7 +4,7 @@ Name: printrun %global day 10 Version: %{year}.%{month}.%{day} %global tag %{name}-%{year}%{month}%{day} -Release: 5%{?dist} +Release: 6%{?dist} Summary: RepRap printer interface and tools # AppData is CC0 License: GPLv3+ and CC0 @@ -15,6 +15,9 @@ Source0: https://github.com/kliment/Printrun/archive/%{tag}.tar.gz # https://bugzilla.redhat.com/show_bug.cgi?id=1231518 Patch0: %{name}-gtk3.patch +# https://github.com/kliment/Printrun/pull/790 +Patch1: %{name}-x11.patch + BuildRequires: Cython BuildRequires: python2-devel BuildRequires: desktop-file-utils @@ -97,6 +100,7 @@ It is a part of Printrun. %prep %setup -qn Printrun-%{tag} %patch0 -p0 +%patch1 -p1 # remove bundled skeinforge link sed -i 's|python skeinforge/skeinforge_application/skeinforge.py|set-your-slicer-in-settings|' %{name}/settings.py @@ -181,6 +185,9 @@ ln -s -f %{_datadir}/locale/ %{buildroot}%{_datadir}/pronterface/ # the app expe %doc README* COPYING %changelog +* Sat Dec 10 2016 Miro Hrončok - 2015.03.10-6 +- Add a patch to always run on X11 + * Tue Jul 19 2016 Fedora Release Engineering - 2015.03.10-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages