source: trunk/dports/mail/imap-uw/Portfile @ 139229

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

misc: Change port:openssl dependency to path:lib/libssl.dylib:openssl

This should allow usage of libressl as a replacement for openssl in relevant
ports. Not all ports have been tested, but libressl aims for API
compatibility with OpenSSL, so it is expected to work.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.3 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 139229 2015-08-08 03:10:35Z jeremyhu@macports.org $
3
4PortSystem          1.0
5
6name                imap-uw
7version             2007f
8categories          mail
9license             Apache-2
10maintainers         nomaintainer
11description         University of Washington IMAP daemon
12long_description    IMAP (Internet Message Access Protocol) is a method \
13                    of accessing electronic messages kept on a (possibly \
14                    shared) mail server. This port provides the \
15                    University of Washington IMAP toolkit (IMAP \
16                    supporting software developed by the UW).
17homepage            http://www.washington.edu/imap/
18master_sites        ftp://ftp.cac.washington.edu/imap/ \
19                    ftp://ftp.cac.washington.edu/imap/old/
20platforms           darwin
21
22distname            imap-${version}
23extract.suffix      .tar.Z
24checksums           rmd160    14f40284e9e164c0ed7677f1e5d8e3309c7c58c1 \
25                    sha256  870e95f6bd19265832a88fd89b77c54c841c59022fd21e69254050c8b1005e3c
26
27depends_lib         path:lib/libssl.dylib:openssl port:gss
28
29use_configure       no
30use_parallel_build  no
31
32patchfiles          patch-Makefile.diff
33if {${os.platform} eq "darwin" && ${os.major} >= 10} {
34    patchfiles-append   patch-snowleopard.diff
35}
36post-patch {
37    reinplace s|SSLINCLUDE=\/usr|SSLINCLUDE=${prefix}|g ${worksrcpath}/Makefile
38    reinplace s|SSLLIB=\/usr|SSLLIB=${prefix}|g ${worksrcpath}/Makefile
39    reinplace s|GSSINCLUDE=\/usr|GSSINCLUDE=${prefix}|g ${worksrcpath}/Makefile
40    reinplace s|GSSLIB=\/usr|GSSLIB=${prefix}|g ${worksrcpath}/Makefile
41}
42
43build.target        osx
44# Enable IPv6 support
45build.args-append   IP6=6
46# Ensure we're UsingTheRightCompiler
47build.args-append   CC=${configure.cc}
48# Force SSL connections: no unecrypted plaintext authenication
49build.args          SSLTYPE=nopwd
50
51variant ssl_plain description {Allow unencrypted plaintext authentication} {
52    build.args-delete   SSLTYPE=nopwd
53    build.args-append   SSLTYPE=unix
54}
55
56# Variant to enable SSL with PAM support for Mac OS X
57variant ssl_pam description { Enable PAM support } {
58    build.target    oxp
59
60    post-destroot {
61        xinstall -m 0644 ${filespath}/README-MACOSX \
62            ${filespath}/etc-pam.d-imap \
63            ${filespath}/etc-xinetd.d-imap \
64            ${filespath}/etc-xinetd.d-imaps \
65            ${destroot}${prefix}/share/doc/${name}/
66        reinplace "s|__PREFIX|${prefix}|" \
67            ${filespath}/README-MACOSX \
68            ${destroot}${prefix}/share/doc/${name}/etc-xinetd.d-imap \
69            ${destroot}${prefix}/share/doc/${name}/etc-xinetd.d-imaps
70    }
71}
72
73# Variant to set the default for creating new mailboxes to "mbx" format
74variant mbx conflicts mix description { default new mailboxes to "mbx" format } {
75    build.args-append   CREATEPROTO=mbxproto
76}
77
78# Variant to set the default for creating new mailboxes to "mix" format
79variant mix conflicts mbx description { default new mailboxes to "mix" format } {
80    build.args-append   CREATEPROTO=mixproto
81}
82
83# Variant to set the default mail subdirectory name to "Mail"
84variant subdir description { set the contents of ~/.imap/MailboxDir.rc or else "Mail" as subdirectory name } {
85    patchfiles-append   patch-env_unix.c.diff
86}
87
88destroot {
89    # Warn user if not running as root
90    if {[geteuid] != 0} {
91        ui_msg "-----------------------------------------------------------"
92        ui_msg "Note that you are not running as root, so files installed"
93        ui_msg "by this port will not end up with proper ownership and"
94        ui_msg "will likely not work correctly."
95        ui_msg "-----------------------------------------------------------"
96    }
97    xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
98    xinstall -m 0755 ${worksrcpath}/imapd/imapd ${destroot}${prefix}/libexec
99    xinstall -m 0755 ${worksrcpath}/ipopd/ipop2d ${destroot}${prefix}/libexec
100    xinstall -m 0755 ${worksrcpath}/ipopd/ipop3d ${destroot}${prefix}/libexec
101    xinstall -m 0755 ${worksrcpath}/mailutil/mailutil ${destroot}${prefix}/bin
102    xinstall -m 0755 ${worksrcpath}/tmail/tmail ${destroot}${prefix}/bin
103    xinstall -m 0755 ${worksrcpath}/dmail/dmail ${destroot}${prefix}/bin
104    xinstall -m 0755 ${worksrcpath}/mtest/mtest ${destroot}${prefix}/bin/mboxtest
105    if {[geteuid] == 0} {
106        xinstall -g mail -m 2711 ${worksrcpath}/mlock/mlock ${destroot}${prefix}/libexec
107    } else {
108        xinstall -m 0711 ${worksrcpath}/mlock/mlock ${destroot}${prefix}/libexec
109    }
110    xinstall -m 0755 ${worksrcpath}/src/imapd/imapd.8 ${destroot}${prefix}/share/man/man8
111    xinstall -m 0755 ${worksrcpath}/src/ipopd/ipopd.8 ${destroot}${prefix}/share/man/man8
112    xinstall -m 0755 ${worksrcpath}/src/mailutil/mailutil.1 ${destroot}${prefix}/share/man/man1
113    xinstall -m 0755 ${worksrcpath}/src/tmail/tmail.1 ${destroot}${prefix}/share/man/man1
114    xinstall -m 0755 ${worksrcpath}/src/dmail/dmail.1 ${destroot}${prefix}/share/man/man1
115    xinstall -m 0644 ${worksrcpath}/docs/RELNOTES ${destroot}${prefix}/share/doc/${name}
116    xinstall -m 0644 ${worksrcpath}/docs/FAQ.html ${destroot}${prefix}/share/doc/${name}
117    xinstall -m 0644 {*}[glob ${worksrcpath}/docs/*.txt] ${destroot}${prefix}/share/doc/${name}
118}
119
120
121livecheck.type      regex
122livecheck.url       ${homepage}documentation/RELNOTES.html
123livecheck.regex     "imap-(\\d{4}.?) "
Note: See TracBrowser for help on using the repository browser.