[arch-commits] Commit in mypaint/trunk (PKGBUILD fix-wayland.patch)
Balló György
bgyorgy at archlinux.org
Sun Jan 21 00:56:40 UTC 2018
Date: Sunday, January 21, 2018 @ 00:56:29
Author: bgyorgy
Revision: 284473
upgpkg: mypaint 1.2.1-5
Adopt the package, fix run under wayland (FS#53876)
Added:
mypaint/trunk/fix-wayland.patch
Modified:
mypaint/trunk/PKGBUILD
-------------------+
PKGBUILD | 28 ++++++++++++++------
fix-wayland.patch | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+), 9 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-01-21 00:10:14 UTC (rev 284472)
+++ PKGBUILD 2018-01-21 00:56:29 UTC (rev 284473)
@@ -1,25 +1,35 @@
# $Id$
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
# Contributor: Jon Nordby <jononor at gmail.com>
pkgname=mypaint
pkgver=1.2.1
-pkgrel=4
+pkgrel=5
pkgdesc="A fast and easy painting application for digital painters, with brush dynamics"
arch=('x86_64')
url="http://mypaint.org/"
-license=('GPL' 'LGPL')
-depends=('gtk3' 'json-c' 'lcms2' 'python2-cairo' 'python2-gobject' 'python2-numpy')
-makedepends=('scons>=0.97' 'swig>=1.3.39')
-source=(https://github.com/mypaint/mypaint/releases/download/v$pkgver/mypaint-$pkgver.tar.xz)
-sha256sums=('ed2349382f6a0c583d7defae06427e97ac7d14acb77b9e2c0fc7171ddd96d3c7')
+license=('GPL')
+depends=('gtk3' 'python2-cairo' 'python2-gobject' 'python2-numpy')
+makedepends=('scons' 'swig')
+source=(https://github.com/mypaint/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz
+ fix-wayland.patch)
+sha256sums=('ed2349382f6a0c583d7defae06427e97ac7d14acb77b9e2c0fc7171ddd96d3c7'
+ '1ffa2e6e0deb236928f33c7f82cc037949e76600b5f7242f85b18380a241928b')
+prepare() {
+ cd $pkgname-$pkgver
+ # Fix run under wayland
+ # https://github.com/mypaint/mypaint/issues/791
+ patch -Np1 -i ../fix-wayland.patch
+}
+
build() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd $pkgname-$pkgver
scons
}
package() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd $pkgname-$pkgver
scons prefix="$pkgdir"/usr install
}
Added: fix-wayland.patch
===================================================================
--- fix-wayland.patch (rev 0)
+++ fix-wayland.patch 2018-01-21 00:56:29 UTC (rev 284473)
@@ -0,0 +1,70 @@
+From 037c2e791cfca4114dc75d3077d1266c2506d71c Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+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:
More information about the arch-commits
mailing list