Ticket #46651: Portfile

File Portfile, 3.8 KB (added by mouse07410 (Mouse), 10 years ago)

Portfile with added variants for openssl-1.0.1k port

Line 
1# $Id: Portfile 131360 2015-01-10 13:51:17Z cal@macports.org $
2
3PortSystem 1.0
4PortGroup  muniversal 1.0
5
6name                openssl
7version             1.0.1k
8epoch               1
9
10# At least the following ports statically link OpenSSL and need to be revbumped
11# for every update of OpenSSL:
12#  - ...
13# Although they dynamically link OpenSSL, at least the following ports need to
14# be revbumped for every update of OpenSSL:
15#  - freeradius
16#  - tor
17# These lists aren't exhaustive. Feel free to add more entries as you find them.
18
19platforms           darwin
20categories          devel security
21maintainers         mww
22homepage            http://www.openssl.org/
23license             OpenSSL SSLeay
24description         OpenSSL SSL/TLS cryptography library
25
26long_description \
27    The OpenSSL Project is a collaborative effort to develop a robust, \
28    commercial-grade, full-featured, and Open Source toolkit implementing \
29    the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security \
30    (TLS v1) protocols as well as a full-strength general purpose \
31    cryptography library.
32
33master_sites        http://www.openssl.org/source/
34checksums           md5     d4f002bd22a56881340105028842ae1f \
35                    sha1    19d818e202558c212a9583fcdaf876995a633ddf \
36                    rmd160  e22c085189c6ce640378f0cc67faa512b4b873f2 \
37                    sha256  8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c
38
39depends_lib         port:zlib
40
41patchfiles          patch-Makefile.org.diff patch-crypto-Makefile.diff \
42                    patch-Makefile.org-parallel.diff \
43                    patch-bn_internal.pod.diff patch-Configure.diff \
44                    patch-null-absent.diff
45
46post-patch {
47    # Ensure that the correct compiler is used
48    reinplace "s|cc:|${configure.cc}:|" ${worksrcpath}/Configure
49    # use SDK if necessary
50    if {${configure.sdkroot} != ""} {
51        reinplace "s|\\(-arch \[_a-zA-Z0-9\]*\\)|\\1 -isysroot ${configure.sdkroot}|" ${worksrcpath}/Configure
52    }
53}
54
55configure.cmd       ./Configure
56configure.args      -L${prefix}/lib --openssldir=${prefix}/etc/openssl zlib no-krb5 shared
57configure.ccache    no
58
59destroot.destdir    INSTALL_PREFIX=${destroot}
60destroot.args       MANDIR=${prefix}/share/man MANSUFFIX=ssl
61
62test.run            yes
63test.dir            ${worksrcpath}/test
64test.target         alltests
65
66livecheck.type      regex
67livecheck.url       ${master_sites}
68livecheck.regex     ${name}-(\[0-9.\]+\[a-z\]?)\\.tar\\.gz
69
70variant rfc3779 description {enable RFC 3779: X.509 Extensions for IP Addresses and AS Identifiers} {
71    configure.args-append    enable-rfc3779
72}
73
74variant jpake description {enable JPAKE: Experimental protocol JPAKE} {
75        configure.args-append experimental-jpake
76}
77
78variant gmp description {enable GMP: Link with and utilize GMP math for big numbers} {
79        configure.args-append enable-gmp -lgmp
80        depends_lib-append port:gmp
81}
82
83variant deprecated description {enable deprecated: Support RC5, MD2, IDEA, and such old algorithms} {
84        configure.args-append enable-rc5 enable-md2 enable-idea
85}
86
87# code for universal build
88array set merger_configure_args {
89    ppc    darwin-ppc-cc
90    i386   darwin-i386-cc
91    ppc64  darwin64-ppc-cc
92    x86_64 darwin64-x86_64-cc
93}
94
95if { [variant_isset universal] } {
96    set merger_arch_compiler "no"
97
98    configure.universal_args-delete --disable-dependency-tracking
99
100    pre-destroot {
101        global merger_dont_diff
102        if { [llength ${universal_archs_to_use}] > 2 } {
103            lappend merger_dont_diff ${prefix}/include/openssl/opensslconf.h
104        }
105    }
106
107    # Do not set --host.
108    array set merger_host {
109        ppc    ""
110        i386   ""
111        ppc64  ""
112        x86_64 ""
113    }
114} elseif {[info exists merger_configure_args($build_arch)]} {
115    configure.args-append   $merger_configure_args($build_arch)
116}
117
118platform darwin 8 i386 {
119    configure.args-append no-asm
120}