source: trunk/dports/devel/openssl/Portfile @ 30661

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

add variant for enabling rfc3779

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1# $Id: Portfile 30661 2007-11-02 16:55:49Z mww@macports.org $
2
3PortSystem 1.0
4name                    openssl
5version                 0.9.8g
6platforms               darwin freebsd
7categories              devel security
8maintainers             mww
9homepage                http://www.openssl.org/
10description             OpenSSL SSL/TLS cryptography library
11
12long_description \
13        The OpenSSL Project is a collaborative effort to develop a robust, \
14        commercial-grade, full-featured, and Open Source toolkit implementing \
15        the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security \
16        (TLS v1) protocols as well as a full-strength general purpose \
17        cryptography library.
18
19master_sites    http://www.openssl.org/source/
20checksums               md5 acf70a16359bf3658bdfb74bda1c4419 \
21                                sha1 4e9c5ced466715d18fd924de79bde5c15da80fa1 \
22                                rmd160 f080a32da9becdc8b98c38744d62c6fd8664f603
23
24depends_lib             port:zlib
25
26platform darwin {
27        patchfiles      patch-Makefile.org patch-crypto-Makefile
28}
29
30configure.cmd   ./config
31configure.args  -L${prefix}/lib --openssldir=${prefix}/etc/openssl zlib no-asm no-krb5 shared
32
33platform darwin 6 {
34        depends_lib-append      port:dlcompat
35}
36
37platform darwin 8 {
38        build.args      CC=/usr/bin/gcc-4.0
39}
40
41variant rfc3779 {
42        configure.args-append   enable-rfc3779
43}
44
45destroot.destdir        INSTALL_PREFIX=${destroot}
46destroot.args           MANDIR=${prefix}/share/man
47
48test.run                yes
49
50livecheck.check regex
51livecheck.url   ${master_sites}
52livecheck.regex ${name}-(0.9.8\[a-z\])
53
54variant universal {
55   
56# port-specific procedure
57    proc clean {} {
58        system "make clean"
59        foreach f [glob lib*.a lib*.*.*.*.dylib] {
60            file delete ${f}
61        }
62    }
63
64# i386
65    # configure
66    pre-configure {
67        system "./Configure darwin-i386-cc ${configure.pre_args} ${configure.args} && \
68                patch < ${filespath}/patch-Makefiles-universal-i386"
69        reinplace "s|^PROCESSOR=.*|PROCESSOR=|" ${worksrcpath}/Makefile
70    }
71    # build
72    configure {
73        system "make"
74    }
75    # backup, clean up
76    post-configure {
77        # get list of files to be backed up - only needs to be done once
78        fs-traverse file . {
79          if {![string equal [string range [file tail $file] end-1 end] .o]} {
80            set type [exec file -b $file]
81            if {[regexp {(Mach-O|ar archive)} $type]} {
82              global universal_filelist
83              lappend universal_filelist $file
84            }
85          }
86        }
87
88        backup i386
89
90        clean
91    }
92# ppc
93    # configure
94    pre-build {
95        system "./Configure darwin-ppc-cc ${configure.pre_args} ${configure.args} && \
96                patch < ${filespath}/patch-Makefiles-universal-ppc"
97    }
98    # build
99    build {
100        system "make"
101    }
102    # backup
103    post-build {
104        # there's already a list of files to be backed up
105
106        global fileList
107
108        backup ppc
109
110        clean
111    }
112
113# universal
114    pre-destroot {
115        global fileList
116        system "make openssl.pc libssl.pc libcrypto.pc"
117        lipo
118        system "patch < ${filespath}/patch-Makefile-universal-install"
119    }
120    destroot.target     install_docs install_sw
121
122    # the test suite can only be run *after* destrooting
123    test.run            yes
124    test.dir            ${worksrcpath}/test
125    test.target         alltests
126}
Note: See TracBrowser for help on using the repository browser.