Ticket #1859: zlib.diff

File zlib.diff, 1.3 KB (added by blb@…, 20 years ago)

Patch to Portfile

  • Portfile

    old new  
    11# $Id: Portfile,v 1.3 2003/08/05 21:01:59 jkh Exp $
    2 # This port installs only a static archive for zlib, which is not
    3 # included by default with OS X
    42
    53PortSystem 1.0
    64name                    zlib
     
    1311                        library for use on virtually any computer hardware \
    1412                        and operating system.
    1513homepage                http://www.gzip.org/zlib/
    16 platforms               darwin
     14platforms               darwin sunos
    1715master_sites            http://www.libpng.org/pub/png/src/ \
    1816                        ftp://swrinde.nde.swri.edu/pub/png/src/ \
    1917                        ftp://ftp.info-zip.org/pub/infozip/zlib/
     
    2119use_bzip2               yes
    2220pre-destroot            "file mkdir ${destroot}/${prefix}/"
    2321destroot.destdir        prefix=${destroot}/${prefix}/
     22
     23# Do both shared and static
     24variant shared {
     25        if {[variant_isset darwin]} {
     26                error "Building the shared library isn't support on Darwin"
     27        }
     28        configure.args-append   -s
     29        # Reconfigure and build again, this time the static lib
     30        post-build {
     31                cd ${worksrcpath}
     32                system "./configure"
     33                system "make"
     34        }
     35        post-destroot {
     36                file copy ${worksrcpath}/libz.so.1.1.4 ${destroot}/${prefix}/lib
     37                system "ln -s libz.so.1.1.4 ${destroot}/${prefix}/lib/libz.so.1"
     38                system "ln -s libz.so.1.1.4 ${destroot}/${prefix}/lib/libz.so"
     39        }
     40}
     41