2019-12-31 14:36:56 +08:00
|
|
|
# Copyright 2013-2020 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
|
|
|
|
2020-02-05 09:33:33 +08:00
|
|
|
class Libmng(CMakePackage):
|
|
|
|
"""THE reference library for reading, displaying, writing
|
2014-12-23 15:23:11 +08:00
|
|
|
and examining Multiple-Image Network Graphics. MNG is the animation
|
2020-02-05 09:33:33 +08:00
|
|
|
extension to the popular PNG image format."""
|
2014-12-23 15:23:11 +08:00
|
|
|
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
|
|
|
|
2020-02-05 09:33:33 +08:00
|
|
|
def cmake_args(self):
|
|
|
|
return ['-DWITH_LCMS2:BOOL=ON',
|
|
|
|
'-DWITH_LCMS1:BOOL=OFF']
|