--- /dev/null
+Bug: https://bugs.gentoo.org/show_bug.cgi?id=612938
+
+From ae91dbad8c33b35ea564d235c8eba63adfcc0fef Mon Sep 17 00:00:00 2001
+From: Peter-Levine <plevine457@gmail.com>
+Date: Wed, 31 May 2017 04:49:36 -0400
+Subject: [PATCH] Don't allow throw() in destructors (#1182)
+
+---
+ toonz/sources/image/3gp/tiio_3gp_proxy.cpp | 2 --
+ toonz/sources/image/mov/tiio_mov_proxy.cpp | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/toonz/sources/image/3gp/tiio_3gp_proxy.cpp b/toonz/sources/image/3gp/tiio_3gp_proxy.cpp
+index d1bd79717..03140f695 100644
+--- a/toonz/sources/image/3gp/tiio_3gp_proxy.cpp
++++ b/toonz/sources/image/3gp/tiio_3gp_proxy.cpp
+@@ -138,8 +138,6 @@ TLevelWriter3gp::~TLevelWriter3gp() {
+ QString res;
+
+ stream << (msg << QString("$closeLW3gp") << m_id);
+- if (tipc::readMessage(stream, msg) != "ok")
+- throw TException("Unable to write file");
+ }
+
+ //------------------------------------------------------------------
+diff --git a/toonz/sources/image/mov/tiio_mov_proxy.cpp b/toonz/sources/image/mov/tiio_mov_proxy.cpp
+index 260bbb196..6be067c01 100644
+--- a/toonz/sources/image/mov/tiio_mov_proxy.cpp
++++ b/toonz/sources/image/mov/tiio_mov_proxy.cpp
+@@ -206,8 +206,6 @@ TLevelWriterMov::~TLevelWriterMov() {
+ QString res;
+
+ stream << (msg << QString("$closeLWMov") << m_id);
+- if (tipc::readMessage(stream, msg) != "ok")
+- throw TException("Unable to write file");
+ }
+
+ //------------------------------------------------------------------
--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="An open-source full-featured 2D animation creation software"
+HOMEPAGE="https://github.com/opentoonz/opentoonz"
+SRC_URI="https://github.com/opentoonz/opentoonz/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD libtiff"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ app-arch/lz4:=
+ >=dev-libs/boost-1.55.0:=
+ dev-libs/lzo:2=
+ >=dev-qt/qtcore-5.9:5
+ >=dev-qt/qtgui-5.9:5
+ >=dev-qt/qtmultimedia-5.9:5[widgets]
+ >=dev-qt/qtnetwork-5.9:5
+ >=dev-qt/qtopengl-5.9:5
+ >=dev-qt/qtprintsupport-5.9:5
+ >=dev-qt/qtscript-5.9:5
+ >=dev-qt/qtsvg-5.9:5
+ >=dev-qt/qtwidgets-5.9:5
+ >=dev-qt/qtxml-5.9:5
+ media-libs/freeglut:=
+ media-libs/freetype:2=
+ media-libs/glew:=
+ media-libs/libjpeg-turbo:=
+ >=media-libs/libmypaint-1.3.0
+ media-libs/libpng:=
+ media-libs/libsdl2:=
+ sci-libs/cblas-reference:=
+ >=sci-libs/superlu-4.1:=
+ sys-libs/zlib:=
+ virtual/libusb:=
+ virtual/opengl
+"
+DEPEND="
+ $RDEPEND
+ virtual/pkgconfig
+ dev-qt/linguist-tools:5
+"
+
+CMAKE_USE_DIR="${S}"/toonz/sources
+
+PATCHES=( "${FILESDIR}"/${P}-gcc6-no-throw-in-destructors.patch )
+
+src_configure()
+{
+ local mycmakeargs=(
+ -DTIFF_LIBRARY="${S}/thirdparty/tiff-4.0.3/libtiff/.libs/libtiff.a"
+ -DSUPERLU_INCLUDE_DIR="${EPREFIX%/}/usr/include/superlu"
+ -DLZO_INCLUDE_DIR="${EPREFIX%/}/usr/include/lzo"
+ -DCMAKE_SKIP_RPATH=ON
+ )
+
+ # The upstream uses their own modified libtiff
+ # See: https://github.com/opentoonz/opentoonz/blob/master/doc/how_to_build_linux.md#building-libtiff
+ cd thirdparty/tiff-4.0.3 || die
+ econf \
+ --with-pic \
+ --disable-jbig \
+ --enable-static \
+ --disable-shared
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cd "${S}"/thirdparty/tiff-4.0.3 || die
+ emake
+
+ cmake-utils_src_compile
+}
+
+pkg_postinst()
+{
+ elog "It is supposedly optional but some files are"
+ elog "actually required to run the executable properly."
+ elog
+ elog "The .config/OpenToonz/ directory in your home folder"
+ elog "will contain your settings, work and other files."
+ elog
+ elog "We need to create it from the command-line:"
+ elog
+ elog "$ mkdir -p \$HOME/.config/OpenToonz"
+ elog "$ cp -r /usr/share/opentoonz/stuff/ \$HOME/.config/OpenToonz/"
+}