summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-06-23 15:10:45 +0200
committerDavid Seifert <soap@gentoo.org>2019-06-23 15:10:45 +0200
commitb2ab6a8f5354a899d9637574ee0eb7b4a43961a2 (patch)
tree876b5c73bd9e209b5d90f74e0dc9a8937e5c7947 /sci-chemistry
parentsci-chemistry/ghemical: Port to EAPI 7 (diff)
downloadgentoo-b2ab6a8f5354a899d9637574ee0eb7b4a43961a2.tar.gz
gentoo-b2ab6a8f5354a899d9637574ee0eb7b4a43961a2.tar.bz2
gentoo-b2ab6a8f5354a899d9637574ee0eb7b4a43961a2.zip
sci-chemistry/ghemical: Fix building against GCC 9
Closes: https://bugs.gentoo.org/687450 Package-Manager: Portage-2.3.67, Repoman-2.3.15 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/ghemical/files/3.0.0-fix-gcc9.patch37
-rw-r--r--sci-chemistry/ghemical/ghemical-3.0.0.ebuild5
2 files changed, 41 insertions, 1 deletions
diff --git a/sci-chemistry/ghemical/files/3.0.0-fix-gcc9.patch b/sci-chemistry/ghemical/files/3.0.0-fix-gcc9.patch
new file mode 100644
index 000000000000..d3d80bbd00ba
--- /dev/null
+++ b/sci-chemistry/ghemical/files/3.0.0-fix-gcc9.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/687450
+
+project.h:210:14: error: friend declaration of ‘bool ReadGPR_OLD(project&, std::istream&, bool, bool)’ specifies default arguments and isn’t a definition [-fpermissive]
+ 210 | friend bool ReadGPR_OLD(project &, istream &, bool, bool = false); ///< this is for the very old version.
+ | ^~~~~~~~~~~
+
+--- a/src/project.h
++++ b/src/project.h
+@@ -122,6 +122,12 @@
+ graphical user interface.
+ */
+
++class project;
++bool ReadGPR_OLD(project &, istream &, bool, bool = false);
++bool ReadGPR_v100(project &, istream &, bool, bool = false);
++bool ReadGPR_v110(project &, istream &, bool, bool = false);
++bool ReadGPR(project &, istream &, bool, bool = false);
++
+ class project :
+ public custom_transformer_client,
+ public model
+@@ -207,11 +213,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/sci-chemistry/ghemical/ghemical-3.0.0.ebuild b/sci-chemistry/ghemical/ghemical-3.0.0.ebuild
index 4186af7e725a..477c41439c28 100644
--- a/sci-chemistry/ghemical/ghemical-3.0.0.ebuild
+++ b/sci-chemistry/ghemical/ghemical-3.0.0.ebuild
@@ -28,7 +28,10 @@ RDEPEND="
DEPEND="${RDEPEND}
virtual/pkgconfig"
-PATCHES=( "${FILESDIR}"/2.99.2-docs.patch )
+PATCHES=(
+ "${FILESDIR}"/2.99.2-docs.patch
+ "${FILESDIR}"/3.0.0-fix-gcc9.patch
+)
src_prepare() {
default