From 9aa12d66899349d3da0690156bf875bf93a62ec8 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Sun, 27 Feb 2022 19:20:08 +0100 Subject: [PATCH] academic/ghemical: Fix build. Signed-off-by: Matteo Bernardini --- academic/ghemical/fix_clang_ftbfs.patch | 37 +++++++++++++++++++++++++ academic/ghemical/ghemical.SlackBuild | 3 ++ 2 files changed, 40 insertions(+) create mode 100644 academic/ghemical/fix_clang_ftbfs.patch diff --git a/academic/ghemical/fix_clang_ftbfs.patch b/academic/ghemical/fix_clang_ftbfs.patch new file mode 100644 index 0000000000..af3fd4f099 --- /dev/null +++ b/academic/ghemical/fix_clang_ftbfs.patch @@ -0,0 +1,37 @@ +Description: Fix FTBFS with clang instead of gcc +Bug-Debian: https://bugs.debian.org/756440 +Author: Alexander +Last-Update: 2014-07-30 +--- a/src/project.h ++++ b/src/project.h +@@ -122,6 +122,14 @@ + graphical user interface. + */ + ++class project; ++ ++bool ReadGPR_OLD(project &, istream &, bool, bool = false); ///< this is for the very old version. ++bool ReadGPR_v100(project &, istream &, bool, bool = false); ///< this is for the version 1.00. ++bool ReadGPR_v110(project &, istream &, bool, bool = false); ///< this is for the version 1.10. ++/// This is an input function for the v1.11 ghemical file format. ++bool ReadGPR(project &, istream &, bool, bool = false); ++ + class project : + public custom_transformer_client, + public model +@@ -207,11 +215,11 @@ + + // methods for file I/O : ReadGPR and WriteGPR are friend functions so that it would be easier to "borrow" them elsewhere... + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +- friend bool ReadGPR_OLD(project &, istream &, bool, bool = false); ///< this is for the very old version. +- friend bool ReadGPR_v100(project &, istream &, bool, bool = false); ///< this is for the version 1.00. +- friend bool ReadGPR_v110(project &, istream &, bool, bool = false); ///< this is for the version 1.10. ++ friend bool ReadGPR_OLD(project &, istream &, bool, bool); ///< this is for the very old version. ++ friend bool ReadGPR_v100(project &, istream &, bool, bool); ///< this is for the version 1.00. ++ friend bool ReadGPR_v110(project &, istream &, bool, bool); ///< this is for the version 1.10. + /// This is an input function for the v1.11 ghemical file format. +- friend bool ReadGPR(project &, istream &, bool, bool = false); ++ friend bool ReadGPR(project &, istream &, bool, bool); + + friend void WriteGPR_v100(project &, ostream &); ///< this is for the version 1.00. + /// This is an output function for the v1.11 ghemical file format. diff --git a/academic/ghemical/ghemical.SlackBuild b/academic/ghemical/ghemical.SlackBuild index 36ea7acff7..18c464ad65 100644 --- a/academic/ghemical/ghemical.SlackBuild +++ b/academic/ghemical/ghemical.SlackBuild @@ -61,6 +61,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Thanks Debian! +patch -p1 < $CWD/fix_clang_ftbfs.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \