summaryrefslogtreecommitdiff
path: root/net/speakfreely/patches
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2000-01-17 16:02:33 +0000
committerjlam <jlam@pkgsrc.org>2000-01-17 16:02:33 +0000
commit47369ef416146a54fab3002b01cc590c922660b8 (patch)
treea1d6ddf1cce093a0aca5faa252f2d43b5ac5b464 /net/speakfreely/patches
parentdc8097ac6579eec3d930a0d801d817b96f1a11ed (diff)
downloadpkgsrc-47369ef416146a54fab3002b01cc590c922660b8.tar.gz
Merge net/speakfreely and net/speakfreely-crypto. Allow building without
using patented IDEA algorithm. Uses two new make variables which may be defined in mk.conf: USE_CRYPTO: YES, NO USE_IDEA: YES, NO Defaults to building with crypto but without IDEA.
Diffstat (limited to 'net/speakfreely/patches')
-rw-r--r--net/speakfreely/patches/patch-aa40
-rw-r--r--net/speakfreely/patches/patch-ab4
-rw-r--r--net/speakfreely/patches/patch-ac35
-rw-r--r--net/speakfreely/patches/patch-ad179
-rw-r--r--net/speakfreely/patches/patch-ae53
-rw-r--r--net/speakfreely/patches/patch-af36
-rw-r--r--net/speakfreely/patches/patch-ag131
-rw-r--r--net/speakfreely/patches/patch-ah23
-rw-r--r--net/speakfreely/patches/patch-ai22
9 files changed, 433 insertions, 90 deletions
diff --git a/net/speakfreely/patches/patch-aa b/net/speakfreely/patches/patch-aa
index d12132fd519..bff631984c0 100644
--- a/net/speakfreely/patches/patch-aa
+++ b/net/speakfreely/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
+$NetBSD: patch-aa,v 1.2 2000/01/17 16:02:34 jlam Exp $
--- Makefile.orig Sat Sep 18 11:29:44 1999
-+++ Makefile Mon Oct 11 01:40:13 1999
++++ Makefile Sat Jan 15 12:34:29 2000
@@ -3,16 +3,19 @@
# Debugging options
@@ -67,21 +67,25 @@ $NetBSD: patch-aa,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
# If your audio hardware is half duplex, uncomment the next line.
# You can also, if you wish, define this on the CCFLAGS definition
-@@ -267,23 +282,63 @@
+@@ -267,23 +282,67 @@
CARGS = -DInternet_Port=$(INTERNET_PORT)
+# Crypto
-+.if defined(CRYPTO) && $(CRYPTO) == "yes"
-+.if defined(HAVE_LIBCRYPTO) && $(HAVE_LIBCRYPTO) == "yes"
-+CRYPTOFLAGS = -Iidea -I$(OPENSSLDIR)/include/openssl
-+CRYPTOLIBS = idea/idea.a des/des.a \
-+ -Wl,-R$(OPENSSLDIR)/lib -L$(OPENSSLDIR)/lib -lcrypto
-+CRYPTOOBJS = idealib.o deslib.o
++.if defined(USE_CRYPTO) && $(USE_CRYPTO) == "YES"
++.if defined(HAVE_LIBCRYPTO) && $(HAVE_LIBCRYPTO) == "YES"
++CRYPTOFLAGS = -I$(OPENSSLDIR)/include/openssl
++CRYPTOLIBS = des/des.a -Wl,-R$(OPENSSLDIR)/lib -L$(OPENSSLDIR)/lib -lcrypto
++CRYPTOOBJS = deslib.o
+.else
-+CRYPTOFLAGS = -Iidea -Ilibdes -Iblowfish
-+CRYPTOLIBS = blowfish/libblowfish.a des/des.a idea/idea.a libdes/libdes.a
-+CRYPTOOBJS = libblowfish.o deslib.o idealib.o libdes.o
++CRYPTOFLAGS = -Ilibdes -Iblowfish
++CRYPTOLIBS = blowfish/libblowfish.a des/des.a libdes/libdes.a
++CRYPTOOBJS = libblowfish.o deslib.o libdes.o
++.if defined(USE_IDEA) && $(USE_IDEA) == "YES"
++CRYPTOFLAGS += -DUSE_IDEA -Iidea
++CRYPTOLIBS += idea/idea.a
++CRYPTOOBJS += idealib.o
++.endif
+.endif
+.else
+CCFLAGS += -DNOCRYPTO
@@ -90,7 +94,7 @@ $NetBSD: patch-aa,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
+CRYPTOOBJS =
+.endif
+
-+.if defined(HAVE_GSM) && ${HAVE_GSM} == "yes"
++.if defined(HAVE_GSM) && ${HAVE_GSM} == "YES"
+GSMFLAGS = -I${LOCALBASE}/include
+GSMLIBS = -Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib -lgsm
+GSMOBJS =
@@ -100,7 +104,7 @@ $NetBSD: patch-aa,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
+GSMOBJS = gsmlib.o
+.endif
+
-+.if defined(HAVE_MD5) && $(HAVE_MD5) == "yes"
++.if defined(HAVE_MD5) && $(HAVE_MD5) == "YES"
+MD5FLAGS = -I/usr/include
+MD5LIBS =
+MD5OBJS =
@@ -138,7 +142,7 @@ $NetBSD: patch-aa,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
LAUNCHOBJS = launch.o soundbyte.o usleep.o g711.o
-@@ -302,13 +357,13 @@
+@@ -302,13 +361,13 @@
ECHOOBJS = echo.o codecs.o g711.o rtpacket.o ulaw.o xdsub.o
@@ -156,7 +160,7 @@ $NetBSD: patch-aa,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
# Configure the voice on demand server for the platform's
# location of Perl and network constant definitions.
-@@ -402,8 +457,8 @@
+@@ -402,8 +461,8 @@
speakfree.h: audio_descr.h rtp.h rtpacket.h ulaw2linear.h types.h
@@ -167,7 +171,7 @@ $NetBSD: patch-aa,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
manpage:
nroff -man sfmike.1 | $(PAGER)
-@@ -442,7 +497,7 @@
+@@ -442,7 +501,7 @@
# Clean everything
clean:
@@ -176,7 +180,7 @@ $NetBSD: patch-aa,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
( cd adpcm; make clean )
( cd blowfish; make clean )
( cd libdes; make clean )
-@@ -456,11 +511,12 @@
+@@ -456,11 +515,12 @@
# Clean only the main directory, not the libraries
dusty:
diff --git a/net/speakfreely/patches/patch-ab b/net/speakfreely/patches/patch-ab
index 63d27e7b550..9f88f0eefb3 100644
--- a/net/speakfreely/patches/patch-ab
+++ b/net/speakfreely/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.2 1999/10/26 16:45:18 jlam Exp $
+$NetBSD: patch-ab,v 1.3 2000/01/17 16:02:34 jlam Exp $
--- des/des.c.orig Fri Feb 23 06:10:37 1996
-+++ des/des.c Tue Oct 26 12:22:56 1999
++++ des/des.c Sat Jan 15 11:59:59 2000
@@ -4,6 +4,18 @@
*/
#define NULL 0
diff --git a/net/speakfreely/patches/patch-ac b/net/speakfreely/patches/patch-ac
index f3f3605e44d..57673f7c5f0 100644
--- a/net/speakfreely/patches/patch-ac
+++ b/net/speakfreely/patches/patch-ac
@@ -1,13 +1,24 @@
-$NetBSD: patch-ac,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
+$NetBSD: patch-ac,v 1.2 2000/01/17 16:02:34 jlam Exp $
---- sfspeaker.1.in.orig Sat Sep 18 15:23:01 1999
-+++ sfspeaker.1.in Mon Oct 11 01:38:35 1999
-@@ -140,7 +140,7 @@
- .I busy_command
- is supplied, a default of:
- .ce 1
---b"sleep 10; sfmike %s busy.au"
-+-b"sleep 10; sfmike %s @SOUNDDIR@/busy.au"
- is used. The ten second delay is intended to allow users
- with half duplex audio hardware to receive the busy signal
- transmission after sending an initial greeting and switching
+--- echo.c.orig Wed Sep 1 14:27:43 1999
++++ echo.c Sat Jan 15 12:46:42 2000
+@@ -47,7 +47,9 @@
+ struct connection {
+ struct connection *con_next; /* Next connection */
+ struct in_addr con_addr; /* Host Internet address */
++#ifdef USE_IDEA
+ char pgpkey[17]; /* PGP key for connection */
++#endif
+ char keymd5[16]; /* Digest of key file */
+ double con_timeout; /* Connection timeout time */
+ char con_hostname[264]; /* Host name */
+@@ -705,7 +707,9 @@
+
+ newconn = TRUE;
+ c->con_next = conn;
++#ifdef USE_IDEA
+ c->pgpkey[0] = FALSE;
++#endif
+ bzero(c->keymd5, 16);
+ conn = c;
+ bcopy(&from.sin_addr, &(c->con_addr),
diff --git a/net/speakfreely/patches/patch-ad b/net/speakfreely/patches/patch-ad
index 29f833c4b38..47b8ff950d7 100644
--- a/net/speakfreely/patches/patch-ad
+++ b/net/speakfreely/patches/patch-ad
@@ -1,17 +1,168 @@
-$NetBSD: patch-ad,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
+$NetBSD: patch-ad,v 1.2 2000/01/17 16:02:34 jlam Exp $
---- soundbyte.c.orig Tue Sep 14 08:55:17 1999
-+++ soundbyte.c Mon Oct 11 01:38:35 1999
-@@ -27,9 +27,11 @@
- #else
- #include <sun/audioio.h>
- #endif
--#else /* FreeBSD / Linux */
-+#else /* NetBSD / FreeBSD / Linux */
- #ifdef LINUX
- #include <linux/soundcard.h>
-+#elif defined(__NetBSD__)
-+#include <soundcard.h>
+--- mike.c.orig Tue Sep 14 09:27:51 1999
++++ mike.c Sat Jan 15 12:52:38 2000
+@@ -23,8 +23,10 @@
+ char deskey[9]; /* Destination DES key, if any */
+ char rtpdeskey[9]; /* Destination RTP DES key, if any */
+ char vatdeskey[9]; /* Destination VAT DES key, if any */
++#ifdef USE_IDEA
+ char ideakey[17]; /* Destination IDEA key, if any */
+ char pgpkey[17]; /* Destination PGP key, if any */
++#endif
+ char blowfish_spec; /* Nonzero if Blowfish key specified */
+ #ifdef CRYPTO
+ BF_KEY blowfishkey; /* Destination Blowfish key, if any */
+@@ -87,8 +89,10 @@
+ static char curkey[9] = ""; /* Current DES key if curkey[0] != 0 */
+ static char currtpkey[9] = ""; /* Current RTP DES key if currtpkey[0] != 0 */
+ static char curvatkey[9] = ""; /* Current VAT DES key if currtpkey[0] != 0 */
++#ifdef USE_IDEA
+ static char curideakey[17] = ""; /* Current IDEA key if curideakey[0] != 0 */
+ static char curpgpkey[17] = ""; /* Current PGP key if curpgpkey[0] != 0 */
++#endif
+ static char curblowfish_spec = FALSE; /* Nonzero if Blowfish key specified */
+ #ifdef CRYPTO
+ static BF_KEY curblowfishkey; /* Blowfish key */
+@@ -485,8 +489,10 @@
+ bcopy(curkey, d->deskey, 9);
+ bcopy(currtpkey, d->rtpdeskey, 9);
+ bcopy(curvatkey, d->vatdeskey, 9);
++#ifdef USE_IDEA
+ bcopy(curideakey, d->ideakey, 17);
+ bcopy(curpgpkey, d->pgpkey, 17);
++#endif
+ d->blowfish_spec = curblowfish_spec;
+ #ifdef CRYPTO
+ bcopy(&curblowfishkey, &(d->blowfishkey), sizeof(BF_KEY));
+@@ -655,8 +661,12 @@
+ #endif
+
+ #ifdef CRYPTO
++#ifdef USE_IDEA
+ if (d->deskey[0] || d->ideakey[0] || d->blowfish_spec ||
+ d->pgpkey[0] || d->otp != NULL) {
++#else
++ if (d->deskey[0] || d->blowfish_spec || d->otp != NULL) {
++#endif
+ soundbuf ebuf;
+ int i;
+ LONG slen, plen = 0;
+@@ -733,6 +743,7 @@
+ }
+ }
+
++#ifdef USE_IDEA
+ /* IDEA encryption. */
+
+ if (d->ideakey[0]) {
+@@ -755,6 +766,7 @@
+ close_idea();
+ ebuf.compression |= fEncIDEA;
+ }
++#endif
+
+ /* Blowfish encryption. */
+
+@@ -779,6 +791,7 @@
+ ebuf.compression |= fEncBF;
+ }
+
++#ifdef USE_IDEA
+ /* PGP encryption. */
+
+ if (d->pgpkey[0]) {
+@@ -801,6 +814,7 @@
+ close_idea();
+ ebuf.compression |= fEncPGP;
+ }
++#endif
+
+ /* Key file encryption. */
+
+@@ -1659,7 +1673,7 @@
+ MD5Init(&md5c);
+ MD5Update(&md5c, s, strlen(s));
+ MD5Final(md5key1, &md5c);
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ init_idearand(md5key, md5key1, time(NULL));
+ #define nextrand idearand()
#else
- #include <machine/soundcard.h>
+@@ -1683,7 +1697,7 @@
+ key[j] = nextrand;
+ }
+ }
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ close_idearand();
+ #endif
+ #undef nextrand
+@@ -1723,7 +1737,9 @@
+ V fprintf(stderr, " -F ADPCM compression\n");
+ V fprintf(stderr, " -G Automatic gain control\n");
+ #ifdef CRYPTO
++#ifdef USE_IDEA
+ V fprintf(stderr, " -Ikey IDEA encrypt with key\n");
++#endif
+ V fprintf(stderr, " -Kkey DES encrypt with key\n");
+ #endif
+ V fprintf(stderr, " -L Remote loopback\n");
+@@ -1753,7 +1769,7 @@
+ #ifdef AUDIO_DEVICE_FILE
+ V fprintf(stderr, " -Yindev[:ctldev] Override default audio device file name or specify open #fd\n");
+ #endif
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ V fprintf(stderr, " -Z\"user..\" Send PGP session key for user(s)\n");
+ #endif
+ V fprintf(stderr, "\n");
+@@ -1946,6 +1962,7 @@
+ break;
+
+ #ifdef CRYPTO
++#ifdef USE_IDEA
+ case 'I': /* -Ikey -- Set IDEA key */
+ if (strlen(op + 1) == 0) {
+ curideakey[0] = FALSE;
+@@ -1963,6 +1980,7 @@
+ }
+ }
+ break;
++#endif
+
+ case 'K': /* -Kkey -- Set DES key */
+ desinit(1); /* Initialise the DES library */
+@@ -2181,6 +2199,7 @@
+ #endif
+
+ #ifdef CRYPTO
++#ifdef USE_IDEA
+ case 'Z': /* -Z"user1 user2..." -- Send PGP
+ encrypted session key to
+ named users */
+@@ -2270,6 +2289,7 @@
+ }
+ break;
+ #endif
++#endif
+ }
+ } else {
+
+@@ -2281,10 +2301,15 @@
+ }
+
+ if (rtp || vat) {
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ if (curideakey[0] || curpgpkey[0] ||
+ curblowfish_spec || curotp != NULL) {
+ fprintf(stderr, "Blowfish, IDEA, PGP, and Key File encryption cannot be used\n with -RTP or -VAT protocols.\n");
++ return 2;
++ }
++#else
++ if (curblowfish_spec || curotp != NULL) {
++ fprintf(stderr, "Blowfish and Key File encryption cannot be used\n with -RTP or -VAT protocols.\n");
+ return 2;
+ }
#endif
diff --git a/net/speakfreely/patches/patch-ae b/net/speakfreely/patches/patch-ae
index b18fe557c82..c8317e19f42 100644
--- a/net/speakfreely/patches/patch-ae
+++ b/net/speakfreely/patches/patch-ae
@@ -1,24 +1,31 @@
-$NetBSD: patch-ae,v 1.1.1.1 1999/10/11 05:48:25 jlam Exp $
+$NetBSD: patch-ae,v 1.2 2000/01/17 16:02:34 jlam Exp $
---- speaker.c.orig Tue Sep 14 05:53:42 1999
-+++ speaker.c Mon Oct 11 01:38:35 1999
-@@ -10,6 +10,10 @@
- #include "speakfree.h"
- #include "version.h"
-
-+#ifndef SOUNDDIR
-+#define SOUNDDIR
-+#endif
-+
- static int audiok = FALSE; /* Audio initialised flag */
- static int audiotime = 0; /* Audio timeout counter */
- static int debugging = FALSE; /* Debugging enabled */
-@@ -53,7 +57,7 @@
- static char *replyfile = NULL; /* Reply file pathname */
- static char *replycmdexe = NULL;
- static char *replycmd = "sfmike -t"; /* Default reply command */
--static char *busysignal = "sleep 10; sfmike %s busy.au"; /* Default busy signal command */
-+static char *busysignal = "sleep 10; sfmike %s " SOUNDDIR "busy.au"; /* Default busy signal command */
- static int busytimeout = 60 * 1000000L; /* Busy signal timeout interval */
- static int dobusy = FALSE; /* Reject calls when busy ? */
- #ifdef HALF_DUPLEX
+--- sfspeaker.1.in.orig Sat Sep 18 15:23:01 1999
++++ sfspeaker.1.in Mon Jan 17 01:26:08 2000
+@@ -140,7 +140,7 @@
+ .I busy_command
+ is supplied, a default of:
+ .ce 1
+--b"sleep 10; sfmike %s busy.au"
++-b"sleep 10; sfmike %s @SOUNDDIR@/busy.au"
+ is used. The ten second delay is intended to allow users
+ with half duplex audio hardware to receive the busy signal
+ transmission after sending an initial greeting and switching
+@@ -177,6 +177,8 @@
+ is used to decrypt sound received
+ using the International Data Encryption
+ Algorithm (IDEA).
++This option is not available unless speakfreely was compiled
++to support IDEA.
+ .TP
+ .BI \-j delay , idle
+ Jitter compensation is enabled. This delays playing sound
+@@ -354,6 +356,8 @@
+ .B pgp
+ via a command line argument when it is invoked to decode the session
+ key.
++This option is not available unless speakfreely was compiled
++to support IDEA.
+ .SH "LOOK WHO'S LISTENING"
+ Speak Freely's Look Who's Listening mechanism allows you to publish
+ information in an electronic telephone directory at a cooperating
diff --git a/net/speakfreely/patches/patch-af b/net/speakfreely/patches/patch-af
index bef789ce71c..b7d7e38bdd6 100644
--- a/net/speakfreely/patches/patch-af
+++ b/net/speakfreely/patches/patch-af
@@ -1,23 +1,17 @@
-$NetBSD: patch-af,v 1.2 1999/10/26 16:45:18 jlam Exp $
+$NetBSD: patch-af,v 1.3 2000/01/17 16:02:34 jlam Exp $
---- speakfree.h.orig Tue Sep 14 08:17:32 1999
-+++ speakfree.h Tue Oct 26 12:23:11 1999
-@@ -20,6 +20,18 @@
- #define _BSD_SIGNALS
+--- soundbyte.c.orig Tue Sep 14 08:55:17 1999
++++ soundbyte.c Sat Jan 15 11:59:59 2000
+@@ -27,9 +27,11 @@
+ #else
+ #include <sun/audioio.h>
+ #endif
+-#else /* FreeBSD / Linux */
++#else /* NetBSD / FreeBSD / Linux */
+ #ifdef LINUX
+ #include <linux/soundcard.h>
++#elif defined(__NetBSD__)
++#include <soundcard.h>
+ #else
+ #include <machine/soundcard.h>
#endif
-
-+/*
-+ * NetBSD is cross-platform, so determine endianness from machine-specific
-+ * header files.
-+ */
-+#if defined(__NetBSD__)
-+#include <sys/types.h> /* needed for NetBSD <= 1.4.x */
-+#include <machine/endian.h>
-+#if BYTE_ORDER == LITTLE_ENDIAN
-+#define M_LITTLE_ENDIAN
-+#endif
-+#endif /* __NetBSD__ */
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <fcntl.h>
diff --git a/net/speakfreely/patches/patch-ag b/net/speakfreely/patches/patch-ag
new file mode 100644
index 00000000000..c5a07d8879d
--- /dev/null
+++ b/net/speakfreely/patches/patch-ag
@@ -0,0 +1,131 @@
+$NetBSD: patch-ag,v 1.1 2000/01/17 16:02:34 jlam Exp $
+
+--- speaker.c.orig Tue Sep 14 05:53:42 1999
++++ speaker.c Sat Jan 15 12:46:06 2000
+@@ -10,6 +10,10 @@
+ #include "speakfree.h"
+ #include "version.h"
+
++#ifndef SOUNDDIR
++#define SOUNDDIR
++#endif
++
+ static int audiok = FALSE; /* Audio initialised flag */
+ static int audiotime = 0; /* Audio timeout counter */
+ static int debugging = FALSE; /* Debugging enabled */
+@@ -22,7 +26,9 @@
+ static char deskey[9] = ""; /* DES key, if any */
+ static char rtpdeskey[9] = ""; /* RTP DES key, if any */
+ static char vatdeskey[9] = ""; /* VAT DES key, if any */
++#ifdef USE_IDEA
+ static char ideakey[17] = ""; /* IDEA key, if any */
++#endif
+ static char blowfish_spec = FALSE; /* Nonzero if Blowfish key specified */
+ #ifdef CRYPTO
+ static BF_KEY blowfishkey; /* Blowfish key */
+@@ -53,7 +59,7 @@
+ static char *replyfile = NULL; /* Reply file pathname */
+ static char *replycmdexe = NULL;
+ static char *replycmd = "sfmike -t"; /* Default reply command */
+-static char *busysignal = "sleep 10; sfmike %s busy.au"; /* Default busy signal command */
++static char *busysignal = "sleep 10; sfmike %s " SOUNDDIR "busy.au"; /* Default busy signal command */
+ static int busytimeout = 60 * 1000000L; /* Busy signal timeout interval */
+ static int dobusy = FALSE; /* Reject calls when busy ? */
+ #ifdef HALF_DUPLEX
+@@ -261,17 +267,17 @@
+ MD5Init(&md5c);
+ MD5Update(&md5c, s, strlen(s));
+ MD5Final(md5key1, &md5c);
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ init_idearand(md5key, md5key1, time(NULL));
+ #endif
+ for (j = 0; j < 16; j++) {
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ key[j] = idearand();
+ #else
+ key[j] = md5key[j] ^ md5key1[j];
+ #endif
+ }
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ close_idearand();
+ #endif
+ }
+@@ -533,6 +539,7 @@
+ an idle message, though, and tweak the timeout so we do this
+ only once. */
+
++#ifdef USE_IDEA
+ if (c->pgpkey[0] == 0) {
+ if (l == NULL) {
+ conn = n;
+@@ -541,6 +548,7 @@
+ }
+ free(c);
+ }
++#endif
+ } else {
+ int makereq = FALSE;
+
+@@ -796,6 +804,7 @@
+ }
+ }
+
++#ifdef USE_IDEA
+ if ((msg->compression & fEncPGP) && c->pgpkey[0]) {
+ unsigned short iv[4];
+ LONG slen = (len + 7) & (~7);
+@@ -809,6 +818,7 @@
+ ideacfb(val, slen);
+ close_idea();
+ }
++#endif
+
+ if ((msg->compression & fEncBF) && blowfish_spec) {
+ unsigned char iv[8];
+@@ -822,6 +832,7 @@
+ slen, &blowfishkey, iv, BF_DECRYPT);
+ }
+
++#ifdef USE_IDEA
+ if ((msg->compression & fEncIDEA) && ideakey[0]) {
+ unsigned short iv[4];
+ LONG slen = (len + 7) & (~7);
+@@ -835,6 +846,7 @@
+ ideacfb(val, slen);
+ close_idea();
+ }
++#endif
+
+ if ((msg->compression & fEncDES) && deskey[0]) {
+ int i;
+@@ -1211,7 +1223,7 @@
+ }
+ break;
+
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ case 'I': /* -Ikey -- Set IDEA key */
+ if (strlen(op + 1) == 0) {
+ ideakey[0] = FALSE;
+@@ -1660,7 +1672,9 @@
+
+ newconn = TRUE;
+ c->con_next = conn;
++#ifdef USE_IDEA
+ c->pgpkey[0] = FALSE;
++#endif
+ bzero(c->keymd5, 16);
+ c->con_uname[0] = c->con_email[0] = 0;
+ #ifndef CRYPTO
+@@ -2496,7 +2510,7 @@
+ }
+
+
+-#ifdef CRYPTO
++#if defined(CRYPTO) && defined(USE_IDEA)
+ if ((sb.compression & fKeyPGP)) {
+ char cmd[256], f[40], kmd[16];
+ FILE *kfile;
diff --git a/net/speakfreely/patches/patch-ah b/net/speakfreely/patches/patch-ah
new file mode 100644
index 00000000000..7aea43d8852
--- /dev/null
+++ b/net/speakfreely/patches/patch-ah
@@ -0,0 +1,23 @@
+$NetBSD: patch-ah,v 1.1 2000/01/17 16:02:34 jlam Exp $
+
+--- speakfree.h.orig Tue Sep 14 08:17:32 1999
++++ speakfree.h Sat Jan 15 11:59:59 2000
+@@ -20,6 +20,18 @@
+ #define _BSD_SIGNALS
+ #endif
+
++/*
++ * NetBSD is cross-platform, so determine endianness from machine-specific
++ * header files.
++ */
++#if defined(__NetBSD__)
++#include <sys/types.h> /* needed for NetBSD <= 1.4.x */
++#include <machine/endian.h>
++#if BYTE_ORDER == LITTLE_ENDIAN
++#define M_LITTLE_ENDIAN
++#endif
++#endif /* __NetBSD__ */
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
diff --git a/net/speakfreely/patches/patch-ai b/net/speakfreely/patches/patch-ai
new file mode 100644
index 00000000000..d45d3cb81d9
--- /dev/null
+++ b/net/speakfreely/patches/patch-ai
@@ -0,0 +1,22 @@
+$NetBSD: patch-ai,v 1.1 2000/01/17 16:02:34 jlam Exp $
+
+--- sfmike.1.orig Mon Sep 13 10:12:50 1999
++++ sfmike.1 Mon Jan 17 01:28:20 2000
+@@ -391,6 +391,8 @@
+ to exchange keys with other parties, the
+ fundamental security of your voice link rests upon the IDEA
+ algorithm.
++This options is not available unless speakfreely was compiled
++to support IDEA.
+ .TP
+ .BI \-k key
+ The specified
+@@ -820,6 +822,8 @@
+ .BR pgp ,
+ as long as you're entitled to use that program, you can enjoy the
+ convenience of public key exchange of session keys for audio as well.
++This options is not available unless speakfreely was compiled
++to support IDEA.
+ .SH FILES
+ On most Unix machines audio is read from the
+ .B /dev/audio