1 | # $Id: Portfile 131360 2015-01-10 13:51:17Z cal@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup muniversal 1.0 |
---|
5 | |
---|
6 | name openssl |
---|
7 | version 1.0.1k |
---|
8 | epoch 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 | |
---|
19 | platforms darwin |
---|
20 | categories devel security |
---|
21 | maintainers mww |
---|
22 | homepage http://www.openssl.org/ |
---|
23 | license OpenSSL SSLeay |
---|
24 | description OpenSSL SSL/TLS cryptography library |
---|
25 | |
---|
26 | long_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 | |
---|
33 | master_sites http://www.openssl.org/source/ |
---|
34 | checksums md5 d4f002bd22a56881340105028842ae1f \ |
---|
35 | sha1 19d818e202558c212a9583fcdaf876995a633ddf \ |
---|
36 | rmd160 e22c085189c6ce640378f0cc67faa512b4b873f2 \ |
---|
37 | sha256 8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c |
---|
38 | |
---|
39 | depends_lib port:zlib |
---|
40 | |
---|
41 | patchfiles 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 | |
---|
46 | post-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 | |
---|
55 | configure.cmd ./Configure |
---|
56 | configure.args -L${prefix}/lib --openssldir=${prefix}/etc/openssl zlib no-krb5 shared |
---|
57 | configure.ccache no |
---|
58 | |
---|
59 | destroot.destdir INSTALL_PREFIX=${destroot} |
---|
60 | destroot.args MANDIR=${prefix}/share/man MANSUFFIX=ssl |
---|
61 | |
---|
62 | test.run yes |
---|
63 | test.dir ${worksrcpath}/test |
---|
64 | test.target alltests |
---|
65 | |
---|
66 | livecheck.type regex |
---|
67 | livecheck.url ${master_sites} |
---|
68 | livecheck.regex ${name}-(\[0-9.\]+\[a-z\]?)\\.tar\\.gz |
---|
69 | |
---|
70 | variant rfc3779 description {enable RFC 3779: X.509 Extensions for IP Addresses and AS Identifiers} { |
---|
71 | configure.args-append enable-rfc3779 |
---|
72 | } |
---|
73 | |
---|
74 | variant jpake description {enable JPAKE: Experimental protocol JPAKE} { |
---|
75 | configure.args-append experimental-jpake |
---|
76 | } |
---|
77 | |
---|
78 | variant 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 | |
---|
83 | variant 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 |
---|
88 | array 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 | |
---|
95 | if { [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 | |
---|
118 | platform darwin 8 i386 { |
---|
119 | configure.args-append no-asm |
---|
120 | } |
---|