1 | # $Id: Portfile 29845 2007-10-12 08:26:07Z mww@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name openssl |
---|
5 | version 0.9.8f |
---|
6 | platforms darwin freebsd |
---|
7 | categories devel security |
---|
8 | maintainers mww |
---|
9 | homepage http://www.openssl.org/ |
---|
10 | description OpenSSL SSL/TLS cryptography library |
---|
11 | |
---|
12 | long_description \ |
---|
13 | The OpenSSL Project is a collaborative effort to develop a robust, \ |
---|
14 | commercial-grade, full-featured, and Open Source toolkit implementing \ |
---|
15 | the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security \ |
---|
16 | (TLS v1) protocols as well as a full-strength general purpose \ |
---|
17 | cryptography library. |
---|
18 | |
---|
19 | master_sites http://www.openssl.org/source/ |
---|
20 | checksums md5 114bf908eb1b293d11d3e6b18a09269f \ |
---|
21 | sha1 e8716370093b112763ace0c66c06a0d6049e413b \ |
---|
22 | rmd160 ad0d9d8b238dbede1aa6b76256d11038bd281e05 |
---|
23 | |
---|
24 | depends_lib port:zlib |
---|
25 | |
---|
26 | platform darwin { |
---|
27 | patchfiles patch-Makefile.org patch-crypto-Makefile |
---|
28 | } |
---|
29 | |
---|
30 | configure.cmd ./config |
---|
31 | configure.args -L${prefix}/lib --openssldir=${prefix}/etc/openssl zlib no-asm no-krb5 shared |
---|
32 | |
---|
33 | platform darwin 6 { |
---|
34 | depends_lib-append port:dlcompat |
---|
35 | } |
---|
36 | |
---|
37 | platform darwin 8 { |
---|
38 | build.args CC=/usr/bin/gcc-4.0 |
---|
39 | } |
---|
40 | |
---|
41 | destroot.destdir INSTALL_PREFIX=${destroot} |
---|
42 | destroot.args MANDIR=${prefix}/share/man |
---|
43 | |
---|
44 | test.run yes |
---|
45 | |
---|
46 | livecheck.check regex |
---|
47 | livecheck.url ${master_sites} |
---|
48 | livecheck.regex ${name}-(0.9.8\[a-z\]) |
---|
49 | |
---|
50 | variant universal { |
---|
51 | |
---|
52 | # port-specific procedure |
---|
53 | proc clean {} { |
---|
54 | system "make clean" |
---|
55 | foreach f [glob lib*.a lib*.*.*.*.dylib] { |
---|
56 | file delete ${f} |
---|
57 | } |
---|
58 | } |
---|
59 | |
---|
60 | # i386 |
---|
61 | # configure |
---|
62 | pre-configure { |
---|
63 | cd ${worksrcpath} |
---|
64 | system "./Configure darwin-i386-cc ${configure.pre_args} ${configure.args}" |
---|
65 | system "patch < ${filespath}/patch-Makefiles-universal-i386" |
---|
66 | reinplace "s|^PROCESSOR=.*|PROCESSOR=|" Makefile |
---|
67 | } |
---|
68 | # build |
---|
69 | configure { |
---|
70 | cd ${worksrcpath} |
---|
71 | system "make" |
---|
72 | } |
---|
73 | # backup, clean up |
---|
74 | post-configure { |
---|
75 | cd ${worksrcpath} |
---|
76 | # get list of files to be backed up - only needs to be done once |
---|
77 | fs-traverse file . { |
---|
78 | if {![string equal [string range [file tail $file] end-1 end] .o]} { |
---|
79 | set type [exec file -b $file] |
---|
80 | if {[regexp {(Mach-O|ar archive)} $type]} { |
---|
81 | global universal_filelist |
---|
82 | lappend universal_filelist $file |
---|
83 | } |
---|
84 | } |
---|
85 | } |
---|
86 | |
---|
87 | backup i386 |
---|
88 | |
---|
89 | clean |
---|
90 | } |
---|
91 | # ppc |
---|
92 | # configure |
---|
93 | pre-build { |
---|
94 | cd ${worksrcpath} |
---|
95 | system "./Configure darwin-ppc-cc ${configure.pre_args} ${configure.args}" |
---|
96 | system "patch < ${filespath}/patch-Makefiles-universal-ppc" |
---|
97 | } |
---|
98 | # build |
---|
99 | build { |
---|
100 | cd ${worksrcpath} |
---|
101 | system "make" |
---|
102 | } |
---|
103 | # backup |
---|
104 | post-build { |
---|
105 | cd ${worksrcpath} |
---|
106 | # there's already a list of files to be backed up |
---|
107 | |
---|
108 | global fileList |
---|
109 | |
---|
110 | backup ppc |
---|
111 | |
---|
112 | clean |
---|
113 | } |
---|
114 | |
---|
115 | # universal |
---|
116 | pre-destroot { |
---|
117 | cd ${worksrcpath} |
---|
118 | global fileList |
---|
119 | system "make openssl.pc libssl.pc libcrypto.pc" |
---|
120 | lipo |
---|
121 | system "patch < ${filespath}/patch-Makefile-universal-install" |
---|
122 | } |
---|
123 | destroot.target install_docs install_sw |
---|
124 | |
---|
125 | # the test suite can only be run *after* destrooting |
---|
126 | test.run yes |
---|
127 | test.dir ${worksrcpath}/test |
---|
128 | test.target alltests |
---|
129 | } |
---|