summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2017-06-19 23:05:50 +0200
committer Matteo Bernardini2020-11-28 22:10:35 +0100
commitcba1fb6112c2098a0f95b4623c3aa83d70fc2780 (patch)
treee49d500fc18f0a190dacc2c7b44087be8cc905d4
parent08a6482554287f94acc3ad6009351a8ce0f7f9ab (diff)
downloadslackbuilds-zinnia.tar.gz
misc/zinnia: Added a patch for gcc >= 6.x.zinnia
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--misc/zinnia/zinnia-fixes-gcc6-compile.patch22
-rw-r--r--misc/zinnia/zinnia.SlackBuild3
2 files changed, 25 insertions, 0 deletions
diff --git a/misc/zinnia/zinnia-fixes-gcc6-compile.patch b/misc/zinnia/zinnia-fixes-gcc6-compile.patch
new file mode 100644
index 0000000000..848f306edb
--- /dev/null
+++ b/misc/zinnia/zinnia-fixes-gcc6-compile.patch
@@ -0,0 +1,22 @@
+Index: zinnia-0.06/trainer.cpp
+===================================================================
+--- zinnia-0.06.orig/trainer.cpp
++++ zinnia-0.06/trainer.cpp
+@@ -93,7 +93,7 @@ class TrainerImpl: public Trainer {
+
+ public:
+ bool add(const Character &character) {
+- const std::string y = character.value();
++ std::string y = character.value();
+ CHECK_FALSE(!y.empty()) << "input character is empty";
+ Features features;
+ CHECK_FALSE(features.read(character)) << "cannot read character: " << y;
+@@ -103,7 +103,7 @@ class TrainerImpl: public Trainer {
+ if (!fn) {
+ return false;
+ }
+- x_.push_back(std::make_pair<std::string, FeatureNode *>(y, fn));
++ x_.push_back(std::make_pair(y, fn));
+ return true;
+ }
+
diff --git a/misc/zinnia/zinnia.SlackBuild b/misc/zinnia/zinnia.SlackBuild
index efd04acd51..62b3c033e4 100644
--- a/misc/zinnia/zinnia.SlackBuild
+++ b/misc/zinnia/zinnia.SlackBuild
@@ -70,6 +70,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Thanks to fedora for this patch
+patch -p1 < $CWD/zinnia-fixes-gcc6-compile.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \