aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mutt-devel
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2004-11-10 02:57:39 +0800
committersem <sem@FreeBSD.org>2004-11-10 02:57:39 +0800
commitd3cba5b94c7c7e08a7c9707e358e6d33c953950c (patch)
tree664efbeb92921c8bbeb9c14229e95a0bddb7fe22 /mail/mutt-devel
parent28e8320a14041a3d4ff4d966911165df0e861d3c (diff)
downloadfreebsd-ports-gnome-d3cba5b94c7c7e08a7c9707e358e6d33c953950c.tar.gz
freebsd-ports-gnome-d3cba5b94c7c7e08a7c9707e358e6d33c953950c.tar.zst
freebsd-ports-gnome-d3cba5b94c7c7e08a7c9707e358e6d33c953950c.zip
- Add WITH_MUTT_ASPELL and WITH_MUTT_ISPELL knobs.
(aspell is prefered over ispell, as it supports more languages and gives better suggestions) - Update the maildir header cache patch. - Fix the libidn dependency. - Fix PREFIX/LOCALBASE handling - Bump PORTREVISION. PR: ports/73727 Submitted by: maintainer
Diffstat (limited to 'mail/mutt-devel')
-rw-r--r--mail/mutt-devel/Makefile45
-rw-r--r--mail/mutt-devel/files/extra-patch-aspell11
-rw-r--r--mail/mutt-devel/files/extra-patch-maildir-header-cache44
3 files changed, 80 insertions, 20 deletions
diff --git a/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile
index 8b1fc9f68478..f701c590259b 100644
--- a/mail/mutt-devel/Makefile
+++ b/mail/mutt-devel/Makefile
@@ -66,6 +66,12 @@
# define
# WITH_MUTT_CYRUS_SASL2
#
+# If you want mutt to use the GNU aspell spelling checker define:
+# WITH_MUTT_ASPELL
+#
+# If you want mutt to use the ispell spelling checker define:
+# WITH_MUTT_ISPELL
+#
# If you want to use the rethreading functions define:
# WITH_MUTT_EDIT_THREADS
#
@@ -84,7 +90,7 @@
PORTNAME= mutt-devel
PORTVERSION= 1.5.6
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES+= mail ipv6
.if defined(WITH_MUTT_NNTP)
CATEGORIES+= news
@@ -165,10 +171,24 @@ pre-build:
-e "s|^(AUTOHEADER = ).+|\1${AUTOHEADER}|" \
${BUILD_WRKSRC}/Makefile
-.if defined(PACKAGE_BUILDING)
+.if exists(${LOCALBASE}/bin/aspell) && !defined(WITH_MUTT_ISPELL)
+WITH_MUTT_ASPELL= yes
+.elif exists(${LOCALBASE}/bin/ispell) && !defined(WITH_MUTT_ASPELL)
+WITH_MUTT_ISPELL= yes
+.endif
+.if defined(PACKAGE_BUILDING) && !defined(WITH_MUTT_ASPELL) && \
+ !defined(WITH_MUTT_ISPELL)
+WITH_MUTT_ASPELL= yes
+.endif
+.if defined(WITH_MUTT_ASPELL)
+BUILD_DEPENDS+= aspell:${PORTSDIR}/textproc/aspell
+RUN_DEPENDS+= aspell:${PORTSDIR}/textproc/aspell
+.elif defined(WITH_MUTT_ISPELL)
BUILD_DEPENDS+= ispell:${PORTSDIR}/textproc/ispell
-RUN_DEPENDS= ispell:${PORTSDIR}/textproc/ispell \
- urlview:${PORTSDIR}/textproc/urlview
+RUN_DEPENDS+= ispell:${PORTSDIR}/textproc/ispell
+.endif
+.if defined(PACKAGE_BUILDING)
+RUN_DEPENDS+= urlview:${PORTSDIR}/textproc/urlview
.endif
.if defined(WITH_MUTT_NCURSES_PORT)
@@ -200,7 +220,7 @@ SGML_USED= no
.endif
.if defined(MUTT_USES_NCURSES) && ${OSVERSION} < 400000
LIB_DEPENDS+= ncurses.5:${PORTSDIR}/devel/ncurses
-CFLAGS+= -I${PREFIX}/include/ncurses -I${PREFIX}/include
+CFLAGS+= -I${LOCALBASE}/include/ncurses -I${LOCALBASE}/include
.elif defined(MUTT_USES_SLANG)
LIB_DEPENDS+= slang.1:${PORTSDIR}/devel/libslang
.endif
@@ -209,13 +229,13 @@ LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
.endif
.if defined(WITH_MUTT_MAILDIR_HEADER_CACHE)
LIB_DEPENDS+= db-4.2.2:${PORTSDIR}/databases/db42
-CFLAGS+= -I${PREFIX}/include/db42
+CFLAGS+= -I${LOCALBASE}/include/db42
.endif
.if exists(${LOCALBASE}/lib/libidn.so)
WITH_MUTT_IDN= yes
.endif
.if defined(WITH_MUTT_IDN)
-LIB_DEPENDS+= idn.16:${PORTSDIR}/devel/libidn
+LIB_DEPENDS+= idn:${PORTSDIR}/devel/libidn
.endif
.if ! defined(WITHOUT_MUTT_SMIME_OUTLOOK_COMPAT)
pre-configure::
@@ -249,13 +269,18 @@ pre-configure::
@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-edit-threads
.endif
+.if defined(WITH_MUTT_ASPELL)
+pre-configure::
+ @${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-aspell
+.endif
+
.if defined(WITH_MUTT_LOCALES_FIX)
CONFIGURE_ARGS+= --enable-locales-fix
.endif
.if defined(MUTT_USES_NCURSES) && ${OSVERSION} < 400000
-CONFIGURE_ARGS+= --with-curses=${PREFIX}
+CONFIGURE_ARGS+= --with-curses=${LOCALBASE}
.elif defined(MUTT_USES_SLANG)
-CONFIGURE_ARGS+= --with-slang=${PREFIX}
+CONFIGURE_ARGS+= --with-slang=${LOCALBASE}
PATCHFILES+= patch-${VVV_PATCH_VERSION}.vvv.slang.gz:vvv
.endif
.if defined(WITH_MUTT_CYRUS_SASL2)
@@ -267,7 +292,7 @@ CONFIGURE_ARGS+= --disable-nls
.if defined(WITHOUT_MUTT_ICONV)
CONFIGURE_ARGS+= --disable-iconv
.else
-CONFIGURE_ARGS+= --with-libiconv-prefix=${PREFIX}
+CONFIGURE_ARGS+= --with-libiconv-prefix=${LOCALBASE}
.endif
.if defined(WITH_MUTT_IDN)
CONFIGURE_ARGS+= --with-idn
diff --git a/mail/mutt-devel/files/extra-patch-aspell b/mail/mutt-devel/files/extra-patch-aspell
new file mode 100644
index 000000000000..38c2a9f044bf
--- /dev/null
+++ b/mail/mutt-devel/files/extra-patch-aspell
@@ -0,0 +1,11 @@
+--- Muttrc.head.in.orig Thu Jan 24 13:10:47 2002
++++ Muttrc.head.in Tue Nov 9 08:53:14 2004
+@@ -19,6 +19,8 @@
+ macro index <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
+ macro pager <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
+
++set ispell="/usr/local/bin/aspell --mode=email check"
++
+ # If Mutt is unable to determine your site's domain name correctly, you can
+ # set the default here.
+ #
diff --git a/mail/mutt-devel/files/extra-patch-maildir-header-cache b/mail/mutt-devel/files/extra-patch-maildir-header-cache
index 83f6d7908a09..4798bc175aa1 100644
--- a/mail/mutt-devel/files/extra-patch-maildir-header-cache
+++ b/mail/mutt-devel/files/extra-patch-maildir-header-cache
@@ -2,7 +2,7 @@ diff -Nru a/PATCHES b/PATCHES
--- a/PATCHES
+++ b/PATCHES
@@ -0,0 +1 @@
-+patch-1.5.6.tg.hcache.10
++patch-1.5.6.tg.hcache.11
diff -Nru a/configure.in b/configure.in
--- a/configure.in 2004-08-18 09:43:09 +02:00
+++ b/configure.in 2004-10-14 07:21:52 +02:00
@@ -131,8 +131,8 @@ diff -Nru a/globals.h b/globals.h
WHERE char *MhUnseen;
diff -Nru a/hcache.c b/hcache.c
--- /dev/null Wed Dec 31 16:00:00 196900
-+++ b/hcache.c 2004-09-28 19:57:45 +02:00
-@@ -0,0 +1,856 @@
++++ b/hcache.c 2004-11-09 00:09:22 +01:00
+@@ -0,0 +1,880 @@
+/*
+ * Copyright (C) 2004 Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
+ * Copyright (C) 2004 Tobias Werth <sitowert@stud.uni-erlangen.de>
@@ -200,10 +200,34 @@ diff -Nru a/hcache.c b/hcache.c
+ unsigned long long uid_validity;
+} validate;
+
++static void *
++lazy_malloc(size_t siz)
++{
++ if (0 < siz && siz < 4096) {
++ siz = 4096;
++ }
++
++ return safe_malloc(siz);
++}
++
++static void
++lazy_realloc(void *ptr, size_t siz)
++{
++ void **p = (void **)ptr;
++
++ if ( p != NULL
++ && 0 < siz
++ && siz < 4096) {
++ return;
++ }
++
++ safe_realloc(ptr, siz);
++}
++
+static unsigned char *
+dump_int(unsigned int i, unsigned char *d, int *off)
+{
-+ safe_realloc(&d, *off + sizeof(int));
++ lazy_realloc(&d, *off + sizeof(int));
+ memcpy(d + *off, &i, sizeof(int));
+ (*off) += sizeof(int);
+
@@ -230,7 +254,7 @@ diff -Nru a/hcache.c b/hcache.c
+
+ size = mutt_strlen(c) + 1;
+ d = dump_int(size, d, off);
-+ safe_realloc(&d, *off + size);
++ lazy_realloc(&d, *off + size);
+ memcpy(d + *off, c, size);
+ *off += size;
+
@@ -247,7 +271,7 @@ diff -Nru a/hcache.c b/hcache.c
+ }
+
+ d = dump_int(size, d, off);
-+ safe_realloc(&d, *off + size);
++ lazy_realloc(&d, *off + size);
+ memcpy(d + *off, c, size);
+ *off += size;
+
@@ -430,7 +454,7 @@ diff -Nru a/hcache.c b/hcache.c
+static unsigned char *
+dump_body(BODY *c, unsigned char *d, int *off)
+{
-+ safe_realloc(&d, *off + sizeof(BODY));
++ lazy_realloc(&d, *off + sizeof(BODY));
+ memcpy(d + *off, c, sizeof(BODY));
+ *off += sizeof(BODY);
+
@@ -542,7 +566,7 @@ diff -Nru a/hcache.c b/hcache.c
+{
+ int crc = 0;
+
-+ crc = crc32(crc, (unsigned char const *) "sithglan@stud.uni-erlangen.de[sithglan]|hcache.c|20040928175752|08278", mutt_strlen("sithglan@stud.uni-erlangen.de[sithglan]|hcache.c|20040928175752|08278"));
++ crc = crc32(crc, (unsigned char const *) "sithglan@stud.uni-erlangen.de[sithglan]|hcache.c|20041108231548|29613", mutt_strlen("sithglan@stud.uni-erlangen.de[sithglan]|hcache.c|20041108231548|29613"));
+
+#if HAVE_LANGINFO_CODESET
+ crc = crc32(crc, (unsigned char const *) Charset, mutt_strlen(Charset));
@@ -629,7 +653,7 @@ diff -Nru a/hcache.c b/hcache.c
+ unsigned char *d = NULL;
+ *off = 0;
+
-+ d = safe_malloc(sizeof(validate));
++ d = lazy_malloc(sizeof(validate));
+
+ if (uid_validity) {
+ memcpy(d, &uid_validity, sizeof(long long));
@@ -642,7 +666,7 @@ diff -Nru a/hcache.c b/hcache.c
+
+ d = dump_int(db->crc, d, off);
+
-+ safe_realloc(&d, *off + sizeof(HEADER));
++ lazy_realloc(&d, *off + sizeof(HEADER));
+ memcpy(d + *off, h, sizeof(HEADER));
+ *off += sizeof(HEADER);
+