diff --git a/var/spack/repos/builtin/packages/freeimage/install_fixes.patch b/var/spack/repos/builtin/packages/freeimage/install_fixes.patch new file mode 100644 index 0000000000..21c9fadde9 --- /dev/null +++ b/var/spack/repos/builtin/packages/freeimage/install_fixes.patch @@ -0,0 +1,15 @@ +--- a/Makefile.gnu 2015-03-10 09:04:00.000000000 +0100 ++++ b/Makefile.gnu 2019-03-15 13:20:12.480698778 +0100 +@@ -71,9 +71,9 @@ + + install: + install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) ++ install -m 644 $(HEADER) $(INCDIR) ++ install -m 644 $(STATICLIB) $(INSTALLDIR) ++ install -m 755 $(SHAREDLIB) $(INSTALLDIR) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) + # ldconfig diff --git a/var/spack/repos/builtin/packages/freeimage/package.py b/var/spack/repos/builtin/packages/freeimage/package.py new file mode 100644 index 0000000000..2f1293c1f4 --- /dev/null +++ b/var/spack/repos/builtin/packages/freeimage/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2018 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 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', 'f8ba138a3be233a3eed9c456e42e2578') + + patch('install_fixes.patch', when='@3.18.0') + + def edit(self, spec, prefix): + env["DESTDIR"] = prefix + + 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)