summaryrefslogtreecommitdiff
path: root/mail/cue
diff options
context:
space:
mode:
authortaca <taca>2009-12-15 13:11:18 +0000
committertaca <taca>2009-12-15 13:11:18 +0000
commit12f80fadb2d48e6738503f8ad77da16498926595 (patch)
tree921f85663b494149f30670b9e8496de876dad05a /mail/cue
parenteabc009076452acf5ed1da00dc001ad07df28bd7 (diff)
downloadpkgsrc-12f80fadb2d48e6738503f8ad77da16498926595.tar.gz
Overhaul mail/cue pacakge.
* Add patches to fix build problem with OpenSSL 1.0.0 beta and later. * Generase "-DUSE_SSL" instead of "-DSSL". Similar changes are CANNA and ZLIB. (In the case of ZLIB, it could be change to use HAVE_ZLIB_H.) * Split Makefile to use hacks.mk and options.mk. * And miscellaneous pkglint clean up. There should be no functional change and fix PR pkg/42452.
Diffstat (limited to 'mail/cue')
-rw-r--r--mail/cue/Makefile47
-rw-r--r--mail/cue/distinfo9
-rw-r--r--mail/cue/hacks.mk7
-rw-r--r--mail/cue/options.mk23
-rw-r--r--mail/cue/patches/patch-aa53
-rw-r--r--mail/cue/patches/patch-ae127
-rw-r--r--mail/cue/patches/patch-af81
-rw-r--r--mail/cue/patches/patch-ag120
-rw-r--r--mail/cue/patches/patch-ah15
-rw-r--r--mail/cue/patches/patch-ai20
10 files changed, 455 insertions, 47 deletions
diff --git a/mail/cue/Makefile b/mail/cue/Makefile
index 44676987f9a..3ced67320ce 100644
--- a/mail/cue/Makefile
+++ b/mail/cue/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.58 2009/12/15 07:22:59 obache Exp $
+# $NetBSD: Makefile,v 1.59 2009/12/15 13:11:18 taca Exp $
DISTNAME= cue-snap-20090209
PKGNAME= ${DISTNAME:S/snap-//}
@@ -6,55 +6,24 @@ CATEGORIES= mail
MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/cue/snap/
MAINTAINER= pkgsrc-users@NetBSD.org
-COMMENT= mh-e like mail user agent
+HOMEPAGE= # not available
+COMMENT= Mh-e like mail user agent
LICENSE= modified-bsd
PKG_DESTDIR_SUPPORT= user-destdir
-GNU_CONFIGURE= yes
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${PKGSRC_COMPILER} == "ido"
-CPPFLAGS+= -DNO_ATTRIBUTE
-.endif
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.cue
-PKG_SUPPORTED_OPTIONS= canna idea inet6
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Minet6) && (${OPSYS} != "SunOS")
-CONFIGURE_ARGS+= --enable-ipv6
-.else
-CONFIGURE_ARGS+= --disable-ipv6
-.endif
-
-.if !empty(PKG_OPTIONS:Mcanna)
-. include "../../inputmethod/canna-lib/buildlink3.mk"
-CONFIGURE_ARGS+= --with-canna=${BUILDLINK_PREFIX.canna}
-.else
-CONFIGURE_ARGS+= --without-canna
-.endif
-
-.if !empty(PKG_OPTIONS:Midea)
-CONFIGURE_ARGS+= --enable-idea
-.endif
-
+GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q}
CONFIGURE_ARGS+= --with-zlib=${BUILDLINK_PREFIX.zlib}
-
-INSTALLATION_DIRS= bin
-
-.include "../../security/openssl/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
+INSTALLATION_DIRS+= bin share/doc/cue share/examples/cue
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/cue ${DESTDIR}${PREFIX}/bin
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/cue
${INSTALL_DATA} ${WRKSRC}/sample.cuerc \
${DESTDIR}${PREFIX}/share/examples/cue
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/cue
${INSTALL_DATA} ${WRKSRC}/cue.hlp ${DESTDIR}${PREFIX}/share/doc/cue
+.include "options.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/cue/distinfo b/mail/cue/distinfo
index 0ca04936ac1..e7c5ac2cdc8 100644
--- a/mail/cue/distinfo
+++ b/mail/cue/distinfo
@@ -1,8 +1,13 @@
-$NetBSD: distinfo,v 1.31 2009/02/15 07:07:23 obache Exp $
+$NetBSD: distinfo,v 1.32 2009/12/15 13:11:18 taca Exp $
SHA1 (cue-snap-20090209.tar.gz) = 8f0a6269855c7fd19f298d18613422f71ce8761e
RMD160 (cue-snap-20090209.tar.gz) = 94d0a6d5820c9c8ba71230ab5212196b0f0121c6
Size (cue-snap-20090209.tar.gz) = 229115 bytes
-SHA1 (patch-aa) = c1ed53b1333b58dd8f794b2f028ed4c71a294c04
+SHA1 (patch-aa) = f771f37323d81d15e85e357b85cd45c17ada1c2c
SHA1 (patch-ac) = 105da5dc78a6a493d3863de74ba91891653cc936
SHA1 (patch-ad) = 0d3ce51529e2b0d7fcc051719bbd4ad008bd1b65
+SHA1 (patch-ae) = 96342438871f296c51f6f8e91fe2956f1ed05d33
+SHA1 (patch-af) = 1941315f7349aab62c3e1f58598518d446af1c24
+SHA1 (patch-ag) = 46e7f66117b020555e59e1d3ed9262cbcf66a689
+SHA1 (patch-ah) = 1e75fd0441dda53f02cceea9b09c0c7a02f80e50
+SHA1 (patch-ai) = 65a9651bf46517846910d6094a7c957d2ca91711
diff --git a/mail/cue/hacks.mk b/mail/cue/hacks.mk
new file mode 100644
index 00000000000..b440493a361
--- /dev/null
+++ b/mail/cue/hacks.mk
@@ -0,0 +1,7 @@
+# $NetBSD: hacks.mk,v 1.1 2009/12/15 13:11:18 taca Exp $
+
+.include "../../mk/compiler.mk"
+
+.if ${PKGSRC_COMPILER} == "ido"
+CPPFLAGS+= -DNO_ATTRIBUTE
+.endif
diff --git a/mail/cue/options.mk b/mail/cue/options.mk
new file mode 100644
index 00000000000..de9cec62121
--- /dev/null
+++ b/mail/cue/options.mk
@@ -0,0 +1,23 @@
+# $NetBSD: options.mk,v 1.1 2009/12/15 13:11:18 taca Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cue
+PKG_SUPPORTED_OPTIONS= canna idea inet6
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Minet6) && (${OPSYS} != "SunOS")
+CONFIGURE_ARGS+= --enable-ipv6
+.else
+CONFIGURE_ARGS+= --disable-ipv6
+.endif
+
+.if !empty(PKG_OPTIONS:Mcanna)
+. include "../../inputmethod/canna-lib/buildlink3.mk"
+CONFIGURE_ARGS+= --with-canna=${BUILDLINK_PREFIX.canna}
+.else
+CONFIGURE_ARGS+= --without-canna
+.endif
+
+.if !empty(PKG_OPTIONS:Midea)
+CONFIGURE_ARGS+= --enable-idea
+.endif
diff --git a/mail/cue/patches/patch-aa b/mail/cue/patches/patch-aa
index b7437bab496..1b367fe048b 100644
--- a/mail/cue/patches/patch-aa
+++ b/mail/cue/patches/patch-aa
@@ -1,8 +1,13 @@
-$NetBSD: patch-aa,v 1.5 2006/10/22 20:59:01 schwarz Exp $
+$NetBSD: patch-aa,v 1.6 2009/12/15 13:11:18 taca Exp $
---- configure.orig 2005-04-27 13:54:13.000000000 +0200
-+++ configure 2006-10-22 22:53:47.000000000 +0200
-@@ -675,7 +675,7 @@
+* Prevent extra -O from being added to optimizer flags.
+* Assume that DragonFly's getaddrinfo works.
+* Add "USE_" before cpp definition for CANNA, SSL and ZLIB. It was generated
+ by fixed AC_PREFIX_PKG in configure.in.
+
+--- configure.orig 2005-04-27 20:54:13.000000000 +0900
++++ configure
+@@ -675,7 +675,7 @@ netbsd*)
;;
esac
@@ -11,7 +16,7 @@ $NetBSD: patch-aa,v 1.5 2006/10/22 20:59:01 schwarz Exp $
-@@ -1127,7 +1127,7 @@
+@@ -1127,7 +1127,7 @@ fi
rm -fr conftest*
fi
@@ -20,7 +25,7 @@ $NetBSD: patch-aa,v 1.5 2006/10/22 20:59:01 schwarz Exp $
if test "$buggygetaddrinfo" = "yes"; then
if test "$ipv6" = "yes"; then
echo 'Fatal: You must get working getaddrinfo() function.'
-@@ -1135,6 +1135,7 @@
+@@ -1135,6 +1135,7 @@ if test "$buggygetaddrinfo" = "yes"; the
exit 1
fi
fi
@@ -28,3 +33,39 @@ $NetBSD: patch-aa,v 1.5 2006/10/22 20:59:01 schwarz Exp $
echo $ac_n "checking if --enable-idea option is specified""... $ac_c" 1>&6
echo "configure:1141: checking if --enable-idea option is specified" >&5
+@@ -1216,7 +1217,7 @@ echo "configure:1201: checking for zlib
+
+ zlib=$ac_cv_prefix_zlib
+ cat >> confdefs.h <<EOF
+-#define `echo zlib | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1
++#define `echo use_zlib | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1
+ EOF
+
+ if test -n "$ac_lib"; then
+@@ -1268,7 +1269,7 @@ echo "configure:1253: checking for canna
+
+ canna=$ac_cv_prefix_canna
+ cat >> confdefs.h <<EOF
+-#define `echo canna | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1
++#define `echo use_canna | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1
+ EOF
+
+ if test -n "$ac_lib"; then
+@@ -1321,7 +1322,7 @@ echo "configure:1306: checking for ssl d
+
+ ssl=$ac_cv_prefix_ssl
+ cat >> confdefs.h <<EOF
+-#define `echo ssl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1
++#define `echo use_ssl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1
+ EOF
+
+ if test -n "$ac_lib"; then
+@@ -1362,7 +1363,7 @@ echo "configure:1347: checking for ssl d
+
+ ssl=$ac_cv_prefix_ssl
+ cat >> confdefs.h <<EOF
+-#define `echo ssl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1
++#define `echo use_ssl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1
+ EOF
+
+ if test -n "$ac_lib"; then
diff --git a/mail/cue/patches/patch-ae b/mail/cue/patches/patch-ae
new file mode 100644
index 00000000000..24807a75520
--- /dev/null
+++ b/mail/cue/patches/patch-ae
@@ -0,0 +1,127 @@
+$NetBSD: patch-ae,v 1.3 2009/12/15 13:11:18 taca Exp $
+
+* Fix for OpenSSL 1.0.0 beta. (STACK has gone.)
+* Use proper sk_TYPE_num, sk_TYPE_value for each TYPE.
+
+--- smime.c.orig 2008-06-03 10:58:57.000000000 +0900
++++ smime.c
+@@ -108,7 +108,7 @@ smime_decrypt(struct state *state)
+ struct header *hdr;
+ char buf[BUFSIZ];
+ #ifndef OPENSSL_BUG_FIXED
+- STACK *sk;
++ STACK_OF(PKCS7_RECIP_INFO) *sk;
+ PKCS7_RECIP_INFO *ri;
+ #endif
+
+@@ -174,10 +174,10 @@ smime_decrypt(struct state *state)
+ sk = NULL;
+ break;
+ case NID_pkcs7_signedAndEnveloped:
+- sk = (STACK *)p7->d.signed_and_enveloped->recipientinfo;
++ sk = p7->d.signed_and_enveloped->recipientinfo;
+ break;
+ case NID_pkcs7_enveloped:
+- sk = (STACK *)p7->d.enveloped->recipientinfo;
++ sk = p7->d.enveloped->recipientinfo;
+ break;
+ default:
+ sk = NULL;
+@@ -185,7 +185,7 @@ smime_decrypt(struct state *state)
+ }
+ if (sk) {
+ for (;;) {
+- if (sk_num(sk) == 0) {
++ if (sk_PKCS7_RECIP_INFO_num(sk) == 0) {
+ strlcpy(state->status,
+ "Cannot find recipient info for me\n",
+ sizeof(state->status));
+@@ -194,11 +194,11 @@ smime_decrypt(struct state *state)
+ PKCS7_free(p7);
+ return -1;
+ }
+- ri=(PKCS7_RECIP_INFO *)sk_value(sk,0);
++ ri=sk_PKCS7_RECIP_INFO_value(sk,0);
+ if (X509_name_cmp(ri->issuer_and_serial->issuer, X509_get_issuer_name(x509)) == 0
+ && ASN1_INTEGER_cmp(ri->issuer_and_serial->serial, X509_get_serialNumber(x509)) == 0)
+ break;
+- sk_shift(sk);
++ sk_PKCS7_RECIP_INFO_shift(sk);
+ PKCS7_RECIP_INFO_free(ri);
+ }
+ }
+@@ -401,7 +401,7 @@ smime_verify(struct state *state)
+ cbuf_t *cb, cbuf, sproto, from;
+ int i, ret;
+ PKCS7 *p7;
+- STACK *sk;
++ STACK_OF(PKCS7_SIGNER_INFO) *sk;
+ char *p, *ep;
+ BIO *detached, *p7bio;
+ PKCS7_SIGNER_INFO *si;
+@@ -496,11 +496,11 @@ BIO_read_filename(detached, "/tmp/smime.
+ getenv("SSL_CERT_DIR"));
+ ERR_clear_error();
+
+- sk = (STACK *)PKCS7_get_signer_info(p7);
++ sk = PKCS7_get_signer_info(p7);
+ strlcpy(state->status, "S/MIME verify OK", sizeof(state->status));
+ ret = 1;
+- for (i = 0; i < sk_num(sk); i++) {
+- si = (PKCS7_SIGNER_INFO *)sk_value(sk, i);
++ for (i = 0; i < sk_PKCS7_SIGNER_INFO_num(sk); i++) {
++ si = sk_PKCS7_SIGNER_INFO_value(sk, i);
+ if (PKCS7_dataVerify(cert_store, &cert_ctx, p7bio, p7, si) <= 0) {
+ ret = -1;
+ snprintf(state->status, sizeof(state->status),
+@@ -560,7 +560,7 @@ smime_sign(struct state *state)
+ {
+ int i;
+ PKCS7 *p7;
+- STACK *sk;
++ STACK_OF(X509) *sk;
+ char *p;
+ BIO *in, *p7bio;
+ PKCS7_SIGNER_INFO *si;
+@@ -675,9 +675,9 @@ smime_sign(struct state *state)
+ PKCS7_free(p7);
+ return 0;
+ }
+- sk = (STACK *)X509_STORE_CTX_get_chain(&cert_ctx);
+- for (i = 0; i < sk_num(sk); i++) {
+- x = (X509 *)sk_value(sk, i);
++ sk = X509_STORE_CTX_get_chain(&cert_ctx);
++ for (i = 0; i < sk_X509_num(sk); i++) {
++ x = sk_X509_value(sk, i);
+ PKCS7_add_certificate(p7, x);
+ }
+
+@@ -975,7 +975,7 @@ smime_encrypt(struct state *state)
+ BIO_ctrl(p7bio, BIO_C_GET_CIPHER_CTX, 1, (char *)&ctx);
+ if (EVP_CIPHER_CTX_nid(ctx) == NID_rc2_cbc) {
+ const EVP_CIPHER *cipher;
+- STACK *rsk;
++ STACK_OF(PKCS7_RECIP_INFO) *rsk;
+ PKCS7_RECIP_INFO *ri;
+ u_char key[EVP_MAX_KEY_LENGTH];
+ u_char iv[EVP_MAX_IV_LENGTH];
+@@ -983,7 +983,7 @@ smime_encrypt(struct state *state)
+ int keylen, ivlen, buflen, len;
+ u_char *buf, *q;
+
+- rsk = (STACK *)p7->d.enveloped->recipientinfo;
++ rsk = p7->d.enveloped->recipientinfo;
+ cipher = EVP_rc2_40_cbc(); /* XXX */
+ keylen = EVP_CIPHER_key_length(cipher);
+ ivlen = EVP_CIPHER_iv_length(cipher);
+@@ -992,8 +992,8 @@ smime_encrypt(struct state *state)
+ EVP_CipherInit(ctx, cipher, key, iv, 1);
+ buf = NULL;
+ buflen = 0;
+- for (i = 0; i < sk_num(rsk); i++) {
+- ri = (PKCS7_RECIP_INFO *)sk_value(rsk, i);
++ for (i = 0; i < sk_PKCS7_RECIP_INFO_num(rsk); i++) {
++ ri = sk_PKCS7_RECIP_INFO_value(rsk, i);
+ pkey = X509_get_pubkey(ri->cert);
+ len = EVP_PKEY_size(pkey);
+ if (buflen < len) {
diff --git a/mail/cue/patches/patch-af b/mail/cue/patches/patch-af
new file mode 100644
index 00000000000..c6153bd87b0
--- /dev/null
+++ b/mail/cue/patches/patch-af
@@ -0,0 +1,81 @@
+$NetBSD: patch-af,v 1.1 2009/12/15 13:11:18 taca Exp $
+
+* ZLIB => USE_ZLIB; it should simply use HAVE_ZLIB_H.
+
+--- decode.c.orig 2008-12-18 16:07:25.000000000 +0900
++++ decode.c
+@@ -41,9 +41,9 @@
+ #include <utime.h>
+ #include <stddef.h>
+
+-#ifdef ZLIB
++#ifdef USE_ZLIB
+ #include <zlib.h>
+-#endif /* ZLIB */
++#endif /* USE_ZLIB */
+
+ #include "cue.h"
+ #include "decode.h"
+@@ -910,7 +910,7 @@ decode_zip(struct decode *dp, char **pp,
+ *pp = b64_getptr(&bs);
+ }
+
+-#ifdef ZLIB
++#ifdef USE_ZLIB
+
+ /* decode x-gzip64 text */
+ static void
+@@ -987,7 +987,7 @@ decode_gzip64(struct decode *dp, char **
+ dp->noconv = 1;
+ decode_base64(dp, pp, ep);
+ }
+-#endif /* ZLIB */
++#endif /* USE_ZLIB */
+
+ /* decode 1 line body */
+ int
+@@ -1006,11 +1006,11 @@ decode_text(char **pp, char *ep, cbuf_t
+ case FDB_ENC_B64:
+ decode_base64(&d, pp, ep);
+ break;
+-#ifdef ZLIB
++#ifdef USE_ZLIB
+ case FDB_ENC_GZ64:
+ decode_gzip64(&d, pp, ep);
+ break;
+-#endif /* ZLIB */
++#endif /* USE_ZLIB */
+ case FDB_ENC_UU:
+ decode_uuencode(&d, pp, ep);
+ break;
+@@ -1300,14 +1300,14 @@ save_part(struct state *state, int all)
+ return;
+ message_parseall(fdb);
+
+-#ifdef ZLIB
++#ifdef USE_ZLIB
+ if (!all && (fdb->flags & FDB_ENCODE) == FDB_ENC_ZIP) {
+ if (fdb->lines - fdb->hdr_lines == 7) {
+ fdb->filename = *fdb_read(fdb, fdb->lines - 1);
+ singlezip = 1;
+ }
+ }
+-#endif /* ZLIB */
++#endif /* USE_ZLIB */
+
+ p = state->status;
+ ep = state->status + sizeof(state->status);
+@@ -1384,11 +1384,11 @@ save_part(struct state *state, int all)
+ else
+ decode_base64(&d, &p, ep);
+ break;
+-#ifdef ZLIB
++#ifdef USE_ZLIB
+ case FDB_ENC_GZ64:
+ decode_gzip64(&d, &p, ep);
+ break;
+-#endif /* ZLIB */
++#endif /* USE_ZLIB */
+ default:
+ fwrite(CP(&fdb->buf_body), CL(&fdb->buf_body), 1, fp);
+ break;
diff --git a/mail/cue/patches/patch-ag b/mail/cue/patches/patch-ag
new file mode 100644
index 00000000000..8308fb3593d
--- /dev/null
+++ b/mail/cue/patches/patch-ag
@@ -0,0 +1,120 @@
+$NetBSD: patch-ag,v 1.1 2009/12/15 13:11:18 taca Exp $
+
+* Change CANNA to USE_CANNA.
+
+--- edit.c.orig 2008-12-18 13:41:32.000000000 +0900
++++ edit.c
+@@ -31,16 +31,16 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#ifdef CANNA
++#ifdef USE_CANNA
+ #include <canna/jrkanji.h>
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+
+ #include "cue.h"
+
+-#ifdef CANNA
++#ifdef USE_CANNA
+ static char *cannamode;
+ static int cannamodelen = -1;
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+
+ struct edit_state {
+ struct state *state;
+@@ -56,11 +56,11 @@ struct edit_state {
+ int complistent;
+ int complistsize;
+ struct abuf abuf;
+-#ifdef CANNA
++#ifdef USE_CANNA
+ int canna;
+ jrKanjiStatus ks;
+ char cannabuf[CHARBLOCK];
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+ };
+
+ static void
+@@ -89,10 +89,10 @@ edit_update(struct edit_state *e)
+ break;
+ }
+ move(LINES - 1, 0);
+-#ifdef CANNA_XXX
++#ifdef USE_CANNA_XXX
+ if (e->canna)
+ addstr(cannamode);
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+ msglen = strlen(e->state->status);
+ getyx(stdscr, y, x);
+ width = COLS - x - 1;
+@@ -127,7 +127,7 @@ edit_update(struct edit_state *e)
+ clrtoeol();
+ x += e->pos - off;
+ move(y, x);
+-#ifdef CANNA
++#ifdef USE_CANNA
+ if (e->canna && e->ks.length) {
+ /* XXX: e->ks.length -> width (hankana) */
+ if (x + (2 + e->ks.length) > COLS) {
+@@ -152,7 +152,7 @@ edit_update(struct edit_state *e)
+ addnstr(p, e->ks.length - (e->ks.revPos + e->ks.revLen));
+ addstr("|\b");
+ }
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+ }
+
+ static void
+@@ -267,9 +267,9 @@ static int
+ edit_control(struct edit_state *e, int ch)
+ {
+ int i;
+-#ifdef CANNA
++#ifdef USE_CANNA
+ jrKanjiStatusWithValue ksv;
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+
+ switch (ch) {
+ /* refresh */
+@@ -355,7 +355,7 @@ edit_control(struct edit_state *e, int c
+ }
+ e->len = e->pos;
+ break;
+-#ifdef CANNA
++#ifdef USE_CANNA
+ case CTRL('o'):
+ if (e->canna) {
+ e->canna = 0;
+@@ -380,7 +380,7 @@ edit_control(struct edit_state *e, int c
+ jrKanjiControl(0, KC_SETMODEINFOSTYLE, 0);
+ jrKanjiControl(0, KC_QUERYMODE, cannamode);
+ break;
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+ default:
+ return 0;
+ }
+@@ -426,7 +426,7 @@ edit_stline(struct state *state, char *b
+ inp = inbuf;
+ inp[0] = ch;
+ inp[1] = '\0';
+-#ifdef CANNA
++#ifdef USE_CANNA
+ if (e->canna) {
+ i = jrKanjiString(0, ch, e->cannabuf, e->size - e->len,
+ &e->ks);
+@@ -446,7 +446,7 @@ edit_stline(struct state *state, char *b
+ e->cannabuf[i] = '\0';
+ inp = (u_char *)e->cannabuf;
+ }
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+ while ((ch = *inp) != '\0') {
+ switch (ch) {
+ case CTRL('g'):
diff --git a/mail/cue/patches/patch-ah b/mail/cue/patches/patch-ah
new file mode 100644
index 00000000000..309911d0a27
--- /dev/null
+++ b/mail/cue/patches/patch-ah
@@ -0,0 +1,15 @@
+$NetBSD: patch-ah,v 1.1 2009/12/15 13:11:18 taca Exp $
+
+* Change SSL to USE_SSL.
+
+--- popxmit.c.orig 2003-05-17 05:17:45.000000000 +0900
++++ popxmit.c
+@@ -40,7 +40,7 @@
+ #include <string.h>
+ #include <unistd.h>
+
+-#ifdef SSL /*XXX*/
++#ifdef USE_SSL /*XXX*/
+ #define APOP
+ #endif
+
diff --git a/mail/cue/patches/patch-ai b/mail/cue/patches/patch-ai
new file mode 100644
index 00000000000..5a97b8d0784
--- /dev/null
+++ b/mail/cue/patches/patch-ai
@@ -0,0 +1,20 @@
+$NetBSD: patch-ai,v 1.1 2009/12/15 13:11:18 taca Exp $
+
+* Change CANNA to USE_CANNA.
+
+--- search.c.orig 2005-04-22 22:41:09.000000000 +0900
++++ search.c
+@@ -157,11 +157,11 @@ isearch(struct state *state, struct file
+ cangetch(-1);
+ ch = getch();
+ switch (ch) {
+-#ifdef CANNA
++#ifdef USE_CANNA
+ case CTRL('o'):
+ ungetch(ch);
+ /*FALLTHRU*/
+-#endif /* CANNA */
++#endif /* USE_CANNA */
+ case '\033':
+ snprintf(status, ep - status, "Search%s: ",
+ (dir < 0 ? " backward" : ""));