media-libs/libmypaint: 1.4.0
authorSebastian Pipping <sping@gentoo.org>
Mon, 21 Oct 2019 14:47:37 +0000 (16:47 +0200)
committerSebastian Pipping <sping@gentoo.org>
Mon, 21 Oct 2019 14:54:44 +0000 (16:54 +0200)
Closes: https://bugs.gentoo.org/696852
Thanks to Lars Wendler (polynomial-c) and rezso!
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
Package-Manager: Portage-2.3.68, Repoman-2.3.16

media-libs/libmypaint/Manifest
media-libs/libmypaint/files/libmypaint-1.4.0-drop-libmypaint-gegl-versioning.patch [new file with mode: 0644]
media-libs/libmypaint/files/libmypaint-1.4.0-gegl-0.4.14.patch [new file with mode: 0644]
media-libs/libmypaint/libmypaint-1.4.0.ebuild [new file with mode: 0644]

index 8fa61d0150280960c757c1899629882ac654733d..8cf927365f9dab6e91c8d041f0187e28e3eb73c4 100644 (file)
@@ -1,2 +1,3 @@
 DIST libmypaint-1.3.0-beta.1.tar.xz 421424 BLAKE2B 3ca1718035de301ffe037ab25b5e6e7c48f92a31ba337b6652977cae71d94e2fa11f01f81b87598e71392d51e13747e82d813d35e981753c85674f0f8b5bb167 SHA512 ae98ec8947d521749d82bc1e683efcace2da7e3c8b8453e79e5191d65225f0963394344628d646947f79b141503d268277d26ce2eeaf482bbe24f1bfb1d103fa
 DIST libmypaint-1.3.0.tar.xz 438160 BLAKE2B a018ba2dc2b2cf2f771e871a0cb769887d962c18f83315d1c77864f567ae69aa16a1d55b770f46527990995f0dc940516371485d6f3d4f3cc332623fc408c248 SHA512 553eeb3439ffd0c013e33254a16334242583b8bab76d1a3e937f3ed1d7e05a832c6eb26acd7220dce20c6a7d997c32afe828202ce48e25a5fe57b67efd853fcf
+DIST libmypaint-1.4.0.tar.xz 441596 BLAKE2B d8c55f8dfedbb5cc07abe5c38c935abecf38f8e626b7fec83d7f7a29acdc722ededcd729f31e13e655242250f1d46cf44ca0473899b0de9510b062b123a711cb SHA512 c549a0b8f02976f7863c5ff49d5f16b5c3eae3e6e9e8803fef833edf78cc2a7413dd8dd751ed560c79d2527e0a54b462a92bb8059bcf69271654b2629f583c19
diff --git a/media-libs/libmypaint/files/libmypaint-1.4.0-drop-libmypaint-gegl-versioning.patch b/media-libs/libmypaint/files/libmypaint-1.4.0-drop-libmypaint-gegl-versioning.patch
new file mode 100644 (file)
index 0000000..d41079c
--- /dev/null
@@ -0,0 +1,58 @@
+From 1b41e786dc0772528b873b6f5bcee64147bfec04 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Thu, 17 Oct 2019 14:44:34 +0200
+Subject: [PATCH] Revert "Not all of libmypaint-gegl was versionned."
+
+This reverts commit 5e0290c5fb8a175a9f0dd4c6897ff234361c321f.
+
+See https://github.com/mypaint/libmypaint/issues/144
+---
+ gegl/Makefile.am | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/gegl/Makefile.am b/gegl/Makefile.am
+index 79f66fa..b45707d 100644
+--- a/gegl/Makefile.am
++++ b/gegl/Makefile.am
+@@ -37,10 +37,10 @@ introspection_sources = \
+       ../glib/mypaint-gegl-glib.c     \
+       mypaint-gegl-surface.c
+-MyPaintGegl-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir: libmypaint-gegl-@LIBMYPAINT_API_PLATFORM_VERSION@.la Makefile
++MyPaintGegl-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir: libmypaint-gegl.la Makefile
+ MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 MyPaint-$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION) Gegl-0.3
+ MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I. -I..
+-MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_LIBS = libmypaint-gegl-@LIBMYPAINT_API_PLATFORM_VERSION@.la ../libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.la
++MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_LIBS = libmypaint-gegl.la ../libmypaint.la
+ MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_FILES = $(introspection_sources)
+ INTROSPECTION_GIRS += MyPaintGegl-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir
+@@ -56,10 +56,10 @@ endif # HAVE_INTROSPECTION
+ ## pkg-config file ##
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = libmypaint-gegl-@LIBMYPAINT_API_PLATFORM_VERSION@.pc
++pkgconfig_DATA = libmypaint-gegl.pc
+ ## libmypaint-gegl ##
+-lib_LTLIBRARIES = libmypaint-gegl-@LIBMYPAINT_API_PLATFORM_VERSION@.la
++lib_LTLIBRARIES = libmypaint-gegl.la
+ libmypaint_gegl_publicdir = $(includedir)/libmypaint-gegl
+@@ -70,9 +70,9 @@ LIBMYPAINT_GEGL_SOURCES = \
+       ../glib/mypaint-gegl-glib.c     \
+       mypaint-gegl-surface.c
+-libmypaint_gegl_@LIBMYPAINT_API_PLATFORM_VERSION@_la_SOURCES = $(libmypaint_gegl_public_HEADERS) $(LIBMYPAINT_GEGL_SOURCES)
++libmypaint_gegl_la_SOURCES = $(libmypaint_gegl_public_HEADERS) $(LIBMYPAINT_GEGL_SOURCES)
+-libmypaint_gegl_@LIBMYPAINT_API_PLATFORM_VERSION@_la_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS) $(GEGL_CFLAGS)
+-libmypaint_gegl_@LIBMYPAINT_API_PLATFORM_VERSION@_la_LIBADD = $(top_builddir)/libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.la $(GEGL_LIBS)
++libmypaint_gegl_la_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS) $(GEGL_CFLAGS)
++libmypaint_gegl_la_LIBADD = $(top_builddir)/libmypaint.la $(GEGL_LIBS)
+ endif # enable_gegl
+-- 
+2.23.0
+
diff --git a/media-libs/libmypaint/files/libmypaint-1.4.0-gegl-0.4.14.patch b/media-libs/libmypaint/files/libmypaint-1.4.0-gegl-0.4.14.patch
new file mode 100644 (file)
index 0000000..6855d80
--- /dev/null
@@ -0,0 +1,99 @@
+From 9e091ea6f3d818748898a9c7a3d6660f5c807027 Mon Sep 17 00:00:00 2001
+From: rezso <rezso@rezso.net>
+Date: Thu, 17 Oct 2019 14:32:46 +0200
+Subject: [PATCH] Require gegl >=0.4.14 rather than 0.3.x
+
+---
+ configure.ac                | 4 ++--
+ gegl/Makefile.am            | 4 ++--
+ gegl/libmypaint-gegl.pc.in  | 2 +-
+ gegl/mypaint-gegl-surface.c | 8 ++++++++
+ 4 files changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a17c0a0..22c2e3e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,7 @@ m4_define([libmypaint_version_full],
+           [libmypaint_api_major().libmypaint_api_minor().libmypaint_api_micro()m4_bpatsubst(libmypaint_api_prerelease(), [^\(.\)], [-\1])])
+ # Dependencies.
+-m4_define([gegl_required_version], [0.3])
++m4_define([gegl_required_version], [0.4.14])
+ m4_define([introspection_required_version], [1.32.0])
+ AC_INIT([libmypaint],
+@@ -249,7 +249,7 @@ AC_ARG_ENABLE(gegl,
+ )
+ if eval "test x$enable_gegl = xyes"; then
+-  PKG_CHECK_MODULES(GEGL, gegl-0.3 >= gegl_required_version)
++  PKG_CHECK_MODULES(GEGL, gegl-0.4 >= gegl_required_version)
+ fi
+ AM_CONDITIONAL(ENABLE_GEGL, test "x$enable_gegl" = "xyes")
+diff --git a/gegl/Makefile.am b/gegl/Makefile.am
+index b45707d..5ef22c1 100644
+--- a/gegl/Makefile.am
++++ b/gegl/Makefile.am
+@@ -11,7 +11,7 @@ AM_CPPFLAGS = \
+ INTROSPECTION_GIRS =
+ INTROSPECTION_SCANNER_ARGS = \
+     --warn-all \
+-    --pkg="gegl-0.3" \
++    --pkg="gegl-0.4" \
+     --pkg="glib-2.0" \
+     --namespace="MyPaintGegl" \
+     --nsversion="$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION)" \
+@@ -38,7 +38,7 @@ introspection_sources = \
+       mypaint-gegl-surface.c
+ MyPaintGegl-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir: libmypaint-gegl.la Makefile
+-MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 MyPaint-$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION) Gegl-0.3
++MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 MyPaint-$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION) Gegl-0.4
+ MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I. -I..
+ MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_LIBS = libmypaint-gegl.la ../libmypaint.la
+ MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_FILES = $(introspection_sources)
+diff --git a/gegl/libmypaint-gegl.pc.in b/gegl/libmypaint-gegl.pc.in
+index 75aa729..9184980 100644
+--- a/gegl/libmypaint-gegl.pc.in
++++ b/gegl/libmypaint-gegl.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: libmypaint
+ Description: MyPaint brush engine library, with GEGL integration.
+ Version: @LIBMYPAINT_VERSION@
+-Requires: gegl-0.3 libmypaint
++Requires: gegl-0.4 libmypaint
+ Cflags: -I${includedir}/libmypaint-gegl
+ Libs: -L${libdir} -lmypaint-gegl
+diff --git a/gegl/mypaint-gegl-surface.c b/gegl/mypaint-gegl-surface.c
+index 5c86d3c..d58ccc9 100644
+--- a/gegl/mypaint-gegl-surface.c
++++ b/gegl/mypaint-gegl-surface.c
+@@ -78,7 +78,11 @@ tile_request_start(MyPaintTiledSurface *tiled_surface, MyPaintTileRequest *reque
+     if (buffer_is_native(self)) {
+         GeglBufferIterator *iterator = gegl_buffer_iterator_new(self->buffer, &tile_bbox, 0, self->format,
++#if GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION == 4 && GEGL_MICRO_VERSION >= 14
++                                      read_write_flags, GEGL_ABYSS_NONE, 8);
++#else
+                                       read_write_flags, GEGL_ABYSS_NONE);
++#endif
+         // Read out
+         gboolean completed = gegl_buffer_iterator_next(iterator);
+@@ -88,7 +92,11 @@ tile_request_start(MyPaintTiledSurface *tiled_surface, MyPaintTileRequest *reque
+             g_critical("Unable to get tile aligned access to GeglBuffer");
+             request->buffer = NULL;
+         } else {
++#if GEGL_MAJOR_VERSION == 0 && GEGL_MINOR_VERSION == 4 && GEGL_MICRO_VERSION >= 14
++            request->buffer = (uint16_t *)(iterator->items[0].data);
++#else
+             request->buffer = (uint16_t *)(iterator->data[0]);
++#endif
+         }
+         // So we can finish the iterator in tile_request_end()
+-- 
+2.23.0
+
diff --git a/media-libs/libmypaint/libmypaint-1.4.0.ebuild b/media-libs/libmypaint/libmypaint-1.4.0.ebuild
new file mode 100644 (file)
index 0000000..da0fb5f
--- /dev/null
@@ -0,0 +1,69 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools python-any-r1 xdg-utils toolchain-funcs
+
+MY_PV=${PV/_beta/-beta.}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Library for making brushstrokes"
+HOMEPAGE="https://github.com/mypaint/libmypaint"
+SRC_URI="https://github.com/mypaint/libmypaint/releases/download/v${MY_PV}/${MY_P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0/0"  # first soname component for subslot
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gegl introspection nls openmp"
+
+CDEPEND="
+       dev-libs/glib:2
+       dev-libs/json-c:=
+       gegl? (
+               media-libs/babl
+               >=media-libs/gegl-0.4.14:0.4[introspection?]
+       )
+       introspection? ( >=dev-libs/gobject-introspection-1.32 )
+       openmp? ( sys-devel/gcc:*[openmp] )
+       nls? ( sys-devel/gettext )
+       "
+DEPEND="${CDEPEND}
+       ${PYTHON_DEPS}
+       nls? ( dev-util/intltool )
+       "
+RDEPEND="${CDEPEND}
+       !<media-gfx/mypaint-1.2.1
+       "
+
+S="${WORKDIR}"/${MY_P}
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.4.0-drop-libmypaint-gegl-versioning.patch
+       "${FILESDIR}"/${PN}-1.4.0-gegl-0.4.14.patch
+)
+
+src_prepare() {
+       xdg_environment_reset
+       default
+       eautoreconf
+}
+
+src_configure() {
+       tc-ld-disable-gold  # bug 589266
+       econf \
+                       --disable-debug \
+                       --disable-docs \
+                       $(use_enable gegl) \
+                       --disable-gperftools \
+                       $(use_enable nls i18n) \
+                       $(use_enable introspection) \
+                       $(use_enable openmp) \
+                       --disable-profiling
+}
+
+src_install() {
+       default
+       find "${D}" -name '*.la' -type f -delete || die
+}