Ticket #53975: Portfile

File Portfile, 4.2 KB (added by Schamschula (Marius Schamschula), 8 years ago)
Line 
1# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
2
3PortSystem      1.0
4
5PortGroup       compiler_blacklist_versions 1.0
6PortGroup       muniversal 1.0
7
8name            gnutls
9version         3.5.11
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 @Schamschula} 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://mirrors.dotsrc.org/gcrypt/gnutls/v${branch}/
27
28checksums       rmd160  9bcca977d51a7a8a0bdaf11c7f7edd3776fffeb6 \
29                sha256  51765cc5579e250da77fbd7871507c517d01b15353cc40af7b67e9ec7b6fe28f
30
31use_xz          yes
32
33depends_build   port:gettext \
34                port:pkgconfig
35
36depends_lib     port:gmp \
37                port:libidn \
38                port:libtasn1 \
39                port:libunistring \
40                port:p11-kit \
41                port:nettle \
42                port:zlib
43
44patchfiles      patch-lib-system-certs.c.diff \
45                patch-tests-pkcs11-pkcs11-mock.c.diff
46
47post-patch {
48    # Remove comments which confuse at least Leopard's assembler.
49    reinplace {/^#/d} {*}[glob ${worksrcpath}/lib/accelerated/x86/macosx/*.s]
50}
51
52# use autoreconf to update glibtool to correctly handle -std
53use_autoreconf  yes
54autoreconf.args -fvi
55
56configure.args  --disable-guile \
57                --disable-silent-rules \
58                --disable-libdane \
59                --enable-local-libopts \
60                --enable-openssl-compatibility \
61                --with-p11-kit \
62                --with-system-priority-file="${prefix}/etc/gnutls/default-priorities" \
63                --with-default-trust-store-pkcs11=pkcs11: \
64                ac_cv_prog_AWK=/usr/bin/awk
65
66variant dane description {Build libdane using unbound libraries} {
67    depends_lib-append      port:unbound
68    configure.args-append   --with-unbound-root-key-file="${prefix}/var/run/unbound/root.key"
69    configure.args-delete   --disable-libdane
70}
71
72# as of r120660 (#43881) unbound installs its root key file at ${prefix}/var/run/unbound/root.key
73# the following may be superfluous
74
75if {[variant_isset dane] && ![file exists ${prefix}/var/run/unbound/root.key]} {
76    notes "
77***
78*** WARNING:
79***
80*** The DNSSEC root key file in ${prefix}/var/run/unbound/root.key was not found.
81*** This file is needed for the verification of DNSSEC responses.
82*** Use the command: sudo unbound-anchor -a \"${prefix}/var/run/unbound/root.key\"
83*** to generate or update it.
84***
85"
86}
87
88if {[variant_isset universal]} {
89    set merger_host(x86_64) x86_64-apple-${os.platform}${os.major}
90    set merger_host(i386) i686-apple-${os.platform}${os.major}
91    set merger_configure_args(x86_64) --build=x86_64-apple-${os.platform}${os.major}
92    set merger_configure_args(i386) --build=i686-apple-${os.platform}${os.major}
93} elseif {${build_arch} eq "i386"} {
94    configure.args-append \
95        --host=i686-apple-${os.platform}${os.major} \
96        --build=i686-apple-${os.platform}${os.major}
97} elseif {${build_arch} eq "x86_64"} {
98    configure.args-append \
99        --host=${build_arch}-apple-${os.platform}${os.major} \
100        --build=${build_arch}-apple-${os.platform}${os.major}
101}
102
103test.run        yes
104test.target     check
105
106post-destroot {
107    move ${destroot}${prefix}/bin/certtool ${destroot}${prefix}/bin/gnutls-certtool
108    move ${destroot}${prefix}/share/man/man1/certtool.1 ${destroot}${prefix}/share/man/man1/gnutls-certtool.1
109}
110
111platform darwin 8 {
112    depends_build-append   port:texinfo
113}
114
115if { ${build_arch} eq "i386" || ${build_arch} eq "x86_64" } {
116    compiler.blacklist-append *gcc-4.2
117    compiler.blacklist-append {clang < 400}
118}
119
120livecheck.type  regex
121livecheck.url   [lindex ${master_sites} 0]
122livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"