# $Id: Portfile 24149 2007-04-17 16:53:05Z pipping@macports.org $ PortSystem 1.0 name openssl version 0.9.8e platforms darwin freebsd categories devel security maintainers mww@macports.org homepage http://www.openssl.org/ description OpenSSL SSL/TLS cryptography library long_description \ The OpenSSL Project is a collaborative effort to develop a robust, \ commercial-grade, full-featured, and Open Source toolkit implementing \ the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security \ (TLS v1) protocols as well as a full-strength general purpose \ cryptography library. master_sites http://www.openssl.org/source/ checksums md5 3a7ff24f6ea5cd711984722ad654b927 \ sha1 b429872d2a287714ab37e42296e6a5fbe23d32ff \ rmd160 c1a498606dc0fc7219376b950fab6b53687466db depends_lib port:zlib variant darwin { patchfiles patch-Makefile.org patch-crypto-Makefile } configure.cmd ./config configure.args -L${prefix}/lib --openssldir=${prefix}/etc/openssl zlib no-asm no-krb5 shared platform darwin 6 { depends_lib-append port:dlcompat } platform darwin 8 { build.args CC=/usr/bin/gcc-4.0 } destroot.destdir INSTALL_PREFIX=${destroot} destroot.args MANDIR=${prefix}/share/man test.run yes livecheck.check regex livecheck.url ${master_sites} livecheck.regex ${name}-(0.9.8\[a-z\]) variant universal { # port-specific procedure proc clean {} { system "make clean" foreach f [glob lib*.a lib*.*.*.*.dylib] { file delete ${f} } } # i386 # configure pre-configure { cd ${worksrcpath} system "./Configure darwin-i386-cc ${configure.pre_args} ${configure.args}" system "patch < ${filespath}/patch-Makefiles-universal-i386" reinplace "s|^PROCESSOR=.*|PROCESSOR=|" Makefile } # build configure { cd ${worksrcpath} system "make" } # backup, clean up post-configure { cd ${worksrcpath} # get list of files to be backed up - only needs to be done once fs-traverse file . { if {![string equal [string range [file tail $file] end-1 end] .o]} { set type [exec file -b $file] if {[regexp {(Mach-O|ar archive)} $type]} { global universal_filelist lappend universal_filelist $file } } } backup i386 clean } # ppc # configure pre-build { cd ${worksrcpath} system "./Configure darwin-ppc-cc ${configure.pre_args} ${configure.args}" system "patch < ${filespath}/patch-Makefiles-universal-ppc" } # build build { cd ${worksrcpath} system "make" } # backup post-build { cd ${worksrcpath} # there's already a list of files to be backed up global fileList backup ppc clean } # universal pre-destroot { cd ${worksrcpath} global fileList system "make openssl.pc libssl.pc libcrypto.pc" lipo system "patch < ${filespath}/patch-Makefile-universal-install" } destroot.target install_docs install_sw # the test suite can only be run *after* destrooting test.run yes test.dir ${worksrcpath}/test test.target alltests }