summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroen <eroen-overlay@occam.eroen.eu>2018-04-06 19:09:20 +0200
committerErik Moen <eroen-overlay@occam.eroen.eu>2019-08-28 19:26:46 +0200
commite92044fafd4838d845cbc08093d9831adadd4174 (patch)
treed0a86601d084da594f1cb8b88a9a5fbd10ae0394
parentETL-1.2.1 - bump (diff)
downloaderoen-e92044fafd4838d845cbc08093d9831adadd4174.tar.gz
eroen-e92044fafd4838d845cbc08093d9831adadd4174.tar.bz2
eroen-e92044fafd4838d845cbc08093d9831adadd4174.zip
synfig-1.2.1 - WIP new ebuild
Signed-off-by: Erik Moen <eroen-overlay@occam.eroen.eu>
-rw-r--r--media-gfx/synfig/Manifest1
-rw-r--r--media-gfx/synfig/files/01-workaround-to-implement.patch67
-rw-r--r--media-gfx/synfig/files/02-fix-magickcore-s-exceptioninfo-0.patch117
-rw-r--r--media-gfx/synfig/files/series3
-rw-r--r--media-gfx/synfig/metadata.xml13
-rw-r--r--media-gfx/synfig/synfig-1.2.1.ebuild79
6 files changed, 280 insertions, 0 deletions
diff --git a/media-gfx/synfig/Manifest b/media-gfx/synfig/Manifest
new file mode 100644
index 0000000..8e2ed81
--- /dev/null
+++ b/media-gfx/synfig/Manifest
@@ -0,0 +1 @@
+DIST synfig-1.2.1.tar.gz 4913740 BLAKE2B 17d217ca5560132d08a468434b83c0334899350e876f647395fa7f0c01fb2b9d54dfc5d4e75e0926bf73e04afa5c9e197d7eb8f0c3b12ca8ac5ace8c4eac1d33 SHA512 90a022824027a7eefb87f64bbe8130882d0db73c41172b99e4de81ded1e0a804787ef99a40a8583c9e51125de0770024b87bb7b65cfff9bd812618deb389e095
diff --git a/media-gfx/synfig/files/01-workaround-to-implement.patch b/media-gfx/synfig/files/01-workaround-to-implement.patch
new file mode 100644
index 0000000..2a846f4
--- /dev/null
+++ b/media-gfx/synfig/files/01-workaround-to-implement.patch
@@ -0,0 +1,67 @@
+Workaround to implement MagickCore's hidden InitializeExceptionInfo() method
+
+From: Matthew White <mehw.is.me@inventati.org>
+
+Since MagickCore version 7 deprecated methods have been removed.
+
+* synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp: Define
+ MagicCore's InitializeExceptionInfo() method, which indirectly calls
+ the hidden InitializeExceptionInfo() method.
+* synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
+ (copy_image_list, ~magickpp_trgt): Call InitializeExceptionInfo()
+ rather than the deprecated GetExceptionInfo() method.
+
+References
+==========
+- GetExceptionInfo()
+ http://legacy.imagemagick.org/api/MagickCore/deprecate_8c.html#a7d788a94491285066ede5492babe205d
+- InitializeExceptionInfo()
+ http://legacy.imagemagick.org/api/MagickCore/exception_8c.html#aad9984b1b0d45c9fbac8f16a6192ef8f
+ http://www.imagemagick.org/api/MagickCore/exception_8c.html#aad9984b1b0d45c9fbac8f16a6192ef8f
+---
+ .../src/modules/mod_magickpp/trgt_magickpp.cpp | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
+index 7e537c9e7..312c5f3ed 100644
+--- a/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
++++ b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
+@@ -54,6 +54,20 @@ SYNFIG_TARGET_SET_CVS_ID(magickpp_trgt,"$Id$");
+
+ /* === M E T H O D S ======================================================= */
+
++/*
++ * WORKAROUND
++ *
++ * Mimics the hidden MagickCore's InitializeExceptionInfo() method.
++ */
++namespace MagickCore {
++static void InitializeExceptionInfo(ExceptionInfo *exception)
++{
++ MagickCore::ExceptionInfo* exceptionInfo = AcquireExceptionInfo();
++ *exception = *exceptionInfo; // copy assignment, ExceptionInfo is a struct
++ MagickCore::DestroyExceptionInfo(exceptionInfo);
++}
++}
++
+ template <class Container>
+ MagickCore::Image* copy_image_list(Container& container)
+ {
+@@ -61,7 +75,7 @@ MagickCore::Image* copy_image_list(Container& container)
+ MagickCore::Image* previous = 0;
+ MagickCore::Image* first = NULL;
+ MagickCore::ExceptionInfo exceptionInfo;
+- MagickCore::GetExceptionInfo(&exceptionInfo);
++ MagickCore::InitializeExceptionInfo(&exceptionInfo);
+ for (Iter iter = container.begin(); iter != container.end(); ++iter)
+ {
+ MagickCore::Image* current;
+@@ -89,7 +103,7 @@ MagickCore::Image* copy_image_list(Container& container)
+ magickpp_trgt::~magickpp_trgt()
+ {
+ MagickCore::ExceptionInfo exceptionInfo;
+- MagickCore::GetExceptionInfo(&exceptionInfo);
++ MagickCore::InitializeExceptionInfo(&exceptionInfo);
+
+ try
+ {
diff --git a/media-gfx/synfig/files/02-fix-magickcore-s-exceptioninfo-0.patch b/media-gfx/synfig/files/02-fix-magickcore-s-exceptioninfo-0.patch
new file mode 100644
index 0000000..cc433c4
--- /dev/null
+++ b/media-gfx/synfig/files/02-fix-magickcore-s-exceptioninfo-0.patch
@@ -0,0 +1,117 @@
+Fix MagickCore's exceptionInfo implementation
+
+From: Matthew White <mehw.is.me@inventati.org>
+
+Since MagickCore version 7 deprecated methods have been removed.
+
+* synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
+ (copy_image_list, ~magickpp_trgt): Rather than calling MagickCore's
+ GetExceptionInfo() deprecated method (removed in MagickCore version
+ 7), call AcquireExceptionInfo() and DestroyExceptionInfo() to init
+ and then clean exceptionInfo. Implement exceptionInfo as a pointer.
+---
+ .../src/modules/mod_magickpp/trgt_magickpp.cpp | 32 ++++++--------------
+ 1 file changed, 9 insertions(+), 23 deletions(-)
+
+diff --git a/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
+index 312c5f3ed..8b4c00b57 100644
+--- a/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
++++ b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp
+@@ -54,35 +54,20 @@ SYNFIG_TARGET_SET_CVS_ID(magickpp_trgt,"$Id$");
+
+ /* === M E T H O D S ======================================================= */
+
+-/*
+- * WORKAROUND
+- *
+- * Mimics the hidden MagickCore's InitializeExceptionInfo() method.
+- */
+-namespace MagickCore {
+-static void InitializeExceptionInfo(ExceptionInfo *exception)
+-{
+- MagickCore::ExceptionInfo* exceptionInfo = AcquireExceptionInfo();
+- *exception = *exceptionInfo; // copy assignment, ExceptionInfo is a struct
+- MagickCore::DestroyExceptionInfo(exceptionInfo);
+-}
+-}
+-
+ template <class Container>
+ MagickCore::Image* copy_image_list(Container& container)
+ {
+ typedef typename Container::iterator Iter;
+ MagickCore::Image* previous = 0;
+ MagickCore::Image* first = NULL;
+- MagickCore::ExceptionInfo exceptionInfo;
+- MagickCore::InitializeExceptionInfo(&exceptionInfo);
++ MagickCore::ExceptionInfo* exceptionInfo = MagickCore::AcquireExceptionInfo();
+ for (Iter iter = container.begin(); iter != container.end(); ++iter)
+ {
+ MagickCore::Image* current;
+
+ try
+ {
+- current = CloneImage(iter->image(), 0, 0, Magick::MagickTrue, &exceptionInfo);
++ current = CloneImage(iter->image(), 0, 0, Magick::MagickTrue, exceptionInfo);
+
+ if (!first) first = current;
+
+@@ -97,13 +82,13 @@ MagickCore::Image* copy_image_list(Container& container)
+ }
+ }
+
++ exceptionInfo = MagickCore::DestroyExceptionInfo(exceptionInfo);
+ return first;
+ }
+
+ magickpp_trgt::~magickpp_trgt()
+ {
+- MagickCore::ExceptionInfo exceptionInfo;
+- MagickCore::InitializeExceptionInfo(&exceptionInfo);
++ MagickCore::ExceptionInfo* exceptionInfo = MagickCore::AcquireExceptionInfo();
+
+ try
+ {
+@@ -117,7 +102,7 @@ magickpp_trgt::~magickpp_trgt()
+ image.fileName(filename);
+ try
+ {
+- SetImageInfo(image.imageInfo(),Magick::MagickTrue,&exceptionInfo);
++ SetImageInfo(image.imageInfo(),Magick::MagickTrue,exceptionInfo);
+ can_adjoin = image.adjoin();
+ }
+ catch(Magick::Warning warning) {
+@@ -151,7 +136,7 @@ magickpp_trgt::~magickpp_trgt()
+ synfig::info("removing duplicate frames");
+ try
+ {
+- RemoveDuplicateLayers(&image_list, &exceptionInfo);
++ RemoveDuplicateLayers(&image_list, exceptionInfo);
+ }
+ catch(Magick::Warning warning) {
+ synfig::warning("exception '%s'", warning.what());
+@@ -163,7 +148,7 @@ magickpp_trgt::~magickpp_trgt()
+ synfig::info("optimizing layers");
+ try
+ {
+- image_list = OptimizeImageLayers(image_list,&exceptionInfo);
++ image_list = OptimizeImageLayers(image_list,exceptionInfo);
+ }
+ catch(Magick::Warning warning) {
+ synfig::warning("exception '%s'", warning.what());
+@@ -175,7 +160,7 @@ magickpp_trgt::~magickpp_trgt()
+ synfig::info("optimizing layer transparency");
+ try
+ {
+- OptimizeImageTransparency(image_list,&exceptionInfo);
++ OptimizeImageTransparency(image_list,exceptionInfo);
+ }
+ catch(Magick::Warning warning) {
+ synfig::warning("exception '%s'", warning.what());
+@@ -217,6 +202,7 @@ magickpp_trgt::~magickpp_trgt()
+ if (buffer1 != NULL) delete [] buffer1;
+ if (buffer2 != NULL) delete [] buffer2;
+ if (color_buffer != NULL) delete [] color_buffer;
++ exceptionInfo = MagickCore::DestroyExceptionInfo(exceptionInfo);
+ }
+
+ bool
diff --git a/media-gfx/synfig/files/series b/media-gfx/synfig/files/series
new file mode 100644
index 0000000..e8ffa85
--- /dev/null
+++ b/media-gfx/synfig/files/series
@@ -0,0 +1,3 @@
+# This series applies on GIT commit 113dd7740964d467ebc09a35189097d56c13280b
+01-workaround-to-implement.patch
+02-fix-magickcore-s-exceptioninfo-0.patch
diff --git a/media-gfx/synfig/metadata.xml b/media-gfx/synfig/metadata.xml
new file mode 100644
index 0000000..45bfd1a
--- /dev/null
+++ b/media-gfx/synfig/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>eroen-overlay@occam.eroen.eu</email>
+ <name>eroen</name>
+ </maintainer>
+ <longdescription lang="en">
+ </longdescription>
+ <upstream>
+ <remote-id type="github">synfig/synfig</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/synfig/synfig-1.2.1.ebuild b/media-gfx/synfig/synfig-1.2.1.ebuild
new file mode 100644
index 0000000..263639b
--- /dev/null
+++ b/media-gfx/synfig/synfig-1.2.1.ebuild
@@ -0,0 +1,79 @@
+# By eroen <eroen-overlay@occam.eroen.eu>, 2018
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Vector animation renderer"
+HOMEPAGE="https://www.synfig.org"
+SRC_URI="mirror://sourceforge/synfig/$P.tar.gz"
+LICENSE="GPL-2+"
+
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-cpp/glibmm-2.24.2:2
+ dev-cpp/libxmlpp:2.6
+ >=x11-libs/cairo-1.12.0
+ dev-cpp/cairomm
+ x11-libs/pango
+ dev-libs/libsigc++:2
+ >=dev-libs/boost-1.53.0
+ sci-libs/fftw:3.0
+ media-libs/mlt
+ media-libs/libpng:0
+ media-libs/libmng
+ "
+DEPEND="${DEPEND}
+ >=dev-cpp/ETL-1.2.1"
+
+src_prepare() {
+ # imagemagick-7 compatibility:
+ eapply -p2 "$FILESDIR"/01-workaround-to-implement.patch\
+ "$FILESDIR"/02-fix-magickcore-s-exceptioninfo-0.patch
+
+ default
+
+ # build system strips away -g* and -O* flags
+ sed -e '/CXXFLAGS=.*debug_flags/s@`.*`@$CXXFLAGS@' \
+ -e '/CFLAGS=.*debug_flags/s@`.*`@$CFLAGS@' \
+ -e '/CXXFLAGS=.*optimization_flags/d' \
+ -e '/CFLAGS=.*optimization_flags/d' \
+ -i m4/subs.m4 || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # default off:
+ #--enable-half=no
+ #--enable-layer-profiling=no
+ #--with-vimage=no
+ #--with-libavcodec=no
+ #--with-opengl=no
+
+ econf \
+ --without-imagemagick \
+ --with-magickpp \
+ --without-ffmpeg \
+ --without-libdv \
+ --without-freetype \
+ --without-fontconfig \
+ --without-openexr \
+ --without-jpeg
+
+ ## fontconfig automagic when enabled
+ ## openexr automagic when enabled
+ ## opencl wtf?
+ ## png automagic
+ ## mng automagic
+ ## jpeg automagic when enabled
+
+ # magickpp: configure explodes when disabled
+}