source: trunk/dports/security/cyrus-sasl2/Portfile @ 129012

Last change on this file since 129012 was 129012, checked in by larryv@…, 4 years ago

cyrus-sasl2: Restrict +universal to host-compatible archs (#36782)

Cyrus SASL's build executes binaries, so we have to restrict universal
builds to the set of architectures that the host can handle.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
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 129012 2014-12-03 08:10:41Z larryv@macports.org $
3
4PortSystem              1.0
5PortGroup               muniversal 1.0
6
7name                    cyrus-sasl2
8version                 2.1.26
9revision                4
10categories              security net
11platforms               darwin
12# license is BSD plus a fourth (almost redundant) acknowledgement clause
13license                 Permissive
14maintainers             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
27merger_must_run_binaries    yes
28
29homepage                http://cyrusimap.org/
30master_sites            http://cyrusimap.org/releases/ \
31                        ftp://ftp.cyrusimap.org/cyrus-sasl/
32distname                cyrus-sasl-${version}
33
34checksums               rmd160  861a06d663cf3da37a198d0f971d99b249b5f4b8 \
35                        sha256  8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3
36
37depends_lib             port:openssl \
38                        port:zlib
39
40default_variants        +kerberos
41
42patchfiles              patch-libsasl2.pc.in.diff \
43                        patch-ltconfig_rpath_fallback.diff \
44                        patch-utils_Makefile.in.diff \
45                        patch-sasl.h-size_t.diff
46
47configure.args          --mandir=${prefix}/share/man \
48                        --with-openssl=${prefix} \
49                        --with-dbpath=${prefix}/etc/sasldb2 \
50                        --with-plugindir=${prefix}/lib/sasl2 \
51                        --with-saslauthd=${prefix}/var/state/saslauthd \
52                        --with-pwcheck=${prefix}/var/pwcheck \
53                        --disable-gssapi \
54                        --disable-macos-framework \
55                        --enable-srp \
56                        --enable-srp-setpass \
57                        --enable-login \
58                        --enable-ntlm \
59                        --with-rc4=openssl
60
61use_parallel_build      no
62
63#universal_variant       no
64
65# This is a start towards universal... lib/Makefile.am and sasldb/Makefile.am need to be updated to not do blind ar-fu
66#post-extract {
67#    system "rm ${worksrcpath}/config/libtool.m4"
68#}
69
70#use_autoreconf          yes
71#autoreconf.args         -fvi
72#autoreconf.env          ACLOCAL="aclocal -I${worksrcpath}/cmulocal -I${worksrcpath}/config"
73
74# This is a horrible hackaround as replacing the ar-fu as mentioned above is non-trivial
75pre-build {
76    if {[variant_isset universal]} {
77        foreach arch ${universal_archs_to_use} {
78            reinplace -E "s|^CC=\\\"(\[^\\\"\]+)\\\"|CC=\"\\1 [muniversal_get_arch_flag ${arch}]\"|g" ${worksrcpath}-${arch}/libtool
79        }
80    } else {
81        reinplace -E "s|^CC=\\\"(\[^\\\"\]+)\\\"|CC=\"\\1 ${configure.cc_archflags}\"|g" ${worksrcpath}/libtool
82    }
83}
84
85destroot.keepdirs       ${destroot}${prefix}/var/state/saslauthd \
86                        ${destroot}${prefix}/var/pwcheck
87
88post-destroot {
89    xinstall -d \
90        ${destroot}${prefix}/share/doc \
91        ${destroot}${prefix}/var/state/saslauthd \
92        ${destroot}${prefix}/var/pwcheck
93   
94    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
95}
96
97variant kerberos description "Enable Kerberos support" {
98    configure.args-append   --enable-keep-db-open
99   
100    if {${os.platform} eq "darwin"} {
101        depends_lib-append  port:kerberos5
102        configure.args-replace  --disable-gssapi --enable-gssapi=${prefix}
103        configure.args-append   --with-gss_impl=mit
104    }
105    if {${os.platform} eq "freebsd"} {
106        depends_lib-append  port:heimdal
107        configure.args-replace  --disable-gssapi --enable-gssapi=${prefix}
108        configure.args-append   --with-gss_impl=heimdal
109    }
110}
111
112variant sql description "Enable SQL support" {
113    depends_lib-append      port:sqlite3
114    configure.args-append   --enable-sql
115}
116
117# doesn't work, ticket #22093
118#variant static description "Build static library" {
119#    configure.args-append   --enable-static
120#}
121
122livecheck.type          regex
123livecheck.regex         {cyrus-sasl-(\d+(?:\.\d+)*)\.tar\.gz}
Note: See TracBrowser for help on using the repository browser.