Ticket #43753: Portfile

File Portfile, 3.3 KB (added by devernay (Frédéric Devernay), 10 years ago)

modified Portfile

Line 
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
4PortSystem 1.0
5PortGroup  muniversal 1.0
6
7name            gnutls
8version         3.1.22
9set branch      [join [lrange [split ${version} .] 0 1] .]
10categories      devel security
11# yes, some of the libs are GPL only
12license         LGPL-2.1+ GPL-3+
13maintainers     nomaintainer
14description     GNU Transport Layer Security Library
15homepage        http://www.gnutls.org/
16platforms       darwin
17
18long_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
24master_sites    ftp://ftp.gnutls.org/gcrypt/gnutls/v${branch}/
25
26checksums       md5     dbce77e502a5643961d3683b6e8f3bd5 \
27                rmd160  e2f229dc28cb3c6aafe9064d9b043f7fdfcdc81f \
28                sha256  ef1aedf4118f2f7c75c1a13094ec70cdff92cb724d0413333b4079ea492b9dce
29
30use_xz          yes
31
32depends_build   port:pkgconfig \
33                port:gettext
34
35depends_lib     port:gmp \
36                port:libidn \
37                port:libtasn1 \
38                port:p11-kit \
39                port:nettle
40
41post-patch {
42    # Remove comments which confuse at least Leopard's assembler.
43    eval reinplace {/^#/d} [glob ${worksrcpath}/lib/accelerated/x86/macosx/*.s]
44}
45
46use_autoreconf  yes
47autoreconf.args -fvi
48
49configure.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
54patchfiles gnutls-timeh.patch
55
56if {[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
75test.run        yes
76test.target     check
77
78post-destroot {
79    move ${destroot}${prefix}/bin/certtool ${destroot}${prefix}/bin/gnutls-certtool
80}
81
82platform darwin 8 {
83    depends_build-append   port:texinfo
84}
85
86livecheck.type  regex
87livecheck.url   ${master_sites}
88livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"