
* 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
27 lines
987 B
Python
27 lines
987 B
Python
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
#
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
from spack.package import *
|
|
|
|
|
|
class Freeimage(MakefilePackage):
|
|
"""FreeImage is an Open Source library project for developers who would like
|
|
to support popular graphics image formats like PNG, BMP, JPEG, TIFF and
|
|
others as needed by today's multimedia applications"""
|
|
|
|
homepage = "http://freeimage.sourceforge.net/"
|
|
|
|
version("3.18.0", sha256="f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd")
|
|
|
|
patch("install_fixes.patch", when="@3.18.0")
|
|
|
|
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"
|
|
return url.format(version, version.joined)
|