From efd6d1cb602f31be9e8af36a1023914cf50ef1ac Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Oct 10 2019 09:42:23 +0000 Subject: Update to 2.0.0-alpha.12 --- diff --git a/.gitignore b/.gitignore index 5c28a14..88940c1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ mypaint-0.8.2.tar.bz2 /tone_v2.zip /*.src.rpm /results_mypaint +/mypaint-2.0.0-alpha.12.tar.gz diff --git a/0001-fix-python3-support.patch b/0001-fix-python3-support.patch new file mode 100644 index 0000000..6f874ef --- /dev/null +++ b/0001-fix-python3-support.patch @@ -0,0 +1,41 @@ +From 909f2e9eda9e696e9c21e8f7915a623dd06b0715 Mon Sep 17 00:00:00 2001 +From: Sergey Avseyev +Date: Wed, 30 Jan 2019 14:16:22 +0300 +Subject: [PATCH 1/5] fix python3 support + +--- + SConscript | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/SConscript b/SConscript +index 9ff4a62f..b9b0673d 100644 +--- a/SConscript ++++ b/SConscript +@@ -67,9 +67,9 @@ def burn_versions(env, target, source): + relinfo_script = relinfo_script, + source = source[0], + ) +- with open(unicode(target[0]), 'w') as output: ++ with open(str(target[0]), 'w') as output: + output.write(header) +- with open(unicode(source[0])) as input: ++ with open(str(source[0])) as input: + output.write(input.read()) + c = env.Command(target, source, [ + _burn_versions, +@@ -127,11 +127,11 @@ conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig, + if not conf.CheckPKGConfig('0.4.0'): + # At least 0.4.0 is needed for option --variable. + # Probably an even more recent version is preferred though. +- print 'pkg-config >= 0.4.0 not found.' ++ print('pkg-config >= 0.4.0 not found.') + Exit(1) + + if not conf.CheckPKG('mypaint-brushes >= 1.1'): +- print 'mypaint-brushes >= 1.1 not found.' ++ print('mypaint-brushes >= 1.1 not found.') + Exit(1) + + create_config_py(env) +-- +2.20.1 diff --git a/0002-fix-shebang-on-binaries.patch b/0002-fix-shebang-on-binaries.patch index 4edf0d6..219bab7 100644 --- a/0002-fix-shebang-on-binaries.patch +++ b/0002-fix-shebang-on-binaries.patch @@ -1,17 +1,17 @@ -From bbe577e843d0956f2743d9f9a9f000f6a390d978 Mon Sep 17 00:00:00 2001 +From d8ea3d216f63914ac86b708486e20fe57867a3b7 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Wed, 6 Dec 2017 14:05:51 +0300 -Subject: [PATCH] fix shebang on binaries +Subject: [PATCH 2/5] fix shebang on binaries --- SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConscript b/SConscript -index 195df1d..dcfabbf 100644 +index b9b0673d..abe94f47 100644 --- a/SConscript +++ b/SConscript -@@ -45,7 +45,7 @@ def burn_versions(env, target, source): +@@ -56,7 +56,7 @@ def burn_versions(env, target, source): import lib.meta relinfo_script = lib.meta._get_release_info_script(gitprefix="git") header = "\n".join([ @@ -21,5 +21,5 @@ index 195df1d..dcfabbf 100644 "# ***DO NOT EDIT THIS FILE***: edit {source} instead.", "#", -- -2.13.6 +2.20.1 diff --git a/792-avoid-deprecated-gdk.cursor-constructor.patch b/792-avoid-deprecated-gdk.cursor-constructor.patch deleted file mode 100644 index c100197..0000000 --- a/792-avoid-deprecated-gdk.cursor-constructor.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 037c2e791cfca4114dc75d3077d1266c2506d71c Mon Sep 17 00:00:00 2001 -From: Simon McVittie -Date: Sun, 2 Apr 2017 18:24:33 +0100 -Subject: [PATCH] hcywheel: Avoid deprecated gdk.Cursor constructor - -Use Gdk.Cursor.new_for_display on realize instead. - -Backported from a larger patch by Daniel Plachotich. - -Fixes #791 - -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859064 ---- - gui/colors/hcywheel.py | 23 +++++++++++++++++++---- - 1 file changed, 19 insertions(+), 4 deletions(-) - -diff --git a/gui/colors/hcywheel.py b/gui/colors/hcywheel.py -index ed2d1130f..7d5235882 100644 ---- a/gui/colors/hcywheel.py -+++ b/gui/colors/hcywheel.py -@@ -20,6 +20,7 @@ - import gui.gtk2compat as gtk2compat - import gtk - from gtk import gdk -+from gi.repository import Gdk - import cairo - - from bases import CachedBgDrawingArea -@@ -391,10 +392,10 @@ class HCYMaskEditorWheel (HCYHueChromaWheel): - - ## Class-level constants and variables - # Specialized cursors for different actions -- __add_cursor = gdk.Cursor(gdk.PLUS) -- __move_cursor = gdk.Cursor(gdk.FLEUR) -- __move_point_cursor = gdk.Cursor(gdk.CROSSHAIR) -- __rotate_cursor = gdk.Cursor(gdk.EXCHANGE) -+ __add_cursor = None -+ __move_cursor = None -+ __move_point_cursor = None -+ __rotate_cursor = None - # Constrain the range of allowable lumas - __MAX_LUMA = 0.75 - __MIN_LUMA = 0.25 -@@ -417,12 +418,26 @@ def __init__(self): - """Instantiate, and connect the editor events. - """ - HCYHueChromaWheel.__init__(self) -+ -+ self.connect("realize", self._realize_cb) - self.connect("button-press-event", self.__button_press_cb) - self.connect("button-release-event", self.__button_release_cb) - self.connect("motion-notify-event", self.__motion_cb) - self.connect("leave-notify-event", self.__leave_cb) - self.add_events(gdk.POINTER_MOTION_MASK | gdk.LEAVE_NOTIFY_MASK) - -+ def _realize_cb(self, widget): -+ display = self.get_window().get_display() -+ -+ self.__add_cursor = Gdk.Cursor.new_for_display( -+ display, Gdk.CursorType.PLUS) -+ self.__move_cursor = Gdk.Cursor.new_for_display( -+ display, Gdk.CursorType.FLEUR) -+ self.__move_point_cursor = Gdk.Cursor.new_for_display( -+ display, Gdk.CursorType.CROSSHAIR) -+ self.__rotate_cursor = Gdk.Cursor.new_for_display( -+ display, Gdk.CursorType.EXCHANGE) -+ - def __leave_cb(self, widget, event): - # Reset the active objects when the pointer leaves. - if self.__drag_func is not None: diff --git a/911-load-cursors-in-enter-handler.patch b/911-load-cursors-in-enter-handler.patch deleted file mode 100644 index 60baf38..0000000 --- a/911-load-cursors-in-enter-handler.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 528242489a1521a38d70162c194a55c4f0df2bef Mon Sep 17 00:00:00 2001 -From: Sergey Avseyev -Date: Mon, 26 Mar 2018 00:09:42 +0300 -Subject: [PATCH] Load cursors in 'enter' handler - -Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1555277 ---- - gui/mode.py | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/gui/mode.py b/gui/mode.py -index 84e18f63..e41fdb88 100644 ---- a/gui/mode.py -+++ b/gui/mode.py -@@ -26,6 +26,7 @@ from gtk import gdk - from gtk import keysyms - from gettext import gettext as _ - -+import gui.cursor - - ## Module constants - -@@ -819,8 +820,7 @@ class SingleClickMode (InteractionMode): - """Base class for non-drag (single click) modes""" - - #: The cursor to use when entering the mode -- # FIXME: Use Gdk.Cursor.new_for_display; read-only property -- cursor = gdk.Cursor.new(gdk.CursorType.ARROW) -+ cursor = None - - def __init__(self, ignore_modifiers=False, **kwds): - super(SingleClickMode, self).__init__(**kwds) -@@ -830,6 +830,9 @@ class SingleClickMode (InteractionMode): - super(SingleClickMode, self).enter(doc, **kwds) - assert self.doc is not None - self.doc.tdw.set_override_cursor(self.cursor) -+ if self.cursor is None: -+ self.cursor = self.doc.app.cursors.get_action_cursor( -+ self.ACTION_NAME, gui.cursor.Name.ARROW) - - def leave(self, **kwds): - if self.doc is not None: -@@ -868,8 +871,7 @@ class DragMode (InteractionMode): - - """ - -- # FIXME: Use Gdk.Cursor.new_for_display; read-only property -- inactive_cursor = gdk.Cursor.new(gdk.CursorType.ARROW) -+ inactive_cursor = None - active_cursor = None - - #: If true, exit mode when initial modifiers are released -@@ -1049,6 +1051,14 @@ class DragMode (InteractionMode): - """ - super(DragMode, self).enter(doc, **kwds) - assert self.doc is not None -+ if self.inactive_cursor is None: -+ try: -+ # some children might override self.inactive_cursor as read-only attribute -+ self.inactive_cursor = self.doc.app.cursors. \ -+ get_action_cursor(self.ACTION_NAME, -+ gui.cursor.Name.ARROW) -+ except AttributeError: -+ pass - self.doc.tdw.set_override_cursor(self.inactive_cursor) - - if self.SPRING_LOADED: --- -2.14.3 - diff --git a/mypaint.spec b/mypaint.spec index c598010..8e484c5 100644 --- a/mypaint.spec +++ b/mypaint.spec @@ -1,30 +1,26 @@ +%global prerel alpha.12 Name: mypaint -Version: 1.2.1 -Release: 21%{?dist} +Version: 2.0.0 +Release: 0.1.%{prerel}%{?dist} Summary: A fast and easy graphics application for digital painters # MyPaint is GPLv2+, brush library LGPLv2+ -# Brushes are CC-BY License: GPLv2+ and LGPLv2+ and CC-BY URL: http://mypaint.org -Source0: https://github.com/mypaint/mypaint/releases/download/v%{version}/%{name}-%{version}.tar.xz -Source1: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mypaintatelier/ramon2.zip -Source2: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mypaintatelier/Concept%20Design.zip#/Concept_Design.zip -Source3: https://drive.google.com/uc?export=download&id=0B4221jMaXP_cUWhDMlQwUkFmbTQ#/dirty-brushes.zip -Source4: https://drive.google.com/uc?export=download&id=0B4221jMaXP_cZ25QZHplR29oRWs#/offset-brushes.zip -Source5: http://web.archive.org/web/20170225211222if_/http://download.gna.org/mypaint/brushpacks/tone_v2.zip +Source0: https://github.com/mypaint/mypaint/archive/v%{version}-%{prerel}/mypaint-%{version}-%{prerel}.tar.gz +Patch0: 0001-fix-python3-support.patch Patch1: 0002-fix-shebang-on-binaries.patch -# https://github.com/mypaint/mypaint/pull/792 -Patch2: 792-avoid-deprecated-gdk.cursor-constructor.patch -# https://github.com/mypaint/mypaint/pull/911 -Patch3: 911-load-cursors-in-enter-handler.patch BuildRequires: gcc, gcc-c++ -BuildRequires: python2-devel -BuildRequires: python2-scons >= 3.0, swig, desktop-file-utils, gettext, intltool -BuildRequires: python2-numpy +BuildRequires: python3-devel +BuildRequires: python3-scons >= 3.0 +BuildRequires: swig +BuildRequires: desktop-file-utils +BuildRequires: gettext +BuildRequires: intltool +BuildRequires: python3-numpy BuildRequires: pkgconfig(pygtk-2.0) BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(pygobject-3.0) @@ -33,12 +29,16 @@ BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(protobuf) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(libmypaint-2.0) +BuildRequires: pkgconfig(mypaint-brushes-2.0) -Requires: python2 -Requires: python2-numpy%{?_isa} -Requires: python2-protobuf +Requires: python3 +Requires: python3-numpy%{?_isa} +Requires: python3-protobuf Requires: pygtk2%{?_isa} -Requires: python2-gobject%{?_isa} +Requires: python3-gobject%{?_isa} +Requires: %{name}-brushes Requires: %{name}-data = %{version}-%{release} %description @@ -64,85 +64,54 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. - %prep -%autosetup -p1 - -for src in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} -do - unzip ${src} -x order.conf -d brushes - unzip -p ${src} order.conf >> brushes/order.conf - if [ -f brushes/readme.txt ] - then - sed 's/\r$//' brushes/readme.txt > README.$(basename ${src}) - rm brushes/readme.txt - fi - rm -rf brushes/extras -done +%autosetup -p1 -n %{name}-%{version}-%{prerel} # for 64 bit -sed -i 's|lib/mypaint|%{_lib}/mypaint|g' SConscript SConstruct mypaint.py -sed -i 's|lib/pkgconfig|%{_lib}/pkgconfig|g' SConscript brushlib/SConscript +sed -i 's|lib/mypaint|%{_lib}/mypaint|g' mypaint.py sed -i "s|'lib', 'mypaint'|'%{_lib}', 'mypaint'|" mypaint.py -# don't set RPATH -sed -i 's|env.Append.*RPATH.*|pass #\0|' SConstruct - %build -export CFLAGS="%{optflags}" -export CXXFLAGS="%{optflags}" -scons-2.7 python_binary=%{__python2} \ - python_config=%{__python2}-config \ - prefix=%{_prefix} \ - %{?_smp_mflags} +%{__python3} setup.py build_ext +%{__python3} setup.py build_py +%{__python3} setup.py build_translations +%{__python3} setup.py build_config %install -scons-2.7 python_binary=%{__python2} \ - python_config=%{__python2}-config \ - prefix=%{buildroot}%{_prefix} \ - install +%{__python3} setup.py managed_install --prefix=%{buildroot}%{_prefix} +[[ %{_lib} != lib ]] && mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/%{_lib} + desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/%{name}.desktop -# the SConscript is dumb and includes %%{buildroot}. Let's just strip it here. -sed -i 's|%{buildroot}||' %{buildroot}%{_libdir}/pkgconfig/libmypaint.pc - find %{buildroot} -name '*.la' -exec rm -f {} ';' find %{buildroot} -name '*.a' -exec rm -f {} ';' -chmod 755 %{buildroot}%{_libdir}/%{name}/_mypaintlib.so \ - %{buildroot}%{_datadir}/%{name}/brushes/label-brush-mypaint.sh %find_lang %{name} -%find_lang libmypaint -%files -f %{name}.lang -f libmypaint.lang +%files -f %{name}.lang +%license COPYING %doc Changelog.md README* %{_bindir}/%{name} %{_bindir}/%{name}-ora-thumbnailer %{_datadir}/thumbnailers -%{_datadir}/lib%{name} -%{_datadir}/%{name}/lib -%{_datadir}/%{name}/gui %{_libdir}/%{name} -%license COPYING %{_datadir}/applications/%{name}.desktop -%{_datadir}/appdata/%{name}.appdata.xml +%{_datadir}/metainfo/%{name}.appdata.xml %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_datadir}/icons/hicolor/*/actions/%{name}* %files data %{_datadir}/%{name}/backgrounds -%{_datadir}/%{name}/brushes %{_datadir}/%{name}/palettes %{_datadir}/%{name}/pixmaps -%files devel -%{_includedir}/libmypaint -%{_libdir}/pkgconfig/libmypaint.pc - %changelog +* Thu Oct 10 2019 Sergey Avseyev - 2.0.0-0.1.alpha.12 +- Update to 2.0.0-alpha.12 + * Thu Jul 25 2019 Fedora Release Engineering - 1.2.1-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index af2e5cb..76a47fc 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (Concept_Design.zip) = 4ad2459da66e85f99911933323780aac0c223b1d0f860d3c768cff9add1ccf6fdd9149549b480bdc0c270059e3be068686f17845e472d2a658e75cb0cb7b3458 SHA512 (dirty-brushes.zip) = 231ca83128d8f03c380a55b08a338a1e9f65c375dfdc97974d33fa364ee1bf539da51984dea499bcbfb9ef5934e7b8567fd0324cc012aee3c91fba9cfbe90907 -SHA512 (mypaint-1.2.1.tar.xz) = 1783765e495b9535669a83a29d27ba684e6201fdfe0875bdd2c167b1dab8af05993b19025767fe0b2770ed9e578e4709f75d8a4820ac945812cba85609f9eb9b SHA512 (offset-brushes.zip) = 71872b9009a08d6e52308b8d6f81e69f105478b5c0c2c9d7a26ee98734c9a70847697be8f6eff29ecc7d784508539d81b29fc230716443b899b73fee88493668 SHA512 (ramon2.zip) = bdbeb2584ef635670e6c93d239c690dd8c785acde5b443d1e533ab98fa8fba05597f06423f7c6a7742f1ea490072a9b0ca6981253f842795cc0f22d61bb6e64c SHA512 (tone_v2.zip) = 05ee56eccb5782d13006b2d1f9a6f067fac0bcbfdef372d091d99db8d41e87297d2c00604f49ad1b907e9bc84705d06728e47bbcd323156145185633dc6370e3 +SHA512 (mypaint-2.0.0-alpha.12.tar.gz) = 152dab18b3a80439d4917ea0d925b20fa9ffe97449f8bae74e27f2c1ec53be259a9ff57e7d00e128f9ea0f353c75b2ccb5309b4436c5dd4a1d96a94289bfc881