1 | # -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 117601 2014-03-04 23:24:09Z larryv@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup muniversal 1.0 |
---|
6 | |
---|
7 | name gnutls |
---|
8 | version 3.1.22 |
---|
9 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
10 | categories devel security |
---|
11 | # yes, some of the libs are GPL only |
---|
12 | license LGPL-2.1+ GPL-3+ |
---|
13 | maintainers nomaintainer |
---|
14 | description GNU Transport Layer Security Library |
---|
15 | homepage http://www.gnutls.org/ |
---|
16 | platforms darwin |
---|
17 | |
---|
18 | long_description \ |
---|
19 | GnuTLS is a portable ANSI C based library which implements the TLS 1.2, \ |
---|
20 | TLS 1.1, TLS 1.0, SSL 3.0, and Datagram TLS protocols. The library does \ |
---|
21 | not include any patented algorithms \ |
---|
22 | and is available under the GNU Lesser General Public License (LGPL). |
---|
23 | |
---|
24 | master_sites ftp://ftp.gnutls.org/gcrypt/gnutls/v${branch}/ |
---|
25 | |
---|
26 | checksums md5 dbce77e502a5643961d3683b6e8f3bd5 \ |
---|
27 | rmd160 e2f229dc28cb3c6aafe9064d9b043f7fdfcdc81f \ |
---|
28 | sha256 ef1aedf4118f2f7c75c1a13094ec70cdff92cb724d0413333b4079ea492b9dce |
---|
29 | |
---|
30 | use_xz yes |
---|
31 | |
---|
32 | depends_build port:pkgconfig \ |
---|
33 | port:gettext |
---|
34 | |
---|
35 | depends_lib port:gmp \ |
---|
36 | port:libidn \ |
---|
37 | port:libtasn1 \ |
---|
38 | port:p11-kit \ |
---|
39 | port:nettle |
---|
40 | |
---|
41 | post-patch { |
---|
42 | # Remove comments which confuse at least Leopard's assembler. |
---|
43 | eval reinplace {/^#/d} [glob ${worksrcpath}/lib/accelerated/x86/macosx/*.s] |
---|
44 | } |
---|
45 | |
---|
46 | use_autoreconf yes |
---|
47 | autoreconf.args -fvi |
---|
48 | |
---|
49 | configure.args --disable-guile \ |
---|
50 | --disable-silent-rules \ |
---|
51 | --with-p11-kit |
---|
52 | |
---|
53 | # include time.h before config.h, or the standard C functions are never defined |
---|
54 | patchfiles gnutls-timeh.patch |
---|
55 | |
---|
56 | if {[variant_isset universal]} { |
---|
57 | set merger_host(x86_64) x86_64-apple-${os.platform}${os.major} |
---|
58 | set merger_host(i386) i686-apple-${os.platform}${os.major} |
---|
59 | set merger_host(ppc) ppc-apple-${os.platform}${os.major} |
---|
60 | set merger_host(ppc64) ppc64-apple-${os.platform}${os.major} |
---|
61 | set merger_configure_args(x86_64) "--host=${build_arch}-apple-${os.platform}${os.major} --build=x86_64-apple-${os.platform}${os.major}" |
---|
62 | set merger_configure_args(i386) "--host=${build_arch}-apple-${os.platform}${os.major} --build=i686-apple-${os.platform}${os.major}" |
---|
63 | set merger_configure_args(ppc) "--host=${build_arch}-apple-${os.platform}${os.major} --build=ppc-apple-${os.platform}${os.major}" |
---|
64 | set merger_configure_args(ppc64) "--host=${build_arch}-apple-${os.platform}${os.major} --build=ppc64-apple-${os.platform}${os.major}" |
---|
65 | } elseif {${build_arch} eq "i386"} { |
---|
66 | configure.args-append \ |
---|
67 | --host=i686-apple-${os.platform}${os.major} \ |
---|
68 | --build=i686-apple-${os.platform}${os.major} |
---|
69 | } elseif {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64" || ${build_arch} eq "ppc"} { |
---|
70 | configure.args-append \ |
---|
71 | --host=${build_arch}-apple-${os.platform}${os.major} \ |
---|
72 | --build=${build_arch}-apple-${os.platform}${os.major} |
---|
73 | } |
---|
74 | |
---|
75 | test.run yes |
---|
76 | test.target check |
---|
77 | |
---|
78 | post-destroot { |
---|
79 | move ${destroot}${prefix}/bin/certtool ${destroot}${prefix}/bin/gnutls-certtool |
---|
80 | } |
---|
81 | |
---|
82 | platform darwin 8 { |
---|
83 | depends_build-append port:texinfo |
---|
84 | } |
---|
85 | |
---|
86 | livecheck.type regex |
---|
87 | livecheck.url ${master_sites} |
---|
88 | livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}" |
---|