[22776] trunk/dports/archivers/zlib/Portfile
source_changes at macosforge.org
source_changes at macosforge.org
Tue Mar 13 21:07:16 PDT 2007
Revision: 22776
http://trac.macosforge.org/projects/macports/changeset/22776
Author: eridius at macports.org
Date: 2007-03-13 21:07:16 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
Universal zlib (Fixes #11438)
zlib is openmaintainer, so no approval required
Modified Paths:
--------------
trunk/dports/archivers/zlib/Portfile
Modified: trunk/dports/archivers/zlib/Portfile
===================================================================
--- trunk/dports/archivers/zlib/Portfile 2007-03-14 03:50:35 UTC (rev 22775)
+++ trunk/dports/archivers/zlib/Portfile 2007-03-14 04:07:16 UTC (rev 22776)
@@ -1,34 +1,64 @@
# $Id$
PortSystem 1.0
-name zlib
-version 1.2.3
-categories archivers
-maintainers ryandesign at macports.org landonf at macports.org \
- openmaintainer at macports.org
-description zlib lossless data-compression library
-long_description \
- zlib is designed to be a free, general-purpose, \
- legally unencumbered, lossless data-compression \
- library for use on virtually any computer hardware \
- and operating system.
-homepage http://www.zlib.net/
-platforms darwin
-master_sites ${homepage} http://www.gzip.org/zlib/ \
- sourceforge:libpng
+name zlib
+version 1.2.3
+categories archivers
+maintainers ryandesign at macports.org landonf at macports.org \
+ openmaintainer at macports.org
+description zlib lossless data-compression library
+long_description zlib is designed to be a free, general-purpose, \
+ legally unencumbered, lossless data-compression \
+ library for use on virtually any computer hardware \
+ and operating system.
-use_bzip2 yes
-checksums md5 dee233bf288ee795ac96a98cc2e369b6
+homepage http://www.zlib.net/
+platforms darwin
-configure.args --shared
+master_sites ${homepage} \
+ http://www.gzip.org/zlib/ \
+ sourceforge:libpng
-test.run yes
+use_bzip2 yes
+checksums md5 dee233bf288ee795ac96a98cc2e369b6
-destroot.destdir prefix=${destroot}${prefix}
+configure.args --shared
+test.run yes
+
+destroot.destdir prefix=${destroot}${prefix}
+
post-destroot {
- system "cd ${worksrcpath} && ./configure"
- system "cd ${worksrcpath} && make"
- xinstall ${worksrcpath}/libz.a ${destroot}${prefix}/lib
+ ui_msg "$UI_PREFIX Configuring libz.a"
+ configure.args-delete --shared
+ run_command configure
+ modify_ldshared
+ ui_msg "$UI_PREFIX Building libz.a"
+ run_command build
+ ui_msg "$UI_PREFIX Staging libz.a into destroot"
+ xinstall ${worksrcpath}/libz.a ${destroot}${prefix}/lib/
}
+
+post-configure {
+ modify_ldshared
+}
+
+variant universal {
+ configure.env-append CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
+}
+
+proc modify_ldshared {} {
+ global worksrcpath
+ if {[variant_isset universal]} {
+ reinplace "s|^\\(LDSHARED *=.*\\)$|\\1 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc|" \
+ "${worksrcpath}/Makefile"
+ }
+}
+
+proc run_command {cmd} {
+ if {[catch {system "[command $cmd]"} result]} {
+ return -code error "[format [msgcat::mc "%s failure: %s"] $cmd $result]"
+ }
+}
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070313/bbfea991/attachment.html
More information about the macports-changes
mailing list