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

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

openssl: do a 'fake destroot' before testing so that 'port test' works out of the box

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# $Id: Portfile 84155 2011-09-19 18:04:58Z mww@macports.org $
2
3PortSystem 1.0
4PortGroup  muniversal 1.0
5
6name                openssl
7version             1.0.0e
8revision            1
9epoch               1
10platforms           darwin
11categories          devel security
12maintainers         mww
13homepage            http://www.openssl.org/
14license             OpenSSL SSLeay
15description         OpenSSL SSL/TLS cryptography library
16
17long_description \
18    The OpenSSL Project is a collaborative effort to develop a robust, \
19    commercial-grade, full-featured, and Open Source toolkit implementing \
20    the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security \
21    (TLS v1) protocols as well as a full-strength general purpose \
22    cryptography library.
23
24master_sites        http://www.openssl.org/source/
25checksums           md5    7040b89c4c58c7a1016c0dfa6e821c86 \
26                    sha1   235eb68e5a31b0f7a23bc05f52d7a39c596e2e69 \
27                    rmd160 f7b7c8146592bb0924f145b1e3382b5a1d9283e4 \
28                    sha256 e361dc2775733fb84de7b5bf7b504778b772869e8f7bfac0b28b935cbf7380f7
29
30depends_lib         port:zlib
31
32patchfiles          patch-Makefile.org.diff patch-crypto-Makefile.diff patch-bn_internal.pod.diff
33post-patch {
34    # Ensure that the correct compiler is used
35    reinplace "s|cc:|${configure.cc}:|" ${worksrcpath}/Configure
36    # use SDK if necessary
37    if {${configure.sdkroot} != ""} {
38        reinplace "s|\\(-arch \[_a-zA-Z0-9\]*\\)|\\1 -isysroot ${configure.sdkroot}|" ${worksrcpath}/Configure
39    }
40}
41
42configure.cmd       ./config
43configure.args      -L${prefix}/lib --openssldir=${prefix}/etc/openssl zlib no-asm no-krb5 shared
44configure.ccache    no
45
46use_parallel_build  no
47
48destroot.destdir    INSTALL_PREFIX=${destroot}
49destroot.args       MANDIR=${prefix}/share/man MANSUFFIX=ssl
50
51# the test suite can only be run *after* 'destrooting'
52pre-test {
53    xinstall -d -m 755 ${workpath}/test/man
54    system -W ${worksrcpath} "${build.cmd} install INSTALL_PREFIX=${workpath}/test MANDIR=${workpath}/test/man"
55}
56test.run            yes
57test.dir            ${worksrcpath}/test
58test.target         alltests
59
60livecheck.type      regex
61livecheck.url       ${master_sites}
62livecheck.regex     ${name}-(\[0-9.\]+\[a-z\]?)\\.tar\\.gz
63
64variant rfc3779 description {enable RFC 3779: X.509 Extensions for IP Addresses and AS Identifiers} {
65    configure.args-append    enable-rfc3779
66}
67
68# code for universal build
69array set merger_configure_args {
70    ppc    darwin-ppc-cc
71    i386   darwin-i386-cc
72    ppc64  darwin64-ppc-cc
73    x86_64 darwin64-x86_64-cc
74}
75
76if { [variant_isset universal] } {
77    configure.cmd    ./Configure
78
79    set merger_arch_compiler "no"
80
81    configure.universal_args-delete --disable-dependency-tracking
82    configure.args-delete  --disable-dependency-tracking
83
84    pre-destroot {
85        global merger_dont_diff
86        if { [llength ${universal_archs_to_use}] > 2 } {
87            lappend merger_dont_diff ${prefix}/include/openssl/opensslconf.h
88        }
89    }
90
91    # Do not set --host.
92    array set merger_host {
93        ppc    ""
94        i386   ""
95        ppc64  ""
96        x86_64 ""
97    }
98} elseif {[info exists merger_configure_args($build_arch)]} {
99    configure.cmd           ./Configure
100    configure.args-append   $merger_configure_args($build_arch)
101}
102
Note: See TracBrowser for help on using the repository browser.