summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMatthias Wolf <matthias.wolf@epfl.ch>2019-10-06 16:20:29 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2019-10-06 09:20:29 -0500
commit3d247d9567e700f7bc27c84a8687bf86013e7944 (patch)
treef41a46568cd9954146e1260f8d4af6c5e18416e6 /var
parentba72114ba21781dee662300b8d53e7e44b0fd702 (diff)
downloadspack-3d247d9567e700f7bc27c84a8687bf86013e7944.tar.gz
spack-3d247d9567e700f7bc27c84a8687bf86013e7944.tar.bz2
spack-3d247d9567e700f7bc27c84a8687bf86013e7944.tar.xz
spack-3d247d9567e700f7bc27c84a8687bf86013e7944.zip
freeimage: new package (#13049)
* freeimage: new package * Address comments. * Whitespace
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/freeimage/install_fixes.patch15
-rw-r--r--var/spack/repos/builtin/packages/freeimage/package.py25
2 files changed, 40 insertions, 0 deletions
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)