Ticket #11438: zlib-universal-eridius.diff
File zlib-universal-eridius.diff, 2.8 KB (added by kballard (Lily Ballard), 18 years ago) |
---|
-
Portfile
1 1 # $Id$ 2 2 3 3 PortSystem 1.0 4 name zlib5 version 1.2.36 categories archivers7 maintainers landonf@opendarwin.org8 description zlib lossless data-compression library9 long_description \10 zlib is designed to be a free, general-purpose, \11 legally unencumbered, lossless data-compression \12 library for use on virtually any computer hardware \13 and operating system.14 homepage http://www.zlib.net/15 platforms darwin16 4 17 master_sites ${homepage} http://www.gzip.org/zlib/ \ 18 sourceforge:libpng 5 name zlib 6 version 1.2.3 7 categories archivers 8 maintainers landonf@opendarwin.org 9 description zlib lossless data-compression library 10 long_description zlib is designed to be a free, general-purpose, \ 11 legally unencumbered, lossless data-compression \ 12 library for use on virtually any computer hardware \ 13 and operating system. 19 14 20 use_bzip2 yes 21 checksums md5 dee233bf288ee795ac96a98cc2e369b6 15 homepage http://www.zlib.net/ 16 platforms darwin 22 17 23 configure.args --shared 18 master_sites ${homepage} http://www.gzip.org/zlib/ \ 19 sourceforge:libpng 24 20 25 test.run yes 21 use_bzip2 yes 22 checksums md5 dee233bf288ee795ac96a98cc2e369b6 26 23 27 destroot.destdir prefix=${destroot}${prefix} 24 configure.args --shared 28 25 26 test.run yes 27 28 destroot.destdir prefix=${destroot}${prefix} 29 29 30 post-destroot { 30 system "cd ${worksrcpath} && ./configure" 31 system "cd ${worksrcpath} && make" 32 xinstall ${worksrcpath}/libz.a ${destroot}${prefix}/lib 31 ui_msg "$UI_PREFIX Configuring libz.a" 32 configure.args-delete --shared 33 run_command configure 34 modify_ldshared 35 ui_msg "$UI_PREFIX Building libz.a" 36 run_command build 37 ui_msg "$UI_PREFIX Staging libz.a into destroot" 38 xinstall ${worksrcpath}/libz.a ${destroot}${prefix}/lib/ 33 39 } 40 41 post-configure { 42 modify_ldshared 43 } 44 45 variant universal { 46 configure.env-append CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ 47 LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" 48 } 49 50 proc modify_ldshared {} { 51 global worksrcpath 52 if {[variant_isset universal]} { 53 reinplace "s|^\\(LDSHARED *=.*\\)$|\\1 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc|" \ 54 "${worksrcpath}/Makefile" 55 } 56 } 57 58 proc run_command {cmd} { 59 if {[catch {system "[command $cmd]"} result]} { 60 return -code error "[format [msgcat::mc "%s failure: %s"] $cmd $result]" 61 } 62 } 63 No newline at end of file