source: trunk/dports/devel/gnutls/Portfile

Last change on this file was 153774, checked in by mps@…, 12 months ago

gnutls: use p11-kit for trust store (#52508), take 2.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 KB
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 153774 2016-10-10 23:47:01Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       muniversal 1.0
6
7name            gnutls
8version         3.4.16
9revision        1
10set branch      [join [lrange [split ${version} .] 0 1] .]
11categories      devel security
12# yes, some of the libs are GPL only
13license         LGPL-2.1+ GPL-3+
14maintainers     mps openmaintainer
15description     GNU Transport Layer Security Library
16homepage        http://www.gnutls.org/
17platforms       darwin
18
19long_description \
20    GnuTLS is a portable ANSI C based library which implements the TLS 1.2, \
21    TLS 1.1, TLS 1.0, SSL 3.0, and Datagram TLS protocols. The library does \
22    not include any patented algorithms \
23    and is available under the GNU Lesser General Public License (LGPL).
24
25master_sites    ftp://ftp.gnutls.org/gcrypt/gnutls/v${branch}/ \
26                http://archive.hmug.org/src/gnutls/ \
27                http://mirrors.dotsrc.org/gcrypt/gnutls/v${branch}/
28
29checksums       rmd160  a9ec303e93396ab8f7b0ddf57c9a19e7fd0a0322 \
30                sha256  d99abb1b320771b58c949bab85e4b654dd1e3e9d92e2572204b7dc479d923927
31
32use_xz          yes
33
34depends_build   port:gettext \
35                port:pkgconfig
36
37depends_lib     port:gmp \
38                port:libidn \
39                port:libtasn1 \
40                port:p11-kit \
41                port:nettle \
42                port:zlib
43
44patchfiles      patch-tests-pkcs11-pkcs11-mock.c.diff
45
46post-patch {
47    # Remove comments which confuse at least Leopard's assembler.
48    reinplace {/^#/d} {*}[glob ${worksrcpath}/lib/accelerated/x86/macosx/*.s]
49}
50
51# use autoreconf to update glibtool to correctly handle -std
52use_autoreconf  yes
53autoreconf.args -fvi
54
55configure.args  --disable-guile \
56                --disable-silent-rules \
57                --disable-libdane \
58                --enable-local-libopts \
59                --enable-openssl-compatibility \
60                --with-p11-kit \
61                --with-system-priority-file="${prefix}/etc/gnutls/default-priorities" \
62                --with-default-trust-store-pkcs11=pkcs11: \
63                ac_cv_prog_AWK=/usr/bin/awk
64
65variant dane description {Build libdane using unbound libraries} {
66    depends_lib-append      port:unbound
67    configure.args-append   --with-unbound-root-key-file="${prefix}/var/run/unbound/root.key"
68    configure.args-delete   --disable-libdane
69}
70
71# as of r120660 (#43881) unbound installs its root key file at ${prefix}/var/run/unbound/root.key
72# the following may be superfluous
73
74if {[variant_isset dane] && ![file exists ${prefix}/var/run/unbound/root.key]} {
75    notes "
76***
77*** WARNING:
78***
79*** The DNSSEC root key file in ${prefix}/var/run/unbound/root.key was not found.
80*** This file is needed for the verification of DNSSEC responses.
81*** Use the command: sudo unbound-anchor -a \"${prefix}/var/run/unbound/root.key\"
82*** to generate or update it.
83***
84"
85}
86
87if {[variant_isset universal]} {
88    set merger_host(x86_64) x86_64-apple-${os.platform}${os.major}
89    set merger_host(i386) i686-apple-${os.platform}${os.major}
90    set merger_configure_args(x86_64) --build=x86_64-apple-${os.platform}${os.major}
91    set merger_configure_args(i386) --build=i686-apple-${os.platform}${os.major}
92} elseif {${build_arch} eq "i386"} {
93    configure.args-append \
94        --host=i686-apple-${os.platform}${os.major} \
95        --build=i686-apple-${os.platform}${os.major}
96} elseif {${build_arch} eq "x86_64"} {
97    configure.args-append \
98        --host=${build_arch}-apple-${os.platform}${os.major} \
99        --build=${build_arch}-apple-${os.platform}${os.major}
100}
101
102test.run        yes
103test.target     check
104
105post-destroot {
106    move ${destroot}${prefix}/bin/certtool ${destroot}${prefix}/bin/gnutls-certtool
107    move ${destroot}${prefix}/share/man/man1/certtool.1 ${destroot}${prefix}/share/man/man1/gnutls-certtool.1
108}
109
110platform darwin 8 {
111    depends_build-append   port:texinfo
112}
113
114livecheck.type  regex
115livecheck.url   [lindex ${master_sites} 0]
116livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.