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

Last change on this file since 52193 was 52193, checked in by toby@…, 9 years ago

build fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# $Id: Portfile 52193 2009-06-11 23:39:43Z toby@macports.org $
2
3PortSystem 1.0
4PortGroup  muniversal 1.0
5
6name                    openssl
7version                 0.9.8k
8epoch                   1
9platforms               darwin freebsd
10categories              devel security
11maintainers             mww
12homepage                http://www.openssl.org/
13description             OpenSSL SSL/TLS cryptography library
14
15long_description \
16        The OpenSSL Project is a collaborative effort to develop a robust, \
17        commercial-grade, full-featured, and Open Source toolkit implementing \
18        the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security \
19        (TLS v1) protocols as well as a full-strength general purpose \
20        cryptography library.
21
22master_sites    http://www.openssl.org/source/
23checksums           md5     e555c6d58d276aec7fdc53363e338ab3 \
24                    sha1    3ba079f91d3c1ec90a36dcd1d43857165035703f \
25                    rmd160  496df7a5d33457b0d8e3b930a8e5cf068923182c
26
27depends_lib             port:zlib
28
29platform darwin {
30        patchfiles      patch-Makefile.org.diff patch-crypto-Makefile.diff
31}
32
33configure.cmd   ./config
34configure.args  -L${prefix}/lib --openssldir=${prefix}/etc/openssl zlib no-asm no-krb5 shared
35configure.ccache        no
36
37platform darwin 6 {
38        depends_lib-append      port:dlcompat
39}
40
41variant rfc3779 description {enable RFC 3779: X.509 Extensions for IP Addresses and AS Identifiers} {
42        configure.args-append   enable-rfc3779
43}
44
45use_parallel_build      no
46
47destroot.destdir        INSTALL_PREFIX=${destroot}
48destroot.args           MANDIR=${prefix}/share/man
49
50test.run                yes
51
52livecheck.check regex
53livecheck.url   ${master_sites}
54livecheck.regex ${name}-(0.9.8\[a-z\])
55
56post-patch {
57        # Ensure that the correct compiler is used
58        reinplace "s|cc:|${configure.cc}:|" ${worksrcpath}/Configure
59}
60
61if { [variant_isset universal] } {
62        configure.cmd   ./Configure
63
64        post-patch {
65                # For universal builds, add "-isysroot ${universal_sysroot}" to compiler options
66                if {[info exists universal_sysroot]} {
67                        reinplace "s|\\(-arch \[_a-zA-Z0-9\]*\\)|\\1 -isysroot ${universal_sysroot}|" ${worksrcpath}/Configure
68                }
69        }
70
71        set merger_arch_compiler "no"
72
73        pre-configure {
74                configure.args-delete  --disable-dependency-tracking
75        }
76
77        pre-destroot {
78                global merger_dont_diff
79                if { [llength ${universal_archs_to_use}] > 2 } {
80                        lappend merger_dont_diff ${prefix}/include/openssl/opensslconf.h
81                }
82        }
83
84        array set merger_configure_args {
85                ppc     darwin-ppc-cc
86                i386    darwin-i386-cc
87                ppc64   darwin64-ppc-cc
88                x86_64  darwin64-x86_64-cc
89        }
90
91        # Do not set --host.
92        array set merger_host {
93                ppc     ""
94                i386    ""
95                ppc64   ""
96                x86_64  ""
97        }
98} else {
99        # hack to force 64-bit build when the default compiler builds 64-bit binaries
100        if {${os.major} >= 10 && $tcl_platform(wordSize) == 8} {
101                configure.cmd           ./Configure
102                configure.args-append   darwin64-x86_64-cc
103        }
104}
105
106# the test suite can only be run *after* destrooting
107#    test.run            yes
108#    test.dir            ${worksrcpath}/test
109#    test.target         alltests
Note: See TracBrowser for help on using the repository browser.