Ticket #40885: Portfile

File Portfile, 4.4 KB (added by carter.tjoseph@…, 11 years ago)

Someone suggested attaching the updated Portfile on irc

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 102460 2013-02-03 22:40:19Z cal@macports.org $
3
4PortSystem              1.0
5PortGroup               muniversal 1.0
6
7name                    cyrus-sasl2
8version                 2.1.26
9revision                0
10categories              security net
11platforms               darwin
12# license is BSD plus a fourth (almost redundant) acknowledgement clause
13license                 Permissive
14maintainers             jmpp landonf openmaintainer
15
16description             SASL is an authentication library.
17
18long_description        SASL is the Simple Authentication and Security Layer, \
19                        a method for adding authentication support to \
20                        connection-based protocols. To use SASL, a protocol \
21                        includes a command for identifying and authenticating \
22                        a user to a server and for optionally negotiating \
23                        protection of subsequent protocol interactions. If \
24                        its use is negotiated, a security layer is inserted \
25                        between the protocol and the connection.
26
27homepage                http://asg.web.cmu.edu/sasl/
28master_sites            http://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
29                        ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
30distname                cyrus-sasl-${version}
31
32checksums               rmd160  861a06d663cf3da37a198d0f971d99b249b5f4b8 \
33                        sha256  8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3
34
35
36depends_lib             port:openssl \
37                        port:zlib
38
39default_variants        +kerberos
40
41configure.args          --mandir=${prefix}/share/man \
42                        --with-openssl=${prefix} \
43                        --with-dbpath=${prefix}/etc/sasldb2 \
44                        --with-plugindir=${prefix}/lib/sasl2 \
45                        --with-saslauthd=${prefix}/var/state/saslauthd \
46                        --with-pwcheck=${prefix}/var/pwcheck \
47                        --disable-macos-framework \
48                        --enable-srp \
49                        --enable-srp-setpass \
50                        --enable-login \
51                        --enable-ntlm \
52                        --with-rc4=openssl
53
54use_parallel_build      no
55
56#universal_variant       no
57
58# This is a start towards universal... lib/Makefile.am and sasldb/Makefile.am need to be updated to not do blind ar-fu
59#post-extract {
60#    system "rm ${worksrcpath}/config/libtool.m4"
61#}
62
63#use_autoreconf          yes
64#autoreconf.args         -fvi
65#autoreconf.env          ACLOCAL="aclocal -I${worksrcpath}/cmulocal -I${worksrcpath}/config"
66
67# This is a horrible hackaround as replacing the ar-fu as mentioned above is non-trivial
68pre-build {
69    if {[variant_isset universal]} {
70        foreach arch ${universal_archs_to_use} {
71            reinplace -E "s|^CC=\\\"(\[^\\\"\]+)\\\"|CC=\"\\1 [muniversal_get_arch_flag ${arch}]\"|g" ${worksrcpath}-${arch}/libtool
72        }
73    } else {
74        reinplace -E "s|^CC=\\\"(\[^\\\"\]+)\\\"|CC=\"\\1 ${configure.cc_archflags}\"|g" ${worksrcpath}/libtool
75    }
76}
77
78destroot.keepdirs       ${destroot}${prefix}/var/state/saslauthd \
79                        ${destroot}${prefix}/var/pwcheck
80
81post-destroot {
82    xinstall -d \
83        ${destroot}${prefix}/share/doc \
84        ${destroot}${prefix}/var/state/saslauthd \
85        ${destroot}${prefix}/var/pwcheck
86   
87    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
88}
89
90variant kerberos description "Enable Kerberos support" {
91    configure.args-append   --enable-keep-db-open
92   
93    if {${os.platform} == "darwin"} {
94        depends_lib-append  port:kerberos5
95        configure.args-append --with-gss_impl=mit \
96            --enable-gssapi=${prefix}
97    }
98    if {${os.platform} == "freebsd"} {
99        depends_lib-append  port:heimdal
100        configure.args-append --with-gss_impl=heimdal \
101            --enable-gssapi=${prefix}/libexec/heimdal
102    }
103}
104
105variant sql description "Enable SQL support" {
106    depends_lib-append      port:sqlite3
107    configure.args-append   --enable-sql
108}
109
110# doesn't work, ticket #22093
111#variant static description "Build static library" {
112#    configure.args-append   --enable-static
113#}
114
115livecheck.type          regex
116livecheck.url           http://ftp.andrew.cmu.edu/pub/cyrus-mail/
117livecheck.regex         {cyrus-sasl-(\d+(?:\.\d+)*)\.tar\.gz}