2019-01-01 14:04:23 +08:00
|
|
|
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2016-05-12 12:22:25 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2014-12-23 15:23:11 +08:00
|
|
|
from spack import *
|
|
|
|
|
2016-08-10 16:50:00 +08:00
|
|
|
|
2017-01-19 02:34:09 +08:00
|
|
|
class Libmng(AutotoolsPackage):
|
2014-12-23 15:23:11 +08:00
|
|
|
"""libmng -THE reference library for reading, displaying, writing
|
|
|
|
and examining Multiple-Image Network Graphics. MNG is the animation
|
|
|
|
extension to the popular PNG image-format."""
|
|
|
|
homepage = "http://sourceforge.net/projects/libmng/"
|
2017-06-23 01:52:02 +08:00
|
|
|
url = "http://downloads.sourceforge.net/project/libmng/libmng-devel/2.0.3/libmng-2.0.3.tar.gz"
|
2014-12-23 15:23:11 +08:00
|
|
|
|
2019-10-11 13:44:41 +08:00
|
|
|
version('2.0.3', sha256='cf112a1fb02f5b1c0fce5cab11ea8243852c139e669c44014125874b14b7dfaa')
|
|
|
|
version('2.0.2', sha256='4908797bb3541fb5cd8fffbe0b1513ed163509f2a4d57a78b26a96f8d1dd05a2')
|
2014-12-23 15:23:11 +08:00
|
|
|
|
|
|
|
depends_on("jpeg")
|
|
|
|
depends_on("zlib")
|
|
|
|
depends_on("lcms")
|
|
|
|
|
2014-12-26 08:09:42 +08:00
|
|
|
def patch(self):
|
2017-06-23 01:52:02 +08:00
|
|
|
# jpeg requires stdio to be included before its headers.
|
2016-08-10 16:50:00 +08:00
|
|
|
filter_file(r'^(\#include \<jpeglib\.h\>)',
|
|
|
|
'#include<stdio.h>\n\\1', 'libmng_types.h')
|
2017-01-31 22:49:29 +08:00
|
|
|
|
|
|
|
@run_before('configure')
|
|
|
|
def clean_configure_directory(self):
|
2017-06-23 01:52:02 +08:00
|
|
|
"""Without this, configure crashes with:
|
|
|
|
|
|
|
|
configure: error: source directory already configured;
|
|
|
|
run "make distclean" there first
|
|
|
|
"""
|
2017-01-31 22:49:29 +08:00
|
|
|
make('distclean')
|