forked from Lainports/freebsd-ports
leave some messages on an IMAP server, i.e. this is the correct fix for the following bug (as described Makefile:1.161 and files/patch-imap.c:1.1): fix IMAP client timeout bug with upstream servers that do not send updated EXISTS counts after acknowledging EXPUNGE see <http://bugs.debian.org/314509> - Bump PORTREVISION to 4 PR: ports/88850 Submitted by: Vasil Dimov Patch provided by: Matthias Andree (upstream maintainer) Patch tested by: barner, Vasil Dimov
133 lines
4.2 KiB
Makefile
133 lines
4.2 KiB
Makefile
# New ports collection makefile for: fetchmail
|
|
# Date created: 25 Feb 2000
|
|
# Whom: Ville Eerola <ve@sci.fi>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# NOTE: The fetchmailconf program (an interactive program for
|
|
# writing .fetchmailrc files) requires Python, Tk, X11, etc..
|
|
# The fetchmail program itself does not need Python, but if you
|
|
# want fetchmailconf to work, define WITH_X11
|
|
|
|
PORTNAME= fetchmail
|
|
PORTVERSION= 6.2.5.2
|
|
PORTREVISION= 4
|
|
CATEGORIES= mail ipv6
|
|
MASTER_SITES= http://download.berlios.de/%SUBDIR%/:fetchmail_site,fetchmailconf_site \
|
|
http://www.catb.org/~esr/%SUBDIR%/:fetchmail_site \
|
|
ftp://ftp.ayamura.org/pub/%SUBDIR%/:fetchmail_site \
|
|
ftp://ftp.win.jp/pub/%SUBDIR%/:fetchmail \
|
|
ftp://ftp.dti.ad.jp/pub/net/mail/%SUBDIR%/:fetchmail_site \
|
|
http://home.leo.org/~barner/freebsd/distfiles/:fetchmail_site,fetchmailconf_site
|
|
MASTER_SITE_SUBDIR= fetchmail/:fetchmail_site,fetchmailconf_site
|
|
DISTNAME= ${PORTNAME}-6.2.5
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:fetchmail_site \
|
|
fetchmailconf-${FETCHMAILCONF_VER}.gz:fetchmailconf_site
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
PATCH_SITES= http://download.berlios.de/%SUBDIR%/ \
|
|
http://home.leo.org/~barner/freebsd/distfiles/
|
|
PATCH_SITE_SUBDIR= fetchmail
|
|
PATCHFILES= ${PORTNAME}-patch-${PORTVERSION}.gz
|
|
PATCH_DIST_STRIP=-p1
|
|
|
|
MAINTAINER= barner@FreeBSD.org
|
|
COMMENT= Batch mail retrieval utility for IMAP/POP2/POP3/APOP/KPOP/ETRN/ODMR
|
|
|
|
FETCHMAILCONF_VER=1.43.2
|
|
|
|
.if defined(WITH_X11)
|
|
RUN_DEPENDS= ${LOCALBASE}/lib/${PYTHON_VERSION}/site-packages/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_NLS)
|
|
USE_GETTEXT= yes
|
|
.endif
|
|
.if defined(WITH_X11)
|
|
USE_PYTHON= yes
|
|
.endif
|
|
USE_REINPLACE= yes
|
|
USE_GMAKE= yes
|
|
GNU_CONFIGURE= yes
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
|
CONFIGURE_ARGS= --enable-opie --enable-RPA --enable-POP2 --enable-SDPS \
|
|
--with-hesiod=no --enable-fallback=no
|
|
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
|
|
LDFLAGS="-L${LOCALBASE}/lib" \
|
|
CFLAGS="-I${LOCALBASE}/include ${CFLAGS}"
|
|
MAKE_ENV+= ${CONFIGURE_ENV}
|
|
MAN1= fetchmail.1
|
|
MLINKS= fetchmail.1 fetchmailconf.1
|
|
|
|
FDOC= ${PREFIX}/share/doc/fetchmail
|
|
DOCS= FAQ FEATURES NEWS NOTES README \
|
|
design-notes.html fetchmail-FAQ.html fetchmail-features.html
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-6.2.5
|
|
|
|
.if !defined(WITHOUT_NLS)
|
|
CONFIGURE_ARGS+= --enable-nls
|
|
PLIST_SUB= NLS=""
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-nls
|
|
PLIST_SUB= NLS="@comment "
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${OSVERSION} >= 400014
|
|
CONFIGURE_ARGS+=--enable-inet6
|
|
.endif
|
|
|
|
.if exists(/usr/lib/libssl.a) && exists(/usr/lib/libcrypto.a)
|
|
CONFIGURE_ARGS+=--with-ssl=/usr
|
|
DOCS+= README.SSL
|
|
PLIST_SUB+= SSLDOCS="%%PORTDOCS%%"
|
|
.elif exists(${LOCALBASE}/lib/libssl.a) && exists(${LOCALBASE}/lib/libcrypto.a)
|
|
CONFIGURE_ARGS+=-with-includes=${LOCALBASE}/include/openssl --with-ssl=${LOCALBASE}
|
|
.if exists(${LOCALBASE}/lib/libRSAglue.a)
|
|
CONFIGURE_ENV+= RSAGLUE=-lRSAglue
|
|
.endif
|
|
DOCS+= README.SSL
|
|
PLIST_SUB+= SSLDOCS="%%PORTDOCS%%"
|
|
.else
|
|
PLIST_SUB+= SSLDOCS="%%PORTDOCS%%@comment "
|
|
.endif
|
|
|
|
.if exists(/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4)
|
|
CONFIGURE_ARGS += --with-kerberos=/usr
|
|
.endif
|
|
|
|
.if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libkrb5.a)
|
|
CONFIGURE_ARGS += --with-kerberos5=${KRB5_HOME}
|
|
.endif
|
|
|
|
.if defined(WITH_NTLM)
|
|
CONFIGURE_ARGS += --enable-NTLM
|
|
DOCS+= README.NTLM
|
|
PLIST_SUB+= NTLMDOCS="%%PORTDOCS%%"
|
|
.else
|
|
PLIST_SUB+= NTLMDOCS="%%PORTDOCS%%@comment "
|
|
.endif
|
|
|
|
pre-patch:
|
|
@${CP} -f /usr/include/md5.h ${WRKSRC}
|
|
# Use fetchmailconf-1.43.2 to avoid a password exposure
|
|
# caused by insecure file creation
|
|
@${GZCAT} ${DISTDIR}/fetchmailconf-${FETCHMAILCONF_VER}.gz | \
|
|
${SED} -e "s,^#!/.*/python,#!${LOCALBASE}/bin/python,g" \
|
|
> ${WRKDIR}/fetchmailconf.temp
|
|
@${MV} -f ${WRKDIR}/fetchmailconf.temp ${WRKSRC}/fetchmailconf
|
|
@${SED} -e "s,@LOCALBASE@,${LOCALBASE},g" \
|
|
${FILESDIR}/fetchmailconf > ${WRKDIR}/fetchmailconf
|
|
@${REINPLACE_CMD} -e "s,@l@,,;s,@GT_NO@,," \
|
|
${WRKSRC}/intl/Makefile.in
|
|
|
|
post-install:
|
|
.if !defined(NOPORTDOCS)
|
|
${INSTALL} -d -m 555 -o ${DOCOWN} -g ${DOCGRP} ${FDOC}
|
|
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${FDOC}
|
|
.endif
|
|
${MV} ${PREFIX}/bin/fetchmailconf ${PREFIX}/libexec/fetchmailconf.bin
|
|
${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${PREFIX}/bin
|
|
|
|
.include <bsd.port.post.mk>
|