source: trunk/dports/archivers/zlib/Portfile @ 50198

Last change on this file since 50198 was 50198, checked in by mcalhoun@…, 11 years ago

zlib: Ensure configure.ldflags are used.
Fixes #18841.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: Portfile 50198 2009-04-27 16:49:44Z mcalhoun@macports.org $
2
3PortSystem              1.0
4PortGroup               muniversal 1.0
5
6name                    zlib
7version                 1.2.3
8revision                2
9categories              archivers
10maintainers             landonf@macports.org ryandesign openmaintainer
11homepage                http://www.zlib.net/
12platforms               darwin freebsd
13use_bzip2               yes
14
15description             zlib lossless data-compression library
16
17long_description        zlib is designed to be a free, general-purpose, \
18                        legally unencumbered, lossless data-compression \
19                        library for use on virtually any computer hardware \
20                        and operating system.
21
22master_sites            ${homepage} \
23                        http://www.gzip.org/zlib/ \
24                        sourceforge:libpng
25
26checksums               md5     dee233bf288ee795ac96a98cc2e369b6 \
27                        sha1    967e280f284d02284b0cd8872a8e2e04bfdc7283 \
28                        rmd160  cfba9984b354dcc38da49331457e6bfc861c6f51
29
30patchfiles              patch-Makefile-static.diff patch-Makefile-test.diff
31
32configure.args          --shared
33configure.universal_args
34
35# configure script does not recognize --host option
36array set merger_host {
37    ppc                 ""
38    i386                ""
39    ppc64               ""
40    x86_64              ""
41}
42
43# Ensure ldflags are used (see http://trac.macports.org/ticket/18841).
44post-patch {
45    if { ${configure.ldflags}!="-L${prefix}/lib" } {
46        configure.ldflags-delete  -L${prefix}/lib
47        reinplace "s|LDFLAGS=\"\\(.*\\)\"|LDFLAGS=\"\\1 ${configure.ldflags}\"|" ${worksrcpath}/configure
48    }
49}
50
51use_parallel_build      yes
52
53test.run                yes
54
55destroot.destdir        prefix=${destroot}${prefix}
56
57post-destroot {
58    set docdir ${prefix}/share/doc/${name}-${version}
59    xinstall -d ${destroot}${docdir}
60    xinstall -m 0644 -W ${worksrcpath} ChangeLog FAQ README ${destroot}${docdir}
61   
62    set examplesdir ${docdir}/examples
63    xinstall -d ${destroot}${examplesdir}
64    eval xinstall -m 0644 [glob ${worksrcpath}/example{.c,s/*}] ${destroot}${examplesdir}
65}
66
67livecheck.check         regex
68livecheck.url           ${homepage}
69livecheck.regex         ${name}-(\[0-9.\]+)\\.tar
Note: See TracBrowser for help on using the repository browser.