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

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

openssl: fix universal variant on MP 1.7 (#20370, #17865)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1# $Id: Portfile 54114 2009-07-21 15:35:45Z jmr@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
37variant rfc3779 description {enable RFC 3779: X.509 Extensions for IP Addresses and AS Identifiers} {
38        configure.args-append   enable-rfc3779
39}
40
41use_parallel_build      no
42
43destroot.destdir        INSTALL_PREFIX=${destroot}
44destroot.args           MANDIR=${prefix}/share/man
45
46test.run                yes
47
48livecheck.check regex
49livecheck.url   ${master_sites}
50livecheck.regex ${name}-(0.9.8\[a-z\])
51
52post-patch {
53        # Ensure that the correct compiler is used
54        reinplace "s|cc:|${configure.cc}:|" ${worksrcpath}/Configure
55}
56
57if { [variant_isset universal] } {
58        configure.cmd   ./Configure
59
60        post-patch {
61                # For universal builds, add "-isysroot ${universal_sysroot}" to compiler options
62                if {[info exists universal_sysroot]} {
63                        reinplace "s|\\(-arch \[_a-zA-Z0-9\]*\\)|\\1 -isysroot ${universal_sysroot}|" ${worksrcpath}/Configure
64                }
65        }
66
67        set merger_arch_compiler "no"
68
69        configure.universal_args-delete --disable-dependency-tracking
70        configure.args-delete  --disable-dependency-tracking
71        # workaround for #17865
72        if {![info exists configure.universal_args]} {
73            configure.universal_args
74        }
75        if {![info exists configure.args]} {
76            configure.args
77        }
78
79        pre-destroot {
80                global merger_dont_diff
81                if { [llength ${universal_archs_to_use}] > 2 } {
82                        lappend merger_dont_diff ${prefix}/include/openssl/opensslconf.h
83                }
84        }
85
86        array set merger_configure_args {
87                ppc     darwin-ppc-cc
88                i386    darwin-i386-cc
89                ppc64   darwin64-ppc-cc
90                x86_64  darwin64-x86_64-cc
91        }
92
93        # Do not set --host.
94        array set merger_host {
95                ppc     ""
96                i386    ""
97                ppc64   ""
98                x86_64  ""
99        }
100} else {
101        # hack to force 64-bit build when the default compiler builds 64-bit binaries
102        if {${os.major} >= 10 && $tcl_platform(wordSize) == 8} {
103                configure.cmd           ./Configure
104                configure.args-append   darwin64-x86_64-cc
105        }
106}
107
108# the test suite can only be run *after* destrooting
109#    test.run            yes
110#    test.dir            ${worksrcpath}/test
111#    test.target         alltests
Note: See TracBrowser for help on using the repository browser.