summaryrefslogtreecommitdiff
path: root/chat/zephyr/patches
diff options
context:
space:
mode:
authordholland <dholland>2011-10-08 06:17:40 +0000
committerdholland <dholland>2011-10-08 06:17:40 +0000
commit539d24ee1af6b01acb442caf0deaa13cb8757ec7 (patch)
tree28fc32c4b68939645d9a8d7ccc4a1bb52b9d6bb5 /chat/zephyr/patches
parentd1b89a8a87b0440b93ff050f0221c736f45f379e (diff)
downloadpkgsrc-539d24ee1af6b01acb442caf0deaa13cb8757ec7.tar.gz
Check for hes_getmailhost before trying to call it. It's not in the libc
hesiod, and it looks as if it's a deprecated feature. This in turn will make the mail notify tool not understand Hesiod mailserver records on NetBSD and probably anyone else with a builtin hesiod. If anyone really really wants that functionality, set PREFER.hesiod=pkgsrc and let it build and link to the pkgsrc hesiod library... Fixes the build of zephyr.
Diffstat (limited to 'chat/zephyr/patches')
-rw-r--r--chat/zephyr/patches/patch-acconfig_h16
-rw-r--r--chat/zephyr/patches/patch-an25
-rw-r--r--chat/zephyr/patches/patch-configure69
-rw-r--r--chat/zephyr/patches/patch-configure_in16
4 files changed, 121 insertions, 5 deletions
diff --git a/chat/zephyr/patches/patch-acconfig_h b/chat/zephyr/patches/patch-acconfig_h
new file mode 100644
index 00000000000..5b213851999
--- /dev/null
+++ b/chat/zephyr/patches/patch-acconfig_h
@@ -0,0 +1,16 @@
+$NetBSD: patch-acconfig_h,v 1.1 2011/10/08 06:17:40 dholland Exp $
+
+Check for HES_GETMAILHOST before using it.
+
+--- acconfig.h~ 1998-12-01 16:48:27.000000000 +0000
++++ acconfig.h
+@@ -1,6 +1,9 @@
+ /* Define to compile with Hesiod support. */
+ #undef HAVE_HESIOD
+
++/* Define if Hesiod has hes_getmailhost. */
++#undef HAVE_HES_GETMAILHOST
++
+ /* Define to compile with Kerberos support. */
+ #undef HAVE_KRB4
+
diff --git a/chat/zephyr/patches/patch-an b/chat/zephyr/patches/patch-an
index 2f0d52bf97c..7f3098cf7f2 100644
--- a/chat/zephyr/patches/patch-an
+++ b/chat/zephyr/patches/patch-an
@@ -1,7 +1,28 @@
-$NetBSD: patch-an,v 1.1 2009/09/23 13:31:32 tnn Exp $
+$NetBSD: patch-an,v 1.2 2011/10/08 06:17:40 dholland Exp $
---- clients/zmailnotify/zmailnotify.c.orig 1997-10-25 23:47:11.000000000 +0200
+- check for hes_getmailhost before using it
+- avoid conflict with POSIX getline
+
+--- clients/zmailnotify/zmailnotify.c.orig 1997-10-25 21:47:11.000000000 +0000
+++ clients/zmailnotify/zmailnotify.c
+@@ -72,7 +72,7 @@ main(argc, argv)
+ int i,nbytes,retval,uselock;
+ struct passwd *pwd;
+ struct _mail mymail;
+-#ifdef HAVE_HESIOD
++#ifdef HAVE_HES_GETMAILHOST
+ struct hes_postoffice *p;
+ #endif
+
+@@ -104,7 +104,7 @@ main(argc, argv)
+ (void) sprintf(lockfile,"%s/.maillock",dir);
+
+ host = (char *)getenv("MAILHOST");
+-#ifdef HAVE_HESIOD
++#ifdef HAVE_HES_GETMAILHOST
+ if (host == NULL) {
+ p = hes_getmailhost(user);
+ if (p != NULL && strcmp(p->po_type, "POP") == 0)
@@ -144,7 +144,7 @@ main(argc, argv)
exit(1);
}
diff --git a/chat/zephyr/patches/patch-configure b/chat/zephyr/patches/patch-configure
index 6994795271e..96c2bdc43b7 100644
--- a/chat/zephyr/patches/patch-configure
+++ b/chat/zephyr/patches/patch-configure
@@ -1,6 +1,6 @@
-$NetBSD: patch-configure,v 1.1 2011/10/08 05:56:00 dholland Exp $
+$NetBSD: patch-configure,v 1.2 2011/10/08 06:17:40 dholland Exp $
-Regenerate after patching aclocal.m4.
+Regenerate after patching aclocal.m4 and configure.in.
--- configure.orig 2001-05-18 20:41:38.000000000 +0000
+++ configure
@@ -60,7 +60,7 @@ Regenerate after patching aclocal.m4.
ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3389,13 +3435,15 @@ LIBS="$ac_save_LIBS"
+@@ -3389,19 +3435,78 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
@@ -78,3 +78,66 @@ Regenerate after patching aclocal.m4.
cat >> confdefs.h <<\EOF
#define HAVE_HESIOD 1
EOF
+
+ fi
+
++if test "$hesiod" != "no"; then
++ for ac_func in hes_getmailhost
++do
++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++echo "configure:3458: checking for $ac_func" >&5
++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ cat > conftest.$ac_ext <<EOF
++#line 3463 "configure"
++#include "confdefs.h"
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++#include <assert.h>
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func();
++
++int main() {
++
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++$ac_func();
++#endif
++
++; return 0; }
++EOF
++if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=no"
++fi
++rm -f conftest*
++fi
++
++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
++ cat >> confdefs.h <<EOF
++#define $ac_tr_func 1
++EOF
++
++else
++ echo "$ac_t""no" 1>&6
++fi
++done
++
++fi
+ # Check whether --with-regex or --without-regex was given.
+ if test "${with_regex+set}" = set; then
+ withval="$with_regex"
diff --git a/chat/zephyr/patches/patch-configure_in b/chat/zephyr/patches/patch-configure_in
new file mode 100644
index 00000000000..5b996f125ab
--- /dev/null
+++ b/chat/zephyr/patches/patch-configure_in
@@ -0,0 +1,16 @@
+$NetBSD: patch-configure_in,v 1.1 2011/10/08 06:17:40 dholland Exp $
+
+Check for hes_getmailhost before trying to use it.
+
+--- configure.in~ 2000-04-05 14:51:31.000000000 +0000
++++ configure.in
+@@ -85,6 +85,9 @@ AC_SUBST(SLIB)
+
+ ATHENA_KRB4
+ ATHENA_HESIOD
++if test "$hesiod" != "no"; then
++ AC_CHECK_FUNCS(hes_getmailhost)
++fi
+ ATHENA_REGEXP
+ ATHENA_ARES
+ ATHENA_UTIL_COM_ERR