summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWouter Deconinck <wdconinc@gmail.com>2023-01-23 14:14:19 -0600
committerGitHub <noreply@github.com>2023-01-23 12:14:19 -0800
commit0f2e0a01a97210b9c1380066ba362b7321e7a0e8 (patch)
treec9d32e38b7e9d4df05546148c813099ae4abd646
parentc2d68975bcba920094347e3421b2e848cbac46db (diff)
downloadspack-0f2e0a01a97210b9c1380066ba362b7321e7a0e8.tar.gz
spack-0f2e0a01a97210b9c1380066ba362b7321e7a0e8.tar.bz2
spack-0f2e0a01a97210b9c1380066ba362b7321e7a0e8.tar.xz
spack-0f2e0a01a97210b9c1380066ba362b7321e7a0e8.zip
freeimage: fails to compile with c++17, use c++14 (#35067)
* freeimage: fails to compile with c++17, use c++14 Only `opencascade` when a (non-default) variant depends on `freeimage`, which seems to have gone unmaintained. There are c++17 standard violations [[1]]( https://en.cppreference.com/w/cpp/language/except_spec) in the code, so we can at most expect c++14. Since some compilers default to c++17 (gcc-12) we need to be explicit. * freeimage: install directly in prefix * freeimage: fix inverted patch
-rw-r--r--var/spack/repos/builtin/packages/freeimage/install_fixes.patch13
-rw-r--r--var/spack/repos/builtin/packages/freeimage/package.py1
2 files changed, 13 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/freeimage/install_fixes.patch b/var/spack/repos/builtin/packages/freeimage/install_fixes.patch
index 21c9fadde9..a4744261de 100644
--- a/var/spack/repos/builtin/packages/freeimage/install_fixes.patch
+++ b/var/spack/repos/builtin/packages/freeimage/install_fixes.patch
@@ -1,5 +1,16 @@
--- a/Makefile.gnu 2015-03-10 09:04:00.000000000 +0100
-+++ b/Makefile.gnu 2019-03-15 13:20:12.480698778 +0100
++++ b/Makefile.gnu 2023-01-21 15:53:35.782911926 -0600
+@@ -5,8 +5,8 @@
+
+ # General configuration variables:
+ DESTDIR ?= /
+-INCDIR ?= $(DESTDIR)/usr/include
+-INSTALLDIR ?= $(DESTDIR)/usr/lib
++INCDIR ?= $(DESTDIR)/include
++INSTALLDIR ?= $(DESTDIR)/lib
+
+ # Converts cr/lf to just lf
+ DOS2UNIX = dos2unix
@@ -71,9 +71,9 @@
install:
diff --git a/var/spack/repos/builtin/packages/freeimage/package.py b/var/spack/repos/builtin/packages/freeimage/package.py
index c464c0a6de..3b216a7084 100644
--- a/var/spack/repos/builtin/packages/freeimage/package.py
+++ b/var/spack/repos/builtin/packages/freeimage/package.py
@@ -19,6 +19,7 @@ class Freeimage(MakefilePackage):
def edit(self, spec, prefix):
env["DESTDIR"] = prefix
+ env["CXXFLAGS"] = "-std=c++14"
def url_for_version(self, version):
url = "https://downloads.sourceforge.net/project/freeimage/Source%20Distribution/{0}/FreeImage{1}.zip"