From: Jan Rękorajski Date: Sun, 4 Nov 2018 13:13:30 +0000 (+0100) Subject: - up to 3.5.1 X-Git-Tag: auto/th/cura-3.5.1-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=8ab2697131ce16589803466b571f8b2bebd77087;p=packages%2Fcura.git - up to 3.5.1 --- diff --git a/cura.spec b/cura.spec index 1f4feab..263ced1 100644 --- a/cura.spec +++ b/cura.spec @@ -1,7 +1,7 @@ Summary: 3D printer control software Name: cura -Version: 2.5.0 -Release: 5 +Version: 3.5.1 +Release: 1 Epoch: 1 Group: Applications/Engineering # Code is AGPLv3 @@ -10,13 +10,10 @@ Group: Applications/Engineering # TweakAtZ.py is CC-BY-SA License: AGPLv3 and CC-BY-SA Source0: https://github.com/Ultimaker/Cura/archive/%{version}/%{name}-%{version}.tar.gz -# Source0-md5: ebe1b78c8b9ce77c289a266c9e732dc8 +# Source0-md5: a8b1de1bb8cfc043aa1d742f2cc78911 Source1: https://github.com/Ultimaker/fdm_materials/archive/%{version}/fdm_materials-%{version}.tar.gz -# Source1-md5: bf8f25394273d7b6333a856b6a1c94ce +# Source1-md5: 7d0bcfe67173f8fd616ac5ca55eb815b Patch0: plugins-path.patch -Patch1: desktop.patch -Patch2: locale.patch -Patch3: test.patch URL: https://ultimaker.com/en/products/cura-software BuildRequires: cmake BuildRequires: desktop-file-utils @@ -32,11 +29,11 @@ Requires: Qt5Quick-controls Requires: fonts-TTF-OpenSans Requires: python3-PyOpenGL Requires: python3-PyQt5 +Requires: python3-Uranium = %{version} Requires: python3-numpy Requires: python3-power -Requires: python3-savitar +Requires: python3-savitar >= 2.7.0 Requires: python3-serial -Requires: python3-Uranium = %{version} Requires: python3-zeroconf BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -54,20 +51,18 @@ for printing. %prep %setup -q -n Cura-%{version} -a1 %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -# Invalid locale names ptbr and jp -%{__mv} resources/i18n/{ptbr,pt_BR} -%{__mv} resources/i18n/{jp,ja} +for bad_lang in de_DE es_ES fi_FI fr_FR it_IT ja_JP ko_KR nl_NL pl_PL pt_PT ru_RU tr_TR ; do + lang="$(echo $bad_lang | sed 's/_.*//')" + %{__mv} "resources/i18n/$bad_lang" "resources/i18n/$lang" +done # The setup.py is only useful for py2exe, remove it, so noone is tempted to use it %{__rm} setup.py # Upstream installs to lib/python3/dist-packages # We want to install to %{py3_sitescriptdir} -%{__sed} -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt +%{__sed} -i 's|lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.*/.*-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt # Wrong shebang %{__sed} -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py @@ -99,10 +94,6 @@ ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n %{__rm} $RPM_BUILD_ROOT%{_localedir}/*/*.po %{__rm} $RPM_BUILD_ROOT%{_localedir}/*.pot -# Unbundle fonts -%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts/ -ln -s %{_datadir}/fonts/TTF $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts - %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} %py_postclean @@ -112,11 +103,18 @@ ln -s %{_datadir}/fonts/TTF $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/ %clean rm -rf $RPM_BUILD_ROOT +%post +%update_icon_cache hicolor + +%postun +%update_icon_cache hicolor + %files -f cura.lang %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/%{name} %{py3_sitescriptdir}/cura %{_desktopdir}/%{name}.desktop %{_datadir}/%{name} -%{_datadir}/appdata/cura.appdata.xml +%{_datadir}/metainfo/cura.appdata.xml %{_datadir}/mime/packages/cura.xml +%{_iconsdir}/hicolor/*x*/apps/cura-icon.png diff --git a/desktop.patch b/desktop.patch deleted file mode 100644 index e35ba4f..0000000 --- a/desktop.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 47e1b2a22a55c381ca1f9ee0f1e8bb69d0ee0b19 Mon Sep 17 00:00:00 2001 -From: awhiemstra -Date: Wed, 3 May 2017 15:55:11 +0200 -Subject: [PATCH] Remove Version field from Desktop file - -Apparently, it is not a required field and we specify an incorrect version. - -See also https://github.com/Ultimaker/Cura/issues/1784 ---- - packaging/cura.desktop | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/cura.desktop.in b/packaging/cura.desktop.in -index f7ca1ed..07de903 100755 ---- a/cura.desktop.in -+++ b/cura.desktop.in -@@ -1,5 +1,4 @@ - [Desktop Entry] --Version=1 - Name=Cura - Name[de]=Cura - GenericName=3D Printing Software diff --git a/locale.patch b/locale.patch deleted file mode 100644 index 942c176..0000000 --- a/locale.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -ur Cura-2.5.0.orig/resources/i18n/jp/cura.po Cura-2.5.0/resources/i18n/jp/cura.po ---- Cura-2.5.0.orig/resources/i18n/jp/cura.po 2017-04-21 13:30:29.000000000 +0200 -+++ Cura-2.5.0/resources/i18n/jp/cura.po 2017-05-16 23:32:17.865805984 +0200 -@@ -11,7 +11,7 @@ - "PO-Revision-Date: 2017-04-03 10:30+1000\n" - "Last-Translator: Ultimaker's Japanese Sales Partner \n" - "Language-Team: Ultimaker's Japanese Sales Partner \n" --"Language: jp\n" -+"Language: ja\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" -diff -ur Cura-2.5.0.orig/resources/i18n/ptbr/cura.po Cura-2.5.0/resources/i18n/ptbr/cura.po ---- Cura-2.5.0.orig/resources/i18n/ptbr/cura.po 2017-04-21 13:30:29.000000000 +0200 -+++ Cura-2.5.0/resources/i18n/ptbr/cura.po 2017-05-16 23:32:17.859139149 +0200 -@@ -12,7 +12,7 @@ - "PO-Revision-Date: 2017-04-09 18:00-0300\n" - "Last-Translator: Cláudio Sampaio \n" - "Language-Team: LANGUAGE \n" --"Language: ptbr\n" -+"Language: pt_BR\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" -@@ -1138,7 +1138,7 @@ - "PO-Revision-Date: 2017-01-23 13:30-0300\n" - "Last-Translator: Cláudio Sampaio \n" - "Language-Team: LANGUAGE \n" --"Language: ptbr\n" -+"Language: pt_BR\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" -diff -ur Cura-2.5.0.orig/resources/i18n/ptbr/fdmextruder.def.json.po Cura-2.5.0/resources/i18n/ptbr/fdmextruder.def.json.po ---- Cura-2.5.0.orig/resources/i18n/ptbr/fdmextruder.def.json.po 2017-04-21 13:30:29.000000000 +0200 -+++ Cura-2.5.0/resources/i18n/ptbr/fdmextruder.def.json.po 2017-05-16 23:32:17.859139149 +0200 -@@ -7,7 +7,7 @@ - "PO-Revision-Date: 2017-04-10 09:05-0300\n" - "Last-Translator: Cláudio Sampaio \n" - "Language-Team: LANGUAGE\n" --"Language: ptbr\n" -+"Language: pt_BR\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" -diff -ur Cura-2.5.0.orig/resources/i18n/ptbr/fdmprinter.def.json.po Cura-2.5.0/resources/i18n/ptbr/fdmprinter.def.json.po ---- Cura-2.5.0.orig/resources/i18n/ptbr/fdmprinter.def.json.po 2017-04-21 13:30:29.000000000 +0200 -+++ Cura-2.5.0/resources/i18n/ptbr/fdmprinter.def.json.po 2017-05-16 23:32:17.862472567 +0200 -@@ -6,7 +6,7 @@ - "PO-Revision-Date: 2017-04-10 19:00-0300\n" - "Last-Translator: Cláudio Sampaio \n" - "Language-Team: LANGUAGE\n" --"Language: ptbr\n" -+"Language: pt_BR\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins-path.patch b/plugins-path.patch index fd7d955..ea0fa3f 100644 --- a/plugins-path.patch +++ b/plugins-path.patch @@ -1,10 +1,9 @@ --- Cura-2.5.0/cura/CuraApplication.py.orig 2017-04-21 13:30:29.000000000 +0200 +++ Cura-2.5.0/cura/CuraApplication.py 2017-05-14 11:14:40.735151508 +0200 -@@ -454,7 +454,7 @@ - def _loadPlugins(self): - self._plugin_registry.addType("profile_reader", self._addProfileReader) - self._plugin_registry.addType("profile_writer", self._addProfileWriter) -- self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "lib", "cura")) +@@ -454,6 +454,7 @@ + lib_suffixes = {""} + for suffix in lib_suffixes: + self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "lib" + suffix, "cura")) + self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "share", "cura")) if not hasattr(sys, "frozen"): self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "plugins")) @@ -15,7 +14,7 @@ install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_DATADIR}/cura) install(DIRECTORY plugins -- DESTINATION lib/cura) +- DESTINATION lib${LIB_SUFFIX}/cura) + DESTINATION ${CMAKE_INSTALL_DATADIR}/cura) if(NOT APPLE AND NOT WIN32) install(FILES cura_app.py diff --git a/test.patch b/test.patch deleted file mode 100644 index 2756847..0000000 --- a/test.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -ur Cura-2.5.0.orig/tests/TestMachineAction.py Cura-2.5.0/tests/TestMachineAction.py ---- Cura-2.5.0.orig/tests/TestMachineAction.py 2017-04-21 13:30:29.000000000 +0200 -+++ Cura-2.5.0/tests/TestMachineAction.py 2017-05-17 00:02:31.273106246 +0200 -@@ -30,19 +30,19 @@ - machine_manager.addMachineAction(test_action) - - # Check that the machine has no supported actions yet. -- assert machine_manager.getSupportedActions(test_machine) == set() -+ assert machine_manager.getSupportedActions(test_machine) == [] - - # Check if adding a supported action works. - machine_manager.addSupportedAction(test_machine, "test_action") -- assert machine_manager.getSupportedActions(test_machine) == {test_action} -+ assert machine_manager.getSupportedActions(test_machine) == [test_action] - - # Check that adding a unknown action doesn't change anything. - machine_manager.addSupportedAction(test_machine, "key_that_doesnt_exist") -- assert machine_manager.getSupportedActions(test_machine) == {test_action} -+ assert machine_manager.getSupportedActions(test_machine) == [test_action] - - # Check if adding multiple supported actions works. - machine_manager.addSupportedAction(test_machine, "test_action_2") -- assert machine_manager.getSupportedActions(test_machine) == {test_action, test_action_2} -+ assert machine_manager.getSupportedActions(test_machine) == [test_action, test_action_2] - - # Check that the machine has no required actions yet. - assert machine_manager.getRequiredActions(test_machine) == set() -@@ -53,11 +53,11 @@ - - ## Check if adding single required action works - machine_manager.addRequiredAction(test_machine, "test_action") -- assert machine_manager.getRequiredActions(test_machine) == {test_action} -+ assert machine_manager.getRequiredActions(test_machine) == [test_action] - - # Check if adding multiple required actions works. - machine_manager.addRequiredAction(test_machine, "test_action_2") -- assert machine_manager.getRequiredActions(test_machine) == {test_action, test_action_2} -+ assert machine_manager.getRequiredActions(test_machine) == [test_action, test_action_2] - - # Ensure that firstStart actions are empty by default. - assert machine_manager.getFirstStartActions(test_machine) == []