From b2caf68fb8e431f4331e8ba39a99306917dd33d3 Mon Sep 17 00:00:00 2001 From: newbluemoon Date: Fri, 6 Aug 2021 09:51:27 +0200 Subject: [PATCH] synfigstudio: update to 1.4.2 --- .../patches/cflags-cxxflags.patch | 29 +++++++++++++++++++ .../synfigstudio/patches/fix-test-crash.patch | 19 ++++++++++++ srcpkgs/synfigstudio/template | 17 +++++------ 3 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/synfigstudio/patches/cflags-cxxflags.patch create mode 100644 srcpkgs/synfigstudio/patches/fix-test-crash.patch diff --git a/srcpkgs/synfigstudio/patches/cflags-cxxflags.patch b/srcpkgs/synfigstudio/patches/cflags-cxxflags.patch new file mode 100644 index 00000000000..d70d2a23f7f --- /dev/null +++ b/srcpkgs/synfigstudio/patches/cflags-cxxflags.patch @@ -0,0 +1,29 @@ +Prevent synfigstudio from filtering out the compiler’s '-g' option to produce debug +information. + +--- synfigstudio-1.4.2.orig/configure ++++ synfigstudio-1.4.2/configure +@@ -18015,8 +18015,8 @@ fi + ;; + no|*) + debug_flags="-DNDEBUG" +- CXXFLAGS="`echo $CXXFLAGS | sed 's:-g[a-z-]*\s::g' | sed 's:-g[a-z-]*$::'` $debug_flags" +- CFLAGS="`echo $CFLAGS | sed 's:-g[a-z-]*\s::g' | sed 's:-g[a-z-]*$::'` $debug_flags" ++ CFLAGS="$CFLAGS -DNDEBUG" ++ CXXFLAGS="$CXXFLAGS -DNDEBUG" + ;; + esac + +--- synfigstudio-1.4.2.orig/m4/subs.m4 ++++ synfigstudio-1.4.2/m4/subs.m4 +@@ -83,8 +83,8 @@ AC_DEFUN([AC_ARG_DEBUG], + ;; + no|*) + debug_flags="-DNDEBUG" +- CXXFLAGS="`echo $CXXFLAGS | sed 's:-g[[a-z-]]*\s::g' | sed 's:-g[[a-z-]]*$::'` $debug_flags" +- CFLAGS="`echo $CFLAGS | sed 's:-g[[a-z-]]*\s::g' | sed 's:-g[[a-z-]]*$::'` $debug_flags" ++ CXXFLAGS="$CXXFLAGS -DNDEBUG" ++ CFLAGS="$CFLAGS -DNDEBUG" + ;; + esac + diff --git a/srcpkgs/synfigstudio/patches/fix-test-crash.patch b/srcpkgs/synfigstudio/patches/fix-test-crash.patch new file mode 100644 index 00000000000..651b3bc245b --- /dev/null +++ b/srcpkgs/synfigstudio/patches/fix-test-crash.patch @@ -0,0 +1,19 @@ +Fix a crash when running tests. Source: +https://github.com/synfig/synfig/pull/2265 +https://github.com/synfig/synfig/commit/61a290b1aaf58366149662ae0ad224127711aea8 + +--- a/src/synfigapp/actions/layerduplicate.cpp 2021-07-12 17:45:50.000000000 +0200 ++++ b/src/synfigapp/actions/layerduplicate.cpp 2021-08-15 11:52:47.878894610 +0200 +@@ -417,7 +417,11 @@ + + auto cloned_layer = layer_pair.second; + +- for(auto iter=cloned_layer->dynamic_param_list().cbegin();iter!=cloned_layer->dynamic_param_list().cend();++iter) ++ // disconnect_dynamic_param/connect_dynamic_param can change dynamic_param_list() while iterating ++ // which makes iter invalid, so we create a copy of dynamic_param_list() first ++ auto param_list = cloned_layer->dynamic_param_list(); ++ ++ for (auto iter=param_list.cbegin();iter!=param_list.cend();++iter) + { + for (const auto& vn_pair : cloned_valuenode_map) { + if (iter->second == vn_pair.first) { diff --git a/srcpkgs/synfigstudio/template b/srcpkgs/synfigstudio/template index 3e40a99fb28..6c7e437732a 100644 --- a/srcpkgs/synfigstudio/template +++ b/srcpkgs/synfigstudio/template @@ -1,24 +1,21 @@ # Template file for 'synfigstudio' pkgname=synfigstudio -version=1.4.1 +version=1.4.2 revision=1 build_style=gnu-configure configure_args="--disable-update-mimedb" -hostmakedepends="pkg-config intltool gettext" -makedepends="ETL synfig-devel gtkmm-devel libltdl-devel boost-devel" +hostmakedepends="pkg-config intltool gettext synfig" +makedepends="ETL synfig-devel boost-devel gtkmm-devel libltdl-devel + libmagick-devel" short_desc="Vector based 2D animation studio" maintainer="newbluemoon " license="GPL-2.0-or-later" -homepage="http://www.synfig.org/" +homepage="https://www.synfig.org/" distfiles="https://github.com/synfig/synfig/releases/download/v${version}/synfigstudio-${version}.tar.gz" -checksum=af9a9b0064064907ae24a693b607dcba633a8a2cd45fa1357f61c035efd6020e +checksum=4e86d4d8def6675fc92855a411795cc4062a1669cda82535d18b48a68b4d5497 python_version=3 CXXFLAGS="-Wno-deprecated-copy -DHAVE_LOCALE_H=1" - -if [ -n "$CROSS_BUILD" ]; then - # uses synfig to create some icons - hostmakedepends+=" synfig" -fi +export DATADIRNAME=share synfigstudio-devel_package() { depends="${sourcepkg}>=${version}_${revision}"