mypaint: add compat patch for glib>=2.48
This commit is contained in:
parent
357c8f2f8e
commit
e07e41e24b
2 changed files with 69 additions and 10 deletions
64
srcpkgs/mypaint/patches/fix-glib-2.48-startup-crash.patch
Normal file
64
srcpkgs/mypaint/patches/fix-glib-2.48-startup-crash.patch
Normal file
|
@ -0,0 +1,64 @@
|
|||
From c03602f3d5456d59fccfc8ad7d41c8c6f1a6d593 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Chadwick <a.t.chadwick@gmail.com>
|
||||
Date: Sat, 2 Apr 2016 19:08:44 +0100
|
||||
Subject: [PATCH] Cherry-pick fixes for GLib 2.48 from master
|
||||
|
||||
This commit backports the following changes from master:
|
||||
|
||||
* dcfcffd1cbfeaa07dc9d2798fcdf713d5315d2ed
|
||||
* 11a128e801e5facb63e54dcbf626729cc15f5e84
|
||||
* a0ff39936a824f0677ce1dc075c77f0097edfae5
|
||||
|
||||
Addresses mypaint/mypaint#634.
|
||||
---
|
||||
lib/glib.py | 15 ++++++++++-----
|
||||
1 file changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git lib/glib.py lib/glib.py
|
||||
index 8fb203d..ca4f34b 100644
|
||||
--- lib/glib.py
|
||||
+++ lib/glib.py
|
||||
@@ -1,5 +1,5 @@
|
||||
# This file is part of MyPaint.
|
||||
-# Copyright (C) 2015 by Andrew Chadwick <a.t.chadwick@gmail.com>
|
||||
+# Copyright (C) 2015-2016 by the MyPaint Development Team.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -19,11 +19,12 @@
|
||||
## Imports
|
||||
|
||||
import sys
|
||||
-from logging import getLogger
|
||||
-logger = getLogger(__name__)
|
||||
+import logging
|
||||
|
||||
from gi.repository import GLib
|
||||
|
||||
+logger = logging.getLogger(__name__)
|
||||
+
|
||||
|
||||
## File path getter functions
|
||||
|
||||
@@ -35,7 +36,6 @@ def filename_to_unicode(opsysstring):
|
||||
:returns: the converted filename
|
||||
:rtype: unicode
|
||||
|
||||
- >>> from gi.repository import GLib
|
||||
>>> filename_to_unicode('/ascii/only/path')
|
||||
u'/ascii/only/path'
|
||||
>>> filename_to_unicode(None) is None
|
||||
@@ -54,7 +54,12 @@ def filename_to_unicode(opsysstring):
|
||||
# Other systems are dependent in opaque ways on the environment.
|
||||
if not isinstance(opsysstring, str):
|
||||
raise TypeError("Argument must be bytes")
|
||||
- ustring = GLib.filename_to_utf8(opsysstring, -1, 0, 0)
|
||||
+ # This function's annotation seems to vary quite a bit.
|
||||
+ # See https://github.com/mypaint/mypaint/issues/634
|
||||
+ try:
|
||||
+ ustring, _, _ = GLib.filename_to_utf8(opsysstring, -1)
|
||||
+ except TypeError:
|
||||
+ ustring = GLib.filename_to_utf8(opsysstring, -1, 0, 0)
|
||||
if ustring is None:
|
||||
raise UnicodeDecodeError(
|
||||
"GLib failed to convert %r to a UTF-8 string. "
|
|
@ -1,25 +1,20 @@
|
|||
# Template file for 'mypaint'
|
||||
pkgname=mypaint
|
||||
version=1.2.0
|
||||
revision=3
|
||||
hostmakedepends="unzip scons swig pkg-config"
|
||||
revision=4
|
||||
hostmakedepends="scons swig pkg-config"
|
||||
makedepends="libgomp-devel json-c-devel python-numpy libglib-devel libpng-devel
|
||||
lcms2-devel gtk+3-devel python-gobject-devel"
|
||||
depends="pygtk python-numpy python-gobject"
|
||||
pycompile_version="2.7"
|
||||
pycompile_dirs="/usr/share/mypaint"
|
||||
short_desc="Graphics application for digital painters"
|
||||
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
|
||||
license="GPL-2"
|
||||
homepage="http://mypaint.org"
|
||||
distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz"
|
||||
checksum=b6f0ddcbb61535a712c9214ac88a2d624ddc998a1d2b47c11c2e9b09b461c041
|
||||
wrksrc=${pkgname}-${version}
|
||||
distfiles="https://github.com/mypaint/mypaint/releases/download/v${version}/mypaint-${version}.tar.xz"
|
||||
checksum=cdab33dd0c146cf678c97bcdd44e561f97a0aec40421b8c6785a74b33b9728e2
|
||||
|
||||
pre_build() {
|
||||
${XBPS_FETCH_CMD} https://github.com/mypaint/libmypaint/archive/master.zip
|
||||
unzip master.zip
|
||||
mv libmypaint-master/* brushlib/
|
||||
}
|
||||
do_build() {
|
||||
scons ${makejobs} enable_openmp=1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue