Ticket #2706: Portfile

File Portfile, 2.9 KB (added by shadow@…, 20 years ago)

new Portfile for fetchmail

Line 
1# $Id: Portfile,v 1.4 2004/03/19 23:18:43 mij Exp $
2PortSystem 1.0
3name            fetchmail
4version         6.2.5
5revision        1
6categories      mail
7maintainers     rshaw@opendarwin.org
8description     Batch mail retrieval utility for IMAP, POP2, POP3, \
9                APOP, KPOP, ETRN, or ODMR
10long_description        Fetchmail is a full-featured IMAP, POP2, POP3, \
11                        APOP, KPOP, ETRN, ODMR client with easy \
12                        configuration, daemon mode, forwarding via SMTP \
13                        or local MDA, and superior reply handling.  It \
14                        is used to handle intermittent email connections \
15                        by acting as a coupling that seamlessly batch \
16                        forwards fetched mail from your mail server to \
17                        your local delivery system, allowing you to read \
18                        your it with your favourite mail user agent. \
19                        Fetchmail also includes useful spam filtering \
20                        and multi-user functions.  \
21                        A typical use of fetchmail is to connect to your \
22                        ISP's POP3 server, downloading your mail into \
23                        the INBOX on your local computer.  You may then \
24                        read the mail, offline if you want, using Pine, \
25                        mutt, or any standard mail user agent.   \
26                        Fetchmail is the lineal descendant of and \
27                        replacement for the old popclient program.
28homepage        http://www.catb.org/~esr/fetchmail/
29master_sites    http://www.catb.org/~esr/fetchmail/ \
30                ftp://ftp.ccil.org/pub/esr/fetchmail/
31checksums       md5 9956b30139edaa4f5f77c4d0dbd80225
32platforms       darwin
33depends_lib     lib:libintl.3:gettext
34depends_run     path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
35patchfiles      fetchmail.patch
36
37patch.args      -p1
38
39# autoheader is very whiny. warnings cause it to exit with a non 0 status.
40#
41post-patch      { cd ${worksrcpath}
42                  reinplace "s|lock_release|fm_lock_release|g" fetchmail.c
43                  reinplace "s|lock_release|fm_lock_release|g" fetchmail.h
44                  reinplace "s|lock_release|fm_lock_release|g" lock.c
45                  system "aclocal"
46                  system "autoconf"
47                  system "autoheader || true" }
48
49pre-configure   { cd ${worksrcpath}
50                  reinplace "s|@l@||g" intl/Makefile.in
51                  reinplace "s|@GT_NO@||g" intl/Makefile.in
52                  reinplace "s|@GT_YES@|#|g" intl/Makefile.in }
53
54configure.env   CFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib" \
55                LIBS="-lintl"
56
57configure.args  --mandir=${prefix}/share/man \
58                --without-ssl --disable-inet6 --with-kerberos5 --with-gssapi
59
60post-configure  { cd ${worksrcpath}
61                  reinplace "s|^#define HAVE_ARPA_NAMESER_H.*$|&\\\n#define BIND_8_COMPAT 1|" config.h }
62
63variant ssl     { depends_lib-append    lib:libssl.0.9:openssl
64                  configure.args-delete --without-ssl
65                  configure.args-append --with-ssl }
66
67variant ipv6    { configure.args-delete --disable-inet6
68                  configure.args-append --enable-inet6 }
69
70post-build      { file copy -force ${portpath}/files/fetchmail.sh ${worksrcpath}/
71                  reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/fetchmail.sh }
72
73post-destroot   { system "install -m 755 -d ${destroot}${prefix}/etc/rc.d"
74                  system "install -m 755 -c ${worksrcpath}/fetchmail.sh ${destroot}${prefix}/etc/rc.d/" }
75