Index: Makefile
===================================================================
--- Makefile	(revision 536414)
+++ Makefile	(working copy)
@@ -2,26 +2,24 @@
 # $FreeBSD$
 
 PORTNAME=	zephyr
-DISTVERSION=	3.0.1
+DISTVERSION=	3.1.2
 PORTREVISION=	4
 CATEGORIES=	net-im
-MASTER_SITES=	http://zephyr.1ts.org/export/2642/distribution/
+MASTER_SITES=	GH
 
 MAINTAINER=	kaduk-fbsd@mit.edu
 COMMENT=	Enterprise-scale distributed messaging system
 
-BROKEN=		unfetchable
-DEPRECATED=	Broken for more than 6 months
-EXPIRATION_DATE=	2020-05-05
-
 LICENSE=	MIT
 
 BROKEN_aarch64=	Fails to link: missing sbrk
 
+USE_GITHUB=	yes
+GH_ACCOUNT=	zephyr-im
 GNU_CONFIGURE=	yes
 # it is an upstream bug that --with-krb5 needs a path
 CONFIGURE_ARGS=	--with-krb5="${KRB5_DIR}"
-USES=		iconv libtool readline
+USES=		iconv libtool readline autoreconf
 USE_RC_SUBR=	zhm
 USE_LDCONFIG=	yes
 MAKE_JOBS_UNSAFE=	yes
@@ -51,6 +49,10 @@
 KRB5_DIR?=	${DESTDIR}/usr
 .endif
 
+pre-configure:
+	# Upstream's own Debian package says "We only need this for install-sh"
+	@-(cd ${AUTORECONF_WRKSRC} && automake -a)
+
 # try to fix parallel (-jX) builds: add missing inter-source dependencies
 post-patch:
 	@${REINPLACE_CMD} -e \
Index: distinfo
===================================================================
--- distinfo	(revision 536414)
+++ distinfo	(working copy)
@@ -1,2 +1,3 @@
-SHA256 (zephyr-3.0.1.tar.gz) = a67c8b04aedc2e80e8e157853b91c01963ddeb1bdb5f776fdb3bc69bf703763b
-SIZE (zephyr-3.0.1.tar.gz) = 671953
+TIMESTAMP = 1568064351
+SHA256 (zephyr-im-zephyr-3.1.2_GH0.tar.gz) = b323244aee7fa3cb25432e8d882dcfd231c9bc83092e7284924aec068bc50df4
+SIZE (zephyr-im-zephyr-3.1.2_GH0.tar.gz) = 395122
Index: files/patch-configure
===================================================================
--- files/patch-configure	(revision 536414)
+++ files/patch-configure	(nonexistent)
@@ -1,53 +0,0 @@
---- ./configure.orig	2010-11-06 19:01:04.000000000 -0400
-+++ ./configure	2011-02-21 14:30:09.000000000 -0500
-@@ -20412,13 +20412,13 @@
- 
-    LIBZEPHYR_LIBS="$LIBZEPHYR_LIBS $KRB5_LIBS"
-    # the zephyr library needs -lresolv if it's built with krb5
--   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
-+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lc" >&5
- $as_echo_n "checking for res_send in -lresolv... " >&6; }
- if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lresolv  $LIBS"
-+LIBS="-lc  $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-@@ -20449,7 +20449,7 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
- $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
- if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
--  LIBZEPHYR_LIBS="-lresolv $LIBZEPHYR_LIBS"
-+  LIBZEPHYR_LIBS="$LIBZEPHYR_LIBS"
- else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
- $as_echo_n "checking for __res_send in -lresolv... " >&6; }
-@@ -20567,13 +20567,13 @@
- 	CPPFLAGS="$CPPFLAGS -I$hesiod/include"
- 	LDFLAGS="$LDFLAGS -L$hesiod/lib"
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_resolve in -lhesiod" >&5
--$as_echo_n "checking for hes_resolve in -lhesiod... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_resolve in -lc" >&5
-+$as_echo_n "checking for hes_resolve in -lc... " >&6; }
- if test "${ac_cv_lib_hesiod_hes_resolve+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lhesiod $LIBS $LIBS"
-+LIBS="-lc $LIBS $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-@@ -20609,7 +20609,7 @@
-   as_fn_error $? "Hesiod library not found" "$LINENO" 5
- fi
- 
--	HESIOD_LIBS="-lhesiod"
-+	HESIOD_LIBS="-lc"
- 	$as_echo "#define HAVE_HESIOD 1" >>confdefs.h
- 
- fi

Property changes on: files/patch-configure
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-yes
\ No newline at end of property
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: files/patch-configure.ac
===================================================================
--- files/patch-configure.ac	(nonexistent)
+++ files/patch-configure.ac	(working copy)
@@ -0,0 +1,22 @@
+--- configure.ac.orig	2020-01-06 21:37:29 UTC
++++ configure.ac
+@@ -173,8 +173,8 @@ if test "$krb5" != no; then
+    LIBZEPHYR_LIBS="$LIBZEPHYR_LIBS $KRB5_LIBS"
+    # the zephyr library needs -lresolv if it's built with krb5
+    AC_CHECK_FUNC(res_send, :,
+-                 AC_CHECK_LIB(resolv, res_send, LIBZEPHYR_LIBS="-lresolv $LIBZEPHYR_LIBS",
+-                              AC_CHECK_LIB(resolv, __res_send, LIBZEPHYR_LIBS="-lresolv $LIBZEPHYR_LIBS",
++                 AC_CHECK_LIB(c, res_send, LIBZEPHYR_LIBS="-lc $LIBZEPHYR_LIBS",
++                              AC_CHECK_LIB(c, __res_send, LIBZEPHYR_LIBS="-lc $LIBZEPHYR_LIBS",
+                                            AC_MSG_ERROR(Zephyr requires libresolv along with Kerberos V.))))
+    case "$target_os" in 
+       darwin*) KRB5_LIBS="$KRB5_LIBS -framework Kerberos" ;;
+@@ -188,7 +188,7 @@ AC_ARG_WITH(hesiod,
+ 	[  --with-hesiod=PREFIX    Use Hesiod],
+ 	[hesiod="$withval"], [hesiod=no])
+ if test "$hesiod" != no; then
+-	AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send))
++	AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(c, res_send))
+         if test "$hesiod" != yes; then
+         	CPPFLAGS="$CPPFLAGS -I$hesiod/include"
+         	LDFLAGS="$LDFLAGS -L$hesiod/lib"

Property changes on: files/patch-configure.ac
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: files/patch-zhm__Makefile.in
===================================================================
--- files/patch-zhm__Makefile.in	(revision 536414)
+++ files/patch-zhm__Makefile.in	(working copy)
@@ -1,6 +1,6 @@
---- zhm/Makefile.in.orig	2014-08-21 09:11:35 UTC
+--- zhm/Makefile.in.orig	2020-01-06 21:44:45 UTC
 +++ zhm/Makefile.in
-@@ -27,13 +27,14 @@ CFLAGS=@CFLAGS@
+@@ -33,13 +33,14 @@ CFLAGS=@CFLAGS@
  ALL_CFLAGS=${CFLAGS} -I${top_srcdir}/h -I${BUILDTOP}/h ${CPPFLAGS}
  LDFLAGS=@LDFLAGS@
  HESIOD_LIBS=@HESIOD_LIBS@
@@ -8,11 +8,11 @@
  
  OBJS=	timer.o queue.o zhm.o zhm_client.o zhm_server.o
  
- all: zhm
+ all: zhm zhm.8
  
  zhm: ${OBJS} ${LIBZEPHYR}
--	${LIBTOOL} --mode=link ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBZEPHYR} ${HESIOD_LIBS}
+-	${LIBTOOL} --mode=link ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBZEPHYR} ${HESIOD_LIBS} -lcom_err
 +	${LIBTOOL} --mode=link ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBS}
  
- .c.o:
- 	${CC} -c ${ALL_CFLAGS} $<
+ zhm.8: ${srcdir}/zhm.8.in Makefile
+ 	${editman} ${srcdir}/$@.in > $@.tmp
