Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libmypaint/files/, media-libs/libmypaint/
Date: Sun, 28 Apr 2019 18:53:44
Message-Id: 1556477582.8a6496a474e73efa519387bd81a9585820baec58.sping@gentoo
1 commit: 8a6496a474e73efa519387bd81a9585820baec58
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 28 18:50:20 2019 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 28 18:53:02 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a6496a4
7
8 media-libs/libmypaint: Move 1.3.0 to gegl:0.4
9
10 Closes: https://bugs.gentoo.org/682958
11 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
12 Package-Manager: Portage-2.3.65, Repoman-2.3.12
13
14 .../files/libmypaint-1.3.0-gegl-0.4.14.patch | 100 +++++++++++++++++++++
15 media-libs/libmypaint/libmypaint-1.3.0-r2.ebuild | 68 ++++++++++++++
16 2 files changed, 168 insertions(+)
17
18 diff --git a/media-libs/libmypaint/files/libmypaint-1.3.0-gegl-0.4.14.patch b/media-libs/libmypaint/files/libmypaint-1.3.0-gegl-0.4.14.patch
19 new file mode 100644
20 index 00000000000..d59cacb3a5d
21 --- /dev/null
22 +++ b/media-libs/libmypaint/files/libmypaint-1.3.0-gegl-0.4.14.patch
23 @@ -0,0 +1,100 @@
24 +From 068e5f7ecacf152a9872441fb2f67b8578448a5b Mon Sep 17 00:00:00 2001
25 +From: Sebastian Pipping <sebastian@×××××××.org>
26 +Date: Sun, 28 Apr 2019 20:24:05 +0200
27 +Subject: [PATCH] Depend on Gegl >=0.4.14 rather than 0.3.x
28 +
29 +Inspired by
30 +https://src.fedoraproject.org/rpms/libmypaint/raw/master/f/libmypaint-1.3.0-gegl04.patch
31 +
32 +Gegl commit introducing breaking change to GeglBufferIterator:
33 +https://gitlab.gnome.org/GNOME/gegl/commit/9dcd2cde63f95a080bf16a58c10e9ffbdd99aace
34 +---
35 + configure.ac | 4 ++--
36 + gegl/Makefile.am | 4 ++--
37 + gegl/libmypaint-gegl.pc.in | 2 +-
38 + gegl/mypaint-gegl-surface.c | 5 +++--
39 + 4 files changed, 8 insertions(+), 7 deletions(-)
40 +
41 +diff --git a/configure.ac b/configure.ac
42 +index 7a5b231..95473d0 100644
43 +--- a/configure.ac
44 ++++ b/configure.ac
45 +@@ -22,7 +22,7 @@ m4_define([libmypaint_version_full],
46 + [libmypaint_api_major().libmypaint_api_minor().libmypaint_api_micro()m4_bpatsubst(libmypaint_api_prerelease(), [^\(.\)], [-\1])])
47 +
48 + # Dependencies.
49 +-m4_define([gegl_required_version], [0.3])
50 ++m4_define([gegl_required_version], [0.4.14])
51 + m4_define([introspection_required_version], [1.32.0])
52 +
53 + AC_INIT([libmypaint],
54 +@@ -312,7 +312,7 @@ AC_ARG_ENABLE(gegl,
55 + )
56 +
57 + if eval "test x$enable_gegl = xyes"; then
58 +- PKG_CHECK_MODULES(GEGL, gegl-0.3 >= gegl_required_version)
59 ++ PKG_CHECK_MODULES(GEGL, gegl-0.4 >= gegl_required_version)
60 + fi
61 + AM_CONDITIONAL(ENABLE_GEGL, test "x$enable_gegl" = "xyes")
62 +
63 +diff --git a/gegl/Makefile.am b/gegl/Makefile.am
64 +index b45707d..5ef22c1 100644
65 +--- a/gegl/Makefile.am
66 ++++ b/gegl/Makefile.am
67 +@@ -11,7 +11,7 @@ AM_CPPFLAGS = \
68 + INTROSPECTION_GIRS =
69 + INTROSPECTION_SCANNER_ARGS = \
70 + --warn-all \
71 +- --pkg="gegl-0.3" \
72 ++ --pkg="gegl-0.4" \
73 + --pkg="glib-2.0" \
74 + --namespace="MyPaintGegl" \
75 + --nsversion="$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION)" \
76 +@@ -38,7 +38,7 @@ introspection_sources = \
77 + mypaint-gegl-surface.c
78 +
79 + MyPaintGegl-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir: libmypaint-gegl.la Makefile
80 +-MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 MyPaint-$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION) Gegl-0.3
81 ++MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 MyPaint-$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION) Gegl-0.4
82 + MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I. -I..
83 + MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_LIBS = libmypaint-gegl.la ../libmypaint.la
84 + MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_FILES = $(introspection_sources)
85 +diff --git a/gegl/libmypaint-gegl.pc.in b/gegl/libmypaint-gegl.pc.in
86 +index 75aa729..9184980 100644
87 +--- a/gegl/libmypaint-gegl.pc.in
88 ++++ b/gegl/libmypaint-gegl.pc.in
89 +@@ -6,6 +6,6 @@ includedir=@includedir@
90 + Name: libmypaint
91 + Description: MyPaint brush engine library, with GEGL integration.
92 + Version: @LIBMYPAINT_VERSION@
93 +-Requires: gegl-0.3 libmypaint
94 ++Requires: gegl-0.4 libmypaint
95 + Cflags: -I${includedir}/libmypaint-gegl
96 + Libs: -L${libdir} -lmypaint-gegl
97 +diff --git a/gegl/mypaint-gegl-surface.c b/gegl/mypaint-gegl-surface.c
98 +index 5c86d3c..e51bb5f 100644
99 +--- a/gegl/mypaint-gegl-surface.c
100 ++++ b/gegl/mypaint-gegl-surface.c
101 +@@ -77,8 +77,9 @@ tile_request_start(MyPaintTiledSurface *tiled_surface, MyPaintTileRequest *reque
102 + }
103 +
104 + if (buffer_is_native(self)) {
105 ++ const gint max_slots = 6; /* i.e. <0.4.14 internal GEGL_BUFFER_MAX_ITERATORS */
106 + GeglBufferIterator *iterator = gegl_buffer_iterator_new(self->buffer, &tile_bbox, 0, self->format,
107 +- read_write_flags, GEGL_ABYSS_NONE);
108 ++ read_write_flags, GEGL_ABYSS_NONE, max_slots);
109 +
110 + // Read out
111 + gboolean completed = gegl_buffer_iterator_next(iterator);
112 +@@ -88,7 +89,7 @@ tile_request_start(MyPaintTiledSurface *tiled_surface, MyPaintTileRequest *reque
113 + g_critical("Unable to get tile aligned access to GeglBuffer");
114 + request->buffer = NULL;
115 + } else {
116 +- request->buffer = (uint16_t *)(iterator->data[0]);
117 ++ request->buffer = (uint16_t *)(iterator->items[0].data);
118 + }
119 +
120 + // So we can finish the iterator in tile_request_end()
121 +--
122 +2.21.0
123 +
124
125 diff --git a/media-libs/libmypaint/libmypaint-1.3.0-r2.ebuild b/media-libs/libmypaint/libmypaint-1.3.0-r2.ebuild
126 new file mode 100644
127 index 00000000000..4b4cf2fa194
128 --- /dev/null
129 +++ b/media-libs/libmypaint/libmypaint-1.3.0-r2.ebuild
130 @@ -0,0 +1,68 @@
131 +# Copyright 1999-2019 Gentoo Authors
132 +# Distributed under the terms of the GNU General Public License v2
133 +
134 +EAPI=7
135 +PYTHON_COMPAT=( python2_7 )
136 +
137 +inherit autotools python-any-r1 xdg-utils toolchain-funcs
138 +
139 +MY_PV=${PV/_beta/-beta.}
140 +MY_P=${PN}-${MY_PV}
141 +
142 +DESCRIPTION="Library for making brushstrokes"
143 +HOMEPAGE="https://github.com/mypaint/libmypaint"
144 +SRC_URI="https://github.com/mypaint/libmypaint/releases/download/v${MY_PV}/${MY_P}.tar.xz"
145 +
146 +LICENSE="ISC"
147 +SLOT="0/0" # first soname component for subslot
148 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
149 +IUSE="+gegl introspection nls openmp"
150 +
151 +CDEPEND="
152 + dev-libs/glib:2
153 + dev-libs/json-c:=
154 + gegl? (
155 + media-libs/babl
156 + >=media-libs/gegl-0.4.14:0.4[introspection?]
157 + )
158 + introspection? ( >=dev-libs/gobject-introspection-1.32 )
159 + openmp? ( sys-devel/gcc:*[openmp] )
160 + nls? ( sys-devel/gettext )
161 + "
162 +DEPEND="${CDEPEND}
163 + ${PYTHON_DEPS}
164 + nls? ( dev-util/intltool )
165 + "
166 +RDEPEND="${CDEPEND}
167 + !<media-gfx/mypaint-1.2.1
168 + "
169 +
170 +S="${WORKDIR}"/${MY_P}
171 +
172 +PATCHES=(
173 + "${FILESDIR}"/${PN}-1.3.0-gegl-0.4.14.patch
174 +)
175 +
176 +src_prepare() {
177 + xdg_environment_reset
178 + default
179 + eautoreconf
180 +}
181 +
182 +src_configure() {
183 + tc-ld-disable-gold # bug 589266
184 + econf \
185 + --disable-debug \
186 + --disable-docs \
187 + $(use_enable gegl) \
188 + --disable-gperftools \
189 + $(use_enable nls i18n) \
190 + $(use_enable introspection) \
191 + $(use_enable openmp) \
192 + --disable-profiling
193 +}
194 +
195 +src_install() {
196 + default
197 + find "${D}" -name '*.la' -type f -delete || die
198 +}