libpng: zlib path (#5581)

explicitly set the zlib path for libpng configure.

fixes:
```
     [ ... ]
     92    checking for memset... yes
     93    checking for pow... no
     94    checking for pow in -lm... yes
     95    checking for clock_gettime... yes
     96    checking for zlibVersion in -lz... no
     97    checking for z_zlibVersion in -lz... no
  >> 98    configure: error: zlib not installed
```
This commit is contained in:
Axel Huebl 2017-10-03 22:58:28 +02:00 committed by Christoph Junghans
parent 3e79872ada
commit ba06eb72d0

View File

@ -51,3 +51,13 @@ class Libpng(AutotoolsPackage):
version('1.2.57', 'dfcda3603e29dcc11870c48f838ef75b')
depends_on('zlib@1.0.4:') # 1.2.5 or later recommended
def configure_args(self):
args = [
# not honored, see
# https://sourceforge.net/p/libpng/bugs/210/#33f1
# '--with-zlib=' + self.spec['zlib'].prefix,
'CFLAGS=-I{0}'.format(self.spec['zlib'].prefix.include),
'LDFLAGS=-L{0}'.format(self.spec['zlib'].prefix.lib)
]
return args